summaryrefslogtreecommitdiff
path: root/macros/latex/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib')
-rw-r--r--macros/latex/contrib/acmart/Makefile26
-rw-r--r--macros/latex/contrib/acmart/README3
-rw-r--r--macros/latex/contrib/acmart/acmart.dtx180
-rw-r--r--macros/latex/contrib/acmart/acmart.ins1
-rw-r--r--macros/latex/contrib/acmart/acmart.pdfbin949483 -> 943219 bytes
-rw-r--r--macros/latex/contrib/acmart/acmguide.pdfbin439879 -> 441394 bytes
-rw-r--r--macros/latex/contrib/acmart/samples/sample-acmcp.pdfbin214844 -> 214844 bytes
-rw-r--r--macros/latex/contrib/acmart/samples/sample-acmengage.pdfbin399476 -> 399476 bytes
-rw-r--r--macros/latex/contrib/acmart/samples/sample-acmlarge.pdfbin613884 -> 613884 bytes
-rw-r--r--macros/latex/contrib/acmart/samples/sample-acmsmall-biblatex.pdfbin636571 -> 636571 bytes
-rw-r--r--macros/latex/contrib/acmart/samples/sample-acmsmall-conf.pdfbin1059143 -> 1059177 bytes
-rw-r--r--macros/latex/contrib/acmart/samples/sample-acmsmall-submission.pdfbin626360 -> 626360 bytes
-rw-r--r--macros/latex/contrib/acmart/samples/sample-acmsmall-tagged.pdfbin0 -> 480489 bytes
-rw-r--r--macros/latex/contrib/acmart/samples/sample-acmsmall.pdfbin623848 -> 623848 bytes
-rw-r--r--macros/latex/contrib/acmart/samples/sample-acmtog-conf.pdfbin571812 -> 571812 bytes
-rw-r--r--macros/latex/contrib/acmart/samples/sample-acmtog.pdfbin571575 -> 571575 bytes
-rw-r--r--macros/latex/contrib/acmart/samples/sample-manuscript.pdfbin625334 -> 625334 bytes
-rw-r--r--macros/latex/contrib/acmart/samples/sample-sigconf-authordraft.pdfbin1051244 -> 1051239 bytes
-rw-r--r--macros/latex/contrib/acmart/samples/sample-sigconf-biblatex.pdfbin624415 -> 624415 bytes
-rw-r--r--macros/latex/contrib/acmart/samples/sample-sigconf-i13n.pdfbin1062362 -> 1062362 bytes
-rw-r--r--macros/latex/contrib/acmart/samples/sample-sigconf.pdfbin1047421 -> 1047421 bytes
-rw-r--r--macros/latex/contrib/acmart/samples/sample-sigplan.pdfbin1053423 -> 1053423 bytes
-rw-r--r--macros/latex/contrib/acmart/samples/samples.dtx20
-rw-r--r--macros/latex/contrib/acmart/samples/samples.ins1
-rw-r--r--macros/latex/contrib/acronym/CHANGES12
-rw-r--r--macros/latex/contrib/acronym/acronym.dtx155
-rw-r--r--macros/latex/contrib/acronym/acronym.ins4
-rw-r--r--macros/latex/contrib/acronym/acronym.pdfbin275707 -> 299705 bytes
-rw-r--r--macros/latex/contrib/animate/ChangeLog20
-rw-r--r--macros/latex/contrib/animate/README.md8
-rw-r--r--macros/latex/contrib/animate/animate.pdfbin3781023 -> 3797724 bytes
-rw-r--r--macros/latex/contrib/animate/animate.sty9
-rw-r--r--macros/latex/contrib/animate/animate.tex55
-rw-r--r--macros/latex/contrib/animate/files/pstmetronome.tex233
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamertheme-edmaths/LICENSE.txt416
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamertheme-edmaths/README.md5
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamertheme-edmaths/beamerthemeedmaths.sty167
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamertheme-edmaths/docs/beamertheme-edmaths-docs.pdfbin0 -> 292120 bytes
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamertheme-edmaths/docs/beamertheme-edmaths-docs.tex231
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamertheme-edmaths/docs/pdfpc-screenshot.pngbin0 -> 142119 bytes
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamertheme-edmaths/example-presentation.tex82
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamertheme-edmaths/example-references.bib10
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamertheme-edmaths/images/LICENSE.md5
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamertheme-edmaths/images/edinburgh-logo.pdfbin0 -> 40807 bytes
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamertheme-edmaths/images/edinburgh-logo.svg8
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamertheme-edmaths/images/white-tied-in.pdfbin0 -> 47320 bytes
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamertheme-edmaths/images/white-tied-in.svg8
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/MANIFEST.md301
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/README.md127
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/ctan.ann11
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/ctan.note3
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham-blueprint.pdfbin0 -> 1355 bytes
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham-dev-impl.pdfbin0 -> 656010 bytes
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham-doc.pdfbin0 -> 463334 bytes
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham-doc.tex1094
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham-example169transp.pdfbin0 -> 280401 bytes
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham-example169transp.tex65
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham-example43dark.pdfbin0 -> 282846 bytes
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham-example43dark.tex66
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham-exampleSimple.pdfbin0 -> 30349 bytes
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham-exampleSimple.tex8
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham-layout.pdfbin0 -> 7446 bytes
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham-logo.pdfbin0 -> 1455 bytes
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham-safetybox.pdf70
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham-user-cmds.pdfbin0 -> 229912 bytes
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham.dtx8842
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham.ins75
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham.pdfbin0 -> 1055055 bytes
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/section-Beamer.tex379
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/section-Conclusion.tex37
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/section-Gotham.tex398
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamertheme-tcolorbox/README.md8
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamertheme-tcolorbox/beamerinnerthemetcolorbox.sty12
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamertheme-tcolorbox/beamertheme-tcolorbox-doc-settings.sty7
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamertheme-tcolorbox/beamertheme-tcolorbox-doc.pdfbin178055 -> 178136 bytes
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamertheme-tcolorbox/beamertheme-tcolorbox-doc.tex8
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-oxref/Makefile4
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-oxref/README.md5
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-oxref/oxalph-doc.pdfbin465495 -> 465824 bytes
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-oxref/oxnotes-doc.pdfbin473027 -> 473527 bytes
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-oxref/oxnum-doc.pdfbin469483 -> 470053 bytes
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-oxref/oxref.dtx1023
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-oxref/oxref.pdfbin597953 -> 637441 bytes
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-oxref/oxyear-doc.pdfbin469617 -> 469903 bytes
-rw-r--r--macros/latex/contrib/bmstu-iu8/README.md2
-rw-r--r--macros/latex/contrib/bmstu-iu8/bmstu-example.pdfbin177182 -> 177191 bytes
-rw-r--r--macros/latex/contrib/bmstu-iu8/bmstu-iu8/BMSTU-IU8.cls2
-rw-r--r--macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-01-base.sty2
-rw-r--r--macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-02-construction.sty13
-rw-r--r--macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-03-numbering.sty2
-rw-r--r--macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-04-section-numbering.sty2
-rw-r--r--macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-05-figures.sty2
-rw-r--r--macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-06-tables.sty2
-rw-r--r--macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-07-footnotes.sty2
-rw-r--r--macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-08-formulas.sty2
-rw-r--r--macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-09-cites.sty2
-rw-r--r--macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-10-titlepage.sty2
-rw-r--r--macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-11-performers.sty2
-rw-r--r--macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-12-abstract.sty2
-rw-r--r--macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-13-contents.sty9
-rw-r--r--macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-14-terms-and-definitions.sty2
-rw-r--r--macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-15-list-of-abbreviations.sty2
-rw-r--r--macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-16-references.sty20
-rw-r--r--macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-17-appendices.sty2
-rw-r--r--macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-18-extra.sty17
-rw-r--r--macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-19-counters.sty2
-rw-r--r--macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-20-listing.sty26
-rw-r--r--macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-21-math.sty2
-rw-r--r--macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-22-algorithms.sty2
-rw-r--r--macros/latex/contrib/changelog/README.md13
-rw-r--r--macros/latex/contrib/changelog/changelog.pdfbin54725 -> 55176 bytes
-rw-r--r--macros/latex/contrib/changelog/changelog.sty32
-rw-r--r--macros/latex/contrib/changelog/changelog.tex24
-rw-r--r--macros/latex/contrib/changelog/example.pdfbin17624 -> 17536 bytes
-rw-r--r--macros/latex/contrib/changelog/example.tex35
-rw-r--r--macros/latex/contrib/circledtext/README.md4
-rw-r--r--macros/latex/contrib/circledtext/circledtext.pdfbin214742 -> 216253 bytes
-rw-r--r--macros/latex/contrib/circledtext/circledtext.sty324
-rw-r--r--macros/latex/contrib/circledtext/circledtext.tex4
-rw-r--r--macros/latex/contrib/coloredtheorem/coloredtheorem-doc.pdfbin214341 -> 215171 bytes
-rw-r--r--macros/latex/contrib/coloredtheorem/coloredtheorem-doc.tex4
-rw-r--r--macros/latex/contrib/coloredtheorem/coloredtheorem.sty10
-rw-r--r--macros/latex/contrib/commalists-tools/README.md6
-rw-r--r--macros/latex/contrib/commalists-tools/doc/commalists-tools-doc.pdfbin0 -> 61757 bytes
-rw-r--r--macros/latex/contrib/commalists-tools/doc/commalists-tools-doc.tex415
-rw-r--r--macros/latex/contrib/commalists-tools/tex/commalists-tools.sty188
-rw-r--r--macros/latex/contrib/cs-techrep/README2
-rw-r--r--macros/latex/contrib/cs-techrep/cs-techrep.dtx93
-rw-r--r--macros/latex/contrib/cs-techrep/cs-techrep.ins2
-rw-r--r--macros/latex/contrib/cs-techrep/cs-techrep.pdfbin187505 -> 190900 bytes
-rw-r--r--macros/latex/contrib/cs-techrep/template/cpn_all_all.bib226
-rw-r--r--macros/latex/contrib/cs-techrep/template/cpn_supervised_all.bib1
-rw-r--r--macros/latex/contrib/cs-techrep/template/cs-techrep-example-neumann.pdfbin145442 -> 155959 bytes
-rw-r--r--macros/latex/contrib/cs-techrep/template/cs-techrep-example-neumann.tex75
-rw-r--r--macros/latex/contrib/cs-techrep/template/selfref.bib4
-rw-r--r--macros/latex/contrib/cs-techrep/template/webdev_commons.bib1550
-rw-r--r--macros/latex/contrib/csthm/README.md89
-rw-r--r--macros/latex/contrib/csthm/csthm-example.pdfbin0 -> 410446 bytes
-rw-r--r--macros/latex/contrib/csthm/csthm-example.tex407
-rw-r--r--macros/latex/contrib/csthm/csthm.dtx238
-rw-r--r--macros/latex/contrib/csthm/csthm.ins55
-rw-r--r--macros/latex/contrib/csvsimple/CHANGES.md14
-rw-r--r--macros/latex/contrib/csvsimple/README.md2
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple-doc.sty9
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple-example.pdfbin72044 -> 72044 bytes
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple-example.tex2
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple-l3.pdfbin951198 -> 951769 bytes
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple-l3.sty36
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple-l3.tex9
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple-legacy.pdfbin690985 -> 691190 bytes
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple-legacy.sty4
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple-legacy.tex2
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple.pdfbin295659 -> 295267 bytes
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple.sty4
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple.tex2
-rw-r--r--macros/latex/contrib/customenvs/doc/customenvs-doc-en.pdfbin199070 -> 213959 bytes
-rw-r--r--macros/latex/contrib/customenvs/doc/customenvs-doc-en.tex86
-rw-r--r--macros/latex/contrib/customenvs/doc/customenvs-doc-fr.pdfbin1503490 -> 1568902 bytes
-rw-r--r--macros/latex/contrib/customenvs/doc/customenvs-doc-fr.tex379
-rw-r--r--macros/latex/contrib/customenvs/doc/envtexo_exemples.pdfbin177853 -> 149933 bytes
-rw-r--r--macros/latex/contrib/customenvs/doc/envtexo_exemples.tex24
-rw-r--r--macros/latex/contrib/customenvs/tex/customenvs.sty756
-rw-r--r--macros/latex/contrib/easybook/README.md2
-rw-r--r--macros/latex/contrib/easybook/easybook.dtx274
-rw-r--r--macros/latex/contrib/easybook/easybook.pdfbin638352 -> 646633 bytes
-rw-r--r--macros/latex/contrib/easybook/easybook.tex131
-rw-r--r--macros/latex/contrib/edmaths/README.md2
-rw-r--r--macros/latex/contrib/edmaths/docs/edmaths-docs.pdf (renamed from macros/latex/contrib/edmaths/edmaths-docs.pdf)bin144435 -> 146357 bytes
-rw-r--r--macros/latex/contrib/edmaths/docs/edmaths-docs.tex282
-rw-r--r--macros/latex/contrib/edmaths/edmaths.sty8
-rw-r--r--macros/latex/contrib/enverb/README.md34
-rw-r--r--macros/latex/contrib/enverb/doc-enverb.tex47
-rw-r--r--macros/latex/contrib/enverb/doc-examples.tex178
-rw-r--r--macros/latex/contrib/enverb/doc-keys.tex111
-rw-r--r--macros/latex/contrib/enverb/doc-using-contents.tex40
-rw-r--r--macros/latex/contrib/enverb/enverb-doc.pdfbin0 -> 346942 bytes
-rw-r--r--macros/latex/contrib/enverb/enverb-doc.tex87
-rw-r--r--macros/latex/contrib/enverb/enverb.dtx720
-rw-r--r--macros/latex/contrib/enverb/preamble-examples.tex199
-rw-r--r--macros/latex/contrib/enverb/preamble-logo.tex25
-rw-r--r--macros/latex/contrib/euromoney/README.md6
-rw-r--r--macros/latex/contrib/euromoney/doc/euromoney-doc.pdfbin0 -> 2409702 bytes
-rw-r--r--macros/latex/contrib/euromoney/doc/euromoney-doc.tex461
-rw-r--r--macros/latex/contrib/euromoney/tex/euromoney-100euro.pdfbin0 -> 955673 bytes
-rw-r--r--macros/latex/contrib/euromoney/tex/euromoney-100eurosimple.pdfbin0 -> 62058 bytes
-rw-r--r--macros/latex/contrib/euromoney/tex/euromoney-100eurosimplebw.pdfbin0 -> 62345 bytes
-rw-r--r--macros/latex/contrib/euromoney/tex/euromoney-10cent.pdfbin0 -> 27497 bytes
-rw-r--r--macros/latex/contrib/euromoney/tex/euromoney-10centsimple.pdfbin0 -> 11617 bytes
-rw-r--r--macros/latex/contrib/euromoney/tex/euromoney-10centsimplebw.pdfbin0 -> 11163 bytes
-rw-r--r--macros/latex/contrib/euromoney/tex/euromoney-10euro.pdfbin0 -> 160214 bytes
-rw-r--r--macros/latex/contrib/euromoney/tex/euromoney-10eurosimple.pdfbin0 -> 22792 bytes
-rw-r--r--macros/latex/contrib/euromoney/tex/euromoney-10eurosimplebw.pdfbin0 -> 22996 bytes
-rw-r--r--macros/latex/contrib/euromoney/tex/euromoney-1cent.pdfbin0 -> 46257 bytes
-rw-r--r--macros/latex/contrib/euromoney/tex/euromoney-1centsimple.pdfbin0 -> 2172 bytes
-rw-r--r--macros/latex/contrib/euromoney/tex/euromoney-1centsimplebw.pdfbin0 -> 2164 bytes
-rw-r--r--macros/latex/contrib/euromoney/tex/euromoney-1euro.pdfbin0 -> 19980 bytes
-rw-r--r--macros/latex/contrib/euromoney/tex/euromoney-1eurosimple.pdfbin0 -> 5894 bytes
-rw-r--r--macros/latex/contrib/euromoney/tex/euromoney-1eurosimplebw.pdfbin0 -> 5910 bytes
-rw-r--r--macros/latex/contrib/euromoney/tex/euromoney-200euro.pdfbin0 -> 354898 bytes
-rw-r--r--macros/latex/contrib/euromoney/tex/euromoney-200eurosimple.pdfbin0 -> 22825 bytes
-rw-r--r--macros/latex/contrib/euromoney/tex/euromoney-200eurosimplebw.pdfbin0 -> 23006 bytes
-rw-r--r--macros/latex/contrib/euromoney/tex/euromoney-20cent.pdfbin0 -> 26569 bytes
-rw-r--r--macros/latex/contrib/euromoney/tex/euromoney-20centsimple.pdfbin0 -> 10164 bytes
-rw-r--r--macros/latex/contrib/euromoney/tex/euromoney-20centsimplebw.pdfbin0 -> 9960 bytes
-rw-r--r--macros/latex/contrib/euromoney/tex/euromoney-20euro.pdfbin0 -> 78801 bytes
-rw-r--r--macros/latex/contrib/euromoney/tex/euromoney-20eurosimple.pdfbin0 -> 22382 bytes
-rw-r--r--macros/latex/contrib/euromoney/tex/euromoney-20eurosimplebw.pdfbin0 -> 22394 bytes
-rw-r--r--macros/latex/contrib/euromoney/tex/euromoney-2cent.pdfbin0 -> 45967 bytes
-rw-r--r--macros/latex/contrib/euromoney/tex/euromoney-2centsimple.pdfbin0 -> 2130 bytes
-rw-r--r--macros/latex/contrib/euromoney/tex/euromoney-2centsimplebw.pdfbin0 -> 2122 bytes
-rw-r--r--macros/latex/contrib/euromoney/tex/euromoney-2euro.pdfbin0 -> 23244 bytes
-rw-r--r--macros/latex/contrib/euromoney/tex/euromoney-2eurosimple.pdfbin0 -> 5941 bytes
-rw-r--r--macros/latex/contrib/euromoney/tex/euromoney-2eurosimplebw.pdfbin0 -> 5897 bytes
-rw-r--r--macros/latex/contrib/euromoney/tex/euromoney-500euro.pdfbin0 -> 231203 bytes
-rw-r--r--macros/latex/contrib/euromoney/tex/euromoney-500eurosimple.pdfbin0 -> 22885 bytes
-rw-r--r--macros/latex/contrib/euromoney/tex/euromoney-500eurosimplebw.pdfbin0 -> 23168 bytes
-rw-r--r--macros/latex/contrib/euromoney/tex/euromoney-50cent.pdfbin0 -> 27558 bytes
-rw-r--r--macros/latex/contrib/euromoney/tex/euromoney-50centsimple.pdfbin0 -> 11748 bytes
-rw-r--r--macros/latex/contrib/euromoney/tex/euromoney-50centsimplebw.pdfbin0 -> 11303 bytes
-rw-r--r--macros/latex/contrib/euromoney/tex/euromoney-50euro.pdfbin0 -> 235259 bytes
-rw-r--r--macros/latex/contrib/euromoney/tex/euromoney-50eurosimple.pdfbin0 -> 17891 bytes
-rw-r--r--macros/latex/contrib/euromoney/tex/euromoney-50eurosimplebw.pdfbin0 -> 18128 bytes
-rw-r--r--macros/latex/contrib/euromoney/tex/euromoney-5cent.pdfbin0 -> 45981 bytes
-rw-r--r--macros/latex/contrib/euromoney/tex/euromoney-5centsimple.pdfbin0 -> 2200 bytes
-rw-r--r--macros/latex/contrib/euromoney/tex/euromoney-5centsimplebw.pdfbin0 -> 2181 bytes
-rw-r--r--macros/latex/contrib/euromoney/tex/euromoney-5euro.pdfbin0 -> 424391 bytes
-rw-r--r--macros/latex/contrib/euromoney/tex/euromoney-5eurosimple.pdfbin0 -> 60083 bytes
-rw-r--r--macros/latex/contrib/euromoney/tex/euromoney-5eurosimplebw.pdfbin0 -> 60042 bytes
-rw-r--r--macros/latex/contrib/euromoney/tex/euromoney.sty549
-rw-r--r--macros/latex/contrib/ezedits/README.md47
-rw-r--r--macros/latex/contrib/ezedits/ezedits.sty221
-rw-r--r--macros/latex/contrib/ezedits/ezedits_docs.pdfbin0 -> 143133 bytes
-rw-r--r--macros/latex/contrib/ezedits/ezedits_docs.tex171
-rw-r--r--macros/latex/contrib/fmtcount/CHANGES8
-rw-r--r--macros/latex/contrib/fmtcount/README9
-rw-r--r--macros/latex/contrib/fmtcount/fmtcount.dtx746
-rw-r--r--macros/latex/contrib/fmtcount/fmtcount.ins10
-rw-r--r--macros/latex/contrib/fmtcount/fmtcount.pdfbin563008 -> 629876 bytes
-rw-r--r--macros/latex/contrib/fmtcount/fmtcount.perl227
-rw-r--r--macros/latex/contrib/fontscale/CHANGELOG.md21
-rw-r--r--macros/latex/contrib/fontscale/beery.cls2
-rw-r--r--macros/latex/contrib/fontscale/fontscale-table-classic.tex2
-rw-r--r--macros/latex/contrib/fontscale/fontscale-table-font-steps.tex2
-rw-r--r--macros/latex/contrib/fontscale/fontscale-table-musical.tex2
-rw-r--r--macros/latex/contrib/fontscale/fontscale.pdfbin104879 -> 106313 bytes
-rw-r--r--macros/latex/contrib/fontscale/fontscale.sty554
-rw-r--r--macros/latex/contrib/fontscale/fontscale.tex47
-rw-r--r--macros/latex/contrib/framedsyntax/FramedSyntax.dtx930
-rw-r--r--macros/latex/contrib/framedsyntax/FramedSyntax.pdfbin0 -> 460751 bytes
-rw-r--r--macros/latex/contrib/framedsyntax/README.txt12
-rw-r--r--macros/latex/contrib/fvextra/CHANGELOG.md46
-rw-r--r--macros/latex/contrib/fvextra/fvextra.dtx715
-rw-r--r--macros/latex/contrib/fvextra/fvextra.pdfbin895911 -> 916979 bytes
-rw-r--r--macros/latex/contrib/heria/heria-proposal.pdfbin311063 -> 311062 bytes
-rw-r--r--macros/latex/contrib/heria/heria.dtx14
-rw-r--r--macros/latex/contrib/heria/heria.pdfbin305316 -> 305232 bytes
-rw-r--r--macros/latex/contrib/homework/README.md30
-rw-r--r--macros/latex/contrib/homework/homework.cls35
-rw-r--r--macros/latex/contrib/iaria-lite/README20
-rw-r--r--macros/latex/contrib/iaria-lite/iaria-lite.dtx66
-rw-r--r--macros/latex/contrib/iaria-lite/iaria-lite.ins2
-rw-r--r--macros/latex/contrib/iaria-lite/iaria-lite.pdfbin170730 -> 174380 bytes
-rw-r--r--macros/latex/contrib/iaria-lite/template/cpn_all_all.bib226
-rw-r--r--macros/latex/contrib/iaria-lite/template/cpn_supervised_all.bib1
-rw-r--r--macros/latex/contrib/iaria-lite/template/iaria-lite-example-neumann.pdfbin132913 -> 142941 bytes
-rw-r--r--macros/latex/contrib/iaria-lite/template/iaria-lite-example-neumann.tex72
-rw-r--r--macros/latex/contrib/iaria/README18
-rw-r--r--macros/latex/contrib/iaria/iaria.dtx91
-rw-r--r--macros/latex/contrib/iaria/iaria.ins2
-rw-r--r--macros/latex/contrib/iaria/iaria.pdfbin172223 -> 175722 bytes
-rw-r--r--macros/latex/contrib/iaria/template/cpn_all_all.bib226
-rw-r--r--macros/latex/contrib/iaria/template/cpn_supervised_all.bib1
-rw-r--r--macros/latex/contrib/iaria/template/iaria-example-neumann.pdfbin132891 -> 142007 bytes
-rw-r--r--macros/latex/contrib/iaria/template/iaria-example-neumann.tex61
-rw-r--r--macros/latex/contrib/isosafety/README.md2
-rw-r--r--macros/latex/contrib/isosafety/doc/isosafety-docs.pdfbin112768 -> 104036 bytes
-rw-r--r--macros/latex/contrib/isosafety/doc/isosafety-docs.tex86
-rw-r--r--macros/latex/contrib/isosafety/tex/isosafety-pdfs/ISO_7010_E003.pdfbin971 -> 972 bytes
-rw-r--r--macros/latex/contrib/isosafety/tex/isosafety-pdfs/ISO_7010_M005.pdfbin1109 -> 1110 bytes
-rw-r--r--macros/latex/contrib/isosafety/tex/isosafety-pdfs/ISO_7010_W012.pdfbin1064 -> 1064 bytes
-rw-r--r--macros/latex/contrib/isosafety/tex/isosafety.sty12
-rw-r--r--macros/latex/contrib/joinbox/README.md2
-rw-r--r--macros/latex/contrib/joinbox/joinbox.pdfbin411301 -> 411317 bytes
-rw-r--r--macros/latex/contrib/joinbox/joinbox.sty94
-rw-r--r--macros/latex/contrib/joinbox/joinbox.tex2
-rw-r--r--macros/latex/contrib/jsonparse/README.md3
-rw-r--r--macros/latex/contrib/jsonparse/jason/jason.pdfbin3965 -> 3965 bytes
-rw-r--r--macros/latex/contrib/jsonparse/jsonparse-doc.pdfbin430804 -> 434185 bytes
-rw-r--r--macros/latex/contrib/jsonparse/jsonparse-doc.tex29
-rw-r--r--macros/latex/contrib/jsonparse/jsonparse.sty361
-rw-r--r--macros/latex/contrib/jupynotex/README.md61
-rwxr-xr-xmacros/latex/contrib/jupynotex/example/build5
-rw-r--r--macros/latex/contrib/jupynotex/example/example.tex27
-rw-r--r--macros/latex/contrib/jupynotex/example/notebook.ipynb593
-rw-r--r--macros/latex/contrib/jupynotex/jupynotex.py331
-rw-r--r--macros/latex/contrib/jupynotex/jupynotex.sty18
-rwxr-xr-xmacros/latex/contrib/jupynotex/tests/run3
-rw-r--r--macros/latex/contrib/jupynotex/tests/test_cellparser.py79
-rw-r--r--macros/latex/contrib/jupynotex/tests/test_main.py111
-rw-r--r--macros/latex/contrib/jupynotex/tests/test_notebook.py237
-rw-r--r--macros/latex/contrib/jwjournal/README.md26
-rw-r--r--macros/latex/contrib/jwjournal/jwjournal-demo-cn.pdfbin125619 -> 129845 bytes
-rw-r--r--macros/latex/contrib/jwjournal/jwjournal-demo-cn.tex4
-rw-r--r--macros/latex/contrib/jwjournal/jwjournal-demo-de.pdfbin0 -> 201988 bytes
-rw-r--r--macros/latex/contrib/jwjournal/jwjournal-demo-de.tex118
-rw-r--r--macros/latex/contrib/jwjournal/jwjournal.cls26
-rw-r--r--macros/latex/contrib/keytheorems/CHANGELOG.md38
-rw-r--r--macros/latex/contrib/keytheorems/README.md612
-rw-r--r--macros/latex/contrib/keytheorems/doc/keytheorems-doc.pdfbin0 -> 144556 bytes
-rw-r--r--macros/latex/contrib/keytheorems/doc/keytheorems-doc.tex1122
-rw-r--r--macros/latex/contrib/keytheorems/tex/class-support/keythms-amsart-support.tex49
-rw-r--r--macros/latex/contrib/keytheorems/tex/class-support/keythms-amsbook-support.tex23
-rw-r--r--macros/latex/contrib/keytheorems/tex/class-support/keythms-amsproc-support.tex23
-rw-r--r--macros/latex/contrib/keytheorems/tex/class-support/keythms-memoir-support.tex49
-rw-r--r--macros/latex/contrib/keytheorems/tex/keytheorems.sty2395
-rw-r--r--macros/latex/contrib/l3packages/CHANGELOG.md10
-rw-r--r--macros/latex/contrib/l3packages/README.md2
-rw-r--r--macros/latex/contrib/l3packages/l3keys2e.dtx4
-rw-r--r--macros/latex/contrib/l3packages/l3keys2e.pdfbin412900 -> 412980 bytes
-rw-r--r--macros/latex/contrib/l3packages/xfp.dtx4
-rw-r--r--macros/latex/contrib/l3packages/xfp.pdfbin332573 -> 332674 bytes
-rw-r--r--macros/latex/contrib/l3packages/xparse.dtx25
-rw-r--r--macros/latex/contrib/l3packages/xparse.pdfbin551837 -> 551942 bytes
-rw-r--r--macros/latex/contrib/l3packages/xtemplate.dtx5
-rw-r--r--macros/latex/contrib/l3packages/xtemplate.pdfbin449003 -> 449112 bytes
-rw-r--r--macros/latex/contrib/listings/listings-devel.pdfbin1454841 -> 1457040 bytes
-rw-r--r--macros/latex/contrib/listings/listings.dtx149
-rw-r--r--macros/latex/contrib/listings/listings.pdfbin1028632 -> 1028426 bytes
-rw-r--r--macros/latex/contrib/listings/lstdrvrs.dtx6
-rw-r--r--macros/latex/contrib/listings/lstdrvrs.pdfbin790575 -> 791320 bytes
-rw-r--r--macros/latex/contrib/litetable/README.md14
-rw-r--r--macros/latex/contrib/litetable/doc/favicon.pngbin17761 -> 0 bytes
-rw-r--r--macros/latex/contrib/litetable/doc/litetable-cn.pdfbin304570 -> 174081 bytes
-rw-r--r--macros/latex/contrib/litetable/doc/litetable-cn.tex427
-rw-r--r--macros/latex/contrib/litetable/doc/litetable-demo.pdfbin106969 -> 55242 bytes
-rw-r--r--macros/latex/contrib/litetable/doc/litetable-demo.tex211
-rw-r--r--macros/latex/contrib/litetable/doc/litetable-en.pdfbin178911 -> 118263 bytes
-rw-r--r--macros/latex/contrib/litetable/doc/litetable-en.tex381
-rw-r--r--macros/latex/contrib/litetable/doc/litetable-hk.pdfbin0 -> 189869 bytes
-rw-r--r--macros/latex/contrib/litetable/doc/litetable-hk.tex143
-rw-r--r--macros/latex/contrib/litetable/tex/litetable.cls710
-rw-r--r--macros/latex/contrib/media9/ChangeLog22
-rw-r--r--macros/latex/contrib/media9/doc/media9.pdfbin3660318 -> 3685924 bytes
-rw-r--r--macros/latex/contrib/media9/media9.sty13
-rw-r--r--macros/latex/contrib/media9/pdfbase.sty144
-rw-r--r--macros/latex/contrib/minted/CHANGELOG_LATEXMINTED_PYTHON_PACKAGE.md6
-rw-r--r--macros/latex/contrib/minted/CHANGELOG_MINTED_LATEX_PACKAGE.md918
-rw-r--r--macros/latex/contrib/minted/DEPENDS.txt10
-rw-r--r--macros/latex/contrib/minted/Makefile38
-rw-r--r--macros/latex/contrib/minted/README4
-rw-r--r--macros/latex/contrib/minted/latex2pydata-0.4.0-py3-none-any.whlbin0 -> 12888 bytes
-rw-r--r--macros/latex/contrib/minted/latexminted-0.1.0-py3-none-any.whlbin0 -> 31863 bytes
-rw-r--r--macros/latex/contrib/minted/latexminted.py359
-rw-r--r--macros/latex/contrib/minted/latexrestricted-0.4.0-py3-none-any.whlbin0 -> 26755 bytes
-rw-r--r--macros/latex/contrib/minted/minted.dtx5241
-rw-r--r--macros/latex/contrib/minted/minted.ins19
-rw-r--r--macros/latex/contrib/minted/minted.pdfbin872465 -> 500920 bytes
-rw-r--r--macros/latex/contrib/minted/minted1.sty261
-rw-r--r--macros/latex/contrib/minted/minted2.sty1285
-rw-r--r--macros/latex/contrib/minted/pygments-2.18.0-py3-none-any.whlbin0 -> 1205513 bytes
-rw-r--r--macros/latex/contrib/mitthesis/MIT-Thesis.pdfbin484200 -> 552860 bytes
-rw-r--r--macros/latex/contrib/mitthesis/MIT-thesis-template/MIT-Thesis.tex31
-rw-r--r--macros/latex/contrib/mitthesis/MIT-thesis-template/appendixa.tex4
-rw-r--r--macros/latex/contrib/mitthesis/MIT-thesis-template/appendixb.tex108
-rw-r--r--macros/latex/contrib/mitthesis/MIT-thesis-template/committee_members.tex69
-rw-r--r--macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-defaultfonts.tex6
-rw-r--r--macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-fira-newtxsf.tex6
-rw-r--r--macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-heros-stix2.tex6
-rw-r--r--macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-libertine.tex6
-rw-r--r--macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-lucida.tex4
-rw-r--r--macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-newtx-sans-text.tex5
-rw-r--r--macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-newtx.tex6
-rw-r--r--macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-stix2.tex6
-rw-r--r--macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-termes-stix2.tex6
-rw-r--r--macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-termes.tex6
-rw-r--r--macros/latex/contrib/mitthesis/MIT-thesis-template/mitthesis-sample.bib12
-rw-r--r--macros/latex/contrib/mitthesis/README.md23
-rw-r--r--macros/latex/contrib/mitthesis/examples/font_samples/Defaultfonts.pdfbin480892 -> 550995 bytes
-rw-r--r--macros/latex/contrib/mitthesis/examples/font_samples/Fira_Newtxsf.pdfbin349865 -> 374324 bytes
-rw-r--r--macros/latex/contrib/mitthesis/examples/font_samples/Heros-Stix2.pdfbin152948 -> 169587 bytes
-rw-r--r--macros/latex/contrib/mitthesis/examples/font_samples/Libertine.pdfbin461124 -> 484379 bytes
-rw-r--r--macros/latex/contrib/mitthesis/examples/font_samples/Lucida.pdfbin173088 -> 191692 bytes
-rw-r--r--macros/latex/contrib/mitthesis/examples/font_samples/Newtx-sans-text.pdfbin278894 -> 294664 bytes
-rw-r--r--macros/latex/contrib/mitthesis/examples/font_samples/Newtx.pdfbin320084 -> 339125 bytes
-rw-r--r--macros/latex/contrib/mitthesis/examples/font_samples/Stix2.pdfbin162721 -> 179016 bytes
-rw-r--r--macros/latex/contrib/mitthesis/examples/font_samples/Termes-stix2.pdfbin164333 -> 181040 bytes
-rw-r--r--macros/latex/contrib/mitthesis/examples/font_samples/Termes.pdfbin160667 -> 177446 bytes
-rw-r--r--macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/Defaultfonts.tex188
-rw-r--r--macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/Fira_Newtxsf.tex191
-rw-r--r--macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/Heros-Stix2.tex192
-rw-r--r--macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/Libertine.tex188
-rw-r--r--macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/Lucida.tex188
-rw-r--r--macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/Newtx-sans-text.tex191
-rw-r--r--macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/Newtx.tex187
-rw-r--r--macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/README_font_sample_sources.txt5
-rw-r--r--macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/Stix2.tex188
-rw-r--r--macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/Termes-stix2.tex187
-rw-r--r--macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/Termes.tex187
-rwxr-xr-xmacros/latex/contrib/mitthesis/examples/font_samples/latex_sources/compile-font-samples.sh89
-rw-r--r--macros/latex/contrib/mitthesis/mitthesis-doc/mitthesis-doc.pdfbin108977 -> 109707 bytes
-rw-r--r--macros/latex/contrib/mitthesis/mitthesis-doc/mitthesis-doc.tex54
-rw-r--r--macros/latex/contrib/mitthesis/mitthesis.cls69
-rw-r--r--macros/latex/contrib/mlacls/mla-example.pdfbin2697255 -> 2683255 bytes
-rw-r--r--macros/latex/contrib/mlacls/mla.dtx76
-rw-r--r--macros/latex/contrib/mlacls/mla.pdfbin393101 -> 351909 bytes
-rw-r--r--macros/latex/contrib/naive-ebnf/README.md17
-rw-r--r--macros/latex/contrib/naive-ebnf/naive-ebnf.dtx21
-rw-r--r--macros/latex/contrib/naive-ebnf/naive-ebnf.pdfbin727116 -> 772430 bytes
-rw-r--r--macros/latex/contrib/nfssext-cfr/README26
-rw-r--r--macros/latex/contrib/nfssext-cfr/README.md114
-rw-r--r--macros/latex/contrib/nfssext-cfr/manifest.txt71
-rw-r--r--macros/latex/contrib/nfssext-cfr/nfssext-cfr.dtx3334
-rw-r--r--macros/latex/contrib/nfssext-cfr/nfssext-cfr.ins111
-rw-r--r--macros/latex/contrib/nfssext-cfr/nfssext-cfr.pdfbin180398 -> 919965 bytes
-rw-r--r--macros/latex/contrib/nfssext-cfr/nfssext-cfr.sty641
-rw-r--r--macros/latex/contrib/nfssext-cfr/nfssext-cfr.tex196
-rw-r--r--macros/latex/contrib/ocgx2/ChangeLog14
-rw-r--r--macros/latex/contrib/ocgx2/ocgbase.sty275
-rw-r--r--macros/latex/contrib/ocgx2/ocgx2.sty255
-rw-r--r--macros/latex/contrib/panneauxroute/doc/PanneauxRoute-doc.pdfbin670553 -> 736292 bytes
-rw-r--r--macros/latex/contrib/panneauxroute/doc/PanneauxRoute-doc.tex75
-rw-r--r--macros/latex/contrib/panneauxroute/tex/Indication/PanneauRouteC24a.pdfbin0 -> 1345 bytes
-rw-r--r--macros/latex/contrib/panneauxroute/tex/Interdiction/PanneauRouteB14_80.pdfbin0 -> 2775 bytes
-rw-r--r--macros/latex/contrib/panneauxroute/tex/Interdiction/PanneauRouteB1j.pdfbin0 -> 1506 bytes
-rw-r--r--macros/latex/contrib/panneauxroute/tex/Interdiction/PanneauRouteB30_30.pdfbin0 -> 4929 bytes
-rw-r--r--macros/latex/contrib/panneauxroute/tex/Interdiction/PanneauRouteB6b1.pdfbin0 -> 1761 bytes
-rw-r--r--macros/latex/contrib/panneauxroute/tex/Interdiction/PanneauRouteB6b2.pdfbin0 -> 3914 bytes
-rw-r--r--macros/latex/contrib/panneauxroute/tex/Interdiction/PanneauRouteB6b3.pdfbin0 -> 1919 bytes
-rw-r--r--macros/latex/contrib/panneauxroute/tex/Interdiction/PanneauRouteB6b4.pdfbin0 -> 1957 bytes
-rw-r--r--macros/latex/contrib/panneauxroute/tex/Interdiction/PanneauRouteB6b5.pdfbin0 -> 4093 bytes
-rw-r--r--macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB49VL.pdfbin0 -> 4986 bytes
-rw-r--r--macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB50a.pdfbin0 -> 1642 bytes
-rw-r--r--macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB50b.pdfbin0 -> 3758 bytes
-rw-r--r--macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB50c.pdfbin0 -> 1797 bytes
-rw-r--r--macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB50d.pdfbin0 -> 2031 bytes
-rw-r--r--macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB50e.pdfbin0 -> 3932 bytes
-rw-r--r--macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB51_30.pdfbin0 -> 4867 bytes
-rw-r--r--macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB52.pdfbin0 -> 5184 bytes
-rw-r--r--macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB53.pdfbin0 -> 5314 bytes
-rw-r--r--macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB54.pdfbin0 -> 3128 bytes
-rw-r--r--macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB55.pdfbin0 -> 3255 bytes
-rw-r--r--macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB56.pdfbin0 -> 2954 bytes
-rw-r--r--macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB57.pdfbin0 -> 2892 bytes
-rw-r--r--macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB58.pdfbin0 -> 19271 bytes
-rw-r--r--macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB59.pdfbin0 -> 11639 bytes
-rw-r--r--macros/latex/contrib/panneauxroute/tex/PanneauxRoute.sty18
-rw-r--r--macros/latex/contrib/panneauxroute/tex/Temporaire/PanneauRouteAK14.pdfbin0 -> 1651 bytes
-rw-r--r--macros/latex/contrib/panneauxroute/tex/Temporaire/PanneauRouteAK17.pdfbin0 -> 1724 bytes
-rw-r--r--macros/latex/contrib/panneauxroute/tex/Temporaire/PanneauRouteAK2.pdfbin0 -> 1695 bytes
-rw-r--r--macros/latex/contrib/panneauxroute/tex/Temporaire/PanneauRouteAK22.pdfbin0 -> 2921 bytes
-rw-r--r--macros/latex/contrib/panneauxroute/tex/Temporaire/PanneauRouteAK3.pdfbin0 -> 1514 bytes
-rw-r--r--macros/latex/contrib/panneauxroute/tex/Temporaire/PanneauRouteAK30.pdfbin0 -> 3705 bytes
-rw-r--r--macros/latex/contrib/panneauxroute/tex/Temporaire/PanneauRouteAK31.pdfbin0 -> 1903 bytes
-rw-r--r--macros/latex/contrib/panneauxroute/tex/Temporaire/PanneauRouteAK32.pdfbin0 -> 1719 bytes
-rw-r--r--macros/latex/contrib/panneauxroute/tex/Temporaire/PanneauRouteAK4.pdfbin0 -> 2265 bytes
-rw-r--r--macros/latex/contrib/panneauxroute/tex/Temporaire/PanneauRouteAK5.pdfbin0 -> 2191 bytes
-rw-r--r--macros/latex/contrib/pas-tableur/README37
-rw-r--r--macros/latex/contrib/pas-tableur/README.txt40
-rw-r--r--macros/latex/contrib/pas-tableur/doc/pas-tableur.pdfbin410165 -> 392763 bytes
-rw-r--r--macros/latex/contrib/pas-tableur/doc/pas-tableur.tex35
-rw-r--r--macros/latex/contrib/pas-tableur/latex/pas-tableur.sty91
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/CHANGELOG.md31
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/README.md2
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/color-ltx.sty4
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/colorspace-patches-tmp-ltx.sty4
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.dtx42
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.pdfbin988844 -> 990245 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.dtx14
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.pdfbin711589 -> 711375 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.dtx4
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.pdfbin603025 -> 602781 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.dtx4
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.pdfbin516309 -> 515753 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.dtx2
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.pdfbin558991 -> 558768 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.dtx4
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.pdfbin542144 -> 520855 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.dtx10
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.pdfbin544112 -> 523018 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.dtx8
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.pdfbin538574 -> 517529 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.dtx4
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.pdfbin594625 -> 573028 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.dtx2
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.pdfbin516817 -> 516601 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdffield.dtx6
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdffield.pdfbin753951 -> 732912 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdffile.dtx4
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdffile.pdfbin568542 -> 568185 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.dtx4
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.pdfbin686108 -> 685763 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.dtx182
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.pdfbin850174 -> 834408 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdfoutline.pdfbin0 -> 596723 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdftools.dtx4
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdftools.pdfbin530920 -> 530692 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.dtx4
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.pdfbin428630 -> 427806 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/ltdocinit.dtx18
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/ltdocinit.pdfbin588321 -> 588349 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.dtx4
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.pdfbin435158 -> 434607 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.dtx6
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.pdfbin465204 -> 464470 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/xcolor-patches-tmp-ltx.sty2
-rw-r--r--macros/latex/contrib/pdfpages/pdfpages.dtx21
-rw-r--r--macros/latex/contrib/pdfpages/pdfpages.pdfbin302686 -> 302226 bytes
-rw-r--r--macros/latex/contrib/profcollege/doc/profcollege-doc.pdfbin10823654 -> 10841130 bytes
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCAllumettes.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCArbreCalcul.tex3
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCArbreChiffre.tex3
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCAssemblagesSolides.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCAutomatismes.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCAutonomie.tex8
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCBarreNiveaux.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCBarresCalculs.tex3
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCBillard.tex17
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCBonSortie.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCBonbon.tex6
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCCAN.tex7
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCCalculatrice.tex3
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCCalculsCroises.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCCalculsDetailles.tex147
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCCalculsFractions.tex7
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCCalisson.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCCartesJeux.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCCartesMentales.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCCartographie.tex6
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCCheque.tex125
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCCible.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCCibleQOp.tex7
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCColorilude.tex8
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCCompteBon.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCConversion.tex7
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCCritere.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCCryptarithme.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCDecDeci.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCDecompFracDeci.tex15
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCDecomposerNombrePremier.tex147
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCDefiCalc.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCDefiTables.tex5
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCDessinAlgo.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCDessinGradue.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCDessinerRatio.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCDiagrammeRadar.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCDistributivite.tex3
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCDobble.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCDomino.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCDontCountDots.tex6
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCEcrireunQCM.tex54
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCEcritureLettres.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCEcritureUnites.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCEngrenagesBase.tex6
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCEnigmeAire.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCEnquete.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCEratosthene.tex7
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCFactorisation.tex7
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCFicheMemo.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCFonctionAffine.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCFractionAireCarre.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCFractionNombre.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCFrise.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCFubuki.tex7
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCFutoshiki.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCGaram.tex12
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCGeometrie.tex10
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCGrades.tex8
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCGrimuku.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCHiddenMessage.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCHorloge.tex31
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCJeton.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCJeuRangement.tex7
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCKakurasu.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCKakuro.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCKenKen.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCLabyrintheJeu.tex8
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCLabyrintheNombre.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCLego.tex10
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCMentalo.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCMidpoint.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCModeleBarre.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCMosaique.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCMotsCodes.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCMotsCroises.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCMotsEmpiles.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCMulArt.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCMulJal.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCMulJap.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCMulPiecesPuzzle.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCNombreAstral.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCNonogramme.tex7
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCNotionFonction.tex36
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCNumberHive.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCNumerationsAnciennes.tex7
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCOperationsTrou.tex8
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCPapiers.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCPatronPaves.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCPattern.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCPavage.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCPixelArt.tex208
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCPourcentage.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCProbaFrequence.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCProbabilites.tex14
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCProgrammeCalcul.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCPropor.tex50
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCProprietesDroites.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCPuissanceQuatre.tex82
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCPuzzleSommePyramide.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCPyraVoca.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCPyramideCalculs.tex307
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCPythagore.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCQuestionsFlash.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCQuestionsRelier.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCQuiSuisJe.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCRLE.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCRangementNombres.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCRapido.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCRappelsFormules.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCRecyclage.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCReperage.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCRepresentationGraphique.tex19
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCRepresenterEntier.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCRepresenterFraction.tex575
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCRepresenterTableur.tex15
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCReseauxSociaux.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCResoudreEquation.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCRondeInfernale.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCRose.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCScratch.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCSerpent.tex211
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCShikaku.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCSimplifierFraction.tex10
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCSolides.tex12
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCSommeAngles.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCSquaro.tex76
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCStatistiques.tex12
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCTableauDoubleEntree.tex62
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCTableauxUnites.tex11
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCTablesOperations.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCTectonic.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCThales.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCTicketCaisse.tex163
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCTortueBase.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCTrigonometrie.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCTrio.tex7
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCTriominos.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCUrneProba.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCVisualisationMulDeci.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCVueCubes.tex15
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCYohaku.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/ProfCollege.sty41
-rw-r--r--macros/latex/contrib/profcollege/metapost/PfCGeometrie.mp20
-rw-r--r--macros/latex/contrib/profcollege/metapost/PfCScratch.mp7
-rw-r--r--macros/latex/contrib/profcollege/metapost/PfCScratchpdf.mp7
-rw-r--r--macros/latex/contrib/profcollege/metapost/PfCSketch.mp195
-rw-r--r--macros/latex/contrib/proflycee/README.md7
-rw-r--r--macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdfbin1793092 -> 2191096 bytes
-rw-r--r--macros/latex/contrib/proflycee/doc/ProfLycee-exemples-pyluatex.pdfbin80800 -> 80865 bytes
-rw-r--r--macros/latex/contrib/proflycee/tex/ProfLycee.sty33
-rw-r--r--macros/latex/contrib/proflycee/tex/pflcliparts/pfl-bronze-cup.pdfbin0 -> 2781 bytes
-rw-r--r--macros/latex/contrib/proflycee/tex/pflcliparts/pfl-bronze-medal-flat.pdfbin0 -> 1857 bytes
-rw-r--r--macros/latex/contrib/proflycee/tex/pflcliparts/pfl-bronze-medal.pdfbin0 -> 154573 bytes
-rw-r--r--macros/latex/contrib/proflycee/tex/pflcliparts/pfl-checked.pdfbin0 -> 1480 bytes
-rw-r--r--macros/latex/contrib/proflycee/tex/pflcliparts/pfl-crossed.pdfbin0 -> 1484 bytes
-rw-r--r--macros/latex/contrib/proflycee/tex/pflcliparts/pfl-gold-cup.pdfbin0 -> 2764 bytes
-rw-r--r--macros/latex/contrib/proflycee/tex/pflcliparts/pfl-gold-medal-flat.pdfbin0 -> 1713 bytes
-rw-r--r--macros/latex/contrib/proflycee/tex/pflcliparts/pfl-gold-medal.pdfbin0 -> 119155 bytes
-rw-r--r--macros/latex/contrib/proflycee/tex/pflcliparts/pfl-mouse-center.pdfbin0 -> 8987 bytes
-rw-r--r--macros/latex/contrib/proflycee/tex/pflcliparts/pfl-mouse-left.pdfbin0 -> 8987 bytes
-rw-r--r--macros/latex/contrib/proflycee/tex/pflcliparts/pfl-mouse-right.pdfbin0 -> 8988 bytes
-rw-r--r--macros/latex/contrib/proflycee/tex/pflcliparts/pfl-mouse.pdfbin0 -> 8348 bytes
-rw-r--r--macros/latex/contrib/proflycee/tex/pflcliparts/pfl-notok.pdfbin0 -> 3347 bytes
-rw-r--r--macros/latex/contrib/proflycee/tex/pflcliparts/pfl-ok.pdfbin0 -> 3291 bytes
-rw-r--r--macros/latex/contrib/proflycee/tex/pflcliparts/pfl-silver-cup.pdfbin0 -> 2759 bytes
-rw-r--r--macros/latex/contrib/proflycee/tex/pflcliparts/pfl-silver-medal-flat.pdfbin0 -> 1763 bytes
-rw-r--r--macros/latex/contrib/proflycee/tex/pflcliparts/pfl-silver-medal.pdfbin0 -> 98514 bytes
-rw-r--r--macros/latex/contrib/proflycee/tex/proflycee-tools-arithm.tex61
-rw-r--r--macros/latex/contrib/proflycee/tex/proflycee-tools-cliparts.tex126
-rw-r--r--macros/latex/contrib/proflycee/tex/proflycee-tools-ecritures.tex33
-rw-r--r--macros/latex/contrib/proflycee/tex/proflycee-tools-minted.tex1
-rw-r--r--macros/latex/contrib/proflycee/tex/proflycee-tools-piton.tex23
-rw-r--r--macros/latex/contrib/proflycee/tex/proflycee-tools-probas.tex26
-rw-r--r--macros/latex/contrib/proflycee/tex/proflycee-tools-trigo.tex25
-rw-r--r--macros/latex/contrib/profmaquette/doc/ProfMaquette-doc.pdfbin298965 -> 0 bytes
-rw-r--r--macros/latex/contrib/profmaquette/doc/profmaquette-doc.pdfbin0 -> 341735 bytes
-rw-r--r--macros/latex/contrib/profmaquette/latex/ProfMaquette.sty1569
-rw-r--r--macros/latex/contrib/quizztex/doc/quizztex-doc-fr.pdfbin547576 -> 555201 bytes
-rw-r--r--macros/latex/contrib/quizztex/doc/quizztex-doc-fr.tex34
-rw-r--r--macros/latex/contrib/quizztex/tex/quizztex.sty11
-rw-r--r--macros/latex/contrib/randintlist/README.md6
-rw-r--r--macros/latex/contrib/randintlist/doc/randintlist-doc.pdfbin0 -> 84893 bytes
-rw-r--r--macros/latex/contrib/randintlist/doc/randintlist-doc.tex351
-rw-r--r--macros/latex/contrib/randintlist/tex/randintlist.sty246
-rw-r--r--macros/latex/contrib/regulatory/README.md1
-rw-r--r--macros/latex/contrib/regulatory/doc/example1-en.pdfbin25756 -> 27096 bytes
-rw-r--r--macros/latex/contrib/regulatory/doc/example1-en.tex2
-rw-r--r--macros/latex/contrib/regulatory/doc/example1-nl.pdfbin25600 -> 27052 bytes
-rw-r--r--macros/latex/contrib/regulatory/doc/example1-nl.tex2
-rw-r--r--macros/latex/contrib/regulatory/doc/example2-en.pdfbin52555 -> 49921 bytes
-rw-r--r--macros/latex/contrib/regulatory/doc/example2-en.tex2
-rw-r--r--macros/latex/contrib/regulatory/doc/example2-nl.pdfbin52599 -> 50114 bytes
-rw-r--r--macros/latex/contrib/regulatory/doc/example2-nl.tex2
-rw-r--r--macros/latex/contrib/regulatory/doc/regulatory-en.pdfbin227678 -> 229664 bytes
-rw-r--r--macros/latex/contrib/regulatory/doc/regulatory-en.tex2
-rw-r--r--macros/latex/contrib/regulatory/doc/regulatory-nl.pdfbin228133 -> 229738 bytes
-rw-r--r--macros/latex/contrib/regulatory/doc/regulatory-nl.tex2
-rw-r--r--macros/latex/contrib/regulatory/doc/regulatory-preamble.tex2
-rw-r--r--macros/latex/contrib/regulatory/doc/regulatory.tex12
-rw-r--r--macros/latex/contrib/regulatory/tex/fc-dutch.def327
-rw-r--r--macros/latex/contrib/regulatory/tex/regulatory.sty4
-rw-r--r--macros/latex/contrib/reptheorem/reptheorem.dtx130
-rw-r--r--macros/latex/contrib/reptheorem/reptheorem.ins6
-rw-r--r--macros/latex/contrib/reptheorem/reptheorem.pdfbin274602 -> 286557 bytes
-rw-r--r--macros/latex/contrib/rub-kunstgeschichte/rub-kunstgeschichte-example.pdfbin36684 -> 143716 bytes
-rw-r--r--macros/latex/contrib/rub-kunstgeschichte/rub-kunstgeschichte.dtx401
-rw-r--r--macros/latex/contrib/rub-kunstgeschichte/rub-kunstgeschichte.pdfbin232043 -> 318756 bytes
-rw-r--r--macros/latex/contrib/scrhack/LICENSE.md19
-rw-r--r--macros/latex/contrib/scrhack/README.md207
-rw-r--r--macros/latex/contrib/scrhack/scrhack-2023-07-07.dtx2057
-rw-r--r--macros/latex/contrib/scrhack/scrhack-2023-07-07.pdfbin0 -> 301798 bytes
-rw-r--r--macros/latex/contrib/scrhack/scrhack.dtx991
-rw-r--r--macros/latex/contrib/scrhack/scrhack.pdfbin0 -> 301231 bytes
-rw-r--r--macros/latex/contrib/se2thesis/CHANGELOG.md18
-rw-r--r--macros/latex/contrib/se2thesis/se2colors.dtx2
-rw-r--r--macros/latex/contrib/se2thesis/se2fonts.dtx8
-rw-r--r--macros/latex/contrib/se2thesis/se2packages.dtx2
-rw-r--r--macros/latex/contrib/se2thesis/se2thesis-master-thesis-example.pdfbin232002 -> 231998 bytes
-rw-r--r--macros/latex/contrib/se2thesis/se2thesis.dtx11
-rw-r--r--macros/latex/contrib/se2thesis/se2thesis.pdfbin366813 -> 366777 bytes
-rw-r--r--macros/latex/contrib/sidenotes/caesar_book.cls44
-rw-r--r--macros/latex/contrib/sidenotes/caesar_example.pdfbin86126 -> 91942 bytes
-rw-r--r--macros/latex/contrib/sidenotes/caesar_example.tex21
-rw-r--r--macros/latex/contrib/sidenotes/sidenotes.dtx246
-rw-r--r--macros/latex/contrib/sidenotes/sidenotes.ins4
-rw-r--r--macros/latex/contrib/sidenotes/sidenotes.pdfbin217903 -> 233107 bytes
-rw-r--r--macros/latex/contrib/sim-os-menus/doc/sim-os-menus-doc-fr.pdfbin408693 -> 430723 bytes
-rw-r--r--macros/latex/contrib/sim-os-menus/doc/sim-os-menus-doc-fr.tex136
-rw-r--r--macros/latex/contrib/sim-os-menus/doc/sim-os-menus-doc.pdfbin399623 -> 422751 bytes
-rw-r--r--macros/latex/contrib/sim-os-menus/doc/sim-os-menus-doc.tex228
-rw-r--r--macros/latex/contrib/sim-os-menus/tex/sim-os-menus.sty180
-rw-r--r--macros/latex/contrib/siunitx/CHANGELOG.md10
-rw-r--r--macros/latex/contrib/siunitx/siunitx-code.pdfbin645515 -> 645497 bytes
-rw-r--r--macros/latex/contrib/siunitx/siunitx-compound.dtx1
-rw-r--r--macros/latex/contrib/siunitx/siunitx-number.dtx1
-rw-r--r--macros/latex/contrib/siunitx/siunitx-unit.dtx5
-rw-r--r--macros/latex/contrib/siunitx/siunitx.dtx2
-rw-r--r--macros/latex/contrib/siunitx/siunitx.pdfbin703916 -> 703918 bytes
-rw-r--r--macros/latex/contrib/spelatex/Example/example-spel/1.0.0.0.0.m3u8
-rw-r--r--macros/latex/contrib/spelatex/Example/example-spel/2.0.0.0.0-2.oggbin58385 -> 65853 bytes
-rw-r--r--macros/latex/contrib/spelatex/Example/example-spel/2.0.0.0.0.m3u8
-rw-r--r--macros/latex/contrib/spelatex/Example/example-spel/3.0.0.0.0-1.oggbin92122 -> 42525 bytes
-rw-r--r--macros/latex/contrib/spelatex/Example/example-spel/3.0.0.0.0-2.oggbin45754 -> 0 bytes
-rw-r--r--macros/latex/contrib/spelatex/Example/example-spel/3.0.0.0.0.m3u5
-rw-r--r--macros/latex/contrib/spelatex/Example/example-spel/3.0.0.0.0.oggbin16077 -> 11709 bytes
-rw-r--r--macros/latex/contrib/spelatex/Example/example-spel/4.0.0.0.0-1.oggbin38925 -> 109773 bytes
-rw-r--r--macros/latex/contrib/spelatex/Example/example-spel/4.0.0.0.0-2.oggbin53387 -> 51597 bytes
-rw-r--r--macros/latex/contrib/spelatex/Example/example-spel/4.0.0.0.0.m3u6
-rw-r--r--macros/latex/contrib/spelatex/Example/example-spel/4.0.0.0.0.oggbin13645 -> 18333 bytes
-rw-r--r--macros/latex/contrib/spelatex/Example/example-spel/5.0.0.0.0-1.oggbin0 -> 38637 bytes
-rw-r--r--macros/latex/contrib/spelatex/Example/example-spel/5.0.0.0.0-2.oggbin0 -> 59373 bytes
-rw-r--r--macros/latex/contrib/spelatex/Example/example-spel/5.0.0.0.0.m3u9
-rw-r--r--macros/latex/contrib/spelatex/Example/example-spel/5.0.0.0.0.oggbin15843 -> 12861 bytes
-rw-r--r--macros/latex/contrib/spelatex/Example/example-spel/5.1.0.0.0-1.oggbin33768 -> 0 bytes
-rw-r--r--macros/latex/contrib/spelatex/Example/example-spel/5.1.0.0.0.m3u4
-rw-r--r--macros/latex/contrib/spelatex/Example/example-spel/5.1.0.0.0.oggbin18610 -> 0 bytes
-rw-r--r--macros/latex/contrib/spelatex/Example/example-spel/5.2.0.0.0-1.oggbin41577 -> 0 bytes
-rw-r--r--macros/latex/contrib/spelatex/Example/example-spel/5.2.0.0.0-star-1.oggbin8290 -> 0 bytes
-rw-r--r--macros/latex/contrib/spelatex/Example/example-spel/5.2.0.0.0.m3u5
-rw-r--r--macros/latex/contrib/spelatex/Example/example-spel/5.2.0.0.0.oggbin19424 -> 0 bytes
-rw-r--r--macros/latex/contrib/spelatex/Example/example-spel/6.0.0.0.0.m3u8
-rw-r--r--macros/latex/contrib/spelatex/Example/example-spel/6.0.0.0.0.oggbin0 -> 15165 bytes
-rw-r--r--macros/latex/contrib/spelatex/Example/example-spel/6.1.0.0.0-1.oggbin0 -> 37197 bytes
-rw-r--r--macros/latex/contrib/spelatex/Example/example-spel/6.1.0.0.0.m3u4
-rw-r--r--macros/latex/contrib/spelatex/Example/example-spel/6.1.0.0.0.oggbin0 -> 18189 bytes
-rw-r--r--macros/latex/contrib/spelatex/Example/example-spel/6.2.0.0.0-1.oggbin0 -> 48141 bytes
-rw-r--r--macros/latex/contrib/spelatex/Example/example-spel/6.2.0.0.0-star-1.oggbin0 -> 7245 bytes
-rw-r--r--macros/latex/contrib/spelatex/Example/example-spel/6.2.0.0.0.m3u5
-rw-r--r--macros/latex/contrib/spelatex/Example/example-spel/6.2.0.0.0.oggbin0 -> 19629 bytes
-rw-r--r--macros/latex/contrib/spelatex/Example/example-spel/date.oggbin13533 -> 14589 bytes
-rw-r--r--macros/latex/contrib/spelatex/Example/example.pdfbin84377 -> 92810 bytes
-rw-r--r--macros/latex/contrib/spelatex/Example/example.tex37
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/0.0.0.0.0-1.oggbin0 -> 49149 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/0.0.0.0.0-star-1.oggbin0 -> 6381 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/1.0.0.0.0.m3u57
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/1.1.0.0.0-1.oggbin110781 -> 132381 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/1.1.0.0.0-3.oggbin133965 -> 131229 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/1.1.0.0.0.m3u8
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/1.2.0.0.0.m3u22
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/1.2.1.0.0.m3u8
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/1.2.2.0.0-2.oggbin55773 -> 58797 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/1.2.2.0.0.m3u12
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-10.oggbin156141 -> 120573 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-11.oggbin123021 -> 115389 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-12.oggbin103869 -> 0 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-2.oggbin201069 -> 257949 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-6.oggbin75645 -> 75213 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-7.oggbin181773 -> 129213 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-8.oggbin127485 -> 88173 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-9.oggbin88173 -> 156141 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0.m3u25
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.0.0.0.0.m3u104
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.1.0.0.0-6.oggbin86733 -> 87597 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.1.0.0.0.m3u16
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.2.0.0.0.m3u65
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-1.oggbin39501 -> 62109 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-10.oggbin0 -> 121581 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-11.oggbin0 -> 167085 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-2.oggbin20925 -> 163053 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-3.oggbin21933 -> 114381 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-4.oggbin28269 -> 106893 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-5.oggbin0 -> 121725 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-6.oggbin0 -> 315549 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-7.oggbin0 -> 85437 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-8.ogg (renamed from macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0-9.ogg)bin30717 -> 30717 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-9.ogg (renamed from macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0-10.ogg)bin61965 -> 61965 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0.m3u18
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0.oggbin22720 -> 23517 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0-1.oggbin62109 -> 153261 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0-11.oggbin52461 -> 0 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0-12.oggbin166509 -> 0 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0-2.oggbin61764 -> 186525 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0-3.oggbin130653 -> 0 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0-4.oggbin112797 -> 0 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0-5.oggbin104013 -> 0 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0-6.oggbin118845 -> 0 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0-7.oggbin440685 -> 0 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0-8.oggbin97101 -> 0 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0.m3u17
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0.oggbin19907 -> 22797 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0-1.oggbin153261 -> 251757 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0-2.oggbin186237 -> 34173 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0-3.oggbin0 -> 29565 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0-4.oggbin0 -> 19341 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0-5.oggbin0 -> 188397 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0-6.oggbin0 -> 54909 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0.m3u10
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0.oggbin22940 -> 23517 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.2.4.0.0-1.oggbin251757 -> 177309 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.2.4.0.0-2.oggbin29567 -> 80829 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.2.4.0.0-3.oggbin26498 -> 126045 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.2.4.0.0-4.oggbin18524 -> 0 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.2.4.0.0-5.oggbin140974 -> 0 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.2.4.0.0-6.oggbin47150 -> 0 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.2.4.0.0.m3u11
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.2.4.0.0.oggbin22754 -> 19629 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.2.5.0.0-1.oggbin177309 -> 0 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.2.5.0.0-2.oggbin80829 -> 0 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.2.5.0.0.m3u5
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.2.5.0.0.oggbin19849 -> 0 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.2.6.0.0-1.oggbin81405 -> 0 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.2.6.0.0-2.oggbin183645 -> 0 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.2.6.0.0-3.oggbin141597 -> 0 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.2.6.0.0.m3u6
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.2.6.0.0.oggbin23853 -> 0 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.3.0.0.0.m3u10
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.4.0.0.0-2.oggbin55341 -> 328941 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.4.0.0.0-3.oggbin300141 -> 78381 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.4.0.0.0-4.oggbin64604 -> 49725 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.4.0.0.0-5.oggbin37835 -> 0 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/2.4.0.0.0.m3u11
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/3.0.0.0.0.m3u49
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/3.1.0.0.0-2.oggbin183501 -> 102429 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/3.1.0.0.0-3.oggbin106029 -> 117261 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/3.1.0.0.0.m3u8
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/3.2.0.0.0.m3u28
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/3.2.1.0.0-4.oggbin64989 -> 65853 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/3.2.1.0.0.m3u12
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/3.2.2.0.0-1.oggbin142605 -> 142749 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/3.2.2.0.0-2.oggbin74205 -> 74493 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/3.2.2.0.0-5.oggbin74925 -> 74925 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/3.2.2.0.0.m3u14
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/3.3.0.0.0-1.oggbin139725 -> 94797 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/3.3.0.0.0.m3u4
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/3.4.0.0.0-3.oggbin0 -> 74349 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/3.4.0.0.0.m3u7
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/4.0.0.0.0.m3u104
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0-1.oggbin52029 -> 53037 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0-2.oggbin20882 -> 10557 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0-3.oggbin15532 -> 14445 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0-4.oggbin13888 -> 12573 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0-5.oggbin15770 -> 15453 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0-6.oggbin28759 -> 28989 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0-7.oggbin29062 -> 29565 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0-8.oggbin84905 -> 0 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0.m3u90
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/4.1.1.0.0-4.oggbin97379 -> 85005 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/4.1.1.0.0.m3u10
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/4.1.2.0.0-1.oggbin104589 -> 178029 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/4.1.2.0.0-2.oggbin39789 -> 44109 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/4.1.2.0.0.m3u6
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/4.1.3.0.0-3.oggbin39789 -> 41661 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/4.1.3.0.0-5.oggbin39789 -> 44685 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/4.1.3.0.0.m3u12
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/4.1.4.0.0-1.oggbin99435 -> 78957 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/4.1.4.0.0-2.oggbin53793 -> 73629 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/4.1.4.0.0-3.oggbin56626 -> 0 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/4.1.4.0.0-4.oggbin94077 -> 0 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/4.1.4.0.0.m3u8
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/4.1.4.0.0.oggbin27772 -> 26541 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/4.1.5.0.0-1.oggbin100656 -> 115101 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/4.1.5.0.0-2.oggbin47203 -> 59661 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/4.1.5.0.0-3.oggbin71665 -> 65277 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/4.1.5.0.0-4.oggbin41316 -> 94077 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/4.1.5.0.0.m3u10
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/4.1.5.0.0.oggbin30051 -> 29277 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/4.1.6.0.0-1.oggbin71887 -> 117837 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/4.1.6.0.0-2.oggbin31328 -> 51021 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/4.1.6.0.0-3.oggbin44852 -> 85869 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/4.1.6.0.0-4.oggbin50015 -> 46413 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/4.1.6.0.0-5.oggbin9840 -> 0 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/4.1.6.0.0.m3u11
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/4.1.6.0.0.oggbin45999 -> 31725 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/4.1.7.0.0-1.oggbin31747 -> 86013 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/4.1.7.0.0-2.oggbin60813 -> 33165 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/4.1.7.0.0-3.oggbin33885 -> 51741 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/4.1.7.0.0-4.oggbin52605 -> 54765 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/4.1.7.0.0-5.oggbin0 -> 8541 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/4.1.7.0.0.m3u11
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/4.1.7.0.0.oggbin22597 -> 49581 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/4.1.8.0.0-1.oggbin0 -> 33885 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/4.1.8.0.0-2.oggbin0 -> 60813 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/4.1.8.0.0-3.oggbin0 -> 33309 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/4.1.8.0.0-4.oggbin0 -> 52605 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/4.1.8.0.0.m3u7
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/4.1.8.0.0.oggbin0 -> 22221 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/4.2.0.0.0.m3u12
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/5.0.0.0.0.m3u4
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/6.0.0.0.0.m3u93
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/6.1.0.0.0.m3u4
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/6.2.0.0.0.m3u10
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/6.2.1.0.0.m3u4
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/6.2.2.0.0.m3u4
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/6.3.0.0.0.m3u24
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/6.3.1.0.0.m3u4
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/6.3.2.0.0.m3u14
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/6.3.3.0.0.m3u4
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/6.4.0.0.0-2.oggbin64241 -> 75069 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/6.4.0.0.0.m3u6
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/6.5.0.0.0.m3u6
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/6.6.0.0.0.m3u15
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/6.6.1.0.0-2.oggbin84898 -> 97821 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/6.6.1.0.0.m3u8
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/6.6.2.0.0-1.oggbin63161 -> 19773 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/6.6.2.0.0-2.oggbin0 -> 71757 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/6.6.2.0.0.m3u5
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/6.7.0.0.0.m3u24
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.0.0.0.0.m3u51
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.1.0.0.0.m3u2
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.10.0.0.0.m3u8
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.10.0.0.0.oggbin26219 -> 28845 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.10.1.0.0.m3u2
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.10.1.0.0.oggbin27910 -> 32301 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.10.2.0.0.m3u2
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.10.2.0.0.oggbin26519 -> 23517 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.10.3.0.0.m3u3
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.10.3.0.0.oggbin28484 -> 0 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.10.4.0.0.m3u3
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.10.4.0.0.oggbin28780 -> 0 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.11.0.0.0.m3u6
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.11.0.0.0.oggbin22365 -> 24381 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.11.1.0.0.m3u3
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.11.1.0.0.oggbin0 -> 28413 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.11.2.0.0.m3u3
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.11.2.0.0.oggbin0 -> 27693 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.11.3.0.0.m3u3
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.11.3.0.0.oggbin0 -> 29565 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.11.4.0.0.m3u3
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.11.4.0.0.oggbin0 -> 29709 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.12.0.0.0.m3u3
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.12.0.0.0.oggbin0 -> 20637 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.2.0.0.0.m3u2
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.3.0.0.0.m3u2
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.4.0.0.0.m3u2
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.5.0.0.0.m3u2
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.6.0.0.0.m3u2
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.7.0.0.0.m3u2
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.8.0.0.0.m3u8
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.8.0.0.0.oggbin25282 -> 19773 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.8.1.0.0.m3u3
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.8.1.0.0.oggbin21077 -> 0 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.8.2.0.0.m3u3
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.8.2.0.0.oggbin20091 -> 0 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.8.3.0.0.m3u3
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.8.3.0.0.oggbin22221 -> 0 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.8.4.0.0.m3u3
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.8.4.0.0.oggbin21213 -> 0 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.8.5.0.0.m3u3
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.8.5.0.0.oggbin18621 -> 0 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.8.6.0.0.m3u3
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.8.6.0.0.oggbin27261 -> 0 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.9.0.0.0.m3u10
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.9.0.0.0.oggbin26916 -> 26829 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.9.1.0.0.m3u2
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.9.1.0.0.oggbin30677 -> 22509 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.9.2.0.0.m3u2
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.9.2.0.0.oggbin23949 -> 20925 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.9.3.0.0.m3u3
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.9.3.0.0.oggbin0 -> 22653 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.9.4.0.0.m3u3
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.9.4.0.0.oggbin0 -> 21789 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.9.5.0.0.m3u3
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.9.5.0.0.oggbin0 -> 19341 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.9.6.0.0.m3u3
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/7.9.6.0.0.oggbin0 -> 27981 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/8.0.0.0.0-1.oggbin22653 -> 22941 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/8.0.0.0.0-star-1.oggbin6381 -> 0 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/8.0.0.0.0-star-2.oggbin7101 -> 6381 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/8.0.0.0.0-star-3.oggbin5517 -> 7101 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/8.0.0.0.0-star-4.oggbin0 -> 5517 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/8.0.0.0.0.m3u14
-rw-r--r--macros/latex/contrib/spelatex/spelatex-spel/date.oggbin26829 -> 26397 bytes
-rw-r--r--macros/latex/contrib/spelatex/spelatex.dtx898
-rw-r--r--macros/latex/contrib/spelatex/spelatex.pdfbin332348 -> 356938 bytes
-rw-r--r--macros/latex/contrib/suanpan-l3/README.md58
-rwxr-xr-xmacros/latex/contrib/suanpan-l3/build.sh8
-rw-r--r--macros/latex/contrib/suanpan-l3/suanpan-l3.pdfbin0 -> 439455 bytes
-rw-r--r--macros/latex/contrib/suanpan-l3/suanpan-l3.sty1401
-rw-r--r--macros/latex/contrib/suanpan-l3/suanpan-l3.tex1479
-rw-r--r--macros/latex/contrib/tableof/README.md8
-rw-r--r--macros/latex/contrib/tableof/tableof.dtx165
-rw-r--r--macros/latex/contrib/tableof/tableof.pdfbin58824 -> 62790 bytes
-rw-r--r--macros/latex/contrib/tagpdf/README.md4
-rw-r--r--macros/latex/contrib/tagpdf/ex-AF-file.pdf98
-rw-r--r--macros/latex/contrib/tagpdf/ex-alt-actualtext.pdfbin34295 -> 34624 bytes
-rw-r--r--macros/latex/contrib/tagpdf/ex-attribute.pdf86
-rw-r--r--macros/latex/contrib/tagpdf/ex-formula-problem.pdf74
-rw-r--r--macros/latex/contrib/tagpdf/ex-list.pdf158
-rw-r--r--macros/latex/contrib/tagpdf/ex-mc-manual-para-split-obsolete.pdf52
-rw-r--r--macros/latex/contrib/tagpdf/ex-softhyphen.pdf74
-rw-r--r--macros/latex/contrib/tagpdf/ex-spaceglyph-listings.pdf66
-rw-r--r--macros/latex/contrib/tagpdf/ex-structure-obsolete.pdf100
-rw-r--r--macros/latex/contrib/tagpdf/ex-tagpdf-template.pdf94
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-backend.dtx24
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-checks.dtx41
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-code.pdfbin1737121 -> 1277086 bytes
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-code.tex14
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-data.dtx16
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-docelements.tex2
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-mc-generic.dtx10
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-mc-luacode.dtx6
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-mc-shared.dtx10
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-roles.dtx4
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-space.dtx5
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-struct.dtx448
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-tree.dtx10
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-user.dtx18
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf.dtx263
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf.pdfbin1124473 -> 1136355 bytes
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf.tex99
-rw-r--r--macros/latex/contrib/tagpdf/tagpdfdocu-patches.sty2
-rw-r--r--macros/latex/contrib/tcolorbox/CHANGES.md19
-rw-r--r--macros/latex/contrib/tcolorbox/README.md2
-rw-r--r--macros/latex/contrib/tcolorbox/tcbbreakable.code.tex4
-rw-r--r--macros/latex/contrib/tcolorbox/tcbdocumentation.code.tex27
-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.tex8
-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.pdfbin137729 -> 137729 bytes
-rw-r--r--macros/latex/contrib/tcolorbox/tcolorbox-example-poster.tex2
-rw-r--r--macros/latex/contrib/tcolorbox/tcolorbox-example.pdfbin287734 -> 287728 bytes
-rw-r--r--macros/latex/contrib/tcolorbox/tcolorbox-example.tex2
-rw-r--r--macros/latex/contrib/tcolorbox/tcolorbox-tutorial-poster.pdfbin247127 -> 247644 bytes
-rw-r--r--macros/latex/contrib/tcolorbox/tcolorbox-tutorial-poster.tex4
-rw-r--r--macros/latex/contrib/tcolorbox/tcolorbox.doc.breakable.tex14
-rw-r--r--macros/latex/contrib/tcolorbox/tcolorbox.doc.coremacros.tex2
-rw-r--r--macros/latex/contrib/tcolorbox/tcolorbox.doc.coreoptions.tex40
-rw-r--r--macros/latex/contrib/tcolorbox/tcolorbox.doc.documentation.tex53
-rw-r--r--macros/latex/contrib/tcolorbox/tcolorbox.doc.external.tex6
-rw-r--r--macros/latex/contrib/tcolorbox/tcolorbox.doc.filling.tex4
-rw-r--r--macros/latex/contrib/tcolorbox/tcolorbox.doc.graphics.tex2
-rw-r--r--macros/latex/contrib/tcolorbox/tcolorbox.doc.initoptions.tex6
-rw-r--r--macros/latex/contrib/tcolorbox/tcolorbox.doc.intro.tex12
-rw-r--r--macros/latex/contrib/tcolorbox/tcolorbox.doc.listings.tex52
-rw-r--r--macros/latex/contrib/tcolorbox/tcolorbox.doc.poster.tex2
-rw-r--r--macros/latex/contrib/tcolorbox/tcolorbox.doc.s_main.sty3
-rw-r--r--macros/latex/contrib/tcolorbox/tcolorbox.doc.skins.tex13
-rw-r--r--macros/latex/contrib/tcolorbox/tcolorbox.doc.theorems.tex14
-rw-r--r--macros/latex/contrib/tcolorbox/tcolorbox.doc.xparse.tex6
-rw-r--r--macros/latex/contrib/tcolorbox/tcolorbox.pdfbin4856594 -> 4868793 bytes
-rw-r--r--macros/latex/contrib/tcolorbox/tcolorbox.sty70
-rw-r--r--macros/latex/contrib/tcolorbox/tcolorbox.tex8
-rw-r--r--macros/latex/contrib/tutodoc/code/tutodoc-locale-main-english.cfg.sty8
-rw-r--r--macros/latex/contrib/tutodoc/code/tutodoc-locale-main-french.cfg.sty8
-rw-r--r--macros/latex/contrib/tutodoc/code/tutodoc.sty533
-rw-r--r--macros/latex/contrib/tutodoc/doc/tutodoc-en.pdfbin714026 -> 777038 bytes
-rw-r--r--macros/latex/contrib/tutodoc/doc/tutodoc-en.tex839
-rw-r--r--macros/latex/contrib/tutodoc/doc/tutodoc-fr.pdfbin748835 -> 831570 bytes
-rw-r--r--macros/latex/contrib/tutodoc/doc/tutodoc-fr.tex855
-rw-r--r--macros/latex/contrib/uantwerpendocs/beamerthemeuantwerpenuserguide.pdfbin3225047 -> 3225047 bytes
-rw-r--r--macros/latex/contrib/uantwerpendocs/uantwerpenbamathesis-example.pdfbin127160 -> 127160 bytes
-rw-r--r--macros/latex/contrib/uantwerpendocs/uantwerpencoursetext-example.pdfbin81407 -> 81407 bytes
-rw-r--r--macros/latex/contrib/uantwerpendocs/uantwerpendocs.dtx19
-rw-r--r--macros/latex/contrib/uantwerpendocs/uantwerpendocs.pdfbin505385 -> 505689 bytes
-rw-r--r--macros/latex/contrib/uantwerpendocs/uantwerpenexam-example1.pdfbin62547 -> 62547 bytes
-rw-r--r--macros/latex/contrib/uantwerpendocs/uantwerpenexam-example2.pdfbin65647 -> 65647 bytes
-rw-r--r--macros/latex/contrib/uantwerpendocs/uantwerpenletter-example.pdfbin27549 -> 27549 bytes
-rw-r--r--macros/latex/contrib/uantwerpendocs/uantwerpenphdthesis-example1.pdfbin179332 -> 179397 bytes
-rw-r--r--macros/latex/contrib/uantwerpendocs/uantwerpenphdthesis-example2.pdfbin132771 -> 132758 bytes
-rw-r--r--macros/latex/contrib/uantwerpendocs/uantwerpenreport-example.pdfbin175932 -> 175932 bytes
-rw-r--r--macros/latex/contrib/ucph-revy/README.md2
-rw-r--r--macros/latex/contrib/ucph-revy/ucph-revy-da-doc.pdfbin268481 -> 270526 bytes
-rw-r--r--macros/latex/contrib/ucph-revy/ucph-revy-da-man.pdfbin164864 -> 166576 bytes
-rw-r--r--macros/latex/contrib/ucph-revy/ucph-revy-en-doc.pdfbin270492 -> 273650 bytes
-rw-r--r--macros/latex/contrib/ucph-revy/ucph-revy-en-man.pdfbin169129 -> 171925 bytes
-rw-r--r--macros/latex/contrib/ucph-revy/ucph-revy.dtx78
-rw-r--r--macros/latex/contrib/univie-ling/README31
-rw-r--r--macros/latex/contrib/univie-ling/biblatex-univie-ling/univie-ling.bbx50
-rw-r--r--macros/latex/contrib/univie-ling/biblatex-univie-ling/univie-ling.cbx2
-rw-r--r--macros/latex/contrib/univie-ling/doc/templates/template-expose-deutsch.pdfbin132716 -> 132635 bytes
-rw-r--r--macros/latex/contrib/univie-ling/doc/templates/template-expose-english.pdfbin127947 -> 127866 bytes
-rw-r--r--macros/latex/contrib/univie-ling/doc/templates/template-handout-deutsch.pdfbin201366 -> 201366 bytes
-rw-r--r--macros/latex/contrib/univie-ling/doc/templates/template-handout-english.pdfbin200967 -> 200967 bytes
-rw-r--r--macros/latex/contrib/univie-ling/doc/templates/template-paper-deutsch.pdfbin172712 -> 172484 bytes
-rw-r--r--macros/latex/contrib/univie-ling/doc/templates/template-paper-english.pdfbin167812 -> 167577 bytes
-rw-r--r--macros/latex/contrib/univie-ling/doc/templates/template-poster-deutsch.pdfbin227180 -> 227180 bytes
-rw-r--r--macros/latex/contrib/univie-ling/doc/templates/template-poster-english.pdfbin224983 -> 224983 bytes
-rw-r--r--macros/latex/contrib/univie-ling/doc/templates/template-thesis-deutsch.pdfbin190497 -> 347337 bytes
-rw-r--r--macros/latex/contrib/univie-ling/doc/templates/template-thesis-english.pdfbin186645 -> 343435 bytes
-rw-r--r--macros/latex/contrib/univie-ling/doc/templates/template-wlg-article.pdfbin250474 -> 250470 bytes
-rw-r--r--macros/latex/contrib/univie-ling/doc/templates/template-wlg-review.pdfbin250365 -> 250364 bytes
-rw-r--r--macros/latex/contrib/univie-ling/doc/univie-ling-bbx.pdfbin0 -> 344951 bytes
-rw-r--r--macros/latex/contrib/univie-ling/doc/univie-ling-bbx.tex238
-rw-r--r--macros/latex/contrib/univie-ling/doc/univie-ling-expose.pdfbin461588 -> 464581 bytes
-rw-r--r--macros/latex/contrib/univie-ling/doc/univie-ling-expose.tex37
-rw-r--r--macros/latex/contrib/univie-ling/doc/univie-ling-handout.pdfbin450553 -> 454292 bytes
-rw-r--r--macros/latex/contrib/univie-ling/doc/univie-ling-handout.tex33
-rw-r--r--macros/latex/contrib/univie-ling/doc/univie-ling-paper.pdfbin459207 -> 462306 bytes
-rw-r--r--macros/latex/contrib/univie-ling/doc/univie-ling-paper.tex37
-rw-r--r--macros/latex/contrib/univie-ling/doc/univie-ling-poster.pdfbin457851 -> 457853 bytes
-rw-r--r--macros/latex/contrib/univie-ling/doc/univie-ling-poster.tex2
-rw-r--r--macros/latex/contrib/univie-ling/doc/univie-ling-thesis.pdfbin462143 -> 465942 bytes
-rw-r--r--macros/latex/contrib/univie-ling/doc/univie-ling-thesis.tex78
-rw-r--r--macros/latex/contrib/univie-ling/doc/univie-ling-wlg.pdfbin350542 -> 354003 bytes
-rw-r--r--macros/latex/contrib/univie-ling/doc/univie-ling-wlg.tex52
-rw-r--r--macros/latex/contrib/univie-ling/doc/univie-ling.pdfbin365821 -> 365619 bytes
-rw-r--r--macros/latex/contrib/univie-ling/doc/univie-ling.tex4
-rw-r--r--macros/latex/contrib/univie-ling/tex/univie-ling-expose.cls19
-rw-r--r--macros/latex/contrib/univie-ling/tex/univie-ling-handout.cls19
-rw-r--r--macros/latex/contrib/univie-ling/tex/univie-ling-paper.cls19
-rw-r--r--macros/latex/contrib/univie-ling/tex/univie-ling-poster.cls2
-rw-r--r--macros/latex/contrib/univie-ling/tex/univie-ling-thesis.cls113
-rw-r--r--macros/latex/contrib/univie-ling/tex/univie-ling-wlg.cls30
-rw-r--r--macros/latex/contrib/verifycommand/README.txt2
-rw-r--r--macros/latex/contrib/verifycommand/verifycommand.dtx711
-rw-r--r--macros/latex/contrib/verifycommand/verifycommand.pdfbin226262 -> 264745 bytes
-rw-r--r--macros/latex/contrib/writeongrid/doc/WriteOnGrid-5x5-A4.pdfbin0 -> 95898 bytes
-rw-r--r--macros/latex/contrib/writeongrid/doc/WriteOnGrid-5x5-A4.tex26
-rw-r--r--macros/latex/contrib/writeongrid/doc/WriteOnGrid-doc-en.pdfbin476435 -> 477237 bytes
-rw-r--r--macros/latex/contrib/writeongrid/doc/WriteOnGrid-doc-en.tex6
-rw-r--r--macros/latex/contrib/writeongrid/doc/WriteOnGrid-doc-fr.pdfbin612911 -> 617253 bytes
-rw-r--r--macros/latex/contrib/writeongrid/doc/WriteOnGrid-doc-fr.tex21
-rw-r--r--macros/latex/contrib/writeongrid/tex/WriteOnGrid.sty54
-rw-r--r--macros/latex/contrib/xcolor/ChangeLog9
-rw-r--r--macros/latex/contrib/xcolor/README.md4
-rw-r--r--macros/latex/contrib/xcolor/xcolor.dtx62
-rw-r--r--macros/latex/contrib/xcolor/xcolor.pdfbin864842 -> 865002 bytes
-rw-r--r--macros/latex/contrib/xcolor/xcolor2.pdfbin91845 -> 88550 bytes
-rw-r--r--macros/latex/contrib/xreview/README54
-rw-r--r--macros/latex/contrib/xreview/xreview.pdfbin0 -> 243660 bytes
-rw-r--r--macros/latex/contrib/xreview/xreview.sty135
-rw-r--r--macros/latex/contrib/xreview/xreview.tex591
-rw-r--r--macros/latex/contrib/zref-clever/CHANGELOG.md7
-rw-r--r--macros/latex/contrib/zref-clever/zref-clever-code.pdfbin890025 -> 891606 bytes
-rw-r--r--macros/latex/contrib/zref-clever/zref-clever-doc.pdfbin228899 -> 229279 bytes
-rw-r--r--macros/latex/contrib/zref-clever/zref-clever-doc.tex7
-rw-r--r--macros/latex/contrib/zref-clever/zref-clever.dtx350
-rw-r--r--macros/latex/contrib/zugferd/DEMO-rechnung-zugferd.tex95
-rw-r--r--macros/latex/contrib/zugferd/DEPENDS.txt7
-rw-r--r--macros/latex/contrib/zugferd/README.md27
-rw-r--r--macros/latex/contrib/zugferd/zugferd-invoice.sty193
-rw-r--r--macros/latex/contrib/zugferd/zugferd.dtx2285
-rw-r--r--macros/latex/contrib/zugferd/zugferd.ins19
-rw-r--r--macros/latex/contrib/zugferd/zugferd.pdfbin0 -> 245735 bytes
1186 files changed, 64411 insertions, 14212 deletions
diff --git a/macros/latex/contrib/acmart/Makefile b/macros/latex/contrib/acmart/Makefile
index 545e505ed5..c81d355446 100644
--- a/macros/latex/contrib/acmart/Makefile
+++ b/macros/latex/contrib/acmart/Makefile
@@ -14,6 +14,7 @@ DEV=-dev # To switch dev on
PDF = $(PACKAGE).pdf acmguide.pdf
BIBLATEXFILES= $(wildcard *.bbx) $(wildcard *.cbx) $(wildcard *.dbx) $(wildcard *.lbx)
+
SAMPLEBIBLATEXFILES=$(patsubst %,samples/%,$(BIBLATEXFILES))
ACMCPSAMPLES= \
@@ -21,7 +22,7 @@ ACMCPSAMPLES= \
samples/sample-acmcp-Invited.pdf \
samples/sample-acmcp-Position.pdf \
samples/sample-acmcp-Research.pdf \
- samples/sample-acmcp-Review.pdf \
+ samples/sample-acmcp-Review.pdf
all: ${PDF} ALLSAMPLES
@@ -46,6 +47,9 @@ acmguide.pdf: $(PACKAGE).dtx $(PACKAGE).cls
%.cls: %.ins %.dtx
pdflatex $<
+%-tagged.cls: %.ins %.dtx
+ pdflatex $<
+
ALLSAMPLES: $(SAMPLEBIBLATEXFILES)
cd samples; pdflatex samples.ins; cd ..
@@ -59,6 +63,7 @@ samples/%: %
samples/$(PACKAGE).cls: $(PACKAGE).cls
+samples/$(PACKAGE)-tagged.cls: $(PACKAGE)-tagged.cls
samples/ACM-Reference-Format.bst: ACM-Reference-Format.bst
samples/abbrev.bib: ACM-Reference-Format.bst
@@ -116,7 +121,18 @@ samples/sample-sigconf-lualatex.pdf: samples/sample-lualatex.tex samples/$(PA
samples/sample-acmcp.pdf: samples/acm-jdslogo.png
-.PRECIOUS: $(PACKAGE).cfg $(PACKAGE).cls
+
+samples/sample-acmsmall-tagged.pdf: samples/sample-acmsmall-tagged.tex samples/$(PACKAGE)-tagged.cls samples/ACM-Reference-Format.bst
+ cd $(dir $@) && lualatex-dev $(notdir $<)
+ - cd $(dir $@) && bibtex $(notdir $(basename $<))
+ cd $(dir $@) && lualatex-dev $(notdir $<)
+ cd $(dir $@) && lualatex-dev $(notdir $<)
+ while ( grep -q '^LaTeX Warning: Label(s) may have changed' $(basename $<).log) \
+ do cd $(dir $@) && lualatex-dev $(notdir $<); done
+
+
+
+.PRECIOUS: $(PACKAGE).cfg $(PACKAGE).cls $(PACKAGE)-tagged.cls
docclean:
$(RM) *.log *.aux \
@@ -124,7 +140,9 @@ docclean:
*.ilg *.ind *.out *.lof \
*.lot *.bbl *.blg *.gls *.cut *.hd \
*.dvi *.ps *.thm *.tgz *.zip *.rpi \
- samples/$(PACKAGE).cls samples/ACM-Reference-Format.bst \
+ samples/$(PACKAGE).cls \
+ samples/$(PACKAGE)-tagged.cls \
+ samples/ACM-Reference-Format.bst \
samples/*.log samples/*.aux samples/*.out \
samples/*.bbl samples/*.blg samples/*.cut \
samples/acm-jdslogo.png \
@@ -132,7 +150,7 @@ docclean:
clean: docclean
- $(RM) $(PACKAGE).cls \
+ $(RM) $(PACKAGE).cls $(PACKAGE)-tagged.cls \
samples/*.tex
distclean: clean
diff --git a/macros/latex/contrib/acmart/README b/macros/latex/contrib/acmart/README
index 7d79e34935..b46a735447 100644
--- a/macros/latex/contrib/acmart/README
+++ b/macros/latex/contrib/acmart/README
@@ -12,6 +12,9 @@ The production version is the one on CTAN and ACM sites.
Changes
+Version 2.09. Experimental tagging code is now in the main branch.
+ Creative Commons license is now allowed for all materials.
+
Version 2.08. Section titles are in lowercase now.
Documentation updates.
diff --git a/macros/latex/contrib/acmart/acmart.dtx b/macros/latex/contrib/acmart/acmart.dtx
index 0ff7a902b7..26e19fdcc6 100644
--- a/macros/latex/contrib/acmart/acmart.dtx
+++ b/macros/latex/contrib/acmart/acmart.dtx
@@ -998,13 +998,7 @@
% by IW3C2, when some authors are approved Google employees.\\
% \texttt{cc} & Creative Commons license. If this key is set,
% \textsl{doclicense} images are used to typeset the license. See
-% also \cs{setcctype} command. Note that at present this license
-% can be used only either for \texttt{acmengage} format, or for
-% \texttt{nonacm} publications, or for the authors that meet any
-% of the following requirements: (a)~part of the ACM Open Program;
-% (b)~publishing in a Gold Open Access publication;
-% (c)~paying the Open Access APC;
-% (d)~part of the Google publishing agreement.\\
+% also \cs{setcctype} command. \\
% \texttt{acmcopyright} & The authors transfer the copyright to the
% ACM. This choice is no longer available for the
% non-commissioned authors and will trigger a warning.\\
@@ -2239,6 +2233,24 @@
% \item |figure*|: \cs{fulltextwidth}.
% \end{enumerate}
%
+%\subsection{Experiments with tagging}
+%\label{sec:ug_tagged}
+%
+% ACM is firmly committed to produce fully tagged PDFs compliant with
+% the accessibility standards. We use the developmental version of
+% tagging code by \LaTeX3 team, see the details at
+% \url{https://www.latex-project.org/publications/indexbytopic/pdf/}
+% and \url{https://tug.org/twg/accessibility/overview.html}.
+%
+% At present this work is highly experimental. You may try the
+% experiments by (1)~using the class |acmart-tagged| in the document
+% class line, and (2)~adding the command
+% \cs{DocumentMetadata}\oarg{options} in the preamble, see the file
+% \path{sample-acmsmall-tagged.tex}. If you do this, please \emph{do
+% not ask ACM for support}. On the other hand, bug reports at
+% \url{https://github.com/borisveytsman/acmart/issues} will be
+% appreciated.
+%
%
%
% \StopEventually{
@@ -2263,8 +2275,9 @@
%<*gobble>
\ProvidesFile{acmart.dtx}
%</gobble>
-%<class>\ProvidesClass{acmart}
-[2024/05/27 v2.08 Typesetting articles for the Association for Computing Machinery]
+%<class&!tagged>\ProvidesClass{acmart}
+%<tagged>\ProvidesClass{acmart-tagged}
+[2024/08/25 v2.09 Typesetting articles for the Association for Computing Machinery]
% \end{macrocode}
%
% \changes{v1.00}{2016/04/14}{First released version}
@@ -2401,7 +2414,8 @@
\end{document}
%</gobble>
%<*class>
-\def\@classname{acmart}
+%<!tagged>\def\@classname{acmart}
+%<tagged>\def\@classname{acmart-tagged}
% \end{macrocode}
%
%
@@ -2442,13 +2456,13 @@
% \changes{1.87}{2022/08/13}{New format: acmcp}
% The possible formats
% \begin{macrocode}
-\define@choicekey*+{acmart.cls}{format}[\ACM@format\ACM@format@nr]{%
+\define@choicekey*+{\@classname.cls}{format}[\ACM@format\ACM@format@nr]{%
manuscript, acmsmall, acmlarge, acmtog, sigconf, siggraph,
sigplan, sigchi, sigchi-a, acmengage, acmcp}[manuscript]{}{%
\ClassError{\@classname}{The option format must be manuscript,
acmsmall, acmlarge, acmtog, sigconf, siggraph,
sigplan, sigchi or sigchi-a}}
-\def\@DeclareACMFormat#1{\DeclareOptionX{#1}{\setkeys{acmart.cls}{format=#1}}}
+\def\@DeclareACMFormat#1{\DeclareOptionX{#1}{\setkeys{\@classname.cls}{format=#1}}}
\@DeclareACMFormat{manuscript}
\@DeclareACMFormat{acmsmall}
\@DeclareACMFormat{acmlarge}
@@ -2468,7 +2482,7 @@
% \begin{macro}{\if@ACM@screen}
% Whether we use screen mode
% \begin{macrocode}
-\define@boolkey+{acmart.cls}[@ACM@]{screen}[true]{%
+\define@boolkey+{\@classname.cls}[@ACM@]{screen}[true]{%
\if@ACM@screen
\PackageInfo{\@classname}{Using screen mode}%
\else
@@ -2483,7 +2497,7 @@
% \begin{macro}{\if@ACM@urlbreakonhyphens}
% \changes{1.60}{2019/04/22}{introduced macro}
% \begin{macrocode}
-\define@boolkey+{acmart.cls}[@ACM@]{urlbreakonhyphens}[true]{%
+\define@boolkey+{\@classname.cls}[@ACM@]{urlbreakonhyphens}[true]{%
\if@ACM@urlbreakonhyphens
\PackageInfo{\@classname}{Using breaking urls on hyphens}%
\else
@@ -2499,7 +2513,7 @@
% \changes{v1.46}{2017/08/29}{Modified description}
% Whether we define theorem-like environments.
% \begin{macrocode}
-\define@boolkey+{acmart.cls}[@ACM@]{acmthm}[true]{%
+\define@boolkey+{\@classname.cls}[@ACM@]{acmthm}[true]{%
\if@ACM@acmthm
\PackageInfo{\@classname}{Requiring acmthm}%
\else
@@ -2516,7 +2530,7 @@
% \changes{v1.48}{2017/09/09}{Review mode now switches on folios}
% Whether we use review mode
% \begin{macrocode}
-\define@boolkey+{acmart.cls}[@ACM@]{review}[true]{%
+\define@boolkey+{\@classname.cls}[@ACM@]{review}[true]{%
\if@ACM@review
\PackageInfo{\@classname}{Using review mode}%
\AtBeginDocument{\@ACM@printfoliostrue}%
@@ -2533,7 +2547,7 @@
% \changes{v1.03}{2016/04/22}{Added macro}
% Whether we use author's-version mode
% \begin{macrocode}
-\define@boolkey+{acmart.cls}[@ACM@]{authorversion}[true]{%
+\define@boolkey+{\@classname.cls}[@ACM@]{authorversion}[true]{%
\if@ACM@authorversion
\PackageInfo{\@classname}{Using authorversion mode}%
\else
@@ -2550,7 +2564,7 @@
% Special option for non-ACM publications
% using the ACM typesetting options.
% \begin{macrocode}
-\define@boolkey+{acmart.cls}[@ACM@]{nonacm}[true]{%
+\define@boolkey+{\@classname.cls}[@ACM@]{nonacm}[true]{%
\if@ACM@nonacm
\PackageInfo{\@classname}{Using nonacm mode}%
\AtBeginDocument{\@ACM@printacmreffalse}%
@@ -2570,7 +2584,7 @@
% \changes{v1.57}{2018/12/16}{Added macro}
% Whether to balance the last page
% \begin{macrocode}
-\define@boolkey+{acmart.cls}[@ACM@]{balance}[true]{}{%
+\define@boolkey+{\@classname.cls}[@ACM@]{balance}[true]{}{%
\PackageError{\@classname}{The option balance can be either true or
false}}
\ExecuteOptionsX{balance}
@@ -2583,7 +2597,7 @@
% \changes{v1.76}{2021/03/16}{Added macro}
% Whether to balance the last page
% \begin{macrocode}
-\define@boolkey+{acmart.cls}[@ACM@]{pbalance}[true]{}{%
+\define@boolkey+{\@classname.cls}[@ACM@]{pbalance}[true]{}{%
\PackageError{\@classname}{The option pbalance can be either true or
false}}
\ExecuteOptionsX{pbalance=false}
@@ -2601,7 +2615,7 @@
% \begin{macro}{\if@ACM@natbib}
% Whether we use |natbib| mode
% \begin{macrocode}
-\define@boolkey+{acmart.cls}[@ACM@]{natbib}[true]{%
+\define@boolkey+{\@classname.cls}[@ACM@]{natbib}[true]{%
\if@ACM@natbib
\PackageInfo{\@classname}{Explicitly selecting natbib mode}%
\else
@@ -2617,7 +2631,7 @@
% \begin{macro}{\if@ACM@anonymous}
% Whether we use anonymous mode
% \begin{macrocode}
-\define@boolkey+{acmart.cls}[@ACM@]{anonymous}[true]{%
+\define@boolkey+{\@classname.cls}[@ACM@]{anonymous}[true]{%
\if@ACM@anonymous
\PackageInfo{\@classname}{Using anonymous mode}%
\else
@@ -2634,7 +2648,7 @@
% \changes{v1.33}{2017/03/10}{Added macro (Michael D.~Adams)}
% Whether we use timestamp mode
% \begin{macrocode}
-\define@boolkey+{acmart.cls}[@ACM@]{timestamp}[true]{%
+\define@boolkey+{\@classname.cls}[@ACM@]{timestamp}[true]{%
\if@ACM@timestamp
\PackageInfo{\@classname}{Using timestamp mode}%
\else
@@ -2652,7 +2666,7 @@
% \changes{v1.36}{2017/05/13}{Corrected typo, thanks to bargteil}
% Whether we use author-draft mode
% \begin{macrocode}
-\define@boolkey+{acmart.cls}[@ACM@]{authordraft}[true]{%
+\define@boolkey+{\@classname.cls}[@ACM@]{authordraft}[true]{%
\if@ACM@authordraft
\PackageInfo{\@classname}{Using authordraft mode}%
\@ACM@timestamptrue
@@ -2788,13 +2802,13 @@
\ClassWarning{\@classname}{%
The format siggraph is now obsolete.\MessageBreak
I am switching to sigconf.}
- \setkeys{acmart.cls}{format=sigconf}
+ \setkeys{\@classname.cls}{format=sigconf}
\fi
\ifnum\ACM@format@nr=7\relax % sigchi
\ClassWarning{\@classname}{%
The format sigchi is now obsolete.\MessageBreak
I am switching to sigconf.}
- \setkeys{acmart.cls}{format=sigconf}
+ \setkeys{\@classname.cls}{format=sigconf}
\fi
\ifnum\ACM@format@nr=8\relax % sigchi
\ClassWarning{\@classname}{%
@@ -2861,6 +2875,42 @@
% \changes{v1.38}{2017/05/13}{Increase default font size for SIGPLAN}
% \changes{v1.87}{2022/08/27}{Set font sizes for |acmengage| and |acmcp|}
%
+%<*tagged>
+% \changes{v2.09}{2022/08/25}{Saved the old definitions (Ulrike's
+% code}
+% Before we load the base class we want to save the original
+% definitions of sectioning commands since |acmart| redefines them,
+% and we need the vanilla versions.
+% \begin{macro}{\@startsection@kernel}
+% \changes{v2.00}{2023/11/19}{Added macro}
+% \begin{macrocode}
+\let\@startsection@kernel\@startsection
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@xsect@kernel}
+% \changes{v2.00}{2023/11/19}{Added macro}
+% \begin{macrocode}
+\let\@xsect@kernel\@xsect
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@sect@kernel}
+% \changes{v2.00}{2023/11/19}{Added macro}
+% \begin{macrocode}
+\let\@sect@kernel\@sect
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@ssect@kernel}
+% \changes{v2.00}{2023/11/19}{Added macro}
+% \begin{macrocode}
+\let\@ssect@kernel\@ssect
+% \end{macrocode}
+% \end{macro}
+%
+%</tagged>
+%
%
% At this point we either have \cs{ACM@fontsize} or use defaults
% \begin{macrocode}
@@ -3258,6 +3308,14 @@
% We need to do this early since we want |hyperref| to have a chance
% to redefine them again:
% \begin{macrocode}
+%</class>
+%<*tagged>
+\let\@startsection\@startsection@kernel
+\let\@sect\@sect@kernel
+\let\@ssect\@ssect@kernel
+\let\@xsect\@xsect@kernel
+%</tagged>
+%<*class&!tagged>
\def\@startsection#1#2#3#4#5#6{%
\if@noskipsec \leavevmode \fi
\par
@@ -3337,7 +3395,6 @@
\fi}%
\fi
\ignorespaces}
-\def\@seccntformat#1{\csname the#1\endcsname\quad}
\def\@ssect#1#2#3#4#5{%
\@tempskipa #3\relax
\ifdim \@tempskipa>\z@
@@ -3350,11 +3407,14 @@
\def\@svsechd{#4{\hskip #1\relax #5}}%
\fi
\@xsect{#3}}
+%</class&!tagged>
+%<*class>
+\def\@seccntformat#1{\csname the#1\endcsname\quad}
% \end{macrocode}
%
% \end{macro}
%
-% \begin{macro}{\@startsection}
+% \begin{macro}{\@starttoc}
% \changes{v1.31}{2017/03/04}{Redefined macro}
% \changes{v1.43}{2017/07/09}{Added \cs{makeatletter}}
% The |amsart| package redefines \cs{startsection}. Here we redefine
@@ -3365,7 +3425,9 @@
\par\removelastskip\vskip\z@skip
\@startsection{section}\@M\z@{\linespacing\@plus\linespacing}%
{.5\linespacing}{\centering\contentsnamefont}{#2}%
+%<tagged>\@starttoc@cfgpoint@before{#1}%NEW<<<<<<<<<< (name will change)
\@input{\jobname.#1}%
+%<tagged>\@starttoc@cfgpoint@after{#1}%NEW<<<<<<<<<<<< (name will change)
\if@filesw
\@xp\newwrite\csname tf@#1\endcsname
\immediate\@xp\openout\csname tf@#1\endcsname \jobname.#1\relax
@@ -5974,29 +6036,9 @@
%
% \begin{macro}{\@ACM@copyright@check@cc}
% \changes{v1.87}{2022/07/30}{Added macro}
-% At present cC licenses can be used only for acmengage format or for
-% non-acm stuff. This macro checks whether the CC license is
-% applicable and generates an error if not.
% \changes{v2.00}{2023/10/22}{Moved to warning}
-% \begin{macrocode}
-\def\@ACM@copyright@check@cc{%
- \if@ACM@nonacm
- \ClassInfo{\@classname}{Using CC license with a non-acm
- material}%
- \else
- \if@ACM@engage
- \ClassInfo{\@classname}{Using CC license with ACM Enage
- material}%
- \else
- \ClassWarning{\@classname}{%
- Sorry, Creative Commons licenses are\MessageBreak
- currently not used with ACM publications\MessageBreak
- typeset by the authors}{Please use nonacm
- option or ACM Engage class to enable CC licenses}%
- \fi
- \fi}
-% \end{macrocode}
-%
+% \changes{v2.09}{2024/08/25}{Deleted macro}
+% This macro is no longer needed due to the change in ACM policy.
% \end{macro}
%
% \begin{macro}{\@copyrightpermission}
@@ -6007,8 +6049,8 @@
% \changes{v1.85}{2022/05/08}{Added CC licenses}
% \changes{v1.87}{2022/07/30}{CC licenses now are allowed only for
% non-acm or ACM engage publications}
-% \changes{v2.00}{2023/10/24}{Rewrote wording}
-% \changes{v2.00}{2023/10/24}{Rewrote wording}
+% \changes{v2.09}{2024/08/25}{Deleted checking whether CC licenses are
+% allowed}
% The canned permission block.
% \begin{macrocode}
\def\@copyrightpermission{%
@@ -6139,7 +6181,6 @@
disseminate the work on their personal and corporate Web sites with
the appropriate attribution.
\or % CC
- \@ACM@copyright@check@cc
\IfEq{\ACM@cc@type}{zero}{%
\def\ACM@CC@Url{https://creativecommons.org/publicdomain/zero/1.0/legalcode}}{%
\edef\ACM@CC@Url{https://creativecommons.org/licenses/\ACM@cc@type/\ACM@cc@version/legalcode}}%
@@ -6471,7 +6512,7 @@
pdfsubject={\@concepts},
pdfkeywords={\@keywords},
pdfcreator={LaTeX with acmart
- \csname ver@acmart.cls\endcsname\space
+ \csname ver@\@classname.cls\endcsname\space
and hyperref
\csname ver@hyperref.sty\endcsname}}%
\andify\authors
@@ -7588,6 +7629,18 @@
%
% \end{macro}
%
+%<*tagged>
+% We stop tagging inside maketitle for now. Ulrike's code again.
+% \begin{macrocode}
+\ExplSyntaxOn
+\AddToHook{cmd/maketitle/before}
+ {\tagstructbegin{tag=Title}\tagmcbegin{} \tag_stop:}
+\AddToHook{cmd/maketitle/after}
+ {\tag_start:\tagmcend\tagstructend }
+\ExplSyntaxOff
+% \end{macrocode}
+%</tagged>
+%
%\subsection{Headers and Footers}
%\label{sec:head_foot}
%
@@ -8129,28 +8182,33 @@
% \changes{v1.69}{2020/02/02}{No dots for unindented paragraphs}
% Sectioning is different for different levels
% \begin{macrocode}
-\renewcommand\section{\@startsection{section}{1}{\z@}%
+\renewcommand\section{\def\@toclevel{1}%
+ \@startsection{section}{1}{\z@}%
{-.75\baselineskip \@plus -2\p@ \@minus -.2\p@}%
{.25\baselineskip}%
{\ACM@NRadjust\@secfont}}
-\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
+\renewcommand\subsection{\def\@toclevel{2}%
+ \@startsection{subsection}{2}{\z@}%
{-.75\baselineskip \@plus -2\p@ \@minus -.2\p@}%
{.25\baselineskip}%
{\ACM@NRadjust\@subsecfont}}
-\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
+\renewcommand\subsubsection{\def\@toclevel{3}%
+ \@startsection{subsubsection}{3}{\z@}%
{-.5\baselineskip \@plus -2\p@ \@minus -.2\p@}%
{-3.5\p@}%
{\ACM@NRadjust{\@subsubsecfont\@adddotafter}}}
-\renewcommand\paragraph{\@startsection{paragraph}{4}{\parindent}%
+\renewcommand\paragraph{\def\@toclevel{4}%
+ \@startsection{paragraph}{4}{\parindent}%
{-.5\baselineskip \@plus -2\p@ \@minus -.2\p@}%
{-3.5\p@}%
{\ACM@NRadjust{\@parfont\@adddotafter}}}
-\newcommand\noindentparagraph{\@startsection{paragraph}{4}{\z@}%
+\newcommand\noindentparagraph{\def\@toclevel{4}%
+ \@startsection{paragraph}{4}{\z@}%
{-.5\baselineskip \@plus -2\p@ \@minus -.2\p@}%
{-3.5\p@}%
{\ACM@NRadjust{\@parfont}}}
-
-\renewcommand\part{\@startsection{part}{9}{\z@}%
+\renewcommand\part{\def\@toclevel{9}%
+ \@startsection{part}{9}{\z@}%
{-10\p@ \@plus -4\p@ \@minus -2\p@}%
{4\p@}%
{\ACM@NRadjust\@parfont}}
diff --git a/macros/latex/contrib/acmart/acmart.ins b/macros/latex/contrib/acmart/acmart.ins
index d17dc066fd..95c1596220 100644
--- a/macros/latex/contrib/acmart/acmart.ins
+++ b/macros/latex/contrib/acmart/acmart.ins
@@ -13,6 +13,7 @@
\generate{%
\file{acmart.cls}{\from{acmart.dtx}{class}}
+ \file{acmart-tagged.cls}{\from{acmart.dtx}{class,tagged}}
}
\obeyspaces
diff --git a/macros/latex/contrib/acmart/acmart.pdf b/macros/latex/contrib/acmart/acmart.pdf
index 9a91d07bf7..1bcb0df6ad 100644
--- a/macros/latex/contrib/acmart/acmart.pdf
+++ b/macros/latex/contrib/acmart/acmart.pdf
Binary files differ
diff --git a/macros/latex/contrib/acmart/acmguide.pdf b/macros/latex/contrib/acmart/acmguide.pdf
index 927dd7c750..5e90dfb3a5 100644
--- a/macros/latex/contrib/acmart/acmguide.pdf
+++ b/macros/latex/contrib/acmart/acmguide.pdf
Binary files differ
diff --git a/macros/latex/contrib/acmart/samples/sample-acmcp.pdf b/macros/latex/contrib/acmart/samples/sample-acmcp.pdf
index c57d1898d1..47892feee6 100644
--- a/macros/latex/contrib/acmart/samples/sample-acmcp.pdf
+++ b/macros/latex/contrib/acmart/samples/sample-acmcp.pdf
Binary files differ
diff --git a/macros/latex/contrib/acmart/samples/sample-acmengage.pdf b/macros/latex/contrib/acmart/samples/sample-acmengage.pdf
index 366843b28e..d4cd824cf2 100644
--- a/macros/latex/contrib/acmart/samples/sample-acmengage.pdf
+++ b/macros/latex/contrib/acmart/samples/sample-acmengage.pdf
Binary files differ
diff --git a/macros/latex/contrib/acmart/samples/sample-acmlarge.pdf b/macros/latex/contrib/acmart/samples/sample-acmlarge.pdf
index 25a90ec394..65c836673e 100644
--- a/macros/latex/contrib/acmart/samples/sample-acmlarge.pdf
+++ b/macros/latex/contrib/acmart/samples/sample-acmlarge.pdf
Binary files differ
diff --git a/macros/latex/contrib/acmart/samples/sample-acmsmall-biblatex.pdf b/macros/latex/contrib/acmart/samples/sample-acmsmall-biblatex.pdf
index d644e32874..4fe535b32c 100644
--- a/macros/latex/contrib/acmart/samples/sample-acmsmall-biblatex.pdf
+++ b/macros/latex/contrib/acmart/samples/sample-acmsmall-biblatex.pdf
Binary files differ
diff --git a/macros/latex/contrib/acmart/samples/sample-acmsmall-conf.pdf b/macros/latex/contrib/acmart/samples/sample-acmsmall-conf.pdf
index 6e1488235e..17cb0fe359 100644
--- a/macros/latex/contrib/acmart/samples/sample-acmsmall-conf.pdf
+++ b/macros/latex/contrib/acmart/samples/sample-acmsmall-conf.pdf
Binary files differ
diff --git a/macros/latex/contrib/acmart/samples/sample-acmsmall-submission.pdf b/macros/latex/contrib/acmart/samples/sample-acmsmall-submission.pdf
index e0471c8a27..81006c5a71 100644
--- a/macros/latex/contrib/acmart/samples/sample-acmsmall-submission.pdf
+++ b/macros/latex/contrib/acmart/samples/sample-acmsmall-submission.pdf
Binary files differ
diff --git a/macros/latex/contrib/acmart/samples/sample-acmsmall-tagged.pdf b/macros/latex/contrib/acmart/samples/sample-acmsmall-tagged.pdf
new file mode 100644
index 0000000000..87bd3e53d1
--- /dev/null
+++ b/macros/latex/contrib/acmart/samples/sample-acmsmall-tagged.pdf
Binary files differ
diff --git a/macros/latex/contrib/acmart/samples/sample-acmsmall.pdf b/macros/latex/contrib/acmart/samples/sample-acmsmall.pdf
index 17c719abda..fa3a710f0f 100644
--- a/macros/latex/contrib/acmart/samples/sample-acmsmall.pdf
+++ b/macros/latex/contrib/acmart/samples/sample-acmsmall.pdf
Binary files differ
diff --git a/macros/latex/contrib/acmart/samples/sample-acmtog-conf.pdf b/macros/latex/contrib/acmart/samples/sample-acmtog-conf.pdf
index 71e87b73b1..3518df9fdd 100644
--- a/macros/latex/contrib/acmart/samples/sample-acmtog-conf.pdf
+++ b/macros/latex/contrib/acmart/samples/sample-acmtog-conf.pdf
Binary files differ
diff --git a/macros/latex/contrib/acmart/samples/sample-acmtog.pdf b/macros/latex/contrib/acmart/samples/sample-acmtog.pdf
index 1e39a159d3..681d94fbc7 100644
--- a/macros/latex/contrib/acmart/samples/sample-acmtog.pdf
+++ b/macros/latex/contrib/acmart/samples/sample-acmtog.pdf
Binary files differ
diff --git a/macros/latex/contrib/acmart/samples/sample-manuscript.pdf b/macros/latex/contrib/acmart/samples/sample-manuscript.pdf
index 301caf80cb..2b02e5a7ab 100644
--- a/macros/latex/contrib/acmart/samples/sample-manuscript.pdf
+++ b/macros/latex/contrib/acmart/samples/sample-manuscript.pdf
Binary files differ
diff --git a/macros/latex/contrib/acmart/samples/sample-sigconf-authordraft.pdf b/macros/latex/contrib/acmart/samples/sample-sigconf-authordraft.pdf
index a465c8463e..be82dbf5ab 100644
--- a/macros/latex/contrib/acmart/samples/sample-sigconf-authordraft.pdf
+++ b/macros/latex/contrib/acmart/samples/sample-sigconf-authordraft.pdf
Binary files differ
diff --git a/macros/latex/contrib/acmart/samples/sample-sigconf-biblatex.pdf b/macros/latex/contrib/acmart/samples/sample-sigconf-biblatex.pdf
index b4052f9363..e2548408a0 100644
--- a/macros/latex/contrib/acmart/samples/sample-sigconf-biblatex.pdf
+++ b/macros/latex/contrib/acmart/samples/sample-sigconf-biblatex.pdf
Binary files differ
diff --git a/macros/latex/contrib/acmart/samples/sample-sigconf-i13n.pdf b/macros/latex/contrib/acmart/samples/sample-sigconf-i13n.pdf
index dc0e0fe12e..f89bc4b108 100644
--- a/macros/latex/contrib/acmart/samples/sample-sigconf-i13n.pdf
+++ b/macros/latex/contrib/acmart/samples/sample-sigconf-i13n.pdf
Binary files differ
diff --git a/macros/latex/contrib/acmart/samples/sample-sigconf.pdf b/macros/latex/contrib/acmart/samples/sample-sigconf.pdf
index ab5954e602..dd0252c1d5 100644
--- a/macros/latex/contrib/acmart/samples/sample-sigconf.pdf
+++ b/macros/latex/contrib/acmart/samples/sample-sigconf.pdf
Binary files differ
diff --git a/macros/latex/contrib/acmart/samples/sample-sigplan.pdf b/macros/latex/contrib/acmart/samples/sample-sigplan.pdf
index 534e00da12..6f0cccd362 100644
--- a/macros/latex/contrib/acmart/samples/sample-sigplan.pdf
+++ b/macros/latex/contrib/acmart/samples/sample-sigplan.pdf
Binary files differ
diff --git a/macros/latex/contrib/acmart/samples/samples.dtx b/macros/latex/contrib/acmart/samples/samples.dtx
index 37e7a0abfd..b2d75d2a83 100644
--- a/macros/latex/contrib/acmart/samples/samples.dtx
+++ b/macros/latex/contrib/acmart/samples/samples.dtx
@@ -14,7 +14,19 @@
%TC:envir comment 0 0
%TCMACROS
%%
-%%
+%</all>
+%<*tagged>
+%% The tagged file should start with the metadata commands.
+%% We also need currently use lualatex-dev for compilation!
+\ifx\HCode\Undef
+\DocumentMetadata{
+ pdfversion=2.0,pdfstandard=ua-2,
+ testphase={phase-III,firstaid,math,title}}
+\else
+\DocumentMetadata{}
+\fi
+%</tagged>
+%<*all>
%% The first command in your LaTeX source must be the \documentclass
%% command.
%%
@@ -27,7 +39,8 @@
%%
%%
%<manuscript>\documentclass[manuscript,screen,review]{acmart}
-%<acmsmall|acmsmall-conf>\documentclass[acmsmall]{acmart}
+%<acmsmall&!tagged>\documentclass[acmsmall]{acmart}
+%<acmsmall-conf>\documentclass[acmsmall]{acmart}
%<acmsmall-biblatex>\documentclass[acmsmall,natbib=false]{acmart}
%<acmsmall-submission>\documentclass[acmsmall,screen,review]{acmart}
%<acmlarge>\documentclass[acmlarge]{acmart}
@@ -41,7 +54,7 @@
%<sigconf-i13n>\documentclass[sigconf, language=french,
%<sigconf-i13n>language=german, language=spanish, language=english]{acmart}
%<acmcp>\documentclass[acmcp]{acmart}
-
+%<acmsmall&tagged>\documentclass[acmsmall]{acmart-tagged}
%%
%% \BibTeX command to typeset BibTeX logo in the docs
\AtBeginDocument{%
@@ -58,7 +71,6 @@
\copyrightyear{2018}
\acmYear{2018}
\acmDOI{XXXXXXX.XXXXXXX}
-
%</all>
%<*proceedings>
%% These commands are for a PROCEEDINGS abstract or paper.
diff --git a/macros/latex/contrib/acmart/samples/samples.ins b/macros/latex/contrib/acmart/samples/samples.ins
index 2636f5899b..a525d48b55 100644
--- a/macros/latex/contrib/acmart/samples/samples.ins
+++ b/macros/latex/contrib/acmart/samples/samples.ins
@@ -24,5 +24,6 @@
\file{sample-acmtog-conf.tex}{\from{samples.dtx}{all,journal,proceedings,bibtex,acmtog-conf}}
\file{sample-acmcp.tex}{\from{samples.dtx}{all,journal,acmcp}}
\file{sample-acmengage.tex}{\from{acmengage.dtx}{acmengage}}
+ \file{sample-acmsmall-tagged.tex}{\from{samples.dtx}{all,journal,acmsmall,tagged}}
}
diff --git a/macros/latex/contrib/acronym/CHANGES b/macros/latex/contrib/acronym/CHANGES
index 95a9095483..b4a3b73106 100644
--- a/macros/latex/contrib/acronym/CHANGES
+++ b/macros/latex/contrib/acronym/CHANGES
@@ -1,3 +1,15 @@
+Version 1.49 (Mar 2024)
+
+- Adds noforwardlinks option
+-- Chris Landis
+- Fixes targets for forward links to acs/acl/etc.-only use
+-- Chris Landis
+
+Version 1.48 (Oct 2021)
+
+- corrected capitalization of acronyms with a custom plural form
+-- Bruno Le Floch
+
Version 1.47 (Apr 2020)
- Fixed \Iac macro expansion bug
diff --git a/macros/latex/contrib/acronym/acronym.dtx b/macros/latex/contrib/acronym/acronym.dtx
index f7d8e8eabd..b332333810 100644
--- a/macros/latex/contrib/acronym/acronym.dtx
+++ b/macros/latex/contrib/acronym/acronym.dtx
@@ -2,7 +2,7 @@
%
% Doc-Source file to use with LaTeX2e
%
-% Copyright 1994-2020 by Tobias Oetiker (tobi@oetiker.ch) and many Contributors.
+% Copyright 1994-2024 by Tobias Oetiker (tobi@oetiker.ch) and many Contributors.
% All rights reserved.
%
% This work may be distributed and/or modified under the conditions of
@@ -35,7 +35,7 @@
%</driver>
% \fi
%
-% \CheckSum{1526}
+% \CheckSum{1634}
%
%% \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
@@ -82,6 +82,8 @@
% \DoNotIndex{\textbf, \textsf, \textsmaller, \textsuperscript, \the}
% \DoNotIndex{\usepackage}
%
+% \changes{v1.49}{2024/03/30}{Chris Landis adds noforwardlinks option and fixes targets for forward links to acs/acl/etc.-only use}
+% \changes{v1.48}{2021/10/09}{Bruno Le Floch corrected capitalization of acronyms with a custom plural form.}
% \changes{v1.47}{2020/04/10}{Tobi Oetiker and Marcus Meeßen \cmd{hskip} Fixed several bugs in macros that use capitalisation, a bug were the output depends on the position of the list of acronyms, and a bug were nested hyperlinks could cause errors.}
% \changes{v1.46}{2020/03/13}{Tobi Oetiker \cmd{hskip} Fixed miss merge}
% \changes{v1.45}{2020/03/13}{Marcus Meeßen \cmd{hskip} Fixed hyperref and "missing aux" regressions.}
@@ -265,7 +267,7 @@
%
% \DescribeMacro{\acsp}
% Works in the same way as \cmd{\acs}, but makes the short
-% form into a plural.
+% form into a plural.
%
% \DescribeMacro{\aclp}
% Works in the same way as \cmd{\acl}, but makes the long form
@@ -284,6 +286,14 @@
% Works in the same way as \cmd{\acfi}, but starts the long form with an
% upper case letter.
%
+% \DescribeMacro{\acfip}
+% Works in the same way as \cmd{\acfi}, but makes the short and long
+% forms into plurals.
+%
+% \DescribeMacro{\Acfip}
+% Works in the same way as \cmd{\acfip}, but starts the long form with
+% an upper case letter.
+%
% \DescribeMacro{\acused}
% Marks an acronym as used, as if it had been called with \cmd{\ac},
% but without printing anything. This means that in the future only the
@@ -302,11 +312,11 @@
% Example: |\acl{lox}/\acl{lh2} (\acsu{lox}/\acsu{lh2})|
%
% \DescribeMacro{\iac}
-% Works in the same way as the \cmd{\ac} command but prefixes it with
+% Works in the same way as the \cmd{\ac} command but prefixes it with
% an appropriate indefinite article.
%
% \DescribeMacro{\Iac}
-% Works in the same way as the \cmd{\ac} command but prefixes it with
+% Works in the same way as the \cmd{\ac} command but prefixes it with
% an appropriate upper case indefinite article.
%
% \DescribeMacro{\...*}
@@ -316,8 +326,9 @@
% not show up.\\
% \cmd{\ac*}, \cmd{\Ac*}, \cmd{\acs*}, \cmd{\acl*}, \cmd{\Acl*}, \cmd{\acf*},
% \cmd{\Acf*}, \cmd{\acp*}, \cmd{\Acp*}, \cmd{\acsp*}, \cmd{\aclp*}, \cmd{\Aclp*},
-% \cmd{\acfp*}, \cmd{\Acfp*}, \cmd{\acfi*}, \cmd{\Acfi*}, \cmd{\acsu*},
-% \cmd{\aclu*}, \cmd{\Aclu*}, \cmd{\iac*} and \cmd{\Iac*}.
+% \cmd{\acfp*}, \cmd{\Acfp*}, \cmd{\acfi*}, \cmd{\Acfi*}, \cmd{\acfip*},
+% \cmd{\Acfip*}, \cmd{\acsu*}, \cmd{\aclu*}, \cmd{\Aclu*}, \cmd{\iac*},
+% and \cmd{\Iac*}.
%
% \subsection{Customization}
%
@@ -451,7 +462,7 @@
% that the latter makes the acronym definition stored in the |.aux|
% file. Therefore, the acronym becomes available from start-up in
% the next run.
-%
+%
% Note that all the acronym definitions made by \cmd{\acro} in the
% |acronym| environment are also similarly added to the |.aux|
% file.
@@ -459,8 +470,8 @@
% \subsubsection{Non standard indefinite articles}
%
% Sometimes the indefinite article of an acronym differs between its
-% short form and its long form, for example ``a Federal Bureau of
-% Investigation (FBI) agent'' and ``an FBI agent''. To deal with this,
+% short form and its long form, for example ``a Federal Bureau of
+% Investigation (FBI) agent'' and ``an FBI agent''. To deal with this,
% the package provides the following three commands
% \DescribeMacro{\newacroindefinite}
% \DescribeMacro{\acrodefindefinite}
@@ -479,7 +490,7 @@
% the acronym definition in the |.aux| file, so that the acronym
% exception is available at the next run from start-up.
%
-% When using \cmd{\iac} and \cmd{\Iac} without first defining an
+% When using \cmd{\iac} and \cmd{\Iac} without first defining an
% article, the default article is ``a''.
%
% \subsubsection{Non standard and foreign plural forms}
@@ -538,7 +549,7 @@
% exception is available at the next run from start-up. When the
% optional short form is not provided, the acronym name plus an `s'
% is used.
-%
+%
% Plural exceptions are never reported in tables of acronyms.
%
%
@@ -682,8 +693,8 @@ blocks to be tested separately. The latter are commonly indicated as
% First we test that we got the right format and name the package.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
-\ProvidesPackage{acronym}[2020/04/17
- v1.47
+\ProvidesPackage{acronym}[2024/03/30
+ v1.49
Support for acronyms (Tobias Oetiker)]
\RequirePackage{suffix,xstring}
% \end{macrocode}
@@ -706,7 +717,7 @@ blocks to be tested separately. The latter are commonly indicated as
% \end{macro}
%
% \begin{macro}{\ifAC@nohyperlinks}
-% If hyperref is loaded, all acronyms will link to their glossary entry.
+% If hyperref is loaded, all acronyms will link to their glossary entry and the glossary entries to the first in-text use.
% With the option |nohyperlinks| these links can be suppressed.
% \begin{macrocode}
\newif\ifAC@nohyperlinks
@@ -717,6 +728,18 @@ blocks to be tested separately. The latter are commonly indicated as
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\ifAC@noforwardlinks}
+% If hyperref is loaded and the |nohyperlinks| option is not selected,
+% the option |noforwardlinks| suppresses the links from the glossary entries to the in-text use.
+% \begin{macrocode}
+\newif\ifAC@noforwardlinks
+\AC@noforwardlinksfalse
+% \end{macrocode}
+% \begin{macrocode}
+\DeclareOption{noforwardlinks}{\AC@noforwardlinkstrue}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\ifAC@noacroprefix}
% With the |noacroprefix| option the acronym commands are not prefixed. This
% reproduces the old behavior of version <1.43, but can cause collisions
@@ -852,7 +875,7 @@ blocks to be tested separately. The latter are commonly indicated as
% is being set to the maximum. Otherwise, the default penalty is one level below
% the maximum, meaning that most of the times, by default, the line will not get
% broken.
-%
+%
% \begin{macrocode}
\ifAC@nolinebreak
\def\AC@linebreakpenalty{4}
@@ -889,7 +912,7 @@ blocks to be tested separately. The latter are commonly indicated as
\AtBeginDocument{%
\@ifpackageloaded{hyperref}
{\let\AC@hyperlink=\hyperlink
- \let\AC@hyperref=\hyperref
+ \ifAC@noforwardlinks\else\let\AC@hyperref=\hyperref\fi
\newcommand*\AC@raisedhypertarget[2]{%
\Hy@raisedlink{\hypertarget{#1}{}}#2}%
\let\AC@hypertarget=\AC@raisedhypertarget
@@ -959,6 +982,8 @@ blocks to be tested separately. The latter are commonly indicated as
\def\Acp#1{\AChy@call{#1}\@Acp}%
\def\acfi#1{\AChy@call{#1}\AChy@acf}%
\def\Acfi#1{\AChy@call{#1}\AChy@Acf}%
+ \def\acfip#1{\AChy@call{#1}\AChy@acfp}%
+ \def\Acfip#1{\AChy@call{#1}\AChy@Acfp}%
\let\acsu\acs
\let\aclu\acl
\let\Aclu\Acl
@@ -1078,13 +1103,20 @@ blocks to be tested separately. The latter are commonly indicated as
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\@firstupper}
+% \begin{macro}{\@firstupper,\@firstupper@maybe}
% Internal commands for making a first letter upper case.
% \begin{macrocode}
\newcommand{\@firstupper}[1]{%
\StrSplit{#1}{1}{\head}{\tail}%
\MakeUppercase\head\tail%
}
+\newcommand{\@firstupper@maybe}{%
+ \ifAC@upper
+ \expandafter\@firstupper
+ \else
+ \expandafter\@firstofone
+ \fi
+}
% \end{macrocode}
% \end{macro}
%
@@ -1153,7 +1185,7 @@ blocks to be tested separately. The latter are commonly indicated as
%
%
% \begin{environment}{AC@deflist}
-% In standard mode, the acronym - list is formatted with a description
+% In standard mode, the acronym list is formatted with a description
% environment. If an optional argument is passed to the acronym
% environment, the list is formatted as a AC@deflist, which needs the
% longest appearing acronym as parameter. If the option 'nolist' is selected
@@ -1198,7 +1230,7 @@ blocks to be tested separately. The latter are commonly indicated as
%
% \begin{macro}{\acro}
% Acronyms can be defined with the user command \cmd{\acro}
-% in side the |acronym| environment.
+% inside the |acronym| environment.
%
% \begin{macrocode}
\newenvironment{acronym}[1][1]{%
@@ -1390,7 +1422,7 @@ blocks to be tested separately. The latter are commonly indicated as
\@bsphack
\protected@write\@auxout{}{\string\newacroplural{#1}{#2}}%
\@esphack
-}
+}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1419,11 +1451,11 @@ blocks to be tested separately. The latter are commonly indicated as
{\string\newacroplural{#1}[\string\AC@hyperlink{#1}{\AC@acs{#1}}]{#2}}%
\@esphack
}
-% \end{macrocode}
+% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
-%
+%
%
% \begin{macro}{\AC@aclp}
% \begin{macro}{\AC@Aclp}
@@ -1433,7 +1465,7 @@ blocks to be tested separately. The latter are commonly indicated as
% \begin{macrocode}
\newcommand*\AC@aclp[1]{%
\ifcsname fn@#1@PL\endcsname
- \csname fn@#1@PL\endcsname
+ \@firstupper@maybe{\csname fn@#1@PL\endcsname}%
\else
\AC@acl{#1}s%
\fi
@@ -1492,11 +1524,7 @@ blocks to be tested separately. The latter are commonly indicated as
\PackageWarning{acronym}{Acronym `#3' is not defined}%
\textbf{#3!}%
\else
- \ifAC@upper
- \@firstupper{\expandafter#2#1}%
- \else
- \expandafter#2#1%
- \fi
+ \@firstupper@maybe{\expandafter#2#1}%
\fi
}
% \end{macrocode}
@@ -1542,7 +1570,7 @@ blocks to be tested separately. The latter are commonly indicated as
% \end{macrocode}
% \begin{macrocode}
\newcommand*{\@acs}[1]{%
- \acsfont{\AC@acs{#1}}%
+ \acsfont{\AC@placelabel@part{#1}\AC@acs{#1}}%
%% having a footnote on acs sort of defeats the purpose
%% \ifAC@footnote
%% \footnote{\AC@acl{#1}{}}%
@@ -1569,12 +1597,12 @@ blocks to be tested separately. The latter are commonly indicated as
% \end{macrocode}
% \begin{macrocode}
\newcommand*{\@acl}[1]{%
- \AC@acl{#1}%
+ \AC@placelabel@part{#1}\AC@acl{#1}%
\ifAC@starred\else\AC@logged{#1}\fi}
% \end{macrocode}
% \begin{macrocode}
\newcommand*{\@Acl}[1]{%
- \AC@Acl{#1}%
+ \AC@placelabel@part{#1}\AC@Acl{#1}%
\ifAC@starred\else\AC@logged{#1}\fi}
% \end{macrocode}
% \end{macro}
@@ -1657,6 +1685,12 @@ blocks to be tested separately. The latter are commonly indicated as
\let\AC@undonewlabel\@gobble
\fi
}%
+\newcommand*\AC@placelabel@part[1]{%
+ \expandafter\ifx\csname AC@\AC@prefix#1\endcsname\AC@used
+ \else
+ {\AC@phantomsection\@verridelabel{acro:#1}}%
+ \fi
+}%
\newcommand*\AC@placelabel[1]{%
\expandafter\ifx\csname AC@\AC@prefix#1\endcsname\AC@used
\else
@@ -1802,12 +1836,12 @@ blocks to be tested separately. The latter are commonly indicated as
\newcommand*{\@iaci}[1]{%
\ifcsname fn@#1@IL\endcsname
\ifAC@dua
- \csname fn@#1@IL\endcsname%
+ \@firstupper@maybe{\csname fn@#1@IL\endcsname}%
\else
\expandafter\ifx\csname AC@\AC@prefix#1\endcsname\AC@used%
\csname fn@#1@IS\endcsname%
\else
- \csname fn@#1@IL\endcsname%
+ \@firstupper@maybe{\csname fn@#1@IL\endcsname}%
\fi
\fi
\else
@@ -1846,7 +1880,7 @@ blocks to be tested separately. The latter are commonly indicated as
% \end{macrocode}
% \begin{macrocode}
\newcommand*{\@acsp}[1]{%
- \acsfont{\AC@acsp{#1}}%
+ \acsfont{\AC@placelabel@part{#1}\AC@acsp{#1}}%
\ifAC@starred\else\AC@logged{#1}\fi}
% \end{macrocode}
% \end{macro}
@@ -1869,12 +1903,12 @@ blocks to be tested separately. The latter are commonly indicated as
% \end{macrocode}
% \begin{macrocode}
\newcommand*{\@aclp}[1]{%
- \AC@aclp{#1}%
+ \AC@placelabel@part{#1}\AC@aclp{#1}%
\ifAC@starred\else\AC@logged{#1}\fi}
% \end{macrocode}
% \begin{macrocode}
\newcommand*{\@Aclp}[1]{%
- \AC@Aclp{#1}%
+ \AC@placelabel@part{#1}\AC@Aclp{#1}%
\ifAC@starred\else\AC@logged{#1}\fi}
% \end{macrocode}
% \end{macro}
@@ -2038,6 +2072,53 @@ blocks to be tested separately. The latter are commonly indicated as
% \end{macro}
% \end{macro}
%
+%
+% \begin{macro}{\acfip}
+% \begin{macro}{\acfipa}
+% \begin{macro}{\Acfip}
+% \begin{macro}{\Acfipa}
+% The plural of the full name is printed in italics and the plural of
+% the acronym is printed in upshape.
+% The optional variable determines the penalty for a line break.
+% \begin{macrocode}
+\newcommand*{\acfip}{\AC@starredfalse\protect\acfipa}%
+\WithSuffix\newcommand\acfip*{\AC@starredtrue\protect\acfipa}%
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand*{\Acfip}{\AC@starredfalse\protect\Acfipa}%
+\WithSuffix\newcommand\Acfip*{\AC@starredtrue\protect\Acfipa}%
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand{\acfipa}[2][\AC@linebreakpenalty]{%
+ \texorpdfstring{\protect\@acfip[#1]{#2}}{{\AC@aclp{#2}} (#2)}}
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand{\Acfipa}[2][\AC@linebreakpenalty]{%
+ \texorpdfstring{\protect\@Acfip[#1]{#2}}{{\AC@Aclp{#2}} (#2)}}
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand*{\@acfip}[2][\AC@linebreakpenalty]{%
+ \acffont{%
+ \AC@placelabel{#2}{\itshape\AC@aclp{#2}}%
+ \nolinebreak[#1] %
+ \acfsfont{(\acsfont{\AC@acsp{#2}})}%
+ }%
+ \ifAC@starred\else\AC@logged{#2}\fi}
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand*{\@Acfip}[2][\AC@linebreakpenalty]{%
+ \acffont{%
+ \AC@placelabel{#2}{\itshape\AC@Aclp{#2}}%
+ \nolinebreak[#1] %
+ \acfsfont{(\acsfont{\AC@acsp{#2}})}%
+ }%
+ \ifAC@starred\else\AC@logged{#2}\fi}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
% \begin{macro}{\acused}
% Marks the acronym as used. Don't confuse this with
% \cmd{\acronymused}!
diff --git a/macros/latex/contrib/acronym/acronym.ins b/macros/latex/contrib/acronym/acronym.ins
index 9dc36c5ac1..960366ec2f 100644
--- a/macros/latex/contrib/acronym/acronym.ins
+++ b/macros/latex/contrib/acronym/acronym.ins
@@ -4,7 +4,7 @@
%% driver files from the doc files in this package when run through
%% LaTeX or TeX.
%%
-%% Copyright 1995--2020 by Tobias Oetiker (tobi@oetiker.ch)
+%% Copyright 1995--2021 by Tobias Oetiker (tobi@oetiker.ch)
%% and individual authors listed elsewhere
%% in this file.
%% All rights reserved.
@@ -31,7 +31,7 @@
\keepsilent
\preamble
- Copyright 1995--2020 by Tobias Oetiker (tobi@oetiker.ch)
+ Copyright 1995--2021 by Tobias Oetiker (tobi@oetiker.ch)
and individual authors listed elsewhere.
All rights reserved.
diff --git a/macros/latex/contrib/acronym/acronym.pdf b/macros/latex/contrib/acronym/acronym.pdf
index b65f18794c..2ab4152571 100644
--- a/macros/latex/contrib/acronym/acronym.pdf
+++ b/macros/latex/contrib/acronym/acronym.pdf
Binary files differ
diff --git a/macros/latex/contrib/animate/ChangeLog b/macros/latex/contrib/animate/ChangeLog
index 237adc19ac..4faf3429d7 100644
--- a/macros/latex/contrib/animate/ChangeLog
+++ b/macros/latex/contrib/animate/ChangeLog
@@ -1,3 +1,13 @@
+2024-09-17
+ * change: `method=widget' now default for extended range of supporting viewers
+ * fix: documentation revised
+
+2024-09-06
+ * fix: documentation PDF re-compiled and minor README additions
+
+2024-09-05
+ * new: animation support in PDF.js, version 4.4.168+
+
2023-06-18
* fix: missing file `pstmetronome.tex' added
@@ -51,10 +61,10 @@
* fix: pausing on the 0th frame
2020-08-29
- * new: \multiframebreak for terminating \multiframe loop
+ * new: \multiframebreak for terminating \multiframe loop
2020-08-04
- * fix: typesetting failure with `latex-dev'
+ * fix: typesetting failure with `latex-dev'
2020-05-29
* fix: `autoplay' option non-functional in combination with `poster=last';
@@ -225,12 +235,12 @@
* fix: bug related to XObject referencing
2016-03-11
- * new: now uses pdfbase.sty for low level PDF operations
+ * new: now uses pdfbase.sty for low level PDF operations
2016-02-28
* Fix: workaround for bug http://tex.stackexchange.com/q/295715 : different
behaviour of AR versions with regard to PageOpen and PageVisible events
- where animation initialisation takes place
+ where animation initialisation takes place
2016-02-15
* Fix: bug http://tex.stackexchange.com/q/292805
@@ -448,7 +458,7 @@
* New: the transparency stack can now be cleared using `c' in the
timeline file
* improved documentation of the timeline option
- * New animateinline example (Lorenz Attractor)
+ * New animateinline example (Lorenz Attractor)
* Fix: animfp.sty: trailing zeros are now removed from the fractional part
of the result of the addition of two reals
diff --git a/macros/latex/contrib/animate/README.md b/macros/latex/contrib/animate/README.md
index 1756bd8cd5..0c52e149fa 100644
--- a/macros/latex/contrib/animate/README.md
+++ b/macros/latex/contrib/animate/README.md
@@ -10,11 +10,13 @@ This package provides an interface to create portable, JavaScript driven PDF and
It supports the usual PDF making workflows, i. e. pdfLaTeX, LaTeX &rArr; `dvips` &rArr; `ps2pdf` (Ghostscript)/Distiller, (Xe)LaTeX &rArr; `(x)dvipdfmx`, LuaLaTeX, and LaTeX &rArr; `dvisvgm` for SVG.
-The resulting PDF with animations can be viewed in Acrobat Reader (except on mobile devices), KDE Okular, PDF-XChange and Foxit Reader. Animated SVG are self-contained files that can be embedded into HTML using the `<object>` tag or opened directly in a Web browser, such as Firefox or Chromium.
+The resulting PDF with animations can be viewed in Acrobat Reader (except on mobile devices), KDE Okular, PDF-XChange, Foxit Reader, PDF.js (Firefox' built-in PDF viewer and extension for Chromium-based browsers).
+
+Animated SVG are self-contained files that can be embedded into HTML using the `<object>` tag or opened directly in a Web browser, such as Firefox or Chromium.
Note, this file only gives a summary of usage and available package and command options. Please refer to the documentation [`animate.pdf`](animate.pdf) for details and examples.
-*Keywords:* include portable PDF animation SVG animation animated PDF animated SVG dvisvgm html TeX4ht web animating embed animated graphics LaTeX pdfLaTeX LuaLaTeX PSTricks pgf TikZ LaTeX-picture MetaPost inline graphics vector graphics animated GIF LaTeX dvips ps2pdf dvipdfmx XeLaTeX JavaScript Acrobat Reader KDE Okular PDF-XChange Foxit Reader Firefox Chrome Chromium
+*Keywords:* include portable PDF animation SVG animation animated PDF animated SVG dvisvgm html TeX4ht web animating embed animated graphics LaTeX pdfLaTeX LuaLaTeX PSTricks pgf TikZ LaTeX-picture MetaPost inline graphics vector graphics animated GIF LaTeX dvips ps2pdf dvipdfmx XeLaTeX JavaScript Acrobat Reader KDE Okular PDF-XChange Foxit Reader PDF.js Firefox Chrome Chromium
## Usage
@@ -97,7 +99,7 @@ Recent versions of
- Ghostscript or Adobe Distiller
- dvipdfmx
- dvisvgm
-- PDF: Acrobat Reader, KDE Okular, PDF-XChange, Foxit Reader
+- PDF: Acrobat Reader, KDE Okular, PDF-XChange, Foxit Reader, PDF.js, Firefox
- SVG: Blink-based web browsers (Chromium, Chrome, Opera, ...) or Firefox
## Installation
diff --git a/macros/latex/contrib/animate/animate.pdf b/macros/latex/contrib/animate/animate.pdf
index 518115d6af..a117175261 100644
--- a/macros/latex/contrib/animate/animate.pdf
+++ b/macros/latex/contrib/animate/animate.pdf
Binary files differ
diff --git a/macros/latex/contrib/animate/animate.sty b/macros/latex/contrib/animate/animate.sty
index fc126ce70a..08dbf8a881 100644
--- a/macros/latex/contrib/animate/animate.sty
+++ b/macros/latex/contrib/animate/animate.sty
@@ -13,7 +13,7 @@
\NeedsTeXFormat{LaTeX2e}[2022-06-01]
-\def\@anim@version{2023/06/18}
+\def\@anim@version{2024/09/17}
\ProvidesPackage{animate}
[\@anim@version\space PDF & SVG animations from files and inline graphics]
@@ -530,6 +530,7 @@
/Subtype/Widget%
/F 2%
/FT/Btn/Ff 65537%
+ /A <</S/ResetForm>>% to make pdf.js happy
/BS <</W 0>>%
/AP <</N \@anim@framexform>>%
/MK <</TP 1/I \@anim@framexform%
@@ -562,6 +563,7 @@
/Subtype/Widget%
\@anim@annotflag%
/FT/Btn/Ff 65537%
+ /A <</S/ResetForm>>%
/BS <</W 0>>%
/AP <</N \@anim@framexform>>%
/MK <</TP 1/I \@anim@framexform%
@@ -2072,6 +2074,8 @@
\@anim@tooltip%
\if@anim@js%
/AA <</D <</S/JavaScript/JS (\@anim@btnJS{#1}{\@anim@arg})>>>>%
+ \else%
+ /A <</S/ResetForm>>%
\fi%
}%
\if@anim@js%
@@ -3347,7 +3351,8 @@
\setboolean{@anim@@draft}{false}%
}
\newboolean{@anim@@nomouse}
-\def\@anim@@method{\z@}%default animation method is `icon'
+%\def\@anim@@method{\z@}%default animation method is `icon'
+\def\@anim@@method{\@ne}%default animation method is `widget'
\def\@anim@@ftype{}% file type (extension) of graphics
\ExplSyntaxOn
diff --git a/macros/latex/contrib/animate/animate.tex b/macros/latex/contrib/animate/animate.tex
index cc952856e7..9cc30bf2eb 100644
--- a/macros/latex/contrib/animate/animate.tex
+++ b/macros/latex/contrib/animate/animate.tex
@@ -62,7 +62,7 @@
{\itshape\normalsize}}
\makeatother
-\def\keywords{include portable PDF animation SVG animation animated PDF animated SVG dvisvgm html TeX4ht web animating embed animated graphics LaTeX pdfLaTeX LuaLaTeX PSTricks pgf TikZ LaTeX-picture MetaPost inline graphics vector graphics animated GIF LaTeX dvips ps2pdf dvipdfmx XeLaTeX JavaScript Acrobat Reader KDE Okular PDF-XChange Foxit Reader Firefox Chrome Chromium}
+\def\keywords{include portable PDF animation SVG animation animated PDF animated SVG dvisvgm html TeX4ht Web animating embed animated graphics LaTeX pdfLaTeX LuaLaTeX PSTricks pgf TikZ LaTeX-picture MetaPost inline graphics vector graphics animated GIF LaTeX dvips ps2pdf dvipdfmx XeLaTeX JavaScript Acrobat Reader KDE Okular PDF-XChange Foxit Reader PDF.js Firefox Chrome Chromium}
\hypersetup{
pdftitle={The animate Package},
pdfsubject={Documentation},
@@ -94,7 +94,7 @@
\def\@anim@sanitizeColon{}\def\@anim@sanitizeJS{}\def\@anim@endsanitize{}
\expandafter\parsedate\animVersion\relax %set current date to package date
\makeatother
-\author{Alexander Grahn \animategraphics[autoplay,loop,height=1.8ex,nomouse]{8}{bye_}{0}{3}\protect\footnote{Animated GIF taken from \href{http://www.phpBB.com}{phpBB} forum software and burst into a set of EPS files using \href{http://www.imagemagick.org}{ImageMagick} before embedding.}%
+\author{Alexander Grahn \animategraphics[autoplay,loop,height=1.8ex,nomouse]{8}{bye_}{0}{3}\protect\footnote{Animated GIF taken from \href{http://www.phpBB.com}{phpBB} forum software and burst into a set of EPS files using \href{http://www.imagemagick.org}{ImageMagick} before embedding.}% \protect\footnote{Animation examples in this document have all been built with the `\texttt{method=widget}' option to make them work in PDF.js, Mozilla's PDF viewer built into the Firefox Web browser.}%
%\space\protect\footnote{Animations may run slowly if viewed in the Acrobat Reader browser plugin.}%
\\[1ex]\url{https://gitlab.com/agrahn/animate}}
\maketitle
@@ -111,12 +111,32 @@
\tableofcontents
%\newpage
-\section{Introduction}
+\section{Introduction}\label{sect:intro}
This package provides an interface for creating PDF and SVG files with animated content from sets of graphics or image files, from inline graphics, such as \LaTeX-picture, PSTricks or pgf/TikZ generated pictures, or just from typeset text. Unlike standard movie/video formats, package `animate' allows for animating vector graphics. The result is roughly similar to the SWF (Flash) format, although not as space-efficient.
Package `animate' supports the usual workflows for making PDF, i.\,e. pdf\LaTeX{}, Lua\-\LaTeX{}, \LaTeX{} $\rightarrow$ \verb+dvips+ $\rightarrow$ \verb+ps2pdf+/Distiller and \pXepLaTeX{} $\rightarrow$ \verb+(x)dvipdfmx+. For animated SVG, it supports the \verb+dvisvgm+ driver. The DVI/XDV used as input for \verb+dvisvgm+ can be generated with \LaTeX{}, Lua\LaTeX{} (in DVI mode with command `\verb+dvilualatex+') and \XeLaTeX{} (with option `\verb+--no-pdf+').
-PDF files with animations can be viewed in Acrobat Reader (except on mobile devices), KDE Okular, PDF-XChange and Foxit Reader.
+PDF files with animations can be viewed in Acrobat Reader (except on mobile devices), KDE Okular, PDF-XChange, Foxit Reader, PDF.js (Firefox' built-in PDF viewer and extension for Chromium-based Web browsers). To view a local PDF file in the Web browser, open it by right-click in a file explorer or by starting the Web browser on the command-line, passing the PDF file name as its argument. The full-screen mode, also known as Presentation Mode in PDF.js, can be reached via the \raisebox{0.5\depth}{{\fboxsep=3pt\colorbox{lightgray}{\texttt{\large>>}}}} button at the right end of the toolbar. The PDF.js extension for Chromium/Chrome/Edge can be installed from
+
+\makebox[\linewidth][l]{\href{https://chromewebstore.google.com/detail/pdf-viewer/oemmndcbldboiebfnladdacbdfmadadm}{\nolinkurl{https://chromewebstore.google.com/detail/pdf-viewer/}}}\\
+\makebox[\linewidth][r]{\href{https://chromewebstore.google.com/detail/pdf-viewer/oemmndcbldboiebfnladdacbdfmadadm}{\nolinkurl{oemmndcbldboiebfnladdacbdfmadadm}}}
+
+For animations to play in the Chromium extension, JavaScript needs to be enabled in the settings:
+
+\makebox[\linewidth][l]{\url{chrome://extensions/?id=oemmndcbldboiebfnladdacbdfmadadm} $\rightarrow$}\\
+\makebox[\linewidth][r]{Extension options $\rightarrow$ Enable active content (JavaScript) in PDFs}
+
+Viewing of local files also needs to be enabled in Chromium-based browsers:
+
+\makebox[\linewidth][l]{\url{chrome://extensions/?id=oemmndcbldboiebfnladdacbdfmadadm} $\rightarrow$}\\
+\makebox[\linewidth][r]{Allow access to file URLs}
+
+%Note that option `\texttt{method=widget}' must be set to produce animations that are compatible with PDF.js.
+%PDF files with animations can be viewed in Acrobat Reader (except on mobile devices), KDE Okular, PDF-XChange, Foxit Reader, PDF.js (as Firefox built-in PDF viewer, or in other Web browsers via URL). The most recent release of PDF.js can be accessed online in a Web browser (Firefox, Chromium, Chrome, Edge, ...) via the following URL:
+%
+%\url{https://mozilla.github.io/pdf.js/web/viewer.html?file=}
+%
+%Then, to open a local PDF file in PDF.js, click \raisebox{0.5\depth}{{\fboxsep=3pt\colorbox{lightgray}{\texttt{\large>>}}}} at the right end of its tool bar. In the `Tools' menu, click on `Open'. Note that option `\texttt{method=widget}' must be set to produce animations that are compatible with PDF.js.
Animated SVG produced by means of \LaTeX{} and \verb+dvisvgm+ are self-sufficient files that can be embedded into HTML using the \verb+<object>+ tag or opened directly in a Web browser, such as Chromium or Firefox. Also, presentations, such as `beamer'-class documents, with embedded animations can be exported to SVG instead of PDF and viewed in a Web browser. SVG-capable Web browsers are standard on many platforms and operating systems and thus make SVG a very portable file format. A \LaTeX{} package for embedding video and audio into SVG is also available\cite{media4svg}.
@@ -131,16 +151,15 @@ The user interacts with the animation through optional animation controls or usi
\item pdf\TeX{}, version $\ge1.40$, or Lua\TeX{}, version $\ge0.95$, for direct PDF output
\item Ghostscript, version $\ge9.15$, or Adobe Distiller for PS to PDF conversion
\item \verb+dvipdfmx+ for DVI to PDF conversion
-\item dvipdfmx, version $\ge 20190503$, for DVI to PDF conversion
-\item \verb+dvisvgm+ for DVI to SVG conversion (also requires Ghostscript)
-\item PDF: Acrobat Reader, KDE Okular, PDF-XChange, Foxit Reader
+\item \verb+dvisvgm+ for DVI to SVG conversion (also requires Ghostscript and MuPDF)
+\item PDF: Acrobat Reader, KDE Okular, PDF-XChange, Foxit Reader, Firefox, version $\ge130$, PDF.js, version $\ge4.4.168$
\item SVG: Chromium-based browsers for best performance
\end{trivlist}
\section{Installation}
Unzip the file \href{http://mirrors.ctan.org/install/macros/latex/contrib/animate.tds.zip}{`animate.tds.zip'} into the local TDS root directory which can be found by running `\verb+kpsewhich -var-value TEXMFLOCAL+' on the command line.
-After installation, update the filename database by running `\verb+texhash+' on the command line.
+After installation, update the file name database by running `\verb+texhash+' on the command line.
\TeX-Live and MiK\TeX{} users should run the package manager of their system for installation.
@@ -388,11 +407,11 @@ With `\verb+draft+' the animation is not embedded. Instead, a box with the exact
\begin{verbatim}
nomouse
\end{verbatim}
-Animation widget will not respond to mouse clicks. Unless the JavaScript interface, Sect.~\ref{sect:api}, p.~\pageref{sect:api}, is used to control the animation, it is recommended to also set at least one of the `\verb+autoplay+' or `\verb+controls+' options.
+Animation widget will not respond to mouse clicks. Unless the JavaScript interface, Section~\ref{sect:api}, p.~\pageref{sect:api}, is used to control the animation, it is recommended to also set at least one of the `\verb+autoplay+' or `\verb+controls+' options.
\begin{verbatim}
method=icon | widget | ocg
-\end{verbatim}
-The package implements three different animation methods. The `\verb+icon+' method is the default method and usually gives the best performance in terms of animation frame rate. `\verb+widget+' and `\verb+ocg+' are alternative animation methods. In rare cases (standalone animations without animation controls) method `\verb+ocg+' may lead to a better animation performance than the other two. Moreover, it allows overlaying animations with other typeset material, that is, playing animations in the page background.
+\end{verbatim}\hypertarget{method}{}%
+The package implements three different animation methods. The `\verb+icon+' method usually gives the best performance in terms of animation frame rate in Acrobat Reader. However, the `\verb+widget+' method is now set by default because it extends the range of supporting viewers. Beginning with version 130, Firefox renders functional animations too. The PDF viewer bundled with Firefox, PDF.js, is also available as an extension for Chrome and releated browsers, see Section~\ref{sect:intro}. In rare cases, such as standalone animations without animation controls, the alternative `\verb+ocg+' method may lead to a better animation performance than the other two. Also, `\verb+ocg+' allows an animation to be overlaid with other typeset material, that is, it can play in the page background. However, support is limited to Acrobat Reader and Okular.
\begin{verbatim}
measure
\end{verbatim}
@@ -468,7 +487,7 @@ frame No. & timeline file & transparency stack\\\hline\hline
\end{tabular}
\end{table}
-Figures~\ref{fig:taylor} and \ref{fig:lorenz} in Sect.~\ref{sect:examples} are animation examples with a single transparency stack.
+Figures~\ref{fig:taylor} and \ref{fig:lorenz} in Section~\ref{sect:examples} are animation examples with a single transparency stack.
\myparagraph*{Grouping objects into layers (= sub-stacks) using `{\tt;}'}
Due to the stack-like nature of the animation, the position of a transparency specification in the timeline file determines its \emph{depth} level in relation to other transparencies. The timeline file is processed line by line and from left to right. In a single-stack animation, the stack is strictly built from the bottom up, such that earlier transparencies are overprinted by more recent ones. This may turn out to be inconvenient in certain situations. For example, it might be desirable to change the background image in the middle of an animation without affecting objects that are located in the foreground. For this purpose, transparency specifications can be grouped into layers (sub-stacks) using the semicolon (\verb+;+) as a separator. New transparencies can now be put on top of the individual sub-stacks. After a line of the timeline file has been processed, the global stack is built by placing the sub-stacks on top of the other. Again, the left-to-right rule applies when determining the height of the sub-stacks in relation to each other within the global stack.
@@ -505,7 +524,7 @@ frame No. & timeline file & transparency stack\\\hline\hline
%
%Note that \emph{without} setting up two layers, that is, by replacing the semicolons with commas, the foreground objects (transparencies 2 through 99) which have been added during the first 49 frames would be overprinted by the new background image, transparency 1, from frame 50 onward.
-See the second animation, Fig.~\ref{fig:scarab}, in Sect.~\ref{sect:examples} for a working example that makes use of the timeline and the layer concept.
+See the second animation, Fig.~\ref{fig:scarab}, in Section~\ref{sect:examples} for a working example that makes use of the timeline and the layer concept.
\myparagraph*{Associate JavaScript actions with animation frames}\label{sect:jsfield}
The optional fourth field \verb+<JavaScript>+ in a frame specification takes JavaScript code to be executed upon display of that frame. This could be used, for instance, to play a sound that was embedded using the `media9' \LaTeX{} package \cite{media9} or to execute JavaScript methods of the animation object. A non-trivial example is looping over a sub-range of frames which can be programmed by setting the `\verb+frameNum+' property of the animation object. See Section~\ref{sect:api} for details of the animation programming interface.
@@ -601,7 +620,7 @@ Also, the programming interface can be used to create custom buttons for playbac
]{\fbox{Goto 6th frame}}
\end{lstlisting}
-\clearpage
+%\clearpage
\section{Examples}
\subsection{Animations from sets of files, using {\tt\textbackslash animategraphics}}\label{sect:examples}
Animations in this section are made from graphics files that were prepared with \MP. Run `\verb+mpost --tex=latex+' on the files ending in `.mp' in the `files' directory to generate the graphics files. Both examples make use of the `\verb+timeline+' option to reduce the resulting PDF file size.
@@ -1375,7 +1394,7 @@ The following code may serve as a template for generating standalone animated SV
%
\end{document}
\end{lstlisting}
-Note that when animating external graphics with \verb+\animategraphics+, only PDF and PostScript (EPS, PS, MPS) files are converted to inline SVG code; files in other formats (SVG, PNG, JPEG) remain external and must be bundled with the final SVG output. Thus, for obtaining self-contained SVG, it is recommended to convert PNG, JPEG and SVG files to PDF or PostScript first. Also note that PostScript files must have all required fonts embedded. This is not always the case for \MP-generated PostScript. Here, embedding of fonts is ensured by putting `\verb+prologues := 3;+' into the header of the \MP{} input.
+Note that when animating external graphics with \verb+\animategraphics+, only PDF and PostScript (EPS, PS, MPS) files are converted to inline SVG code; files in other formats (SVG, PNG, JPEG) remain external and must be bundled with the final SVG output. Thus, for obtaining self-contained SVG, it is recommended to convert PNG, JPEG and SVG files to PostScript or PDF first. Also note that PostScript files must have all required fonts embedded. This is not always the case for \MP-generated PostScript. Here, embedding of fonts is ensured by putting `\verb+prologues := 3;+' into the header of the \MP{} input. If PDF is chosen as file format for input graphics, the conversion utility `\verb+mutool+' must be present on the system. It is installed as part of the MuPDF (\url{https://mupdf.com}) package.
Use one of
\begin{verbatim}
@@ -1469,7 +1488,7 @@ In \TeX4ht documents, the whole \verb+<object>...</object>+ tag can be inserted
\item PDFs with animations cannot be embedded (via {\tt\string\includegraphics},\\ {\tt\string\includepdf}) into other documents as the animation capability gets lost.
- \item Animations should not be placed on \emph{multilayered} slides, also known as overlays, created with presentation making classes such as Beamer or Powerdot. Those document classes turn overlays into separate PDF pages and re-insert the animation on every page thus produced. The animations are independent from each other and do not share the current playing state, such as frame number, playing speed and direction. Therefore, put animations on flat slides only; slides without animations may still have overlays, of course. On \href{https://tex.stackexchange.com/a/385209}{\TeX.SE}~\cite{texsx}, a method is suggested for placing an animation on a slide with overlays. It makes use of the programming interface introduced in Sect.~\ref{sect:api}, p.~\pageref{sect:api}.
+ \item Animations should not be placed on \emph{multilayered} slides, also known as overlays, created with presentation making classes such as Beamer or Powerdot. Those document classes turn overlays into separate PDF pages and re-insert the animation on every page thus produced. The animations are independent from each other and do not share the current playing state, such as frame number, playing speed and direction. Therefore, put animations on flat slides only; slides without animations may still have overlays, of course. On \href{https://tex.stackexchange.com/a/385209}{\TeX.SE}~\cite{texsx}, a method is suggested for placing an animation on a slide with overlays. It makes use of the programming interface introduced in Section~\ref{sect:api}, p.~\pageref{sect:api}.
\end{itemize}
\section{Acknowledgements}
@@ -1477,14 +1496,14 @@ I would like to thank François Lafont who discovered quite a few bugs and made
%\enlargethispage{4ex}
\begin{thebibliography}{8}
-\bibitem{chupin} Chupin, M.: \emph{Syracuse MetaPost/Animations.} URL: \href{http://melusine.eu.org/syracuse/metapost/animations/chupin/?idsec=scara}{\texttt{http://melusine.eu.org/}} \href{http://melusine.eu.org/syracuse/metapost/animations/chupin/?idsec=scara}{\texttt{syracuse/metapost/animations/chupin/?idsec=scara}}
+\bibitem{chupin} Chupin, M.: \emph{Syracuse MetaPost/Animations.} URL: \href{http://melusine.eu.org/syracuse/metapost/animations/chupin/?idsec=scara}{\nolinkurl{http://melusine.eu.org/}} \href{http://melusine.eu.org/syracuse/metapost/animations/chupin/?idsec=scara}{\nolinkurl{syracuse/metapost/animations/chupin/?idsec=scara}}
\bibitem{dvisvgm} \emph{dvisvgm: A fast DVI to SVG converter} URL: \url{http://dvisvgm.de}
\bibitem{gilg05} Gilg, J.: PDF-Animationen. In: \emph{Die \TeX nische Kom\"odie}, Issue 4, 2005, pp.~30--37
\bibitem{hol} Holeček, J.; Sojka, P.: Animations in pdf\TeX-generated PDF. In: \emph{\TeX, XML, and Digital Typography}, Springer, 2004, pp.~179--191. doi:10.1007/978-3-540-27773-6\textunderscore14
\bibitem{luque12} Luque, M.: \emph{PSTricks : applications.} URL: \url{http://pstricks.blogspot.com}
\bibitem{media4svg} \emph{The media4svg Package}. URL: \url{http://www.ctan.org/pkg/media4svg}
\bibitem{media9} \emph{The media9 Package}. URL: \url{http://www.ctan.org/pkg/media9}
-\bibitem{texsx} \emph{Beamer: animate package and overlay}. URL: \href{https://tex.stackexchange.com/a/385209}{\texttt{https://tex.stackexchange.com}}\\ \href{https://tex.stackexchange.com/a/385209}{\texttt{/a/385209}}
+\bibitem{texsx} \emph{Beamer: animate package and overlay}. URL: \href{https://tex.stackexchange.com/a/385209}{\nolinkurl{https://tex.stackexchange.com}}\\ \href{https://tex.stackexchange.com/a/385209}{\nolinkurl{/a/385209}}
\end{thebibliography}
\end{document}
diff --git a/macros/latex/contrib/animate/files/pstmetronome.tex b/macros/latex/contrib/animate/files/pstmetronome.tex
deleted file mode 100644
index e13bd4a0da..0000000000
--- a/macros/latex/contrib/animate/files/pstmetronome.tex
+++ /dev/null
@@ -1,233 +0,0 @@
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% animated metronome
-% this code is based to 99.9 percent on the work by Manuel Luque
-% (pstricks.blogspot.com)
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\makeatletter
-\pst@addfams{pst-metronome}
-\define@key[psset]{pst-metronome}{theta0}{\def\psk@oscmetronomethetai{#1 }}
-\psset[pst-metronome]{theta0=45} % position initiale du metronome
-\define@key[psset]{pst-metronome}{M}{\def\psk@oscmetronometM{#1 }}
-\psset[pst-metronome]{M=25} % masse du disque en g
-\define@key[psset]{pst-metronome}{m}{\def\psk@oscmetronometm{#1 }}
-\psset[pst-metronome]{m=6} % masse du curseur en g
-\define@key[psset]{pst-metronome}{r}{\def\psk@oscmetronomer{#1 }}
-\psset[pst-metronome]{r=1} % rayon du disque en cm
-\define@key[psset]{pst-metronome}{x}{\def\psk@oscmetronomex{#1 }}
-\psset[pst-metronome]{x=8.4} % position du curseur en cm par rapport à l'axe
-\define@key[psset]{pst-metronome}{d}{\def\psk@oscmetronomed{#1 }}
-\psset[pst-metronome]{d=3.2} % distance de l'axe au centre du disque en cm
-\define@key[psset]{pst-metronome}{dt}{\def\psk@oscmetronomedt{#1 }}
-\psset[pst-metronome]{dt=0.01} % pas pour RK4
-\define@key[psset]{pst-metronome}{nT}{\def\psk@oscmetronomenT{#1 }}
-\psset[pst-metronome]{nT=1} % nombre de périodes représentées
-%---- calculer theta(t) et thetapoint(t) --------
-\def\psmetronome{\pst@object{psmetronome}}
-\def\psmetronome@i{%
-\begingroup%
-\use@par%
- \begin@SpecialObj%
- \pstVerb{%
- /deg2rad {180 div 3.14159 mul} def
- /rad2deg {180 mul 3.14159 div} def
- /gp 9.8 def % pesanteur
- /radius \psk@oscmetronomer 1e-2 mul def % en m
- /OA \psk@oscmetronomed 1e-2 mul def % distance de l'axe au centre du disque en m
- /xC \psk@oscmetronomex 1e-2 mul def % position du curseur en m par rapport à l'axe
- /theta0 \psk@oscmetronomethetai def % en degrés
- /theta0rad theta0 deg2rad def % en radians
- /Md \psk@oscmetronometM 1e-3 mul def % en kg
- /mc \psk@oscmetronometm 1e-3 mul def % en kg
- /dt \psk@oscmetronomedt def
- /nT \psk@oscmetronomenT def
- % moment d'inertie du métronome
- % J=1/2M*R^2+M*a^2+m*x^2
- /Ji {0.5 Md mul radius dup mul mul Md OA dup mul mul add mc xC dup mul mul add} def
- /AT {4
- Ji
- gp Md OA mul mc xC mul sub mul
- div
- sqrt
- mul} def
- % Pour le calcul de la période
- % coefficients de l'approximation polynômiale du calcul
- % de l'intégrale elliptique
-% coefficient pour le calcul de l'intégrale elliptique
- /m0 theta0 2 div sin def
- /m1 {1 m0 dup mul sub} def
- /m2 {m1 dup mul} def
- /m3 {m2 m1 mul} def
- /m4 {m2 dup mul} def
- /m_1 {1 m1 div} def
- /EllipticK {
- 0.5
- 0.12498593597 m1 mul add
- 0.06880248576 m2 mul add
- 0.03328355376 m3 mul add
- 0.00441787012 m4 mul add
- m_1 ln mul
- 1.38629436112 add
- 0.09666344259 m1 mul add
- 0.03590092383 m2 mul add
- 0.03742563713 m3 mul add
- 0.01451196212 m4 mul add
- } def
-/Tm {AT EllipticK mul} def
-% tableau des valeurs de theta(t)
- /W 0 def % vitesse angulaire
- /theta theta0 def
- /oscillateur {sin gp Md OA mul mc xC mul sub mul neg mul Ji div} def
- /j1 {W dt mul} def
- /k1 {theta oscillateur dt mul} def
- /j2 {W k1 2 div add dt mul} def
- /k2 {theta j1 2 div rad2deg add oscillateur dt mul} def
- /j3 {W k2 2 div add dt mul} def
- /k3 {theta j2 2 div rad2deg add oscillateur dt mul} def
- /j4 {W k3 add dt mul} def
- /k4 {theta j3 rad2deg add oscillateur dt mul} def
- /theta2 {theta j1 rad2deg 2 j2 rad2deg j3 rad2deg add mul add j4 rad2deg add 6 div add} def
-/tabTheta [ % pour l'animation
- 0 theta0 % date angle
-dt dt Tm nT mul{ %
- theta2 %
- /W2 W k1 2 k2 k3 add mul add k4 add 6 div add def
- /theta theta2 def
- /W W2 def
- } for
- ] def
-/Nvaleurs tabTheta length 2 div cvi def
- /W 0 def % vitesse angulaire
- /theta theta0 def
-/tabThetaGraph [ % pour le graphique theta(t)
- 0 theta0 % date angle
-0 dt Tm nT mul { % pop
- theta2 % 180 div 3.14159 mul
- /W2 W k1 2 k2 k3 add mul add k4 add 6 div add def
- /theta theta2 def
- /W W2 def
- } for
- ] def
- /W 0 def % vitesse angulaire
- /theta theta0 def
-/tabThetaPoint [ % pour le graphique thetapoint(t)
- 0 0 % date angle
-dt dt Tm nT mul { % pop
-% theta2 % 180 div 3.14159 mul
- /W2 W k1 2 k2 k3 add mul add k4 add 6 div add def
- W2
- /theta theta2 def
- /W W2 def
- } for
- ] def
-/tabXOSC [ % oscillations par min en fonction de x
-0.5 0.1 12 {/xc exch def
- /xC xc 1e-2 mul def
- xc 60 Tm div % cvi
- } for
- ] def
-/tabXbattements [ % battements par min en fonction de x
-3 0.1 12 {/xc exch def
- /xC xc 1e-2 mul def
- xc 60 Tm div 2 mul % cvi
- } for
- ] def
-% graduation T --> x
-/tabXT [ % [T,x]
- 40 1 220 {/batt exch def % battements
- /Tmetronome2 120 batt div dup mul def
- /A1 16 mc mul EllipticK dup mul mul def
- /B1 gp Tmetronome2 mul mc mul def
- /C1 gp Md mul OA mul Tmetronome2 mul neg
- 8 Md mul radius dup mul mul 16 Md mul OA dup mul mul add EllipticK dup mul mul add def
- /Delta B1 dup mul 4 A1 mul C1 mul sub sqrt def
- /xC1 B1 neg Delta sub 2 div A1 div def
- /xC2 B1 neg Delta add 2 div A1 div def
- xC2 0 ge {/posC xC2 def}{/posC xC1 def} ifelse
- batt posC 1e2 mul
- } for
- ] def
-/xT { % pour une valeur particulière battement -> position du curseur
- /batt exch def
- /Tmetronome2 120 batt div dup mul def
- /A1 16 mc mul EllipticK dup mul mul def
- /B1 gp Tmetronome2 mul mc mul def
- /C1 gp Md mul OA mul Tmetronome2 mul neg
- 8 Md mul radius dup mul mul 16 Md mul OA dup mul mul add EllipticK dup mul mul add def
- /Delta B1 dup mul 4 A1 mul C1 mul sub sqrt def
- /xC1 B1 neg Delta sub 2 div A1 div def
- /xC2 B1 neg Delta add 2 div A1 div def
- xC2 0 ge {/posC xC2 def}{/posC xC1 def} ifelse
- posC 1e2 mul
- } def
-/xC \psk@oscmetronomex 1e-2 mul def % position du curseur en m par rapport à l'axe
-/Tm {AT EllipticK mul} def
- }%
- \end@SpecialObj%
-\endgroup}
-%
-\def\psmetronomeA{\pst@object{psmetronomeA}}
-\def\psmetronomeA@i{%
-\begingroup%
-\use@par%
- \begin@SpecialObj%
- \pstVerb{%
- /radius \psk@oscmetronomer 1e-2 mul def % en m
- /OA \psk@oscmetronomed 1e-2 mul def % distance de l'axe au centre du disque en m
- /xC \psk@oscmetronomex 1e-2 mul def % position du curseur en m par rapport à l'axe
- }%
-\psframe[fillstyle=solid](! -0.075 \psk@oscmetronomed neg)(0.075,13)
-\pscircle[fillstyle=solid,fillcolor={[rgb]{0.75 0.75 0.75}}](! 0 \psk@oscmetronomed neg){!radius 1e2 mul}
-\pscircle[fillstyle=solid,linewidth=0.05](0,0){0.15}
-\pscircle*[linecolor=red](0,0){0.05}
-% curseur
-\pspolygon[fillstyle=solid](! -0.25 \psk@oscmetronomex 0.5 sub)(! -0.5 \psk@oscmetronomex 0.5 add)(!-0.075 \psk@oscmetronomex 0.5 add)(!-0.075 \psk@oscmetronomex 0.5 sub)
-\pspolygon[fillstyle=solid](! 0.25 \psk@oscmetronomex 0.5 sub)(! 0.5 \psk@oscmetronomex 0.5 add)(!0.075 \psk@oscmetronomex 0.5 add)(!0.075 \psk@oscmetronomex 0.5 sub)
-\pspolygon[fillstyle=solid,fillcolor=gray](! -0.25 \psk@oscmetronomex 0.5 sub)(! -0.3 \psk@oscmetronomex 0.3 sub)(! -0.075 \psk@oscmetronomex 0.3 sub)(!-0.075 \psk@oscmetronomex 0.3 add)(!0.075 \psk@oscmetronomex 0.3 add)(!0.075 \psk@oscmetronomex 0.3 sub)(!0.3 \psk@oscmetronomex 0.3 sub)(!0.25 \psk@oscmetronomex 0.5 sub)
-\pscircle[fillstyle=solid](!-0.125 \psk@oscmetronomex 0.4 sub){0.08}
-\pscircle[fillstyle=solid](!0.125 \psk@oscmetronomex 0.4 sub){0.08}
-% fin curseur
-{\psset{linecolor=red}
-\psline(!-.1 \psk@oscmetronomex)(!0.1 \psk@oscmetronomex)\psline(!0 \psk@oscmetronomex 0.1 sub)(!0 \psk@oscmetronomex 0.1 add)
-\psline(! -.1 \psk@oscmetronomed neg)(!0.1 \psk@oscmetronomed neg)\psline(! 0 \psk@oscmetronomed neg 0.1 sub)(!0 \psk@oscmetronomed neg 0.1 add)}
-\pnode(!0 \psk@oscmetronomex){C}% curseur
-\pnode(! 0 \psk@oscmetronomed neg){D}% disque
-%\pstextpath[c](0,-2ex){\psarcn[linestyle=none](D){1}{180}{0}}{\small\textsf{\textbf{m e t r o n o m e}}}
-%\pstextpath[c](0,1ex){\psarc[linestyle=none](D){1}{180}{0}}{\small\textsf{\textbf{P S t r i c k s}}}
- \end@SpecialObj%
-\endgroup}
-\psmetronome%
-\pstVerb{/tabTempos [40 42 44 46 48 50 52 54 46 58 60 63 66 69 72 76 80 84 88 92 96 100 104 108 112 116 120 126 132 138 144 152 160 168 176 184 192 200 208] def}%
-
-\def\metronomebody{%
- \pspolygon[fillstyle=solid,linewidth=2\pslinewidth,linearc=0.5,fillcolor=yellow!30](-5,-4.5)(5,-4.5)(1,14)(-1,14)
- \psline(1.2,4.5)(1.2,12.5)
- \psline(-1.2,4.5)(-1.2,12.5)
- \multido{\i=0+2}{20}{%
- \pstVerb{/BATT tabTempos \i\space get def}
- \psline[linecolor=red](!1.2 BATT xT)(!0.7 BATT xT)
- \uput[r](!0.7 BATT xT){\psPrintValue[PSfont=Helvetica,fontscale=6]{BATT}}
- }%
- \multido{\i=1+2}{19}{%
- \pstVerb{/BATT tabTempos \i\space get def}
- \psline[linecolor=red](!-1.2 BATT xT)(!-0.7 BATT xT)
- \uput[r](!-1.3 BATT xT){\psPrintValue[PSfont=Helvetica,fontscale=6]{BATT}}}%
- \rput(!0 40 xT){\textsf{\tiny GRAVE}}%
- \rput(!0 46 xT){\textsf{\tiny LARGO}}%
- \rput(!0 52 xT){\textsf{\tiny LENTO}}%
- \rput(!0 58 xT){\textsf{\tiny ADAGIO}}%
- \rput(!0 60 xT){\textsf{\tiny LARGETTO}}%
- \rput(!0 66 xT){\textsf{\tiny ANDANTE}}%
- \rput(!0 76 xT){\textsf{\tiny ANDANTINO}}%
- \rput(!0 84 xT){\textsf{\tiny MODERATO}}%
- \rput(!0 108 xT){\textsf{\tiny ALLEGRETTO}}%
- \rput(!0 132 xT){\textsf{\tiny ALLEGRO}}%
- \rput(!0 160 xT){\textsf{\tiny VIVACE}}%
- \rput(!0 184 xT){\textsf{\tiny PRESTO}}%
- \rput(!0 200 xT){\textsf{\tiny PRESTISSIMO}}%
-}
-
-\def\pendulum#1{%
- \pstVerb{/iA #1\space def /date tabTheta iA get def /Theta tabTheta iA 1 add get def}%
- \rput{!Theta}{\psmetronomeA}%
-}
-\makeatother
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-edmaths/LICENSE.txt b/macros/latex/contrib/beamer-contrib/themes/beamertheme-edmaths/LICENSE.txt
new file mode 100644
index 0000000000..2244313901
--- /dev/null
+++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-edmaths/LICENSE.txt
@@ -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/beamer-contrib/themes/beamertheme-edmaths/README.md b/macros/latex/contrib/beamer-contrib/themes/beamertheme-edmaths/README.md
new file mode 100644
index 0000000000..c4b213ef28
--- /dev/null
+++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-edmaths/README.md
@@ -0,0 +1,5 @@
+# `beamertheme-edmaths` Beamer Theme
+
+A beamer presentation theme which follows the [university's brand guidelines](https://communications-marketing.ed.ac.uk/marketing/brand). See also the [_documentation_](https://foggalong.github.io/edinburgh-math-latex/beamertheme-edmaths-docs.pdf) and a [_compiled example_](https://foggalong.github.io/edinburgh-math-latex/example-presentation.pdf). To use, place the files and store them either with your .tex file(s) or in any directory that's findable by LaTeX (e.g. `$TEXINPUTS`).
+
+For more information on the wider project, including the report and thesis stylesheet, [see GitHub](https://github.com/Foggalong/edinburgh-math-latex). The beamer theme [beamerthemeedmaths.sty](beamerthemeedmaths.sty) is provided under the [LaTeX Project Public License v1.3c](https://choosealicense.com/licenses/lppl-1.3c/) (LPPL) while the example [example-presentation.tex](example-presentation.tex) is provided under the [BSD Zero Clause License](https://choosealicense.com/licenses/0bsd/) (0BSD).
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-edmaths/beamerthemeedmaths.sty b/macros/latex/contrib/beamer-contrib/themes/beamertheme-edmaths/beamerthemeedmaths.sty
new file mode 100644
index 0000000000..ded67b3d59
--- /dev/null
+++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-edmaths/beamerthemeedmaths.sty
@@ -0,0 +1,167 @@
+%% Package `edmaths' v0.99
+%% File beamerthemeedmaths.sty
+%% Copyright 2024 Josh Fogg
+%%
+%% beamerthemeedmaths.sty is a LaTeX style file for typesetting presentations
+%% for the School of Mathematics at the University of Edinburgh, part of the
+%% more general `edmaths' package. See README.md for usage instructions.
+%%
+%% 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://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' and the current
+%% maintainer of this work is Josh Fogg. Originally written by Saturnino Luz
+%% for the Usher Institute and made generic to UoE by Ben Brown.
+%%
+%% This work consists of the files beamerthemeedmaths.sty, but in addition
+%% requires images `white-tied-in' and `edinburgh-logo' to compile. The images
+%% distributed with this work in the `edmaths' package are registered trademarks;
+%% they are not to be used as part of derived or independent works without the
+%% permission of The University of Edinburgh. This does not affect use as part
+%% of compiled LaTeX documents using this style for the university.
+
+\ProvidesPackage{beamerthemeedmaths}[2024-08-30 Edinburgh maths beamer theme v0.99]
+\RequirePackage{amsfonts,graphicx,lmodern,mathptmx}
+
+% Colour definitions to choose between
+\definecolor{UoEblue}{RGB}{0,50,95} % #00325F
+\definecolor{UoEcyan}{RGB}{69, 126, 129} % #457E81
+\definecolor{UoEgreen}{RGB}{156, 154, 0} % #9C9A00
+\definecolor{UoEgray}{RGB}{.392, .329, .329} % VARIES
+\definecolor{UoEorange}{RGB}{204, 89, 17} % #CC5911
+
+% Define colour command for use through rest of theme
+\newcommand{\beamer@UoE@color}{UoEblue}
+\DeclareOptionBeamer{colour}{\def\beamer@UoE@color{#1}}
+
+% Change title height to fit styling
+\newdimen\beamer@UoE@titleheight
+\beamer@UoE@titleheight=10ex
+\DeclareOptionBeamer{theight}{\beamer@UoE@titleheight=#1}
+
+% Resolution is 9:5 (approx), as in ppt template
+\geometry{paperwidth=25.40cm, paperheight=19.05cm}
+
+\ProcessOptionsBeamer
+
+\newcommand\crule[3][\beamer@UoE@color]{\textcolor{#1}{\rule{#2}{#3}}}
+
+\setbeamerfont{title}{series=\bfseries,size=\fontsize{32}{36}}%
+\setbeamerfont{subtitle}{size=\fontsize{24}{28}}
+\setbeamerfont{author}{size={\fontsize{20}{24}}}
+\setbeamerfont{institute}{size=\fontsize{22}{26}}
+\setbeamerfont{pagexofy}{size=\tiny}
+\setbeamerfont{caption}{size=\Large}
+\setbeamerfont{frametitle}{family=\sffamily,series=\bfseries,size={\fontsize{23}{26}}}
+\setbeamerfont{itemize item}{family=\sffamily,size={\fontsize{16}{18}}}
+\setbeamerfont{itemize subitem}{family=\sffamily,size={\fontsize{16}{18}}}
+\setbeamertemplate{itemize/enumerate body begin}{\fontsize{16}{19}\selectfont}
+\setbeamertemplate{itemize/enumerate subbody begin}{\fontsize{16}{19}\selectfont}
+\AtBeginDocument{\fontsize{18}{19}\selectfont}
+
+%\setbeamertemplate{items}[ball]
+\setbeamertemplate{navigation symbols}{}
+\pgfdeclareimage[width=14.69cm]{white-tied-in}{images/white-tied-in}
+\pgfdeclareimage[width=4.65cm]{edinburgh-logo}{images/edinburgh-logo}
+\pgfdeclareimage[width=1.25cm]{little=u}{images/edinburgh-logo}
+\setbeamerfont{alerted text}{series=\bfseries}
+\setbeamercolor{alerted text}{fg=\beamer@UoE@color!80!black}
+\setbeamercolor{title}{fg=black}
+\setbeamercolor{normal text}{fg=black}
+\setbeamertemplate{itemize item}{\color{\beamer@UoE@color}$\bullet$}
+\setbeamertemplate{itemize subitem}{\color{\beamer@UoE@color}$\circ$}
+
+
+\newcommand{\SetUoETitleMargin}[1]{\beamer@UoE@titleheight=#1}
+\newcommand{\SetUoETitleHeight}[1]{\beamer@UoE@titleheight=#1}
+
+
+\newlength\barheight\setlength\barheight{\paperheight}
+\divide\barheight by 12
+
+
+\setbeamertemplate{title page}{
+ \raggedright
+ % TITLE
+ {\usebeamerfont{title}\textcolor{white}\inserttitle\par~}
+ % SUBTITLE
+ \ifx\insertsubtitle\@empty
+ \else%
+ \\[1ex]
+ {\usebeamerfont{subtitle}\textcolor{white}\insertsubtitle}
+ \fi
+ \\[6ex]
+ % AUTHOR
+ {\usebeamerfont{author}\textcolor{white}\insertauthor}
+ \ifx\insertinstitute\@empty
+ \else%
+ \\[3ex]
+ {\\\usebeamerfont{institute}\textcolor{white}\insertinstitute}
+ \fi
+ % DATE
+ \ifx\insertdate\empty
+ \else%
+ \\[1ex]
+ \usebeamerfont{date}\textcolor{white}{\insertdate}
+ \fi
+}
+
+
+\setbeamertemplate{background}{
+ \setlength{\unitlength}{1cm}
+ \begin{picture}(25.4,19.05)(0,0)
+ % on first slide add UoE text logo across bottom left
+ \ifnum\c@framenumber=1%
+ \put(-.1, 0){\crule[\beamer@UoE@color]{25.4cm}{19.05cm}}
+ \put(0.44, 0.1){\pgfuseimage{white-tied-in}}
+ % on ever other slide add UoE logo at top of blue sidebar
+ \else%
+ \put(23.5, 0){\crule[\beamer@UoE@color]{1.80cm}{19.05cm}}
+ \put(23.65, 17.3){\includegraphics[width=1.45cm,height=1.45cm]{images/edinburgh-logo}}
+ \fi%
+ % add slide numbering to bottom right
+ \ifnum\c@framenumber<10%
+ \put(23.7,0.3){\centering\Large\color{white}{\phantom{0}\insertframenumber/\inserttotalframenumber}}
+ \else
+ \put(23.7,0.3){\centering\Large\color{white}{\insertframenumber/\inserttotalframenumber}}
+ \fi%
+ \end{picture}
+}
+
+
+% Default slide formatting
+\setbeamertemplate{frametitle}{
+ % if not the starting fram, add a top margin
+ \ifnum\c@framenumber=1%
+ \empty%
+ \else
+ \vspace*{\beamer@UoE@titleheight}
+ \fi
+ % use the title colour from this class
+ \usebeamercolor[fg]{title}
+ % handle situation where there's no subtitle
+ \ifx\insertframesubtitle\@empty
+ \usebeamerfont{frametitle}{\insertframetitle}
+ \else
+ \usebeamerfont{frametitle}{\insertframetitle:~{\normalfont\insertframesubtitle}}
+ \fi
+ % ensures spacing after the title
+ \vspace*{1em}
+}
+
+%\newcommand{\UoEsettitleheight}[1]{\makeatletter\beamer@UoE@titleheight=#1\makeatother}
+\setbeamersize{text margin left=2cm,text margin right=2.5cm}
+
+% Ensures images are compressed when brought in by PDF
+\pdfcompresslevel=9
+\pdfobjcompresslevel=3
+
+%%% Local Variables:
+%%% mode: latex
+%%% TeX-master: "sample"
+%%% End:
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-edmaths/docs/beamertheme-edmaths-docs.pdf b/macros/latex/contrib/beamer-contrib/themes/beamertheme-edmaths/docs/beamertheme-edmaths-docs.pdf
new file mode 100644
index 0000000000..feed9074f7
--- /dev/null
+++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-edmaths/docs/beamertheme-edmaths-docs.pdf
Binary files differ
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-edmaths/docs/beamertheme-edmaths-docs.tex b/macros/latex/contrib/beamer-contrib/themes/beamertheme-edmaths/docs/beamertheme-edmaths-docs.tex
new file mode 100644
index 0000000000..e14f44e0a0
--- /dev/null
+++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-edmaths/docs/beamertheme-edmaths-docs.tex
@@ -0,0 +1,231 @@
+\documentclass[12pt]{article}
+
+% This is documentation for the `edmaths` LaTeX package, maintained by
+% Josh Fogg for the University of Edinburgh. This file closely builds on
+% that provided Alan Munn for the MSU Thesis Class, `msu-thesis`. The
+% original documentation is licensed under LaTeX Project Public License
+% (LPPL) version 1.3 or later, and this documentation is licensed under
+% the LLP version 1.3c. For more information, see the GitHub repository:
+% https://github.com/Foggalong/edinburgh-math-latex
+
+\def\msuversion{0.99}
+\def\msudate{2024-08-30}
+\title{\textbf{Using the \pkg{beamertheme-edmaths} Beamer Theme}}
+\author{\textbf{Josh Fogg}\\School of Mathematics\\The University of Edinburgh\\\texttt{\href{mailto:j.fogg@ed.ac.uk}{j.fogg@ed.ac.uk}}}
+\date{Version \msuversion\\\msudate}
+
+% basic formatting tweaks
+\usepackage[lmargin=2cm,rmargin=2cm,tmargin=3cm,bmargin=2cm]{geometry}
+\usepackage[colorlinks=true]{hyperref}
+\usepackage{enumitem}
+\usepackage{graphicx}
+
+% use same fourier font available through edmaths
+\usepackage{cmap}
+\usepackage{fourier}
+\usepackage[T1]{fontenc}
+\usepackage{microtype}
+
+% setup syntax highlighting
+\usepackage{highlightlatex}
+\definecolor{whiteF0}{HTML}{F0F0F0}
+\lstset{
+ % external padding
+ aboveskip=.4em,
+ belowskip=-.2em,
+ xleftmargin=.03\textwidth,
+ xrightmargin=.03\textwidth,
+ % basic formatting
+ backgroundcolor=\color{whiteF0},
+ showstringspaces=false,
+ columns=fixed,
+ basewidth=.5em,
+ basicstyle={\fontfamily{zlmtt}\selectfont},
+ breaklines=true
+}
+
+
+% change new paragraph behaviour to no-indent and a linebreak
+\usepackage[parfill]{parskip}
+
+
+\newcommand\pkg[1]{\href{https://www.ctan.org/pkg/#1}{\color{teal}\lstinline{#1}}}
+\newcommand\key[1]{{\color{orange}\lstinline|#1|}}
+
+
+\begin{document}
+\maketitle
+\thispagestyle{empty}
+
+\section{Introduction}
+
+This is theme for \pkg{beamer}, used to creating presentations for the \href{https://www.maths.ed.ac.uk/}{School of Mathematics} at the \href{https://www.ed.ac.uk/}{University of Edinburgh}. It's designed as an accompaniment to \pkg{edmaths} and provides an easy way to generate a presentation in \LaTeX{} which aligns the university brand guidelines. This means you can focus on your actual writing, rather than worrying about font spacing, margins sizes, {\it etc}.
+
+\section{Initial Setup}
+
+This theme is designed to work with \pkg{beamer}, which should be available with any \TeX{} distribution. It can be used with any \LaTeX{} engine, including pdfLaTeX, XeLaTeX, or LuaLaTeX. While it should work with any reasonably up-to-date \TeX{} distribution, it is tested with 2020 and later.
+
+The essential steps to setup are then:
+\begin{enumerate}
+ \item Choose a document class using \lstinline|\documentclass[<options>]{beamer}|, with \key{<options>} being defined in the full \pkg{beamer} documentation.
+ \item Apply the theme using \lstinline|\usetheme{edmaths}|.
+ \item Use \lstinline|\title[Short Title]{Full Title}|| to define the title (the \key{Short Title} is optional).
+ \item Set the optional \lstinline|\subtitle{...}| if desired.
+ \item Set the \lstinline|\author{...}| and \lstinline|\date{...}|.
+\end{enumerate}
+These steps {\bf must} be done in exactly this order or the compiler will throw errors.
+
+Unlike \pkg{edmaths}, this theme does not automatically load the standard suite of \LaTeX{} math packages ({\it e.g.\/} \pkg{amsmath}) so you may wish to load those. Instead it loads \pkg{amsfonts}, \pkg{graphicx}, \pkg{lmodern}, and \pkg{mathptmx} which are necessary for the theme.
+
+The basic package has no other special requirements, but if you have certain additional packages installed then you can use some fancifying options (see below).
+
+\section{Package Options}
+
+When loading \pkg{beamertheme-edmaths} with
+\begin{lstlisting}
+\usetheme[<options>]{edmaths}
+\end{lstlisting}
+we can supply additional \key{<options>} as a comma-separated list of the following keywords.
+
+\subsection{Colour}
+
+The default theme is styled around University of Edinburgh {\bf\color[HTML]{00325F} blue (\lstinline|#00325F|)}. It's also available in three other official brand colour-scheme variations by specifying at most one of:
+\begin{itemize}
+ \item \key{colour=UoEorange} for {\bf\color[HTML]{CC5911} orange (\lstinline|#CC5911|)},
+ \item \key{colour=UoEgreen} for {\bf\color[HTML]{9C9A00} green (\lstinline|#9C9A00|)},
+ \item \key{colour=UoEcyan} for {\bf\color[HTML]{457E81} cyan (\lstinline|#457E81|)}.
+\end{itemize}
+In theory other off-brand colours could be applied using \pkg{xcolor} and the same syntax, but this isn't officially supported so results may vary.
+
+\subsection{Title Height}
+
+By default the title height is \key{10ex}. This can be modified by specifying \key{theight=<x>}, where \key{<x>} is the desired height in a \LaTeX{} compatible unit.
+
+\section{Usage}
+
+Once \pkg{beamertheme-edmaths} is set up, a simple example of how it might be put together in \pkg{beamer} is in the listing below. A more complicated example is packaged with \pkg{beamertheme-edmaths} and \href{https://github.com/Foggalong/edinburgh-math-latex/blob/main/example-presentation.tex}{available here}. What this looks like compiled can be \href{https://foggalong.github.io/edinburgh-math-latex/example-presentation.pdf}{viewed here}.
+
+\subsection{Overleaf}
+
+As a student or staff member at the University of Edinburgh you have access to \href{https://www.ed.ac.uk/information-services/computing/desktop-personal/software/main-software-deals/other-software/overleaf}{Overleaf Professional}! Do make use of this, it alleviates many of the headaches which come with using \LaTeX{} across multiple computers, which you surely will..
+
+\subsection{Archiving your presentation for the future}
+
+The current version of \pkg{beamertheme-edmaths} satisfies the brand guidelines at any one time. Given these change, you may find that if you need to recompile your presentation later that the formatting changes. To avoid this, save an archived version of the \href{https://github.com/Foggalong/edinburgh-math-latex/blob/main/beamerthemeedmaths.sty}{\lstinline|beamerthemeedmaths.sty|} file in the same folder as your slides. You only need to do this once you have completely finished your presentation however; there's no need to do it during the writing process.
+
+\begin{lstlisting}[caption={Example usage of \pkg{beamertheme-edmaths}.}]
+\documentclass{beamer}
+\usetheme{edmaths}
+
+\title[Short Title]{A Long and verbose title}
+\subtitle{and a sub-title} % optional
+\author{Dr Benway}
+\institute{The Mental Institute} % optional
+\date{Feb 1935}
+
+\begin{document}
+
+\maketitle
+
+\begin{frame}{Words of Advice for Young People}\label{sec:Advice}
+ People often ask me if I have any words of \alert{advice} for
+ young people\ldots \\[2ex] \pause
+ \begin{itemize}
+ \item<1-> \alert{Never} interfere in a \alert{boy-and-girl}
+ fight
+ \item<2-> Any \alert{old soul} is worth saving \\
+ \uncover<3->{at \alert{least to} a priest},
+ \begin{itemize}
+ \item<4-> But \alert{not} every soul is \alert{worth
+ buying}.
+ \end{itemize}
+ \item<5-> \ldots
+ \end{itemize}
+\end{frame}
+
+\begin{frame}{Conclusions}\label{sec:what?}
+ \begin{itemize}
+ \item<2-> What \alert{are} we doing here?
+ \item<4-> What?
+ \item<2-> Answers:
+ \begin{itemize}
+ \item<3-> We are here \alert{to go}.
+ \end{itemize}
+ \end{itemize}
+\end{frame}
+
+\end{document}
+\end{lstlisting}
+
+\section{Speaker Notes}
+
+There are various solutions for writing notes to accompany LaTeX presentations made with \pkg{beamer}. In each of these use the relevant command {\it after} the slide you wish to annotate.
+
+\subsection{Beamer's \texttt{note}}
+
+Core \pkg{beamer} itself actually comes with a command, \lstinline|\note|, which can be used for writing notes that are then included as separate `notes' pages in the complied PDF. Exactly how these are handled is controlled through the document class arguments
+
+\begin{lstlisting}
+\documentclass[notes]{beamer} % print frame + notes
+\documentclass[notes=only]{beamer} % only notes
+\documentclass{beamer} % only frames
+\end{lstlisting}
+
+and then notes are added with
+
+\begin{lstlisting}
+\begin{frame}
+ ...
+\end{frame}
+\note{Some wonderful note.}
+\end{lstlisting}
+
+These have the upside that you have full access to \LaTeX{} formatting when writing your speaker notes, but the downside that they can be cumbersome to work with when presenting. Multiple complications are needed to get notes and presentations in separate PDF files.
+
+\subsection{PDFPC's \texttt{note}}
+
+\href{https://pdfpc.github.io/}{PDFPC} is a presenter console with multi-monitor support for PDF files. There's an official package, \pkg{pdfpc}, for adding meta-data to presentation files which are compatible with their presenter console. The screenshot in Figure~\ref{fig:pdfpc} shows how the console looks when viewing the example presentation.
+
+\begin{figure}
+ \includegraphics[width=\textwidth]{pdfpc-screenshot.png}
+ \caption{Speaker notes in PDFPC.}\label{fig:pdfpc}
+\end{figure}
+
+To use this add
+
+\begin{lstlisting}
+\usepackage[overridenote=true]{pdfpc}
+\end{lstlisting}
+and then it's just \lstinline|\note{Some wonderful note.}| as before.
+
+These will then be included as ``comments'' within the complied PDF which PDFPC displays as notes in the presenter console. These have the upside that they're smoother to work with when presenting, but the downside that the only formatting supported is \lstinline|\\| for newlines.
+
+\subsection{Brandt's \texttt{pnote}}
+
+There are two packages called \pkg{pdfpc-latex-notes}, one by \href{https://github.com/cebe/pdfpc-latex-notes}{Carsten Brandt} and a fork by \href{https://github.com/p4pyru5/pdfpc-latex-notes}{p4pyru5}. These both generate PDFPC compatible notes using \lstinline|\pnote{Some wonderful note.}|. They served as the inspiration for PDFPC's official solution, but each come with their own (varying support for formatting, wider integration, {\it etc\/}).
+
+\subsection{Usher's \texttt{bnote}}
+
+The original version of the University of Edinburgh \pkg{beamer} template by \href{https://www.ed.ac.uk/profile/saturnino-luz}{Saturnino Luz} at the \href{https://www.ed.ac.uk/usher}{Usher Institute} included its own package, \pkg{beamernotes}, for generating a PDFPC compatible notes file.
+
+To use it save \href{https://github.com/Foggalong/edinburgh-math-latex/blob/4ac2ffb765a7d9dc420396dd10bdafcc0c561398/beamernotes.sty}{\texttt{beamernotes.sty}} either to your \LaTeX{} path or local to your project. Then add
+
+\begin{lstlisting}
+\usepackage{beamernotes}
+\end{lstlisting}
+
+to your document header and use
+
+\begin{lstlisting}
+\bnote{Some wonderful note.}
+\end{lstlisting}
+
+to write your notes. This solution had the upside that your notes were included in a separate file still automatically read by PDFPC, but the downside that all formatting was lost {\it including} the ability to write newlines.
+
+\section{Acknowledgements}
+
+The original \pkg{beamertheme-edmaths} was written by \href{https://www.ed.ac.uk/profile/saturnino-luz}{Saturnino Luz} for \href{https://www.ed.ac.uk/usher}{Usher}, then modified by \href{https://github.com/bencwbrown}{Ben Brown} with general university branding. Both are freely provided under the terms of the \href{https://choosealicense.com/licenses/lppl-1.3c/}{\LaTeX{} Project Public License v1.3c} and from 2020 onwards have been maintained by \href{https://www.maths.ed.ac.uk/~jfogg/}{Josh Fogg} (me).
+
+If you have any issues using \pkg{beamertheme-edmaths} don't hesitate to get in touch either by \href{mailto:j.fogg@ed.ac.uk}{email} or on \href{https://github.com/Foggalong/edinburgh-math-latex/issues/new?assignees=&labels=pres&projects=&template=beamer-issue.md&title=}{GitHub}. Feel free pop me a message just to say hi too, it always makes my day!
+
+\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-edmaths/docs/pdfpc-screenshot.png b/macros/latex/contrib/beamer-contrib/themes/beamertheme-edmaths/docs/pdfpc-screenshot.png
new file mode 100644
index 0000000000..59cc944e2f
--- /dev/null
+++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-edmaths/docs/pdfpc-screenshot.png
Binary files differ
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-edmaths/example-presentation.tex b/macros/latex/contrib/beamer-contrib/themes/beamertheme-edmaths/example-presentation.tex
new file mode 100644
index 0000000000..1f67be3c55
--- /dev/null
+++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-edmaths/example-presentation.tex
@@ -0,0 +1,82 @@
+%% This file is an example of using beamerthemeedmaths.sty to style a Beamer
+%% presentation. While the style is LPPL 1.3 licensed, this example is given
+%% under a 0BSD license (https://choosealicense.com/licenses/0bsd), meaning
+%% it can be freely used, copied, modified, and/or redistributed with or
+%% without attribution. For instructions on using the style, see the README.md
+%% file or https://github.com/Foggalong/edinburgh-math-latex.
+
+\documentclass[notes]{beamer}
+\usetheme{edmaths}
+\usepackage{lipsum}
+\usepackage[overridenote=true]{pdfpc}
+
+\pdfcompresslevel=9
+\pdfobjcompresslevel=3
+
+\title[Insert Title (short version of title)]{Title of Presentation}
+\subtitle{Insert Subtitle (Optional)} % Optional
+\author{Author Name}
+\date{n\textsuperscript{th} Month YYYY}
+
+\begin{document}
+
+
+\begin{frame}
+ \titlepage{}
+\end{frame}
+\note{
+ This generates notes for pdfpc. \\
+ \\
+ These notes also appear
+ on the handout/article versions.
+}
+
+
+\begin{frame}[t]{Header title bold}\label{sec:Slide1}
+ Main body text Sans. Here is a way to \alert{highlight text}.
+ \begin{itemize}
+ \item Bullet points
+ \item Sub-lists\ldots
+ \begin{itemize}
+ \item subitem
+ \end{itemize}
+ \item \lipsum[2]
+ \end{itemize}
+\end{frame}
+\note{
+ This is a note for the first slide. Mention how something happens.
+}
+
+
+\begin{frame}{Inserting a figure, some maths\ldots}
+ Example of a reference to another part of the presentation (slide~\ref{sec:Slide1}). Also an example of a slide not vertically aligned to top.\newline
+
+ \begin{itemize}
+ \item Here's a figure:
+ \begin{figure}[h]
+ \centering
+ \colorbox{blue}{\includegraphics[width=.13\linewidth]{images/edinburgh-logo}}
+ \caption{The University of Edinburgh's logo}\label{fig:edinburgh-logo}
+ \end{figure}
+ \item And here's a famous equation:
+ \begin{eqnarray}
+ \label{eq:schroedinger}
+ i\hbar {\frac{\partial}{\partial t}}|\psi (t)\rangle ={\hat{H}}|\psi (t)\rangle
+ \end{eqnarray}
+ \end{itemize}
+\end{frame}
+
+
+\begin{frame}[t]{References}
+ The stylesheet {\bf\texttt{edmaths.sty}} provides a styling for LaTeX{} documents which satisfies University of Edinburgh requirements~\cite{koeppe2007}. \newline
+
+ \lipsum[4]\newline
+
+ References can be added to the bottom of slides, or on a new slide.
+ \vfill
+ \bibliography{example-references}
+ \bibliographystyle{ieeetr}
+\end{frame}
+
+
+\end{document}
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-edmaths/example-references.bib b/macros/latex/contrib/beamer-contrib/themes/beamertheme-edmaths/example-references.bib
new file mode 100644
index 0000000000..cd65755781
--- /dev/null
+++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-edmaths/example-references.bib
@@ -0,0 +1,10 @@
+ This is an example biblography used in example-presentation.tex and
+ example-report.tex, examples of the edmaths Beamer and report styles
+ respectively. When creating a biblography you might find these bibtex
+ templates useful: https://verbosus.com/bibtex-style-examples.html
+
+@misc{koeppe2007,
+ title = {Package `edmaths'},
+ author = {Thomas Koeppe},
+ year = {2007}
+}
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-edmaths/images/LICENSE.md b/macros/latex/contrib/beamer-contrib/themes/beamertheme-edmaths/images/LICENSE.md
new file mode 100644
index 0000000000..ef516053f4
--- /dev/null
+++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-edmaths/images/LICENSE.md
@@ -0,0 +1,5 @@
+# Copyright Notice
+
+The images `edinburgh-logo` and `white-tied-in` are copyright © The University of Edinburgh 2024. They must not be used as part of derived or independent works without the explicit permission of The University of Edinburgh. Please note that this **does not** affect use as part of compiled LaTeX documents using this stylesheet for the university.
+
+The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336, VAT Registration Number GB 592 9507 00, and is acknowledged by the UK authorities as a “Recognised body” which has been granted degree awarding powers.
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-edmaths/images/edinburgh-logo.pdf b/macros/latex/contrib/beamer-contrib/themes/beamertheme-edmaths/images/edinburgh-logo.pdf
new file mode 100644
index 0000000000..f35a67f63f
--- /dev/null
+++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-edmaths/images/edinburgh-logo.pdf
Binary files differ
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-edmaths/images/edinburgh-logo.svg b/macros/latex/contrib/beamer-contrib/themes/beamertheme-edmaths/images/edinburgh-logo.svg
new file mode 100644
index 0000000000..a4470b6219
--- /dev/null
+++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-edmaths/images/edinburgh-logo.svg
@@ -0,0 +1,8 @@
+<svg width="86.7" height="87.2" version="1.1" viewBox="0 0 86.7 87.2" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
+<style type="text/css">
+ .st0{clip-path:url(#SVGID_2_);}
+ .st1{fill:none;stroke:#FFFFFF;stroke-width:3;stroke-miterlimit:1;}
+ .st2{fill:#FFFFFF;}
+ .st3{fill:none;stroke:#FFFFFF;stroke-miterlimit:1;}
+</style>
+<path class="st2" d="m73.6 41c0-0.6-0.2-1.2-0.2-1.8-0.1-0.6-0.1-1.3-0.2-1.9-0.4-1.7-0.8-3.3-1.4-4.9-0.1-0.2-0.2-0.4-0.3-0.7-0.2-0.5-0.4-0.9-0.6-1.3-0.1-0.1-0.1-0.3-0.2-0.4-0.2-0.4-0.3-0.8-0.5-1.2-0.1-0.2-0.3-0.4-0.4-0.7-0.1-0.2-0.2-0.5-0.3-0.7-0.4-0.7-0.9-1.3-1.3-1.9-0.2-0.2-0.3-0.4-0.5-0.6s-0.4-0.5-0.6-0.7-0.4-0.3-0.5-0.5c-0.1-0.1-0.1-0.2-0.2-0.4s-0.3-0.3-0.4-0.4l-0.2-0.2c-0.2-0.2-0.4-0.5-0.6-0.7s-0.4-0.4-0.6-0.5l-0.6-0.6c-0.3-0.2-0.5-0.4-0.8-0.6s-0.5-0.5-0.8-0.7c-0.2-0.1-0.4-0.2-0.5-0.3-0.2-0.2-0.4-0.3-0.7-0.5-0.2-0.1-0.3-0.3-0.5-0.4-0.1-0.1-0.2-0.1-0.4-0.2s-0.3-0.2-0.5-0.3c-0.5-0.3-1.1-0.6-1.7-0.9-0.2-0.1-0.4-0.3-0.6-0.4-0.4-0.2-0.7-0.4-1.1-0.5-0.3-0.1-0.6-0.2-0.9-0.4-0.1-0.1-0.3-0.2-0.4-0.2s-0.2-0.1-0.3-0.1c-0.2-0.1-0.4-0.2-0.5-0.2-0.6-0.2-1.1-0.3-1.7-0.5-0.3-0.1-0.6-0.2-0.8-0.3-0.6-0.2-1.2-0.3-1.8-0.4l-1.2-0.3c-0.3 0-0.5-0.1-0.8-0.1-0.4-0.1-0.9-0.2-1.4-0.2h-0.5c-0.1 0-0.2 0-0.4-0.1h-0.7c-0.5 0-1.1-0.1-1.7-0.1-0.2 0.1-0.5 0-0.8 0h-0.9-0.2-0.6c-0.1 0-0.2 0.1-0.3 0.1h-0.3-0.3-0.2c-0.1 0-0.3 0-0.4 0.1-0.3 0-0.7 0-0.9 0.2h-0.2c-0.2 0-0.4 0-0.6 0.1-0.5 0-0.9 0.2-1.3 0.3-0.4 0-0.7 0-0.9 0.2-0.2 0-0.4 0-0.5 0.1-0.3 0-0.6 0.2-0.8 0.3s-0.3 0.1-0.5 0.1c-0.3 0-0.6 0.2-0.8 0.3s-0.3 0.1-0.5 0.2c-0.9 0.4-1.8 0.8-2.7 1.3-0.2 0.1-0.3 0.2-0.4 0.3-1.1 0.5-2.1 1.1-3 1.9-0.3 0.2-0.5 0.4-0.8 0.6l-0.4 0.4c-0.3 0.2-0.5 0.4-0.8 0.6-0.5 0.4-1 0.9-1.5 1.4-0.3 0.3-0.6 0.5-0.9 0.8-0.1 0.1-0.2 0.2-0.3 0.4l-0.4 0.4c-0.2 0.2-0.4 0.5-0.6 0.7s-0.4 0.4-0.5 0.6c-0.1 0.1-0.2 0.2-0.2 0.3-0.3 0.4-0.6 0.7-0.9 1.1l-0.6 0.9c-0.3 0.3-0.6 0.8-0.8 1.2-0.1 0.1-0.1 0.2-0.2 0.4-0.2 0.3-0.4 0.6-0.5 0.9-0.2 0.3-0.3 0.7-0.4 1-0.1 0.1-0.1 0.2-0.2 0.4-0.2 0.3-0.3 0.6-0.4 0.9-0.1 0.2-0.1 0.4-0.2 0.6l-0.3 0.6c-0.1 0.2-0.1 0.4-0.2 0.7-0.1 0.2-0.2 0.5-0.3 0.7-0.4 1.4-0.8 2.9-1.1 4.4 0 0.3-0.1 0.6-0.1 0.9s-0.2 0.7-0.2 1 0 0.6-0.1 0.8c0 0.2 0 0.4-0.1 0.6v3.6c0 0.6 0.1 1.2 0.2 1.7v0.7c0.1 0.8 0.2 1.6 0.3 2.3 0.1 0.2 0.1 0.4 0.2 0.6 0.1 0.6 0.3 1.2 0.4 1.8 0.1 0.1 0.1 0.3 0.2 0.4 0 0.1 0.1 0.3 0.1 0.4 0.2 0.6 0.5 1.3 0.7 1.9 0.1 0.2 0.2 0.5 0.3 0.7s0.1 0.3 0.2 0.5l0.6 1.2c0.2 0.3 0.4 0.6 0.5 1 0.1 0.1 0.1 0.2 0.1 0.4l0.2 0.2c0.1 0.1 0.1 0.3 0.2 0.4 0.2 0.3 0.3 0.5 0.5 0.8 0.1 0.2 0.2 0.3 0.3 0.5 0.2 0.2 0.3 0.4 0.5 0.6 0.1 0.2 0.2 0.3 0.3 0.5 0.2 0.3 0.4 0.5 0.6 0.8 0.2 0.2 0.4 0.4 0.5 0.7 0.2 0.2 0.4 0.5 0.7 0.7 0.2 0.2 0.3 0.5 0.6 0.7 0.3 0.3 0.6 0.6 0.9 0.8l0.4 0.4c0.2 0.2 0.5 0.4 0.8 0.6 0.2 0.2 0.5 0.4 0.7 0.7 0.2 0.1 0.3 0.3 0.5 0.4 0.2 0.2 0.4 0.4 0.6 0.5 0.3 0.2 0.5 0.4 0.8 0.6l0.6 0.3c0.2 0.1 0.4 0.3 0.6 0.4s0.4 0.2 0.6 0.4c0.8 0.5 1.6 0.9 2.4 1.3 0.4 0.2 0.7 0.4 1.1 0.5s0.7 0.3 1.1 0.4c0.1 0 0.3 0.1 0.4 0.1 0.3 0.1 0.7 0.3 1 0.4 0.1 0 0.2 0.1 0.3 0.1 0.3 0.1 0.6 0.3 0.9 0.3 0.4 0.1 0.8 0.1 1.1 0.2 0.6 0.1 1.1 0.3 1.7 0.4h0.6c0.3 0 0.6 0.1 0.8 0.1h0.7c0.1 0 0.3 0 0.4 0.1h0.4c0.3 0.1 0.7 0.1 1 0.2h0.5 0.3c0.3 0 0.7 0 1 0.1h0.6c0.4 0 0.8-0.1 1.1-0.1h0.5c0.2 0 0.5-0.1 0.7-0.1l2.4-0.3c0.3-0.1 0.5-0.1 0.8-0.2s0.7-0.1 1-0.2c0.2 0 0.3-0.1 0.5-0.2 0.3-0.1 0.5-0.2 0.8-0.2 0.1 0 0.2-0.1 0.4-0.1 0.2-0.1 0.4-0.1 0.6-0.1 0.4-0.1 0.8-0.3 1.2-0.4 0.2-0.1 0.5-0.2 0.7-0.3s0.5-0.2 0.7-0.3c0.1 0 0.1-0.1 0.2-0.1 0.2-0.1 0.5-0.2 0.7-0.3 0.3-0.2 0.5-0.3 0.8-0.5 0.1-0.1 0.3-0.1 0.4-0.2 0.4-0.2 0.8-0.5 1.2-0.7 0.3-0.2 0.7-0.4 1-0.6s0.6-0.5 0.9-0.7 0.6-0.5 1-0.7l0.2-0.2c0.1 0 0.2-0.1 0.2-0.1 0.3-0.2 0.5-0.5 0.8-0.7l0.6-0.6c0.2-0.2 0.4-0.4 0.7-0.6 0.1-0.1 0.1-0.2 0.2-0.3 0.2-0.2 0.4-0.3 0.5-0.5 0.1-0.1 0.2-0.3 0.3-0.4 0.4-0.4 0.8-0.8 1.1-1.2 0.3-0.3 0.5-0.6 0.8-1 0.2-0.2 0.4-0.5 0.5-0.8l0.3-0.3c0.3-0.4 0.6-0.8 0.9-1.2 0.1-0.1 0.1-0.3 0.2-0.4s0.1-0.2 0.2-0.3 0.1-0.2 0.2-0.4c0.2-0.3 0.4-0.7 0.6-1s0.3-0.5 0.5-0.8c0.1-0.3 0.2-0.5 0.3-0.8s0.3-0.6 0.4-0.8c0.4-1.2 0.9-2.4 1.2-3.6 0-0.1 0.1-0.3 0.1-0.4 0.1-0.5 0.2-0.9 0.3-1.4 0-0.2 0.1-0.5 0.1-0.7 0.1-0.4 0.1-0.8 0.2-1.2 0-0.3 0-0.6 0.1-1 0-0.1 0-0.2 0.1-0.4v-0.8c0-0.1 0.1-0.3 0.1-0.4v-0.6c0.1-1.7 0.2-3 0.1-4.2m-36.3-25.8c0.3 0 0.5-0.1 0.7-0.2 0.4-0.1 0.8-0.2 1.2-0.2h0.9c0.4 0 0.8-0.1 1.2-0.2h0.5c0.2 0 0.4 0 0.6-0.1h1.2c0.2 0 0.5 0 0.7 0.1 0.2 0 0.4 0.1 0.5 0.1h0.8 0.4 0.5c0.2 0 0.4 0.1 0.7 0.1h0.3c0.1 0 0.2 0.1 0.3 0.1s0.2 0.1 0.4 0.1c0.5 0.1 1 0.1 1.5 0.2h0.1c0 0.1-0.8 0-1 0h-0.3-0.7-0.3-0.4-0.3c-0.3 0-0.8-0.1-1.1 0-0.3 0-0.6 0-0.9-0.1-0.1 0-0.4-0.1-0.5 0h-0.4c-0.2 0-0.3-0.1-0.5 0-0.1 0-0.2 0-0.3 0.1h-2.1c-0.1 0-0.3 0-0.4-0.1h-1c-0.2 0-0.7-0.1-0.8 0-0.5 0.1-1 0.1-1.5 0.1zm-3.8 1.1c0.1 0 0.3-0.2 0.4-0.2s0.2-0.1 0.3-0.1c0.1-0.1 0.2-0.1 0.3-0.1 0.3-0.1 0.7-0.2 1-0.3h0.7 0.9 0.5 0.8 1.1c1.3 0 2.6 0.1 3.9 0.1h0.6 0.9c1.5 0 3-0.1 4.5 0h1.5 0.6c0.4 0.1 0.8 0.4 1.2 0.5 0.2 0 0.8 0.1 1 0.3h-0.1-0.2-0.6c-0.2 0-0.4-0.1-0.6-0.1h-0.6-0.3-0.6-0.4-0.6c-0.3 0-1-0.1-1.2 0-0.1 0-0.3-0.1-0.4 0-0.2 0-0.3 0-0.5-0.1h-0.6-0.4-0.5-0.5-1.4-0.5-0.3-0.3c-0.4 0-0.8-0.1-1.2-0.1h-1.4c-0.2 0-0.6-0.1-0.7 0h-1.1-0.4-0.2-1.5-0.2-0.6-0.3c-0.6 0.2-1.3 0.2-2 0.1zm-2.1 0.9c0.1-0.1 0.2-0.1 0.2-0.2 0.7-0.4 1.6-0.2 2.4-0.2h1.4 0.4 0.8 2.9 0.6 0.8 0.3 0.3 0.4c0.5 0 0.9 0.1 1.4 0.1 0.2 0 0.5-0.1 0.7-0.1 0.6 0 1.2 0.1 1.8 0.1 0.3 0 0.6-0.1 0.9-0.1h1.5 0.8 3.3c0.2 0 0.3 0.1 0.5 0.1s0.5 0 0.7-0.1c0.3 0 0.8 0.1 1.1 0 0.4 0 0.7 0.2 1 0.4 0.3 0.1 0.7 0.2 0.9 0.4v0.1h-0.1-0.5-0.6-0.2c-0.2 0-0.9-0.1-1 0h-0.4-0.7c-0.2 0-0.4-0.1-0.6 0h-0.6-0.9c-0.3 0-0.8-0.1-1.1 0h-0.2-0.7-0.3c-0.2 0-0.5-0.1-0.7 0h-0.6-0.4-1-0.4-1.1-0.4-0.9-1.1-0.3-0.9-0.4-0.2-0.3c-1.2 0-2.3-0.1-3.5-0.1h-0.5c-0.1 0-0.3-0.1-0.4 0h-0.7-1.5c-0.2 0-0.8-0.1-0.9 0h-0.7-0.2c-0.3 0-0.5-0.1-0.8-0.1 0-0.1 0.6-0.3 0.7-0.3m-2.7 1.5c0-0.1 0.2-0.1 0.2-0.2 0.1-0.1 0.3-0.2 0.4-0.2 0.1-0.1 0.3-0.2 0.4-0.2 0.4-0.1 1.1-0.1 1.5-0.1h1.3 1.1 0.4c0.7-0.1 1.5 0 2.2 0h1.1c0.5 0 0.9 0.1 1.4 0.1h0.8c0.4 0 0.7-0.1 1.1-0.1 0.8 0 1.6 0.1 2.3 0.1h0.3 0.4 0.6 0.7 0.8c0.5 0 1 0.1 1.6 0.1 0.2 0 0.4-0.1 0.7-0.1h0.5 0.2c0.1 0 0.3 0.1 0.4 0.1h0.6 0.8c0.2 0 0.4-0.1 0.6 0h0.9 0.5 1.8 0.8 1.7 0.8c0.1 0 0.2 0.1 0.3 0.2 0.2 0.2 0.5 0.3 0.7 0.5 0 0.1-0.4 0.1-0.5 0.2h-0.4-0.4-0.5-0.3-1.1-0.4-0.4-0.2-2.7c-0.2 0-0.6-0.1-0.8 0h-0.5c-0.2 0-0.6-0.1-0.8 0h-0.4c-0.2 0-0.5-0.1-0.7 0h-0.5c-0.2 0-0.4-0.1-0.5 0h-0.2-1.2-0.5c-0.2 0-0.7-0.1-0.9 0h-0.3c-0.2 0-0.4-0.1-0.6 0h-0.4-1.8c-0.3 0-0.8-0.1-1.1 0h-0.2c-0.2 0-0.5 0-0.7-0.1h-1.7c-0.2 0-0.3-0.1-0.5-0.1h-1.1-0.3-1.7-0.9c-0.2 0-0.6-0.1-0.8 0h-0.3-0.3-0.8-0.4-0.3c-0.3 0-0.6 0-1-0.1-0.3 0-0.6 0-0.8-0.1v0m-1.7 1.2s0.2-0.1 0.2-0.2c0.3-0.2 0.5-0.3 0.8-0.5 0.2-0.1 0.4-0.1 0.6-0.1s0.5 0 0.7 0.1h1.4 0.7 0.7 0.6c0.3 0 0.6 0.1 1 0.1 0.5 0 1-0.1 1.4 0h0.4 1.1 2.1 1.6 1.1 0.4c0.3 0 0.6 0.1 0.9 0.1 0.4 0 0.8-0.1 1.2-0.1 0.3 0 0.6 0 1 0.1h1 0.4 0.4 0.9 1.5c0.3 0 0.6 0 0.9-0.1h2.1 0.4 2.2c0.3 0 0.7-0.1 1 0 0.4 0 0.7 0.1 1.1 0.1 0.3 0 0.7-0.1 1-0.1 0.2 0 0.4 0 0.6-0.1 0.3 0 0.6 0 0.8 0.1 0.1 0 0.2 0.2 0.3 0.2s0.1 0.1 0.2 0.1c0.2 0.1 0.3 0.3 0.5 0.4l-0.1 0.1h-0.6c-0.2 0-0.4-0.1-0.6 0h-0.2-1.3-1.2-0.4-0.3-0.6-0.7-0.6c-0.2 0-0.3-0.1-0.5 0h-1.5-0.5-0.3-1.1-0.4c-0.4 0-1-0.1-1.3 0h-0.7-1.8c-0.2 0-0.6-0.1-0.8 0h-0.3-0.9-2.5-1.3-0.4-0.4-0.8-0.2-0.8-0.4-1.2c-0.1 0-0.3-0.1-0.4 0h-1.7c-0.1 0-0.3-0.1-0.4 0h-0.3-2.1c-0.3 0-1-0.1-1.2 0h-0.2-1.1c-0.3-0.1-0.7-0.1-1.1-0.2zm-1.7 1.2c0.1 0 0.1-0.1 0.2-0.1 0.2-0.1 0.7-0.6 0.9-0.6h1.2 0.7 0.7 1.2c0.8 0 1.5 0.1 2.2 0.1h0.5 1.2c0.2 0 0.4 0 0.6 0.1h0.7 0.7c0.6 0 1.1-0.1 1.7-0.1h0.8 0.4 0.8c0.4 0 0.9 0.1 1.3 0.1h0.7 0.8 0.4 0.3 0.4 1 0.3c0.2 0 0.4 0 0.6 0.1h0.8 0.5 1.1 0.6 1.1 0.5 0.4 0.7c0.5 0 1 0.1 1.5 0.1 0.9 0 1.7-0.1 2.6-0.1h0.8 0.5 1.3c0.3 0 0.6 0 0.9 0.1 0.2 0 0.4 0 0.5-0.1h0.5c0.3 0 0.6 0 1 0.1 0.1 0 0.8 0.5 0.8 0.7h-0.1-0.6c-0.4 0-0.9-0.1-1.2 0.1h-0.2-0.4c-0.3 0-0.8-0.1-1 0-0.2 0-0.4 0-0.6-0.1h-1.2c-0.2 0-0.6-0.1-0.8 0h-2.4-1.1-0.4-0.9c-0.2 0-0.4-0.1-0.5 0h-0.8-0.3-0.2-1-0.4c-0.2 0-0.9-0.1-1 0-0.2 0-0.7-0.1-0.8 0h-0.2c-0.3 0-0.6-0.1-1-0.1h-0.3c-0.3 0-0.7-0.1-1 0h-0.2c-0.2 0-0.6-0.2-0.8-0.1h-1-0.3c-0.2 0-0.6-0.1-0.8 0h-0.2-1.2-0.4-0.7-0.4-0.3c-0.1 0-0.3 0-0.4 0.1h-0.4c-0.2 0-0.6-0.2-0.8-0.1h-1-0.3-0.3-0.2c-0.5 0-0.9 0-1.3-0.1h-0.3-1.3c-0.2 0-0.6-0.1-0.8 0h-0.4c-0.1 0-0.4-0.1-0.5 0h-0.2-1.2-0.4c-0.8-0.1-1.3-0.1-1.9-0.1zm47 22c0 0.1-0.1 0.1-0.2 0.1h-0.4c-0.2 0-0.5-0.1-0.6 0h-2.4c-0.2 0-0.6-0.1-0.7 0-0.2 0-0.7-0.1-0.8 0-0.2 0-0.4-0.1-0.6 0h-0.9-1.3v0.4h0.2 0.7 0.5 0.8 2.8 1.3 0.7 0.5 0.3c0.1 0 0 0.7 0 0.8h-0.4c-0.2 0-0.7-0.1-0.8 0h-0.5-0.7-1.3-0.3-1.5c-0.2 0-0.5-0.1-0.7 0h-0.7c-0.1 0-0.3-0.1-0.5 0h-0.3v-0.1 0.5h0.1 0.6 0.6 1.1 0.5 0.8 0.3 0.5 0.3 0.3 0.6 0.8c0.2 0 1.1-0.1 1.3 0.1 0.1 0.1 0 0.7 0 0.8 0 0-0.2 0-0.3 0.1h-0.2-1.2-0.4-1.2-0.3-0.3-0.4-0.8c-0.1 0-0.3-0.1-0.5 0h-2-0.2v0.4h0.2 1.4 0.5c0.8 0 1.5 0.1 2.3 0.1h0.9 1.9 0.4c0 0.2 0 0.6-0.1 0.7-0.1 0-0.2 0-0.2 0.1-0.2 0-0.6-0.1-0.7 0h-0.3-0.2c-0.7 0-1.5-0.1-2.2-0.1-0.2 0-0.5-0.1-0.7 0-0.2 0-0.6-0.1-0.7 0h-1.8-0.6v0.4c0.1-0.1 0.5 0 0.7 0h1.6c0.3 0 0.8 0 1.1-0.1 0.4 0 0.7 0 1.1 0.1h1 1c0.3 0 0.7-0.1 1 0 0.2 0 0.1 0.6 0 0.7s-0.2 0.1-0.2 0.1h-0.2-1.5c-0.2 0-0.5-0.1-0.7 0h-0.7-1.7-0.5-0.4c-0.5 0-1 0-1.5-0.1v0.4h0.1 1.1 0.5 0.4 0.6c0.3 0 1 0.1 1.2 0h0.4 0.7 1.4c0.2 0 0.7 0 0.8 0.1 0.1 0 0 0.6 0 0.7 0 0-0.1 0-0.1 0.1-0.2 0-1-0.1-1.1 0h-0.6-0.8-0.4c-0.1 0-0.3 0-0.4 0.1-0.2 0-0.3 0-0.5-0.1h-0.8-0.4c-0.1 0-0.3 0-0.4-0.1h-1.3-0.3v0.4h0.8 0.5 1.6c0.4 0 1 0.1 1.4 0h0.8 0.4 0.4 1.4c0 0.2 0 0.4-0.1 0.5 0 0.1-0.1 0.2-0.1 0.3h-0.7-0.6-0.8-0.6c-0.2 0-0.5-0.1-0.7 0h-0.3c-0.3 0-0.6 0-0.8-0.1-0.8 0-1.6-0.1-2.4-0.1v0.4h0.2 0.3 1 0.9 0.8c0.5 0 1 0.1 1.4 0.1 0.3 0 0.6-0.1 0.9-0.1 0.2 0 1.2-0.1 1.3 0.1 0.1 0.1 0 0.2 0 0.3 0 0.2-0.1 0.4-0.2 0.5-0.5 0-1.1-0.1-1.6 0h-0.3c-0.2 0-1-0.1-1.1 0h-0.7c-0.2 0-0.4-0.1-0.6 0-0.2 0-0.5-0.1-0.7 0-0.6 0-1.1-0.1-1.7-0.1v0.4h1.1c0.3 0 0.7 0.1 1.1 0.1h1.8 0.5 0.3 0.3c0.3 0 1.3 0 1.4 0.1s0 0.2 0 0.3-0.1 0.2-0.2 0.3h-0.4-0.3-0.2c-0.2 0-0.7-0.1-0.8 0h-0.3-1.1-0.4c-0.2 0-0.4-0.1-0.6 0-0.2 0-1.8 0-2.2-0.1v0.5c0.2 0 0.3-0.1 0.5-0.1h2 0.5 1 0.5 0.8 0.3c0.2 0 0.4 0 0.6 0.1 0 0.1-0.2 0.6-0.3 0.7-0.1 0-0.2 0.1-0.3 0.1h-0.8-0.4-0.3-0.2-0.8c-0.1 0-0.3-0.1-0.4 0h-0.2-0.8c-0.2 0-0.5-0.1-0.7 0h-0.3c-0.1 0-0.6 0-0.7-0.1v0.5c0.1-0.1 0.9-0.1 1.1-0.1h0.4 1 0.6 0.5 0.9c0.2 0 0.8-0.1 1.1 0 0.1 0.1-0.1 0.4-0.1 0.4-0.1 0.1-0.1 0.3-0.3 0.3h-0.2c-0.2 0-0.3 0-0.5-0.1h-1-0.3c-0.2 0-0.6-0.1-0.8 0h-0.2-0.5-0.4-1.3v0.5c0.2 0 0.3-0.1 0.4-0.1h0.9 0.4 1.8 0.8 0.5c0.1 0 0.2 0 0.3 0.1s-0.1 0.6-0.2 0.6l-0.2 0.2h-0.6c-0.2 0-0.6-0.1-0.8 0h-0.7-0.6c-0.2 0-0.4-0.1-0.6 0h-1.4v0.4h0.4 0.6c0.2 0 0.4 0 0.6-0.1 0.3 0 0.6 0 0.9 0.1h0.7c0.3 0 0.6 0.1 0.9 0 0.2 0 0.4 0.1 0.6 0.1 0 0.2-0.3 0.7-0.5 0.8h-0.6c-0.3 0-1-0.1-1.2 0h-1.5c-0.2 0-0.5 0-0.7-0.1v0.4h0.7 0.4c0.4 0 0.7 0.1 1.1 0.1h1.1c0.2 0 0.4 0 0.5 0.1 0 0-0.4 0.8-0.7 0.8s-0.9 0-1.2-0.1c-0.5 0-0.9 0-1.4-0.1h-0.7v0.4c0.8 0 1.7 0 2.4 0.1 0.2 0 0.4 0 0.7 0.1v0.1c-0.1 0-0.1 0.1-0.1 0.1-0.5 0.3-0.7 0.7-0.9 0.7-0.1 0-0.2 0-0.2 0.1-0.2 0-0.6-0.1-0.7-0.1-0.2 0-0.6-0.1-0.8 0h-0.8v0.4h1.2 0.5 0.7c0 0.2-0.4 0.7-0.6 0.7h-0.4-1.4v0.4h0.3c0.2 0 1.1 0 1.1 0.1 0.1 0.2-0.4 0.6-0.5 0.7h-0.9c0 0.2-0.1 0.3-0.1 0.4h0.7c0 0.2-0.8 0.9-1 1h-0.1c-0.4 0.6-0.9 1.1-1.7 1.7-0.6 0.5-1.3 0.9-2 1.2h0.1c0.4 0-0.5 0.6-0.6 0.6h-0.9-0.1c-0.6 0.2-1.3 0.4-2 0.5h0.5 0.6 0.3 0.4 0.4v0.1c-0.2 0.2-0.4 0.3-0.6 0.4-0.1 0.1-0.2 0.2-0.4 0.3-0.1 0-0.2 0.1-0.4 0.1h-0.3-2c-0.2 0-0.7-0.1-0.9 0-0.3 0-0.6-0.1-0.8 0h-0.6c-0.4 0-0.7-0.1-1.1-0.1h-0.2-1.7c-0.2 0-0.5 0.1-0.7 0.1-0.7 0.1-1.2 0.2-1.7 0.4h1.7 1.2 2.9 1c0.2 0 0.3 0 0.5-0.1h2.2c-0.1 0-0.3 0.2-0.4 0.2-0.3 0.1-0.6 0.3-0.9 0.4-0.2 0.1-0.4 0.2-0.6 0.2-0.4 0.1-0.8 0-1.2 0h-0.4-0.5-0.6c-0.2 0-0.5-0.1-0.7 0h-1.2-0.6-0.4-0.7c-0.2 0-0.8-0.1-1 0-0.5 0-1.3-0.1-1.9-0.1-0.2 0.2-0.4 0.3-0.5 0.5h0.8c0.7-0.1 1.5 0 2.3 0h1.2 0.7 0.4c0.2 0.1 0.7 0 0.9 0 0.4 0 0.8 0.1 1.1 0.1 0.2 0 0.4 0 0.5-0.1h0.7-0.1c-0.3 0.1-0.5 0.2-0.8 0.3-0.1 0.1-0.3 0.1-0.4 0.2-0.2 0.1-0.4 0.1-0.6 0.2h-0.8-0.5-0.4-0.4-0.2-0.7c-0.1 0-0.4-0.1-0.5 0h-0.4-0.6-0.3-0.4-0.2c-0.2 0-0.8-0.1-1 0h-0.4-0.8c-0.1 0.1-0.1 0.3-0.2 0.4 0.6-0.1 1.4 0 1.9 0s1 0 1.5-0.1c0.2 0 0.4 0 0.6-0.1h1.1 1.1c-0.3 0-0.6 0.2-0.9 0.2-0.2 0-0.4 0-0.6 0.1-0.3 0-0.6 0.1-0.9 0.2h-0.2c-0.2 0-0.3 0-0.5 0.1-0.1 0-0.5 0.1-0.6 0.1h-0.5-0.7-0.2-1.2c-0.6 0-1.2 0.1-2 0h-0.2c-0.3-0.1-0.7-0.1-1-0.2h-0.5c-0.2 0-0.4-0.1-0.7-0.1h-0.6c-1.1-0.2-2.3-0.3-3.3-0.6-0.2 0-0.6-0.1-0.7-0.2 0.5 0.1 1.1 0.1 1.6 0.1s0.9 0.1 1.4 0.1h0.4 0.4 0.6 0.4c0.2 0 0.3 0.1 0.5 0.1h1.4c-0.1-0.2-0.2-0.3-0.3-0.5h-0.7c-0.2 0-0.4-0.1-0.6 0h-1.3c-0.2 0-0.3-0.1-0.5 0-0.4 0-0.8-0.1-1.3-0.1h-1.8c-0.2 0-0.4-0.1-0.6-0.1h-0.4c-0.2 0-0.4-0.1-0.5-0.1-0.1-0.1-0.2-0.1-0.4-0.1s-0.4-0.1-0.6-0.1-0.4-0.1-0.6-0.2c-0.1 0-0.2-0.1-0.3-0.1h0.3 1.2c0.3 0 0.6 0 0.9-0.1h1.2c0.2 0 0.3 0 0.5 0.1 0.3 0 0.6-0.1 0.9-0.1 0.4 0 0.9 0.1 1.3 0.1h1.5 0.9c-0.1-0.1-0.3-0.2-0.5-0.4h-0.4-0.3c-0.3 0-0.6 0-0.9-0.1h-0.3c-0.1 0-0.3-0.1-0.5 0h-1-0.4-1c-0.2 0-0.5-0.1-0.7-0.1s-0.4 0-0.5 0.1h-0.7c-0.7 0-1.5 0-2.1-0.1-0.3 0-0.6 0-0.8-0.1-0.4-0.1-0.8-0.5-1.2-0.7v-0.1h1.3c0.2 0 0.5 0.1 0.7 0.1h0.9 0.7 0.4 0.7 2.1 1.6 0.2 0.4c-0.4-0.2-0.9-0.3-1.4-0.4h-0.2-1.1-0.4-0.3-1.1-0.7-0.6-1.4-0.5-0.7c-0.2 0-0.3-0.1-0.5-0.1-0.3 0-0.7 0-1-0.1s-0.5-0.3-0.7-0.4c-0.1-0.1-0.3-0.1-0.3-0.3 0.6 0 1.3 0 1.9 0.1h1.3 0.6c-1.1-0.1-2-0.3-2.8-0.4h-0.4-0.5-0.2c-0.4 0-0.7-0.1-0.9-0.3l-0.2-0.2h0.3c-1.2-0.4-2.1-1-2.9-1.7-0.5-0.5-0.9-1.1-1.2-1.8h-0.2c-0.2 0-0.7-0.6-0.8-0.8 0 0 0.2 0 0.2-0.1h0.5c0-0.1 0-0.2-0.1-0.3h-1c-0.1 0-0.7-0.6-0.7-0.7v-0.1h0.5 1v-0.4h-0.2-0.3c-0.1 0-0.5-0.1-0.6 0h-0.2-0.7c-0.2-0.1-0.6-0.6-0.6-0.8h0.2 0.5c0.2 0 0.5 0 0.7-0.1h1v-0.4h-0.3-0.4-0.4-0.5-0.3c-0.1 0-0.2 0-0.3 0.1-0.2 0-0.4 0-0.5-0.1-0.1 0-0.5-0.6-0.4-0.7s0.7-0.1 0.8-0.1h2.3v-0.4h-0.9-0.3c-0.2 0-0.5-0.1-0.6 0-0.2 0-0.7-0.1-0.9 0h-0.4c-0.1 0-0.2 0-0.3-0.1s-0.1-0.2-0.2-0.3c-0.1-0.2-0.3-0.4-0.3-0.7 0.2 0 0.4 0.1 0.7 0.1h0.6 1 0.5c0.3 0 0.7 0.1 1 0h0.3v-0.4h-0.8-0.3-1.2-0.4-0.6-0.3-0.4c-0.1 0-0.2 0-0.3-0.1-0.2-0.1-0.4-0.6-0.5-0.8 0 0 0.1 0 0.1-0.1 0.4 0 0.7 0.1 1.1 0.1h0.3 0.3 0.6c0.2 0 0.4-0.1 0.7 0 0.2 0 0.3 0.1 0.5 0.1s0.7-0.1 1 0v-0.4h-0.2-3-0.4-0.6-0.3c-0.1 0-0.3 0-0.4-0.1-0.2-0.1-0.3-0.5-0.3-0.7h0.6 0.5 0.9 0.4 0.4c0.3 0 0.7 0 1 0.1h0.5c0.3 0 0.6 0.1 1 0.1v-0.5h-0.1-1-1c-0.2 0-0.3 0-0.5-0.1h-0.9c-0.2 0-0.5-0.1-0.6 0h-1.2c0-0.1-0.1-0.1-0.1-0.2-0.1-0.1-0.2-0.4-0.1-0.5l0.1-0.1h0.9 0.6 0.4 0.3 0.8 1.3c0.3 0 0.8 0.1 1.1 0.1v-0.4c-0.5 0-1.7-0.1-1.9 0h-0.9-1.1c-0.2 0-0.4 0-0.6-0.1h-0.4c-0.1 0-0.3-0.1-0.4 0h-0.2c-0.1 0-0.2 0-0.3-0.1s-0.3-0.6-0.2-0.7c0.3-0.2 0.9 0 1.3-0.1 0.4 0 0.7 0 1.1 0.1h0.8c0.1 0 0.3 0 0.4 0.1h1.9 0.7v-0.5h-0.3-1-0.5-1.2c-0.1 0-0.4-0.1-0.5 0h-0.8c-0.2 0-0.8-0.1-1 0-0.2 0-0.4 0-0.5-0.1-0.2 0-0.6 0-0.8-0.1-0.1-0.1-0.1-0.2-0.1-0.4 0-0.1-0.1-0.2-0.1-0.2 0.1-0.1 0.7-0.1 0.9-0.1h0.7 1.3 0.3 0.8 0.6 0.5 1.1 0.5v-0.4h-0.5-0.3-0.5-1.1-0.6-0.6c-0.2 0-0.6-0.1-0.8 0-0.3 0-0.5 0-0.8-0.1-0.3 0-1.3 0.1-1.5-0.1-0.1-0.1-0.2-0.6-0.2-0.7h0.5c0.4 0 0.8 0 1.2 0.1 0.1 0 0.2 0 0.3 0.1h1c0.3 0 0.5-0.1 0.8-0.1h0.6 0.5 1c0.2 0 0.9-0.1 1.2 0v-0.4h-0.3-0.8-0.6-0.2c-0.3 0-0.8-0.1-1 0h-0.5c-0.3 0-0.8-0.1-1 0-0.3 0-0.7-0.1-0.9 0-0.2 0-0.8-0.1-1 0-0.2 0-0.8 0-0.9-0.1s-0.1-0.2-0.1-0.3-0.1-0.2 0-0.3h0.1 0.6 1.5 0.6c1.1 0.1 2.2 0 3.4 0h1.1v-0.4h-0.5-1c-0.2 0-0.4 0-0.5 0.1h-0.3c-0.3 0-1.1-0.1-1.3 0-0.2 0-0.4-0.1-0.7-0.1-0.8 0-1.7 0-2.5-0.1-0.1 0-0.4 0-0.5-0.1s-0.1-0.5-0.1-0.7h1.6c0.3 0 0.7 0.1 0.9 0 0.4 0 0.9 0.1 1.3 0.1h0.6c0.3 0 0.5 0 0.8 0.1 0.1 0 0.2-0.1 0.4-0.1h0.7 0.2 0.8v-0.4h-0.4-0.5-0.9-0.5c-0.1 0-0.7-0.1-0.8 0h-0.5c-0.1 0-0.3-0.1-0.4 0-0.5 0-0.9-0.1-1.4-0.1h-0.4-0.7c-0.2 0-0.8 0-0.9-0.2-0.1-0.1-0.1-0.2-0.1-0.3s0-0.3 0.1-0.3c0.2-0.1 0.5 0 0.8 0h2.1 0.6 0.7 0.3 1 0.4 1.2 0.5v-0.4h-1c-0.2 0-0.7-0.1-0.9 0-0.2 0-0.7-0.1-0.8 0h-0.5-1.1-0.6c-0.2 0-0.7-0.1-0.9 0-0.3 0-0.6-0.1-0.9-0.1h-0.2-0.3c-0.6 0-0.6-0.1-0.6-0.7h0.1 0.4c0.3 0 0.9 0.1 1.2 0h0.7 0.7 0.5 0.3 1.6 0.4 0.5 0.4 1v-0.4h-0.5-0.7-0.4-0.6c-0.2 0-0.4-0.1-0.5 0h-0.7-3.2-0.6c-0.1 0-0.2 0-0.3-0.1-0.1 0-0.2 0-0.3-0.1s-0.1-0.6-0.1-0.8c0.2 0 0.4 0 0.5-0.1 0.3 0 0.8 0.1 1.1 0h0.4 0.3 0.7 0.5 0.5 0.4 3.5v-0.4h-0.6-1.2-0.5c-0.2 0-0.4-0.1-0.5 0h-1.7-0.3-1.6c-0.2 0-0.4-0.1-0.5 0h-0.2c-0.2 0-0.5 0-0.7-0.1-0.1-0.1-0.1-0.6 0-0.7s0.1-0.1 0.2-0.1c0.8 0 1.6 0 2.4 0.1h0.6 2 0.4 0.3 1.4 0.5v-0.4c-0.2 0-0.4-0.1-0.6 0h-2.6c-0.2 0-0.7-0.1-0.8 0h-3.1c-0.2 0-0.5 0-0.8-0.1 0-0.1 0-0.2-0.1-0.3 0-0.2 0-0.4 0.1-0.5 1.1 0 2.2 0.1 3.3 0.1h0.4c0.3 0 0.6 0.1 1 0.1h0.4 0.9c0.2 0 1.5 0 2 0.1v-0.5h-0.3-0.5-0.4-1.2-0.4-1.1-1.6c-0.2 0-0.6-0.1-0.7 0h-0.6c-0.4 0-0.7-0.1-1.1-0.1 0-0.2 0-0.7 0.1-0.7h0.4 0.3 0.4 1 0.8 1 1.8 2v-0.4h-0.2-0.4c-0.1 0-0.3-0.1-0.4 0-0.2 0-0.5-0.1-0.7 0-0.4 0-0.7 0-1-0.1h-0.4-0.5c-0.2 0-0.5-0.1-0.6 0h-0.8-0.4-0.9c-0.1 0-0.3-0.1-0.4 0h-0.9v-0.1c0-0.2 0-0.7 0.2-0.7h1.2 0.6 1.5 0.8 0.3c0.2 0 0.4 0 0.6 0.1h2.4v-0.4h-0.6-2.3c-0.3 0-0.9-0.1-1.1 0-0.1 0-0.3-0.1-0.4 0h-0.2-1c-0.4 0-0.7-0.1-1.1-0.1h-0.3c-0.2 0-0.5 0-0.7-0.1-0.1 0 0-0.1 0-0.1 0.1-0.5 0.1-0.6 0.7-0.6h0.4 0.5c0.3 0 0.7 0 1.1 0.1h0.5c1.5 0 3.1 0 4.6 0.1v-0.4h-0.3-1.2-0.6-0.5c-0.2 0-0.5-0.1-0.7 0-0.4 0-0.9 0-1.3-0.1h-0.4c-0.2 0-0.7-0.1-0.8 0h-1.6v-0.1c0-0.2 0-0.6 0.2-0.6 0.2-0.1 0.5-0.1 0.7-0.1h1 0.3c0.8 0.1 1.6 0.1 2.4 0.1h0.7 1 0.5 0.8v-0.4h-0.3-0.5-1.4c-0.1 0-0.4-0.1-0.5 0h-2.9-1.2c-0.2 0-0.3 0-0.4-0.1 0-0.1 0.1-0.5 0.2-0.6 0.1 0 0.1-0.1 0.2-0.1 0.6 0 1.2 0 1.8 0.1h0.7c0.1 0 0.3-0.1 0.4 0 0.8 0 1.6 0.1 2.4 0.1h0.7 0.9v-0.4h-0.6-0.4-1.5c-0.2 0-0.5-0.1-0.6 0-0.6 0-1.2 0-1.8-0.1-0.2 0-0.6-0.1-0.7 0h-0.2c-0.4 0-0.7-0.1-1.1-0.1 0-0.2 0.1-0.6 0.3-0.7 0.1-0.1 0.2 0 0.2-0.1 0.1 0 0.2 0 0.4 0.1h0.4 0.6 0.7c0.5 0 1 0.1 1.5 0.1h1.8 1.1v-0.4c-0.3 0-0.7 0-0.9 0.1h-0.5-0.5-0.3-0.6-0.3-1.9c-0.2 0-0.6-0.1-0.8 0-0.2 0-0.8 0-0.9-0.1s0.1-0.6 0.1-0.6c0.1-0.1 0.2-0.1 0.3-0.1 0.3 0 0.6 0.1 1 0.1h1 0.3 0.6 0.7 0.9 1.6v-0.4h-0.5c-0.2 0-0.7-0.1-0.9 0-0.1 0-0.3-0.1-0.4 0h-0.3c-0.4 0-0.7-0.1-1.1-0.1h-0.4-0.6-0.3-0.3c-0.3 0-1 0.1-1.2-0.1 0-0.2 0.2-0.6 0.3-0.7 0.5 0 1 0.1 1.5 0.1h1.4c0.1 0 0.3 0 0.4 0.1h0.6 0.4 1.1 0.5v-0.4h-0.3-1.3-1.1c-0.2 0-0.6-0.1-0.8 0-0.1 0-0.2 0-0.3 0.1-0.2 0-0.5-0.1-0.7-0.1h-1.1c0-0.2 0.1-0.3 0.2-0.5 0-0.1 0-0.2 0.1-0.3 0-0.1 0.1-0.1 0.2-0.1h1 0.6c0.5 0 1 0.1 1.4 0.1h0.9c0.5 0 1 0 1.4 0.1v-0.4c-0.2 0.1-1.1 0.1-1.3 0-0.2 0-0.5-0.1-0.6 0h-0.6-0.4-1.6c-0.2 0-0.4-0.1-0.6-0.1 0-0.3 0.2-0.6 0.3-0.8 0.2 0 0.4 0.1 0.6 0h1.5 0.4 1.7c0.3 0 0.5 0.1 0.8 0.1v-0.4h-0.2c-0.2 0-0.5-0.1-0.7 0h-1.2c-0.2 0-0.6-0.1-0.7 0h-0.2c-0.3 0-0.7 0-1-0.1-0.2 0-0.4 0-0.6-0.1v-0.1c0-0.1 0.2-0.5 0.3-0.6 0 0 0.1-0.1 0.2-0.1h1.3 1.7 1.2v-0.4h-0.3-0.5c-0.2 0-0.6-0.1-0.8 0-0.2 0-0.5-0.1-0.7 0-0.3 0-0.7-0.1-0.9 0h-0.4-0.4c0-0.1 0.3-0.7 0.4-0.8 0.2-0.1 0.6 0 0.8 0h1.2 0.7 0.3 0.5 0.1v-0.4h-0.1c-0.2 0-0.4 0-0.5 0.1h-0.4c-0.2 0-0.4-0.1-0.6 0h-0.2-0.2-0.4-0.9c-0.1 0 0-0.2 0-0.2 0.1-0.1 0.3-0.5 0.4-0.6s0.3-0.1 0.4-0.1h0.6 1 0.4 0.4v-0.4h-0.2-0.8-0.3c-0.2 0-0.6-0.1-0.8 0h-0.3c0-0.2 0.1-0.3 0.2-0.4s0.1-0.3 0.3-0.3h0.3 1 0.5 0.3v-0.4c-0.2 0-0.5-0.1-0.7 0h-0.2c-0.2 0-0.5 0-0.6-0.1 0-0.2 0.3-0.3 0.4-0.4s0.2-0.3 0.3-0.4h0.9v-0.3h-0.5v-0.1s0.5-0.6 0.6-0.7c0.2-0.4 1.5-1.4 1.7-1.6 0.2-0.1 0.4-0.3 0.6-0.4 0.3-0.1 0.7 0 1.1 0h1.4 1.3 0.8 2.9 0.3 0.6c0.6 0 1.2-0.1 1.8 0 0.7 0 1.4 0.1 2.1 0.1 0.4 0 0.8-0.1 1.2 0 0.3 0 0.5 0.1 0.8 0.1h2.1 1.4 0.4 0.7 0.4 0.3 0.5c0.2 0 0.4 0.1 0.6 0.1h0.6 2.3 0.8c0.5 0 0.9-0.1 1.4-0.1s0.9 0.1 1.4 0h0.7 0.5 2.1 1.9 0.4c0.5 0 1 0.1 1.6 0 0.2 0 0.4-0.1 0.7-0.1 0.2 0 0.4 0 0.6-0.1h1.3c0.2 0 0.5-0.1 0.7 0 0.1 0 0.2 0.1 0.2 0.2 0.4 0.3 1.3 1.1 2 1.8v0.1h0.1c0.2 0.1 0.5 0.4 0.4 0.5 0 0.1-0.2 0.1-0.3 0.1h-0.3v0.4c0.3 0 0.6 0 0.9 0.1 0.2 0.1 0.6 0.6 0.6 0.8h-0.2c-0.1 0-1 0-1.3-0.1v0.4h1.7 0.3c0.1 0.1 0.2 0.3 0.3 0.4 0 0.1 0.2 0.2 0.1 0.3 0 0.1-0.1 0.1-0.1 0.1h-1.3-0.4-0.6v1.7h1.8c0.3 0 0.7 0 0.9 0.1 0.1 0.1 0.4 0.6 0.5 0.8 0 0-0.1 0-0.1 0.1-0.2 0-0.7-0.1-0.8 0h-0.5c-0.2 0-0.5-0.1-0.7 0h-0.2c-0.3 0-0.6 0-0.9-0.1v0.4c0.8 0 1.8 0.1 2.6 0.1 0.2 0 0.9-0.1 1 0s0.1 0.2 0.2 0.3c0 0.1 0.1 0.1 0.1 0.2s0.1 0.2 0.1 0.3c-0.1 0-0.1 0-0.2 0.1-0.3 0-0.8-0.1-1-0.1h-0.2-0.5-1.3-0.5-0.4v0.4h0.4 0.8 0.5 1.9 0.7c0.2 0.1 0.2 0.3 0.3 0.4s0.1 0.2 0 0.3h-0.3c-0.2 0-0.5-0.1-0.6 0h-0.3c-0.2 0-0.6-0.1-0.7 0h-0.8-0.3-0.7-0.3-0.4v0.4c0.3-0.1 0.7-0.1 0.9-0.1h0.1c0.4 0.1 0.8 0 1.1 0h2.1c0.2 0 0.4-0.1 0.5 0s0.3 0.5 0.3 0.7c0.1 0-0.2 0.1-0.2 0.1h-0.7c-0.2 0-0.5-0.1-0.7 0h-0.9-0.2c-0.2 0-0.8-0.1-0.9 0h-1.4v0.4h0.5 1c0.3 0 0.5 0.1 0.8 0.1h0.7 1.4 0.5 0.4c0.1 0 0.3 0.7 0.3 0.8-0.2 0.1-0.7 0-0.9 0h-0.4-0.2-0.5c-0.2 0-0.6-0.1-0.8-0.1-0.1 0-0.2 0-0.3 0.1h-1-0.4c-0.2 0-0.4-0.1-0.6 0h-0.6v0.3h0.7 0.4 0.5 1.9c0.4 0 1 0.1 1.4 0 0.2 0.1 0.9-0.1 1 0.1 0.1 0.1 0.1 0.3 0.2 0.5s0.1 0.2-0.1 0.3h-1.2c-0.2 0-0.5-0.1-0.6 0h-0.7-0.3-0.5-0.6-0.3c-0.3 0-0.7-0.1-0.9 0h-0.7v0.4c0.3-0.1 1 0 1.2 0h1.2 0.8 0.6 0.5c0.4 0 0.8 0 1.2-0.1h0.3c0.2 0 0.4 0 0.5 0.1s0.3 0.6 0.1 0.7-0.5 0-0.7 0h-1.6-0.6-0.4c-0.2 0-0.8-0.1-1 0h-0.5c-0.2 0-0.4-0.1-0.6 0-0.4 0-0.7-0.1-1.1-0.1v0.4h0.5 0.9 1.7 0.3 0.3 0.9 0.4 0.5 0.6c0.1 0 0.3 0 0.4 0.1 0.2 0.1 0.2 0.5 0.3 0.7h-0.3-0.1-0.3-1.2-0.4-0.3-1.1c-0.2 0-0.4-0.1-0.6 0h-0.7-1-1v0.4h0.2 0.6 1.1 0.8 0.6 0.8 0.8 0.6c0.2 0 0.6 0.1 0.8 0 0.2 0 0.4 0 0.6 0.1 0.1 0.1 0.2 0.5 0.2 0.7 0 0-0.1 0-0.1 0.1h-0.5-0.6-2-0.8c-0.2 0-0.8-0.1-1 0h-1.5-0.5-0.3v0.4h0.4c0.5-0.1 0.9 0 1.4 0h2c0.4 0 0.9 0.1 1.2 0 0.3 0 2.1 0 2.3 0.1 0.1 0.2 0.1 0.5 0.1 0.7 0 0-0.1 0-0.2 0.1h-1.3c-0.1 0-0.3-0.1-0.4 0h-0.5c-0.2 0-0.7-0.1-0.9 0h-0.6-2.2c-0.2 0-0.4-0.1-0.5 0-0.1 0-0.7 0-0.9-0.1v0.4h0.6 0.5 0.6 0.5 1.8 0.4c0.5 0 1 0.1 1.5 0h0.5c0.2 0 1 0 1.1 0.1s0.2 0.5 0.2 0.7h-0.1-0.6c-0.2 0-0.5-0.1-0.7 0h-0.6-0.3c-0.4 0-0.7-0.1-1-0.1h-1.2-0.3-0.4-0.8c-0.1 0-0.3-0.1-0.4 0h-1.2v0.5c-0.8-0.2-0.6-0.2-0.4-0.2 0.3 0 0.5 0.1 0.8 0.1h0.8c0.3 0 0.6 0 0.9-0.1h3.3c0.2 0 1.3 0 1.4 0.1s0 0.2 0 0.3 0.1 0.3 0 0.4c-0.1 0.2-0.8 0-1 0.1h-0.3-0.9c-0.2 0-0.5-0.1-0.6 0-0.2 0-0.8-0.1-0.9 0-0.2 0-0.5-0.1-0.7 0h-1.4-0.4-0.5-0.4-0.4v0.4c0.3-0.1 0.8 0 1.1 0h0.6 1.2 0.7 1.3 2.2c0.3 0 0.5 0 0.8 0.1 0 0.2 0.2 0.6 0 0.7-0.1 0-0.2 0-0.2 0.1-0.2 0-0.4 0-0.6 0.1h-0.9-0.3-0.4c-0.3 0-0.7-0.1-1 0-0.3 0-0.6-0.1-0.9 0h-0.7c-0.2 0-0.6-0.1-0.7 0h-0.7-0.4-1v0.4h0.1c0.5 0 1-0.1 1.6-0.1h1.1c0.2 0 0.3 0.1 0.5 0h0.4 1.8 1.3 0.4c0.1 0 0.6 0 0.7 0.1v0.3c-0.3-0.1-0.3 0-0.4 0.1"/><path class="st2" d="m62.9 28.8v-0.8-0.8-0.4-1.2-1.8c0-0.2 0-0.4-0.1-0.6h-0.4-0.4-0.6c-0.4 0-0.9-0.1-1.3 0h-0.8-0.4-0.4-0.4c-0.2 0-0.3-0.1-0.5-0.1h-0.7-0.5-0.7c-0.3 0-0.7 0-1-0.1h-0.6c-0.2 0-0.3-0.1-0.5-0.1h-1.4-0.3-1.5-0.7-3.3-0.6-1.2-0.6c-0.3 0-0.5 0-0.8-0.1h-0.7-0.8c-0.4 0-0.7 0.1-1.1 0.1h-1.2-1.9-0.6-1.4-0.8c-0.2 0-0.4-0.1-0.7-0.1h-0.8-0.6-1.9-1.5-0.9-1.4c-0.5 0-1 0.1-1.5 0-0.4-0.1-0.9 0-1.3 0h-0.1c-0.1 0.2 0 0.5 0 0.7v0.8 1.2 1 2.8 0.5 0.8 1.1 3.3c0 0.2 0 0.5-0.1 0.7v0.8 0.4 1.9 0.8c0 0.3-0.1 0.6-0.1 0.9v0.7 0.6 1.1 0.5 0.6 0.7 0.9c0 0.4-0.1 0.8-0.1 1.2v0.4 0.8 0.7c0 1.8-0.1 3.5-0.1 5.2v1.2 1.9 0.4c0 0.6-0.1 1.3-0.1 1.9v0.5c0 0.9 0 1.7 0.2 2.5 0.1 0.2 0.1 0.3 0.2 0.5 0.1 0.3 0.2 0.7 0.4 1 0.3 0.4 0.6 0.8 1 1.1 0.1 0 0.1 0.1 0.2 0.1 0.1 0.1 0.2 0.1 0.3 0.2 0.2 0.1 0.3 0.1 0.5 0.2s0.5 0.2 0.7 0.3 0.5 0.1 0.7 0.2c0.4 0.1 0.9 0.3 1.4 0.4s0.9 0.1 1.4 0.2c1.4 0.2 2.8 0.4 4.2 0.5h0.9c0.4 0 0.8 0.1 1.2 0.1l1.2 0.3c0.2 0 0.4 0.1 0.6 0.1s0.4 0.1 0.6 0.1c0.2 0.1 0.4 0.2 0.5 0.2 0.2 0.1 0.3 0.1 0.5 0.2 0.8 0.3 1.5 0.9 2.2 1.5 0.2 0.3 0.4 0.5 0.6 0.8 0.1 0.2 0.2 0.3 0.3 0.5 0 0 0 0.1 0.1 0.1 0.3-0.8 0.7-1.5 1.3-2.1 0.2-0.2 0.5-0.3 0.8-0.5s0.6-0.5 1-0.5c0.2-0.1 0.4-0.1 0.5-0.2 0.2-0.1 0.5-0.2 0.8-0.2 0.1 0 0.2-0.1 0.2-0.1 0.1-0.1 0.3-0.1 0.4-0.1h0.2c0.1 0 0.1-0.1 0.2 0 0.1 0 0.2-0.1 0.3-0.1 0.1-0.1 0.2-0.1 0.3-0.1 0.1-0.1 0.2-0.1 0.3-0.1h0.2c0.1-0.1 0.2-0.1 0.3-0.1h0.2 0.2 0.2 0.2c0.1-0.1 0.4 0 0.5 0h0.2 0.3c0.2-0.1 0.4 0 0.6 0h0.2c0.2-0.1 0.4-0.1 0.6-0.1 0.1 0 0.2-0.1 0.3-0.1s0.2-0.1 0.3-0.1h0.2c0.1-0.1 0.3 0 0.4 0s0.2-0.1 0.3-0.1c0.1-0.1 0.3 0 0.5 0 0.1-0.1 0.5-0.2 0.7-0.2 0.1 0 0.2-0.1 0.3-0.1h0.2c0.2-0.1 0.3-0.1 0.6-0.1 0.1-0.1 0.3-0.1 0.4-0.1 0.1-0.1 0.4-0.2 0.5-0.2s0.2-0.1 0.2-0.1c0.3-0.1 0.6-0.2 0.9-0.3s0.7-0.3 1-0.4c0.2-0.1 0.3-0.1 0.5-0.2 0.3-0.1 0.5-0.3 0.7-0.5 0.1-0.1 0.3-0.2 0.4-0.3 0.2-0.2 0.4-0.3 0.6-0.6s0.4-0.8 0.5-1.1c0-0.2 0.1-0.4 0.1-0.6s0.1-0.4 0.1-0.5v-0.9-1-0.3-0.5-1.7-1.4-0.6-0.3-0.8-1.6-2.2c0-0.2 0-0.4 0.1-0.6v-1.1c0-0.2 0-0.3 0.1-0.5 0-0.3-0.1-0.6-0.1-0.9 0-0.8 0.1-1.5 0.1-2.3 0-0.3-0.1-0.6-0.1-0.8v-0.6-0.3-0.5-0.3-0.8c0-0.5 0-1.1 0.1-1.6v-0.4-0.3-0.6-0.8-0.7-0.3c0-0.5-0.1-1-0.1-1.5v-0.8-0.4c0-0.3 0-0.7-0.1-1v-0.6-0.8-0.7-0.7-0.4c-0.2 0-0.2-0.3-0.2-0.7m-0.7 9.7v0.2 0.4 0.4 2.2 0.3 0.4 0.3 0.3 0.3 0.6c0 0.3 0.1 0.6 0.1 0.9v0.4 0.3 0.4 0.2 0.5c0 1.7 0 3.4-0.1 5.1v1.8 0.5 2.1c0 0.2-0.1 0.4-0.1 0.6s0.1 0.3 0.1 0.5 0 0.3-0.1 0.5v0.2 0.2 0.3 0.7 0.3 0.6c0 0.6 0 1.2-0.1 1.8v0.4c0 0.3-0.2 0.6-0.3 0.9-0.3 0.5-0.9 0.9-1.4 1.2-0.3 0.2-0.5 0.4-0.8 0.5-0.3 0.2-0.7 0.3-1.1 0.4s-0.9 0.3-1.3 0.4c-0.2 0-0.3 0.1-0.5 0.1-0.5 0.1-0.9 0.2-1.4 0.3h-0.3c-0.3 0.1-0.6 0.1-1 0.2-0.4 0-0.7 0.1-1.1 0.1s-0.8 0.1-1.2 0.1h-1c-0.3 0-0.5 0.1-0.8 0.1h-0.5c-0.6 0.1-1.2 0.3-1.9 0.4-0.3 0.1-0.7 0.1-1 0.2-0.2 0.1-0.3 0.1-0.5 0.2-0.1 0-0.3 0.1-0.4 0.1-0.9 0.5-1.7 1.1-2.3 1.9-0.1 0.1-0.1 0.2-0.2 0.3 0 0-0.2 0.1-0.2 0.2h-0.1c-0.1-0.1-0.2-0.2-0.2-0.3-0.3-0.3-0.5-0.6-0.8-0.8-0.2-0.2-0.5-0.3-0.8-0.5-0.1-0.1-0.3-0.2-0.4-0.3-0.2-0.1-0.5-0.2-0.7-0.4-0.3-0.1-0.7-0.2-1-0.4-0.2-0.1-0.4-0.1-0.7-0.2-0.1 0-0.2-0.1-0.3-0.1-0.4-0.1-0.7-0.1-1-0.2-0.1 0-0.2-0.1-0.4-0.1h-0.4c-0.3 0-0.5-0.1-0.8-0.1h-0.8c-0.1 0-0.3-0.1-0.4-0.1h-1c-0.7-0.1-1.4-0.2-2-0.3-0.3 0-0.6 0-1-0.1-0.3 0-0.7-0.1-1-0.2-0.4-0.1-0.8-0.1-1.2-0.2-0.5-0.1-1-0.4-1.5-0.6-0.7-0.3-1.5-0.8-1.9-1.5-0.6-1-0.6-2.4-0.6-3.7 0-0.2-0.1-0.3 0-0.5 0-0.1 0-0.3 0.1-0.4v-0.4-1-0.8-0.3-0.3-0.7c0-0.5 0.1-1 0.1-1.5 0-1.2 0-2.3 0.1-3.4v-0.5-1c0-0.3 0.1-0.6 0.1-0.9v-3.8c0-0.3 0-0.6 0.1-0.9v-0.7-2.1-1c0-0.2 0-0.5 0.1-0.7v-1.4-3.2c0-0.1 0-0.3 0.1-0.4v-0.2-0.7-1.9-1.1c0-0.2 0-0.3 0.1-0.5v-0.5c0-0.2 0.1-0.3 0.1-0.5v-2-0.7-0.5-0.5c0-0.2-0.1-0.9 0.1-1.1 0.1-0.1 0.3 0 0.5 0 0.2-0.1 0.7 0 1 0 0.2-0.1 0.4 0 0.6 0h2c0.1-0.1 0.4 0 0.6 0 0.2-0.1 0.4 0 0.6 0h0.3c0.2-0.1 0.4 0 0.6 0 0.5 0 1 0.1 1.5 0.1 0.2-0.1 0.6 0 0.9 0 0.2-0.1 0.7 0 0.9 0h1.1c0.1-0.1 0.3 0 0.4 0h0.9c0.2-0.1 0.4 0 0.6 0h0.3c0.3 0 0.6 0.1 0.9 0.1 0.1-0.1 0.3 0 0.5 0h0.4 0.5c0.2-0.1 0.8 0 1.1 0h0.6 0.3 0.6 2.3 0.3 0.2c0.3-0.1 0.8 0.1 1.1 0.1h0.2 0.2c0.2-0.1 0.5 0 0.7 0h1.6c0.2 0 0.4 0.1 0.6 0.1h0.3c0.1-0.1 0.3 0 0.4 0h0.8 0.2c0.3-0.1 0.6 0 0.9-0.1 0.4 0 0.7 0.1 1 0.1h0.7 0.2c0.2-0.1 0.6 0 0.8 0h1c0.1-0.1 0.6 0 0.7 0h1.9c0.2 0 0.4 0 0.5 0.1h0.4 0.3 1 1.5s0.3-0.1 0.3 0v1.5 1.5 2.8c-0.1 1.7 0 3.3 0 5v0.7c0 0.3-0.1 0.6 0 0.9v0.4 1.1c-0.4 0-0.4 0.2-0.4 0.5"/><path class="st2" d="m46.5 61.8c-0.1-0.3-0.2-0.5-0.2-0.7 0-0.1 0-0.2-0.1-0.3 0-0.1-0.1-0.1-0.2-0.1-0.1 0.1-0.2 0.1-0.2 0.2 0 0.2 0.1 0.4 0.2 0.6s0.2 0.5 0.3 0.8c0.1 0.2 0.1 0.3 0.2 0.5 0.1 0.1 0.3 0.3 0.5 0.2 0.1 0 0-0.2-0.1-0.3-0.2-0.3-0.3-0.6-0.4-0.9"/><path class="st2" d="m35.7 48.8c0.1-0.2 0.2-0.4 0.3-0.5s0.2-0.2 0.3-0.2c0.1-0.1 0.2-0.2 0.3-0.4 0.1-0.1 0.2-0.1 0.2-0.2 0.1-0.3 0.1-1 0.1-1.3v-0.9-0.6-1.2-0.6c0-0.5 0.1-1.1 0-1.6v-1.5-0.5-0.4-1-0.5-0.8c0-0.2 0.1-0.5 0-0.7-0.2 0.1-1 0.9-1 1.2-0.1 0.2 0 0.6 0 0.9 0 0.4-0.1 0.8-0.1 1.2v0.3 0.6c0 0.3-0.1 0.6-0.1 1v0.6 0.6 0.8c0 0.4-0.1 0.9-0.1 1.3 0 0.3 0 0.6 0.1 0.8 0 0.2-0.1 0.5-0.1 0.7s0.1 0.4 0 0.6c0 0.3-0.1 0.6-0.1 0.9 0.2 0.4 0.2 0.9 0.2 1.4"/><path class="st2" d="m49.8 49.1c0-0.3-0.2-0.5-0.4-0.7-0.1-0.1-0.2-0.3-0.4-0.4-0.3-0.2-0.6-0.4-1-0.4h-0.6c-0.1 0.1-0.3 0-0.4 0.1-0.2 0.1-0.5 0.1-0.7 0.2-0.7 0.2-1.3 0.5-1.9 0.8-0.2 0.1-0.4 0.3-0.6 0.4s-0.3 0.4-0.6 0.5c-0.2 0-0.3-0.2-0.4-0.3-0.1 0-0.1-0.1-0.2-0.1-0.3-0.2-0.5-0.5-0.8-0.6-0.5-0.3-0.9-0.3-1.5-0.4-0.2 0-0.3-0.1-0.5-0.1-0.8-0.2-1.9-0.2-2.6 0.3-0.2 0.1-0.3 0.2-0.4 0.4-0.3 0.2-0.4 0.3-0.5 0.6 0 0.1-0.1 0.2-0.1 0.3 0.1 0.1 0.3 0.1 0.4 0.1 0.1-0.1 0.4 0 0.5 0h1.4c0.1-0.1 0.3-0.1 0.5-0.1h1 0.4c0.4 0 0.8 0.1 1.3 0.1h0.1 0.6c0.1 0 0.1 0 0.2 0.1s0 0.3 0.1 0.4c0.1 0.4 0.4 0.6 0.8 0.6 0.5 0 0.8-0.4 0.8-0.9v-0.2c0.1-0.1 0.2-0.1 0.4-0.1h0.2 0.2c0.1-0.1 0.5 0 0.7 0 0.1 0 0.2-0.1 0.3-0.1 0.2-0.1 0.4-0.1 0.6-0.1h0.2c0.2-0.1 0.4 0 0.6 0 0.2-0.1 0.4-0.1 0.6-0.1h1.7c-0.2-0.3 0-0.2 0-0.3"/><path class="st2" d="m37.3 46.6v0.7h0.3c0.1 0 0.2-0.1 0.3-0.1s0.2-0.1 0.3 0h0.2c0.3-0.1 0.9 0 1.2 0.1s0.6 0 0.9 0.1c0.4 0.1 0.9 0.3 1.3 0.5 0.1 0.1 0.8 0.6 0.8 0.6 0.2-0.3 0.2-0.6 0.2-0.9 0.1-0.4 0.1-0.8 0.1-1.2 0-0.6 0.1-1.2 0.1-1.9v-0.8-2.3c0-1.2 0.1-2.4 0-3.6 0-0.4 0-0.8-0.2-1.1-0.4-0.6-1-0.8-1.6-1-0.2-0.1-0.3-0.1-0.5-0.2-0.2 0-0.4-0.1-0.6-0.1-0.3-0.1-0.6-0.1-0.9-0.1h-1.3c-0.1 0.1-0.3 0-0.4 0.2s0 0.6 0 0.8v2.2 1.3c0 0.4-0.1 0.7-0.1 1.1 0 0.3 0.1 0.5 0.1 0.8v1.7c0 0.2 0 0.5-0.1 0.7v1.4c0 0.2 0 0.5-0.1 0.7-0.1 0 0 0.2 0 0.4m4.6-0.7c-0.4-0.2-0.9-0.4-1.4-0.5-0.2-0.1-0.3-0.1-0.5-0.1-0.3-0.1-0.5-0.1-0.8-0.2-0.3 0-0.6-0.1-0.9-0.1h-0.1c-0.2-0.1-0.2-0.6 0.1-0.6 0.2 0 0.4 0.1 0.6 0.1s0.4 0.1 0.6 0.1c0.2 0.1 0.3 0.1 0.5 0.2 0.5 0.2 0.9 0.3 1.3 0.5 0.1 0 0.2 0.1 0.3 0.1 0.3 0.1 0.6 0.4 0.8 0.6 0.1 0.1 0.2 0.1 0.2 0.2-0.3 0-0.5-0.2-0.7-0.3m0.6-2.9c-0.1 0-0.1 0 0 0-0.3 0.1-1-0.6-1.2-0.7-0.3-0.1-0.5-0.2-0.8-0.3-0.4-0.1-0.7-0.3-1.1-0.4-0.2 0-0.3 0-0.5-0.1-0.2 0-0.6 0-0.7-0.1-0.2-0.2-0.1-0.6 0.2-0.6 1.2 0.1 2.2 0.6 3.1 1.2 0.3 0.1 0.9 0.5 1.1 0.8-0.1 0.1 0 0.2-0.1 0.2m-4.4-5.4c0.4 0 0.7 0.1 1 0.2 0.1 0 0.2 0 0.3 0.1 0.2 0.1 0.4 0.2 0.6 0.2 0.2 0.1 0.4 0.1 0.6 0.2 0.1 0 0.2 0.1 0.3 0.1 0.3 0.1 0.5 0.2 0.8 0.4 0.2 0.1 1.1 0.6 0.9 0.8 0 0.1-0.1 0.1-0.2 0-0.2 0-0.3-0.2-0.4-0.2-0.2-0.1-0.3-0.2-0.5-0.3-0.8-0.4-1.8-0.7-2.7-0.9-0.3-0.1-0.6-0.1-0.8-0.2-0.1 0-0.1-0.3 0.1-0.4"/><path class="st2" d="m44.3 31c0.1 0 0.2-0.1 0.3-0.1 0.1-0.1 0.3-0.2 0.3-0.3 0.1-0.2-0.1-0.6-0.3-0.7h-0.2c0 0.2 0.1 0.2 0.1 0.4 0 0.1-0.1 0.2-0.2 0.3s-0.1 0.4 0 0.4"/><path class="st2" d="m44.9 28.4c-0.2-0.1-0.4-0.1-0.6-0.2s-0.3-0.2-0.5-0.2c-0.1 0-0.2 0.1-0.2 0.2 0 0.2 0.2 0.3 0.3 0.4s0.2 0.3 0.3 0.3 0.2-0.1 0.3-0.2 0.2-0.1 0.3-0.2c0.2 0 0.2-0.1 0.1-0.1"/><path class="st2" d="m43.7 32.2c0.2 0.1 0.6 0 0.6-0.2s-0.2-0.3-0.3-0.3c-0.1 0.1-0.5 0.4-0.3 0.5"/><path class="st2" d="m48.8 35.6c-0.1-0.1-0.3 0-0.4 0h-0.5c-0.2 0.1-0.4 0-0.7 0.1-1 0.2-1.9 0.3-2.7 0.8-0.2 0.1-0.4 0.2-0.6 0.4-0.1 0.1-0.1 0.3-0.1 0.5-0.1 0.5-0.1 0.9-0.1 1.4 0 0.2 0 0.5-0.1 0.7v1.1c0 0.1 0 0.3-0.1 0.4v1 1.5 1.5 0.4 0.2 0.7c0 0.7 0 1.5 0.2 2l0.1 0.1c0.3-0.1 0.6-0.3 0.8-0.5 0.2-0.1 0.5-0.2 0.8-0.3 0.3-0.2 0.4-0.3 0.8-0.3 0.1-0.1 0.4-0.1 0.6-0.1h0.2 0.2c0.3-0.1 0.9 0 1.2 0.1 0.1 0 0.3 0.1 0.4 0.1 0.1-0.4 0-0.9 0-1.3v-0.7-0.8-0.4-1-0.6-1.1-0.5-2-0.6-1.5c0-0.2-0.1-0.3-0.1-0.5v-0.6c0.1-0.1 0.1-0.2 0.1-0.2m-4.8 6.8c0.6-0.6 1.5-0.9 2.2-1.2 0.2-0.1 0.5-0.3 0.8-0.3 0.1-0.1 0.3-0.2 0.4-0.2 0.2 0 0.3 0.1 0.3 0.3s-0.1 0.3-0.2 0.4c-0.2 0.2-0.5 0.2-0.8 0.3s-0.6 0.2-0.9 0.3c-0.2 0.1-0.4 0.1-0.6 0.2-0.4 0.1-0.7 0.3-1 0.5-0.1 0.1-0.2 0.2-0.4 0.2h-0.1c0-0.3 0.2-0.5 0.3-0.5m3.7 2.1c-0.2 0.1-0.5 0.1-0.8 0.2-0.2 0-0.5 0.1-0.7 0.2-0.8 0.2-1.4 0.5-2.1 0.9-0.1 0-0.3 0.3-0.4 0.1-0.1-0.1 0.1-0.2 0.2-0.3 0.3-0.2 0.5-0.4 0.8-0.6s0.6-0.4 1-0.5c0.1-0.1 0.2-0.1 0.3-0.2 0.4-0.2 0.9-0.3 1.3-0.4 0.1 0 0.3 0 0.4 0.1 0.3 0.1 0.2 0.4 0 0.5m0.1-6.5c-0.1 0.1-0.3 0.1-0.4 0.1-0.3 0.1-0.6 0.2-0.9 0.3-0.4 0.1-0.8 0.3-1.2 0.5-0.3 0.2-0.5 0.3-0.8 0.5 0 0-0.4 0.2-0.4 0.1 0-0.3 0.4-0.5 0.6-0.6 0.1-0.1 0.2-0.1 0.3-0.2 0.3-0.2 0.6-0.3 0.8-0.5 0.3-0.1 0.6-0.2 0.9-0.3 0.1-0.1 0.2-0.1 0.3-0.1 0.1-0.1 0.3-0.1 0.4-0.1h0.3c0.3 0 0.2 0.2 0.1 0.3"/><path class="st2" d="m43.2 30.7c-0.1 0-0.1 0-0.2-0.1-0.1 0-0.2 0.1-0.2 0.2v0.3c0 0.2 0 0.4 0.1 0.5s0.1 0.1 0.2 0.1 0.1 0.1 0.2 0.1c0.2 0 0.6-0.3 0.6-0.5-0.1 0-0.6-0.5-0.7-0.6"/><path class="st2" d="m50.6 38.5c0-0.2-0.1-0.5-0.1-0.7v-0.4-0.3h-0.1c-0.1 0.5 0 1.1 0 1.6 0 0.2-0.1 0.4-0.1 0.6v0.3 0.3c-0.1 0-0.2 0-0.2-0.1v-0.5-0.3c0-0.6 0.1-1.3 0.1-1.9v-0.3-0.2h-0.1c0 0.5-0.1 0.9-0.1 1.3 0 0.1 0 0.2-0.1 0.2h-0.1c-0.1-0.4-0.1-0.8-0.1-1.2 0-0.2 0-0.4-0.1-0.6-0.1 0.1-0.1 0.3-0.1 0.5v0.7c0 0.2 0.1 0.5 0 0.7-0.1 1.5-0.1 3-0.1 4.6v0.9c0 0.3-0.1 0.5-0.1 0.8v1.2c0 0.4-0.1 0.8 0 1.2 0 0.1 0 0.2 0.1 0.2 0.1-0.2 0.1-0.5 0.1-0.7 0-0.4 0.1-0.8 0.1-1.3 0-0.3-0.1-0.6 0-0.9 0 0 0-0.1 0.1 0 0.1 0 0.1 0.2 0.1 0.3 0.1 0.3 0 0.6 0 1v0.8 0.9 0.4c0 0.1 0 0.3 0.2 0.3v-1.4-0.6c0-0.2 0-0.4 0.1-0.6 0-0.1 0-0.3 0.1-0.4 0-0.2-0.1-0.4-0.1-0.6v-0.9-0.5c0-0.1 0.1-0.1 0.1-0.1 0.1 0.1 0.2 0.2 0.2 0.3v1.1 0.3c0 0.3 0.1 0.6 0.1 0.9v0.4 1.6c0 0.4 0 0.8 0.1 1.2v0.2h0.1c0.1-0.2 0.1-0.5 0.1-0.8s0.1-0.6 0-1c0-0.2-0.1-0.4-0.1-0.6s0.1-0.4 0.1-0.6c0-0.3-0.1-0.6-0.1-1 0-0.3 0-0.7 0.1-1v-0.8-0.3c0-0.2 0-0.3 0.1-0.5v-0.8-1.3c-0.3-0.7-0.3-1.1-0.3-1.6m-0.9 4.1s-0.2 0.2-0.2 0.1v-0.3-0.8-1c0-0.3 0-0.6 0.1-0.8 0.1 0 0.1 0.1 0.2 0.2 0.1 0.3 0 0.6 0 0.9-0.1 0.6 0 1.3-0.1 1.7m0-3.8c-0.2 0-0.2-0.2-0.1-0.3 0.1 0 0.2 0.3 0.1 0.3m0.4 3.2c-0.1-0.2-0.1-0.4-0.1-0.7s-0.1-0.6 0.1-0.9c0.1 0 0.1 0 0.2 0.1 0.1 0.2 0.1 1.5-0.2 1.5"/><path class="st2" d="m46.7 56.2h0.3 0.7 0.2c-0.2-0.3-0.6-0.6-0.9-0.9l-2.1-2.1c-0.1-0.1-0.3-0.3-0.5-0.4l-0.7-0.7c-0.1-0.1-0.3-0.3-0.5-0.4v0.1c-0.1 0-0.2 0.1-0.3 0.2-0.3 0.3-0.5 0.6-0.8 0.8l-2.4 2.4c-0.1 0.1-1 1-1 1.1 0.6 0.1 1.3 0 1.9 0h0.7c0.1 0 0.3 0 0.4 0.1v0.1c-0.1 0.1-1.2 1.4-1.2 1.4v0.1h2.2 0.1c-0.1-0.2-0.2-0.3-0.3-0.5-0.2-0.2-0.4-0.5-0.5-0.8 0-0.1-0.1-0.2 0-0.2 0.1-0.3 1.4-0.1 1.7-0.1 0.2-0.1 0.6 0 0.8 0 0.3 0 0.7-0.1 1.1 0 0.1 0 0.1 0.1 0.1 0.2 0 0.2-0.5 0.9-0.6 1.2 0 0.1-0.1 0.1-0.1 0.2h1.2 0.7 0.1c0-0.2-0.7-1-0.8-1.2-0.1-0.1-0.2-0.2-0.2-0.3 0-0.4 0.4-0.3 0.7-0.3"/><path class="st2" d="m44.1 57.8c0.2-0.1 0.8-1 0.8-1.2h-0.4c-0.1 0-0.1 0.1-0.2 0.1-0.1 0.1-0.7 0.9-0.7 1 0.2 0.1 0.4 0.1 0.5 0.1"/><path class="st2" d="m40.3 56.6c-0.2 0.2-1.2 0.9-1.2 1.1h0.5c0.2-0.1 1-0.9 1-1.1h-0.3"/><path class="st2" d="m48.7 57.7c0-0.5 0-1-0.4-1.2-0.1 0.3-0.1 0.7-0.1 1.1v1.6 0.3h-2.5-1.1c-0.7 0-1.4-0.1-2.1-0.1-0.5 0-1 0.1-1.5 0.1-0.3 0-2.4-0.2-2.5 0v0.1c0.2 0.3 0.5 0.2 0.9 0.2h0.2 0.2 0.6 1 0.3c0.1-0.1 0.6 0 0.8 0h0.2 1.1c0.2-0.1 0.5 0 0.7 0h1.4c0.1-0.1 0.3 0 0.5 0 0.2-0.1 0.4 0 0.6 0h1.2 0.2v-0.1c0.1-0.2 0-0.5 0-0.8 0-0.2 0-0.3 0.1-0.5 0.3-0.1 0.3-0.4 0.2-0.7"/><path class="st2" d="m48.7 64.4v-0.4-0.3c-0.1-0.1-0.2-0.1-0.4-0.1l-0.1 0.1v0.6 2c0.1 0 0.4 0 0.4-0.2 0.1-0.2 0.1-0.8 0-1.1 0-0.1 0-0.3 0.1-0.6"/><path class="st2" d="m56.4 64.8c-0.5-0.5-1-1-1.5-1.4-0.6-0.6-1.2-1.3-1.9-1.9-0.2-0.2-0.5-0.4-0.7-0.7l-0.3-0.3c-0.9-1-2-1.9-2.9-2.8-0.1 0.4 0 0.8 0 1.2v0.8 0.7c-0.1 0.2-1.5 0.2-1.8 0.2-0.1 0-0.5 0-0.6 0.1v0.1c0.1 0.4 0.3 0.8 0.4 1.1 0.1 0.2 0.2 0.9 0.4 1.1 0.1 0.1 0.6 0.1 0.7 0.1 0.1-0.1 0.5 0 0.6 0 0.3-0.1 0.2 0.5 0.2 0.6v0.5c0 0.3-0.1 2 0.1 2.1 0.1 0.1 0.5 0 0.7 0 0.1 0 0.2-0.1 0.3-0.1 0.1-0.1 0.4 0 0.5 0h0.2c0.1-0.1 0.4 0 0.6 0 0.1 0 0.4-0.1 0.4-0.1 0.1 0 0.2 0.1 0.3 0.1h0.3c0.2-0.1 0.5-0.1 0.8-0.1h0.2c0.1-0.1 0.3 0 0.5 0h0.2 0.2c0.1-0.1 0.2 0 0.3-0.1 0.1 0 0.3-0.1 0.4-0.1 0.2 0 0.4-0.1 0.7-0.1 0.1-0.1 0.4-0.1 0.5-0.1s0.2-0.1 0.3-0.1c0 0 0.2-0.1 0.2-0.2 0-0.4-0.2-0.5-0.3-0.6"/><path class="st2" d="m61.8 38.9v-0.3-0.3-0.6-1-0.9-1.8c0-0.2 0.1-0.7-0.1-0.9-0.1 0.2-0.4 0.4-0.6 0.6-0.7 0.8-1.5 1.5-2.3 2.3-0.5 0.5-1 1.1-1.5 1.6-0.3 0.2-0.5 0.5-0.8 0.8l-0.7 0.7c-0.2 0.2-0.4 0.3-0.5 0.5s-0.3 0.3-0.4 0.5l-1.8 1.8c-0.2 0.2-0.4 0.5-0.6 0.7s-0.6 0.5-0.7 0.7v0.1c0 0.1 1.3 1.4 1.5 1.6 1 1 2.1 2 3.1 3 0.1 0.1 0.2 0.2 0.2 0.3 0.2 0.1 0.3 0.3 0.4 0.4 0.2 0.2 0.3 0.4 0.5 0.5 1 1.1 2.1 2.1 3.2 3.2 0.1 0.1 1 1.1 1.1 1.1 0.2 0 0.1-0.9 0.1-1.1v-0.5-0.4c0-0.1 0-0.2 0.1-0.4 0-0.2-0.1-0.4 0-0.6v-0.3-1.2-0.7-0.4-0.5-0.7-0.2c0-0.2 0-0.4 0.1-0.7 0-0.4 0-0.7-0.1-1.1 0-0.3 0.1-0.6 0.1-0.9 0-0.2 0-0.4-0.1-0.6v-0.3-1-0.4c0-0.3 0-0.5-0.1-0.8v-1.5c-0.1-0.1-0.1-0.2-0.1-0.3"/><path class="st2" d="m48.2 25.8c-0.1 0.1-0.1 0.2-0.2 0.3s-0.1 0.2-0.2 0.3c-0.1 0.2-0.3 0.2-0.4 0.4-0.1 0.1-0.1 0.3-0.3 0.4-0.3 0.2-0.5 0.5-0.6 0.8 0 0.1-0.1 0.1-0.1 0.2 0 0-0.1 0.1 0 0.1 0 0.1 0.1 0.2 0.2 0.3 0.2 0.2 0.3 0.4 0.3 0.7 0 0.2 0.1 0.4 0.1 0.6s-0.1 0.4-0.2 0.6c0 0.1 0 0.3-0.1 0.4s-0.1 0.2-0.2 0.3-0.1 0.2-0.2 0.3c-0.2 0.3-0.5 0.4-0.8 0.6-0.1 0.1-0.2 0.2-0.4 0.3s-0.4 0.1-0.6 0.3c-0.2 0.1-0.3 0.3-0.4 0.5-0.1 0.1-0.2 0.1-0.3 0.2-0.1 0.2 0 0.3 0 0.5 0 0.1 0 0.2-0.1 0.3v0.6 0.2c0.2-0.1 0.4-0.4 0.6-0.6l2.8-2.8c0.2-0.2 0.3-0.4 0.5-0.6 0.3-0.3 0.7-0.6 1-1 0.1-0.1 0.2-0.3 0.3-0.4l0.3-0.3c0.2-0.2 0.4-0.4 0.6-0.5 0.5-0.5 1-1.1 1.5-1.6 0.1-0.1 0.3-0.2 0.4-0.4l1.7-1.7c0.3-0.3 0.7-0.6 0.9-0.9-0.2 0.1-0.5 0.1-0.8 0h-0.2c-0.2 0-0.4 0.1-0.6 0.1s-0.5-0.1-0.7-0.1h-0.6c-0.1 0.1-0.2 0-0.4 0.1h-0.9-0.5l-0.2 0.2c-0.2 0.2-0.3 0.4-0.5 0.6-0.1 0.1-0.1 0.2-0.2 0.2-0.1 0.1-0.2 0.1-0.3 0.2l-0.2 0.2c0.2 0 0.1 0 0 0.1"/><path class="st2" d="m46.4 26.4c-0.1 0.2-0.4 0.3-0.4 0.6v0.3h0.1c0.2-0.3 0.6-0.7 0.3-0.9"/><path class="st2" d="m45.9 30.6s0.1 0.1 0.1 0c0.2-0.1 0.3-0.3 0.3-0.5-0.1 0.2-0.4 0.3-0.4 0.5"/><path class="st2" d="m45.7 28.6-0.2 0.2v1c0 0.1 0.1 0.1 0.2 0.1s0.1-0.1 0.2-0.1c0.3-0.3 0.2-0.6 0.1-0.9-0.1-0.2-0.1-0.3-0.3-0.3"/><path class="st2" d="m45 31.6c0.1 0.1 0.5-0.1 0.5-0.2-0.1-0.1-0.2-0.1-0.3-0.1s-0.3 0.2-0.2 0.3"/><path class="st2" d="m46.9 25.6c-0.1 0.1-0.2 0.3 0 0.4 0.1 0 0.2 0.1 0.2 0 0.1-0.1 0.2-0.3 0.3-0.4 0.2-0.2 0.9-1.2 1.2-1.2v-0.1c-0.2 0-0.4 0-0.6-0.1l-0.2 0.2c-0.1 0.1-0.2 0.3-0.3 0.4s-0.2 0.2-0.3 0.2-0.1 0.1-0.2 0.1c-0.1 0.3-0.1 0.4-0.1 0.5"/><path class="st2" d="m45.2 26.3c-0.1 0.1-0.4 0.6-0.4 0.7h0.1c0.2 0.1 0.4 0 0.5-0.1s0.1-0.3 0.3-0.4l0.6-0.6c0.1-0.1 0.1-0.2 0.2-0.3s0.2-0.3 0.3-0.4 0.2-0.3 0.3-0.4 0.2-0.2 0.2-0.4h-0.3c-0.1 0.1-0.3 0.1-0.3 0.2-0.1 0.1-0.1 0.3-0.2 0.4s-0.3 0.2-0.4 0.3-0.1 0.3-0.1 0.4-0.1 0.1-0.2 0.2c0 0.1 0 0.2-0.1 0.2-0.3 0.1-0.4 0.1-0.5 0.2"/><path class="st2" d="m43.7 26.6v0.3c0.3-0.1 0.6-0.5 0.8-0.8 0.1-0.1 0.1-0.3 0.2-0.4s0.1-0.2 0.2-0.3c0.1-0.3 0.3-0.7 0.5-1h0.1v-0.1h-0.4c-0.2 0.1-0.9 0-1 0.1s-0.1 0.3-0.1 0.4-0.2 0.2-0.2 0.3c-0.1 0.2 0.1 0.4 0.1 0.6s-0.1 0.3-0.1 0.4c-0.1 0.3-0.1 0.4-0.1 0.5"/><path class="st2" d="m43.1 28.6c-0.1 0-0.4 0.4-0.4 0.4 0 0.2 0.2 1 0.4 1s0.4-0.2 0.5-0.3 0.3-0.2 0.4-0.4-0.5-0.6-0.6-0.7h-0.3"/><path class="st2" d="m42.7 30.4c0.1-0.3-0.6-0.8-0.8-0.9-0.2 0.2-0.1 0.2-0.2 0.4 0 0.1-0.1 0.2-0.1 0.2-0.1 0.2 0.1 0.6 0.2 0.7s0.1 0.1 0.2 0.1 0.3-0.2 0.4-0.3c0.2 0 0.3-0.1 0.3-0.2"/><path class="st2" d="m42.3 31.8c-0.1-0.1-0.1-0.2-0.2-0.3 0 0-0.1 0-0.2-0.1-0.3 0.5 0.1 0.6 0.5 0.7h0.1c0-0.1-0.1-0.2-0.2-0.3"/><path class="st2" d="m41 29.6c0.1 0 0.2-0.1 0.3-0.2 0.3-0.4 0.1-0.7-0.3-1-0.1 0-0.3 0.3-0.3 0.3 0 0.1 0.1 0.2 0.1 0.3 0 0.3-0.1 0.7 0.2 0.6"/><path class="st2" d="m41.9 28.7c0.2 0 0.9-0.5 0.8-0.7-0.1-0.1-0.2-0.1-0.3-0.1-0.3 0.1-0.5 0.2-0.8 0.2h-0.2v0.1c0.1 0.2 0.2 0.5 0.5 0.5"/><path class="st2" d="m41.2 31.6c0.1 0 0.5-0.3 0.5-0.4s-0.5-0.6-0.6-0.7h-0.2c-0.1 0.3 0 0.7 0.1 1 0.1 0.1 0.1 0.2 0.2 0.1"/><path class="st2" d="m42.1 26c0.1 0.2 0.5 1.3 0.9 1.3v-0.8c0-0.4 0.1-0.8 0.1-1.2 0-0.1 0-0.2 0.1-0.3 0-0.1 0-0.2-0.1-0.3v-0.3c-0.2 0-0.6 0-0.8-0.1-0.2 0-0.5 0-0.6 0.1-0.3 0.3 0.1 1 0.2 1.3 0 0.1 0.1 0.1 0.2 0.3"/><path class="st2" d="m41.5 27.2h0.3c0.1 0 0.1-0.2 0.1-0.3s0-0.3-0.1-0.4-0.1-0.2-0.2-0.4-0.2-0.4-0.3-0.7-0.3-0.9-0.6-1.1c-0.1-0.1-0.3 0-0.5 0-0.1 0.1-0.6 0.1-0.6 0.2-0.1 0.2 1.8 2.6 1.9 2.7"/><path class="st2" d="m38.1 24.6c0.1 0.2 0.3 0.3 0.5 0.5 0.1 0.2 0.2 0.4 0.3 0.5s0.3 0.1 0.4 0.3c0.2 0.2 0.4 0.5 0.5 0.8l0.3 0.3c0.2 0.2 0.3 0.4 0.5 0.5 0.1 0.1 0.3 0.1 0.4 0.1 0 0 0-0.1 0.1-0.1-0.1-0.2-0.3-0.4-0.4-0.6-0.1-0.1-0.2-0.1-0.3-0.2 0-0.1-0.1-0.1-0.1-0.2-0.1-0.1-0.2-0.3-0.3-0.4l-0.4-0.4c-0.1-0.1-0.1-0.3-0.2-0.4-0.2-0.2-0.3-0.5-0.6-0.7-0.1-0.1-0.3-0.2-0.5-0.2 0 0-0.2 0-0.2 0.2"/><path class="st2" d="m33.1 25.2 2.2 2.2c0.9 0.8 1.7 1.7 2.6 2.5 0.1 0.1 0.2 0.2 0.3 0.4l0.8 0.8c0.5 0.5 1 0.9 1.5 1.4 0.2 0.3 0.5 0.5 0.7 0.8 0.3 0.3 0.7 0.6 1 0.9 0.2 0.2 0.6 0.7 0.8 0.7 0-0.2-0.1-0.6-0.1-0.8v-0.3c0-0.1 0-0.2-0.1-0.3l-0.3-0.3c-0.1-0.1-0.2-0.3-0.3-0.4-0.2-0.2-0.4-0.2-0.6-0.3-0.1-0.1-0.3-0.2-0.4-0.3-0.1 0-0.2-0.1-0.3-0.1-0.1-0.1-0.1-0.2-0.2-0.3s-0.2-0.1-0.3-0.2-0.1-0.3-0.2-0.5c-0.1-0.1-0.1-0.3-0.2-0.4 0-0.1-0.1-0.3-0.1-0.4 0-0.2 0-0.4 0.1-0.6 0-0.1 0-0.2 0.1-0.4 0.1-0.3 0.2-0.5 0.5-0.8 0.1-0.1 0.2-0.2 0.3-0.2-0.1-0.2-0.2-0.3-0.4-0.5-0.1-0.1-0.2-0.1-0.2-0.2-0.1-0.1-0.2-0.3-0.4-0.5s-0.5-0.4-0.7-0.7l-1.4-1.4c-0.2-0.2-0.4-0.4-0.6-0.5s-0.4 0.1-0.6 0.1c-0.1 0-0.2 0-0.3-0.1h-0.7-0.5-0.6c-0.2 0.1-0.6 0-0.8 0h-1.1c-0.3 0.1 0.3 0.4 0.5 0.7"/><path class="st2" d="m40.2 29.6c0 0.2-0.1 0.7 0.2 0.6 0.4-0.1 0-0.5-0.2-0.6"/><path class="st2" d="m30 48.2c0.3-0.3 0.5-0.6 0.8-0.8 0.4-0.4 0.8-0.8 1.3-1.2l0.9-0.9c0.1-0.1 0.2-0.3 0.3-0.4 0.4-0.3 0.9-0.8 1.2-1.2 0-0.1 0.1-0.1 0.1-0.2 0.1-0.3-1.9-2.2-2.2-2.5-0.5-0.5-1-1-1.5-1.6-0.5-0.5-1.1-1-1.6-1.5-0.1-0.1-0.2-0.2-0.2-0.3-0.2-0.2-0.5-0.4-0.7-0.6-0.1-0.1-0.2-0.2-0.3-0.4-0.3-0.4-0.7-0.7-1-1l-0.5-0.5c-0.5-0.4-0.9-0.9-1.4-1.3-0.2-0.2-0.4-0.5-0.7-0.6v1 0.3 0.6 0.5 0.4 2 0.5c0 0.3 0 0.6-0.1 1v2 0.9 1.2 0.6 0.4 1.5 0.5 0.9 0.6 1.4 0.5 1.4 1.7 0.6s0.1 0.2 0.1 0.1c0.1-0.2 0.4-0.4 0.6-0.6 0.6-0.5 1.1-1.1 1.7-1.6 0.4-0.4 0.7-0.8 1.1-1.1 0.7-0.6 1.4-1.3 2.1-1.9-0.1-0.3 0-0.4 0-0.4"/><path class="st2" d="m39.7 62.4c0.1-0.4 0.3-0.8 0.5-1.2 0.1-0.2 0.2-0.5 0.2-0.8h-1.2c-0.2 0-0.7 0-0.9-0.1-0.1-0.1-0.1-0.2-0.2-0.3-0.1-0.2-0.2-0.3-0.3-0.5s0-0.4 0-0.7v-1c0-0.2 0.1-0.8 0-1-0.2 0.2-0.3 0.4-0.5 0.5l-1.8 1.8c-0.4 0.4-0.9 0.9-1.3 1.4-0.7 0.7-1.5 1.4-2.2 2.1-0.1 0.1-0.2 0.3-0.3 0.4l-0.4 0.4c-0.3 0.3-0.6 0.5-0.9 0.8l-0.6 0.6c-0.2 0.2-0.5 0.4-0.6 0.6v0.1c0.2 0.1 0.5 0.1 0.8 0.1 0.3 0.1 0.6 0.1 1 0.2h0.4c0.1 0 0.2 0 0.3 0.1 0.2 0 0.4 0.1 0.7 0.1s0.5 0 0.8 0.1c0.6 0.1 1.2 0.2 1.8 0.2h0.4c0.3 0 0.6 0.1 0.8 0.1 0.1 0 0.3 0 0.4 0.1h0.6c0.2 0 0.4 0.1 0.6 0.1 0.1 0 0.1-0.1 0.1-0.2 0.1-0.3 0-0.8 0-1.1v-2.1c0-0.1 0-0.1 0.1-0.2s0.9 0 1.1 0h0.2c0.1 0 0.2 0 0.3-0.1 0-0.1 0-0.3 0.1-0.5"/><path class="st2" d="m42.2 67.7h0.3v-1.2c0-0.4 0-1 0.2-1.3 0.2-0.4 0.3-0.7 0.8-0.7 0.1 0 0.1 0 0.1-0.1 0-0.3-0.5-0.4-0.7-0.4-0.1 0-0.2 0.1-0.4 0.1-0.8 0.4-0.7 1.6-0.7 2.4 0 0.1 0 0.5-0.1 0.6-0.2 0.2-2 0.1-2.4 0.1 0.2 0.1 0.4 0.1 0.6 0.2s0.5 0.3 0.8 0.3h1 0.5"/><path class="st2" d="m44.1 67.3c0-0.1-0.1-0.2-0.1-0.3v-1.4-0.6c0-0.1-0.1-0.1-0.1-0.1-0.2 0.1-0.3 0.1-0.5 0.2-0.1 0.1-0.2 0.4-0.2 0.5s-0.1 0.3-0.1 0.5v0.8 0.4 0.4 0.4 0.2h-0.9c-0.1 0-0.2 0-0.3 0.1h-0.1c0.2 0.1 0.5 0.3 0.7 0.4 0.2 0.2 0.3 0.4 0.5 0.5 0.1-0.3 0.4-0.5 0.6-0.7l0.3-0.3c0.2-0.2 0.4-0.3 0.5-0.5-0.2-0.2-0.2-0.4-0.3-0.5"/><path class="st2" d="m44.6 67c0 0.2 0.1 0.4 0.2 0.5 0.2-0.1 0.5-0.2 0.7-0.3 0.1 0 0.2-0.1 0.3-0.1v-0.1h-0.9-0.3"/><path class="st2" d="m6.3 37.7c-0.6-0.2-0.7-0.6-0.5-1.3l0.2-0.9 4.3 1c0.7 0.2 0.8 0.4 0.7 0.8h0.2l0.4-2h-0.2c-0.1 0.5-0.3 0.6-1 0.4l-4.3-1 0.2-0.9c0.2-0.9 0.6-1 1.1-1v-0.1l-1.3-0.3v0.2c0.1 0.2 0.1 0.4 0 0.9l-0.7 2.9c-0.1 0.2-0.1 0.4-0.2 0.5s-0.1 0.2-0.2 0.3v0.2l1.3 0.3"/><path class="st2" d="m8.7 29.2 3.2 1.6c0.7 0.3 0.7 0.6 0.5 1l0.2 0.1 0.9-1.9-0.2-0.1c-0.2 0.4-0.5 0.5-1.1 0.2l-1.5-0.7 1.4-2.8 1.5 0.7c0.7 0.3 0.7 0.6 0.5 1l0.2 0.1 0.9-1.8-0.2-0.2c-0.2 0.4-0.5 0.5-1.1 0.2l-3.2-1.6c-0.6-0.3-0.8-0.5-0.5-1h-0.2l-0.9 1.8 0.2 0.1c0.2-0.4 0.5-0.5 1.1-0.2l1.5 0.7-1.4 2.8-1.5-0.6c-0.7-0.3-0.7-0.6-0.5-1l-0.2-0.1-0.9 1.9 0.2 0.1c0.2-0.5 0.5-0.6 1.1-0.3"/><path class="st2" d="m18.7 20.2-0.1 0.1c0.4 0.7 0.3 0.9-0.3 1.6l-0.6 0.8c-0.2 0.2-0.4 0.3-0.6 0.1l-1.6-1.3 0.9-1.1c0.4-0.5 0.5-0.5 0.9-0.3l0.1-0.1-1.1-0.9-0.1 0.1c0.3 0.4 0.3 0.5 0 0.8l-1 1.2-1.9-1.6 1.1-1.3c0.4-0.5 0.6-0.6 1.1-0.3l0.1-0.1-0.6-0.5-2.6 3.2 0.1 0.1c0.3-0.4 0.6-0.4 1.1 0.1l2.8 2.3c0.6 0.5 0.6 0.7 0.3 1.1l0.1 0.1 2.6-3.2-0.7-0.9"/><path class="st2" d="m27 15.3c0.7-0.4 1-0.9 1.2-1.8l0.4 0.7 1.2-0.7-0.1-0.1c-0.4 0.2-0.6 0.2-1-0.5l-1.7-3.1c-0.3-0.6-0.3-0.9 0.1-1.1l-0.1-0.1-1.8 1 0.1 0.1c0.4-0.2 0.7-0.1 1 0.5l1.7 3c0 0.7-0.4 1.3-1 1.6-0.8 0.5-1.6 0.2-2-0.6l-1.4-2.5c-0.4-0.6-0.3-0.9 0.1-1.1l-0.1-0.1-1.8 1 0.2 0.1c0.4-0.2 0.6-0.2 1 0.5l1.4 2.5c0.5 0.8 1.4 1.3 2.6 0.7"/><path class="st2" d="m36.7 5.7v-0.2l-1.7 0.4v0.2c0.5-0.1 0.7 0 0.9 0.7l0.8 3.2-4.6-3.4-1.4 0.4v0.2c0.7-0.1 0.9 0.2 1.1 0.8l0.8 3.2c0.2 0.8 0 1-0.4 1.1v0.2l1.8-0.4v-0.2c-0.5 0.1-0.8 0-0.9-0.6l-1-3.9 5.2 3.8h0.2l-1.2-4.5c-0.3-0.6-0.2-0.9 0.4-1"/><path class="st2" d="m41.1 6.2 0.2 3.6c0 0.7-0.1 0.9-0.6 0.9v0.2l2.1-0.1v-0.2c-0.5 0-0.7-0.2-0.7-0.9l-0.2-3.6c0-0.7 0.1-0.9 0.6-0.9v-0.2l-2.1 0.1v0.2c0.5 0 0.6 0.2 0.7 0.9"/><path class="st2" d="m51.3 5.9v-0.2l-1.7-0.2v0.2c0.5 0.1 0.6 0.4 0.3 0.9l-1.8 3.4-0.9-3.9c-0.1-0.5 0.1-0.7 0.5-0.6v-0.2l-2-0.3v0.2c0.5 0.1 0.6 0.4 0.8 1.1l1.1 4.8h0.2l2.3-4.3c0.4-0.6 0.7-0.9 1.2-0.9"/><path class="st2" d="m55.3 12.7-0.9-0.3c-0.4-0.2-0.4-0.3-0.3-0.6l0.7-1.9 1.3 0.5c0.6 0.2 0.6 0.3 0.6 0.8l0.2 0.1 0.4-1.3-0.2-0.1c-0.2 0.4-0.4 0.4-0.8 0.3l-1.5-0.6 0.8-2.3 1.6 0.6c0.6 0.2 0.8 0.3 0.7 1h0.1l0.4-0.9-3.9-1.4-0.1 0.2c0.5 0.2 0.5 0.4 0.3 1.1l-1.2 3.4c-0.3 0.6-0.5 0.7-0.9 0.5l-0.1 0.2 3.9 1.4 0.6-0.9-0.2-0.1c-0.5 0.6-0.7 0.6-1.5 0.3"/><path class="st2" d="m61 15.7c-0.4-0.3-0.4-0.5 0-1.1l0.9-1.3 0.4 0.3c0.9 0.6 0.4 1.9 0.6 3.5l1 0.6 0.1-0.1c-0.8-0.6 0-2.4-0.5-3.5 0.8 0.2 1.4 0 1.8-0.5 0.4-0.6 0.3-1.6-0.8-2.3l-2-1.3-0.1 0.1c0.4 0.3 0.5 0.5 0.1 1.1l-2 3c-0.4 0.6-0.7 0.6-1 0.4l-0.1 0.1 1.7 1.1zm2.4-4.8 0.5 0.3c0.7 0.5 0.9 1.2 0.5 1.9-0.4 0.6-1 0.9-1.9 0.4l-0.6-0.4 1.5-2.2"/><path class="st2" d="m66 19.6c0.1 0.1 0.3 0.7 0.7 1.1 0.6 0.6 1.7 0.6 2.3 0 0.3-0.3 0.5-0.6 0.5-1.2 0-1.2-0.8-2.4-0.1-3.1 0.4-0.4 0.9-0.3 1.3 0.1s0.6 1.1 0.1 1.7l0.1 0.1 1-0.9-0.1-0.1c-0.1 0.1-0.2 0.1-0.2 0-0.2-0.2-0.2-0.5-0.6-1-0.7-0.7-1.5-0.7-2.1-0.1-0.3 0.3-0.5 0.7-0.5 1.2 0 0.9 0.7 2.3 0 3-0.4 0.4-1.1 0.4-1.5-0.1-0.4-0.4-0.7-1.2 0-2l-0.1-0.1-1.1 1.1 0.1 0.1c0 0.1 0.1 0.1 0.2 0.2"/><path class="st2" d="m69.9 24-0.1 0.1 1.2 1.7 0.1-0.1c-0.3-0.4-0.2-0.7 0.4-1.1l2.9-2c0.6-0.4 0.8-0.4 1.1 0l0.1-0.1-1.2-1.7-0.1 0.1c0.3 0.4 0.2 0.6-0.4 1.1l-2.9 2c-0.6 0.4-0.9 0.3-1.1 0"/><path class="st2" d="m77.6 26.5 0.3 0.8-4 1.8c-0.7 0.3-0.9 0.2-1.1-0.2l-0.1 0.1 0.8 1.8 0.2-0.1c-0.2-0.4-0.1-0.6 0.5-0.9l4-1.8 0.4 0.8c0.4 0.8 0.2 1.1-0.2 1.4v0.1l1.2-0.5-0.1-0.2c-0.2-0.1-0.4-0.3-0.6-0.7l-1.3-2.7c-0.1-0.2-0.2-0.4-0.2-0.5v-0.4l-0.1-0.2-1.2 0.5 0.1 0.2c0.7-0.2 1.1 0 1.4 0.7"/><path class="st2" d="m81.2 36.4h-0.2c0.1 0.5-0.3 0.5-0.8 0.4l-1.6-0.6 1.5-1.5c0.3-0.3 0.5-0.3 0.7 0.3h0.2l-0.5-2.2h-0.2c0.1 0.4 0 0.6-0.5 1.2l-1.6 1.6-1.8 0.4c-0.8 0.2-0.9-0.1-1-0.5h-0.2l0.4 2h0.2c-0.1-0.5 0.1-0.7 0.8-0.8l1.8-0.4 2.3 0.8c0.6 0.2 0.7 0.3 0.8 0.8h0.2l-0.5-1.5"/><path class="st2" d="m10 56.3c1.6-0.5 2.5-2.1 2-3.8s-2.1-2.6-3.7-2.1-2.5 2.1-2.1 3.8c0.5 1.7 2.1 2.6 3.8 2.1m-3.6-2.1c-0.4-1.2 0.5-2.4 2.1-2.9s2.9 0.1 3.3 1.4c0.3 1.1-0.4 2.3-2.1 2.8-1.4 0.4-2.9 0.1-3.3-1.3"/><path class="st2" d="m13.8 58.1c0.2 0.4 0.2 0.7-0.5 1l-3.1 1.8c-0.6 0.4-0.9 0.3-1.1-0.1l-0.2 0.1 1 1.8 0.1-0.1c-0.2-0.4-0.1-0.7 0.5-1l1.5-0.8 0.8 1.3c0.2 0.3 0.1 0.6-0.3 0.9l0.1 0.1 1.4-0.8-0.1-0.1c-0.4 0.2-0.7 0.2-0.9-0.2l-0.7-1.3 2.1-1.2 0.7 1.3c0.3 0.5 0.4 0.7-0.2 1.2h0.1l0.9-0.5-1.9-3.4h-0.2"/><path class="st2" d="m20.8 67.6c0.4 0.3 0.4 0.6-0.1 1.1l-2.3 2.8c-0.5 0.6-0.7 0.6-1.1 0.3l-0.1 0.1 3.2 2.6 0.9-0.7-0.1-0.1c-0.7 0.4-0.9 0.3-1.6-0.3l-0.8-0.6c-0.2-0.2-0.3-0.4-0.1-0.6l1.3-1.6 1.1 0.9c0.5 0.4 0.5 0.5 0.3 0.9l0.1 0.1 0.9-1.1-0.1-0.1c-0.4 0.3-0.5 0.3-0.8 0l-1.2-1 1.6-1.9 1.3 1c0.5 0.4 0.6 0.6 0.3 1.1l0.1 0.1 0.6-0.7-3.2-2.6-0.2 0.3"/><path class="st2" d="m29.3 73.2-2.4-1.1-0.1 0.2c0.4 0.2 0.5 0.5 0.2 1.1l-1.5 3.2c-0.3 0.6-0.6 0.7-1 0.6l-0.1 0.2 2.5 1.1c2 0.9 3.4 0.1 4-1.2 0.7-1.4 0.4-3.2-1.6-4.1m0.9 3.6c-0.7 1.4-1.8 2-3.1 1.4l-0.6-0.2c-0.5-0.2-0.6-0.5-0.2-1.3l1.8-3.8 1 0.5c1.6 0.7 1.7 2.2 1.1 3.4"/><path class="st2" d="m35.2 75.5c0.5 0.1 0.6 0.3 0.4 1l-0.7 3.5c-0.2 0.7-0.4 0.9-0.8 0.7v0.2l2 0.4v-0.2c-0.5-0.1-0.6-0.4-0.4-1l0.8-3.5c0.1-0.7 0.4-0.8 0.8-0.7v-0.2l-2-0.4-0.1 0.2"/><path class="st2" d="m44.9 76.3v0.2c0.5 0 0.7 0.2 0.7 0.9v3.4l-3.6-4.5h-1.5v0.2c0.7 0.1 0.9 0.4 0.9 1.1v3.4c0 0.8-0.2 1-0.7 1v0.2h1.7v-0.2c-0.5 0-0.8-0.2-0.8-0.8l-0.1-4 4.1 4.9h0.4v-4.7c0-0.7 0.2-0.9 0.7-0.9v-0.2h-1.8"/><path class="st2" d="m53.6 77.6c0.7-0.5 0.9-1 0.8-1.6-0.2-0.7-1-1.2-2.3-0.8l-2.1 0.6v0.2c0.5-0.1 0.7 0 0.9 0.7l0.9 3.4c0.2 0.7 0.1 0.9-0.4 1v0.2l2.5-0.7c1-0.3 1.6-1 1.4-1.8-0.1-0.8-0.8-1.3-1.7-1.2m-2.2-2 0.6-0.2c0.9-0.2 1.5 0.1 1.7 0.8s-0.2 1.3-1 1.5l-0.7 0.2zm2.4 4.8-0.5 0.1c-0.4 0.1-0.6 0-0.8-0.8l-0.4-1.6 0.5-0.1c1-0.3 1.7 0.1 2 0.9 0.2 0.8-0.3 1.3-0.8 1.5"/><path class="st2" d="m64.2 74.7-1.8-3.1c-0.4-0.6-0.3-0.9 0.1-1.1l-0.1-0.1-1.7 1 0.1 0.1c0.4-0.2 0.7-0.1 1 0.5l1.7 3c0 0.7-0.4 1.3-0.9 1.6-0.8 0.5-1.6 0.2-2-0.6l-1.6-2.4c-0.4-0.6-0.3-0.9 0.1-1.1l-0.1-0.1-1.8 1 0.1 0.1c0.4-0.2 0.6-0.2 1 0.5l1.4 2.4c0.5 0.9 1.5 1.4 2.7 0.7 0.7-0.4 1-0.9 1.2-1.8l0.4 0.7 1.2-0.7-0.1-0.1c-0.3 0.2-0.5 0.2-0.9-0.5"/><path class="st2" d="m69.1 68.3c0.4-0.8 0.3-1.4-0.2-1.8-0.5-0.5-1.5-0.6-2.4 0.3l-1.6 1.7 0.1 0.1c0.3-0.3 0.6-0.4 1.1 0.2l2.6 2.5c0.6 0.5 0.5 0.8 0.2 1.1l0.1 0.1 1.4-1.5-0.1-0.1c-0.3 0.3-0.6 0.3-1.1-0.2l-1.2-1.1 0.3-0.3c0.7-0.7 1.9 0 3.6 0.1l0.8-0.8-0.1-0.1c-0.7 0.6-2.3-0.5-3.5-0.2m-0.8 0.6-0.5 0.5-1.8-1.8 0.4-0.4c0.6-0.6 1.4-0.7 1.9-0.1 0.5 0.4 0.7 1.1 0 1.8"/><path class="st2" d="m75.8 59.8-0.1-0.1-1.2 2 0.1 0.1 0.1-0.2c0.2-0.4 0.5-0.4 1.1 0l0.5 0.3c0.4 0.3 0.2 0.8 0 1.1-0.7 1.2-2.3 1.4-3.7 0.5-1.3-0.8-1.8-2.1-1.1-3.1 0.4-0.7 1.3-1.3 2.3-0.8l0.1-0.1-1.4-0.9-0.1 0.2c0.1 0.1 0.1 0.2 0 0.4-0.2 0.4-0.6 0.5-1 1.2-0.7 1.2-0.6 3.1 1.2 4.2 1.1 0.7 2.9 0.8 4.2-1.4 0.1-0.2 0.6-1.1 0.7-1.4l-1.3-0.8c-0.5-0.5-0.7-0.7-0.4-1.2"/><path class="st2" d="m79.9 51.7-3.4-1c-0.7-0.2-0.8-0.4-0.7-0.9h-0.2l-0.6 2 0.2 0.1c0.1-0.5 0.4-0.6 1.1-0.4l1.6 0.5-0.9 3-1.6-0.5c-0.7-0.2-0.8-0.5-0.7-0.9h-0.2l-0.6 2h0.2c0.1-0.5 0.4-0.6 1.1-0.4l3.4 1c0.7 0.2 0.8 0.4 0.7 0.9h0.2l0.6-2h-0.2c-0.1 0.5-0.4 0.6-1.1 0.4l-1.5-0.5 0.9-3 1.6 0.5c0.7 0.2 0.8 0.4 0.7 0.9h0.2l0.6-2h-0.2c-0.2 0.4-0.5 0.5-1.2 0.3"/><path class="st2" d="m7 44.1c0 0.3 0.2 0.5 0.5 0.5s0.5-0.2 0.5-0.5-0.2-0.5-0.5-0.5-0.5 0.2-0.5 0.5"/><path class="st2" d="m79.7 44.1c0-0.3-0.2-0.5-0.5-0.5s-0.5 0.2-0.5 0.5 0.2 0.5 0.5 0.5 0.5-0.3 0.5-0.5"/></svg>
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-edmaths/images/white-tied-in.pdf b/macros/latex/contrib/beamer-contrib/themes/beamertheme-edmaths/images/white-tied-in.pdf
new file mode 100644
index 0000000000..39bb707e73
--- /dev/null
+++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-edmaths/images/white-tied-in.pdf
Binary files differ
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-edmaths/images/white-tied-in.svg b/macros/latex/contrib/beamer-contrib/themes/beamertheme-edmaths/images/white-tied-in.svg
new file mode 100644
index 0000000000..6089f29ef7
--- /dev/null
+++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-edmaths/images/white-tied-in.svg
@@ -0,0 +1,8 @@
+<svg width="342.4" height="97.2" version="1.1" viewBox="0 0 342.4 97.2" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
+<style type="text/css">
+ .st0{clip-path:url(#SVGID_2_);}
+ .st1{fill:none;stroke:#FFFFFF;stroke-width:3;stroke-miterlimit:1;}
+ .st2{fill:#FFFFFF;}
+ .st3{fill:none;stroke:#FFFFFF;stroke-miterlimit:1;}
+</style>
+<g transform="translate(10,10)"><path class="st2" d="m107.6 17.3h-2.8v14c0 1.1 0.1 1.8 0.4 2.2s0.8 0.6 1.6 0.6v0.5h-6.4v-0.5c0.8 0 1.3-0.2 1.6-0.7 0.3-0.4 0.4-1.2 0.4-2.2v-13.9h-2.6c-1.3 0-2.2 0.2-2.8 0.6s-0.9 1.1-1 2h-0.5v-4.2h0.5c0.5 0.5 1.4 0.7 2.7 0.7h9.5c1.4 0 2.3-0.2 2.9-0.7h0.6v4.2h-0.4c-0.2-1-0.6-1.7-1.2-2.1-0.5-0.3-1.3-0.5-2.5-0.5"/><path class="st2" d="m128.4 31.2v-5.3h-9.9v5.3c0 1.1 0.2 1.8 0.5 2.2s0.9 0.6 1.7 0.6v0.5h-6.7v-0.5c0.8 0 1.3-0.2 1.6-0.6s0.4-1.2 0.4-2.2v-11.4c0-1.1-0.1-1.9-0.4-2.3s-0.8-0.6-1.6-0.6v-0.5h6.6v0.5c-0.8 0-1.3 0.2-1.7 0.7-0.3 0.4-0.5 1.2-0.5 2.2v5.2h9.9v-5.2c0-1.1-0.1-1.9-0.4-2.3s-0.8-0.6-1.6-0.6v-0.5h6.5v0.5c-0.8 0-1.3 0.2-1.6 0.6s-0.4 1.2-0.4 2.3v11.3c0 1.1 0.1 1.8 0.4 2.3 0.3 0.4 0.8 0.6 1.6 0.6v0.5h-6.5v-0.5c0.8 0 1.3-0.2 1.6-0.6s0.5-1.1 0.5-2.2"/><path class="st2" d="m147 23.3h0.5v4.4h-0.5c-0.2-0.8-0.4-1.3-0.7-1.5s-0.9-0.3-1.8-0.3h-4.5v6.5c0 0.5 0.1 0.8 0.3 1s0.5 0.3 1 0.3h3.2c1.1 0 1.9-0.1 2.4-0.2 0.4-0.1 0.8-0.4 1.1-0.7s0.6-0.9 1-1.6h0.5l-0.8 3.4h-13.1v-0.5c0.8 0 1.4-0.2 1.6-0.6 0.3-0.4 0.4-1.2 0.4-2.2v-11.5c0-1.1-0.1-1.9-0.4-2.3s-0.8-0.6-1.6-0.6v-0.5h13.1v3h-0.3c-0.2-0.9-0.4-1.4-0.8-1.7s-1.1-0.4-2.3-0.4h-5.3v7.8h5.1c0.7 0 1.2-0.1 1.4-0.4 0.2-0.2 0.4-0.7 0.5-1.4"/><path class="st2" d="m172.9 30.8v-11c0-1.1-0.1-1.8-0.4-2.2s-0.8-0.6-1.5-0.7v-0.5h6.4v0.5c-0.8 0-1.3 0.2-1.6 0.6s-0.4 1.2-0.4 2.3v11.3c0 1.1 0.1 1.8 0.4 2.2s0.8 0.6 1.6 0.6v0.5h-4.5v-2.4c-1.7 2-3.7 3-6.1 3-1.9 0-3.4-0.6-4.5-1.7s-1.7-2.7-1.7-4.5v-8.9c0-1.1-0.1-1.8-0.4-2.3-0.3-0.4-0.8-0.6-1.6-0.6v-0.5h6.6v0.5c-0.8 0-1.4 0.2-1.7 0.6s-0.4 1.2-0.4 2.2v9.2c0 1.5 0.4 2.7 1.2 3.5 0.8 0.9 2 1.3 3.4 1.3 2.2 0 3.9-1 5.2-3"/><path class="st2" d="m193.7 16.9v-0.5h5.5v0.5c-0.9 0-1.5 0.2-1.8 0.6s-0.5 1.2-0.5 2.2v14.8h-0.6l-12.9-15.8v12.8c0 0.9 0.2 1.5 0.5 1.9 0.4 0.4 1 0.6 1.8 0.6v0.5h-5.5v-0.5c0.9 0 1.5-0.2 1.8-0.7s0.5-1.3 0.5-2.4v-10.6c0-1.1-0.2-2-0.6-2.5s-1.1-0.8-2.1-0.9v-0.5h4.7l11.4 14.1v-10.6c0-1.1-0.2-1.9-0.5-2.3s-0.8-0.7-1.7-0.7"/><path class="st2" d="m208.3 16.4v0.5c-0.8 0-1.3 0.2-1.6 0.6s-0.4 1.2-0.4 2.3v11.3c0 1.1 0.1 1.8 0.4 2.3 0.3 0.4 0.8 0.6 1.6 0.6v0.5h-6.5v-0.5c0.8 0 1.3-0.2 1.6-0.6s0.4-1.2 0.4-2.3v-11.3c0-1.1-0.1-1.9-0.4-2.3s-0.8-0.6-1.6-0.6v-0.5h6.5"/><path class="st2" d="m228.4 16.4v0.6c-1.3 0-2.4 1.2-3.3 3.5l-5.4 14.3h-0.5l-5.6-14.7c-0.5-1.4-1-2.2-1.4-2.6s-0.9-0.5-1.6-0.6v-0.5h6.6v0.5c-1.1 0-1.6 0.4-1.6 1.2 0 0.3 0.1 0.6 0.2 0.9l4.4 11.7 4.2-11.3c0.2-0.5 0.3-0.9 0.3-1.3 0-0.9-0.5-1.3-1.6-1.3v-0.5h5.3"/><path class="st2" d="m241.7 23.3h0.5v4.4h-0.5c-0.2-0.8-0.4-1.3-0.7-1.5s-0.9-0.3-1.8-0.3h-4.5v6.5c0 0.5 0.1 0.8 0.3 1s0.5 0.3 1 0.3h3.2c1.1 0 1.9-0.1 2.4-0.2 0.4-0.1 0.8-0.4 1.1-0.7s0.6-0.9 1-1.6h0.5l-0.8 3.4h-13.1v-0.5c0.8 0 1.4-0.2 1.6-0.6 0.3-0.4 0.4-1.2 0.4-2.2v-11.5c0-1.1-0.1-1.9-0.4-2.3s-0.8-0.6-1.6-0.6v-0.5h13.1v3h-0.3c-0.2-0.9-0.5-1.4-0.8-1.7s-1.1-0.4-2.3-0.4h-5.2v7.8h5.1c0.7 0 1.2-0.1 1.4-0.4 0.1-0.2 0.3-0.7 0.4-1.4"/><path class="st2" d="m252.8 17.1h-1.9v8.3h2.2c1.3 0 2.4-0.4 3.1-1.1 0.8-0.8 1.1-1.8 1.1-3s-0.4-2.2-1.3-3c-0.7-0.8-1.8-1.2-3.2-1.2zm-0.4 9.1h-1.5v5c0 1.1 0.2 1.8 0.5 2.2s0.8 0.6 1.6 0.6v0.5h-6.5v-0.5c0.8 0 1.4-0.2 1.6-0.6 0.3-0.4 0.4-1.2 0.4-2.2v-11.4c0-1.1-0.1-1.8-0.4-2.2s-0.8-0.6-1.6-0.6v-0.5h7.4c1.8 0 3.3 0.4 4.4 1.3s1.7 2 1.7 3.4c0 2.2-1.2 3.7-3.8 4.5 0.5 0.4 1.1 0.8 1.6 1.4s1.2 1.6 2.1 3.1c0.9 1.6 1.7 2.6 2.2 3.1s1.1 0.8 1.7 0.8v0.5h-3.7c-0.8-0.9-1.7-2.3-2.8-4.1-1.2-1.9-2.1-3.1-2.7-3.6-0.7-0.5-1.4-0.7-2.2-0.7"/><path class="st2" d="m274.5 16.1h0.5v4.3h-0.5c-0.1-1.2-0.6-2.1-1.3-2.8s-1.6-1-2.8-1c-1 0-1.8 0.2-2.4 0.7s-0.9 1.2-0.9 2 0.2 1.5 0.7 2.1 1.6 1.4 3.2 2.4c1.9 1.1 3.2 2.1 3.9 3s1 1.8 1 2.9c0 1.4-0.5 2.6-1.5 3.7-1 1-2.2 1.5-3.7 1.5-0.8 0-1.9-0.2-3.2-0.7-0.5-0.2-0.9-0.3-1-0.3-0.3 0-0.5 0.2-0.7 0.7h-0.5v-4.9h0.5c0 1.4 0.5 2.4 1.3 3.3s1.9 1.2 3.1 1.2c1.1 0 2-0.3 2.7-0.9s1-1.4 1-2.4c0-0.7-0.3-1.4-0.8-2.1s-1.7-1.5-3.4-2.6c-1.4-0.9-2.4-1.6-2.8-2.1-0.5-0.5-0.8-1.1-1.1-1.7s-0.3-1.3-0.3-2c0-1.4 0.5-2.5 1.4-3.4s2.1-1.3 3.6-1.3c0.8 0 1.7 0.2 2.6 0.5 0.4 0.1 0.8 0.2 0.9 0.2s0.2 0 0.3-0.1c0.1 0.2 0.2 0.1 0.2-0.2"/><path class="st2" d="m285.6 16.4v0.5c-0.8 0-1.3 0.2-1.6 0.6s-0.4 1.2-0.4 2.3v11.3c0 1.1 0.2 1.8 0.4 2.3 0.3 0.4 0.8 0.6 1.6 0.6v0.5h-6.5v-0.5c0.8 0 1.3-0.2 1.6-0.6s0.4-1.2 0.4-2.3v-11.3c0-1.1-0.1-1.9-0.4-2.3s-0.8-0.6-1.6-0.6v-0.5h6.5"/><path class="st2" d="m300.1 17.3h-2.8v14c0 1.1 0.1 1.8 0.4 2.2s0.8 0.6 1.6 0.6v0.5h-6.4v-0.5c0.8 0 1.3-0.2 1.6-0.7 0.3-0.4 0.4-1.2 0.4-2.2v-13.9h-2.6c-1.3 0-2.2 0.2-2.8 0.6s-0.9 1.1-1 2h-0.5v-4.2h0.5c0.5 0.5 1.4 0.7 2.7 0.7h9.5c1.4 0 2.3-0.2 2.9-0.7h0.6v4.2h-0.4c-0.2-1-0.6-1.7-1.2-2.1s-1.4-0.5-2.5-0.5"/><path class="st2" d="m319.6 19-4.1 6.4v5.7c0 1.1 0.1 1.9 0.4 2.3s0.8 0.6 1.6 0.6v0.5h-6.6v-0.5c0.9 0 1.5-0.2 1.8-0.7 0.3-0.4 0.4-1.2 0.4-2.2v-5.7l-3.9-6c-0.6-1-1.2-1.7-1.6-2s-1-0.5-1.7-0.5v-0.5h7.1v0.5c-1.2 0-1.9 0.3-1.9 0.9 0 0.3 0.1 0.6 0.4 1l3.6 5.5 2.9-4.6c0.4-0.7 0.6-1.3 0.6-1.8 0-0.7-0.4-1-1.2-1v-0.5h5v0.5c-0.7 0-1.2 0.2-1.6 0.4s-0.7 0.9-1.2 1.7"/><path class="st2" d="m99.5 58.8c1 0 1.9-0.6 2.7-1.9s1.2-2.8 1.2-4.6c0-0.8-0.2-1.5-0.6-2s-0.9-0.8-1.6-0.8c-1 0-1.9 0.6-2.7 1.9s-1.2 2.8-1.2 4.5c0 0.9 0.2 1.6 0.6 2.1 0.5 0.5 1 0.8 1.6 0.8zm2.6-10.2c0.8 0 1.6 0.4 2.2 1.1s1 1.6 1 2.5c0 1.7-0.6 3.4-1.9 5s-2.8 2.5-4.5 2.5c-1 0-1.8-0.3-2.4-1s-0.9-1.6-0.9-2.7c0-1.9 0.7-3.6 2-5.1 1.3-1.6 2.8-2.3 4.5-2.3"/><path class="st2" d="m113.1 48.9-0.1 0.9h-2.2l-1.8 9.2c-0.5 2.5-1 4.3-1.5 5.5s-1.4 2-2.4 2.6-2.1 0.9-3.3 0.9c-1.6 0-2.8-0.3-3.7-0.9l0.5-2.2h0.5c0.3 1.6 1.3 2.4 2.8 2.4 1.1 0 2.1-0.4 3-1.2s1.6-2.7 2.1-5.7l2-10.7h-2.2l0.1-0.9h2.2l0.8-3.8c0.4-2 1.1-3.5 2-4.2 0.9-0.8 2.1-1.2 3.3-1.2 0.6 0 1.3 0.1 2.2 0.4l0.1-0.4h0.6l-0.6 2.9h-0.5c-0.1-1.5-0.8-2.3-2-2.3-1.5 0-2.6 1.3-3.1 3.9l-1 4.7h2.2"/><path class="st2" d="m135 48.1h0.5v4.4h-0.5c-0.2-0.8-0.4-1.3-0.7-1.5s-0.9-0.3-1.8-0.3h-4.5v6.5c0 0.5 0.1 0.8 0.3 1s0.5 0.3 1 0.3h3.2c1.1 0 1.9-0.1 2.4-0.2 0.4-0.1 0.8-0.4 1.1-0.7s0.6-0.9 1-1.6h0.5l-0.8 3.4h-13.1v-0.5c0.8 0 1.4-0.2 1.6-0.6 0.3-0.4 0.4-1.2 0.4-2.2v-11.5c0-1.1-0.1-1.9-0.4-2.3s-0.8-0.6-1.6-0.6v-0.5h13.1v3h-0.3c-0.2-0.9-0.5-1.4-0.8-1.7s-1.1-0.4-2.3-0.4h-5.2v7.8h5.1c0.7 0 1.2-0.1 1.4-0.4 0.1-0.3 0.3-0.7 0.4-1.4"/><path class="st2" d="m147.8 41.9h-3.5v13.4c0 1.3 0.2 2.2 0.5 2.6s0.9 0.7 1.9 0.7h1.9c2.2 0 4-0.7 5.3-2.2s1.9-3.4 1.9-5.9c0-2.6-0.7-4.8-2.1-6.3s-3.4-2.3-5.9-2.3zm-7.9 17.5v-0.5c0.8 0 1.3-0.2 1.6-0.6s0.4-1.2 0.4-2.2v-11.5c0-1.1-0.1-1.8-0.4-2.3-0.3-0.4-0.8-0.6-1.6-0.6v-0.5h8.4c3.1 0 5.6 0.9 7.5 2.6 1.9 1.8 2.8 4 2.8 6.7s-0.9 4.8-2.6 6.4-4.2 2.4-7.4 2.4h-8.7"/><path class="st2" d="m167.5 41.2v0.5c-0.8 0-1.3 0.2-1.6 0.6s-0.4 1.2-0.4 2.3v11.3c0 1.1 0.1 1.8 0.4 2.3 0.3 0.4 0.8 0.6 1.6 0.6v0.5h-6.5v-0.5c0.8 0 1.3-0.2 1.6-0.6s0.4-1.2 0.4-2.3v-11.3c0-1.1-0.1-1.9-0.4-2.3s-0.8-0.6-1.6-0.6v-0.5h6.5"/><path class="st2" d="m183.7 41.7v-0.5h5.5v0.5c-0.9 0-1.5 0.2-1.8 0.6s-0.5 1.2-0.5 2.2v14.8h-0.6l-12.9-15.8v12.8c0 0.9 0.2 1.5 0.6 1.9s1 0.6 1.8 0.6v0.5h-5.5v-0.5c0.9 0 1.5-0.2 1.8-0.7s0.5-1.3 0.5-2.4v-10.6c0-1.1-0.2-2-0.6-2.5s-1.1-0.8-2.1-0.9v-0.5h4.7l11.4 14.1v-10.6c0-1.1-0.2-1.9-0.5-2.3-0.4-0.5-1-0.7-1.8-0.7"/><path class="st2" d="m197.3 50.3h-1.7v5.3c0 1.2 0.1 2 0.4 2.4s0.8 0.6 1.5 0.6h1.5c1.1 0 1.9-0.4 2.6-1.1s1-1.7 1-2.8c0-1.4-0.5-2.4-1.4-3.3-1-0.7-2.3-1.1-3.9-1.1zm-1.7-8.4v7.7h1.9c1.3 0 2.4-0.3 3.1-1s1.2-1.6 1.2-2.8-0.4-2.2-1.1-2.9c-0.8-0.7-1.8-1-3.2-1zm3.9 17.5h-8.4v-0.5c0.8 0 1.3-0.2 1.6-0.6s0.4-1.2 0.4-2.3v-11.4c0-1.1-0.1-1.9-0.4-2.3s-0.8-0.6-1.6-0.6v-0.5h6.9c2 0 3.5 0.4 4.6 1.2s1.7 1.9 1.7 3.2c0 2-1.2 3.3-3.7 4.1v0.1c1.4 0.3 2.5 0.9 3.4 1.8s1.3 2 1.3 3.3-0.5 2.4-1.6 3.2c-1 0.8-2.4 1.3-4.2 1.3"/><path class="st2" d="m221.6 55.5v-10.9c0-1.1-0.1-1.8-0.4-2.2s-0.8-0.6-1.5-0.7v-0.5h6.4v0.5c-0.8 0-1.3 0.2-1.6 0.6s-0.4 1.2-0.4 2.3v11.3c0 1.1 0.1 1.8 0.4 2.2s0.8 0.6 1.6 0.6v0.5h-4.5v-2.5c-1.7 2-3.7 3-6.1 3-1.9 0-3.4-0.6-4.5-1.7s-1.7-2.7-1.7-4.5v-8.9c0-1.1-0.1-1.8-0.4-2.3-0.3-0.4-0.8-0.6-1.6-0.6v-0.5h6.6v0.5c-0.8 0-1.4 0.2-1.7 0.6s-0.4 1.2-0.4 2.2v9.2c0 1.5 0.4 2.7 1.2 3.5 0.8 0.9 2 1.3 3.4 1.3 2.1 0.1 3.9-0.9 5.2-3"/><path class="st2" d="m235.1 41.9h-1.9v8.3h2.2c1.3 0 2.4-0.4 3.1-1.1 0.8-0.8 1.1-1.8 1.1-3s-0.4-2.2-1.3-3c-0.7-0.8-1.8-1.2-3.2-1.2zm-0.4 9h-1.5v5c0 1.1 0.2 1.8 0.5 2.2s0.8 0.6 1.6 0.6v0.5h-6.5v-0.5c0.8 0 1.3-0.2 1.6-0.6s0.4-1.2 0.4-2.2v-11.4c0-1.1-0.1-1.8-0.4-2.2s-0.8-0.6-1.6-0.6v-0.5h7.4c1.8 0 3.3 0.4 4.4 1.3s1.6 2 1.6 3.4c0 2.2-1.2 3.7-3.8 4.5 0.6 0.4 1.1 0.8 1.6 1.4s1.2 1.6 2.1 3.1c1 1.6 1.7 2.6 2.2 3.1s1.1 0.8 1.7 0.8v0.5h-3.7c-0.8-0.9-1.7-2.3-2.8-4.1-1.2-1.9-2.1-3.1-2.7-3.6-0.6-0.4-1.3-0.7-2.1-0.7"/><path class="st2" d="m264.1 51.5v0.5c-0.8 0-1.4 0.2-1.7 0.6s-0.5 1-0.5 1.9v4.9c-0.4 0.1-1.2 0.2-2.4 0.3s-2.1 0.1-2.7 0.1c-3.4 0-6-0.8-7.8-2.5-1.9-1.7-2.8-3.8-2.8-6.5 0-1.9 0.4-3.6 1.2-5.1s2-2.7 3.4-3.6 3-1.3 4.7-1.3c1 0 2.1 0.2 3.2 0.5 0.7 0.2 1.3 0.3 1.7 0.3 0.5 0 0.9-0.2 1-0.6h0.6v5.4h-0.5c-0.2-1.5-0.9-2.7-2-3.6s-2.5-1.3-4-1.3c-1.9 0-3.5 0.8-4.7 2.3s-1.8 3.5-1.8 5.9c0 2.7 0.7 4.9 2.1 6.6 1.4 1.8 3.2 2.6 5.4 2.6 2 0 3.1-0.6 3.1-1.9v-2c0-1.1-0.1-1.9-0.4-2.3s-0.8-0.7-1.6-0.7h-0.7v-0.5h7.2"/><path class="st2" d="m280 55.9v-5.3h-9.9v5.3c0 1.1 0.2 1.8 0.5 2.2s0.9 0.6 1.6 0.6v0.5h-6.6v-0.5c0.8 0 1.3-0.2 1.6-0.6s0.4-1.2 0.4-2.2v-11.3c0-1.1-0.1-1.9-0.4-2.3s-0.8-0.6-1.6-0.6v-0.5h6.6v0.5c-0.8 0-1.3 0.2-1.6 0.7-0.3 0.4-0.5 1.2-0.5 2.2v5.2h9.9v-5.2c0-1.1-0.1-1.9-0.4-2.3s-0.8-0.6-1.6-0.6v-0.5h6.5v0.5c-0.8 0-1.3 0.2-1.6 0.6s-0.4 1.2-0.4 2.3v11.3c0 1.1 0.1 1.8 0.4 2.3 0.3 0.4 0.8 0.6 1.6 0.6v0.5h-6.5v-0.5c0.8 0 1.3-0.2 1.6-0.6 0.2-0.4 0.4-1.2 0.4-2.3"/><path class="st2" d="m68.6 36c0-0.6-0.2-1.2-0.2-1.8-0.1-0.6-0.1-1.3-0.2-1.9-0.4-1.7-0.8-3.3-1.4-4.9-0.1-0.2-0.2-0.4-0.3-0.7-0.2-0.5-0.4-0.9-0.6-1.3-0.1-0.1-0.1-0.3-0.2-0.4-0.2-0.4-0.3-0.8-0.5-1.2-0.1-0.2-0.3-0.4-0.4-0.7-0.1-0.2-0.2-0.5-0.3-0.7-0.4-0.7-0.9-1.3-1.3-1.9-0.2-0.2-0.3-0.4-0.5-0.6s-0.4-0.5-0.6-0.7-0.4-0.3-0.5-0.5c-0.1-0.1-0.1-0.2-0.2-0.4s-0.3-0.3-0.4-0.4l-0.2-0.2c-0.2-0.2-0.4-0.5-0.6-0.7s-0.4-0.4-0.6-0.5l-0.6-0.6c-0.3-0.2-0.5-0.4-0.8-0.6s-0.5-0.5-0.8-0.7c-0.2-0.1-0.4-0.2-0.5-0.3-0.2-0.2-0.4-0.3-0.7-0.5-0.2-0.1-0.3-0.3-0.5-0.4-0.1-0.1-0.2-0.1-0.4-0.2s-0.3-0.2-0.5-0.3c-0.5-0.3-1.1-0.6-1.7-0.9-0.2-0.1-0.4-0.3-0.6-0.4-0.4-0.2-0.7-0.4-1.1-0.5-0.3-0.1-0.6-0.2-0.9-0.4-0.1-0.1-0.3-0.2-0.4-0.2s-0.2-0.1-0.3-0.1c-0.2-0.1-0.4-0.2-0.5-0.2-0.6-0.2-1.1-0.3-1.7-0.5-0.3-0.1-0.6-0.2-0.8-0.3-0.6-0.2-1.2-0.3-1.8-0.4l-1.2-0.3c-0.3 0-0.5-0.1-0.8-0.1-0.4-0.1-0.9-0.2-1.4-0.2h-0.5c-0.1 0-0.2 0-0.4-0.1h-0.7c-0.5 0-1.1-0.1-1.7-0.1-0.2 0.1-0.5 0-0.8 0h-0.9-0.2-0.6c-0.1 0-0.2 0.1-0.3 0.1h-0.3-0.3-0.2c-0.1 0-0.3 0-0.4 0.1-0.3 0-0.7 0-0.9 0.2h-0.2c-0.2 0-0.4 0-0.6 0.1-0.5 0-0.9 0.2-1.3 0.3-0.4 0-0.7 0-0.9 0.2-0.2 0-0.4 0-0.5 0.1-0.3 0-0.6 0.2-0.8 0.3s-0.3 0.1-0.5 0.1c-0.3 0-0.6 0.2-0.8 0.3s-0.3 0.1-0.5 0.2c-0.9 0.4-1.8 0.8-2.7 1.3-0.2 0.1-0.3 0.2-0.4 0.3-1.1 0.5-2.1 1.1-3 1.9-0.3 0.2-0.5 0.4-0.8 0.6l-0.4 0.4c-0.3 0.2-0.5 0.4-0.8 0.6-0.5 0.4-1 0.9-1.5 1.4-0.3 0.3-0.6 0.5-0.9 0.8-0.1 0.1-0.2 0.2-0.3 0.4l-0.4 0.4c-0.2 0.2-0.4 0.5-0.6 0.7s-0.4 0.4-0.5 0.6c-0.1 0.1-0.2 0.2-0.2 0.3-0.3 0.4-0.6 0.7-0.9 1.1l-0.6 0.9c-0.3 0.3-0.6 0.8-0.8 1.2-0.1 0.1-0.1 0.2-0.2 0.4-0.2 0.3-0.4 0.6-0.5 0.9-0.2 0.3-0.3 0.7-0.4 1-0.1 0.1-0.1 0.2-0.2 0.4-0.2 0.3-0.3 0.6-0.4 0.9-0.1 0.2-0.1 0.4-0.2 0.6l-0.3 0.6c-0.1 0.2-0.1 0.4-0.2 0.7-0.1 0.2-0.2 0.5-0.3 0.7-0.4 1.4-0.8 2.9-1.1 4.4 0 0.3-0.1 0.6-0.1 0.9s-0.2 0.7-0.2 1 0 0.6-0.1 0.8c0 0.2 0 0.4-0.1 0.6v3.6c0 0.6 0.1 1.2 0.2 1.7v0.7c0.1 0.8 0.2 1.6 0.3 2.3 0.1 0.2 0.1 0.4 0.2 0.6 0.1 0.6 0.3 1.2 0.4 1.8 0.1 0.1 0.1 0.3 0.2 0.4 0 0.1 0.1 0.3 0.1 0.4 0.2 0.6 0.5 1.3 0.7 1.9 0.1 0.2 0.2 0.5 0.3 0.7s0.1 0.3 0.2 0.5l0.6 1.2c0.2 0.3 0.4 0.6 0.5 1 0.1 0.1 0.1 0.2 0.1 0.4l0.2 0.2c0.1 0.1 0.1 0.3 0.2 0.4 0.2 0.3 0.3 0.5 0.5 0.8 0.1 0.2 0.2 0.3 0.3 0.5 0.2 0.2 0.3 0.4 0.5 0.6 0.1 0.2 0.2 0.3 0.3 0.5 0.2 0.3 0.4 0.5 0.6 0.8 0.2 0.2 0.4 0.4 0.5 0.7 0.2 0.2 0.4 0.5 0.7 0.7 0.2 0.2 0.3 0.5 0.6 0.7 0.3 0.3 0.6 0.6 0.9 0.8l0.4 0.4c0.2 0.2 0.5 0.4 0.8 0.6 0.2 0.2 0.5 0.4 0.7 0.7 0.2 0.1 0.3 0.3 0.5 0.4 0.2 0.2 0.4 0.4 0.6 0.5 0.3 0.2 0.5 0.4 0.8 0.6l0.6 0.3c0.2 0.1 0.4 0.3 0.6 0.4s0.4 0.2 0.6 0.4c0.8 0.5 1.6 0.9 2.4 1.3 0.4 0.2 0.7 0.4 1.1 0.5s0.7 0.3 1.1 0.4c0.1 0 0.3 0.1 0.4 0.1 0.3 0.1 0.7 0.3 1 0.4 0.1 0 0.2 0.1 0.3 0.1 0.3 0.1 0.6 0.3 0.9 0.3 0.4 0.1 0.8 0.1 1.1 0.2 0.6 0.1 1.1 0.3 1.7 0.4h0.6c0.3 0 0.6 0.1 0.8 0.1h0.7c0.1 0 0.3 0 0.4 0.1h0.4c0.3 0.1 0.7 0.1 1 0.2h0.5 0.3c0.3 0 0.7 0 1 0.1h0.6c0.4 0 0.8-0.1 1.1-0.1h0.5c0.2 0 0.5-0.1 0.7-0.1l2.4-0.3c0.3-0.1 0.5-0.1 0.8-0.2s0.7-0.1 1-0.2c0.2 0 0.3-0.1 0.5-0.2 0.3-0.1 0.5-0.2 0.8-0.2 0.1 0 0.2-0.1 0.4-0.1 0.2-0.1 0.4-0.1 0.6-0.1 0.4-0.1 0.8-0.3 1.2-0.4 0.2-0.1 0.5-0.2 0.7-0.3s0.5-0.2 0.7-0.3c0.1 0 0.1-0.1 0.2-0.1 0.2-0.1 0.5-0.2 0.7-0.3 0.3-0.2 0.5-0.3 0.8-0.5 0.1-0.1 0.3-0.1 0.4-0.2 0.4-0.2 0.8-0.5 1.2-0.7 0.3-0.2 0.7-0.4 1-0.6s0.6-0.5 0.9-0.7 0.6-0.5 1-0.7l0.2-0.2c0.1 0 0.2-0.1 0.2-0.1 0.3-0.2 0.5-0.5 0.8-0.7l0.6-0.6c0.2-0.2 0.4-0.4 0.7-0.6 0.1-0.1 0.1-0.2 0.2-0.3 0.2-0.2 0.4-0.3 0.5-0.5 0.1-0.1 0.2-0.3 0.3-0.4 0.4-0.4 0.8-0.8 1.1-1.2 0.3-0.3 0.5-0.6 0.8-1 0.2-0.2 0.4-0.5 0.5-0.8l0.3-0.3c0.3-0.4 0.6-0.8 0.9-1.2 0.1-0.1 0.1-0.3 0.2-0.4s0.1-0.2 0.2-0.3 0.1-0.2 0.2-0.4c0.2-0.3 0.4-0.7 0.6-1s0.3-0.5 0.5-0.8c0.1-0.3 0.2-0.5 0.3-0.8s0.3-0.6 0.4-0.8c0.4-1.2 0.9-2.4 1.2-3.6 0-0.1 0.1-0.3 0.1-0.4 0.1-0.5 0.2-0.9 0.3-1.4 0-0.2 0.1-0.5 0.1-0.7 0.1-0.4 0.1-0.8 0.2-1.2 0-0.3 0-0.6 0.1-1 0-0.1 0-0.2 0.1-0.4v-0.8c0-0.1 0.1-0.3 0.1-0.4v-0.6c0.1-1.7 0.2-3 0.1-4.2m-36.3-25.8c0.3 0 0.5-0.1 0.7-0.2 0.4-0.1 0.8-0.2 1.2-0.2h0.9c0.4 0 0.8-0.1 1.2-0.2h0.5c0.2 0 0.4 0 0.6-0.1h1.2c0.2 0 0.5 0 0.7 0.1 0.2 0 0.4 0.1 0.5 0.1h0.8 0.4 0.5c0.2 0 0.4 0.1 0.7 0.1h0.3c0.1 0 0.2 0.1 0.3 0.1s0.2 0.1 0.4 0.1c0.5 0.1 1 0.1 1.5 0.2h0.1c0 0.1-0.8 0-1 0h-0.3-0.7-0.3-0.4-0.3c-0.3 0-0.8-0.1-1.1 0-0.3 0-0.6 0-0.9-0.1-0.1 0-0.4-0.1-0.5 0h-0.4c-0.2 0-0.3-0.1-0.5 0-0.1 0-0.2 0-0.3 0.1h-2.1c-0.1 0-0.3 0-0.4-0.1h-1c-0.2 0-0.7-0.1-0.8 0-0.5 0.1-1 0.1-1.5 0.1zm-3.8 1.1c0.1 0 0.3-0.2 0.4-0.2s0.2-0.1 0.3-0.1c0.1-0.1 0.2-0.1 0.3-0.1 0.3-0.1 0.7-0.2 1-0.3h0.7 0.9 0.5 0.8 1.1c1.3 0 2.6 0.1 3.9 0.1h0.6 0.9c1.5 0 3-0.1 4.5 0h1.5 0.6c0.4 0.1 0.8 0.4 1.2 0.5 0.2 0 0.8 0.1 1 0.3h-0.1-0.2-0.6c-0.2 0-0.4-0.1-0.6-0.1h-0.6-0.3-0.6-0.4-0.6c-0.3 0-1-0.1-1.2 0-0.1 0-0.3-0.1-0.4 0-0.2 0-0.3 0-0.5-0.1h-0.6-0.4-0.5-0.5-1.4-0.5-0.3-0.3c-0.4 0-0.8-0.1-1.2-0.1h-1.4c-0.2 0-0.6-0.1-0.7 0h-1.1-0.4-0.2-1.5-0.2-0.6-0.3c-0.6 0.2-1.3 0.2-2 0.1zm-2.1 0.9c0.1-0.1 0.2-0.1 0.2-0.2 0.7-0.4 1.6-0.2 2.4-0.2h1.4 0.4 0.8 2.9 0.6 0.8 0.3 0.3 0.4c0.5 0 0.9 0.1 1.4 0.1 0.2 0 0.5-0.1 0.7-0.1 0.6 0 1.2 0.1 1.8 0.1 0.3 0 0.6-0.1 0.9-0.1h1.5 0.8 3.3c0.2 0 0.3 0.1 0.5 0.1s0.5 0 0.7-0.1c0.3 0 0.8 0.1 1.1 0 0.4 0 0.7 0.2 1 0.4 0.3 0.1 0.7 0.2 0.9 0.4v0.1h-0.1-0.5-0.6-0.2c-0.2 0-0.9-0.1-1 0h-0.4-0.7c-0.2 0-0.4-0.1-0.6 0h-0.6-0.9c-0.3 0-0.8-0.1-1.1 0h-0.2-0.7-0.3c-0.2 0-0.5-0.1-0.7 0h-0.6-0.4-1-0.4-1.1-0.4-0.9-1.1-0.3-0.9-0.4-0.2-0.3c-1.2 0-2.3-0.1-3.5-0.1h-0.5c-0.1 0-0.3-0.1-0.4 0h-0.7-1.5c-0.2 0-0.8-0.1-0.9 0h-0.7-0.2c-0.3 0-0.5-0.1-0.8-0.1 0-0.1 0.6-0.3 0.7-0.3m-2.7 1.5c0-0.1 0.2-0.1 0.2-0.2 0.1-0.1 0.3-0.2 0.4-0.2 0.1-0.1 0.3-0.2 0.4-0.2 0.4-0.1 1.1-0.1 1.5-0.1h1.3 1.1 0.4c0.7-0.1 1.5 0 2.2 0h1.1c0.5 0 0.9 0.1 1.4 0.1h0.8c0.4 0 0.7-0.1 1.1-0.1 0.8 0 1.6 0.1 2.3 0.1h0.3 0.4 0.6 0.7 0.8c0.5 0 1 0.1 1.6 0.1 0.2 0 0.4-0.1 0.7-0.1h0.5 0.2c0.1 0 0.3 0.1 0.4 0.1h0.6 0.8c0.2 0 0.4-0.1 0.6 0h0.9 0.5 1.8 0.8 1.7 0.8c0.1 0 0.2 0.1 0.3 0.2 0.2 0.2 0.5 0.3 0.7 0.5 0 0.1-0.4 0.1-0.5 0.2h-0.4-0.4-0.5-0.3-1.1-0.4-0.4-0.2-2.7c-0.2 0-0.6-0.1-0.8 0h-0.5c-0.2 0-0.6-0.1-0.8 0h-0.4c-0.2 0-0.5-0.1-0.7 0h-0.5c-0.2 0-0.4-0.1-0.5 0h-0.2-1.2-0.5c-0.2 0-0.7-0.1-0.9 0h-0.3c-0.2 0-0.4-0.1-0.6 0h-0.4-1.8c-0.3 0-0.8-0.1-1.1 0h-0.2c-0.2 0-0.5 0-0.7-0.1h-1.7c-0.2 0-0.3-0.1-0.5-0.1h-1.1-0.3-1.7-0.9c-0.2 0-0.6-0.1-0.8 0h-0.3-0.3-0.8-0.4-0.3c-0.3 0-0.6 0-1-0.1-0.3 0-0.6 0-0.8-0.1v0m-1.7 1.2s0.2-0.1 0.2-0.2c0.3-0.2 0.5-0.3 0.8-0.5 0.2-0.1 0.4-0.1 0.6-0.1s0.5 0 0.7 0.1h1.4 0.7 0.7 0.6c0.3 0 0.6 0.1 1 0.1 0.5 0 1-0.1 1.4 0h0.4 1.1 2.1 1.6 1.1 0.4c0.3 0 0.6 0.1 0.9 0.1 0.4 0 0.8-0.1 1.2-0.1 0.3 0 0.6 0 1 0.1h1 0.4 0.4 0.9 1.5c0.3 0 0.6 0 0.9-0.1h2.1 0.4 2.2c0.3 0 0.7-0.1 1 0 0.4 0 0.7 0.1 1.1 0.1 0.3 0 0.7-0.1 1-0.1 0.2 0 0.4 0 0.6-0.1 0.3 0 0.6 0 0.8 0.1 0.1 0 0.2 0.2 0.3 0.2s0.1 0.1 0.2 0.1c0.2 0.1 0.3 0.3 0.5 0.4l-0.1 0.1h-0.6c-0.2 0-0.4-0.1-0.6 0h-0.2-1.3-1.2-0.4-0.3-0.6-0.7-0.6c-0.2 0-0.3-0.1-0.5 0h-1.5-0.5-0.3-1.1-0.4c-0.4 0-1-0.1-1.3 0h-0.7-1.8c-0.2 0-0.6-0.1-0.8 0h-0.3-0.9-2.5-1.3-0.4-0.4-0.8-0.2-0.8-0.4-1.2c-0.1 0-0.3-0.1-0.4 0h-1.7c-0.1 0-0.3-0.1-0.4 0h-0.3-2.1c-0.3 0-1-0.1-1.2 0h-0.2-1.1c-0.3-0.1-0.7-0.1-1.1-0.2zm-1.7 1.2c0.1 0 0.1-0.1 0.2-0.1 0.2-0.1 0.7-0.6 0.9-0.6h1.2 0.7 0.7 1.2c0.8 0 1.5 0.1 2.2 0.1h0.5 1.2c0.2 0 0.4 0 0.6 0.1h0.7 0.7c0.6 0 1.1-0.1 1.7-0.1h0.8 0.4 0.8c0.4 0 0.9 0.1 1.3 0.1h0.7 0.8 0.4 0.3 0.4 1 0.3c0.2 0 0.4 0 0.6 0.1h0.8 0.5 1.1 0.6 1.1 0.5 0.4 0.7c0.5 0 1 0.1 1.5 0.1 0.9 0 1.7-0.1 2.6-0.1h0.8 0.5 1.3c0.3 0 0.6 0 0.9 0.1 0.2 0 0.4 0 0.5-0.1h0.5c0.3 0 0.6 0 1 0.1 0.1 0 0.8 0.5 0.8 0.7h-0.1-0.6c-0.4 0-0.9-0.1-1.2 0.1h-0.2-0.4c-0.3 0-0.8-0.1-1 0-0.2 0-0.4 0-0.6-0.1h-1.2c-0.2 0-0.6-0.1-0.8 0h-2.4-1.1-0.4-0.9c-0.2 0-0.4-0.1-0.5 0h-0.8-0.3-0.2-1-0.4c-0.2 0-0.9-0.1-1 0-0.2 0-0.7-0.1-0.8 0h-0.2c-0.3 0-0.6-0.1-1-0.1h-0.3c-0.3 0-0.7-0.1-1 0h-0.2c-0.2 0-0.6-0.2-0.8-0.1h-1-0.3c-0.2 0-0.6-0.1-0.8 0h-0.2-1.2-0.4-0.7-0.4-0.3c-0.1 0-0.3 0-0.4 0.1h-0.4c-0.2 0-0.6-0.2-0.8-0.1h-1-0.3-0.3-0.2c-0.5 0-0.9 0-1.3-0.1h-0.3-1.3c-0.2 0-0.6-0.1-0.8 0h-0.4c-0.1 0-0.4-0.1-0.5 0h-0.2-1.2-0.4c-0.8-0.1-1.3-0.1-1.9-0.1zm47 22c0 0.1-0.1 0.1-0.2 0.1h-0.4c-0.2 0-0.5-0.1-0.6 0h-2.4c-0.2 0-0.6-0.1-0.7 0-0.2 0-0.7-0.1-0.8 0-0.2 0-0.4-0.1-0.6 0h-0.9-1.3v0.4h0.2 0.7 0.5 0.8 2.8 1.3 0.7 0.5 0.3c0.1 0 0 0.7 0 0.8h-0.4c-0.2 0-0.7-0.1-0.8 0h-0.5-0.7-1.3-0.3-1.5c-0.2 0-0.5-0.1-0.7 0h-0.7c-0.1 0-0.3-0.1-0.5 0h-0.3v-0.1 0.5h0.1 0.6 0.6 1.1 0.5 0.8 0.3 0.5 0.3 0.3 0.6 0.8c0.2 0 1.1-0.1 1.3 0.1 0.1 0.1 0 0.7 0 0.8 0 0-0.2 0-0.3 0.1h-0.2-1.2-0.4-1.2-0.3-0.3-0.4-0.8c-0.1 0-0.3-0.1-0.5 0h-2-0.2v0.4h0.2 1.4 0.5c0.8 0 1.5 0.1 2.3 0.1h0.9 1.9 0.4c0 0.2 0 0.6-0.1 0.7-0.1 0-0.2 0-0.2 0.1-0.2 0-0.6-0.1-0.7 0h-0.3-0.2c-0.7 0-1.5-0.1-2.2-0.1-0.2 0-0.5-0.1-0.7 0-0.2 0-0.6-0.1-0.7 0h-1.8-0.6v0.4c0.1-0.1 0.5 0 0.7 0h1.6c0.3 0 0.8 0 1.1-0.1 0.4 0 0.7 0 1.1 0.1h1 1c0.3 0 0.7-0.1 1 0 0.2 0 0.1 0.6 0 0.7s-0.2 0.1-0.2 0.1h-0.2-1.5c-0.2 0-0.5-0.1-0.7 0h-0.7-1.7-0.5-0.4c-0.5 0-1 0-1.5-0.1v0.4h0.1 1.1 0.5 0.4 0.6c0.3 0 1 0.1 1.2 0h0.4 0.7 1.4c0.2 0 0.7 0 0.8 0.1 0.1 0 0 0.6 0 0.7 0 0-0.1 0-0.1 0.1-0.2 0-1-0.1-1.1 0h-0.6-0.8-0.4c-0.1 0-0.3 0-0.4 0.1-0.2 0-0.3 0-0.5-0.1h-0.8-0.4c-0.1 0-0.3 0-0.4-0.1h-1.3-0.3v0.4h0.8 0.5 1.6c0.4 0 1 0.1 1.4 0h0.8 0.4 0.4 1.4c0 0.2 0 0.4-0.1 0.5 0 0.1-0.1 0.2-0.1 0.3h-0.7-0.6-0.8-0.6c-0.2 0-0.5-0.1-0.7 0h-0.3c-0.3 0-0.6 0-0.8-0.1-0.8 0-1.6-0.1-2.4-0.1v0.4h0.2 0.3 1 0.9 0.8c0.5 0 1 0.1 1.4 0.1 0.3 0 0.6-0.1 0.9-0.1 0.2 0 1.2-0.1 1.3 0.1 0.1 0.1 0 0.2 0 0.3 0 0.2-0.1 0.4-0.2 0.5-0.5 0-1.1-0.1-1.6 0h-0.3c-0.2 0-1-0.1-1.1 0h-0.7c-0.2 0-0.4-0.1-0.6 0-0.2 0-0.5-0.1-0.7 0-0.6 0-1.1-0.1-1.7-0.1v0.4h1.1c0.3 0 0.7 0.1 1.1 0.1h1.8 0.5 0.3 0.3c0.3 0 1.3 0 1.4 0.1s0 0.2 0 0.3-0.1 0.2-0.2 0.3h-0.4-0.3-0.2c-0.2 0-0.7-0.1-0.8 0h-0.3-1.1-0.4c-0.2 0-0.4-0.1-0.6 0-0.2 0-1.8 0-2.2-0.1v0.5c0.2 0 0.3-0.1 0.5-0.1h2 0.5 1 0.5 0.8 0.3c0.2 0 0.4 0 0.6 0.1 0 0.1-0.2 0.6-0.3 0.7-0.1 0-0.2 0.1-0.3 0.1h-0.8-0.4-0.3-0.2-0.8c-0.1 0-0.3-0.1-0.4 0h-0.2-0.8c-0.2 0-0.5-0.1-0.7 0h-0.3c-0.1 0-0.6 0-0.7-0.1v0.5c0.1-0.1 0.9-0.1 1.1-0.1h0.4 1 0.6 0.5 0.9c0.2 0 0.8-0.1 1.1 0 0.1 0.1-0.1 0.4-0.1 0.4-0.1 0.1-0.1 0.3-0.3 0.3h-0.2c-0.2 0-0.3 0-0.5-0.1h-1-0.3c-0.2 0-0.6-0.1-0.8 0h-0.2-0.5-0.4-1.3v0.5c0.2 0 0.3-0.1 0.4-0.1h0.9 0.4 1.8 0.8 0.5c0.1 0 0.2 0 0.3 0.1s-0.1 0.6-0.2 0.6l-0.2 0.2h-0.6c-0.2 0-0.6-0.1-0.8 0h-0.7-0.6c-0.2 0-0.4-0.1-0.6 0h-1.4v0.4h0.4 0.6c0.2 0 0.4 0 0.6-0.1 0.3 0 0.6 0 0.9 0.1h0.7c0.3 0 0.6 0.1 0.9 0 0.2 0 0.4 0.1 0.6 0.1 0 0.2-0.3 0.7-0.5 0.8h-0.6c-0.3 0-1-0.1-1.2 0h-1.5c-0.2 0-0.5 0-0.7-0.1v0.4h0.7 0.4c0.4 0 0.7 0.1 1.1 0.1h1.1c0.2 0 0.4 0 0.5 0.1 0 0-0.4 0.8-0.7 0.8s-0.9 0-1.2-0.1c-0.5 0-0.9 0-1.4-0.1h-0.7v0.4c0.8 0 1.7 0 2.4 0.1 0.2 0 0.4 0 0.7 0.1v0.1c-0.1 0-0.1 0.1-0.1 0.1-0.5 0.3-0.7 0.7-0.9 0.7-0.1 0-0.2 0-0.2 0.1-0.2 0-0.6-0.1-0.7-0.1-0.2 0-0.6-0.1-0.8 0h-0.8v0.4h1.2 0.5 0.7c0 0.2-0.4 0.7-0.6 0.7h-0.4-1.4v0.4h0.3c0.2 0 1.1 0 1.1 0.1 0.1 0.2-0.4 0.6-0.5 0.7h-0.9c0 0.2-0.1 0.3-0.1 0.4h0.7c0 0.2-0.8 0.9-1 1h-0.1c-0.4 0.6-0.9 1.1-1.7 1.7-0.6 0.5-1.3 0.9-2 1.2h0.1c0.4 0-0.5 0.6-0.6 0.6h-0.9-0.1c-0.6 0.2-1.3 0.4-2 0.5h0.5 0.6 0.3 0.4 0.4v0.1c-0.2 0.2-0.4 0.3-0.6 0.4-0.1 0.1-0.2 0.2-0.4 0.3-0.1 0-0.2 0.1-0.4 0.1h-0.3-2c-0.2 0-0.7-0.1-0.9 0-0.3 0-0.6-0.1-0.8 0h-0.6c-0.4 0-0.7-0.1-1.1-0.1h-0.2-1.7c-0.2 0-0.5 0.1-0.7 0.1-0.7 0.1-1.2 0.2-1.7 0.4h1.7 1.2 2.9 1c0.2 0 0.3 0 0.5-0.1h2.2c-0.1 0-0.3 0.2-0.4 0.2-0.3 0.1-0.6 0.3-0.9 0.4-0.2 0.1-0.4 0.2-0.6 0.2-0.4 0.1-0.8 0-1.2 0h-0.4-0.5-0.6c-0.2 0-0.5-0.1-0.7 0h-1.2-0.6-0.4-0.7c-0.2 0-0.8-0.1-1 0-0.5 0-1.3-0.1-1.9-0.1-0.2 0.2-0.4 0.3-0.5 0.5h0.8c0.7-0.1 1.5 0 2.3 0h1.2 0.7 0.4c0.2 0.1 0.7 0 0.9 0 0.4 0 0.8 0.1 1.1 0.1 0.2 0 0.4 0 0.5-0.1h0.7-0.1c-0.3 0.1-0.5 0.2-0.8 0.3-0.1 0.1-0.3 0.1-0.4 0.2-0.2 0.1-0.4 0.1-0.6 0.2h-0.8-0.5-0.4-0.4-0.2-0.7c-0.1 0-0.4-0.1-0.5 0h-0.4-0.6-0.3-0.4-0.2c-0.2 0-0.8-0.1-1 0h-0.4-0.8c-0.1 0.1-0.1 0.3-0.2 0.4 0.6-0.1 1.4 0 1.9 0s1 0 1.5-0.1c0.2 0 0.4 0 0.6-0.1h1.1 1.1c-0.3 0-0.6 0.2-0.9 0.2-0.2 0-0.4 0-0.6 0.1-0.3 0-0.6 0.1-0.9 0.2h-0.2c-0.2 0-0.3 0-0.5 0.1-0.1 0-0.5 0.1-0.6 0.1h-0.5-0.7-0.2-1.2c-0.6 0-1.2 0.1-2 0h-0.2c-0.3-0.1-0.7-0.1-1-0.2h-0.5c-0.2 0-0.4-0.1-0.7-0.1h-0.6c-1.1-0.2-2.3-0.3-3.3-0.6-0.2 0-0.6-0.1-0.7-0.2 0.5 0.1 1.1 0.1 1.6 0.1s0.9 0.1 1.4 0.1h0.4 0.4 0.6 0.4c0.2 0 0.3 0.1 0.5 0.1h1.4c-0.1-0.2-0.2-0.3-0.3-0.5h-0.7c-0.2 0-0.4-0.1-0.6 0h-1.3c-0.2 0-0.3-0.1-0.5 0-0.4 0-0.8-0.1-1.3-0.1h-1.8c-0.2 0-0.4-0.1-0.6-0.1h-0.4c-0.2 0-0.4-0.1-0.5-0.1-0.1-0.1-0.2-0.1-0.4-0.1s-0.4-0.1-0.6-0.1-0.4-0.1-0.6-0.2c-0.1 0-0.2-0.1-0.3-0.1h0.3 1.2c0.3 0 0.6 0 0.9-0.1h1.2c0.2 0 0.3 0 0.5 0.1 0.3 0 0.6-0.1 0.9-0.1 0.4 0 0.9 0.1 1.3 0.1h1.5 0.9c-0.1-0.1-0.3-0.2-0.5-0.4h-0.4-0.3c-0.3 0-0.6 0-0.9-0.1h-0.3c-0.1 0-0.3-0.1-0.5 0h-1-0.4-1c-0.2 0-0.5-0.1-0.7-0.1s-0.4 0-0.5 0.1h-0.7c-0.7 0-1.5 0-2.1-0.1-0.3 0-0.6 0-0.8-0.1-0.4-0.1-0.8-0.5-1.2-0.7v-0.1h1.3c0.2 0 0.5 0.1 0.7 0.1h0.9 0.7 0.4 0.7 2.1 1.6 0.2 0.4c-0.4-0.2-0.9-0.3-1.4-0.4h-0.2-1.1-0.4-0.3-1.1-0.7-0.6-1.4-0.5-0.7c-0.2 0-0.3-0.1-0.5-0.1-0.3 0-0.7 0-1-0.1s-0.5-0.3-0.7-0.4c-0.1-0.1-0.3-0.1-0.3-0.3 0.6 0 1.3 0 1.9 0.1h1.3 0.6c-1.1-0.1-2-0.3-2.8-0.4h-0.4-0.5-0.2c-0.4 0-0.7-0.1-0.9-0.3l-0.2-0.2h0.3c-1.2-0.4-2.1-1-2.9-1.7-0.5-0.5-0.9-1.1-1.2-1.8h-0.2c-0.2 0-0.7-0.6-0.8-0.8 0 0 0.2 0 0.2-0.1h0.5c0-0.1 0-0.2-0.1-0.3h-1c-0.1 0-0.7-0.6-0.7-0.7v-0.1h0.5 1v-0.4h-0.2-0.3c-0.1 0-0.5-0.1-0.6 0h-0.2-0.7c-0.2-0.1-0.6-0.6-0.6-0.8h0.2 0.5c0.2 0 0.5 0 0.7-0.1h1v-0.4h-0.3-0.4-0.4-0.5-0.3c-0.1 0-0.2 0-0.3 0.1-0.2 0-0.4 0-0.5-0.1-0.1 0-0.5-0.6-0.4-0.7s0.7-0.1 0.8-0.1h2.3v-0.4h-0.9-0.3c-0.2 0-0.5-0.1-0.6 0-0.2 0-0.7-0.1-0.9 0h-0.4c-0.1 0-0.2 0-0.3-0.1s-0.1-0.2-0.2-0.3c-0.1-0.2-0.3-0.4-0.3-0.7 0.2 0 0.4 0.1 0.7 0.1h0.6 1 0.5c0.3 0 0.7 0.1 1 0h0.3v-0.4h-0.8-0.3-1.2-0.4-0.6-0.3-0.4c-0.1 0-0.2 0-0.3-0.1-0.2-0.1-0.4-0.6-0.5-0.8 0 0 0.1 0 0.1-0.1 0.4 0 0.7 0.1 1.1 0.1h0.3 0.3 0.6c0.2 0 0.4-0.1 0.7 0 0.2 0 0.3 0.1 0.5 0.1s0.7-0.1 1 0v-0.4h-0.2-3-0.4-0.6-0.3c-0.1 0-0.3 0-0.4-0.1-0.2-0.1-0.3-0.5-0.3-0.7h0.6 0.5 0.9 0.4 0.4c0.3 0 0.7 0 1 0.1h0.5c0.3 0 0.6 0.1 1 0.1v-0.5h-0.1-1-1c-0.2 0-0.3 0-0.5-0.1h-0.9c-0.2 0-0.5-0.1-0.6 0h-1.2c0-0.1-0.1-0.1-0.1-0.2-0.1-0.1-0.2-0.4-0.1-0.5l0.1-0.1h0.9 0.6 0.4 0.3 0.8 1.3c0.3 0 0.8 0.1 1.1 0.1v-0.4c-0.5 0-1.7-0.1-1.9 0h-0.9-1.1c-0.2 0-0.4 0-0.6-0.1h-0.4c-0.1 0-0.3-0.1-0.4 0h-0.2c-0.1 0-0.2 0-0.3-0.1s-0.3-0.6-0.2-0.7c0.3-0.2 0.9 0 1.3-0.1 0.4 0 0.7 0 1.1 0.1h0.8c0.1 0 0.3 0 0.4 0.1h1.9 0.7v-0.5h-0.3-1-0.5-1.2c-0.1 0-0.4-0.1-0.5 0h-0.8c-0.2 0-0.8-0.1-1 0-0.2 0-0.4 0-0.5-0.1-0.2 0-0.6 0-0.8-0.1-0.1-0.1-0.1-0.2-0.1-0.4 0-0.1-0.1-0.2-0.1-0.2 0.1-0.1 0.7-0.1 0.9-0.1h0.7 1.3 0.3 0.8 0.6 0.5 1.1 0.5v-0.4h-0.5-0.3-0.5-1.1-0.6-0.6c-0.2 0-0.6-0.1-0.8 0-0.3 0-0.5 0-0.8-0.1-0.3 0-1.3 0.1-1.5-0.1-0.1-0.1-0.2-0.6-0.2-0.7h0.5c0.4 0 0.8 0 1.2 0.1 0.1 0 0.2 0 0.3 0.1h1c0.3 0 0.5-0.1 0.8-0.1h0.6 0.5 1c0.2 0 0.9-0.1 1.2 0v-0.4h-0.3-0.8-0.6-0.2c-0.3 0-0.8-0.1-1 0h-0.5c-0.3 0-0.8-0.1-1 0-0.3 0-0.7-0.1-0.9 0-0.2 0-0.8-0.1-1 0-0.2 0-0.8 0-0.9-0.1s-0.1-0.2-0.1-0.3-0.1-0.2 0-0.3h0.1 0.6 1.5 0.6c1.1 0.1 2.2 0 3.4 0h1.1v-0.4h-0.5-1c-0.2 0-0.4 0-0.5 0.1h-0.3c-0.3 0-1.1-0.1-1.3 0-0.2 0-0.4-0.1-0.7-0.1-0.8 0-1.7 0-2.5-0.1-0.1 0-0.4 0-0.5-0.1s-0.1-0.5-0.1-0.7h1.6c0.3 0 0.7 0.1 0.9 0 0.4 0 0.9 0.1 1.3 0.1h0.6c0.3 0 0.5 0 0.8 0.1 0.1 0 0.2-0.1 0.4-0.1h0.7 0.2 0.8v-0.4h-0.4-0.5-0.9-0.5c-0.1 0-0.7-0.1-0.8 0h-0.5c-0.1 0-0.3-0.1-0.4 0-0.5 0-0.9-0.1-1.4-0.1h-0.4-0.7c-0.2 0-0.8 0-0.9-0.2-0.1-0.1-0.1-0.2-0.1-0.3s0-0.3 0.1-0.3c0.2-0.1 0.5 0 0.8 0h2.1 0.6 0.7 0.3 1 0.4 1.2 0.5v-0.4h-1c-0.2 0-0.7-0.1-0.9 0-0.2 0-0.7-0.1-0.8 0h-0.5-1.1-0.6c-0.2 0-0.7-0.1-0.9 0-0.3 0-0.6-0.1-0.9-0.1h-0.2-0.3c-0.6 0-0.6-0.1-0.6-0.7h0.1 0.4c0.3 0 0.9 0.1 1.2 0h0.7 0.7 0.5 0.3 1.6 0.4 0.5 0.4 1v-0.4h-0.5-0.7-0.4-0.6c-0.2 0-0.4-0.1-0.5 0h-0.7-3.2-0.6c-0.1 0-0.2 0-0.3-0.1-0.1 0-0.2 0-0.3-0.1s-0.1-0.6-0.1-0.8c0.2 0 0.4 0 0.5-0.1 0.3 0 0.8 0.1 1.1 0h0.4 0.3 0.7 0.5 0.5 0.4 3.5v-0.4h-0.6-1.2-0.5c-0.2 0-0.4-0.1-0.5 0h-1.7-0.3-1.6c-0.2 0-0.4-0.1-0.5 0h-0.2c-0.2 0-0.5 0-0.7-0.1-0.1-0.1-0.1-0.6 0-0.7s0.1-0.1 0.2-0.1c0.8 0 1.6 0 2.4 0.1h0.6 2 0.4 0.3 1.4 0.5v-0.4c-0.2 0-0.4-0.1-0.6 0h-2.6c-0.2 0-0.7-0.1-0.8 0h-3.1c-0.2 0-0.5 0-0.8-0.1 0-0.1 0-0.2-0.1-0.3 0-0.2 0-0.4 0.1-0.5 1.1 0 2.2 0.1 3.3 0.1h0.4c0.3 0 0.6 0.1 1 0.1h0.4 0.9c0.2 0 1.5 0 2 0.1v-0.5h-0.3-0.5-0.4-1.2-0.4-1.1-1.6c-0.2 0-0.6-0.1-0.7 0h-0.6c-0.4 0-0.7-0.1-1.1-0.1 0-0.2 0-0.7 0.1-0.7h0.4 0.3 0.4 1 0.8 1 1.8 2v-0.4h-0.2-0.4c-0.1 0-0.3-0.1-0.4 0-0.2 0-0.5-0.1-0.7 0-0.4 0-0.7 0-1-0.1h-0.4-0.5c-0.2 0-0.5-0.1-0.6 0h-0.8-0.4-0.9c-0.1 0-0.3-0.1-0.4 0h-0.9v-0.1c0-0.2 0-0.7 0.2-0.7h1.2 0.6 1.5 0.8 0.3c0.2 0 0.4 0 0.6 0.1h2.4v-0.4h-0.6-2.3c-0.3 0-0.9-0.1-1.1 0-0.1 0-0.3-0.1-0.4 0h-0.2-1c-0.4 0-0.7-0.1-1.1-0.1h-0.3c-0.2 0-0.5 0-0.7-0.1-0.1 0 0-0.1 0-0.1 0.1-0.5 0.1-0.6 0.7-0.6h0.4 0.5c0.3 0 0.7 0 1.1 0.1h0.5c1.5 0 3.1 0 4.6 0.1v-0.4h-0.3-1.2-0.6-0.5c-0.2 0-0.5-0.1-0.7 0-0.4 0-0.9 0-1.3-0.1h-0.4c-0.2 0-0.7-0.1-0.8 0h-1.6v-0.1c0-0.2 0-0.6 0.2-0.6 0.2-0.1 0.5-0.1 0.7-0.1h1 0.3c0.8 0.1 1.6 0.1 2.4 0.1h0.7 1 0.5 0.8v-0.4h-0.3-0.5-1.4c-0.1 0-0.4-0.1-0.5 0h-2.9-1.2c-0.2 0-0.3 0-0.4-0.1 0-0.1 0.1-0.5 0.2-0.6 0.1 0 0.1-0.1 0.2-0.1 0.6 0 1.2 0 1.8 0.1h0.7c0.1 0 0.3-0.1 0.4 0 0.8 0 1.6 0.1 2.4 0.1h0.7 0.9v-0.4h-0.6-0.4-1.5c-0.2 0-0.5-0.1-0.6 0-0.6 0-1.2 0-1.8-0.1-0.2 0-0.6-0.1-0.7 0h-0.2c-0.4 0-0.7-0.1-1.1-0.1 0-0.2 0.1-0.6 0.3-0.7 0.1-0.1 0.2 0 0.2-0.1 0.1 0 0.2 0 0.4 0.1h0.4 0.6 0.7c0.5 0 1 0.1 1.5 0.1h1.8 1.1v-0.4c-0.3 0-0.7 0-0.9 0.1h-0.5-0.5-0.3-0.6-0.3-1.9c-0.2 0-0.6-0.1-0.8 0-0.2 0-0.8 0-0.9-0.1s0.1-0.6 0.1-0.6c0.1-0.1 0.2-0.1 0.3-0.1 0.3 0 0.6 0.1 1 0.1h1 0.3 0.6 0.7 0.9 1.6v-0.4h-0.5c-0.2 0-0.7-0.1-0.9 0-0.1 0-0.3-0.1-0.4 0h-0.3c-0.4 0-0.7-0.1-1.1-0.1h-0.4-0.6-0.3-0.3c-0.3 0-1 0.1-1.2-0.1 0-0.2 0.2-0.6 0.3-0.7 0.5 0 1 0.1 1.5 0.1h1.4c0.1 0 0.3 0 0.4 0.1h0.6 0.4 1.1 0.5v-0.4h-0.3-1.3-1.1c-0.2 0-0.6-0.1-0.8 0-0.1 0-0.2 0-0.3 0.1-0.2 0-0.5-0.1-0.7-0.1h-1.1c0-0.2 0.1-0.3 0.2-0.5 0-0.1 0-0.2 0.1-0.3 0-0.1 0.1-0.1 0.2-0.1h1 0.6c0.5 0 1 0.1 1.4 0.1h0.9c0.5 0 1 0 1.4 0.1v-0.4c-0.2 0.1-1.1 0.1-1.3 0-0.2 0-0.5-0.1-0.6 0h-0.6-0.4-1.6c-0.2 0-0.4-0.1-0.6-0.1 0-0.3 0.2-0.6 0.3-0.8 0.2 0 0.4 0.1 0.6 0h1.5 0.4 1.7c0.3 0 0.5 0.1 0.8 0.1v-0.4h-0.2c-0.2 0-0.5-0.1-0.7 0h-1.2c-0.2 0-0.6-0.1-0.7 0h-0.2c-0.3 0-0.7 0-1-0.1-0.2 0-0.4 0-0.6-0.1v-0.1c0-0.1 0.2-0.5 0.3-0.6 0 0 0.1-0.1 0.2-0.1h1.3 1.7 1.2v-0.4h-0.3-0.5c-0.2 0-0.6-0.1-0.8 0-0.2 0-0.5-0.1-0.7 0-0.3 0-0.7-0.1-0.9 0h-0.4-0.4c0-0.1 0.3-0.7 0.4-0.8 0.2-0.1 0.6 0 0.8 0h1.2 0.7 0.3 0.5 0.1v-0.4h-0.1c-0.2 0-0.4 0-0.5 0.1h-0.4c-0.2 0-0.4-0.1-0.6 0h-0.2-0.2-0.4-0.9c-0.1 0 0-0.2 0-0.2 0.1-0.1 0.3-0.5 0.4-0.6s0.3-0.1 0.4-0.1h0.6 1 0.4 0.4v-0.4h-0.2-0.8-0.3c-0.2 0-0.6-0.1-0.8 0h-0.3c0-0.2 0.1-0.3 0.2-0.4s0.1-0.3 0.3-0.3h0.3 1 0.5 0.3v-0.4c-0.2 0-0.5-0.1-0.7 0h-0.2c-0.2 0-0.5 0-0.6-0.1 0-0.2 0.3-0.3 0.4-0.4s0.2-0.3 0.3-0.4h0.9v-0.3h-0.5v-0.1s0.5-0.6 0.6-0.7c0.2-0.4 1.5-1.4 1.7-1.6 0.2-0.1 0.4-0.3 0.6-0.4 0.3-0.1 0.7 0 1.1 0h1.4 1.3 0.8 2.9 0.3 0.6c0.6 0 1.2-0.1 1.8 0 0.7 0 1.4 0.1 2.1 0.1 0.4 0 0.8-0.1 1.2 0 0.3 0 0.5 0.1 0.8 0.1h2.1 1.4 0.4 0.7 0.4 0.3 0.5c0.2 0 0.4 0.1 0.6 0.1h0.6 2.3 0.8c0.5 0 0.9-0.1 1.4-0.1s0.9 0.1 1.4 0h0.7 0.5 2.1 1.9 0.4c0.5 0 1 0.1 1.6 0 0.2 0 0.4-0.1 0.7-0.1 0.2 0 0.4 0 0.6-0.1h1.3c0.2 0 0.5-0.1 0.7 0 0.1 0 0.2 0.1 0.2 0.2 0.4 0.3 1.3 1.1 2 1.8v0.1h0.1c0.2 0.1 0.5 0.4 0.4 0.5 0 0.1-0.2 0.1-0.3 0.1h-0.3v0.4c0.3 0 0.6 0 0.9 0.1 0.2 0.1 0.6 0.6 0.6 0.8h-0.2c-0.1 0-1 0-1.3-0.1v0.4h1.7 0.3c0.1 0.1 0.2 0.3 0.3 0.4 0 0.1 0.2 0.2 0.1 0.3 0 0.1-0.1 0.1-0.1 0.1h-1.3-0.4-0.6v1.7h1.8c0.3 0 0.7 0 0.9 0.1 0.1 0.1 0.4 0.6 0.5 0.8 0 0-0.1 0-0.1 0.1-0.2 0-0.7-0.1-0.8 0h-0.5c-0.2 0-0.5-0.1-0.7 0h-0.2c-0.3 0-0.6 0-0.9-0.1v0.4c0.8 0 1.8 0.1 2.6 0.1 0.2 0 0.9-0.1 1 0s0.1 0.2 0.2 0.3c0 0.1 0.1 0.1 0.1 0.2s0.1 0.2 0.1 0.3c-0.1 0-0.1 0-0.2 0.1-0.3 0-0.8-0.1-1-0.1h-0.2-0.5-1.3-0.5-0.4v0.4h0.4 0.8 0.5 1.9 0.7c0.2 0.1 0.2 0.3 0.3 0.4s0.1 0.2 0 0.3h-0.3c-0.2 0-0.5-0.1-0.6 0h-0.3c-0.2 0-0.6-0.1-0.7 0h-0.8-0.3-0.7-0.3-0.4v0.4c0.3-0.1 0.7-0.1 0.9-0.1h0.1c0.4 0.1 0.8 0 1.1 0h2.1c0.2 0 0.4-0.1 0.5 0s0.3 0.5 0.3 0.7c0.1 0-0.2 0.1-0.2 0.1h-0.7c-0.2 0-0.5-0.1-0.7 0h-0.9-0.2c-0.2 0-0.8-0.1-0.9 0h-1.4v0.4h0.5 1c0.3 0 0.5 0.1 0.8 0.1h0.7 1.4 0.5 0.4c0.1 0 0.3 0.7 0.3 0.8-0.2 0.1-0.7 0-0.9 0h-0.4-0.2-0.5c-0.2 0-0.6-0.1-0.8-0.1-0.1 0-0.2 0-0.3 0.1h-1-0.4c-0.2 0-0.4-0.1-0.6 0h-0.6v0.3h0.7 0.4 0.5 1.9c0.4 0 1 0.1 1.4 0 0.2 0.1 0.9-0.1 1 0.1 0.1 0.1 0.1 0.3 0.2 0.5s0.1 0.2-0.1 0.3h-1.2c-0.2 0-0.5-0.1-0.6 0h-0.7-0.3-0.5-0.6-0.3c-0.3 0-0.7-0.1-0.9 0h-0.7v0.4c0.3-0.1 1 0 1.2 0h1.2 0.8 0.6 0.5c0.4 0 0.8 0 1.2-0.1h0.3c0.2 0 0.4 0 0.5 0.1s0.3 0.6 0.1 0.7-0.5 0-0.7 0h-1.6-0.6-0.4c-0.2 0-0.8-0.1-1 0h-0.5c-0.2 0-0.4-0.1-0.6 0-0.4 0-0.7-0.1-1.1-0.1v0.4h0.5 0.9 1.7 0.3 0.3 0.9 0.4 0.5 0.6c0.1 0 0.3 0 0.4 0.1 0.2 0.1 0.2 0.5 0.3 0.7h-0.3-0.1-0.3-1.2-0.4-0.3-1.1c-0.2 0-0.4-0.1-0.6 0h-0.7-1-1v0.4h0.2 0.6 1.1 0.8 0.6 0.8 0.8 0.6c0.2 0 0.6 0.1 0.8 0 0.2 0 0.4 0 0.6 0.1 0.1 0.1 0.2 0.5 0.2 0.7 0 0-0.1 0-0.1 0.1h-0.5-0.6-2-0.8c-0.2 0-0.8-0.1-1 0h-1.5-0.5-0.3v0.4h0.4c0.5-0.1 0.9 0 1.4 0h2c0.4 0 0.9 0.1 1.2 0 0.3 0 2.1 0 2.3 0.1 0.1 0.2 0.1 0.5 0.1 0.7 0 0-0.1 0-0.2 0.1h-1.3c-0.1 0-0.3-0.1-0.4 0h-0.5c-0.2 0-0.7-0.1-0.9 0h-0.6-2.2c-0.2 0-0.4-0.1-0.5 0-0.1 0-0.7 0-0.9-0.1v0.4h0.6 0.5 0.6 0.5 1.8 0.4c0.5 0 1 0.1 1.5 0h0.5c0.2 0 1 0 1.1 0.1s0.2 0.5 0.2 0.7h-0.1-0.6c-0.2 0-0.5-0.1-0.7 0h-0.6-0.3c-0.4 0-0.7-0.1-1-0.1h-1.2-0.3-0.4-0.8c-0.1 0-0.3-0.1-0.4 0h-1.2v0.5c-0.8-0.2-0.6-0.2-0.4-0.2 0.3 0 0.5 0.1 0.8 0.1h0.8c0.3 0 0.6 0 0.9-0.1h3.3c0.2 0 1.3 0 1.4 0.1s0 0.2 0 0.3 0.1 0.3 0 0.4c-0.1 0.2-0.8 0-1 0.1h-0.3-0.9c-0.2 0-0.5-0.1-0.6 0-0.2 0-0.8-0.1-0.9 0-0.2 0-0.5-0.1-0.7 0h-1.4-0.4-0.5-0.4-0.4v0.4c0.3-0.1 0.8 0 1.1 0h0.6 1.2 0.7 1.3 2.2c0.3 0 0.5 0 0.8 0.1 0 0.2 0.2 0.6 0 0.7-0.1 0-0.2 0-0.2 0.1-0.2 0-0.4 0-0.6 0.1h-0.9-0.3-0.4c-0.3 0-0.7-0.1-1 0-0.3 0-0.6-0.1-0.9 0h-0.7c-0.2 0-0.6-0.1-0.7 0h-0.7-0.4-1v0.4h0.1c0.5 0 1-0.1 1.6-0.1h1.1c0.2 0 0.3 0.1 0.5 0h0.4 1.8 1.3 0.4c0.1 0 0.6 0 0.7 0.1v0.3c-0.3-0.1-0.3 0-0.4 0.1"/><path class="st2" d="m57.9 23.8v-0.8-0.8-0.4-1.2-1.8c0-0.2 0-0.4-0.1-0.6h-0.4-0.4-0.6c-0.4 0-0.9-0.1-1.3 0h-0.8-0.4-0.4-0.4c-0.2 0-0.3-0.1-0.5-0.1h-0.7-0.5-0.7c-0.3 0-0.7 0-1-0.1h-0.6c-0.2 0-0.3-0.1-0.5-0.1h-1.4-0.3-1.5-0.7-3.3-0.6-1.2-0.6c-0.3 0-0.5 0-0.8-0.1h-0.7-0.8c-0.4 0-0.7 0.1-1.1 0.1h-1.2-1.9-0.6-1.4-0.8c-0.2 0-0.4-0.1-0.7-0.1h-0.8-0.6-1.9-1.5-0.9-1.4c-0.5 0-1 0.1-1.5 0-0.4-0.1-0.9 0-1.3 0h-0.1c-0.1 0.2 0 0.5 0 0.7v0.8 1.2 1 2.8 0.5 0.8 1.1 3.3c0 0.2 0 0.5-0.1 0.7v0.8 0.4 1.9 0.8c0 0.3-0.1 0.6-0.1 0.9v0.7 0.6 1.1 0.5 0.6 0.7 0.9c0 0.4-0.1 0.8-0.1 1.2v0.4 0.8 0.7c0 1.8-0.1 3.5-0.1 5.2v1.2 1.9 0.4c0 0.6-0.1 1.3-0.1 1.9v0.5c0 0.9 0 1.7 0.2 2.5 0.1 0.2 0.1 0.3 0.2 0.5 0.1 0.3 0.2 0.7 0.4 1 0.3 0.4 0.6 0.8 1 1.1 0.1 0 0.1 0.1 0.2 0.1 0.1 0.1 0.2 0.1 0.3 0.2 0.2 0.1 0.3 0.1 0.5 0.2s0.5 0.2 0.7 0.3 0.5 0.1 0.7 0.2c0.4 0.1 0.9 0.3 1.4 0.4s0.9 0.1 1.4 0.2c1.4 0.2 2.8 0.4 4.2 0.5h0.9c0.4 0 0.8 0.1 1.2 0.1l1.2 0.3c0.2 0 0.4 0.1 0.6 0.1s0.4 0.1 0.6 0.1c0.2 0.1 0.4 0.2 0.5 0.2 0.2 0.1 0.3 0.1 0.5 0.2 0.8 0.3 1.5 0.9 2.2 1.5 0.2 0.3 0.4 0.5 0.6 0.8 0.1 0.2 0.2 0.3 0.3 0.5 0 0 0 0.1 0.1 0.1 0.3-0.8 0.7-1.5 1.3-2.1 0.2-0.2 0.5-0.3 0.8-0.5s0.6-0.5 1-0.5c0.2-0.1 0.4-0.1 0.5-0.2 0.2-0.1 0.5-0.2 0.8-0.2 0.1 0 0.2-0.1 0.2-0.1 0.1-0.1 0.3-0.1 0.4-0.1h0.2c0.1 0 0.1-0.1 0.2 0 0.1 0 0.2-0.1 0.3-0.1 0.1-0.1 0.2-0.1 0.3-0.1 0.1-0.1 0.2-0.1 0.3-0.1h0.2c0.1-0.1 0.2-0.1 0.3-0.1h0.2 0.2 0.2 0.2c0.1-0.1 0.4 0 0.5 0h0.2 0.3c0.2-0.1 0.4 0 0.6 0h0.2c0.2-0.1 0.4-0.1 0.6-0.1 0.1 0 0.2-0.1 0.3-0.1s0.2-0.1 0.3-0.1h0.2c0.1-0.1 0.3 0 0.4 0s0.2-0.1 0.3-0.1c0.1-0.1 0.3 0 0.5 0 0.1-0.1 0.5-0.2 0.7-0.2 0.1 0 0.2-0.1 0.3-0.1h0.2c0.2-0.1 0.3-0.1 0.6-0.1 0.1-0.1 0.3-0.1 0.4-0.1 0.1-0.1 0.4-0.2 0.5-0.2s0.2-0.1 0.2-0.1c0.3-0.1 0.6-0.2 0.9-0.3s0.7-0.3 1-0.4c0.2-0.1 0.3-0.1 0.5-0.2 0.3-0.1 0.5-0.3 0.7-0.5 0.1-0.1 0.3-0.2 0.4-0.3 0.2-0.2 0.4-0.3 0.6-0.6s0.4-0.8 0.5-1.1c0-0.2 0.1-0.4 0.1-0.6s0.1-0.4 0.1-0.5v-0.9-1-0.3-0.5-1.7-1.4-0.6-0.3-0.8-1.6-2.2c0-0.2 0-0.4 0.1-0.6v-1.1c0-0.2 0-0.3 0.1-0.5 0-0.3-0.1-0.6-0.1-0.9 0-0.8 0.1-1.5 0.1-2.3 0-0.3-0.1-0.6-0.1-0.8v-0.6-0.3-0.5-0.3-0.8c0-0.5 0-1.1 0.1-1.6v-0.4-0.3-0.6-0.8-0.7-0.3c0-0.5-0.1-1-0.1-1.5v-0.8-0.4c0-0.3 0-0.7-0.1-1v-0.6-0.8-0.7-0.7-0.4c-0.2 0-0.2-0.3-0.2-0.7m-0.7 9.7v0.2 0.4 0.4 2.2 0.3 0.4 0.3 0.3 0.3 0.6c0 0.3 0.1 0.6 0.1 0.9v0.4 0.3 0.4 0.2 0.5c0 1.7 0 3.4-0.1 5.1v1.8 0.5 2.1c0 0.2-0.1 0.4-0.1 0.6s0.1 0.3 0.1 0.5 0 0.3-0.1 0.5v0.2 0.2 0.3 0.7 0.3 0.6c0 0.6 0 1.2-0.1 1.8v0.4c0 0.3-0.2 0.6-0.3 0.9-0.3 0.5-0.9 0.9-1.4 1.2-0.3 0.2-0.5 0.4-0.8 0.5-0.3 0.2-0.7 0.3-1.1 0.4s-0.9 0.3-1.3 0.4c-0.2 0-0.3 0.1-0.5 0.1-0.5 0.1-0.9 0.2-1.4 0.3h-0.3c-0.3 0.1-0.6 0.1-1 0.2-0.4 0-0.7 0.1-1.1 0.1s-0.8 0.1-1.2 0.1h-1c-0.3 0-0.5 0.1-0.8 0.1h-0.5c-0.6 0.1-1.2 0.3-1.9 0.4-0.3 0.1-0.7 0.1-1 0.2-0.2 0.1-0.3 0.1-0.5 0.2-0.1 0-0.3 0.1-0.4 0.1-0.9 0.5-1.7 1.1-2.3 1.9-0.1 0.1-0.1 0.2-0.2 0.3 0 0-0.2 0.1-0.2 0.2h-0.1c-0.1-0.1-0.2-0.2-0.2-0.3-0.3-0.3-0.5-0.6-0.8-0.8-0.2-0.2-0.5-0.3-0.8-0.5-0.1-0.1-0.3-0.2-0.4-0.3-0.2-0.1-0.5-0.2-0.7-0.4-0.3-0.1-0.7-0.2-1-0.4-0.2-0.1-0.4-0.1-0.7-0.2-0.1 0-0.2-0.1-0.3-0.1-0.4-0.1-0.7-0.1-1-0.2-0.1 0-0.2-0.1-0.4-0.1h-0.4c-0.3 0-0.5-0.1-0.8-0.1h-0.8c-0.1 0-0.3-0.1-0.4-0.1h-1c-0.7-0.1-1.4-0.2-2-0.3-0.3 0-0.6 0-1-0.1-0.3 0-0.7-0.1-1-0.2-0.4-0.1-0.8-0.1-1.2-0.2-0.5-0.1-1-0.4-1.5-0.6-0.7-0.3-1.5-0.8-1.9-1.5-0.6-1-0.6-2.4-0.6-3.7 0-0.2-0.1-0.3 0-0.5 0-0.1 0-0.3 0.1-0.4v-0.4-1-0.8-0.3-0.3-0.7c0-0.5 0.1-1 0.1-1.5 0-1.2 0-2.3 0.1-3.4v-0.5-1c0-0.3 0.1-0.6 0.1-0.9v-3.8c0-0.3 0-0.6 0.1-0.9v-0.7-2.1-1c0-0.2 0-0.5 0.1-0.7v-1.4-3.2c0-0.1 0-0.3 0.1-0.4v-0.2-0.7-1.9-1.1c0-0.2 0-0.3 0.1-0.5v-0.5c0-0.2 0.1-0.3 0.1-0.5v-2-0.7-0.5-0.5c0-0.2-0.1-0.9 0.1-1.1 0.1-0.1 0.3 0 0.5 0 0.2-0.1 0.7 0 1 0 0.2-0.1 0.4 0 0.6 0h2c0.1-0.1 0.4 0 0.6 0 0.2-0.1 0.4 0 0.6 0h0.3c0.2-0.1 0.4 0 0.6 0 0.5 0 1 0.1 1.5 0.1 0.2-0.1 0.6 0 0.9 0 0.2-0.1 0.7 0 0.9 0h1.1c0.1-0.1 0.3 0 0.4 0h0.9c0.2-0.1 0.4 0 0.6 0h0.3c0.3 0 0.6 0.1 0.9 0.1 0.1-0.1 0.3 0 0.5 0h0.4 0.5c0.2-0.1 0.8 0 1.1 0h0.6 0.3 0.6 2.3 0.3 0.2c0.3-0.1 0.8 0.1 1.1 0.1h0.2 0.2c0.2-0.1 0.5 0 0.7 0h1.6c0.2 0 0.4 0.1 0.6 0.1h0.3c0.1-0.1 0.3 0 0.4 0h0.8 0.2c0.3-0.1 0.6 0 0.9-0.1 0.4 0 0.7 0.1 1 0.1h0.7 0.2c0.2-0.1 0.6 0 0.8 0h1c0.1-0.1 0.6 0 0.7 0h1.9c0.2 0 0.4 0 0.5 0.1h0.4 0.3 1 1.5s0.3-0.1 0.3 0v1.5 1.5 2.8c-0.1 1.7 0 3.3 0 5v0.7c0 0.3-0.1 0.6 0 0.9v0.4 1.1c-0.4 0-0.4 0.2-0.4 0.5"/><path class="st2" d="m41.5 56.8c-0.1-0.3-0.2-0.5-0.2-0.7 0-0.1 0-0.2-0.1-0.3 0-0.1-0.1-0.1-0.2-0.1-0.1 0.1-0.2 0.1-0.2 0.2 0 0.2 0.1 0.4 0.2 0.6s0.2 0.5 0.3 0.8c0.1 0.2 0.1 0.3 0.2 0.5 0.1 0.1 0.3 0.3 0.5 0.2 0.1 0 0-0.2-0.1-0.3-0.2-0.3-0.3-0.6-0.4-0.9"/><path class="st2" d="m30.7 43.8c0.1-0.2 0.2-0.4 0.3-0.5s0.2-0.2 0.3-0.2c0.1-0.1 0.2-0.2 0.3-0.4 0.1-0.1 0.2-0.1 0.2-0.2 0.1-0.3 0.1-1 0.1-1.3v-0.9-0.6-1.2-0.6c0-0.5 0.1-1.1 0-1.6v-1.5-0.5-0.4-1-0.5-0.8c0-0.2 0.1-0.5 0-0.7-0.2 0.1-1 0.9-1 1.2-0.1 0.2 0 0.6 0 0.9 0 0.4-0.1 0.8-0.1 1.2v0.3 0.6c0 0.3-0.1 0.6-0.1 1v0.6 0.6 0.8c0 0.4-0.1 0.9-0.1 1.3 0 0.3 0 0.6 0.1 0.8 0 0.2-0.1 0.5-0.1 0.7s0.1 0.4 0 0.6c0 0.3-0.1 0.6-0.1 0.9 0.2 0.4 0.2 0.9 0.2 1.4"/><path class="st2" d="m44.8 44.1c0-0.3-0.2-0.5-0.4-0.7-0.1-0.1-0.2-0.3-0.4-0.4-0.3-0.2-0.6-0.4-1-0.4h-0.6c-0.1 0.1-0.3 0-0.4 0.1-0.2 0.1-0.5 0.1-0.7 0.2-0.7 0.2-1.3 0.5-1.9 0.8-0.2 0.1-0.4 0.3-0.6 0.4s-0.3 0.4-0.6 0.5c-0.2 0-0.3-0.2-0.4-0.3-0.1 0-0.1-0.1-0.2-0.1-0.3-0.2-0.5-0.5-0.8-0.6-0.5-0.3-0.9-0.3-1.5-0.4-0.2 0-0.3-0.1-0.5-0.1-0.8-0.2-1.9-0.2-2.6 0.3-0.2 0.1-0.3 0.2-0.4 0.4-0.3 0.2-0.4 0.3-0.5 0.6 0 0.1-0.1 0.2-0.1 0.3 0.1 0.1 0.3 0.1 0.4 0.1 0.1-0.1 0.4 0 0.5 0h1.4c0.1-0.1 0.3-0.1 0.5-0.1h1 0.4c0.4 0 0.8 0.1 1.3 0.1h0.1 0.6c0.1 0 0.1 0 0.2 0.1s0 0.3 0.1 0.4c0.1 0.4 0.4 0.6 0.8 0.6 0.5 0 0.8-0.4 0.8-0.9v-0.2c0.1-0.1 0.2-0.1 0.4-0.1h0.2 0.2c0.1-0.1 0.5 0 0.7 0 0.1 0 0.2-0.1 0.3-0.1 0.2-0.1 0.4-0.1 0.6-0.1h0.2c0.2-0.1 0.4 0 0.6 0 0.2-0.1 0.4-0.1 0.6-0.1h1.7c-0.2-0.3 0-0.2 0-0.3"/><path class="st2" d="m32.3 41.6v0.7h0.3c0.1 0 0.2-0.1 0.3-0.1s0.2-0.1 0.3 0h0.2c0.3-0.1 0.9 0 1.2 0.1s0.6 0 0.9 0.1c0.4 0.1 0.9 0.3 1.3 0.5 0.1 0.1 0.8 0.6 0.8 0.6 0.2-0.3 0.2-0.6 0.2-0.9 0.1-0.4 0.1-0.8 0.1-1.2 0-0.6 0.1-1.2 0.1-1.9v-0.8-2.3c0-1.2 0.1-2.4 0-3.6 0-0.4 0-0.8-0.2-1.1-0.4-0.6-1-0.8-1.6-1-0.2-0.1-0.3-0.1-0.5-0.2-0.2 0-0.4-0.1-0.6-0.1-0.3-0.1-0.6-0.1-0.9-0.1h-1.3c-0.1 0.1-0.3 0-0.4 0.2s0 0.6 0 0.8v2.2 1.3c0 0.4-0.1 0.7-0.1 1.1 0 0.3 0.1 0.5 0.1 0.8v1.7c0 0.2 0 0.5-0.1 0.7v1.4c0 0.2 0 0.5-0.1 0.7-0.1 0 0 0.2 0 0.4m4.6-0.7c-0.4-0.2-0.9-0.4-1.4-0.5-0.2-0.1-0.3-0.1-0.5-0.1-0.3-0.1-0.5-0.1-0.8-0.2-0.3 0-0.6-0.1-0.9-0.1h-0.1c-0.2-0.1-0.2-0.6 0.1-0.6 0.2 0 0.4 0.1 0.6 0.1s0.4 0.1 0.6 0.1c0.2 0.1 0.3 0.1 0.5 0.2 0.5 0.2 0.9 0.3 1.3 0.5 0.1 0 0.2 0.1 0.3 0.1 0.3 0.1 0.6 0.4 0.8 0.6 0.1 0.1 0.2 0.1 0.2 0.2-0.3 0-0.5-0.2-0.7-0.3m0.6-2.9c-0.1 0-0.1 0 0 0-0.3 0.1-1-0.6-1.2-0.7-0.3-0.1-0.5-0.2-0.8-0.3-0.4-0.1-0.7-0.3-1.1-0.4-0.2 0-0.3 0-0.5-0.1-0.2 0-0.6 0-0.7-0.1-0.2-0.2-0.1-0.6 0.2-0.6 1.2 0.1 2.2 0.6 3.1 1.2 0.3 0.1 0.9 0.5 1.1 0.8-0.1 0.1 0 0.2-0.1 0.2m-4.4-5.4c0.4 0 0.7 0.1 1 0.2 0.1 0 0.2 0 0.3 0.1 0.2 0.1 0.4 0.2 0.6 0.2 0.2 0.1 0.4 0.1 0.6 0.2 0.1 0 0.2 0.1 0.3 0.1 0.3 0.1 0.5 0.2 0.8 0.4 0.2 0.1 1.1 0.6 0.9 0.8 0 0.1-0.1 0.1-0.2 0-0.2 0-0.3-0.2-0.4-0.2-0.2-0.1-0.3-0.2-0.5-0.3-0.8-0.4-1.8-0.7-2.7-0.9-0.3-0.1-0.6-0.1-0.8-0.2-0.1 0-0.1-0.3 0.1-0.4"/><path class="st2" d="m39.3 26c0.1 0 0.2-0.1 0.3-0.1 0.1-0.1 0.3-0.2 0.3-0.3 0.1-0.2-0.1-0.6-0.3-0.7h-0.2c0 0.2 0.1 0.2 0.1 0.4 0 0.1-0.1 0.2-0.2 0.3s-0.1 0.4 0 0.4"/><path class="st2" d="m39.9 23.4c-0.2-0.1-0.4-0.1-0.6-0.2s-0.3-0.2-0.5-0.2c-0.1 0-0.2 0.1-0.2 0.2 0 0.2 0.2 0.3 0.3 0.4s0.2 0.3 0.3 0.3 0.2-0.1 0.3-0.2 0.2-0.1 0.3-0.2c0.2 0 0.2-0.1 0.1-0.1"/><path class="st2" d="m38.7 27.2c0.2 0.1 0.6 0 0.6-0.2s-0.2-0.3-0.3-0.3c-0.1 0.1-0.5 0.4-0.3 0.5"/><path class="st2" d="m43.8 30.6c-0.1-0.1-0.3 0-0.4 0h-0.5c-0.2 0.1-0.4 0-0.7 0.1-1 0.2-1.9 0.3-2.7 0.8-0.2 0.1-0.4 0.2-0.6 0.4-0.1 0.1-0.1 0.3-0.1 0.5-0.1 0.5-0.1 0.9-0.1 1.4 0 0.2 0 0.5-0.1 0.7v1.1c0 0.1 0 0.3-0.1 0.4v1 1.5 1.5 0.4 0.2 0.7c0 0.7 0 1.5 0.2 2l0.1 0.1c0.3-0.1 0.6-0.3 0.8-0.5 0.2-0.1 0.5-0.2 0.8-0.3 0.3-0.2 0.4-0.3 0.8-0.3 0.1-0.1 0.4-0.1 0.6-0.1h0.2 0.2c0.3-0.1 0.9 0 1.2 0.1 0.1 0 0.3 0.1 0.4 0.1 0.1-0.4 0-0.9 0-1.3v-0.7-0.8-0.4-1-0.6-1.1-0.5-2-0.6-1.5c0-0.2-0.1-0.3-0.1-0.5v-0.6c0.1-0.1 0.1-0.2 0.1-0.2m-4.8 6.8c0.6-0.6 1.5-0.9 2.2-1.2 0.2-0.1 0.5-0.3 0.8-0.3 0.1-0.1 0.3-0.2 0.4-0.2 0.2 0 0.3 0.1 0.3 0.3s-0.1 0.3-0.2 0.4c-0.2 0.2-0.5 0.2-0.8 0.3s-0.6 0.2-0.9 0.3c-0.2 0.1-0.4 0.1-0.6 0.2-0.4 0.1-0.7 0.3-1 0.5-0.1 0.1-0.2 0.2-0.4 0.2h-0.1c0-0.3 0.2-0.5 0.3-0.5m3.7 2.1c-0.2 0.1-0.5 0.1-0.8 0.2-0.2 0-0.5 0.1-0.7 0.2-0.8 0.2-1.4 0.5-2.1 0.9-0.1 0-0.3 0.3-0.4 0.1-0.1-0.1 0.1-0.2 0.2-0.3 0.3-0.2 0.5-0.4 0.8-0.6s0.6-0.4 1-0.5c0.1-0.1 0.2-0.1 0.3-0.2 0.4-0.2 0.9-0.3 1.3-0.4 0.1 0 0.3 0 0.4 0.1 0.3 0.1 0.2 0.4 0 0.5m0.1-6.5c-0.1 0.1-0.3 0.1-0.4 0.1-0.3 0.1-0.6 0.2-0.9 0.3-0.4 0.1-0.8 0.3-1.2 0.5-0.3 0.2-0.5 0.3-0.8 0.5 0 0-0.4 0.2-0.4 0.1 0-0.3 0.4-0.5 0.6-0.6 0.1-0.1 0.2-0.1 0.3-0.2 0.3-0.2 0.6-0.3 0.8-0.5 0.3-0.1 0.6-0.2 0.9-0.3 0.1-0.1 0.2-0.1 0.3-0.1 0.1-0.1 0.3-0.1 0.4-0.1h0.3c0.3 0 0.2 0.2 0.1 0.3"/><path class="st2" d="m38.2 25.7c-0.1 0-0.1 0-0.2-0.1-0.1 0-0.2 0.1-0.2 0.2v0.3c0 0.2 0 0.4 0.1 0.5s0.1 0.1 0.2 0.1 0.1 0.1 0.2 0.1c0.2 0 0.6-0.3 0.6-0.5-0.1 0-0.6-0.5-0.7-0.6"/><path class="st2" d="m45.6 33.5c0-0.2-0.1-0.5-0.1-0.7v-0.4-0.3h-0.1c-0.1 0.5 0 1.1 0 1.6 0 0.2-0.1 0.4-0.1 0.6v0.3 0.3c-0.1 0-0.2 0-0.2-0.1v-0.5-0.3c0-0.6 0.1-1.3 0.1-1.9v-0.3-0.2h-0.1c0 0.5-0.1 0.9-0.1 1.3 0 0.1 0 0.2-0.1 0.2h-0.1c-0.1-0.4-0.1-0.8-0.1-1.2 0-0.2 0-0.4-0.1-0.6-0.1 0.1-0.1 0.3-0.1 0.5v0.7c0 0.2 0.1 0.5 0 0.7-0.1 1.5-0.1 3-0.1 4.6v0.9c0 0.3-0.1 0.5-0.1 0.8v1.2c0 0.4-0.1 0.8 0 1.2 0 0.1 0 0.2 0.1 0.2 0.1-0.2 0.1-0.5 0.1-0.7 0-0.4 0.1-0.8 0.1-1.3 0-0.3-0.1-0.6 0-0.9 0 0 0-0.1 0.1 0 0.1 0 0.1 0.2 0.1 0.3 0.1 0.3 0 0.6 0 1v0.8 0.9 0.4c0 0.1 0 0.3 0.2 0.3v-1.4-0.6c0-0.2 0-0.4 0.1-0.6 0-0.1 0-0.3 0.1-0.4 0-0.2-0.1-0.4-0.1-0.6v-0.9-0.5c0-0.1 0.1-0.1 0.1-0.1 0.1 0.1 0.2 0.2 0.2 0.3v1.1 0.3c0 0.3 0.1 0.6 0.1 0.9v0.4 1.6c0 0.4 0 0.8 0.1 1.2v0.2h0.1c0.1-0.2 0.1-0.5 0.1-0.8s0.1-0.6 0-1c0-0.2-0.1-0.4-0.1-0.6s0.1-0.4 0.1-0.6c0-0.3-0.1-0.6-0.1-1 0-0.3 0-0.7 0.1-1v-0.8-0.3c0-0.2 0-0.3 0.1-0.5v-0.8-1.3c-0.3-0.7-0.3-1.1-0.3-1.6m-0.9 4.1s-0.2 0.2-0.2 0.1v-0.3-0.8-1c0-0.3 0-0.6 0.1-0.8 0.1 0 0.1 0.1 0.2 0.2 0.1 0.3 0 0.6 0 0.9-0.1 0.6 0 1.3-0.1 1.7m0-3.8c-0.2 0-0.2-0.2-0.1-0.3 0.1 0 0.2 0.3 0.1 0.3m0.4 3.2c-0.1-0.2-0.1-0.4-0.1-0.7s-0.1-0.6 0.1-0.9c0.1 0 0.1 0 0.2 0.1 0.1 0.2 0.1 1.5-0.2 1.5"/><path class="st2" d="m41.7 51.2h0.3 0.7 0.2c-0.2-0.3-0.6-0.6-0.9-0.9l-2.1-2.1c-0.1-0.1-0.3-0.3-0.5-0.4l-0.7-0.7c-0.1-0.1-0.3-0.3-0.5-0.4v0.1c-0.1 0-0.2 0.1-0.3 0.2-0.3 0.3-0.5 0.6-0.8 0.8l-2.4 2.4c-0.1 0.1-1 1-1 1.1 0.6 0.1 1.3 0 1.9 0h0.7c0.1 0 0.3 0 0.4 0.1v0.1c-0.1 0.1-1.2 1.4-1.2 1.4v0.1h2.2 0.1c-0.1-0.2-0.2-0.3-0.3-0.5-0.2-0.2-0.4-0.5-0.5-0.8 0-0.1-0.1-0.2 0-0.2 0.1-0.3 1.4-0.1 1.7-0.1 0.2-0.1 0.6 0 0.8 0 0.3 0 0.7-0.1 1.1 0 0.1 0 0.1 0.1 0.1 0.2 0 0.2-0.5 0.9-0.6 1.2 0 0.1-0.1 0.1-0.1 0.2h1.2 0.7 0.1c0-0.2-0.7-1-0.8-1.2-0.1-0.1-0.2-0.2-0.2-0.3 0-0.4 0.4-0.3 0.7-0.3"/><path class="st2" d="m39.1 52.8c0.2-0.1 0.8-1 0.8-1.2h-0.4c-0.1 0-0.1 0.1-0.2 0.1-0.1 0.1-0.7 0.9-0.7 1 0.2 0.1 0.4 0.1 0.5 0.1"/><path class="st2" d="m35.3 51.6c-0.2 0.2-1.2 0.9-1.2 1.1h0.5c0.2-0.1 1-0.9 1-1.1h-0.3"/><path class="st2" d="m43.7 52.7c0-0.5 0-1-0.4-1.2-0.1 0.3-0.1 0.7-0.1 1.1v1.6 0.3h-2.5-1.1c-0.7 0-1.4-0.1-2.1-0.1-0.5 0-1 0.1-1.5 0.1-0.3 0-2.4-0.2-2.5 0v0.1c0.2 0.3 0.5 0.2 0.9 0.2h0.2 0.2 0.6 1 0.3c0.1-0.1 0.6 0 0.8 0h0.2 1.1c0.2-0.1 0.5 0 0.7 0h1.4c0.1-0.1 0.3 0 0.5 0 0.2-0.1 0.4 0 0.6 0h1.2 0.2v-0.1c0.1-0.2 0-0.5 0-0.8 0-0.2 0-0.3 0.1-0.5 0.3-0.1 0.3-0.4 0.2-0.7"/><path class="st2" d="m43.7 59.4v-0.4-0.3c-0.1-0.1-0.2-0.1-0.4-0.1l-0.1 0.1v0.6 2c0.1 0 0.4 0 0.4-0.2 0.1-0.2 0.1-0.8 0-1.1 0-0.1 0-0.3 0.1-0.6"/><path class="st2" d="m51.4 59.8c-0.5-0.5-1-1-1.5-1.4-0.6-0.6-1.2-1.3-1.9-1.9-0.2-0.2-0.5-0.4-0.7-0.7l-0.3-0.3c-0.9-1-2-1.9-2.9-2.8-0.1 0.4 0 0.8 0 1.2v0.8 0.7c-0.1 0.2-1.5 0.2-1.8 0.2-0.1 0-0.5 0-0.6 0.1v0.1c0.1 0.4 0.3 0.8 0.4 1.1 0.1 0.2 0.2 0.9 0.4 1.1 0.1 0.1 0.6 0.1 0.7 0.1 0.1-0.1 0.5 0 0.6 0 0.3-0.1 0.2 0.5 0.2 0.6v0.5c0 0.3-0.1 2 0.1 2.1 0.1 0.1 0.5 0 0.7 0 0.1 0 0.2-0.1 0.3-0.1 0.1-0.1 0.4 0 0.5 0h0.2c0.1-0.1 0.4 0 0.6 0 0.1 0 0.4-0.1 0.4-0.1 0.1 0 0.2 0.1 0.3 0.1h0.3c0.2-0.1 0.5-0.1 0.8-0.1h0.2c0.1-0.1 0.3 0 0.5 0h0.2 0.2c0.1-0.1 0.2 0 0.3-0.1 0.1 0 0.3-0.1 0.4-0.1 0.2 0 0.4-0.1 0.7-0.1 0.1-0.1 0.4-0.1 0.5-0.1s0.2-0.1 0.3-0.1c0 0 0.2-0.1 0.2-0.2 0-0.4-0.2-0.5-0.3-0.6"/><path class="st2" d="m56.8 33.9v-0.3-0.3-0.6-1-0.9-1.8c0-0.2 0.1-0.7-0.1-0.9-0.1 0.2-0.4 0.4-0.6 0.6-0.7 0.8-1.5 1.5-2.3 2.3-0.5 0.5-1 1.1-1.5 1.6-0.3 0.2-0.5 0.5-0.8 0.8l-0.7 0.7c-0.2 0.2-0.4 0.3-0.5 0.5s-0.3 0.3-0.4 0.5l-1.8 1.8c-0.2 0.2-0.4 0.5-0.6 0.7s-0.6 0.5-0.7 0.7v0.1c0 0.1 1.3 1.4 1.5 1.6 1 1 2.1 2 3.1 3 0.1 0.1 0.2 0.2 0.2 0.3 0.2 0.1 0.3 0.3 0.4 0.4 0.2 0.2 0.3 0.4 0.5 0.5 1 1.1 2.1 2.1 3.2 3.2 0.1 0.1 1 1.1 1.1 1.1 0.2 0 0.1-0.9 0.1-1.1v-0.5-0.4c0-0.1 0-0.2 0.1-0.4 0-0.2-0.1-0.4 0-0.6v-0.3-1.2-0.7-0.4-0.5-0.7-0.2c0-0.2 0-0.4 0.1-0.7 0-0.4 0-0.7-0.1-1.1 0-0.3 0.1-0.6 0.1-0.9 0-0.2 0-0.4-0.1-0.6v-0.3-1-0.4c0-0.3 0-0.5-0.1-0.8v-1.5c-0.1-0.1-0.1-0.2-0.1-0.3"/><path class="st2" d="m43.2 20.8c-0.1 0.1-0.1 0.2-0.2 0.3s-0.1 0.2-0.2 0.3c-0.1 0.2-0.3 0.2-0.4 0.4-0.1 0.1-0.1 0.3-0.3 0.4-0.3 0.2-0.5 0.5-0.6 0.8 0 0.1-0.1 0.1-0.1 0.2 0 0-0.1 0.1 0 0.1 0 0.1 0.1 0.2 0.2 0.3 0.2 0.2 0.3 0.4 0.3 0.7 0 0.2 0.1 0.4 0.1 0.6s-0.1 0.4-0.2 0.6c0 0.1 0 0.3-0.1 0.4s-0.1 0.2-0.2 0.3-0.1 0.2-0.2 0.3c-0.2 0.3-0.5 0.4-0.8 0.6-0.1 0.1-0.2 0.2-0.4 0.3s-0.4 0.1-0.6 0.3c-0.2 0.1-0.3 0.3-0.4 0.5-0.1 0.1-0.2 0.1-0.3 0.2-0.1 0.2 0 0.3 0 0.5 0 0.1 0 0.2-0.1 0.3v0.6 0.2c0.2-0.1 0.4-0.4 0.6-0.6l2.8-2.8c0.2-0.2 0.3-0.4 0.5-0.6 0.3-0.3 0.7-0.6 1-1 0.1-0.1 0.2-0.3 0.3-0.4l0.3-0.3c0.2-0.2 0.4-0.4 0.6-0.5 0.5-0.5 1-1.1 1.5-1.6 0.1-0.1 0.3-0.2 0.4-0.4l1.7-1.7c0.3-0.3 0.7-0.6 0.9-0.9-0.2 0.1-0.5 0.1-0.8 0h-0.2c-0.2 0-0.4 0.1-0.6 0.1s-0.5-0.1-0.7-0.1h-0.6c-0.1 0.1-0.2 0-0.4 0.1h-0.9-0.5l-0.2 0.2c-0.2 0.2-0.3 0.4-0.5 0.6-0.1 0.1-0.1 0.2-0.2 0.2-0.1 0.1-0.2 0.1-0.3 0.2l-0.2 0.2c0.2 0 0.1 0 0 0.1"/><path class="st2" d="m41.4 21.4c-0.1 0.2-0.4 0.3-0.4 0.6v0.3h0.1c0.2-0.3 0.6-0.7 0.3-0.9"/><path class="st2" d="m40.9 25.6s0.1 0.1 0.1 0c0.2-0.1 0.3-0.3 0.3-0.5-0.1 0.2-0.4 0.3-0.4 0.5"/><path class="st2" d="m40.7 23.6-0.2 0.2v1c0 0.1 0.1 0.1 0.2 0.1s0.1-0.1 0.2-0.1c0.3-0.3 0.2-0.6 0.1-0.9-0.1-0.2-0.1-0.3-0.3-0.3"/><path class="st2" d="m40 26.6c0.1 0.1 0.5-0.1 0.5-0.2-0.1-0.1-0.2-0.1-0.3-0.1s-0.3 0.2-0.2 0.3"/><path class="st2" d="m41.9 20.6c-0.1 0.1-0.2 0.3 0 0.4 0.1 0 0.2 0.1 0.2 0 0.1-0.1 0.2-0.3 0.3-0.4 0.2-0.2 0.9-1.2 1.2-1.2v-0.1c-0.2 0-0.4 0-0.6-0.1l-0.2 0.2c-0.1 0.1-0.2 0.3-0.3 0.4s-0.2 0.2-0.3 0.2-0.1 0.1-0.2 0.1c-0.1 0.3-0.1 0.4-0.1 0.5"/><path class="st2" d="m40.2 21.3c-0.1 0.1-0.4 0.6-0.4 0.7h0.1c0.2 0.1 0.4 0 0.5-0.1s0.1-0.3 0.3-0.4l0.6-0.6c0.1-0.1 0.1-0.2 0.2-0.3s0.2-0.3 0.3-0.4 0.2-0.3 0.3-0.4 0.2-0.2 0.2-0.4h-0.3c-0.1 0.1-0.3 0.1-0.3 0.2-0.1 0.1-0.1 0.3-0.2 0.4s-0.3 0.2-0.4 0.3-0.1 0.3-0.1 0.4-0.1 0.1-0.2 0.2c0 0.1 0 0.2-0.1 0.2-0.3 0.1-0.4 0.1-0.5 0.2"/><path class="st2" d="m38.7 21.6v0.3c0.3-0.1 0.6-0.5 0.8-0.8 0.1-0.1 0.1-0.3 0.2-0.4s0.1-0.2 0.2-0.3c0.1-0.3 0.3-0.7 0.5-1h0.1v-0.1h-0.4c-0.2 0.1-0.9 0-1 0.1s-0.1 0.3-0.1 0.4-0.2 0.2-0.2 0.3c-0.1 0.2 0.1 0.4 0.1 0.6s-0.1 0.3-0.1 0.4c-0.1 0.3-0.1 0.4-0.1 0.5"/><path class="st2" d="m38.1 23.6c-0.1 0-0.4 0.4-0.4 0.4 0 0.2 0.2 1 0.4 1s0.4-0.2 0.5-0.3 0.3-0.2 0.4-0.4-0.5-0.6-0.6-0.7h-0.3"/><path class="st2" d="m37.7 25.4c0.1-0.3-0.6-0.8-0.8-0.9-0.2 0.2-0.1 0.2-0.2 0.4 0 0.1-0.1 0.2-0.1 0.2-0.1 0.2 0.1 0.6 0.2 0.7s0.1 0.1 0.2 0.1 0.3-0.2 0.4-0.3c0.2 0 0.3-0.1 0.3-0.2"/><path class="st2" d="m37.3 26.8c-0.1-0.1-0.1-0.2-0.2-0.3 0 0-0.1 0-0.2-0.1-0.3 0.5 0.1 0.6 0.5 0.7h0.1c0-0.1-0.1-0.2-0.2-0.3"/><path class="st2" d="m36 24.6c0.1 0 0.2-0.1 0.3-0.2 0.3-0.4 0.1-0.7-0.3-1-0.1 0-0.3 0.3-0.3 0.3 0 0.1 0.1 0.2 0.1 0.3 0 0.3-0.1 0.7 0.2 0.6"/><path class="st2" d="m36.9 23.7c0.2 0 0.9-0.5 0.8-0.7-0.1-0.1-0.2-0.1-0.3-0.1-0.3 0.1-0.5 0.2-0.8 0.2h-0.2v0.1c0.1 0.2 0.2 0.5 0.5 0.5"/><path class="st2" d="m36.2 26.6c0.1 0 0.5-0.3 0.5-0.4s-0.5-0.6-0.6-0.7h-0.2c-0.1 0.3 0 0.7 0.1 1 0.1 0.1 0.1 0.2 0.2 0.1"/><path class="st2" d="m37.1 21c0.1 0.2 0.5 1.3 0.9 1.3v-0.8c0-0.4 0.1-0.8 0.1-1.2 0-0.1 0-0.2 0.1-0.3 0-0.1 0-0.2-0.1-0.3v-0.3c-0.2 0-0.6 0-0.8-0.1-0.2 0-0.5 0-0.6 0.1-0.3 0.3 0.1 1 0.2 1.3 0 0.1 0.1 0.1 0.2 0.3"/><path class="st2" d="m36.5 22.2h0.3c0.1 0 0.1-0.2 0.1-0.3s0-0.3-0.1-0.4-0.1-0.2-0.2-0.4-0.2-0.4-0.3-0.7-0.3-0.9-0.6-1.1c-0.1-0.1-0.3 0-0.5 0-0.1 0.1-0.6 0.1-0.6 0.2-0.1 0.2 1.8 2.6 1.9 2.7"/><path class="st2" d="m33.1 19.6c0.1 0.2 0.3 0.3 0.5 0.5 0.1 0.2 0.2 0.4 0.3 0.5s0.3 0.1 0.4 0.3c0.2 0.2 0.4 0.5 0.5 0.8l0.3 0.3c0.2 0.2 0.3 0.4 0.5 0.5 0.1 0.1 0.3 0.1 0.4 0.1 0 0 0-0.1 0.1-0.1-0.1-0.2-0.3-0.4-0.4-0.6-0.1-0.1-0.2-0.1-0.3-0.2 0-0.1-0.1-0.1-0.1-0.2-0.1-0.1-0.2-0.3-0.3-0.4l-0.4-0.4c-0.1-0.1-0.1-0.3-0.2-0.4-0.2-0.2-0.3-0.5-0.6-0.7-0.1-0.1-0.3-0.2-0.5-0.2 0 0-0.2 0-0.2 0.2"/><path class="st2" d="m28.1 20.2 2.2 2.2c0.9 0.8 1.7 1.7 2.6 2.5 0.1 0.1 0.2 0.2 0.3 0.4l0.8 0.8c0.5 0.5 1 0.9 1.5 1.4 0.2 0.3 0.5 0.5 0.7 0.8 0.3 0.3 0.7 0.6 1 0.9 0.2 0.2 0.6 0.7 0.8 0.7 0-0.2-0.1-0.6-0.1-0.8v-0.3c0-0.1 0-0.2-0.1-0.3l-0.3-0.3c-0.1-0.1-0.2-0.3-0.3-0.4-0.2-0.2-0.4-0.2-0.6-0.3-0.1-0.1-0.3-0.2-0.4-0.3-0.1 0-0.2-0.1-0.3-0.1-0.1-0.1-0.1-0.2-0.2-0.3s-0.2-0.1-0.3-0.2-0.1-0.3-0.2-0.5c-0.1-0.1-0.1-0.3-0.2-0.4 0-0.1-0.1-0.3-0.1-0.4 0-0.2 0-0.4 0.1-0.6 0-0.1 0-0.2 0.1-0.4 0.1-0.3 0.2-0.5 0.5-0.8 0.1-0.1 0.2-0.2 0.3-0.2-0.1-0.2-0.2-0.3-0.4-0.5-0.1-0.1-0.2-0.1-0.2-0.2-0.1-0.1-0.2-0.3-0.4-0.5s-0.5-0.4-0.7-0.7l-1.4-1.4c-0.2-0.2-0.4-0.4-0.6-0.5s-0.4 0.1-0.6 0.1c-0.1 0-0.2 0-0.3-0.1h-0.7-0.5-0.6c-0.2 0.1-0.6 0-0.8 0h-1.1c-0.3 0.1 0.3 0.4 0.5 0.7"/><path class="st2" d="m35.2 24.6c0 0.2-0.1 0.7 0.2 0.6 0.4-0.1 0-0.5-0.2-0.6"/><path class="st2" d="m25 43.2c0.3-0.3 0.5-0.6 0.8-0.8 0.4-0.4 0.8-0.8 1.3-1.2l0.9-0.9c0.1-0.1 0.2-0.3 0.3-0.4 0.4-0.3 0.9-0.8 1.2-1.2 0-0.1 0.1-0.1 0.1-0.2 0.1-0.3-1.9-2.2-2.2-2.5-0.5-0.5-1-1-1.5-1.6-0.5-0.5-1.1-1-1.6-1.5-0.1-0.1-0.2-0.2-0.2-0.3-0.2-0.2-0.5-0.4-0.7-0.6-0.1-0.1-0.2-0.2-0.3-0.4-0.3-0.4-0.7-0.7-1-1l-0.5-0.5c-0.5-0.4-0.9-0.9-1.4-1.3-0.2-0.2-0.4-0.5-0.7-0.6v1 0.3 0.6 0.5 0.4 2 0.5c0 0.3 0 0.6-0.1 1v2 0.9 1.2 0.6 0.4 1.5 0.5 0.9 0.6 1.4 0.5 1.4 1.7 0.6s0.1 0.2 0.1 0.1c0.1-0.2 0.4-0.4 0.6-0.6 0.6-0.5 1.1-1.1 1.7-1.6 0.4-0.4 0.7-0.8 1.1-1.1 0.7-0.6 1.4-1.3 2.1-1.9-0.1-0.3 0-0.4 0-0.4"/><path class="st2" d="m34.7 57.4c0.1-0.4 0.3-0.8 0.5-1.2 0.1-0.2 0.2-0.5 0.2-0.8h-1.2c-0.2 0-0.7 0-0.9-0.1-0.1-0.1-0.1-0.2-0.2-0.3-0.1-0.2-0.2-0.3-0.3-0.5s0-0.4 0-0.7v-1c0-0.2 0.1-0.8 0-1-0.2 0.2-0.3 0.4-0.5 0.5l-1.8 1.8c-0.4 0.4-0.9 0.9-1.3 1.4-0.7 0.7-1.5 1.4-2.2 2.1-0.1 0.1-0.2 0.3-0.3 0.4l-0.4 0.4c-0.3 0.3-0.6 0.5-0.9 0.8l-0.6 0.6c-0.2 0.2-0.5 0.4-0.6 0.6v0.1c0.2 0.1 0.5 0.1 0.8 0.1 0.3 0.1 0.6 0.1 1 0.2h0.4c0.1 0 0.2 0 0.3 0.1 0.2 0 0.4 0.1 0.7 0.1s0.5 0 0.8 0.1c0.6 0.1 1.2 0.2 1.8 0.2h0.4c0.3 0 0.6 0.1 0.8 0.1 0.1 0 0.3 0 0.4 0.1h0.6c0.2 0 0.4 0.1 0.6 0.1 0.1 0 0.1-0.1 0.1-0.2 0.1-0.3 0-0.8 0-1.1v-2.1c0-0.1 0-0.1 0.1-0.2s0.9 0 1.1 0h0.2c0.1 0 0.2 0 0.3-0.1 0-0.1 0-0.3 0.1-0.5"/><path class="st2" d="m37.2 62.7h0.3v-1.2c0-0.4 0-1 0.2-1.3 0.2-0.4 0.3-0.7 0.8-0.7 0.1 0 0.1 0 0.1-0.1 0-0.3-0.5-0.4-0.7-0.4-0.1 0-0.2 0.1-0.4 0.1-0.8 0.4-0.7 1.6-0.7 2.4 0 0.1 0 0.5-0.1 0.6-0.2 0.2-2 0.1-2.4 0.1 0.2 0.1 0.4 0.1 0.6 0.2s0.5 0.3 0.8 0.3h1 0.5"/><path class="st2" d="m39.1 62.3c0-0.1-0.1-0.2-0.1-0.3v-1.4-0.6c0-0.1-0.1-0.1-0.1-0.1-0.2 0.1-0.3 0.1-0.5 0.2-0.1 0.1-0.2 0.4-0.2 0.5s-0.1 0.3-0.1 0.5v0.8 0.4 0.4 0.4 0.2h-0.9c-0.1 0-0.2 0-0.3 0.1h-0.1c0.2 0.1 0.5 0.3 0.7 0.4 0.2 0.2 0.3 0.4 0.5 0.5 0.1-0.3 0.4-0.5 0.6-0.7l0.3-0.3c0.2-0.2 0.4-0.3 0.5-0.5-0.2-0.2-0.2-0.4-0.3-0.5"/><path class="st2" d="m39.6 62c0 0.2 0.1 0.4 0.2 0.5 0.2-0.1 0.5-0.2 0.7-0.3 0.1 0 0.2-0.1 0.3-0.1v-0.1h-0.9-0.3"/><path class="st2" d="m1.3 32.7c-0.6-0.2-0.7-0.6-0.5-1.3l0.2-0.9 4.3 1c0.7 0.2 0.8 0.4 0.7 0.8h0.2l0.4-2h-0.2c-0.1 0.5-0.3 0.6-1 0.4l-4.3-1 0.2-0.9c0.2-0.9 0.6-1 1.1-1v-0.1l-1.3-0.3v0.2c0.1 0.2 0.1 0.4 0 0.9l-0.7 2.9c-0.1 0.2-0.1 0.4-0.2 0.5s-0.1 0.2-0.2 0.3v0.2l1.3 0.3"/><path class="st2" d="m3.7 24.2 3.2 1.6c0.7 0.3 0.7 0.6 0.5 1l0.2 0.1 0.9-1.9-0.2-0.1c-0.2 0.4-0.5 0.5-1.1 0.2l-1.5-0.7 1.4-2.8 1.5 0.7c0.7 0.3 0.7 0.6 0.5 1l0.2 0.1 0.9-1.8-0.2-0.2c-0.2 0.4-0.5 0.5-1.1 0.2l-3.2-1.6c-0.6-0.3-0.8-0.5-0.5-1h-0.2l-0.9 1.8 0.2 0.1c0.2-0.4 0.5-0.5 1.1-0.2l1.5 0.7-1.4 2.8-1.5-0.6c-0.7-0.3-0.7-0.6-0.5-1l-0.2-0.1-0.9 1.9 0.2 0.1c0.2-0.5 0.5-0.6 1.1-0.3"/><path class="st2" d="m13.7 15.2-0.1 0.1c0.4 0.7 0.3 0.9-0.3 1.6l-0.6 0.8c-0.2 0.2-0.4 0.3-0.6 0.1l-1.6-1.3 0.9-1.1c0.4-0.5 0.5-0.5 0.9-0.3l0.1-0.1-1.1-0.9-0.1 0.1c0.3 0.4 0.3 0.5 0 0.8l-1 1.2-1.9-1.6 1.1-1.3c0.4-0.5 0.6-0.6 1.1-0.3l0.1-0.1-0.6-0.5-2.6 3.2 0.1 0.1c0.3-0.4 0.6-0.4 1.1 0.1l2.8 2.3c0.6 0.5 0.6 0.7 0.3 1.1l0.1 0.1 2.6-3.2-0.7-0.9"/><path class="st2" d="m22 10.3c0.7-0.4 1-0.9 1.2-1.8l0.4 0.7 1.2-0.7-0.1-0.1c-0.4 0.2-0.6 0.2-1-0.5l-1.7-3.1c-0.3-0.6-0.3-0.9 0.1-1.1l-0.1-0.1-1.8 1 0.1 0.1c0.4-0.2 0.7-0.1 1 0.5l1.7 3c0 0.7-0.4 1.3-1 1.6-0.8 0.5-1.6 0.2-2-0.6l-1.4-2.5c-0.4-0.6-0.3-0.9 0.1-1.1l-0.1-0.1-1.8 1 0.2 0.1c0.4-0.2 0.6-0.2 1 0.5l1.4 2.5c0.5 0.8 1.4 1.3 2.6 0.7"/><path class="st2" d="m31.7 0.7v-0.2l-1.7 0.4v0.2c0.5-0.1 0.7 0 0.9 0.7l0.8 3.2-4.6-3.4-1.4 0.4v0.2c0.7-0.1 0.9 0.2 1.1 0.8l0.8 3.2c0.2 0.8 0 1-0.4 1.1v0.2l1.8-0.4v-0.2c-0.5 0.1-0.8 0-0.9-0.6l-1-3.9 5.2 3.8h0.2l-1.2-4.5c-0.3-0.6-0.2-0.9 0.4-1"/><path class="st2" d="m36.1 1.2 0.2 3.6c0 0.7-0.1 0.9-0.6 0.9v0.2l2.1-0.1v-0.2c-0.5 0-0.7-0.2-0.7-0.9l-0.2-3.6c0-0.7 0.1-0.9 0.6-0.9v-0.2l-2.1 0.1v0.2c0.5 0 0.6 0.2 0.7 0.9"/><path class="st2" d="m46.3 0.9v-0.2l-1.7-0.2v0.2c0.5 0.1 0.6 0.4 0.3 0.9l-1.8 3.4-0.9-3.9c-0.1-0.5 0.1-0.7 0.5-0.6v-0.2l-2-0.3v0.2c0.5 0.1 0.6 0.4 0.8 1.1l1.1 4.8h0.2l2.3-4.3c0.4-0.6 0.7-0.9 1.2-0.9"/><path class="st2" d="m50.3 7.7-0.9-0.3c-0.4-0.2-0.4-0.3-0.3-0.6l0.7-1.9 1.3 0.5c0.6 0.2 0.6 0.3 0.6 0.8l0.2 0.1 0.4-1.3-0.2-0.1c-0.2 0.4-0.4 0.4-0.8 0.3l-1.5-0.6 0.8-2.3 1.6 0.6c0.6 0.2 0.8 0.3 0.7 1h0.1l0.4-0.9-3.9-1.4-0.1 0.2c0.5 0.2 0.5 0.4 0.3 1.1l-1.2 3.4c-0.3 0.6-0.5 0.7-0.9 0.5l-0.1 0.2 3.9 1.4 0.6-0.9-0.2-0.1c-0.5 0.6-0.7 0.6-1.5 0.3"/><path class="st2" d="m56 10.7c-0.4-0.3-0.4-0.5 0-1.1l0.9-1.3 0.4 0.3c0.9 0.6 0.4 1.9 0.6 3.5l1 0.6 0.1-0.1c-0.8-0.6 0-2.4-0.5-3.5 0.8 0.2 1.4 0 1.8-0.5 0.4-0.6 0.3-1.6-0.8-2.3l-2-1.3-0.1 0.1c0.4 0.3 0.5 0.5 0.1 1.1l-2 3c-0.4 0.6-0.7 0.6-1 0.4l-0.1 0.1 1.7 1.1zm2.4-4.8 0.5 0.3c0.7 0.5 0.9 1.2 0.5 1.9-0.4 0.6-1 0.9-1.9 0.4l-0.6-0.4 1.5-2.2"/><path class="st2" d="m61 14.6c0.1 0.1 0.3 0.7 0.7 1.1 0.6 0.6 1.7 0.6 2.3 0 0.3-0.3 0.5-0.6 0.5-1.2 0-1.2-0.8-2.4-0.1-3.1 0.4-0.4 0.9-0.3 1.3 0.1s0.6 1.1 0.1 1.7l0.1 0.1 1-0.9-0.1-0.1c-0.1 0.1-0.2 0.1-0.2 0-0.2-0.2-0.2-0.5-0.6-1-0.7-0.7-1.5-0.7-2.1-0.1-0.3 0.3-0.5 0.7-0.5 1.2 0 0.9 0.7 2.3 0 3-0.4 0.4-1.1 0.4-1.5-0.1-0.4-0.4-0.7-1.2 0-2l-0.1-0.1-1.1 1.1 0.1 0.1c0 0.1 0.1 0.1 0.2 0.2"/><path class="st2" d="m64.9 19-0.1 0.1 1.2 1.7 0.1-0.1c-0.3-0.4-0.2-0.7 0.4-1.1l2.9-2c0.6-0.4 0.8-0.4 1.1 0l0.1-0.1-1.2-1.7-0.1 0.1c0.3 0.4 0.2 0.6-0.4 1.1l-2.9 2c-0.6 0.4-0.9 0.3-1.1 0"/><path class="st2" d="m72.6 21.5 0.3 0.8-4 1.8c-0.7 0.3-0.9 0.2-1.1-0.2l-0.1 0.1 0.8 1.8 0.2-0.1c-0.2-0.4-0.1-0.6 0.5-0.9l4-1.8 0.4 0.8c0.4 0.8 0.2 1.1-0.2 1.4v0.1l1.2-0.5-0.1-0.2c-0.2-0.1-0.4-0.3-0.6-0.7l-1.3-2.7c-0.1-0.2-0.2-0.4-0.2-0.5v-0.4l-0.1-0.2-1.2 0.5 0.1 0.2c0.7-0.2 1.1 0 1.4 0.7"/><path class="st2" d="m76.2 31.4h-0.2c0.1 0.5-0.3 0.5-0.8 0.4l-1.6-0.6 1.5-1.5c0.3-0.3 0.5-0.3 0.7 0.3h0.2l-0.5-2.2h-0.2c0.1 0.4 0 0.6-0.5 1.2l-1.6 1.6-1.8 0.4c-0.8 0.2-0.9-0.1-1-0.5h-0.2l0.4 2h0.2c-0.1-0.5 0.1-0.7 0.8-0.8l1.8-0.4 2.3 0.8c0.6 0.2 0.7 0.3 0.8 0.8h0.2l-0.5-1.5"/><path class="st2" d="m5 51.3c1.6-0.5 2.5-2.1 2-3.8s-2.1-2.6-3.7-2.1-2.5 2.1-2.1 3.8c0.5 1.7 2.1 2.6 3.8 2.1m-3.6-2.1c-0.4-1.2 0.5-2.4 2.1-2.9s2.9 0.1 3.3 1.4c0.3 1.1-0.4 2.3-2.1 2.8-1.4 0.4-2.9 0.1-3.3-1.3"/><path class="st2" d="m8.8 53.1c0.2 0.4 0.2 0.7-0.5 1l-3.1 1.8c-0.6 0.4-0.9 0.3-1.1-0.1l-0.2 0.1 1 1.8 0.1-0.1c-0.2-0.4-0.1-0.7 0.5-1l1.5-0.8 0.8 1.3c0.2 0.3 0.1 0.6-0.3 0.9l0.1 0.1 1.4-0.8-0.1-0.1c-0.4 0.2-0.7 0.2-0.9-0.2l-0.7-1.3 2.1-1.2 0.7 1.3c0.3 0.5 0.4 0.7-0.2 1.2h0.1l0.9-0.5-1.9-3.4h-0.2"/><path class="st2" d="m15.8 62.6c0.4 0.3 0.4 0.6-0.1 1.1l-2.3 2.8c-0.5 0.6-0.7 0.6-1.1 0.3l-0.1 0.1 3.2 2.6 0.9-0.7-0.1-0.1c-0.7 0.4-0.9 0.3-1.6-0.3l-0.8-0.6c-0.2-0.2-0.3-0.4-0.1-0.6l1.3-1.6 1.1 0.9c0.5 0.4 0.5 0.5 0.3 0.9l0.1 0.1 0.9-1.1-0.1-0.1c-0.4 0.3-0.5 0.3-0.8 0l-1.2-1 1.6-1.9 1.3 1c0.5 0.4 0.6 0.6 0.3 1.1l0.1 0.1 0.6-0.7-3.2-2.6-0.2 0.3"/><path class="st2" d="m24.3 68.2-2.4-1.1-0.1 0.2c0.4 0.2 0.5 0.5 0.2 1.1l-1.5 3.2c-0.3 0.6-0.6 0.7-1 0.6l-0.1 0.2 2.5 1.1c2 0.9 3.4 0.1 4-1.2 0.7-1.4 0.4-3.2-1.6-4.1m0.9 3.6c-0.7 1.4-1.8 2-3.1 1.4l-0.6-0.2c-0.5-0.2-0.6-0.5-0.2-1.3l1.8-3.8 1 0.5c1.6 0.7 1.7 2.2 1.1 3.4"/><path class="st2" d="m30.2 70.5c0.5 0.1 0.6 0.3 0.4 1l-0.7 3.5c-0.2 0.7-0.4 0.9-0.8 0.7v0.2l2 0.4v-0.2c-0.5-0.1-0.6-0.4-0.4-1l0.8-3.5c0.1-0.7 0.4-0.8 0.8-0.7v-0.2l-2-0.4-0.1 0.2"/><path class="st2" d="m39.9 71.3v0.2c0.5 0 0.7 0.2 0.7 0.9v3.4l-3.6-4.5h-1.5v0.2c0.7 0.1 0.9 0.4 0.9 1.1v3.4c0 0.8-0.2 1-0.7 1v0.2h1.7v-0.2c-0.5 0-0.8-0.2-0.8-0.8l-0.1-4 4.1 4.9h0.4v-4.7c0-0.7 0.2-0.9 0.7-0.9v-0.2h-1.8"/><path class="st2" d="m48.6 72.6c0.7-0.5 0.9-1 0.8-1.6-0.2-0.7-1-1.2-2.3-0.8l-2.1 0.6v0.2c0.5-0.1 0.7 0 0.9 0.7l0.9 3.4c0.2 0.7 0.1 0.9-0.4 1v0.2l2.5-0.7c1-0.3 1.6-1 1.4-1.8-0.1-0.8-0.8-1.3-1.7-1.2m-2.2-2 0.6-0.2c0.9-0.2 1.5 0.1 1.7 0.8s-0.2 1.3-1 1.5l-0.7 0.2zm2.4 4.8-0.5 0.1c-0.4 0.1-0.6 0-0.8-0.8l-0.4-1.6 0.5-0.1c1-0.3 1.7 0.1 2 0.9 0.2 0.8-0.3 1.3-0.8 1.5"/><path class="st2" d="m59.2 69.7-1.8-3.1c-0.4-0.6-0.3-0.9 0.1-1.1l-0.1-0.1-1.7 1 0.1 0.1c0.4-0.2 0.7-0.1 1 0.5l1.7 3c0 0.7-0.4 1.3-0.9 1.6-0.8 0.5-1.6 0.2-2-0.6l-1.6-2.4c-0.4-0.6-0.3-0.9 0.1-1.1l-0.1-0.1-1.8 1 0.1 0.1c0.4-0.2 0.6-0.2 1 0.5l1.4 2.4c0.5 0.9 1.5 1.4 2.7 0.7 0.7-0.4 1-0.9 1.2-1.8l0.4 0.7 1.2-0.7-0.1-0.1c-0.3 0.2-0.5 0.2-0.9-0.5"/><path class="st2" d="m64.1 63.3c0.4-0.8 0.3-1.4-0.2-1.8-0.5-0.5-1.5-0.6-2.4 0.3l-1.6 1.7 0.1 0.1c0.3-0.3 0.6-0.4 1.1 0.2l2.6 2.5c0.6 0.5 0.5 0.8 0.2 1.1l0.1 0.1 1.4-1.5-0.1-0.1c-0.3 0.3-0.6 0.3-1.1-0.2l-1.2-1.1 0.3-0.3c0.7-0.7 1.9 0 3.6 0.1l0.8-0.8-0.1-0.1c-0.7 0.6-2.3-0.5-3.5-0.2m-0.8 0.6-0.5 0.5-1.8-1.8 0.4-0.4c0.6-0.6 1.4-0.7 1.9-0.1 0.5 0.4 0.7 1.1 0 1.8"/><path class="st2" d="m70.8 54.8-0.1-0.1-1.2 2 0.1 0.1 0.1-0.2c0.2-0.4 0.5-0.4 1.1 0l0.5 0.3c0.4 0.3 0.2 0.8 0 1.1-0.7 1.2-2.3 1.4-3.7 0.5-1.3-0.8-1.8-2.1-1.1-3.1 0.4-0.7 1.3-1.3 2.3-0.8l0.1-0.1-1.4-0.9-0.1 0.2c0.1 0.1 0.1 0.2 0 0.4-0.2 0.4-0.6 0.5-1 1.2-0.7 1.2-0.6 3.1 1.2 4.2 1.1 0.7 2.9 0.8 4.2-1.4 0.1-0.2 0.6-1.1 0.7-1.4l-1.3-0.8c-0.5-0.5-0.7-0.7-0.4-1.2"/><path class="st2" d="m74.9 46.7-3.4-1c-0.7-0.2-0.8-0.4-0.7-0.9h-0.2l-0.6 2 0.2 0.1c0.1-0.5 0.4-0.6 1.1-0.4l1.6 0.5-0.9 3-1.6-0.5c-0.7-0.2-0.8-0.5-0.7-0.9h-0.2l-0.6 2h0.2c0.1-0.5 0.4-0.6 1.1-0.4l3.4 1c0.7 0.2 0.8 0.4 0.7 0.9h0.2l0.6-2h-0.2c-0.1 0.5-0.4 0.6-1.1 0.4l-1.5-0.5 0.9-3 1.6 0.5c0.7 0.2 0.8 0.4 0.7 0.9h0.2l0.6-2h-0.2c-0.2 0.4-0.5 0.5-1.2 0.3"/><path class="st2" d="m2 39.1c0 0.3 0.2 0.5 0.5 0.5s0.5-0.2 0.5-0.5-0.2-0.5-0.5-0.5-0.5 0.2-0.5 0.5"/><path class="st2" d="m74.7 39.1c0-0.3-0.2-0.5-0.5-0.5s-0.5 0.2-0.5 0.5 0.2 0.5 0.5 0.5 0.5-0.3 0.5-0.5"/></g></svg>
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/MANIFEST.md b/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/MANIFEST.md
new file mode 100644
index 0000000000..a7334244cd
--- /dev/null
+++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/MANIFEST.md
@@ -0,0 +1,301 @@
+# Manifest for gotham
+
+This file is a listing of all files considered to be part of this package.
+It is automatically generated with `l3build manifest`.
+
+
+## Repository manifest
+
+The following groups list the files included in the development repository of the package.
+Files listed with a ‘†’ marker are included in the TDS but not CTAN files, and files listed
+with ‘‡’ are included in both.
+
+### Source files
+
+These are source files for a number of purposes, including the `unpack` process which
+generates the installation files of the package. Additional files included here will also
+be installed for processing such as testing.
+
+* gotham.dtx ‡
+* gotham.ins ‡
+* gotham-logo.pdf ‡
+* gotham-layout.pdf ‡
+* gotham-blueprint.pdf ‡
+* gotham-safetybox.pdf ‡
+
+### Text files
+
+Plain text files included as documentation or metadata.
+
+* MANIFEST.md ‡
+* README.md ‡
+
+### Derived files
+
+The files created by ‘unpacking’ the package sources. This typically includes
+`.sty` and `.cls` files created from DocStrip `.dtx` files.
+
+* beamercolorthemegotham.sty †
+* beamerfontthemegotham.sty †
+* beamerinnerthemegotham.sty †
+* beamerouterthemegotham.sty †
+* beamerthemegotham.sty †
+* gotham-blueprint.pdf ‡
+* gotham-layout.pdf ‡
+* gotham-logo.pdf ‡
+* gotham-safetybox.pdf ‡
+
+### Support files
+
+These files are used for unpacking, typesetting, or checking purposes.
+
+* gotham-example169transp-1.png
+* gotham-example43dark-1.png
+* gotham-exampleSimple-1.png
+* gotham-logo.png
+* gotham-test-035-a.png
+* gotham-test-035-b.png
+
+### Test files
+
+These files form the test suite for the package. `.lvt` or `.lte` files are the individual
+unit tests, and `.tlg` are the stored output for ensuring changes to the package produce
+the same output. These output files are sometimes shared and sometime specific for
+different engines (pdfTeX, XeTeX, LuaTeX, etc.).
+
+* gotham-test-001.lvt
+* gotham-test-035.lvt
+* gotham-test-037.lvt
+* gotham-test-040.lvt
+* gotham-test-043.lvt
+* gotham-test-044.lvt
+* gotham-test-045.lvt
+* gotham-test-1002.lvt
+* gotham-test-1002b.lvt
+* gotham-test-1003.lvt
+* gotham-test-1003b.lvt
+* gotham-test-1004.lvt
+* gotham-test-1005.lvt
+* gotham-test-1006.lvt
+* gotham-test-1007.lvt
+* gotham-test-1007b.lvt
+* gotham-test-1008.lvt
+* gotham-test-1009.lvt
+* gotham-test-1010.lvt
+* gotham-test-1011.lvt
+* gotham-test-1012.lvt
+* gotham-test-1013.lvt
+* gotham-test-1014.lvt
+* gotham-test-1015.lvt
+* gotham-test-1016.lvt
+* gotham-test-1017.lvt
+* gotham-test-1018.lvt
+* gotham-test-1019.lvt
+* gotham-test-1020.lvt
+* gotham-test-1021.lvt
+* gotham-test-1022.lvt
+* gotham-test-1024.lvt
+* gotham-test-1025.lvt
+* gotham-test-1026.lvt
+* gotham-test-1027.lvt
+* gotham-test-1028.lvt
+* gotham-test-1031.lvt
+* gotham-test-1032.lvt
+* gotham-test-1037.lvt
+* gotham-test-001.lve
+* gotham-test-035.luatex.tlg
+* gotham-test-035.tlg
+* gotham-test-035.xetex.tlg
+* gotham-test-037.luatex.tlg
+* gotham-test-037.tlg
+* gotham-test-037.xetex.tlg
+* gotham-test-040.luatex.tlg
+* gotham-test-040.tlg
+* gotham-test-040.xetex.tlg
+* gotham-test-043.luatex.tlg
+* gotham-test-043.tlg
+* gotham-test-043.xetex.tlg
+* gotham-test-044.luatex.tlg
+* gotham-test-044.tlg
+* gotham-test-044.xetex.tlg
+* gotham-test-045.luatex.tlg
+* gotham-test-045.tlg
+* gotham-test-045.xetex.tlg
+* gotham-test-1002.luatex.tlg
+* gotham-test-1002.tlg
+* gotham-test-1002.xetex.tlg
+* gotham-test-1002b.luatex.tlg
+* gotham-test-1002b.tlg
+* gotham-test-1002b.xetex.tlg
+* gotham-test-1003.luatex.tlg
+* gotham-test-1003.tlg
+* gotham-test-1003.xetex.tlg
+* gotham-test-1003b.luatex.tlg
+* gotham-test-1003b.tlg
+* gotham-test-1003b.xetex.tlg
+* gotham-test-1004.luatex.tlg
+* gotham-test-1004.tlg
+* gotham-test-1004.xetex.tlg
+* gotham-test-1005.luatex.tlg
+* gotham-test-1005.tlg
+* gotham-test-1005.xetex.tlg
+* gotham-test-1006.luatex.tlg
+* gotham-test-1006.tlg
+* gotham-test-1006.xetex.tlg
+* gotham-test-1007.luatex.tlg
+* gotham-test-1007.tlg
+* gotham-test-1007.xetex.tlg
+* gotham-test-1007b.luatex.tlg
+* gotham-test-1007b.tlg
+* gotham-test-1007b.xetex.tlg
+* gotham-test-1008.luatex.tlg
+* gotham-test-1008.tlg
+* gotham-test-1008.xetex.tlg
+* gotham-test-1009.luatex.tlg
+* gotham-test-1009.tlg
+* gotham-test-1009.xetex.tlg
+* gotham-test-1010.luatex.tlg
+* gotham-test-1010.tlg
+* gotham-test-1010.xetex.tlg
+* gotham-test-1011.luatex.tlg
+* gotham-test-1011.tlg
+* gotham-test-1011.xetex.tlg
+* gotham-test-1012.luatex.tlg
+* gotham-test-1012.tlg
+* gotham-test-1012.xetex.tlg
+* gotham-test-1013.luatex.tlg
+* gotham-test-1013.tlg
+* gotham-test-1013.xetex.tlg
+* gotham-test-1014.luatex.tlg
+* gotham-test-1014.tlg
+* gotham-test-1014.xetex.tlg
+* gotham-test-1015.luatex.tlg
+* gotham-test-1015.tlg
+* gotham-test-1015.xetex.tlg
+* gotham-test-1016.luatex.tlg
+* gotham-test-1016.tlg
+* gotham-test-1016.xetex.tlg
+* gotham-test-1017.luatex.tlg
+* gotham-test-1017.tlg
+* gotham-test-1017.xetex.tlg
+* gotham-test-1018.luatex.tlg
+* gotham-test-1018.tlg
+* gotham-test-1018.xetex.tlg
+* gotham-test-1019.luatex.tlg
+* gotham-test-1019.tlg
+* gotham-test-1019.xetex.tlg
+* gotham-test-1020.luatex.tlg
+* gotham-test-1020.tlg
+* gotham-test-1020.xetex.tlg
+* gotham-test-1021.luatex.tlg
+* gotham-test-1021.tlg
+* gotham-test-1021.xetex.tlg
+* gotham-test-1022.luatex.tlg
+* gotham-test-1022.tlg
+* gotham-test-1022.xetex.tlg
+* gotham-test-1024.luatex.tlg
+* gotham-test-1024.tlg
+* gotham-test-1024.xetex.tlg
+* gotham-test-1025.luatex.tlg
+* gotham-test-1025.tlg
+* gotham-test-1025.xetex.tlg
+* gotham-test-1026.luatex.tlg
+* gotham-test-1026.tlg
+* gotham-test-1026.xetex.tlg
+* gotham-test-1027.luatex.tlg
+* gotham-test-1027.tlg
+* gotham-test-1027.xetex.tlg
+* gotham-test-1028.luatex.tlg
+* gotham-test-1028.tlg
+* gotham-test-1028.xetex.tlg
+* gotham-test-1031.luatex.tlg
+* gotham-test-1031.tlg
+* gotham-test-1031.xetex.tlg
+* gotham-test-1032.luatex.tlg
+* gotham-test-1032.tlg
+* gotham-test-1032.xetex.tlg
+* gotham-test-1037.luatex.tlg
+* gotham-test-1037.tlg
+* gotham-test-1037.xetex.tlg
+
+
+## TDS manifest
+
+The following groups list the files included in the TeX Directory Structure used to install
+the package into a TeX distribution.
+
+### Source files (TDS)
+
+All files included in the `gotham/source` directory.
+
+* gotham.dtx
+* gotham.ins
+
+### TeX files (TDS)
+
+All files included in the `gotham/tex` directory.
+
+* beamercolorthemegotham.sty
+* beamerfontthemegotham.sty
+* beamerinnerthemegotham.sty
+* beamerouterthemegotham.sty
+* beamerthemegotham.sty
+* gotham-blueprint.pdf
+* gotham-layout.pdf
+* gotham-logo.pdf
+* gotham-safetybox.pdf
+
+### Doc files (TDS)
+
+All files included in the `gotham/doc` directory.
+
+* MANIFEST.md
+* README.md
+* ctan.ann
+* ctan.note
+* gotham-dev-impl.pdf
+* gotham-doc.pdf
+* gotham-doc.tex
+* gotham-example169transp.pdf
+* gotham-example169transp.tex
+* gotham-example43dark.pdf
+* gotham-example43dark.tex
+* gotham-exampleSimple.pdf
+* gotham-exampleSimple.tex
+* gotham-user-cmds.pdf
+* gotham.pdf
+* section-Beamer.tex
+* section-Conclusion.tex
+* section-Gotham.tex
+
+
+## CTAN manifest
+
+The following group lists the files included in the CTAN package.
+
+### CTAN files
+
+* MANIFEST.md
+* README.md
+* ctan.ann
+* ctan.note
+* gotham-blueprint.pdf
+* gotham-dev-impl.pdf
+* gotham-doc.pdf
+* gotham-doc.tex
+* gotham-example169transp.pdf
+* gotham-example169transp.tex
+* gotham-example43dark.pdf
+* gotham-example43dark.tex
+* gotham-exampleSimple.pdf
+* gotham-exampleSimple.tex
+* gotham-layout.pdf
+* gotham-logo.pdf
+* gotham-safetybox.pdf
+* gotham-user-cmds.pdf
+* gotham.dtx
+* gotham.ins
+* gotham.pdf
+* section-Beamer.tex
+* section-Conclusion.tex
+* section-Gotham.tex
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/README.md b/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/README.md
new file mode 100644
index 0000000000..82fa92e641
--- /dev/null
+++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/README.md
@@ -0,0 +1,127 @@
+# Gotham Beamer Theme
+
+<!-- Logo -->
+<p align="center">
+ <a href="https://gitlab.com/RomainNOEL/beamertheme-gotham">
+ <img src="support/gotham-logo.png" width="100" alt="Gotham logo">
+ </a>
+</p>
+
+<!-- BADGES -->
+<p align="center">
+ <a href="https://ctan.org/pkg/gotham"><img src="https%3A%2F%2Fctan.org%2Fjson%2F2.0%2Fpkg%2Fgotham&query=%24.version.number&logo=latex&label=CTAN"/></a>
+ <a href="https://gitlab.com/RomainNOEL/beamertheme-gotham/-/release/"><img src="https://img.shields.io/badge/Latest_Release-%{latest_tag}-blue"/></a>
+ <a href="https://gitlab.com/RomainNOEL/beamertheme-gotham/-/pipelines?page=1&scope=all&ref=main"><img src="https://gitlab.com/RomainNOEL/beamertheme-gotham/badges/main/pipeline.svg"/></a>
+ <a href="https://gitlab.com/RomainNOEL/beamertheme-gotham/-/blob/main/LICENSE.txt"><img src="https://img.shields.io/badge/License-LPPL_1.3c--Clause-blue.svg"/></a>
+ <a href="https://gitlab.com/RomainNOEL/beamertheme-gotham/-/artifacts/"><img src="https://img.shields.io/badge/Documentation-PDF_online-green"/></a>
+ <a href="https://gitlab.com/RomainNOEL/beamertheme-gotham/-/blob/main/Authors.md"><img src="https://www.repostatus.org/badges/latest/active.svg"/></a>
+</p>
+
+
+## What is Gotham ?
+This `Gotham` package is a modern, minimal-ish, versatile and extendable theme for your `Beamer` presentations using `LaTeX(3)`.
+
+
+## Table of Contents
+[[_TOC_]]
+
+
+## Why this package ?
+ONCE UPON THE TIME, I was adapting `Metropolis` Beamer theme to get my institutional templates.
+Indeed, `Metropolis` Beamer theme is a great work that is very convenient and well appreciated by many.
+
+BUT, `Metropolis` seems not maintained anymore and is not flexible enough.
+Moreover, `Metropolis` (or its successor initiative Moloch) and Beamer in some extends are not very flexible.
+For example, it requires cumbersome modifications to apply a different background for your section frames.
+
+SO, `Gotham` tries to bring that kind of flexibility and `LaTeX3` implementation on top of the good-looking `Metropolis` theme.
+
+
+## See it in action
+Here are some screenshot of what you can obtain:
+
+<img src="support/gotham-example169transp-1.png" width="700">
+
+<img src="support/gotham-example43dark-1.png" width="700">
+
+An `pdf` example/demo result is available [here](https://gitlab.com/RomainNOEL/beamertheme-gotham/-/artifacts/), and the `tex` source file to build it is available [here](/examples/section-Gotham.tex).
+
+The following code shows a **minimal example** of a Beamer presentation using Gotham.
+```latex
+\documentclass{beamer}
+\usetheme{gotham}
+\title{A minimal example}
+\date{\today}
+\author{Romain NOEL}
+\institute{Centre for Modern Beamer Themes}
+\begin{document}
+ \maketitle
+ \section{First Section}
+ \begin{frame}{First Frame}
+ Hello, world!
+ \end{frame}
+\end{document}
+```
+is yielding the following:
+
+<img src="support/gotham-exampleSimple-1.png" width="700">
+
+
+## Some of the features included
+- `l3build` a build system for LaTeX that unpack the sources, build the documentation and examples, run unit tests, check tags, prepare for CTAN publishing, etc...
+- `expl3`
+- dark, light and transparent theme
+- can adapt to 16:9 and 4:3 screen format
+- progress bar
+- **can mix** themes
+
+
+## Documentation
+The complete `pdf` documentation can be found through an [artefact](https://gitlab.com/RomainNOEL/beamertheme-gotham/-/artifacts/).
+
+
+## How to install ?
+Several possibilities are available and tested:
+- download the `.sty` released zip files,
+- build from sources using `l3build`,
+- download or update from [CTAN](https://ctan.org/pkg/beamertheme-gotham),
+- fork a example from [Overleaf](https://overleaf.com) .
+
+### Download from release
+The zip file containing the `.sty` files is downloadable through our latest [release link](https://gitlab.com/RomainNOEL/beamertheme-gotham/-/releases/)
+
+### Build from sources
+You can also install the theme from sources, in which case you need a working LaTeX installation with `l3build` installed.
+Then just follow these steps:
+```bash
+git clone https://gitlab.com/RomainNOEL/beamertheme-gotham.git
+cd beamertheme-gotham
+l3build install
+```
+
+Additionally you can use the other `l3build` target:
+- `l3build unpack` builds the theme style files.
+- `l3build doc` builds this documentation manual and the examples.
+- `l3build check` builds the theme and manual.
+- `l3build install` installs the theme into your local texmf folder.
+- STOP unless you want remove it.
+- `l3build uninstall` removes the theme from your local texmf folder.
+- `l3build clean` removes the files generated by `l3build`.
+
+### Download from CTAN
+The CTAN repository is available through the Gotham [package](https://ctan.org/pkg/beamertheme-gotham), so you can install it using your favorite LaTeX package manager. For example, with `tlmgr`:
+```bash
+tlmgr install beamertheme-gotham
+```
+
+### Fork from Overleaf example
+If you want to play with it before installing, you can fork this [Overleaf project](https://overleaf.com) and have fun.
+
+
+## License
+The LaTeX Project Public License [(LPPL)](/LICENSE.txt)
+
+
+## Project status
+The status of the project is "maintained".
+However, if you have a bit of free time and good will to help the maintenance, it will be very appreciated and welcomed. \ No newline at end of file
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/ctan.ann b/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/ctan.ann
new file mode 100644
index 0000000000..e34df0a4c6
--- /dev/null
+++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/ctan.ann
@@ -0,0 +1,11 @@
+# [Gotham](https://gitlab.com/RomainNOEL/beamertheme-gotham) announcement
+
+This `Gotham` package is a modern, minimal-ish, versatile and extendable theme for your `Beamer` presentations using `LaTeX(3)`.
+`Gotham` tries to bring higher flexibility thanks to `LaTeX3` implementation on top of the good-looking `Metropolis` theme.
+
+## Features
+- 16:9 and 4:3 compatible
+- supports different background color (dark and light)
+- can adapt beamertemplate to declared context
+- extend color set
+- improved progress bars
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/ctan.note b/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/ctan.note
new file mode 100644
index 0000000000..ff43a42640
--- /dev/null
+++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/ctan.note
@@ -0,0 +1,3 @@
+Please see the file `gotham-exampleSimple.tex` in:
+doc/latex/gotham/examples/gotham-exampleSimple.tex
+Thanks \ No newline at end of file
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham-blueprint.pdf b/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham-blueprint.pdf
new file mode 100644
index 0000000000..04975af210
--- /dev/null
+++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham-blueprint.pdf
Binary files differ
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham-dev-impl.pdf b/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham-dev-impl.pdf
new file mode 100644
index 0000000000..1038810b5b
--- /dev/null
+++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham-dev-impl.pdf
Binary files differ
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham-doc.pdf b/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham-doc.pdf
new file mode 100644
index 0000000000..3f6105497a
--- /dev/null
+++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham-doc.tex b/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham-doc.tex
new file mode 100644
index 0000000000..4072ea2504
--- /dev/null
+++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham-doc.tex
@@ -0,0 +1,1094 @@
+\documentclass{l3doc}
+ \usepackage[T1]{fontenc}
+ \usepackage{pdfpages}
+ \usepackage{standalone}
+ % \usepackage{gotham}
+ % \usepackage{readprov}
+ % \ReadPackageInfos{beamerthemegotham}
+ \edef\GothamVersion{v1.1.0.b} %{\fileversion}
+ \edef\GothamDate{2024-09-20} %{\filedate}
+
+
+ \usepackage{parskip}
+ \usepackage{setspace}
+ \usepackage{xspace}
+ \onehalfspacing
+
+ \usepackage{xcolor}
+ \definecolor{tPrim}{HTML}{00707F} % Green-Blue
+ \definecolor{tSec}{HTML}{5FA4B0} % Green-Blue light
+ \definecolor{tAccent}{HTML}{F07F3C} % Orange
+ \definecolor{tGrey}{HTML}{E6E6E1} % Grey-Beige
+
+ \usepackage{listings}
+ \lstset{%
+ language=[LaTeX]{TeX},
+ basicstyle=\ttfamily,
+ keywordstyle=\color{tPrim}\bfseries,
+ commentstyle=\color{tSec},
+ stringstyle=\color{tSec},
+ backgroundcolor=\color{white},
+ numbers=none,
+ numberstyle=\tiny\ttfamily,
+ stepnumber=2,
+ showspaces=false,
+ showstringspaces=false,
+ showtabs=false,
+ frame=none,
+ framerule=1pt,
+ tabsize=2,
+ rulesep=5em,
+ captionpos=b,
+ breaklines=true,
+ breakatwhitespace=false,
+ framexleftmargin=0em,
+ framexrightmargin=0em,
+ xleftmargin=0em,
+ xrightmargin=0em,
+ aboveskip=1em,
+ belowskip=1em,
+ morekeywords={\usetheme,\institute,\maketitle,\subtitle,
+ \gothamset,
+ \colorlet,\setbeamercolor,
+ plain,\defbeamertemplate
+ },
+ }
+ \lstMakeShortInline|
+
+ \usepackage{hyperref}
+
+ \setlength{\fboxsep}{0pt}%
+ \usepackage{subcaption} % for subfigures
+ \usepackage{cleveref} % for references
+
+ \providecommand{\defopt}[1]{default: #1}%{\underline{#1}}
+ \newenvironment{DescribeGothamOption}[3]{
+ \DescribeOption{#1} % from l3doc
+ \begin{minipage}[t]{\textwidth}
+ \textit{\textbf{\textcolor{tSec}{#2}}}\dotfill\,\defopt{#3}\par
+ \begingroup
+ \vspace{0.5em}
+ }{
+ \par
+ \endgroup
+ \end{minipage}
+ }
+
+
+%% =====================================================================
+\title{\textsc{Gotham}\\ A modern, minimal-ish, versatile and extendable theme for Beamer}
+\author{Romain NOEL \\ \url{romainoel@free.fr}}
+\date{\GothamVersion~---~\GothamDate}
+
+\providecommand{\themename}{\textbf{\textsc{Gotham}}\xspace}
+
+%% =====================================================================
+
+
+\begin{document}
+\maketitle
+\tableofcontents
+
+
+%% ------------------------------------
+\section{Introduction}
+ Beamer is an awesome way to make presentations with \LaTeX, but its theme selection is surprisingly sparse.
+ The stock themes share an aesthetic that can be a little cluttered, while the few distinctive custom themes available are often specialized for a particular corporate or institutional brand.
+
+ The goal of \themename is to provide a simple, modern Beamer theme suitable for anyone to use.
+ It tries to minimize noise and maximize space for content; some visual flourishes are offered as options.
+
+ The final product provides a modern, elegant and versatile theme with a high degree of customization.
+ So it can easily be used to build a particular corporate or institutional brand theme on top of it.
+
+ The implementation of this theme is strongly inspired from the excellent \href{https://github.com/matze/mtheme}{\textsc{Metropolis}} theme by Matthias Vogelgesang, from which it borrows numerous options.
+ \themename's codebase lives on
+ \href{https://gitlab.com/RomainNOEL/beamertheme-gotham} {Gitlab}.
+ \newline
+ If you have issues, find mistakes in the manual or want to help make the theme even better, please get in touch there.
+ Any feature request, issue report or merge requests are welcome.
+
+
+%% ------------------------------------
+\section{Getting Started}
+\subsection{Installing from CTAN}
+ The latest stable version of \themename is available on
+ \href{https://ctan.org/pkg/beamertheme-gotham}{CTAN} and should now be part of the usual \TeX\ distributions (\TeX\ Live, Mac\TeX\ , Mik\TeX\ ), under the name \textit{beamertheme-gotham}.
+ It means that if your distribution is kept up-to-date, the package should normally be already installed on your system.
+ If this is not the case, consider updating the packages of your Tex distribution.
+
+ For \TeX\ Live and Mac\TeX\ users, this usually means running
+ \begin{lstlisting}
+ tlmgr update --all
+ \end{lstlisting}
+ or if administrative privileges are required
+ \begin{lstlisting}
+ sudo tlmgr update --all
+ \end{lstlisting}
+
+ For Mik\TeX\ users, please refer to \href{https://miktex.org/howto/update-miktex}{the official Mik\TeX\ documentation}.
+
+
+\subsection{Installing from Gitlab}
+ If you want to use the cutting-edge development version of \themename, you can install it manually by following these steps:
+ \begin{description}
+ \item[Download the source] from
+ \href{https://gitlab.com/RomainNOEL/beamertheme-gotham}{\themename repository}
+ using |git clone| or as a
+ \href{https://gitlab.com/RomainNOEL/beamertheme-gotham/-/archive/master/beamertheme-gotham-master.zip}{zip archive}
+ of the latest development version.
+ \item[Compile the style files] by running |l3build unpack| inside the downloaded directory.
+ (Or run \LaTeX{} directly on |source/gothamtheme.ins|.)
+ \item[Move the resulting |*.sty| files] to the folder containing your presentation.
+ To use \themename with many presentations, run
+ |l3build install| or move the |*.sty| files to a folder in your \TeX{} path instead.
+ \item[Use the theme] by declaring \lstinline|\usetheme{gotham}| in the preamble of your document.
+ \end{description}
+
+ \themename uses the l3build system to offer the following installation options for advanced users:
+ \begin{description}
+ \item[|l3build unpack|] builds the theme style files.
+ \item[|l3build doc|] builds this documentation manual and the examples.
+ \item[|l3build check|] builds the theme and manual.
+ \item[|l3build clean|] removes the files generated by |l3build|.
+ \item[|l3build install|] installs the theme into your local texmf folder.
+ \item[|l3build uninstall|] removes the theme from your local texmf folder.
+ \end{description}
+
+
+% \subsection{Overleaf}
+% \themename is therefore automatically supported for new documents.
+% If you want to switch older documents to use the \themename theme, you need to \href{https://www.overleaf.com/blog/new-feature-select-your-tex-live-compiler-version}{select
+% TexLive 2021 or higher as your TeX Live version} (this may cause issues with other packages used in your presentation).
+
+% In addition to that, a template project was created and is publicly available in the \href{https://www.overleaf.com/latex/templates/gotham-beamer-theme/wjyyzvdzqkgf}{Overleaf Gallery} to bootstrap your presentation.
+
+
+%% ------------------------------------
+\subsection{A Minimal Example}
+ The following code shows a minimal example of a Beamer presentation using \themename, and the output generated is given on \cref{fig-minimal}.
+
+ \begin{lstlisting}
+ \documentclass{beamer}
+ \usetheme{gotham} % Loads Gotham theme
+ \title{A minimal example}
+ \subtitle{using Gotham theme}
+ \date{\today}
+ \author{John DOE}
+ \institute{Your university or company}
+
+ \begin{document}
+ \maketitle
+ \section{First Section}
+ \begin{frame}{First Frame}
+ Hello world !
+ \end{frame}
+ \end{document}
+ \end{lstlisting}
+
+ \begin{figure}[htp]
+ \centering
+ \fbox{\includegraphics[width=0.7\textwidth]{gotham-exampleSimple.pdf}}
+ \caption{A simple example.}
+ \label{fig-minimal}
+ \end{figure}
+
+
+\subsection{Dependencies}
+ \themename depends on the |beamer| class and the following standard packages:
+ \begin{itemize}
+ \item |tikz|
+ \item |expl3|
+ \item |xfp|
+ \item |etoolbox|
+ \item |ifxetex|
+ \item |ifluatex|
+ \end{itemize}
+
+ For best results, we recommend installing the fonts
+ \href{https://github.com/mozilla/Fira}{|Fira Sans|} and |Fira Mono| and compiling with \themename using XeLaTeX or LuaTeX.
+ These are optional dependencies; \themename is compatible with (e.g.) pdf\LaTeX\ and will fall back to standard fonts if |Fira Sans| or |Fira Mono| is not installed.
+
+ The packaged name of |Fira Sans| is |Fira Sans OT| in some Linux distributions; this case is automatically handled by \themename.
+
+
+%% ------------------------------------
+\section{Customization}
+\subsection{Package options}
+ \themename provides a number of options, which can be set using a key=value interface.
+ The primary way to set options is to provide a comma-separated list of option-value pairs when loading \themename in the preamble:
+ \begin{lstlisting}[gobble=2]
+ \usetheme[option1=value1, option2=value2, ...]{gotham}
+ \end{lstlisting}
+
+ Options can be changed at any time --- even mid-presentation ! --- with the |\gothamset| command.
+ \begin{lstlisting}[gobble=2]
+ \gothamset{option1=newvalue1, option2=newvalue2, ...}
+ \end{lstlisting}
+
+ The list of options is structured as shown in the following example.
+
+ \begin{DescribeGothamOption}{option key}
+ {list of possible values}{default}
+ A short description of the option.
+ \end{DescribeGothamOption}
+
+ As \themename implementation is heavily inspired from the excellent
+ \href{https://github.com/matze/mtheme}{\textsc{Metropolis}} theme by Matthias Vogelgesang, many of \textsc{Metropolis} options are also available in \themename.
+
+
+\subsubsection{Font theme}
+ \DescribeOption{format title}
+ % \begin{DescribeGothamOption}{format title}
+ % {regular, lower, upper, titlecase}{regular}{
+ % A short description of the option.
+ % \end{DescribeGothamOption}
+ \DescribeOption{format subtitle}
+ % \begin{DescribeGothamOption}{format subtitle}
+ % {regular, lower, upper, titlecase}{regular}{
+ % A short description of the option.
+ % \end{DescribeGothamOption}
+ \DescribeOption{format frametitle}
+ % \begin{DescribeGothamOption}{format frametitle}
+ % {regular, lower, upper, titlecase}{regular}{
+ % A short description of the option.
+ % \end{DescribeGothamOption}
+ \DescribeOption{format framesubtitle}
+ % \begin{DescribeGothamOption}{format framesubtitle}
+ % {regular, lower, upper, titlecase}{regular}{
+ % A short description of the option.
+ % \end{DescribeGothamOption}
+ \DescribeOption{format part}
+ % \begin{DescribeGothamOption}{format part}
+ % {regular, lower, upper, titlecase}{regular}{
+ % A short description of the option.
+ % \end{DescribeGothamOption}
+ \DescribeOption{format section}
+ % \begin{DescribeGothamOption}{format section}
+ % {regular, lower, upper, titlecase}{regular}{
+ % A short description of the option.
+ % \end{DescribeGothamOption}
+ \begin{DescribeGothamOption}{format subsection}
+ {regular, lower, upper, titlecase}{regular}
+ Individually controls the format/case of titles, subtitles, frametitle, framesubtitles, part, section and subsection titles.
+ \vspace{6em}
+ \end{DescribeGothamOption}
+
+ \DescribeOption{shape title}
+ % \begin{DescribeGothamOption}{shape title}
+ % {regular, italic, smallcaps}{regular}{
+ % A short description of the option.
+ % \end{DescribeGothamOption}
+ \DescribeOption{shape subtitle}
+ % \begin{DescribeGothamOption}{shape subtitle}
+ % {regular, italic, smallcaps}{regular}{
+ % A short description of the option.
+ % }\end{DescribeGothamOption}
+ \DescribeOption{shape frametitle}
+ % \begin{DescribeGothamOption}{shape frametitle}
+ % {regular, italic, smallcaps}{regular}{
+ % A short description of the option.
+ % }\end{DescribeGothamOption}
+ \DescribeOption{shape framesubtitle}
+ % \begin{DescribeGothamOption}{shape framesubtitle}
+ % {regular, italic, smallcaps}{regular}{
+ % A short description of the option.
+ % }\end{DescribeGothamOption}
+ \DescribeOption{shape part}
+ % \begin{DescribeGothamOption}{shape part}
+ % {regular, italic, smallcaps}{regular}{
+ % A short description of the option.
+ % }\end{DescribeGothamOption}
+ \DescribeOption{shape section}
+ % \begin{DescribeGothamOption}{shape section}
+ % {regular, italic, smallcaps}{regular}{
+ % A short description of the option.
+ % }\end{DescribeGothamOption}
+ \begin{DescribeGothamOption}{shape subsection}
+ {regular, italic, smallcaps}{regular}{
+ Individually controls the shape/series of titles, subtitles, frametitle, framesubtitles, part, section and subsection titles.
+ \vspace{6em}
+ }\end{DescribeGothamOption}
+
+ \begin{figure}[htb]
+ \centering
+ \begin{subfigure}[b]{0.475\textwidth}
+ \centering
+ \includegraphics[width=\linewidth]{gotham-test-035-a.png}
+ \caption{Example of |format~frametitle=titlecase, shape~frametitle=smallcaps, format~framesubtitle= lower, shape~framesubtitle=regular|.}
+ \label{fig-035-a}
+ \end{subfigure}
+ \begin{subfigure}[b]{0.475\textwidth}
+ \centering
+ \includegraphics[width=\linewidth]{gotham-test-035-b.png}
+ \caption{Example of |format~frametitle=lower, shape~frametitle=italic, format~framesubtitle= regular, shape~framesubtitle=italic|.}
+ \label{fig-035-b}
+ \end{subfigure}
+ \caption{Examples of format and shape settings.}
+ \label{fig-035}
+ \end{figure}
+
+
+\subsubsection{Color theme}
+ The included \themename color theme is used by default, but its colors can be easily changed to suit your tastes.
+ All of the theme's styles are defined in terms of a few main colors:
+ \begin{itemize}
+ \item |colorA| The primary theme color, used for frametitle, standout and text if the appropriate options are selected.
+ \end{itemize}
+
+ An easy way to customize the theme is to redefine these colors using:
+ \begin{lstlisting}
+ \colorlet{colorPale}{gPaleYell} % BG in light/normal mode
+ \colorlet{colorDark}{gDarkBlack} % FG in light/normal mode
+ \colorlet{colorA}{gDarkTeal} % frametitle, standin.out,
+ \colorlet{colorAreversed}{gLightTeal} % frametitle, standin.in,
+ \colorlet{colorB}{gMidGrey} % gray BG : progress bar, blocks
+ \colorlet{colorC}{gDeepYellOr} % progress bar
+ \colorlet{colorD}{gLightOrange} % alert
+ \colorlet{colorE}{gLightGreen} % example
+ \end{lstlisting}
+
+ \begin{DescribeGothamOption}{background}{light, dark, transparent}{transparent}{
+ Controls weather the color of all headings (title page, frame title, etc.) should be in black (|default|) or in a slightly darker shade of the theme color |theme|.
+ }\end{DescribeGothamOption}
+
+ \begin{DescribeGothamOption}{colorset}
+ {red, anthracite}{anthracite}{% blue, green, orange, teal,
+ Predefined set colors (|colorA, colorB, ...|) leading to different ambiances.
+ }\end{DescribeGothamOption}
+
+ \begin{DescribeGothamOption}{block}{native, transparent, fill}{native}{
+ Optionally adds a light grey background to block environments like |theorem| and |example|.
+ }\end{DescribeGothamOption}
+
+
+\subsubsection{Inner theme}
+ \begin{DescribeGothamOption}{title page}
+ {gotham~normal, gotham~reversed, gotham~dividedpic, gotham~splitvert, <your-name>}{gotham~normal}{
+ By setting this option you can change the title page according predefined style or even set your own template.
+ If you want to use your own template, this latter should be previously defined with:
+ \lstinline|\defbeamertemplate{title page}{<your-name>}{<your-defintion>}|.
+ }\end{DescribeGothamOption}
+
+ \begin{DescribeGothamOption}{watermark default}
+ {on, off}{off}{
+ Enable or disable the watermark background template by default (ie. without using |\begin{frame}[watermark]|).
+ }\end{DescribeGothamOption}
+
+ \begin{DescribeGothamOption}{watermark template}
+ {gotham~draft, <your-name>}{gotham~draft}{
+ Set the watermark background template to use when the |watermark| option is activated (by default or locally).
+ If you want to use your own template, this latter should be previously defined with:
+ \lstinline|\defbeamertemplate{background}{watermark/<your-name>}{<your-defintion>}|.
+ }\end{DescribeGothamOption}
+
+ \DescribeOption{standin template}
+ % \begin{DescribeGothamOption}{standin template}
+ % {list of possible values}{default}{
+ % A short description of the option.
+ % }\end{DescribeGothamOption}
+ \begin{DescribeGothamOption}{standout template}
+ {gotham, <your-name>}{default}{
+ Set the standin and stantout background template to use when the |standin| or |stantout| frame option is activated.
+ If you want to use your own template, this latter should be previously defined with:
+ \lstinline|\defbeamertemplate{background}{standin/<your-name>}{<your-defintion>}|.
+ }\end{DescribeGothamOption}
+
+
+ \DescribeOption{partframe default}
+ % \begin{DescribeGothamOption}{partframe default}
+ % {list of possible values}{default}{
+ % A short description of the option.
+ % }\end{DescribeGothamOption}
+ \DescribeOption{sectionframe default}
+ % \begin{DescribeGothamOption}{sectionframe default}
+ % {list of possible values}{default}{
+ % A short description of the option.
+ % }\end{DescribeGothamOption}
+ \DescribeOption{subsectionframe default}
+ % \begin{DescribeGothamOption}{subsectionframe default}
+ % {list of possible values}{default}{
+ % A short description of the option.
+ % }\end{DescribeGothamOption}
+ \begin{DescribeGothamOption}{subsubsectionframe default}
+ {on, off}{on}{
+ Enable or disable the display of the part frame (section, subsection and subsubsection respectively) at each part (other respectively) increment.
+ \vspace{1em}
+ }\end{DescribeGothamOption}
+
+ \DescribeOption{partframe template}
+ % \begin{DescribeGothamOption}{partframe template}
+ % {list of possible values}{default}{
+ % A short description of the option.
+ % }\end{DescribeGothamOption}
+ \DescribeOption{sectionframe template}
+ % \begin{DescribeGothamOption}{sectionframe template}
+ % {list of possible values}{default}{
+ % A short description of the option.
+ % }\end{DescribeGothamOption}
+ \DescribeOption{subsectionframe~template}
+ % \begin{DescribeGothamOption}{subsectionframe template}
+ % {list of possible values}{default}{
+ % A short description of the option.
+ % }\end{DescribeGothamOption}
+ \begin{DescribeGothamOption}{subsubsectionframe~template}
+ {gotham progressbar, gotham simple, gotham splitvert progressbar, gotham splitvert simple, gotham progressvert}{gotham progressbar}{
+ Set the frame template to use when the |part| (or |section|, |subsection|, |subsubsection| respectively) frame option is activated (ie. using |\begin{frame}[part]|).
+ If you want to use your own template, before giving its name to this option, your template should be defined with:
+ \lstinline|\defbeamertemplate{part frame}{<your-name>}{<your-defintion>}|.
+ % \vspace{3em}
+ }\end{DescribeGothamOption}
+
+
+ \begin{DescribeGothamOption}{tocframe template}
+ {gotham simple, gotham bullet, <your-name>}{gotham bullet}{
+ Set the table of contents template to use when the |toc| option is activated.
+ If you want to use your own template, this latter should be previously defined with:
+ % \lstinline|
+ \begin{lstlisting}[gobble=6]
+ \defbeamertemplate{part in toc}{<your-name>}{<your-defintion>}
+ \defbeamertemplate{section in toc}{<your-name>}{<your-defintion>}
+ \defbeamertemplate{subsection in toc shaded}{<your-name>}{<your-defintion>}
+ \defbeamertemplate{subsubsection in toc shaded}{<your-name>}{<your-defintion>}
+ \defbeamertemplate{background canvas}{toc/<your-name>}{<your-definition>}
+ \defbeamertemplate{toc page}{<your-name>}{<your-defintion, set them now by exmaple>}
+ \end{lstlisting}
+ % |.
+ }\end{DescribeGothamOption}
+
+ \DescribeOption{parttocframe default}
+ % \begin{DescribeGothamOption}{parttocframe default}
+ % {list of possible values}{default}{
+ % A short description of the option.
+ % }\end{DescribeGothamOption}
+ \DescribeOption{sectiontocframe default}
+ % \begin{DescribeGothamOption}{sectiontocframe default}
+ % {list of possible values}{default}{
+ % A short description of the option.
+ % }\end{DescribeGothamOption}
+ \DescribeOption{subsectiontocframe default}
+ % \begin{DescribeGothamOption}{subsectiontocframe default}
+ % {list of possible values}{default}{
+ % A short description of the option.
+ % }\end{DescribeGothamOption}
+ \begin{DescribeGothamOption}{subsubsectiontocframe~default}
+ {on, off}{default}{
+ Enable or disable the display of the table of content frame after the part frame (section, subsection and subsubsection respectively) at each part (other respectively) increment.
+ \vspace{1em}
+ }\end{DescribeGothamOption}
+
+ \DescribeOption{parttocframe template}
+ % \begin{DescribeGothamOption}{parttocframe template}
+ % {list of possible values}{default}{
+ % A short description of the option.
+ % }\end{DescribeGothamOption}
+ \DescribeOption{sectiontocframe template}
+ % \begin{DescribeGothamOption}{sectiontocframe template}
+ % {list of possible values}{default}{
+ % A short description of the option.
+ % }\end{DescribeGothamOption}
+ \DescribeOption{subsectiontocframe~template}
+ % \begin{DescribeGothamOption}{subsectiontocframe template}
+ % {list of possible values}{default}{
+ % A short description of the option.
+ % }\end{DescribeGothamOption}
+ \begin{DescribeGothamOption}{subsubsectiontocframe~tem..}
+ {gotham simple, gotham bullet, <your-name>}{gotham bullet}{
+ Set the frame template to use when the table of contents at each new |part| (or |section|, |subsection|, |subsubsection| respectively).
+ This new frame is internally using the |tocpart| frame option to activate the frame template.
+ If you want to use your own template, before giving its name to this option, your template should be defined with:
+ \lstinline|\defbeamertemplate{part frame}{<your-name>}{<your-defintion>}|.
+ % \vspace{3em}
+ }\end{DescribeGothamOption}
+
+ % \begin{figure}[h!]
+ % \begin{subfigure}[b]{0.3\textwidth}
+ % \fbox{\includegraphics[width=\textwidth]{screenshots/layout_example-04.jpg}}
+ % \caption*{plain (default)}
+ % \end{subfigure}
+ % \hspace{\fill}
+ % \begin{subfigure}[b]{0.3\textwidth}
+ % \fbox{\includegraphics[width=\textwidth]{screenshots/layout_example-05.jpg}}
+ % \caption*{style1}
+ % \end{subfigure}
+ % \hspace{\fill}
+ % \begin{subfigure}[b]{0.3\textwidth}
+ % \fbox{\includegraphics[width=\textwidth]{screenshots/layout_example-06.jpg}}
+ % \caption*{style2}
+ % \end{subfigure}
+ % \end{figure}
+
+
+\subsubsection{Outer theme}
+ \DescribeOption{sidebar~canvas~right~template}
+ % \begin{DescribeGothamOption}{subsectiontocframe template}
+ % {list of possible values}{default}{
+ % A short description of the option.
+ % }\end{DescribeGothamOption}
+ \begin{DescribeGothamOption}{sidebar~canvas~left~template}
+ {~gotham~filigrane, empty, <your-name>}{gotham~filigrane}{
+ Setting templates for left and right sidebar canvas which are activated when giving the frame option |\begin{frame}[edging]|.
+ If you want to use your own template, before giving its name to this option, your template should be defined with:
+ \lstinline|\defbeamertemplate{sidebar canvas right}{default/<your-name>}{<your-defintion>}|
+ }\end{DescribeGothamOption}
+
+ \begin{DescribeGothamOption}{edging default}
+ {on, off}{off}{
+ The option |edging default=on| can enable the |sidebar canvas right| (and |sidebar canvas left|) templates on every frame; but it can still be turned off for specific frames when using the frame option |\begin{frame}[noedging]|.
+ }\end{DescribeGothamOption}
+
+ \begin{DescribeGothamOption}{frametitle template}
+ {gotham~subsameline, gotham~subnewline, <your-name>}{gotham~subsameline}{
+ Option to set the frametitle template.
+ \themename{} offers one template that adds the subtitle on the same line (|gotham~subsameline|) and one that adds the subtitle on a new line (|gotham~subnewline|).
+ If you want to use your own template, before giving its name to this option, your template should be defined with:
+ \lstinline|\defbeamertemplate{frametitle}{default/<your-name>}{<your-defintion>}|
+ }\end{DescribeGothamOption}
+
+ \begin{DescribeGothamOption}{framesubtitle template}
+ {gotham~subnewline, <your-name>}{gotham~subnewline}{
+ Setting the template to use when the subtitle is on a new line.
+ If you want to use your own template, before giving its name to this option, your template should be defined with:
+ \lstinline|\defbeamertemplate{framesubtitle}{default/<your-name>}{<your-defintion>}|
+ }\end{DescribeGothamOption}
+
+ \begin{DescribeGothamOption}{frametitle continuation template}
+ {gotham, beamer, tot, <your-name>}{gotham}{
+ Setting the template that is used in the frametitle when a frame too long and is continued/broke into several frames (using the frame option |allowframebreaks|).
+ If you want to use your own template, before giving its name to this option, your template should be defined with:
+ \lstinline|\defbeamertemplate{frametitle continuation}{default/<your-name>}{<your-defintion>}|
+ }\end{DescribeGothamOption}
+
+ \begin{DescribeGothamOption}{numbering}{none, framenumber, totalframenumber, appendixframenumber, pagenumber, totalpagenumber, circle}{none}{
+ Setting the template with the frame number at the bottom right of each slide.
+ }\end{DescribeGothamOption}
+
+ \begin{DescribeGothamOption}{footer template}
+ {gotham, <your-name>}{gotham}{
+ Setting the template that appears in the footer of the frame.
+ |gotham| footer print the |shortdate| at right, the |shorttitle| in the middle and the |shortauthor| at left.
+ Since in 16/9 the height is precious, |gotham| template also offers the possibility to rotate |shortdate| and |shortauthor| so they appear on sides.
+ If you want to use your own template, before giving its name to this option, your template should be defined with:
+ \lstinline|\defbeamertemplate{frame footer}{default/<your-name>}{<your-defintion>}|
+ }\end{DescribeGothamOption}
+
+ \begin{DescribeGothamOption}{rotateFooter default}
+ {on, off}{off}{
+ Enable or disable the |rotateFooter| frame option by default (ie. without using |\begin{frame}[rotateFooter]| on every frame).
+ If the option is activated, it can be deactivated locally using the frame option |\begin{frame}[noRotateFooter]|.
+ }\end{DescribeGothamOption}
+
+ \begin{DescribeGothamOption}{mini frames shape}
+ {default (bullet from beamer), tick, box, gotham minibullet, gotham box, gotham minibox, <your-name>}{gotham~minibullet}{
+ Setting the shape of the mini frames to use, if the mini frame bundle refers to it (which is usually the case).
+ If you want to use your own template, before giving its name to this option, your template should be defined with:
+ % \lstinline|\defbeamertemplate{frame~footer}{default/<your-name>}{<your-defintion>}|
+ \begin{lstlisting}[gobble=6]
+ \defbeamertemplate{mini frame}{<your-name>}{
+ <your-defintion>
+ }[action]{
+ \setbeamersize{mini frame size=.1cm, mini frame offset=.05cm}
+ }
+ \defbeamertemplate{mini frame in current subsection}{<your-name>}{
+ <your-defintion>
+ }
+ \end{lstlisting}
+ }\end{DescribeGothamOption}
+
+ \begin{DescribeGothamOption}{mini frames bundle}
+ {gotham~mini, beamer, gotham~nano <your-name>}{gotham~mini}{
+ Setting the set of symbols used in the mini frame navigation.
+ If you want to use your own template, before giving its name to this option, your template should be defined with:
+ % \lstinline|\defbeamertemplate{frame~footer}{default/<your-name>}{<your-defintion>}|
+ \begin{lstlisting}[gobble=6]
+ \defbeamertemplate{miniframe~home}{<your-name>}{<your-def>}
+ \defbeamertemplate{miniframe~current~slide}{<your-name>}{<your-def>}
+ \defbeamertemplate{miniframe~done~current~section}{<your-name>}{<your-def>}
+ \defbeamertemplate{miniframe~todo~current~section}{<your-name>}{<your-def>}
+ \defbeamertemplate{miniframe~done~other~section}{<your-name>}{<your-def>}
+ \defbeamertemplate{miniframe~todo~other~section}{<your-name>}{<your-def>}
+ \defbeamertemplate{miniframe~part}{<your-name>}{<your-def>}
+ \defbeamertemplate{miniframe~section~current}{<your-name>}{<your-def>}
+ \defbeamertemplate{miniframe~section~done}{<your-name>}{<your-def>}
+ \defbeamertemplate{miniframe~section~todo}{<your-name>}{<your-def>}
+ \defbeamertemplate{miniframe~subsection~current}{<your-name>}{<your-def>}
+ \defbeamertemplate{miniframe~subsection~todo}{<your-name>}{<your-def>}
+ \defbeamertemplate{miniframe~subsection~done}{<your-name>}{<your-def>}
+ \end{lstlisting}
+ }\end{DescribeGothamOption}
+
+ \begin{DescribeGothamOption}{mini frames compress}
+ {on, off}{on}{
+ A shortcut for the beamer option |compress| that affects the mini frames.
+ }\end{DescribeGothamOption}
+
+ \begin{DescribeGothamOption}{mini frames nav spreading}
+ {spreading, centering, left, right}{spreading}{
+ Controls how the mini frame should spread in the navigation bar.
+ }\end{DescribeGothamOption}
+
+ \begin{DescribeGothamOption}{mini frames nav sectioning}
+ {none, section, secsubsection}{none}{
+ Setting the |section in head/foot| template that is used on top of the mini frame navigation bar.
+ }\end{DescribeGothamOption}
+
+ \begin{DescribeGothamOption}{mini frames nav position}
+ {none, head, foot, left, right}{none}{
+ Setting where the mini frame navigation bar should appear.
+ }\end{DescribeGothamOption}
+
+ \begin{DescribeGothamOption}{progressbar position}
+ {none, head, frametitle, foot, circlehead, left, right}{none}{
+ Setting where the progressbar should appear.
+ The different positions are pretty obvious from their name, except for |circlehead|.
+ This latter option is putting a circular progressbar around the frametitle-logo (from frametitle template defined with gotham theme).
+ It worth noting that by doing so, the frametitle is using the command |\gothamInstituteLogoCircle| instead of |\gothamInstituteLogoSquare| which is used otherwise.
+ }\end{DescribeGothamOption}
+
+ \begin{DescribeGothamOption}{progressbar style}
+ {rectangle, rounded box, moving circle, fixed circle}{rectangle}{
+ Setting how the progressbar should appear.
+ |rectangle| option is using sharp rectangle for the progressbar, while |rounded box| is using rounded box and adds the percentage of progression at its right.
+ |moving circle| and |fixed circle| are concerning the option |progressbar position=circle| only.
+ |moving circle| add the number of the frame in a circle moving (following) the progression of the bar, while |fixed circle| put this framenumber constantly at the right of the circular progressbar.
+ }\end{DescribeGothamOption}
+
+ \begin{DescribeGothamOption}{progressbar advancement}
+ {tlbr, brlt}{tlbr}{
+ Defines in which direction the progressbar should evolve.
+ |tlbr| is the shortcut for: starting from the top left corner, it goes bottom then right, ie. anti-clockwise.
+ |brtl| is the shortcut for: starting from the bottom right corner, it goes top then left, ie. clockwise.
+ }\end{DescribeGothamOption}
+
+ \begin{DescribeGothamOption}{progressbar mfn}
+ {on, off}{off}{
+ Enable or disable the display of the mini frame navigation bar within the progressbar.
+ }\end{DescribeGothamOption}
+
+
+\subsection{Setup all the options}
+ \begin{lstlisting}
+ \gothamset{
+ % from font theme
+ format title, shape title,
+ format subtitle, shape subtitle,
+ format frametitle, shape frametitle,
+ format framesubtitle, shape framesubtitle,
+ format part, shape part,
+ format section, shape section,
+ format subsection, shape subsection,
+ % from color theme
+ background,
+ block,
+ colorset,
+ % from inner theme
+ title page,
+ watermark template, watermark default,
+ standout template, standin template,
+ partframe template, partframe default,
+ sectionframe template, sectionframe default,
+ subsectionframe template, subsectionframe default,
+ subsubsectionframe template, subsubsectionframe default,
+ tocframe template,
+ parttocframe template, parttocframe default,
+ sectiontocframe template, sectiontocframe default,
+ subsectiontocframe template, subsectiontocframe default,
+ %subsubsectiontocframe template, subsubsectiontocframe default,
+ % from outer theme
+ sidebar canvas right template, sidebar canvas left template,
+ edging default,
+ frametitle template, framesubtitle template, frametitle continuation template,
+ numbering,
+ rotateFooter default,
+ footer template,
+ mini frames shape, mini frames bundle, mini frames compress, mini frames nav spreading,
+ progressbar position, progressbar style, progressbar advancement, progressbar mfn,
+ }
+ \end{lstlisting}
+
+
+\subsection{Frame options}
+ Frame options are affecting the templates used on the current frame through the following syntax:
+ \begin{lstlisting}
+ \begin{frame}[option] ... \end{frame}
+ \end{lstlisting}
+ Below a description of the different frame options brought by \themename{}.
+
+ \DescribeOption{noBGC}
+ Apply an empty |background canvas| template.
+
+ \DescribeOption{watermark}
+ \DescribeOption{nowatermark}
+ Apply (with |watermark|) or deactivated (|nowatermark| when \lstinline|\gothamset{watermark default=on}| was given) the |background| template, through %\\
+ \lstinline|\defbeamertemplate{background}{watermark/<your-name>}{<your-def>}| and %\\
+ \lstinline|\gothamset{watermark template=<your-name>}|.
+
+ \DescribeOption{standout}
+ \DescribeOption{standin}
+ Apply the |standin| (and |standout| respectively) templates through the definition
+ \lstinline|\defbeamertemplate{standin}{<your-name>}{<your-def>}| and the option \lstinline|\gothamset{standin template=<your-name>}|.
+
+ \DescribeOption{toc}
+ Appy the |toc| template defined by \lstinline|\gothamset{tocframe template=<your-name>}|.
+
+ \DescribeOption{edging}
+ \DescribeOption{noedging}
+ Apply (with |edging|) or deactivated (|noedging| when \lstinline|\gothamset{edging default=on}| was given) the |sidebar canvas left| (and right respectively) template, through
+ \lstinline|\defbeamertemplate{sidebar canvas left}{default/<your-name>}{<your-def>}| (and right)
+ and the option
+ \lstinline|\gothamset{sidebar canvas left template=<your-name>}| (and right).
+
+ \DescribeOption{nologo}
+ \DescribeOption{nofootline}
+ \DescribeOption{nofooter}
+ Apply empty |logo| (and |footline|, |footer| respectively) templates.
+ This can be convenient when extra space is needed.
+ \vspace{1em}
+
+ \DescribeOption{rotateFooter}
+ \DescribeOption{noRotateFooter}
+ Enable or disable the rotation of the elements in the |footer|.
+ This can be convenient when extra space is needed in 16/9 mode especially.
+
+ \DescribeOption{part}
+ \DescribeOption{section}
+ \DescribeOption{subsec}
+ \DescribeOption{subsubsec}
+ Apply \lstinline|\usebeamertemplate{part frame}|, (|section frame|, |subsection frame| and |subsubsection frame| respectively) templates.
+ This makes more sense for internal use, but can be reused everywhere else.
+ \vspace{2em}
+
+ \DescribeOption{tocpart}
+ \DescribeOption{tocsec}
+ \DescribeOption{tocsubsec}
+ \DescribeOption{tocsubsubsec}
+ Apply \lstinline|\usebeamertemplate{toc part frame}|, (|toc section frame|, |toc subsection frame| and |toc subsubsection frame| respectively) templates.
+ This makes more for internal use, but can be reused everywhere else.
+ \vspace{1em}
+
+
+%% ------------------------------------
+\subsection{Commands for Customization}
+ \themename{} defines some commands that can be used as hooks, ie., that can be redefined when needed.
+
+ \begin{function}{\gothamInstituteLogoCircle[1][4ex]}
+ \begin{arguments}
+ \item |height| of the picture.
+ \end{arguments}
+ Command to include the circular logo of your institute in the frametitle when using \lstinline|\gothamset{progressbar position=circlehead}|.
+ For example, you redefine this command through:
+ \begin{lstlisting}[gobble=6]
+ \renewcommand{\gothamInstituteLogoCircle}[1][4ex]{
+ \includegraphics[height=#1]{<your-logo-circular>}
+ }
+ \end{lstlisting}
+ \end{function}
+
+ \begin{function}{\gothamInstituteLogoSquare[1][4ex]}
+ \begin{arguments}
+ \item |height| of the picture.
+ \end{arguments}
+ Command to include the circular logo of your institute in the frametitle.
+ For example, you redefine this command through:
+ \begin{lstlisting}[gobble=6]
+ \renewcommand{\gothamInstituteLogoSquare}[1][4ex]{
+ \includegraphics[height=#1]{<your-logo-square>}
+ }
+ \end{lstlisting}
+ \end{function}
+
+ \begin{function}{\gothamFrameSubtitleSep}
+ Command defining the separator used between the frametitle and the subtitle.
+ \end{function}
+
+ \begin{function}{\gothamRightFiligrane, \gothamLeftFiligrane}
+ Commands that are used by default in the |sidebar canvas right| (and left).
+ This avoids the redefinition of the whole templates, especially since the |sidebar canvas right| is containing elements by default in Beamer theme (like the |logo|).
+ \end{function}
+
+
+\subsection{Color Customization}
+ The included \themename color theme is used by default, but its colors can be easily changed to suit your tastes.
+ All of the theme's styles are defined in terms of three Beamer colors:
+ \begin{itemize}
+ \item |normal text| (dark fg, light bg)
+ \item |alerted text| (colored fg, should be visible against dark or light)
+ \item |example text| (colored fg, should be visible against dark or light)
+ \end{itemize}
+
+ An easy way to customize the theme is to redefine these colors using
+ \begin{lstlisting}
+ \setbeamercolor{ ... }{ fg= ... , bg= ... }
+ \end{lstlisting}
+ in your preamble.
+ For greater customization, you can redefine any of the other stock Beamer colors.
+ In addition to the stock colors the theme defines a number of \themename specific colors, which can also be redefined to your liking.
+
+ \begin{lstlisting}
+ \setbeamercolor{progress bar}{ ... }
+ \setbeamercolor{title separator}{ ... }
+ \setbeamercolor{progress bar in head/foot}{ ... }
+ \setbeamercolor{progress bar in section page}{ ... }
+ \end{lstlisting}
+
+
+\subsection{Font Customization}
+ The default font for \themename is |Fira|.
+ This can be easily changed using the standard font selection commands of the \textsf{fontspec} package.
+ So if you prefer, for example, the \href{http://font.ubuntu.com}{|Ubuntu|} font family, just add the following two commands after loading the \themename theme.
+
+ \begin{lstlisting}
+ \setsansfont{Ubuntu}
+ \setmonofont{Ubuntu Mono}
+ \end{lstlisting}
+
+ If you are expecting to present in a large room or with an underpowered projector, you may want to change the font to a heavier weight of Fira to maximize readability.
+
+ \begin{lstlisting}
+ \setsansfont[BoldFont={Fira Sans SemiBold}]{Fira Sans Book}
+ \end{lstlisting}
+
+
+\subsubsection{Old style figures}
+ The regular \textsf{fontspec} mechanism for changing glyph appearance also applies to this theme.
+ If you want to have old style figures in the text but regular lined figures for math, you could add the following to your preamble:
+ \begin{lstlisting}
+ \usefonttheme{professionalfonts} % required for mathspec
+ \usepackage{mathspec}
+ \setsansfont[BoldFont={Fira Sans},
+ Numbers={OldStyle}]{Fira Sans Light}
+ \setmathsfont(Digits)[Numbers={Lining, Proportional}]{Fira Sans Light}
+ \end{lstlisting}
+
+
+% \subsection{Backgrounds available}
+% xx
+
+
+\subsection{Length Customization}
+ \begin{variable}{\sectionhoffset}
+ length controlling the horizontal offset of the (section title + progress bar) block.
+ Can be useful when extra stuff wants to be displayed on sides of the block.
+ The default value is 0pt.
+ \end{variable}
+
+ \begin{variable}{\sidebarRightHOffset, \sidebarLeftHOffset}
+ Length controling the horizontal and vertical offset in order to position |\gothamRightFiligrane| (respectively |\gothamLeftFiligrane|) when using the default sidebar canvas (right and left) from \themename.
+ \end{variable}
+
+ \begin{variable}{\gothamHposLeftRotFooter, \gothamHposRightRotFooter, \gothamVposLeftRotFooter, \gothamVposRightRotFooter}
+ length controlling the horizontal and vertical positioning of the left and right elements of the rotated footer.
+ \end{variable}
+
+ \begin{variable}{\gothamFootlineRuleLeftPadding}
+ length controlling the horizontal space between the left border of the page and the left side of the rule.
+ \end{variable}
+
+ \begin{variable}{\gothamFootlineRuleHeight, \gothamFootlineRuleLength}
+ Dimensions controlling the height and the length of the rule used to delimit the footer.
+ \end{variable}
+
+ \begin{variable}{\gothamProgressCircHeight, \gothamCounterCircleRadius, \gothamProgressCircBorderWidth}
+ Lengths controlling the aspect of |progress circle|.
+ |\gothamProgressCircHeight| is controlling the inner height of the circle (related to its diameter).
+ |\gothamCounterCircleRadius| is controlling the size of the counter circle containing the frame number.
+ |\gothamProgressCircBorderWidth| is controlling width of the progress circle.
+ \end{variable}
+
+ \begin{figure}[htp]
+ \centering
+ \fbox{\includegraphics[width=0.7\textwidth]{gotham-layout.pdf}}
+ \caption{The layout used by \themename.}
+ \end{figure}
+
+
+%% ------------------------------------
+\section{Tips \& Tricks}
+\subsection{Backup Slides}
+ Speakers will often include extra slides at the end of their presentation to refer to during audience questions.
+ One easy way to do this is to include the \verb|appendixnumberbeamer| package in your preamble and call \verb|\appendix| before your backup slides.
+
+ \themename will automatically turn off slide numbering for slides in the appendix.
+
+
+\subsection{Sources of inspiration}
+ Many Beamer themes have been used as sources of inspiration to build \themename{}:
+ \begin{itemize}
+ \item \url{https://github.com/matze/mtheme} for dark/light theme and standout page.
+ \item \url{https://github.com/hamaluik/Beamer-Theme-Execushares} and
+ \\ \url{https://github.com/pcafrica/focus-beamertheme} for titlepage and sectionpage.
+ \item \url{https://github.com/LukasPietzschmann/awesome-beamer} for titlepage.
+ \item \url{https://github.com/luistar/unina-beamer/tree/master} and
+ \\ \url{https://github.com/jkjaer/aauLatexTemplates/tree/master/aauBeamer/aausimple} for circlehead progress bar.
+ \item \url{https://github.com/povanberg/flux-beamer} for toc.
+ \item \url{https://github.com/fliptanedo/FlipBeamerTheme} for numbering circled fraction.
+ \item \url{https://gitlab.com/RomainNOEL/latex3_template_pkg} for LateX3 template.
+ \end{itemize}
+
+
+%% ------------------------------------
+\section{Known Issues}
+
+\subsection{Title formats}
+\label{sec:titleformats}
+ Be aware that not every font supports small caps, so the |smallcaps| or |upper| options may not work if you use a font other than |Fira Sans|.
+ In particular, the Computer Modern sans-serif typeface, which is used when \themename is compiled with pdf\LaTeX, does not have a small-caps variant.
+
+ The title format options |upper| and |smallcaps| are quite nice from an aesthetic point of view, but their use of |\MakeLowercase| and
+ |\MakeUppercase| can cause unexpected problems.
+ For example:
+ \begin{itemize}
+ \item Some commands, like |\\|, do not work inside |\MakeLowercase| and |\MakeUppercase|.
+ (See \href{https://github.com/matze/mtheme/issues/125}{\#125})
+ \item Only alphabetic characters are affected by |\MakeLowercase|, so numerals and punctuation remain at full height.
+ This can spoil some of the aesthetic benefits of |upper|.
+ (See \href{https://github.com/matze/mtheme/issues/33}{\#33})
+ \item |\MakeLowercase| and |\MakeUppercase| apply to math mode and |\scshape| does not.
+ This can easily introduce mathematical errors that are hard to catch.
+ \item It is impossible to typeset symbols which are encoded as uppercase letters in a different font.
+ In particular, |\mathbb| and |\mathcal| letters will be replaced by other math glyphs.
+ (See \href{https://github.com/matze/mtheme/issues/153}{\#153})
+ \end{itemize}
+
+ The |smallcaps| and |upper| options are safe to use if your titles contain only alphabetic characters and do not require the expansion of any macros.
+
+
+\subsection{Interactions with other color themes}
+ \themename can be used along with any other Beamer color theme, such as |crane| or |seahorse|.
+ If you wish to do this, it is usually best to include the \themename subpackages individually so the \themename color theme is never loaded.
+ This will prevent conflicts between the \themename color theme and your preferred theme.
+
+ For example, overriding the color theme as follows may not work as expected because |\usetheme{gotham}| loads the \themename color theme, which defines a relationship between the frametitle background and the primary palette of the theme.
+ Since |seahorse| assumes a different relationship between its palettes, the result is a grey, rather than periwinkle, frametitle background.
+
+ \begin{lstlisting}
+ \usetheme{gotham}
+ \usecolortheme{seahorse}
+ \end{lstlisting}
+
+ The correct colors are chosen if the \themename outer, inner, and font themes are loaded seperately:
+ \begin{lstlisting}
+ \useoutertheme{gotham}
+ \useinnertheme{gotham}
+ \usefonttheme{gotham}
+ \usecolortheme{seahorse} % or your preferred color theme
+ \end{lstlisting}
+
+ Please note that \themename may not use all the colors defined in your favourite Beamer color theme.
+ In particular, \themename does not set a background color for the title; this will cause issues when using color themes like |whale| which set a white foreground for the title.
+
+
+\subsection{Notes on second screen}
+ If you use the |[show notes on second screen]| option built into Beamer and compile with XeLaTeX, text on slides following the first section slide may be rendered in white instead of the regular color.
+ This is due to \href{http://tex.stackexchange.com/questions/288408/}{a bug} in Beamer or XeLaTeX itself.
+ You can work around it either by compiling with LuaTeX or by adding the following code to your preamble to reset the text color on each slide.
+
+ \begin{lstlisting}
+ \makeatletter
+ \def\beamer@framenotesbegin{% at beginning of slide
+ \usebeamercolor[fg]{normal text}
+ \gdef\beamer@noteitems{}%
+ \gdef\beamer@notes{}%
+ }
+ \makeatother
+ \end{lstlisting}
+
+
+\subsection{Standout frames with labels}
+ Because the |standout| frame option creates a group to restrict the colour change to a single slide, labels defined after calling |standout| will stay local to the group.
+ In other words, the following may result in a ``label undefined'' error.
+ \begin{lstlisting}
+ \begin{frame}[standout, label=conclusion]{Conclusion}
+ Awesome slide
+ \end{frame}
+ \end{lstlisting}
+
+ To fix this problem, change the order of the keys in the frame.
+ \begin{lstlisting}
+ \begin{frame}[label=conclusion, standout]{Conclusion}
+ Awesome slide
+ \end{frame}
+ \end{lstlisting}
+
+ This error can be unwittingly triggered if you export your slides from Emacs Org mode, which automatically adds labels after frame options.
+ Alex Branham \href{https://github.com/matze/mtheme/issues/203}{offers} the following solution for Org mode users, using |org-set-property|.
+
+ \begin{lstlisting}
+ * Start of a frame
+ :PROPERTIES:
+ :BEAMER_opt: label=conclusion,standout
+ :END:
+ \end{lstlisting}
+
+
+\subsection{Standout frames with Pandoc}
+ With Pandoc versions prior 1.17.2 it was not possible to create standout frames because Pandoc only supported a specific list of frame attributes thus ignoring additional attributes such as |{.standout}|.
+
+
+\subsection{Other issues}
+ \begin{itemize}
+ \item |enumitem| is not working with Beamer.
+ \end{itemize}
+
+
+\subsection*{Todo}
+ List of thing that could be improved (any volunteer welcome):
+ \begin{itemize}
+ \item Reduce the number of @ .
+ \item Rename a lot of length with gotham at the beginning of their name.
+ \item Turn internal length into \_dim.
+ \item Improve documentation.
+ \item Add a hexagonal, wavy and add lengths on the blueprint layout backgrounds.
+ \item Remove calc package (that can be replaced by xfp or just fp).
+ \item Remove colors from tests inner and outer.
+ \item Replace the |\setbeamertemplate{yy}[default/xx]| by |\__gotham_inner_set_template:nn{title~page}| or merge them because the default values in dict/template are interesting but |\__gotham_inner_set_template| are simpler.
+ \item add colorset more "blue-ish", "green-ish" ... from colorA etc.
+ \item add Gotham to lists of Awesome Beamer themes.
+ \end{itemize}
+
+
+\section{License}
+ \themename is licensed under the terms of the
+ \href{https://creativecommons.org/licenses/by-sa/4.0/}{Creative Commons
+ Attribution-ShareAlike 4.0} license.
+
+
+\end{document}
+% EoF
+
+
+% \begin{documentation}
+% \begin{macro|function|variable}{\nameMacro}
+% \begin{syntax}
+% \cs{nameMacro}\oarg{option1=value1, ...}\marg{gotham}
+% \textrm{where the options are (default marked as} \defopt{default}\textrm{):}
+% \meta{footer template} = \oarg{\defopt{gotham} \textbar ... }
+% \end{syntax}
+% Description of |nameMacro| which xxx.
+% \end{macro|function|variable}
+% \end{documentation}
+%%%%
+% \begin{implementation}
+% \begin{macro|function|variable}{\nameMacro}
+% \begin{arguments}
+% \item |width| Name of the option to add, this name should also correspond to the name of the environment followed by the suffix 'env'.
+% \end{arguments}
+% Description
+% \UnitTested % NOT FOR VARIABLES OF FUNCTIONS
+% \TestFiles{gotham-test-xxx} % NOT FOR VARIABLES
+% \begin{macrocode}
+
+% \end{macrocode}
+% \end{macro|function|variable}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\nameMacro}
+% Description
+% \UnitTested
+% \TestFiles{gotham-test-048}
+% \begin{macrocode}
+
+% \end{macrocode}
+% \end{macro}
+% \end{implementation} \ No newline at end of file
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham-example169transp.pdf b/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham-example169transp.pdf
new file mode 100644
index 0000000000..c3056abee7
--- /dev/null
+++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham-example169transp.pdf
Binary files differ
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham-example169transp.tex b/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham-example169transp.tex
new file mode 100644
index 0000000000..71bd8cf1e9
--- /dev/null
+++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham-example169transp.tex
@@ -0,0 +1,65 @@
+\documentclass[aspectratio=169, 10pt]{beamer}
+\usetheme{gotham}
+
+ \gothamset{
+ numbering= framenumber,
+ % tocframe template= gotham simple,
+ parttocframe default=off,
+ sectiontocframe default=off,
+ subsectiontocframe default=off,
+ }
+
+ \usepackage{standalone}
+ \usepackage{tikz}
+ \usepackage{pgfplots}
+ \usepackage{tabularray} % Typeset tabulars and arrays (contains equivalent of longtable, booktabs and dcolumn at least)
+ \UseTblrLibrary{booktabs} % to load extra commands from booktabs
+ \usepackage{changepage}
+
+ \usepackage{appendixnumberbeamer}
+ \usepackage[scale=2]{ccicons}
+ % \usepackage{pgfplots}
+ \usepgfplotslibrary{dateplot}
+
+ \newcommand{\themename}{\textbf{\textsc{Gotham}}}
+
+
+\title[]{Gotham}
+\subtitle{A Modern, versatile and extendable theme for Beamer}
+\date[]{\today}
+\author[]{Romain NOËL}
+\institute{Center for modern beamer themes}
+% \titlegraphic{\hfill\includegraphics[height=1.5cm]{logo.pdf}}
+
+
+\begin{document}
+
+\maketitle
+
+ \begin{frame}[toc]{Table of contents}%
+ \tableofcontents%[hideallsubsections]
+ \end{frame}
+
+
+%%%%%%%%%%%%%%%%%%%%
+%%% MAINMATTER %%%
+%%%%%%%%%%%%%%%%%%%%
+\input{section-Beamer.tex}
+
+\input{section-Gotham.tex}
+
+\input{section-Conclusion.tex}
+
+
+\appendix
+
+ \begin{frame}[fragile]{Backup slides}
+ Sometimes, it is useful to add slides at the end of your presentation to refer to during audience questions.
+
+ The best way to do this is to include \verb|\usepackage{appendixnumberbeamer}| in your preamble and call \verb|\appendix| before your backup slides.
+
+ \themename{} will automatically turn off slide numbering and progress bars for slides in the appendix.
+ \end{frame}
+
+
+\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham-example43dark.pdf b/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham-example43dark.pdf
new file mode 100644
index 0000000000..449e20c327
--- /dev/null
+++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham-example43dark.pdf
Binary files differ
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham-example43dark.tex b/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham-example43dark.tex
new file mode 100644
index 0000000000..af6e53c6ab
--- /dev/null
+++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham-example43dark.tex
@@ -0,0 +1,66 @@
+\documentclass[aspectratio=43, 10pt]{beamer}
+\usetheme{gotham}
+
+ \gothamset{
+ background=dark,
+ numbering= framenumber,
+ % tocframe template= gotham simple,
+ parttocframe default=off,
+ sectiontocframe default=off,
+ subsectiontocframe default=off,
+ }
+
+ \usepackage{standalone}
+ \usepackage{tikz}
+ \usepackage{pgfplots}
+ \usepackage{tabularray} % Typeset tabulars and arrays (contains equivalent of longtable, booktabs and dcolumn at least)
+ \UseTblrLibrary{booktabs} % to load extra commands from booktabs
+ \usepackage{changepage}
+
+ \usepackage{appendixnumberbeamer}
+ \usepackage[scale=2]{ccicons}
+ % \usepackage{pgfplots}
+ \usepgfplotslibrary{dateplot}
+
+ \newcommand{\themename}{\textbf{\textsc{Gotham}}}
+
+
+\title[]{Gotham}
+\subtitle{A Modern, versatile and extendable theme for Beamer}
+\date[]{\today}
+\author[]{Romain NOËL}
+\institute{Center for modern beamer themes}
+% \titlegraphic{\hfill\includegraphics[height=1.5cm]{logo.pdf}}
+
+
+\begin{document}
+
+\maketitle
+
+ \begin{frame}[toc]{Table of contents}%
+ \tableofcontents%[hideallsubsections]
+ \end{frame}
+
+
+%%%%%%%%%%%%%%%%%%%%
+%%% MAINMATTER %%%
+%%%%%%%%%%%%%%%%%%%%
+\input{section-Beamer.tex}
+
+\input{section-Gotham.tex}
+
+\input{section-Conclusion.tex}
+
+
+\appendix
+
+ \begin{frame}[fragile]{Backup slides}
+ Sometimes, it is useful to add slides at the end of your presentation to refer to during audience questions.
+
+ The best way to do this is to include \verb|\usepackage{appendixnumberbeamer}| in your preamble and call \verb|\appendix| before your backup slides.
+
+ \themename{} will automatically turn off slide numbering and progress bars for slides in the appendix.
+ \end{frame}
+
+
+\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham-exampleSimple.pdf b/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham-exampleSimple.pdf
new file mode 100644
index 0000000000..7ba8cef0e9
--- /dev/null
+++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham-exampleSimple.pdf
Binary files differ
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham-exampleSimple.tex b/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham-exampleSimple.tex
new file mode 100644
index 0000000000..ae9db4f712
--- /dev/null
+++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham-exampleSimple.tex
@@ -0,0 +1,8 @@
+\documentclass{beamer}
+\usetheme{gotham}
+
+\begin{document}
+ \begin{frame}{Frame With a Title}
+ This is a simple frame.
+ \end{frame}
+\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham-layout.pdf b/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham-layout.pdf
new file mode 100644
index 0000000000..1965c272c9
--- /dev/null
+++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham-layout.pdf
Binary files differ
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham-logo.pdf b/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham-logo.pdf
new file mode 100644
index 0000000000..96d82f5bf3
--- /dev/null
+++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham-logo.pdf
Binary files differ
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham-safetybox.pdf b/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham-safetybox.pdf
new file mode 100644
index 0000000000..acb1efd917
--- /dev/null
+++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham-safetybox.pdf
@@ -0,0 +1,70 @@
+%PDF-1.5
+%
+4 0 obj
+<< /Length 5 0 R
+ /Filter /FlateDecode
+>>
+stream
+xAJ1 =Ż@cҤ,FBTq3.Le`DB
+Iޗ 8^VYzox٥}қ7ό$dh1#=>E56CV)h|VML { 1]Ɋ7Z ީ\Z 3U!X(OĬ8<NG!Wk鬄adZ{1v8%9> A#K}0g qa$
+endstream
+endobj
+5 0 obj
+ 231
+endobj
+3 0 obj
+<<
+ /ExtGState <<
+ /a0 << /CA 1 /ca 1 >>
+ >>
+>>
+endobj
+2 0 obj
+<< /Type /Page % 1
+ /Parent 1 0 R
+ /MediaBox [ 0 0 453.542999 255.117996 ]
+ /Contents 4 0 R
+ /Group <<
+ /Type /Group
+ /S /Transparency
+ /I true
+ /CS /DeviceRGB
+ >>
+ /Resources 3 0 R
+>>
+endobj
+1 0 obj
+<< /Type /Pages
+ /Kids [ 2 0 R ]
+ /Count 1
+>>
+endobj
+6 0 obj
+<< /Producer (cairo 1.16.0 (https://cairographics.org))
+ /Creator <FEFF0049006E006B0073006300610070006500200031002E0031002E00320020002800680074007400700073003A002F002F0069006E006B00730063006100700065002E006F007200670029>
+ /CreationDate (D:20240630140843+02'00)
+>>
+endobj
+7 0 obj
+<< /Type /Catalog
+ /Pages 1 0 R
+>>
+endobj
+xref
+0 8
+0000000000 65535 f
+0000000649 00000 n
+0000000417 00000 n
+0000000345 00000 n
+0000000015 00000 n
+0000000323 00000 n
+0000000714 00000 n
+0000000997 00000 n
+trailer
+<< /Size 8
+ /Root 7 0 R
+ /Info 6 0 R
+>>
+startxref
+1049
+%%EOF
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham-user-cmds.pdf b/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham-user-cmds.pdf
new file mode 100644
index 0000000000..bbef48867e
--- /dev/null
+++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham-user-cmds.pdf
Binary files differ
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham.dtx b/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham.dtx
new file mode 100644
index 0000000000..969a479257
--- /dev/null
+++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham.dtx
@@ -0,0 +1,8842 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2023-20** by Romain NOEL <romainoel@free.fr>
+% -----------------------------------------------------------
+%
+% This file may be distributed and/or modified under the conditions of
+% the LaTeX Project Public License, either version 1.3c 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.3c or later is part of all distributions of LaTeX
+% version 2006/05/20 or later.
+%
+% \fi
+%
+% \iffalse
+%<*driver>
+\ProvidesFile{gotham.dtx}
+%</driver>
+%<*internal>
+\input expl3-generic \relax
+%</internal>
+%<class>\NeedsTeXFormat{LaTeX3e}
+%<package>\ProvidesExplPackage{beamerthemegotham}{2024/09/20}{1.1.0.b}{A modern, minimal-ish, versatile and extendable yet robust theme for Beamer}
+%<author>Romain NOEL</author>
+%<maintainer>Romain NOEL</maintainer>
+%<url>https://gitlab.com/RomainNOEL/beamertheme-gotham</url>
+%<desc>
+% A modern, minimal-ish, versatile and extendable yet robust theme for Beamer. It uses l3build system to both build and verify (Test-Driven Development) the delivered code.
+% </desc>
+%
+%<*driver>
+\documentclass{l3doc}
+ \usepackage[T1]{fontenc}
+ \usepackage{pdfpages}
+ \usepackage{standalone}
+ % \usepackage{gotham}
+ % \usepackage{readprov}
+ % \ReadPackageInfos{beamerthemegotham}
+ \edef\GothamVersion{v1.1.0.b} %{\fileversion}
+ \edef\GothamDate{2024-09-20} %{\filedate}
+
+ \usepackage{parskip}
+ \usepackage{setspace}
+ \usepackage{xspace}
+ \onehalfspacing
+
+ \usepackage{xcolor}
+ \definecolor{tPrim}{HTML}{00707F} % Green-Blue
+ \definecolor{tSec}{HTML}{5FA4B0} % Green-Blue light
+ \definecolor{tAccent}{HTML}{F07F3C} % Orange
+ \definecolor{tGrey}{HTML}{E6E6E1} % Grey-Beige
+
+ % \usepackage{fancyvrb}
+ \usepackage{listings}
+ \lstset{%
+ language=[LaTeX]{TeX},
+ basicstyle=\ttfamily,
+ keywordstyle=\color{tPrim}\bfseries,
+ commentstyle=\color{tSec},
+ stringstyle=\color{tSec},
+ backgroundcolor=\color{white},
+ numbers=none,
+ numberstyle=\tiny\ttfamily,
+ stepnumber=2,
+ showspaces=false,
+ showstringspaces=false,
+ showtabs=false,
+ frame=none,
+ framerule=1pt,
+ tabsize=2,
+ rulesep=5em,
+ captionpos=b,
+ breaklines=true,
+ breakatwhitespace=false,
+ framexleftmargin=0em,
+ framexrightmargin=0em,
+ xleftmargin=0em,
+ xrightmargin=0em,
+ aboveskip=1em,
+ belowskip=1em,
+ morekeywords={usetheme,institute,maketitle,@gotham@titleformat,%
+ plain,gothamset,setbeamercolor,defbeamertemplate},
+ }
+ \lstMakeShortInline|
+
+ \usepackage{hyperref}
+
+ \setlength{\fboxsep}{0pt}%
+ \usepackage{subcaption} % For subfigures
+ \usepackage{cleveref} % for references
+
+ \providecommand{\defopt}[1]{default: #1}%{\underline{#1}}
+ % \DescribeGothamOption{optionName}{possible values}{default value}{descrption}
+ \newenvironment{DescribeGothamOption}[3]{
+ \DescribeOption{#1} % from l3doc
+ \begin{minipage}[t]{\textwidth}
+ \textit{\textbf{\textcolor{tSec}{#2}}}\dotfill\,\defopt{#3}\par
+ \begingroup
+ \vspace{0.5em}
+ }{
+ \par
+ \endgroup
+ \end{minipage}
+ }
+
+
+ %% =====================================================================
+ \title{\textsc{Gotham}\\ A modern, minimal-ish, versatile and extendable theme for Beamer}
+ \author{Romain NOEL \\ \url{romainoel@free.fr}}
+ \date{\GothamVersion~---~\GothamDate}
+
+ \providecommand{\themename}{\textbf{\textsc{Gotham}}\xspace}
+
+ %% =====================================================================
+
+
+ %% l3doc commands
+ \EnableCrossrefs
+ \CodelineIndex
+ \RecordChanges
+\begin{document}
+\input{gotham-doc.tex}
+ \clearpage
+%\section{A simple example}
+% \includepdf[pages=-,
+% pagecommand=\section{A simple example},
+% width=0.7\textwidth]
+% {gotham-exampleSimple.pdf}
+\section{Commands description for users}
+ \EnableDocumentation
+ \DisableImplementation
+ \DocInput{\jobname.dtx}
+ \newpage
+\section{Package implementation for developers}
+ \EnableImplementation
+ \DisableDocumentation
+ \GetFileInfo{\jobname.sty}
+ \DocInput{\jobname.dtx}
+ \PrintChanges
+\end{document}
+%</driver>
+%
+%<*devImpl>
+\documentclass{l3doc}
+ \usepackage[T1]{fontenc}
+ \usepackage{pdfpages}
+ \usepackage{standalone}
+ %\usepackage{gotham}
+ \providecommand{\defopt}[1]{\underline{#1}}
+ % l3doc commands
+ \EnableCrossrefs
+ \CodelineIndex
+ \RecordChanges
+\begin{document}
+\section{Commands description for users}
+ \EnableImplementation
+ \DisableDocumentation
+ \DocInput{gotham.dtx}
+\end{document}
+%</devImpl>
+%
+%
+%<*userCmd>
+\documentclass{l3doc}
+ \usepackage[T1]{fontenc}
+ \usepackage{pdfpages}
+ \usepackage{standalone}
+ %\usepackage{gotham}
+ \providecommand{\defopt}[1]{\underline{#1}}
+ % l3doc commands
+ \EnableCrossrefs
+ \CodelineIndex
+ \RecordChanges
+\begin{document}
+\section{Package implementation for developers}
+ \EnableDocumentation
+ \DisableImplementation
+ \DocInput{gotham.dtx}
+\end{document}
+%</userCmd>
+%
+% \fi
+%
+%
+%\begin{implementation}
+% \begin{macrocode}
+%<*font>
+\ProvidesExplPackage{beamerfontthemegotham}{2024/09/20}{1.1.0.b}{gotham font theme}
+\RequirePackage{expl3}
+\RequirePackage{xparse}
+\RequirePackage{etoolbox}
+\RequirePackage{ifxetex}
+\RequirePackage{ifluatex}
+% \end{macrocode}
+% \end{implementation}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%% FONT %%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% \begin{implementation}
+% \begin{variable}{font messages}
+% Definition of the messages that are used and reused by font theme.
+% \changes{v0.2.0}{2024/01/25}{New}
+% \begin{macrocode}
+\msg_new:nnn { gotham } { font-not-found }
+{
+ Could~not~find~font~'#1'.\c_space_tl
+}
+
+\msg_new:nnn { gotham } { fonts-not-available }
+{
+ No~suitable~fonts~found.~Using~fallback~fonts.
+}
+
+\msg_new:nnn { gotham } { compiler-xe-or-lua }
+{
+ You~need~to~compile~with~XeLaTeX~or~LuaLaTeX~to~use~the~Fira~fonts.
+}
+% \end{macrocode}
+% \end{variable}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{variable}{\g_gotham_fontsnotfound_int:n}
+% Counter for the number of font not found.
+% \begin{macrocode}
+\int_new:N \g_gotham_fontsnotfound_int
+% \end{macrocode}
+% \end{variable}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{function}{\checkfont:n}
+% \begin{arguments}
+% \item Name of the font.
+% \end{arguments}
+% Command to check if one font exist.
+% \TestFiles{gotham-test-035}
+% \TestMissing{a isolated unit test would be nice.}
+% \begin{macrocode}
+\cs_new_protected:Nn \checkfont:n
+{
+ \fontspec_font_if_exist:nF { #1 }
+ {
+ % false: check with regular postfix.
+ \fontspec_font_if_exist:nF { #1~Regular }
+ {
+ % false: raise a warning and increment the number of font not found.
+ \int_incr:N \g_gotham_fontsnotfound_int
+ \msg_warning:nnn { gotham } { font-not-found } { #1 }
+ }
+ }
+}
+% \end{macrocode}
+% \end{function}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{function}{\iffontsavailable}
+% \begin{syntax}
+% \cs{iffontsavailable} \marg{list of fonts' names} \marg{True code} \marg{False code}
+% \end{syntax}
+% If all fonts in \marg{list of fonts' names} are font then \marg{True code} is executed else \marg{False code}.
+% \end{function}
+% \end{documentation}
+% \begin{implementation}
+% \begin{function}{\iffontsavailable}
+% Command to check if a list of font is available.
+% \TestFiles{gotham-test-035}
+% \TestMissing{a isolated unit test would be nice.}
+% \begin{macrocode}
+\newcommand{\iffontsavailable}[3]
+{
+ \int_zero:N \g_gotham_fontsnotfound_int
+ \clist_map_function:nN { #1 } \checkfont:n
+ \int_compare:nTF { \g_gotham_fontsnotfound_int = 0 }
+ {% True
+ #2
+ }{% False
+ #3
+ }
+}
+% \end{macrocode}
+% \end{function}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{Load fonts if available}
+% If fontspec is loadable (ie. if xelatex or lualatex), then load available fonts, otherwise raise a warning and go on.
+% \UnitTested
+% \TestFiles{gotham-test-035}
+% \begin{macrocode}
+\ifboolexpr{bool~{xetex}~or~bool~{luatex}}{
+ % if fontspec loaded pass option otherwise load fontspec.
+ \@ifpackageloaded{fontspec}{
+ \PassOptionsToPackage{no-math}{fontspec}
+ }{
+ \RequirePackage[no-math]{fontspec}
+ }
+ %
+ % We search for regular, italic, light, light italic,fonts under the default |Fira Sans| names.
+ \iffontsavailable{FiraSans-Light.otf,
+ FiraSans-LightItalic.otf,
+ FiraSans-Regular.otf,
+ FiraSans-Italic.otf}
+ {
+ \setsansfont[ItalicFont={FiraSans-LightItalic.otf},
+ BoldFont={FiraSans-Regular.otf},
+ BoldItalicFont={FiraSans-Italic.otf}]
+ {FiraSans-Light.otf}
+ }{
+ % If this fails, the suffix OT --- used by some Linux distributions --- will be tried.
+ \iffontsavailable{FiraSans~Light~OT,
+ FiraSans~LightItalic~OT,
+ FiraSans~Regular~OT,
+ FiraSans~Italic~OT}
+ {
+ \setsansfont[ItalicFont={Fira~Sans~LightItalic~OT},
+ BoldFont={Fira~Sans~Regular~OT},
+ BoldItalicFont={Fira~Sans~Italic~OT}]
+ {Fira~Sans~Light~OT}
+ }{
+ % If this also fails, a warning will be displayed and the standard fonts will be used.
+ \msg_warning:nn { gotham } { fonts-not-available }%
+ }
+ }
+ %
+ % We search for regular, mono, and mono bold fonts under the default |Fira Mono| names.
+ \iffontsavailable{FiraMono-Medium.otf, FiraMono-Bold.otf}{
+ \setmonofont[BoldFont={FiraMono-Medium.otf}]{FiraMono-Bold.otf}
+ }{
+ % If this fails, the suffix OT --- used by some Linux distributions --- will be tried.
+ \iffontsavailable{Fira~Mono~Medium~OT, Fira~Mono~Bold~OT}{
+ \setmonofont[BoldFont={Fira~Mono~Medium~OT}]{Fira~Mono~Bold~OT}
+ }{
+ % If this also fails, a warning will be displayed and the standard fonts will be used.
+ \msg_warning:nn { gotham } { fonts-not-available }
+ }
+ }
+ %
+ % Add a feature for numbers in tables.
+ \AtBeginEnvironment{tabular}{
+ \addfontfeature{Numbers={Monospaced}}
+ }
+}{
+ % If compiled with pdf\LaTeX{}, then apply a dirty patch (that will not do the job but suppress warnings) and raise a warning.
+ \msg_warning:nn { gotham } { compiler-xe-or-lua }
+ \DeclareFontShape{OT1}{cmss}{bx}{sc}{<-> cmbcsc10}{}
+ \DeclareFontShape{OT1}{cmss}{bx}{it}{<->sub*cmss/m/sl}{}
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\setbeamerfont{title}, general font definitions}
+% Set all needed font environment variables:shape, size, series.
+% Remark: Case is missing.
+% \UnitTested
+% \TestFiles{gotham-test-035, gotham-test-036}
+% \TestMissing{block, caption, description, bibio}
+% \begin{macrocode}
+\setbeamerfont{title}{size=\Large, series=\bfseries}
+\setbeamerfont*{subtitle}{size=\large}
+\setbeamerfont{author}{size=\small}
+\setbeamerfont{date}{size=\small}
+
+\setbeamerfont{section~title}{size=\Large, series=\bfseries}
+\setbeamerfont{subsection~title}{size=\large, series=\bfseries}
+\setbeamerfont{subsubsection~title}{size=\normalsize, series=\bfseries}
+
+\setbeamerfont{frametitle}{size=\large, series=\bfseries}
+\setbeamerfont{frametitleToc}{size=\LARGE, series=\bfseries}
+\setbeamerfont{frametitleSection}{size*={60}{1}, series=\bfseries}
+
+\setbeamerfont{block~title}{size=\normalsize, series=\bfseries}
+\setbeamerfont{block~title~alerted}{size=\normalsize, series=\bfseries}
+\setbeamerfont{caption}{size=\small}
+\setbeamerfont{caption~name}{series=\bfseries}
+\setbeamerfont{description~item}{series=\bfseries}
+\setbeamerfont{page~number~in~head/foot}{size=\scriptsize}
+
+\setbeamerfont{bibliography~entry~author}{size=\normalsize, series=\normalfont}
+\setbeamerfont{bibliography~entry~title}{size=\normalsize, series=\bfseries}
+\setbeamerfont{bibliography~entry~location}{size=\normalsize, series=\normalfont}
+\setbeamerfont{bibliography~entry~note}{size=\small, series=\normalfont}
+\setbeamerfont{standout}{size=\Large, series=\bfseries}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{function}{\__gotham_title_format:n, titles formats}
+% Pre-hooks that will be inserted to control case format of titles in addition with the fonts set.
+% \TestFiles{gotham-test-035, gotham-test-036}
+% \TestMissing{format of framesubtitle, part and subsection are not tested (and not working) yet.}
+% \begin{macrocode}
+\def\gotham@titleformat#1{#1}
+\def\gotham@subtitleformat#1{#1}
+\def\gotham@parttitleformat#1{#1}
+\def\gotham@sectiontitleformat#1{#1}
+\def\gotham@subsectiontitleformat#1{#1}
+\def\gotham@frametitleformat#1{#1}
+\def\gotham@framesubtitleformat#1{#1}
+% IF ONE DAY: I can patch beamer with expl3, I will use the following commands instead.
+% %% \cs_new:Npn \__gotham_unchanged:n #1 {#1}
+% %% \cs_new:Npn \__gotham_title_format:n #1 {#1}
+% %% \cs_new:Npn \__gotham_subtitle_format:n #1 {#1}
+% %% \cs_new:Npn \__gotham_part_title_format:n #1 {#1}
+% %% \cs_new:Npn \__gotham_section_title_format:n #1 {#1}
+% %% \cs_new:Npn \__gotham_subsection_title_format:n #1 {#1}
+% %% \cs_new:Npn \__gotham_frametitle_format:n #1 {#1}
+% %% \cs_new:Npn \__gotham_framesubtitle_format:n #1 {#1}
+% \end{macrocode}
+% \end{function}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\beamer@title,\beamer@subtitle,\sectionentry}
+% Since, case feature is not available in |setbeamerfont|; to make the uppercase, lowercase and title-case macros work in the title, subtitle, etc., we have to patch the appropriate |beamer| commands that set their values.
+% This solution was suggested by Enrico Gregorio in an answer to \href{http://tex.stackexchange.com/questions/112526/}{this StackExchange question}.
+% Remark: patchcmd from etoolbox (or other), is not compatible with expl3.
+% \UnitTested
+% \TestFiles{gotham-test-035, gotham-test-036}
+% \TestMissing{format of framesubtitle, part and subsection are not tested (and not working) yet.}
+% \begin{macrocode}
+\ExplSyntaxOff
+\patchcmd{\beamer@title}
+ {\def\inserttitle{#2}}
+ {\def\inserttitle{\gotham@titleformat{#2}}}
+ % {\def\inserttitle{ \__gotham_title_format:n{#2} }}
+ {}
+ {\PackageError{beamerfontthemegotham}{Patching~title~failed}\@ehc}
+\patchcmd{\beamer@subtitle}
+ {\def\insertsubtitle{#2}}
+ {\def\insertsubtitle{{\gotham@subtitleformat{#2}}}}
+ % {\def\insertsubtitle{ \__gotham_subtitle_format:n{#2} }}
+ {}
+ {\PackageError{beamerfontthemegotham}{Patching~subtitle~failed}\@ehc}
+\patchcmd{\sectionentry} % beamerbasenavigation.sty l.335
+ {\def\insertsectionhead{#2}}
+ {\def\insertsectionhead{\gotham@sectiontitleformat{#2}}}
+ {}
+ {\PackageError{beamerfontthemegotham}{Patching~section~title~failed}\@ehc}%
+%
+%% NOT WORKING YET!
+%% \patchcmd{\subsectionentry} % beamerbasenavigation.sty l.384
+%% {\def\insertsubsectionhead{##5}}
+%% {\def\insertsubsectionhead{\gotham@subsectiontitleformat{##5}}}
+%% {}
+%% {\PackageError{beamerfontthemegotham}{Patching~subsection~title~failed}\@ehc}%
+%
+\@tempswafalse
+\patchcmd{\beamer@section} % beamerbasesection.sty l. 209
+ {\def\insertsectionhead{\hyperlink{Navigation\the\c@page}{#1}}}
+ {\def\insertsectionhead{\hyperlink{Navigation\the\c@page}{\gotham@sectiontitleformat{#1}}}}
+ % \__gotham_section_title_format:n{#2}
+ {\@tempswatrue}
+ {}
+\patchcmd{\beamer@section} % beamerbasesection.sty l. 209
+ {\edef\insertsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{\unexpanded{#1}}}}
+ {\edef\insertsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{\noexpand\gotham@sectiontitleformat{\unexpanded{#1}}}}}
+ % \exp_not:N \__gotham_section_title_format:n {#1}
+ {\@tempswatrue}
+ {}
+\if@tempswa\else
+ {\PackageError{beamerfontthemegotham}{Patching~section~title~failed}\@ehc}
+\fi
+\@tempswafalse
+%
+%% NOT WORKING YET !
+%% \patchcmd{\beamer@subsection} % beamerbasesection.sty l. 209
+%% {\def\insertsubsectionhead{\hyperlink{Navigation\the\c@page}{#1}}}
+%% {\def\insertsubsectionhead{\hyperlink{Navigation\the\c@page}\gotham@subsectiontitleformat{#1}}}
+%% % \__gotham_subsection_title_format:n{#2}
+%% {\@tempswatrue}
+%% {}
+%% \patchcmd{\beamer@subsection} % beamerbasesection.sty l. 209
+%% {\protected@edef\insertsubsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{#1}}}
+%% {\protected@edef\insertsubsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{\noexpand\gotham@subsectiontitleformat{#1}}}}
+%% % \exp_not:N \__gotham_subsection_title_format:n {#1}
+%% {\@tempswatrue}
+%% {}
+%% \if@tempswa\else
+%% {\PackageError{beamerfontthemegotham}{Patching~subsection~title~failed}\@ehc}
+%% \fi%
+%% \@tempswafalse
+%
+%
+% Similarly, to make the |\MakeLowercase| and |\MakeUppercase| macros work in the frame title we have to patch |\beamer@@frametitle|.
+\providecommand{\beamer@insertframetitlecontinuation}{
+ \usebeamertemplate*{frametitle~continuation}
+}
+\patchcmd{\beamer@@frametitle} % beamerbaselocalstructure.sty l. 32
+ {\gdef\insertframetitle{{%
+ #2%
+ \ifnum\beamer@autobreakcount>0
+ \relax{}\space%
+ \beamer@insertframetitlecontinuation%
+ \fi%
+ }}%
+ }
+ {\gdef\insertframetitle{{%
+ \gotham@frametitleformat{#2}%
+ % \__gotham_frametitle_format:n {#2}
+ \ifnum\beamer@autobreakcount>0
+ \relax{}\space%
+ \beamer@insertframetitlecontinuation%
+ \fi%
+ }}%
+ }
+ {}
+ {\PackageWarning{beamerfontthemegotham}{Patching~frametitle~failed}\@ehc}
+%
+%% NOT WORKING YET !
+%% \patchcmd{\framesubtitle} % beamerbaselocalstructure.sty l.55
+%% {\only#2{\ifblank{#1}{}{\gdef\insertframesubtitle{{#1}}\beamer@aftersubtitle}}}
+%% {\only{#2}{\ifblank{#1}{}{\gdef\insertframesubtitle{{#1}}\beamer@aftersubtitle}}}
+%% {}
+%% {\PackageWarning{beamerfontthemegotham}{Patching~framesubtitle~failed}\@ehc}
+%
+\ExplSyntaxOn
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{function}{\usefonttheme}
+% \begin{syntax}
+% \cs{usefonttheme}\oarg{option1=value1, ...}\marg{gotham}
+% \textrm{where the options are (default marked as} \defopt{default}\textrm{):}
+% \meta{title format} = \oarg{\defopt{textregular} \textbar lower \textbar upper \textbar titlecase}
+% \meta{title shape} = \oarg{\defopt{textregular} \textbar smallcaps \textbar italic}
+% \meta{subtitle format} = \oarg{\defopt{textregular} \textbar lower \textbar upper \textbar titlecase}
+% \meta{subtitle shape} = \oarg{\defopt{textregular} \textbar smallcaps \textbar italic}
+% \meta{frametitle format} = \oarg{\defopt{textregular} \textbar lower \textbar upper \textbar titlecase}
+% \meta{frametitle shape} = \oarg{\defopt{textregular} \textbar smallcaps \textbar italic}
+% \meta{framesubtitle format} = \oarg{\defopt{textregular} \textbar lower \textbar upper \textbar titlecase}
+% \meta{framesubtitle shape} = \oarg{\defopt{textregular} \textbar smallcaps \textbar italic}
+% \meta{part format} = \oarg{\defopt{textregular} \textbar lower \textbar upper \textbar titlecase}
+% \meta{part shape} = \oarg{\defopt{textregular} \textbar smallcaps \textbar italic}
+% \meta{section format} = \oarg{\defopt{textregular} \textbar lower \textbar upper \textbar titlecase}
+% \meta{section shape} = \oarg{\defopt{textregular} \textbar smallcaps \textbar italic}
+% \meta{subsection format} = \oarg{\defopt{textregular} \textbar lower \textbar upper \textbar titlecase}
+% \meta{subsection shape} = \oarg{\defopt{textregular} \textbar smallcaps \textbar italic}
+% \end{syntax}
+% The 'package' (usefonttheme) options can control both shape and format of title (of the presentation), subtitle, part title, section title, subsection title, frametitle and framesubtitle.
+% \end{function}
+% \end{documentation}
+%%%%
+% \begin{implementation}
+% \begin{macro}{font key -- interface}
+% Controls the format and shape of the title (of the presentation), subtitle, part title, section title, subsection title, frametitle and framesubtitle.
+% \UnitTested
+% \TestFiles{gotham-test-035, gotham-test-036}
+% \TestMissing{format of framesubtitle, part and subsection are not tested (and not working) yet.}
+% \begin{macrocode}
+\keys_define:nn { gotham / font }
+{
+ % format title
+ format~title .choice:,
+ format~title .usage:n = { general },
+ format~title .default:n = { regular },
+ format~title / regular .code:n =
+ {
+ \let\gotham@titleformat\@empty
+ % \cs_set_eq:NN \__gotham_title_format:n \__gotham_unchanged:n
+ },
+ format~title / lower .code:n =
+ {
+ \let\gotham@titleformat \text_lowercase:n %\lowercase
+ % \cs_set_eq:NN \__gotham_title_format:n \text_lowercase:n
+ \PackageWarning{ gotham } { Be~aware~that~format~title=lower~can~lead~to~problems. }
+ },
+ format~title / upper .code:n =
+ {
+ \let\gotham@titleformat \text_uppercase:n %\uppercase
+ % \cs_set_eq:NN \__gotham_title_format:n \text_uppercase:n
+ \PackageWarning{ gotham } { Be~aware~that~format~title=upper~can~lead~to~problems. }
+ },
+ format~title / titlecase .code:n =
+ {
+ \let\gotham@titleformat \text_titlecase_all:n %\MakeTitlecase
+ % \cs_set_eq:NN \__gotham_title_format:n \text_titlecase_all:n
+ \PackageWarning{ gotham } { Be~aware~that~format~title=titlecase~can~lead~to~problems. }
+ },
+ format~title / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'\l_keys_value_tl'~is~unknown~for~the~(known)~option~'\l_keys_key_tl',~so~being~ignored. }{helping~message: format~title / unknown } },
+}
+\keys_define:nn { gotham / font }
+{
+ % shape title
+ shape~title .choice:,
+ shape~title .usage:n = { general },
+ shape~title .default:n = { regular },
+ shape~title / regular .code:n =
+ {
+ \setbeamerfont{title}{shape=\normalfont}
+ },
+ shape~title / smallcaps .code:n =
+ {
+ \setbeamerfont{title}{shape=\scshape}
+ },
+ shape~title / italic .code:n =
+ {
+ \setbeamerfont{title}{shape=\itshape}
+ },
+ shape~title / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'\l_keys_value_tl'~is~unknown~for~the~(known)~option~'\l_keys_key_tl',~so~being~ignored. }{helping~message: shape~title / unknown} },
+}
+
+\keys_define:nn { gotham / font }
+{
+ % format subtitle
+ format~subtitle .choice:,
+ format~subtitle .usage:n = { general },
+ format~subtitle .default:n = { regular },
+ format~subtitle / regular .code:n =
+ {
+ \let\gotham@subtitleformat\@empty
+ % \cs_set_eq:NN \__gotham_subtitle_format:n \__gotham_unchanged:n
+ },
+ format~subtitle / lower .code:n =
+ {
+ \let\gotham@subtitleformat \text_lowercase:n %\lowercase
+ % \cs_set_eq:NN \__gotham_subtitle_format:n \text_lowercase:n
+ \PackageWarning{ gotham } { Be~aware~that~format~subtitle=lower~can~lead~to~problems. }
+ },
+ format~subtitle / upper .code:n =
+ {
+ \let\gotham@subtitleformat \text_uppercase:n %\uppercase
+ \cs_set_eq:NN \__gotham_subtitle_format:n \text_uppercase:n
+ \PackageWarning{ gotham } { Be~aware~that~format~subtitle=upper~can~lead~to~problems. }
+ },
+ format~subtitle / titlecase .code:n =
+ {
+ \let\gotham@subtitleformat \text_titlecase_all:n %\MakeTitlecase
+ % \cs_set_eq:NN \__gotham_subtitle_format:n \text_titlecase_all:n %\MakeTitlecase
+ \PackageWarning{ gotham } { Be~aware~that~format~subtitle=titlecase~can~lead~to~problems. }
+ },
+ format~subtitle / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'\l_keys_value_tl'~is~unknown~for~the~(known)~option~'\l_keys_key_tl',~so~being~ignored. }{helping~message: format~subtitle / unknown} },
+}
+\keys_define:nn { gotham / font }
+{
+ % shape subtitle
+ shape~subtitle .choice:,
+ shape~subtitle .usage:n = { general },
+ shape~subtitle .default:n = { regular },
+ shape~subtitle / regular .code:n =
+ {
+ \setbeamerfont{subtitle}{shape=\normalfont}
+ },
+ shape~subtitle / smallcaps .code:n =
+ {
+ \setbeamerfont{subtitle}{shape=\scshape}
+ },
+ shape~subtitle / italic .code:n =
+ {
+ \setbeamerfont{subtitle}{shape=\itshape}
+ },
+ shape~subtitle / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'\l_keys_value_tl'~is~unknown~for~the~(known)~option~'\l_keys_key_tl',~so~being~ignored. }{helping~message: shape~subtitle / unknown} },
+}
+
+\keys_define:nn { gotham / font }
+{
+ % format frametitle
+ format~frametitle .choice:,
+ format~frametitle .usage:n = { general },
+ format~frametitle .default:n = { regular },
+ format~frametitle / regular .code:n =
+ {
+ \let\gotham@frametitleformat\@empty
+ % \cs_set_eq:NN \__gotham_frametitle_format:n \__gotham_unchanged:n
+ },
+ format~frametitle / lower .code:n =
+ {
+ \let\gotham@frametitleformat \text_lowercase:n %\lowercase
+ % \cs_set_eq:NN \__gotham_frametitle_format:n \text_lowercase:n
+ \PackageWarning{ gotham } { Be~aware~that~format~frametitle=lower~can~lead~to~problems. }
+ },
+ format~frametitle / upper .code:n =
+ {
+ \let\gotham@frametitleformat \text_uppercase:n %\uppercase
+ % \cs_set_eq:NN \__gotham_frametitle_format:n \text_uppercase:n
+ \PackageWarning{ gotham } { Be~aware~that~format~frametitle=upper~can~lead~to~problems. }
+ },
+ format~frametitle / titlecase .code:n =
+ {
+ \let\gotham@frametitleformat \text_titlecase_all:n %\Maketitlecase
+ % \cs_set_eq:NN \__gotham_frametitle_format:n \text_titlecase_all:n %\MakeTitlecase
+ \PackageWarning{ gotham } { Be~aware~that~format~frametitle=titlecase~can~lead~to~problems. }
+ },
+ format~frametitle / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'\l_keys_value_tl'~is~unknown~for~the~(known)~option~'\l_keys_key_tl',~so~being~ignored. }{helping~message: format~frametitle / unknown} },
+}
+\keys_define:nn { gotham / font }
+{
+ % shape frametitle
+ shape~frametitle .choice:,
+ shape~frametitle .usage:n = { general },
+ shape~frametitle .default:n = { regular },
+ shape~frametitle / regular .code:n =
+ {
+ \setbeamerfont{frametitle}{shape=\normalfont}
+ },
+ shape~frametitle / smallcaps .code:n =
+ {
+ \setbeamerfont{frametitle}{shape=\scshape}
+ },
+ shape~frametitle / italic .code:n =
+ {
+ \setbeamerfont{frametitle}{shape=\itshape}
+ },
+ shape~frametitle / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'\l_keys_value_tl'~is~unknown~for~the~(known)~option~'\l_keys_key_tl',~so~being~ignored. }{helping~message: shape~frametitle / unknown} },
+}
+
+\keys_define:nn { gotham / font }
+{
+ % format framesubtitle
+ format~framesubtitle .choice:,
+ format~framesubtitle .usage:n = { general },
+ format~framesubtitle .default:n = { regular },
+ format~framesubtitle / regular .code:n =
+ {
+ \let\gotham@framesubtitleformat\@empty
+ % \cs_set_eq:NN \__gotham_framesubtitle_format:n \__gotham_unchanged:n
+ },
+ format~framesubtitle / lower .code:n =
+ {
+ \let\gotham@framesubtitleformat \text_lowercase:n %\lowercase
+ % \cs_set_eq:NN \__gotham_framesubtitle_format:n \text_lowercase:n
+ \PackageWarning{ gotham } { Be~aware~that~format~framesubtitle=lower~can~lead~to~problems. }
+ },
+ format~framesubtitle / upper .code:n =
+ {
+ \let\gotham@framesubtitleformat \text_uppercase:n %\uppercase
+ % \cs_set_eq:NN \__gotham_framesubtitle_format:n \text_uppercase:n
+ \PackageWarning{ gotham } { Be~aware~that~format~framesubtitle=upper~can~lead~to~problems. }
+ },
+ format~framesubtitle / titlecase .code:n =
+ {
+ \let\gotham@framesubtitleformat \text_titlecase_all:n %\Maketitlecase
+ % \cs_set_eq:NN \__gotham_framesubtitle_format:n \text_titlecase_all:n %\Maketitlecase
+ \PackageWarning{ gotham } { Be~aware~that~format~framesubtitle=titlecase~can~lead~to~problems. }
+ },
+ format~framesubtitle / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'\l_keys_value_tl'~is~unknown~for~the~(known)~option~'\l_keys_key_tl',~so~being~ignored. }{helping~message: format~framesubtitle / unknown} },
+}
+\keys_define:nn { gotham / font }
+{
+ % shape framesubtitle
+ shape~framesubtitle .choice:,
+ shape~framesubtitle .usage:n = { general },
+ shape~framesubtitle .default:n = { regular },
+ shape~framesubtitle / regular .code:n =
+ {
+ \setbeamerfont{framesubtitle}{shape=\normalfont}
+ },
+ shape~framesubtitle / smallcaps .code:n =
+ {
+ \setbeamerfont{framesubtitle}{shape=\scshape}
+ },
+ shape~framesubtitle / italic .code:n =
+ {
+ \setbeamerfont{framesubtitle}{shape=\itshape}
+ },
+ shape~framesubtitle / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'\l_keys_value_tl'~is~unknown~for~the~(known)~option~'\l_keys_key_tl',~so~being~ignored. }{helping~message: shape~framesubtitle / unknown} },
+}
+
+\keys_define:nn { gotham / font }
+{
+ % format part
+ format~part .choice:,
+ format~part .usage:n = { general },
+ format~part .default:n = { regular },
+ format~part / regular .code:n =
+ {
+ \let\gotham@parttitleformat\@empty
+ % \cs_set_eq:NN \__gotham_part_title_format:n \text_titlecase:n
+ },
+ format~part / lower .code:n =
+ {
+ \let\gotham@parttitleformat \text_lowercase:n %\lowercase
+ % \cs_set_eq:NN \__gotham_part_title_format:n \text_lowercase:n
+ \PackageWarning{ gotham } { Be~aware~that~format~part=lower~can~lead~to~problems. }
+ },
+ format~part / upper .code:n =
+ {
+ \let\gotham@parttitleformat \text_uppercase:n %\uppercase
+ % \cs_set_eq:NN \__gotham_part_title_format:n \text_uppercase:n
+ \PackageWarning{ gotham } { Be~aware~that~format~part=upper~can~lead~to~problems. }
+ },
+ format~part / titlecase .code:n =
+ {
+ \let\gotham@parttitleformat\text_titlecase_all:n %\Maketitlecase
+ % \cs_set_eq:NN \__gotham_part_title_format:n \text_titlecase:n
+ \PackageWarning{ gotham } { Be~aware~that~format~part=titlecase~can~lead~to~problems. }
+ },
+ format~part / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'\l_keys_value_tl'~is~unknown~for~the~(known)~option~'\l_keys_key_tl',~so~being~ignored. }{helping~message: format~part / unknown} },
+}
+\keys_define:nn { gotham / font }
+{
+ % shape part
+ shape~part .choice:,
+ shape~part .usage:n = { general },
+ shape~part .default:n = { regular },
+ shape~part / regular .code:n =
+ {
+ \setbeamerfont{part~title}{shape=\normalfont}
+ },
+ shape~part / smallcaps .code:n =
+ {
+ \setbeamerfont{part~title}{shape=\scshape}
+ },
+ shape~part / italic .code:n =
+ {
+ \setbeamerfont{part~title}{shape=\itshape}
+ },
+ shape~part / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'\l_keys_value_tl'~is~unknown~for~the~(known)~option~'\l_keys_key_tl',~so~being~ignored. }{helping~message: shape~part / unknown} },
+}
+
+\keys_define:nn { gotham / font }
+{
+ % format section
+ format~section .choice:,
+ format~section .usage:n = { general },
+ format~section .default:n = { regular },
+ format~section / regular .code:n =
+ {
+ \let\gotham@sectiontitleformat\@empty
+ % \cs_set_eq:NN \__gotham_section_title_format:n \__gotham_unchanged:n
+ },
+ format~section / lower .code:n =
+ {
+ \let\gotham@sectiontitleformat \text_lowercase:n %\lowercase
+ % \cs_set_eq:NN \__gotham_section_title_format:n \text_lowercase:n
+ \PackageWarning{ gotham } { Be~aware~that~format~section=lower~can~lead~to~problems. }
+ },
+ format~section / upper .code:n =
+ {
+ \let\gotham@sectiontitleformat \text_uppercase:n %\uppercase
+ % \cs_set_eq:NN \__gotham_section_title_format:n \text_uppercase:n
+ \PackageWarning{ gotham } { Be~aware~that~format~section=upper~can~lead~to~problems. }
+ },
+ format~section / titlecase .code:n =
+ {
+ \let\gotham@sectiontitleformat \text_titlecase_all:n %\Maketitlecase
+ % \cs_set_eq:NN \__gotham_section_title_format:n \text_titlecase_all:n
+ \PackageWarning{ gotham } { Be~aware~that~format~section=titlecase~can~lead~to~problems. }
+ },
+ format~section / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'\l_keys_value_tl'~is~unknown~for~the~(known)~option~'\l_keys_key_tl',~so~being~ignored. }{helping~message: format~section / unknown} },
+}
+\keys_define:nn { gotham / font }
+{
+ % shape section
+ shape~section .choice:,
+ shape~section .usage:n = { general },
+ shape~section .default:n = { regular },
+ shape~section / regular .code:n =
+ {
+ \setbeamerfont{section~title}{shape=\normalfont}
+ },
+ shape~section / smallcaps .code:n =
+ {
+ \setbeamerfont{section~title}{shape=\scshape}
+ },
+ shape~section / italic .code:n =
+ {
+ \setbeamerfont{section~title}{shape=\itshape}
+ },
+ shape~section / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'\l_keys_value_tl'~is~unknown~for~the~(known)~option~'\l_keys_key_tl',~so~being~ignored. }{helping~message: shape~section / unknown} },
+}
+
+\keys_define:nn { gotham / font }
+{
+ % format subsection
+ format~subsection .choice:,
+ format~subsection .usage:n = { general },
+ format~subsection .default:n = { regular },
+ format~subsection / regular .code:n =
+ {
+ \let\gotham@subsectiontitleformat\@empty
+ % \cs_set_eq:NN \__gotham_subsection_title_format:n \__gotham_unchanged:n
+ },
+ format~subsection / lower .code:n =
+ {
+ \let\gotham@subsectiontitleformat \text_lowercase:n %\lowercase
+ % \cs_set_eq:NN \__gotham_subsection_title_format:n \text_lowercase:n
+ \PackageWarning{ gotham } { Be~aware~that~format~subsection=lower~can~lead~to~problems. }
+ },
+ format~subsection / upper .code:n =
+ {
+ \let\gotham@subsectiontitleformat \text_uppercase:n %\uppercase
+ % \cs_set_eq:NN \__gotham_subsection_title_format:n \text_uppercase:n
+ \PackageWarning{ gotham } { Be~aware~that~format~subsection=upper~can~lead~to~problems. }
+ },
+ format~subsection / titlecase .code:n =
+ {
+ \let\gotham@subsectiontitleformat\text_titlecase_all:n %\Maketitlecase
+ % \cs_set_eq:NN \__gotham_subsection_title_format:n \text_titlecase_all:n
+ \PackageWarning{ gotham } { Be~aware~that~format~subsection=titlecase~can~lead~to~problems. }
+ },
+ format~subsection / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'\l_keys_value_tl'~is~unknown~for~the~(known)~option~'\l_keys_key_tl',~so~being~ignored. }{helping~message: format~subsection / unknown} },
+}
+\keys_define:nn { gotham / font }
+{
+ % shape subsection
+ shape~subsection .choice:,
+ shape~subsection .usage:n = { general },
+ shape~subsection .default:n = { regular },
+ shape~subsection / regular .code:n =
+ {
+ \setbeamerfont{subsection~title}{shape=\normalfont}
+ },
+ shape~subsection / smallcaps .code:n =
+ {
+ \setbeamerfont{subsection~title}{shape=\scshape}
+ },
+ shape~subsection / italic .code:n =
+ {
+ \setbeamerfont{subsection~title}{shape=\itshape}
+ },
+ shape~subsection / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'\l_keys_value_tl'~is~unknown~for~the~(known)~option~'\l_keys_key_tl',~so~being~ignored. }{helping~message: shape~subsection / unknown} },
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{Default font keys}
+% Apply default key options.
+% \UnitTested
+% \TestFiles{gotham-test-035}
+% \begin{macrocode}
+% when no value is given, default is called.
+\keys_set:nn { gotham / font } {
+ format~title, shape~title,
+ format~subtitle, shape~subtitle,
+ format~frametitle, shape~frametitle,
+ format~framesubtitle, shape~framesubtitle,
+ format~part, shape~part,
+ format~section, shape~section,
+ format~subsection, shape~subsection,
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{Process font keys}
+% Process package options.
+% \UnitTested
+% \TestFiles{gotham-test-035}
+% \begin{macrocode}
+\ProcessKeyOptions[ gotham / font ]
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+%
+% \begin{implementation}
+% \begin{macrocode}
+%\endinput
+%</font>
+% \end{macrocode}
+% \end{implementation}
+%
+%
+% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%
+%\begin{implementation}
+% \begin{macrocode}
+%<*color>
+\ProvidesExplPackage{beamercolorthemegotham}{2024/09/20}{1.1.0.b}{Gotham color theme}
+\RequirePackage{expl3}
+\RequirePackage{xparse}
+\RequirePackage{xcolor}
+% \end{macrocode}
+% \end{implementation}
+%
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%% COLOR %%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% \begin{implementation}
+% \begin{variable}{\definecolor[named]{gAnthracite}, colors definition}
+% Definition of the Gotham colors.
+% \begin{macrocode}
+\definecolor[named]{gLightOrange}{HTML}{EB811B}
+\definecolor[named]{gLightGreen}{HTML}{14B03D}
+\definecolor[named]{gDeepBlue}{RGB}{42, 42, 255}
+\definecolor[named]{gDeepYellOr}{RGB}{255, 204, 0}
+\definecolor[named]{gAnthracite}{HTML}{2d3e50}
+\definecolor[named]{gLightTeal}{RGB}{172, 195, 210}
+\definecolor[named]{gPaleYell}{RGB}{255, 255, 240}
+\definecolor[named]{gDarkBlack}{gray}{0.1}
+\definecolor[named]{gDarkGrey}{gray}{0.25}
+\definecolor[named]{gMidGrey}{gray}{0.5}
+\definecolor[named]{gLightGrey}{gray}{0.9}
+% \end{macrocode}
+% \end{variable}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{variable}{\colorlet{colorPale}, set gotham palette colors}
+% \begin{syntax}
+% \cs{colorlet} \marg{colorPale} \marg{gPaleYell}
+% \cs{colorlet} \marg{colorDark} \marg{gDarkBlack}
+% \cs{colorlet} \marg{colorA} \marg{gAnthracite}
+% \cs{colorlet} \marg{colorAreversed} \marg{gLightTeal}
+% \cs{colorlet} \marg{colorB} \marg{gMidGrey}
+% \cs{colorlet} \marg{colorC} \marg{gDeepYellOr}
+% \cs{colorlet} \marg{colorD} \marg{gLightOrange}
+% \cs{colorlet} \marg{colorE} \marg{gLightGreen}
+% \end{syntax}
+% Setup the colors use for presentations:
+% \begin{itemize}
+% \item |colorPale| is used for BG in light mode
+% \item |colorDark| is used for FG in light mode
+% \item |colorA| is used for frametitle and standout BG in light mode
+% \item |colorAreversed| is used for frametitle and standout BG in dark mode
+% \item |colorB| is used for progress bar and blocks BG
+% \item |colorC| is used for progress bar FG
+% \item |colorD| is used for alert FG/BG depending on the block mode
+% \item |colorE| is used for example FG/BG depending on the block mode
+% \end{itemize}
+% \end{variable}
+% \end{documentation}
+%%%%%%
+% \begin{implementation}
+% \begin{variable}{\colorlet{colorPale}, set gotham palette colors}
+% A set Gotham palette: a list of color variables easily adapted.
+% \begin{macrocode}
+% Define the color palette
+\@ifundefined{\string\color@colorAreversed}{
+ % default colorset.
+ \colorlet{colorPale}{gPaleYell} % BG in light/normal mode
+ \colorlet{colorDark}{gDarkBlack} % FG in light/normal mode
+ \colorlet{colorA}{gAnthracite} % frametitle, standin.out,
+ \colorlet{colorAreversed}{gLightTeal} % frametitle, standin.in,
+ \colorlet{colorB}{gMidGrey} % gray BG : progress bar, blocks
+ \colorlet{colorC}{gDeepYellOr} % progress bar
+ \colorlet{colorD}{gLightOrange} % alert
+ \colorlet{colorE}{gLightGreen} % example
+}{
+ % else nothing to do, colors are already defined.
+}
+% \end{macrocode}
+% \end{variable}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{function}{\__gotham_color_set_style_anthracite:}
+% Command to activate anthracite colorset.
+% \TestFiles{gotham-test-1037}
+% \begin{macrocode}
+\cs_new_protected:Nn \__gotham_color_set_style_anthracite:{
+ \colorlet{colorPale}{gPaleYell} % BG in light/normal mode
+ \colorlet{colorDark}{gDarkBlack} % FG in light/normal mode
+ \colorlet{colorA}{gAnthracite} % frametitle, standin.out,
+ \colorlet{colorAreversed}{gLightTeal} % frametitle, standin.in,
+ \colorlet{colorB}{gMidGrey} % gray BG : progress bar, blocks
+ \colorlet{colorC}{gDeepYellOr} % progress bar
+ \colorlet{colorD}{gLightOrange} % alert
+ \colorlet{colorE}{gLightGreen} % example
+}
+% \end{macrocode}
+% \end{function}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{function}{\__gotham_color_set_style_red:}
+% Command to activate red colorset.
+% \TestFiles{gotham-test-1037}
+% \begin{macrocode}
+\cs_new_protected:Nn \__gotham_color_set_style_red:{
+ \colorlet{colorPale}{gPaleYell} % BG in light/normal mode
+ \colorlet{colorDark}{gDarkBlack} % FG in light/normal mode
+ \colorlet{colorA}{red} % frametitle, standin.out,
+ \colorlet{colorAreversed}{gLightTeal} % frametitle, standin.in,
+ \colorlet{colorB}{gMidGrey} % gray BG : progress bar, blocks
+ \colorlet{colorC}{gDeepYellOr} % progress bar
+ \colorlet{colorD}{gLightOrange} % alert
+ \colorlet{colorE}{gLightGreen} % example
+}
+% \end{macrocode}
+% \end{function}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{variable}{\colorlet{colorBG}{colorPale}, set functional colors}
+% \begin{syntax}
+% \cs{colorlet} \marg{colorBG} \marg{colorPale}
+% \cs{colorlet} \marg{colorFG} \marg{colorDark}
+% \cs{colorlet} \marg{colorFrametitle} \marg{colorA}
+% \cs{colorlet} \marg{colorStandout} \marg{colorA}
+% \cs{colorlet} \marg{colorStandin} \marg{colorA}
+% \cs{colorlet} \marg{colorTitlepage} \marg{colorA}
+% \cs{colorlet} \marg{colorFiligrane} \marg{colorB}
+% \cs{colorlet} \marg{colorBackElement} \marg{colorB}
+% \cs{colorlet} \marg{colorProgBar} \marg{colorC}
+% \cs{colorlet} \marg{colorAlert} \marg{colorD}
+% \cs{colorlet} \marg{colorExample} \marg{colorE}
+% \end{syntax}
+% Setup the default color aliases used in the presentation theme definitions.
+% These aliases are partly redefined by dark/light/transparent modes.
+% \end{variable}
+% \end{documentation}
+%%%%%%
+% \begin{implementation}
+% \begin{variable}{\colorlet{colorBG}{colorPale}, set functional colors}
+% A set of variable easily adapted.
+% \begin{macrocode}
+% Define the color palette
+\colorlet{colorBG}{colorPale}
+\colorlet{colorFG}{colorDark}
+\colorlet{colorFrametitle}{colorA}
+\colorlet{colorStandout}{colorA}
+\colorlet{colorStandin}{colorPale}
+\colorlet{colorTitlepage}{colorA}
+\colorlet{colorFiligrane}{colorB}
+\colorlet{colorBackElement}{colorB}
+\colorlet{colorProgBar}{colorC}
+\colorlet{colorAlert}{colorD}
+\colorlet{colorExample}{colorE}
+% \end{macrocode}
+% \end{variable}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{variable}{\providebool{darkBG}, \providebool{transparentBG}}
+% Variable to track color setup.
+% \begin{macrocode}
+% \providebool{reversedColor}
+% \boolfalse{reversedColor}
+\providebool{darkBG}
+\boolfalse{darkBG}
+\providebool{transparentBG}
+\booltrue{transparentBG}
+% \end{macrocode}
+% \end{variable}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{function}{\__gotham_color_set_darkBG:}
+% Command to activate dark mode
+% \TestFiles{gotham-test-037}
+% \begin{macrocode}
+\cs_new_protected:Nn \__gotham_color_set_darkBG:{
+ \setbeamercolor{normal~text}{%
+ fg=colorBG,
+ bg=colorFG,
+ }%
+ \usebeamercolor[fg]{normal~text}%
+ \booltrue{darkBG}%
+ \boolfalse{transparentBG}
+ \colorlet{colorFrametitle}{colorAreversed}
+ \colorlet{colorStandout}{colorAreversed}
+ \colorlet{colorStandin}{colorFG}
+ \colorlet{colorTitlepage}{colorAreversed}
+ % dark
+ \setbeamercolor{palette~primary}{% reversed color compared to normal text
+ use=normal~text,
+ fg=normal~text.bg,
+ bg=normal~text.fg
+ }
+}
+% \end{macrocode}
+% \end{function}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{function}{\__gotham_color_set_lightBG:}
+% Command to activate light background.
+% \TestFiles{gotham-test-037}
+% \begin{macrocode}
+\cs_new_protected:Nn \__gotham_color_set_lightBG:{
+ \setbeamercolor{normal~text}{
+ fg=colorFG,
+ bg=colorBG
+ }
+ \usebeamercolor[fg]{normal~text}
+ \boolfalse{darkBG}
+ \boolfalse{transparentBG}
+ \colorlet{colorFrametitle}{colorA}
+ \colorlet{colorStandout}{colorA}
+ \colorlet{colorStandin}{colorBG}
+ \colorlet{colorTitlepage}{colorA}
+ % light
+ \setbeamercolor{palette~primary}{
+ % reversed color compared to normal text
+ use=normal~text,
+ fg=normal~text.bg,
+ bg=normal~text.fg
+ }
+}
+% \end{macrocode}
+% \end{function}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{function}{\__gotham_color_set_transparentBG:}
+% Command to activate transparent background.
+% \TestFiles{gotham-test-037}
+% \begin{macrocode}
+% \newcommand{\gotham@colors@transparent}{
+\cs_new_protected:Nn \__gotham_color_set_transparentBG:{
+ \setbeamercolor{normal~text}{
+ fg=colorFG,
+ bg=,
+ }
+ \usebeamercolor[fg]{normal~text}
+ \boolfalse{darkBG}
+ \booltrue{transparentBG}
+ \colorlet{colorFrametitle}{colorA}
+ \colorlet{colorStandout}{colorA}
+ {\usebeamercolor[bg]{normal~text}\colorlet{colorStandin}{bg}}% this is not working because the colorlet is not kept outside of the {} environment...
+ % \usebeamercolor{normal~text} % reset % NOT working neither
+ \colorlet{colorStandin}{colorBG} % since the two previous lines are not working, let define it like light-bg
+ \colorlet{colorTitlepage}{colorA}
+ % like light background.
+ \setbeamercolor{palette~primary}{
+ % reversed color compared to normal text
+ use=normal~text,
+ fg=colorBG,
+ bg=normal~text.fg
+ }
+}
+% \end{macrocode}
+% \end{function}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{function}{\__gotham_color_set_transparent_block:}
+% Command to activate transparent block.
+% \TestFiles{gotham-test-037}
+% \begin{macrocode}
+\cs_new_protected:Nn \__gotham_color_set_transparent_block:{
+ \setbeamercolor{block~title}{
+ use=normal~text,
+ fg=normal~text.fg,
+ bg=
+ }
+ \setbeamercolor{block~body}{
+ bg=
+ }
+ \setbeamercolor{alerted~text}{
+ fg=colorAlert
+ }
+ \setbeamercolor{example~text}{
+ fg=colorExample
+ }
+ \setbeamercolor{block~title~example}{
+ use={block~title, example~text},
+ bg=block~title.bg,
+ fg=example~text.fg
+ }
+ \setbeamercolor{block~title~alerted}{
+ use={block~title, alerted~text},
+ bg=block~title.bg,
+ fg=alerted~text.fg
+ }
+}
+% \end{macrocode}
+% \end{function}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{function}{\__gotham_color_set_fill_block:}
+% Command to activate fill block.
+% \TestFiles{gotham-test-037}
+% \begin{macrocode}
+\cs_new_protected:Nn \__gotham_color_set_fill_block:{
+ \setbeamercolor{block~title}{
+ fg=colorBackElement!10!normal~text.fg,
+ bg=colorBackElement!135!fg
+ }
+ \setbeamercolor{block~body}{
+ use={block~title, normal~text},
+ bg=block~title.bg!50!normal~text.bg
+ }
+ \setbeamercolor{alerted~text}{
+ fg=colorAlert
+ }
+ \setbeamercolor{example~text}{
+ fg=colorExample
+ }
+ \setbeamercolor{block~title~example}{
+ use={block~title, example~text},
+ bg=block~title.bg,
+ fg=example~text.fg
+ }
+ \setbeamercolor{block~title~alerted}{
+ use={block~title, alerted~text},
+ bg=block~title.bg,
+ fg=alerted~text.fg
+ }
+}% \end{macrocode}
+% \end{function}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{function}{\__gotham_color_set_native_block:}
+% Command to activate native block.
+% \TestFiles{gotham-test-037}
+% \begin{macrocode}
+\cs_new_protected:Nn \__gotham_color_set_native_block:{
+ \setbeamercolor{block~title}{
+ fg=colorPale,
+ bg=colorBackElement!90!fg
+ }
+ \setbeamercolor{block~body}{
+ use={block~title, normal~text},
+ bg=block~title.bg!50!normal~text.bg
+ }
+ \setbeamercolor{alerted~text}{
+ fg=colorAlert
+ }
+ % With native block, we have to let alerted text with a visible color (not pale) to keep alert visible (cf test-1005).
+ % So, we have to create an extra color: alertedBlock~text.
+ \setbeamercolor{alertedBlock~text}{
+ fg=colorPale
+ }
+ \setbeamercolor{example~text}{
+ fg=colorPale
+ }
+ \setbeamercolor{block~title~alerted}{
+ use={block~title, alertedBlock~text},
+ bg=colorAlert,
+ fg=alertedBlock~text.fg
+ }
+ \setbeamercolor{block~title~example}{
+ use={block~title, example~text},
+ bg=colorExample,
+ fg=example~text.fg
+ }
+}
+% \end{macrocode}
+% \end{function}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{Gotham color adaptation}
+% Set colors variable from Gotham color setup that needs specific adaptation, i.e. |structure| as mentioned in Beamer documentation and |progress bar| since it is a new feature.
+% \UnitTested
+% \TestFiles{gotham-test-037}
+% \begin{macrocode}
+\setbeamercolor{structure}{use=normal~text, fg=normal~text.fg}
+\setbeamercolor{progress~bar}{
+ use=alerted~text,
+ fg=colorProgBar,
+ bg=alerted~text.fg!50!black!30
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{Usual color env}
+% Set colors variable from Gotham color setup.
+% The titles and structural elements (e.g. |itemize| bullets) are set in the same color as |normal text|.
+% This would ideally done by setting |normal text| as a parent style, which we do to set |titlelike|, but this doesn't work for |structure| as its foreground is set explicitly in |beamercolorthemedefault.sty|.
+% \UnitTested
+% \TestFiles{gotham-test-037}
+% \begin{macrocode}
+\setbeamercolor{titlelike}{use=normal~text, parent=normal~text}
+\setbeamercolor{author}{use=normal~text, parent=normal~text}
+\setbeamercolor{date}{use=normal~text, parent=normal~text}
+\setbeamercolor{institute}{use=normal~text, parent=normal~text}
+\setbeamercolor{frametitle}{
+ use=palette~primary,
+ parent=palette~primary,
+ bg=colorFrametitle
+}
+% The Gotham inner or outer themes optionally display progress bars in various locations.
+% Their color is set by |progress bar| but the two different kinds can be customized separately.
+% The horizontal rule on the title page is also set based on the progress bar color and can be customized with |title separator|.
+\setbeamercolor{title~separator}{
+ use=progress~bar,
+ parent=progress~bar
+}
+\setbeamercolor{progress~bar~in~head/foot}{%
+ use=progress~bar,
+ parent=progress~bar
+}
+\setbeamercolor{progress~bar~in~part~page}{
+ use=progress~bar,
+ parent=progress~bar
+}
+\setbeamercolor{progress~bar~in~section~page}{
+ use=progress~bar,
+ parent=progress~bar
+}
+\setbeamercolor{progress~bar~in~splitvert}{
+ use=progress~bar,
+ parent=progress~bar
+}
+% \setbeamercolor{progress~bar~in~subsection~page}{
+% use=progress~bar,
+% parent=progress~bar
+% }
+% \setbeamercolor{progress~bar~in~subsubsection~page}{
+% use=progress~bar,
+% parent=progress~bar
+% }
+%
+% Blocks
+\setbeamercolor{block~body~alerted}{use=block~body, parent=block~body}
+\setbeamercolor{block~body~example}{use=block~body, parent=block~body}
+%
+% Footnote
+\setbeamercolor{footnote}{fg=normal~text.fg!90}
+\setbeamercolor{footnote~mark}{fg=.}
+%
+% Bibliography
+%
+% We also reset the bibliography colors in order to pick up the surrounding colors at the time of use.
+% This prevents us having to set the correct color in normal and standout mode.
+% \setbeamercolor{bibliography entry author}{fg=, bg=}
+% \setbeamercolor{bibliography entry title}{fg=, bg=}
+% \setbeamercolor{bibliography entry location}{fg=, bg=}
+% \setbeamercolor{bibliography entry note}{fg=, bg=}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{new color environments}
+% Set up colors for the the new beamer environment used by the theme.
+% \UnitTested
+% \TestFiles{gotham-test-037}
+% \begin{macrocode}
+\setbeamercolor{frametitleSection}{use=primary~palette, bg=, fg=primary~palette.bg}
+\setbeamercolor{standout}{use=primary~palette, bg=colorStandout, fg=primary~palette.bg}
+\setbeamercolor{standin}{use=normal~text, bg=colorStandin, fg=normal~text.fg}
+
+\setbeamercolor{section~in~toc}{use=normal~text, parent=normal~text,}
+\setbeamercolor{subsection~in~toc}{use=normal~text, parent=normal~text,}
+\setbeamercolor{subsubsection~in~toc}{use=normal~text, parent=normal~text,}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{function}{\usecolortheme}
+% \begin{syntax}
+% \cs{usecolortheme}\oarg{option1=value1, ...}\marg{gotham}
+% \textrm{where the options are (default marked as} \defopt{default}\textrm{):}
+% \meta{background} = \oarg{\defopt{transparent} \textbar light \textbar dark}
+% \meta{block} = \oarg{\defopt{native} \textbar fill \textbar transparent}
+% \meta{colorset} = \oarg{\defopt{anthracite} \textbar red }
+% \end{syntax}
+% The 'package' (usecolortheme) options can control color mode (dark, ligh or transparent background) and the block (native or fill or transparent).
+% Block environments such as |theorem| and |example| have no background color by default.
+% The option |block=fill| sets a background color based on the background and foreground of |normal text|.
+% The option |block=transparent| reverts the block environments to an empty background, which can be useful if changing colors mid-presentation.
+% The option |colorset=red| changes the colorset used to define a color theme.
+% \end{function}
+% \end{documentation}
+%%%%
+% \begin{implementation}
+% \begin{macro}{color key -- interface}
+% Controls the background mode (dark, ligh or transparent background) and the block (fill or transparent) and colorset (anthracite, red, blue, green, etc).
+% \UnitTested
+% \TestFiles{gotham-test-037}
+% \begin{macrocode}
+\keys_define:nn { gotham / color }
+{
+ % block
+ block .choice:,
+ block .usage:n = { general },
+ block .default:n = { native },
+ block / native .code:n = { \__gotham_color_set_native_block: },
+ block / transparent .code:n = { \__gotham_color_set_transparent_block: },
+ block / fill .code:n = { \__gotham_color_set_fill_block: },
+ block / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'\l_keys_value_tl'~is~unknown~for~the~(known)~option~'\l_keys_key_tl',~so~being~ignored. }{helping~message: block / unknown} },
+}
+
+\keys_define:nn { gotham / color }
+{
+ % background
+ background .choice:,
+ background .usage:n = { general },
+ background .default:n = { transparent },
+ background / transparent .code:n = { \__gotham_color_set_transparentBG: },
+ background / light .code:n = { \__gotham_color_set_lightBG: },
+ background / dark .code:n = { \__gotham_color_set_darkBG: },
+ background / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'\l_keys_value_tl'~is~unknown~for~the~(known)~option~'\l_keys_key_tl',~so~being~ignored. }{helping~message: background / unknown} },
+}
+
+\keys_define:nn { gotham / color }
+{
+ % colorset
+ colorset .choice:,
+ colorset .usage:n = { general },
+ colorset .default:n = { anthracite },
+ colorset / anthracite .code:n = { \__gotham_color_set_style_anthracite: },
+ colorset / red .code:n = { \__gotham_color_set_style_red: },
+ % colorset / blue .code:n = { },
+ % colorset / green .code:n = { },
+ % colorset / orange .code:n = { },
+ % colorset / teal .code:n = { },
+ colorset / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'\l_keys_value_tl'~is~unknown~for~the~(known)~option~'\l_keys_key_tl',~so~being~ignored. }{helping~message: colorset / unknown} },
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{Default color keys}
+% Apply default key options.
+% \UnitTested
+% \TestFiles{gotham-test-037}
+% \begin{macrocode}
+% when no value is given, default is called.
+\keys_set:nn { gotham / color } { background, block, colorset }
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{Process color keys}
+% Process package options.
+% \UnitTested
+% \TestFiles{gotham-test-037}
+% \begin{macrocode}
+\ProcessKeyOptions[ gotham / color ]
+\mode<all>
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+%
+%
+% \begin{implementation}
+% \begin{macrocode}
+%\endinput
+%</color>
+% \end{macrocode}
+% \end{implementation}
+%
+% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%
+%
+%\begin{implementation}
+% \begin{macrocode}
+%<*inner>
+\ProvidesExplPackage{beamerinnerthemegotham}{2024/09/20}{1.1.0.b}{gotham inner theme}
+\RequirePackage{expl3}
+\RequirePackage{xparse}
+\RequirePackage{calc}
+\RequirePackage{tikz}
+% \end{macrocode}
+% \end{implementation}
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%% INNER %%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% \begin{implementation}
+% A |beamer| inner theme dictates the style of the frame elements traditionally set in the ``body'' of each slide. These include:
+% \begin{itemize}
+% \item title page;
+% \item backgrounds;
+% \item standin/out;
+% \item part, section etc, pages;
+% \item table of content pages (including for sections...);
+% \item environement elements: \begin{itemize}
+% \item itemize, enumerate, and description environments;
+% \item block environments including theorems and proofs;
+% \item figures and tables; and
+% \item footnotes and plain text.
+% \end{itemize}
+% \end{itemize}
+% \end{implementation}
+%
+%
+
+%%% Titlepage %%%
+%%%%%%%%%%%%%%%%%%%
+%
+% \begin{implementation}
+% \begin{macro}{Compitibility mode for colors}
+% FROM COLOR THEME: useful to provide this recall when the inner theme is loaded without the color theme.
+% \begin{macrocode}
+\@ifundefined{\string\color@colorProgBar}{
+ \providebool{darkBG} \boolfalse{darkBG}
+ \providebool{transparentBG} \booltrue{transparentBG}
+ \colorlet{colorBG}{white}
+ \colorlet{colorFG}{black}
+ \colorlet{colorFrametitle}{purple}
+ \colorlet{colorStandout}{purple}
+ \colorlet{colorStandin}{purple}
+ \colorlet{colorTitlepage}{purple}
+ \colorlet{colorFiligrane}{gray}
+ \colorlet{colorBackElement}{gray}
+ \colorlet{colorProgBar}{orange}
+ \colorlet{colorAlert}{red}
+ \colorlet{colorExample}{green}
+ \colorlet{colorFrametitle}{purple}
+ \colorlet{colorTitlepage}{purple}
+ \setbeamercolor{progress~bar}{
+ use=alerted~text,
+ fg=colorProgBar,
+ bg=alerted~text.fg!50!black!30
+ }
+ \setbeamercolor{progress~bar~in~head/foot}{%
+ use=progress~bar,
+ parent=progress~bar
+ }
+ \setbeamercolor{progress~bar~in~part~page}{
+ use=progress~bar,
+ parent=progress~bar
+ }
+ \setbeamercolor{progress~bar~in~section~page}{
+ use=progress~bar,
+ parent=progress~bar
+ }
+ \setbeamercolor{progress~bar~in~splitvert}{
+ use=progress~bar,
+ parent=progress~bar
+ }
+ \setbeamercolor{frametitleSection}{use=primary~palette, bg=, fg=primary~palette.bg}
+ \setbeamercolor{standout}{use=primary~palette, bg=colorStandout, fg=primary~palette.bg}
+ \setbeamercolor{standin}{use=normal~text, bg=colorStandin, fg=normal~text.fg}
+ \setbeamercolor{section~in~toc}{use=normal~text, parent=normal~text,}
+ \setbeamercolor{subsection~in~toc}{use=normal~text, parent=normal~text,}
+ \setbeamercolor{subsubsection~in~toc}{use=normal~text, parent=normal~text,}
+}{
+ % else the colors are defined: this is fine.
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\maketitle,\titlepage}
+% Normal people should use |\maketitle| or |\titlepage| instead of using the |title page| beamer template directly.
+% Beamer already defines these macros, but we patch them here to make the title page |[plain]| by default, remove |\@thanks|, and ensure the title frame number doesn't count.
+% Inserts the title frame, or causes the current frame to use the |title page| template.
+% \UnitTested
+% \TestFiles{gotham-test-038}
+% \begin{macrocode}
+\def\maketitle{
+ \ifbeamer@inframe
+ \titlepage
+ \else
+ \frame[plain, noframenumbering]{\titlepage}
+ \fi
+}
+\def\titlepage{
+ \usebeamertemplate{title~page}
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate{title~graphic}{gotham}}
+% Definition of elements templates that will be used in titlepage.
+% \UnitTested
+% \TestFiles{gotham-test-038}
+% \begin{macrocode}
+\defbeamertemplate*{title~graphic}{gotham}{
+ % \vbox to 0pt {% %%%%% MODIFIED !
+ \vbox{
+ % \vspace*{2em} %%%%% COMMENT ADDED !
+ \inserttitlegraphic
+ }
+ \nointerlineskip
+}
+\defbeamertemplate*{title}{gotham}{
+ %\raggedright% %%%%% COMMENT ADDED !
+ \linespread{1.0}
+ \inserttitle
+ \par
+ \vspace*{0.5em}
+}
+\defbeamertemplate*{subtitle}{gotham}{
+ %\raggedright% %%%%% COMMENT ADDED !
+ \insertsubtitle
+ \par
+ \vspace*{0.5em}
+}
+\defbeamertemplate*{author}{gotham}{
+ \vspace*{1.em}
+ \insertauthor
+ \par
+ \vspace*{0.25em}
+}
+\defbeamertemplate*{date}{gotham}{
+ \insertdate
+ \par
+}
+\defbeamertemplate*{institute}{gotham}{
+ \vspace*{3mm}
+ \insertinstitute
+ \par
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{variable}{\l__gotham_titleseparator_width_dim, \l__gotham_titleseparator_height_dim, \l__gotham_title_width_dim, \l__gotham_subtitle_width_dim, \l__gotham_title_max_width_dim}
+% Define the new lengths that will be used for titlepage templates.
+% \begin{macrocode}
+\dim_new:N \l__gotham_titleseparator_width_dim
+\dim_set:Nn \l__gotham_titleseparator_width_dim {\textwidth}
+\dim_new:N \l__gotham_titleseparator_height_dim
+\dim_set:Nn \l__gotham_titleseparator_height_dim {2pt}
+% \newlength{\titlewidth}
+% \newlength{\subtitlewidth}
+% \newlength{\maxwidth}
+\dim_new:N \l__gotham_title_width_dim
+\dim_new:N \l__gotham_subtitle_width_dim
+\dim_new:N \l__gotham_title_max_width_dim
+% \end{macrocode}
+% \end{variable}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{variable}{\defbeamertemplate*{title~separator}{gotham}}
+% Define a new template for ``line'' displayed on some titlepage templates.
+% \begin{macrocode}
+\defbeamertemplate*{title~separator}{gotham}{
+ \begin{tikzpicture}
+ % \fill[fg] (0,0) rectangle (\gotham@titleseparator@linewidth, \gotham@titleseparator@lineheight);
+ \fill[fg] (0,0) rectangle
+ (\dim_use:N \l__gotham_titleseparator_width_dim,
+ \dim_use:N \l__gotham_titleseparator_height_dim);
+ \end{tikzpicture}
+ \par
+}
+% \end{macrocode}
+% \end{variable}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{variable}{\gothamtitlepagelogo}
+% The command to insert the institute logo on title page.
+% This command is left empty by default, to be redefined by users
+% \end{variable}
+% \end{documentation}
+%%%%
+% \begin{implementation}
+% \begin{variable}{\gothamtitlepagelogo}
+% \UnitTested
+% \TestFiles{gotham-test-038}
+% \begin{macrocode}
+\providecommand{\gothamtitlepagelogo}{}
+% \end{macrocode}
+% \end{variable}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{variable}{\gothamtitlepagebg}
+% The command to insert the background title page
+% This command is left empty by default, to be redefined by users
+% \end{variable}
+% \end{documentation}
+%%%%%
+% \begin{implementation}
+% \begin{variable}{\gothamtitlepagebg}
+% \UnitTested
+% \TestFiles{gotham-test-038}
+% \begin{macrocode}
+\providecommand{\gothamtitlepagebg}{}
+% \end{macrocode}
+% \end{variable}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate{title~page}{gotham~normal}}
+% Template for the normal gotham title page.
+% Each element is only typeset if it is defined by the user.
+% If |\subtitle| is empty, for example, it won't leave a blank space on the title slide.
+% \UnitTested
+% \TestFiles{gotham-test-038}
+% \begin{macrocode}
+
+% Beamer's definition of |\insertauthor| is always nonempty, so we have to test another macro initialized by |\author{...}| to see if the user has defined an author.
+% This solution was suggested by Sam Carter in an answer to \href{https://tex.stackexchange.com/questions/241306/}{this Stack Exchange question}.
+
+\defbeamertemplate{title~page}{gotham~normal}{
+ \ifx\insertframetitle\@empty\else\vspace*{-3em}\fi
+ \begin{picture}(0,0)
+ % The text: title, author, institute, etc.
+ \put(-30,-125){\noindent
+ \fcolorbox{normal~text.bg}{normal~text.bg}{
+ \begin{minipage}[b][\paperheight]{\paperwidth}
+ \parbox[c][0pt][c]{0pt}{\gothamtitlepagebg}
+ \centering
+ \vfill
+ \ifx\inserttitle\@empty\else\usebeamertemplate*{title}\fi
+ \ifx\insertsubtitle\@empty\else\usebeamertemplate*{subtitle}\fi
+ \usebeamertemplate*{title~separator}
+ % from above patch
+ \expandafter\ifblank\expandafter{\beamer@andstripped}{
+ % empty author
+ \vspace*{1.em}
+ }{
+ \usebeamertemplate*{author}
+ }
+ % \ifx\insertauthor\empty Empty~Author\else TT \fi
+ \ifx\insertdate\@empty\else\usebeamertemplate*{date}\fi
+ \ifx\insertinstitute\@empty\else{\parbox{0.9\textwidth}{\raggedright\usebeamertemplate*{institute}} }\fi
+ \vfill
+ \vbox{}
+ \end{minipage}
+ }
+ % end third argument of fcolorobx
+ }
+
+ % the institute logo on title page
+ \put(234,-120){
+ \gothamtitlepagelogo
+ }
+
+ % the extra logos on title page (\inserttitlegraphic)
+ \put(-27,-123){
+ \noindent\vbox{
+ \begin{minipage}[b][0.96\paperheight]{0.899\textwidth}
+ \ifx\inserttitlegraphic\@empty\else\usebeamertemplate*{title~graphic}\fi
+ \end{minipage}
+ }
+ }
+ \end{picture}
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate{title~page}{gotham~reversed}}
+% With a similarly layout to gotham normal, but this template inverses the background and foreground colors compared to the color mode chose (dark, light or transparent).
+% \UnitTested
+% \TestFiles{gotham-test-038}
+% \begin{macrocode}
+\defbeamertemplate{title~page}{gotham~reversed}{
+ \begin{picture}(0,0)
+ % The background picture
+ \put(-28,-128){\gothamtitlepagebg}
+
+ % The text: title, author, institute, etc.
+ \put(-4,-125){\noindent
+ % \fcolorbox{declared-color-frame}{declared-color-background}{text}
+ \ifbool{darkBG}{
+ % Dark true
+ \setbeamercolor{normal~text}{fg=colorFG, }
+ \fcolorbox{colorPale}{colorPale}% reversed
+ }{
+ % Light
+ \setbeamercolor{normal~text}{fg=colorBG, }
+ \fcolorbox{colorTitlepage}{colorTitlepage}% reversed
+ }% end if
+ {
+ % begin third argument of fcolorobx
+ %\fcolorbox{normal~text.fg}{normal~text.fg}{
+ \begin{minipage}[b][\paperheight]{\textwidth}
+ \centering
+ \vfill
+ \ifx\inserttitle\@empty\else\usebeamertemplate*{title}\fi
+ \ifx\insertsubtitle\@empty\else\usebeamertemplate*{subtitle}\fi
+ \usebeamertemplate*{title~separator}
+ \expandafter\ifblank\expandafter{\beamer@andstripped}{
+ % empty author
+ \vspace*{1.em}
+ }{
+ \usebeamertemplate*{author}
+ }
+ \ifx\insertdate\@empty\else\usebeamertemplate*{date}\fi
+ \ifx\insertinstitute\@empty\else{\parbox{0.9\textwidth}{\raggedright\usebeamertemplate*{institute}} }\fi
+ \vfill
+ \vbox{}
+ \end{minipage}
+ }
+ % end third argument of fcolorobx
+ }
+
+ % the institute logo on title page
+ \put(234,-120){
+ \gothamtitlepagelogo
+ }
+
+ % the extra logos on title page (\inserttitlegraphic)
+ \put(-27,-123){
+ \noindent\vbox{
+ \begin{minipage}[b][0.96\paperheight]{0.899\textwidth}
+ \ifx\inserttitlegraphic\@empty\else\usebeamertemplate*{title~graphic}\fi
+ \end{minipage}
+ }
+ }
+ \end{picture}
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+
+% \begin{implementation}
+% \begin{macro}{defbeamertemplate{title~page}{gotham~dividedpic}}
+% This title page template is inspired from \url{https://github.com/LukasPietzschmann/awesome-beamer}
+% \UnitTested
+% \TestFiles{gotham-test-038}
+% \begin{macrocode}
+\defbeamertemplate{title~page}{gotham~dividedpic}{
+ \long\def\tmpEmpty{}
+ \def\titlecontent{\usebeamerfont{title}\usebeamercolor[fg]{title}\inserttitle}
+ \def\subtitlecontent{\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\insertsubtitle}
+ \settowidth\l__gotham_title_width_dim\titlecontent
+ \settowidth\l__gotham_subtitle_width_dim\subtitlecontent
+ \setlength\l__gotham_title_max_width_dim{\ifdim\l__gotham_title_width_dim>\l__gotham_subtitle_width_dim\l__gotham_title_width_dim\else\l__gotham_subtitle_width_dim\fi}
+ % \thispagestyle{navigation@titlepage}
+ \begin{minipage}{.55\textwidth}
+ \raggedright
+ \titlecontent\\
+ \subtitlecontent\\
+ % \textcolor{accent}{\rule{\ifdim\l__gotham_title_max_width_dim<.55\textwidth\l__gotham_title_max_width_dim\else.55\textwidth\fi}{\smile@linewidth}}\\[2em]
+ \textcolor{colorProgBar}{\rule{\ifdim\l__gotham_title_max_width_dim<.55\textwidth\l__gotham_title_max_width_dim\else.55\textwidth\fi}{\dim_use:N \l__gotham_titleseparator_height_dim}}\\[2em]
+ \usebeamerfont{author}\usebeamercolor[fg]{author}
+ \insertauthor\\
+ % \ifx\insertauthor\empty\else
+ \expandafter\ifblank\expandafter{\beamer@andstripped}{
+ % empty author
+ \vspace*{1.em}
+ }{
+ \usebeamerfont{author}\usebeamercolor[fg]{author}
+ \insertshortauthor
+ \vspace{2em}
+ }
+ % \fi
+ \ifx\insertinstitute\@empty\else{
+ \usebeamertemplate*{institute}\vspace{2em}
+ }\fi
+ \insertdate
+ \end{minipage}
+
+ % \ifdefined\@background
+ \begin{tikzpicture}[remember~picture, overlay]
+ \clip (current~page.south~east)
+ -- (current~page.north~east)
+ -- ++(-5.1, 0)
+ -- ++(-3, -\paperheight)
+ -- cycle;
+
+ \ifx\gothamtitlepagebg\tmpEmpty
+ \fill[
+ % path~fading=title~page~picture~fading,
+ % left~color=\ifbool{darkBG}{colorDark!200}{colorPale!100},
+ right~color=colorTitlepage!100,%\ifbool{darkBG}{colorPale!100}{colorDark!100},
+ % fading~angle=-15,
+ ]
+ (current~page.south~east)
+ rectangle
+ ++(\dimexpr-0.55\paperwidth, \dimexpr\paperheight+1cm);
+ \else
+ \node[
+ anchor=south~east,
+ inner~sep=0,
+ outer~sep=0
+ ] at (current~page.south~east) {
+ % \includegraphics[height=\paperheight]{\@background}
+ \gothamtitlepagebg
+ };
+ \fi
+ \end{tikzpicture}
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+
+% \begin{implementation}
+% \begin{macro}{defbeamertemplate{title~page}{gotham~splitvert}}
+% This title page template is inspired from \url{https://github.com/pcafrica/focus-beamertheme}
+% \UnitTested
+% \TestFiles{gotham-test-038}
+% \begin{macrocode}
+\defbeamertemplate{title~page}{gotham~splitvert}{
+ % \IfEmpty{\insertframetitle}{
+ \ifx\beamer@frametitle\@empty
+ \vspace*{-0.5\paperheight}
+ \else %}{
+ \vspace*{-0.63\paperheight}
+ \fi %}
+ {
+ \usebeamercolor{frametitle}\colorlet{gotham@@tempColor}{bg}%
+ \begin{tikzpicture}[overlay, remember~picture]
+ \fill[color=gotham@@tempColor] (current~page.north~west) rectangle ([shift = {(0, -0.45\paperheight)}] current~page.north~east);
+ \end{tikzpicture}
+ }
+
+ % \vspace*{-1.65\baselineskip}
+ \begin{minipage}[b][0.35\paperheight]{\textwidth}
+ % \vspace{\baselineskip}
+ \usebeamerfont{title}
+ \usebeamercolor[fg]{frametitle}
+ \inserttitle
+ \end{minipage}
+
+ \newline
+ \begin{minipage}[t][0.1\paperheight]{\textwidth}
+ \usebeamerfont{subtitle}
+ \usebeamercolor[fg]{frametitle}
+ \insertsubtitle
+ \end{minipage}
+
+ % Set the title graphic in a zero-height box, so that
+ % the position of other elements is not affected.
+ \ifx\inserttitlegraphic\@empty\else
+ \newline
+ \vspace*{-1.65\baselineskip}
+ % {\vfuzz=9999pt\vbox~to~0pt {
+ {\parbox[c][0pt][c]{\textwidth}{
+ \raggedleft
+ \inserttitlegraphic
+ % \usebeamertemplate*{title~graphic}
+ }}
+ \fi
+
+ % \ifx\insertauthor\empty\else
+ \expandafter\ifblank\expandafter{\beamer@andstripped}{
+ % empty author
+ \vspace*{1.em}
+ }{
+ \newline
+ \begin{minipage}[t]{\textwidth}
+ % \usebeamercolor{normal~text}
+ % \usebeamerfont{author}
+ % \insertauthor
+ \vspace*{-1.5\baselineskip}
+ \usebeamertemplate*{author}
+ \end{minipage}
+ }
+ % \fi
+
+ \ifx\insertinstitute\@empty\else
+ \newline
+ \vspace*{-1.65\baselineskip}
+ \begin{minipage}[t]{\textwidth}
+ % \usebeamerfont{institute}
+ % \insertinstitute
+ \usebeamertemplate*{institute}
+ \end{minipage}
+ \fi
+
+ \ifx\insertdate\@empty\else
+ \newline
+ \begin{minipage}[t]{\textwidth}
+ \vspace*{2.65\baselineskip}
+ % \usebeamerfont{date}
+ % \insertdate
+ \usebeamertemplate*{date}
+ \end{minipage}
+ \vspace*{-3.15\baselineskip}
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+
+% \begin{documentation}
+% \begin{function}{\__gotham_set_template:nn}
+% \begin{syntax}
+% \cs{__gotham_set_template:nn} \marg{element} \marg{option}
+% \end{syntax}
+% Function that test if a beamertemplate with the given element and option name exists. If it exists then it is set (applied), otherwise an error is raised.
+% \end{function}
+% \end{documentation}
+%%%%%%
+% \begin{implementation}
+% \begin{function}{\__gotham_set_template:nn}
+% \begin{arguments}
+% \item element name (from beamer doc) in other word, the name the template category
+% \item prefined option (from beamer doc)
+% \end{arguments}
+% Function to set a beamertemplate with an option if it exists, otherwise an error is raised.
+% Unfortunatly, (as far as I know) it not possible to test if the element name exists independtly from the prefined option.
+% \TestFiles{gotham-test-038}
+% \begin{macrocode}
+\cs_if_exist:NTF \__gotham_set_template:nn {}{
+ % If it doesn't exist, then create it.
+
+ % Define the command to set template if it exists.
+ \cs_new_protected:Nn \__gotham_set_template:nn
+ {
+ \cs_if_exist:cTF {beamer@@tmpop@#1@#2} {
+ \setbeamertemplate{#1}[#2]
+ }{
+ \PackageError{beamerinnerthemegotham}
+ {The~beamer~template~named~'#1'~with~the~option~'#2'~does~not~exist}
+ {helping~message unknown setbeamertemplate option}
+ }
+ }
+}
+% \end{macrocode}
+% \end{function}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{function}{\useinnertheme}
+% \begin{syntax}
+% \cs{useinnertheme}\oarg{option1=value1, ...}\marg{gotham}
+% \textrm{where the options are (default marked as} \defopt{default}\textrm{):}
+% \meta{title page} = \oarg{\defopt{gotham normal} \textbar gotham splitvert \textbar gotham dividedpic \textbar gotham reversed}
+% \end{syntax}
+% The 'package' (useinnertheme) options can set different title page templates.
+% \end{function}
+% \end{documentation}
+%%%%
+% \begin{implementation}
+% \begin{macro}{inner key -- interface}
+% Controls for the title page templates.
+% \UnitTested
+% \TestFiles{gotham-test-038}
+% \begin{macrocode}
+\keys_define:nn { gotham / inner }
+{
+ % title~page
+ title~page .usage:n = { general },
+ title~page .default:n = { gotham~normal },
+ title~page .code:n = { \__gotham_set_template:nn{title~page}{#1} },
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+
+
+%% Backgrounds %%%
+%%%%%%%%%%%%%%%%%%
+
+% \begin{implementation}
+% \begin{macrocode}
+% Background lengths
+% \newlength{\imageBGoffset}
+% \setlength{\imageBGoffset}{\paperwidth}
+% \addtolength{\imageBGoffset}{-8.5mm}
+% \end{macrocode}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{variable}{\l__gotham_template_name_prop}
+% Dictionary/map of template elements and predefined option according to the context.
+% Naming convention: template/What/Who, i.e. Name: key=background~canvas/watermark, value = gotham~draft
+% \end{variable}
+% \end{documentation}
+%%%%%%
+% \begin{implementation}
+% \begin{variable}{\l__gotham_template_name_prop}
+% Dictionary/map of template elements and predefined option according to the context.
+% Naming convention: template/What/Who, i.e. Name: key=background~canvas/watermark, value = gotham~draft
+% \begin{macrocode}
+\prop_if_exist:NTF \l__gotham_template_name_prop
+{}{
+ % if not defined than define it.
+ \prop_new:N \l__gotham_template_name_prop
+}
+% \end{macrocode}
+% \end{variable}
+% \end{implementation}
+
+
+% \begin{documentation}
+% \begin{function}{\defbeamertemplate{background}{name}{def}}
+% \begin{syntax}
+% \cs{defbeamertemplate} \marg{background canvas} \marg{chosen name} \marg{definition}
+% \end{syntax}
+% The |background canvas| and the |background| beamer templates can be redifined by users if wanted/needed.
+% By default these templates are empty (except the color in background canvas when it not transparent).
+% \end{function}
+% \end{documentation}
+%%%%%%
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate{background~canvas}{empty}{def}}
+% empty background canvas that contains color, that can be used to reset background.
+% \UnitTested
+% \TestFiles{gotham-test-038}
+% \begin{macrocode}
+\defbeamertemplate{background~canvas}{empty}{% empty background style has a color.
+ % \ifbeamercolorempty[bg]{background}{}{\color{bg}\vrule width\paperwidth height\paperheight}% copied beamer default here
+ \hspace*{28pt}
+ \begin{beamercolorbox}[wd=\paperwidth,
+ ht=\paperheight,
+ ]{background}
+ % nothing to write, only a background color
+ \end{beamercolorbox}
+}%
+\defbeamertemplate{background}{empty}{}%
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate{background}{watermark/gotham~draft}{def}}
+% Background that contains a watermakr stamp with the word: DRAFT.
+% \UnitTested
+% \TestFiles{gotham-test-038}
+% \begin{macrocode}
+\defbeamertemplate{background}{watermark/gotham~draft}{
+ \begin{tikzpicture}[overlay,remember~picture]
+ \node[color=red, opacity=0.3, scale=5, rotate=45] at ([shift={(0,0)}]current~page.center) {DRAFT};
+ \end{tikzpicture}
+}
+% Add the template to the prop (dictionary)
+\prop_put:Nnn \l__gotham_template_name_prop {background/watermark} {gotham~draft}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{function}{\__gotham_add_beamerframe_key:n}
+% \begin{arguments}
+% \item Name of the option to add, this name should also correspond to the name of the environment followed by the suffix 'env'.
+% \end{arguments}
+% Function to add an option of a frame using an environment.
+% For example, if the name 'optionA' is the argument given to the function, an frame option named 'optionA' will be added, and this option will surround the frame with the environment named 'optionAenv'.
+% So, the environment 'optionA' must have been declared before.
+% \TestFiles{gotham-test-038}
+% \begin{macrocode}
+\seq_if_exist:NTF \l__gotham_frameoption_tmp_seq {}{
+ % Define the sequence of frameoptions environments to close
+ \seq_new:N \l__gotham_frameoption_tmp_seq
+}
+
+\cs_if_exist:NTF \__gotham_add_beamerframe_key:n {}{
+ % if it doesn't exist, then create it.
+
+ % Define the command to add frameoptions
+ \cs_new_protected:Nn \__gotham_add_beamerframe_key:n {
+ \define@key{beamerframe}{ #1 }[true]{
+ \begin{#1env}
+ \seq_put_left:Nn \l__gotham_frameoption_tmp_seq { \end{#1env} }
+ }
+ }
+
+ % At the end of frames close the opened environments.
+ \apptocmd{\beamer@reseteecodes}{
+ % Join elements in the queue without separator then output the result
+ \seq_use:Nn \l__gotham_frameoption_tmp_seq {}
+ % clear working queue
+ \seq_clear:N \l__gotham_frameoption_tmp_seq
+ }{}{}
+}
+% \end{macrocode}
+% \end{function}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{function}{\begin{frame}[noBGC]}
+% Add a frame option |noBGC| to display an empty background canvas.
+% \end{function}
+% \end{documentation}
+%%%%%%
+% \begin{implementation}
+% \begin{macro}{\begin{frame}[noBCG]}
+% Add a frame option |noBGC| to display an empty background canvas.
+% To do it, we must add a global boolean variable, capture the option at the begin of the frame and patch the end of the frame.
+% \UnitTested
+% \TestFiles{gotham-test-038}
+% \begin{macrocode}
+
+\newenvironment{noBGCenv}{
+ \setbeamertemplate{background~canvas}[empty]
+}{}
+\__gotham_add_beamerframe_key:n {noBGC}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{variable}{\l_gotham_defaultWatermark}
+% Boolean to triggering if watermark should be displayed by default (without giving the frame option).
+% The variable is |false| by default.
+% \end{variable}
+% \end{documentation}
+%%%%%%
+% \begin{implementation}
+% \begin{macro}{\l_gotham_defaultWatermark}
+% Boolean variable to display the watermark by default (or not).
+% \UnitTested
+% \TestFiles{gotham-test-038}
+% \begin{macrocode}
+\bool_new:N \l_gotham_defaultWatermark
+\bool_set_false:N \l_gotham_defaultWatermark
+% At every new frame, reset the options to default (unless some options/keys are given)
+\BeforeBeginEnvironment{frame}{
+ \bool_if:NTF \l_gotham_defaultWatermark {
+ \setbeamertemplate{background}[watermark/\prop_item:Nn \l__gotham_template_name_prop {background/watermark}]
+ }{% false
+ \setbeamertemplate{background}[empty]
+ }
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{function}{\begin{frame}[watermark]}
+% Add a frame option |watermark| to display watermark in background.
+% \end{function}
+% \end{documentation}
+%%%%%%
+% \begin{implementation}
+% \begin{macro}{\begin{frame}[watermark]}
+% Add a frame option |watermark| to display an empty background canvas.
+% To do it, we must add a global boolean variable, capture the option at the begin of the frame and patch the end of the frame.
+% \UnitTested
+% \TestFiles{gotham-test-038}
+% \begin{macrocode}
+% bool to trigger the add of watermark in background
+\newenvironment{watermarkenv}{
+ \setbeamertemplate{background}[
+ watermark/\prop_item:Nn \l__gotham_template_name_prop {background/watermark}
+ ]
+}{}
+\__gotham_add_beamerframe_key:n {watermark}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{function}{\begin{frame}[nowatermark]}
+% Add a frame option |nowatermark| to do not display nowatermark in background.
+% \end{function}
+% \end{documentation}
+%%%%%%
+% \begin{implementation}
+% \begin{macro}{\begin{frame}[nowatermark]}
+% Add a frame option |nowatermark| to do not display an empty background canvas.
+% To do it, we must add a global boolean variable, capture the option at the begin of the frame and patch the end of the frame.
+% \UnitTested
+% \TestFiles{gotham-test-038}
+% \begin{macrocode}
+% bool to trigger the add of nowatermark in background
+\newenvironment{nowatermarkenv}{
+ \setbeamertemplate{background}[empty]
+}{}
+\__gotham_add_beamerframe_key:n {nowatermark}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{variable}{\l__gotham_tmpa_seq, \l__gotham_tmpa_tl, \l__gotham_tmpb_tl}
+% tmp variables
+% \begin{macrocode}
+\seq_if_exist:NTF \l__gotham_tmpa_seq
+{}{
+ % sequence
+ \seq_new:N \l__gotham_tmpa_seq
+}
+\tl_if_exist:NTF \l__gotham_tmpa_tl
+{}{
+ % token list A
+ \tl_new:N \l__gotham_tmpa_tl
+}
+\tl_if_exist:NTF \l__gotham_tmpb_tl
+{}{
+ % token list B
+ \tl_new:N \l__gotham_tmpb_tl
+}
+% \end{macrocode}
+% \end{variable}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{function}{\__gotham_set_prop_template:nn}
+% \begin{arguments}
+% \item element name (from beamer doc) in other word, the name the template category
+% \item prefined option (from beamer doc)
+% \end{arguments}
+% Function that store in a map the name a template use later.
+% The following naming convention is used: Template/What/Who~Name: watermark/gotham~draft.
+% The means for example that if a beamer template is defined using
+% |\defbeamertemplate{background}{watermark/gotham~draft}{...}|,
+% then the function has to be call using
+% |\__gotham_set_prop_template{background/watermark}{gotham~draft}|,
+% that will filled internally the map using the l3 command
+% |\prop_put:Nnn \l__gotham_template_name_prop {background/watermark}{gotham~draft}|.
+% If the template name given as input does not exist, an error is raised.
+% \TestFiles{gotham-test-039}
+% \begin{macrocode}
+\cs_if_exist:NTF \__gotham_set_prop_template:nn {}{
+ % if it doesn't exist, then create it.
+ \cs_new_protected:Nn \__gotham_set_prop_template:nn
+ {
+ % Check if the first argument contains a /
+ \tl_if_in:nnTF { #1 } { / }
+ {
+ % Split the first around the /
+ \seq_set_split:Nnn \l__gotham_tmpa_seq { / } { #1 }
+ \tl_set:Nn \l__gotham_tmpa_tl { \seq_item:Nn \l__gotham_tmpa_seq { 1 } }
+ \tl_set:Nn \l__gotham_tmpb_tl { \seq_item:Nn \l__gotham_tmpa_seq { 2 } }
+ % Check if template exist
+ \cs_if_exist:cTF {beamer@@tmpop@\exp_not:V \l__gotham_tmpa_tl @\exp_not:V \l__gotham_tmpb_tl /#2} {
+ % set the value in the map, so it can be called later.
+ \prop_put:Nnn \l__gotham_template_name_prop {#1} {#2}
+ % \setbeamertemplate{#1}[#2]
+ }{
+ \PackageError{beamerthemegotham}
+ {The~beamer~template~named~'\l__gotham_tmpa_tl'~with~the~option~'\l__gotham_tmpb_tl/#2'~does~not~exist}
+ {helping~message}
+ }
+ }{% false -> error
+ \PackageError{beamerthemegotham}
+ {%
+ When~using~'\c_backslash_str\cs_to_str:N \__gotham_set_prop_template'~the~first~argument~should~contain~a~'/'~to~respect~the~naming~convention~used~(Template/what/Who~name),~but~you~gave~'#1'.~
+ As~example:~if~'\c_backslash_str defbeamertemplate{background}{watermark/gotham~draft}'...,~then~use~'\c_backslash_str\cs_to_str:N \__gotham_set_prop_template{background/watermark}{gotham~draft}'
+ }{helping~message}
+ }
+ }
+}
+% \end{macrocode}
+% \end{function}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{function}{\useinnertheme}
+% \begin{syntax}
+% \cs{useinnertheme}\oarg{option1=value1, ...}\marg{gotham}
+% \textrm{where the options are (default marked as} \defopt{default}\textrm{):}
+% \meta{watermark default} = \oarg{\defopt{off} \textbar on }
+% \meta{watermark template} = \oarg{\defopt{gotham draft} \textbar ...}
+% \end{syntax}
+% The 'package' (useinnertheme) options can control |background| (and |background canvas|) templates according to situations.
+% Block environments such as |theorem| and |example| have no background color by default.
+% The option |watermark default=on| can enable the |watermark template| on every frame; but it can still be turned off for specific frames when using the frame option |nowatermark|.
+% \end{function}
+% \end{documentation}
+%%%%
+% \begin{implementation}
+% \begin{macro}{inner key -- interface}
+% Controls the inner settings for background and watermark).
+% \UnitTested
+% \TestFiles{gotham-test-037}
+% \begin{macrocode}
+\keys_define:nn { gotham / inner }{
+ % watermark template
+ watermark~template .usage:n = { general },
+ watermark~template .default:n = { gotham~draft },
+ watermark~template .code:n = { \__gotham_set_prop_template:nn{background/watermark}{#1} },
+}
+\keys_define:nn { gotham / inner }{
+ % watermark default
+ watermark~default .choice:,
+ watermark~default .usage:n = { general },
+ watermark~default .default:n = { false },
+
+ watermark~default / true .code:n = { \bool_set_true:N \l_gotham_defaultWatermark },
+ watermark~default / on .code:n = { \bool_set_true:N \l_gotham_defaultWatermark },
+ watermark~default / enable .code:n = { \bool_set_true:N \l_gotham_defaultWatermark },
+
+ watermark~default / false .code:n = { \bool_set_false:N \l_gotham_defaultWatermark },
+ watermark~default / off .code:n = { \bool_set_false:N \l_gotham_defaultWatermark },
+ watermark~default / disable .code:n = { \bool_set_false:N \l_gotham_defaultWatermark },
+
+ watermark~default / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'#1'~is~unknown~for~the~(known)~option~'watermark~default',~so~being~ignored. }{helping~message: watermark~default / unknown} },
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+
+%%%% Stand IN/OUT %%%%
+%%%%%%%%%%%%%%%%%%%%%%%%
+
+% \begin{documentation}
+% \begin{function}{\begin{frame}[c]}
+% Add a frame option |c| for enhanced vertically centered text in the frame.
+% \end{function}
+% \end{documentation}
+%%%%%%
+% \begin{implementation}
+% \begin{macro}{\begin{frame}[c]}
+% Add a frame option |c| for improved vertically centered text in the frame.
+% By default, Beamer frames offer the |c| option to \textit{almost} vertically center the text, but the placement is a little too high.
+% To fix this, we redefine the |c| option to equalize |\beamer@frametopskip| and |\beamer@framebottomskip|.
+% This solution was suggested by Enrico Gregorio in an answer to \href{http://tex.stackexchange.com/questions/247826/}{this Stack Exchange question}.
+% \UnitTested
+% \TestFiles{gotham-test-039}
+% \begin{macrocode}
+\define@key{beamerframe}{c}[true]{
+ \beamer@frametopskip=0pt~plus~1fill\relax
+ \beamer@framebottomskip=0pt~plus~1fill\relax
+ \beamer@frametopskipautobreak=0pt~plus~.4\paperheight\relax
+ \beamer@framebottomskipautobreak=0pt~plus~.6\paperheight\relax
+ \def\beamer@initfirstlineunskip{}
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate{background~canvas}{standout/gotham}}
+% Definition of the background canvas template used by the standout frame of gotham theme.
+% \UnitTested
+% \TestFiles{gotham-test-040}
+% \begin{macrocode}
+\defbeamertemplate{background~canvas}{standout/gotham}{
+ % copied from beamer default
+ \ifbeamercolorempty[bg]{standout}{
+ % if the background standout color is transparent, do nothing.
+ }{
+ \usebeamercolor[bg]{standout}\color{bg}
+ \vrule~width\paperwidth~height\paperheight
+ }
+}
+% Add the template to the prop (dictionary) of background template to use according to the situation
+\prop_put:Nnn \l__gotham_template_name_prop {background~canvas/standout} {gotham}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate{standout}{gotham}}
+% Definition of the standout template used by the standout frame of gotham theme.
+% This includes background canvas template, fonts and colors.
+% \UnitTested
+% \TestFiles{gotham-test-040}
+% \begin{macrocode}
+\defbeamertemplate*{standout}{gotham}{%
+ %
+ % \setkeys{beamerframe}{c}
+ % \setkeys{beamerframe}{noframenumbering}
+ % \centering
+
+ \setbeamertemplate{background~canvas}[standout/\prop_item:Nn \l__gotham_template_name_prop {background~canvas/standout}]
+ % \usebeamertemplate{background~canvas}%[standout/gotham]
+ \usebeamerfont{standout}
+ % if the background color is switched, then change foreground (font) color.
+ \ifbeamercolorempty[bg]{palette~primary}{
+ %true : empty background (transparent)
+ \setbeamercolor{background~canvas}{
+ use=palette~primary,
+ bg=palette~primary.fg
+ }
+ }{
+ %false : background not empty (dark or light)
+ \setbeamercolor{background~canvas}{
+ use=palette~primary,
+ bg=palette~primary.bg
+ }
+ }
+ \setbeamercolor{local~structure}{
+ fg=palette~primary.bg
+ }
+ \usebeamercolor[fg]{palette~primary}
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{function}{\begin{frame}[standout]}
+% Add a frame option |standout| to display the standout frame template.
+% \end{function}
+% \end{documentation}
+%%%%%%
+% \begin{implementation}
+% \begin{macro}{\begin{frame}[standout]}
+% Add a frame option |standout| to display the standout frame template.
+% To do it, we must add a global boolean variable, capture the option at the begin of the frame and patch the end of the frame.
+% \UnitTested
+% \TestFiles{gotham-test-040}
+% \begin{macrocode}
+\newenvironment{standoutenv}{
+ \usebeamertemplate{standout}
+}{}
+\__gotham_add_beamerframe_key:n {standout}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate{background~canvas}{standin/gotham}}
+% Definition of the background canvas template used by the standin frame of gotham theme.
+% \UnitTested
+% \TestFiles{gotham-test-040}
+% \begin{macrocode}
+\defbeamertemplate{background~canvas}{standin/gotham}{
+ \ifbeamercolorempty[bg]{standin}{
+ % if the background standin color is transparent, do nothing.
+ }{
+ % Uncomment this if-condition to have a 'light' background in 'transparent' color-mode.
+ \ifbool{transparentBG}{
+ % \color{} is not possible so, it is better to do nothing for transparent bg than creating a transparent vrule.
+ }{
+ \usebeamercolor[bg]{standin}\color{bg}
+ \vrule~width\paperwidth~height\paperheight
+ }
+ }
+}
+% Add the template to the prop (dictionary) of background template to use according to the situation
+\prop_put:Nnn \l__gotham_template_name_prop {background~canvas/standin} {gotham}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate{standout}{gotham}}
+% Definition of the standout template used by the standout frame of gotham theme.
+% This includes background canvas template, fonts and colors.
+% \UnitTested
+% \TestFiles{gotham-test-040}
+% \begin{macrocode}
+\defbeamertemplate*{standin}{gotham}{
+ %
+ % \setkeys{beamerframe}{c}
+ % \setkeys{beamerframe}{noframenumbering}
+ % \centering
+ \setbeamertemplate{background~canvas}[standin/\prop_item:Nn \l__gotham_template_name_prop {background~canvas/standin}]
+ % \usebeamertemplate{background~canvas}%[standin/gotham]
+ \usebeamerfont{standin}
+ %
+ % Uncomment this if-condition to have a 'light' frametitle in 'transparent' color-mode.
+ % \ifbeamercolorempty[bg]{normal~text}{
+ % %true : empty background (transparent)
+ % \setbeamercolor{frametitle}{
+ % use=normal~text,
+ % bg=colorBG,
+ % fg=normal~text.fg
+ % }
+ % }{
+ % false
+ \setbeamercolor{frametitle}{
+ use=normal~text,
+ bg=normal~text.bg,
+ fg=normal~text.fg
+ }
+ % }
+ % \setbeamercolor{frametitle}{
+ % use=normal~text,
+ % bg=normal~text.bg,
+ % fg=normal~text.fg
+ % }
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{function}{\begin{frame}[standin]}
+% Add a frame option |standin| to display the standin frame template.
+% \end{function}
+% \end{documentation}
+%%%%%%
+% \begin{implementation}
+% \begin{macro}{\begin{frame}[standin]}
+% Add a frame option |standin| to display the standin frame template.
+% To do it, we must add a global boolean variable, capture the option at the begin of the frame and patch the end of the frame.
+% \UnitTested
+% \TestFiles{gotham-test-040}
+% \begin{macrocode}
+\newenvironment{standinenv}{
+ \usebeamertemplate{standin}
+}{}
+\__gotham_add_beamerframe_key:n {standin}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{function}{\useinnertheme}
+% \begin{syntax}
+% \cs{useinnertheme}\oarg{option1=value1, ...}\marg{gotham}
+% \textrm{where the options are (default marked as} \defopt{default}\textrm{):}
+% \meta{standin template} = \oarg{\defopt{gotham} \textbar ...}
+% \meta{standout template} = \oarg{\defopt{gotham} \textbar ...}
+% \end{syntax}
+% The 'package' (useinnertheme) options can control |standout| (and |standin|) templates.
+% These templates are activated when giving the frame option |\begin{frame}[standin]| and |standout|.
+% \end{function}
+% \end{documentation}
+%%%%
+% \begin{implementation}
+% \begin{macro}{inner key -- interface}
+% Controls the inner settings for standout and standin.
+% \UnitTested
+% \TestFiles{gotham-test-037}
+% \begin{macrocode}
+\keys_define:nn { gotham / inner }
+{
+ % standout template
+ standout~template .usage:n = { general },
+ standout~template .default:n = { gotham },
+ standout~template .code:n = { \__gotham_set_prop_template:nn{background~canvas/standout}{#1} },
+}
+\keys_define:nn { gotham / inner }
+{
+ % standin template
+ standin~template .usage:n = { general },
+ standin~template .default:n = { gotham },
+ standin~template .code:n = { \__gotham_set_prop_template:nn{background~canvas/standin}{#1} },
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+
+%%%% Sections %%%%
+%%%%%%%%%%%%%%%%%%%%%%%
+
+% \begin{documentation}
+% \begin{function}{\begin{frame}[part]}
+% Add a frame option |part| to display the part frame template.
+% \end{function}
+% \end{documentation}
+%%%%%%
+% \begin{implementation}
+% \begin{macro}{\begin{frame}[part]}
+% Add a frame option |part| to display the part frame template.
+% To do it, we must add a global boolean variable, capture the option at the begin of the frame and patch the end of the frame.
+% \UnitTested
+% \TestFiles{gotham-test-041}
+% \begin{macrocode}
+\bool_new:N \l_gotham_partframe
+\bool_set_false:N \l_gotham_partframe
+\define@key{beamerframe}{part}[true]{
+ \bool_set_true:N \l_gotham_partframe
+ \begingroup
+ \usebeamertemplate{part~frame}
+}
+\apptocmd{\beamer@reseteecodes}{
+ \bool_if:NTF \l_gotham_partframe {
+ \endgroup
+ \bool_set_false:N \l_gotham_partframe
+ }{}
+}{}{}
+% \define@key{beamerframe}{part}[true]{
+% \thispagestyle{navigation@part}
+% }
+% \def\ps@navigation@part{
+% \usebeamertemplate{part~frame}
+% \@nameuse{ps@navigation}
+% }
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{function}{\begin{frame}[section]}
+% Add a frame option |section| to display the section frame template.
+% \end{function}
+% \end{documentation}
+%%%%%%
+% \begin{implementation}
+% \begin{macro}{\begin{frame}[section]}
+% Add a frame option |section| to display the section frame template.
+% To do it, we must add a global boolean variable, capture the option at the begin of the frame and patch the end of the frame.
+% \UnitTested
+% \TestFiles{gotham-test-041}
+% \begin{macrocode}
+\bool_new:N \l_gotham_sectionframe
+\bool_set_false:N \l_gotham_sectionframe
+\define@key{beamerframe}{section}[true]{
+ \bool_set_true:N \l_gotham_sectionframe
+ \begingroup
+ \usebeamertemplate{section~frame}
+}
+\apptocmd{\beamer@reseteecodes}{
+ \bool_if:NTF \l_gotham_sectionframe {
+ \endgroup
+ \bool_set_false:N \l_gotham_sectionframe
+ }{}
+}{}{}
+% \define@key{beamerframe}{section}[true]{
+% \thispagestyle{navigation@section}
+% }
+% \def\ps@navigation@section{
+% \usebeamertemplate{section~frame}
+% \@nameuse{ps@navigation}
+% }
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{function}{\begin{frame}[subsection]}
+% Add a frame option |subsection| to display the subsection frame template.
+% \end{function}
+% \end{documentation}
+%%%%%%
+% \begin{implementation}
+% \begin{macro}{\begin{frame}[subsection]}
+% Add a frame option |subsection| to display the subsection frame template.
+% To do it, we must add a global boolean variable, capture the option at the begin of the frame and patch the end of the frame.
+% \UnitTested
+% \TestFiles{gotham-test-041}
+% \begin{macrocode}
+\bool_new:N \l_gotham_subsectionframe
+\bool_set_false:N \l_gotham_subsectionframe
+\define@key{beamerframe}{subsec}[true]{
+ \bool_set_true:N \l_gotham_subsectionframe
+ \begingroup
+ \usebeamertemplate{subsection~frame}
+}
+\apptocmd{\beamer@reseteecodes}{
+ \bool_if:NTF \l_gotham_subsectionframe {
+ \endgroup
+ \bool_set_false:N \l_gotham_subsectionframe
+ }{}
+}{}{}
+% \define@key{beamerframe}{subsec}[true]{
+% \thispagestyle{navigation@subsec}
+% }
+% \def\ps@navigation@subsec{
+% \usebeamertemplate{subsection~frame}
+% \@nameuse{ps@navigation}
+% }
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{function}{\begin{frame}[subsubsection]}
+% Add a frame option |subsubsection| to display the subsubsection frame template.
+% \end{function}
+% \end{documentation}
+%%%%%%
+% \begin{implementation}
+% \begin{macro}{\begin{frame}[subsubsection]}
+% Add a frame option |subsubsection| to display the subsubsection frame template.
+% To do it, we must add a global boolean variable, capture the option at the begin of the frame and patch the end of the frame.
+% \UnitTested
+% \TestFiles{gotham-test-041}
+% \begin{macrocode}
+\bool_new:N \l_gotham_subsubsectionframe
+\bool_set_false:N \l_gotham_subsubsectionframe
+\define@key{beamerframe}{subsubsec}[true]{
+ \bool_set_true:N \l_gotham_subsubsectionframe
+ \begingroup
+ \usebeamertemplate{subsubsection~frame}
+}
+\apptocmd{\beamer@reseteecodes}{
+ \bool_if:NTF \l_gotham_subsubsectionframe {
+ \endgroup
+ \bool_set_false:N \l_gotham_subsubsectionframe
+ }{}
+}{}{}
+% \define@key{beamerframe}{subsubsec}[true]{
+% \thispagestyle{navigation@subsubsec}
+% }
+% \def\ps@navigation@subsubsec{
+% \usebeamertemplate{subsubsection~frame}
+% \@nameuse{ps@navigation}
+% }
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{variable}{\partContentName, \secContentName, \subsecContentName}
+% Commands containing the 'table of contents' title for part, section and subection (if theses ToC frames are enabled).
+% An option for subsubsection is not useful (at least up to understanding of the moment) because we do not display frame with the content of a subsubsection since it is the small unity we are working with.
+% \end{variable}
+% \end{documentation}
+%%%%%%
+% \begin{implementation}
+% \begin{variable}{\providebool{partContent}, \partContentName}
+% Boolean variable to enable the table of contents of the part, and the command containing the 'table of contents' title.
+% \begin{macrocode}
+% repeated from BeamerExtra
+\providebool{partContent}
+\booltrue{partContent}
+\providecommand{\partContentName}{Part~content}
+% \end{macrocode}
+% \end{variable}
+% \end{implementation}
+% \begin{implementation}
+% \begin{variable}{\providebool{secContent}, \secContentName}
+% Boolean variable to enable the table of contents of the section, and the command containing the 'table of contents' title.
+% \begin{macrocode}
+\providebool{sectionContent}
+\booltrue{sectionContent}
+\providecommand{\secContentName}{Section~content}
+% \end{macrocode}
+% \end{variable}
+% \end{implementation}
+% \begin{implementation}
+% \begin{variable}{\providebool{subsectionContent}, \subsecContentName}
+% Boolean variable to enable the table of contents of the subsection, and the command containing the 'table of contents' title.
+% \begin{macrocode}
+\providebool{subsectionContent}
+\booltrue{subsectionContent}
+\providecommand{\subsecContentName}{Subsection~content}
+% Subsubsection is not useful (at least up to understanding of the moment) because we do not display frame with the content of a subsubsection since it is the small unity we are working with.
+% \end{macrocode}
+% \end{variable}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate{part~title}{gotham}, \defbeamertemplate{section~title}{gotham}, \defbeamertemplate{subsection~title}{gotham}, \defbeamertemplate{subsection~title}{gotham}}
+% Definitions of templates controling how will appear the name/title of the parts, sections, subsections and subsubsections.
+% \UnitTested
+% \TestFiles{gotham-test-041}
+% \begin{macrocode}
+\def\partname{\translate{Part}}
+\defbeamertemplate*{part~title}{gotham}{
+ \usebeamercolor[fg]{part~title}
+ \usebeamerfont{part~title}
+ \partname \ \insertromanpartnumber
+ \\[1.75ex]
+ \insertpart
+}
+\defbeamertemplate*{section~title}{gotham}{
+ \usebeamercolor[fg]{section~title}
+ \usebeamerfont{section~title}
+ \insertsectionnumber.~
+ \insertsectionhead
+}
+\defbeamertemplate*{subsection~title}{gotham}{
+ \usebeamercolor[fg]{subsection~title}
+ \usebeamerfont{subsection~title}
+ \insertsectionnumber.\insertsubsectionnumber.~
+ \insertsubsectionhead
+}
+\def\subsubsectionname{\translate{Subsubsection}}
+\def\insertsubsubsectionnumber{\arabic{subsubsection}}
+\def\subsubsectionpage{\usebeamertemplate*{subsubsection~page}}
+\defbeamertemplate*{subsubsection~title}{gotham}{
+ \usebeamercolor[fg]{subsubsection~title}
+ \usebeamerfont{subsubsection~title}
+ \insertsectionnumber.\insertsubsectionnumber.\insertsubsubsectionnumber.~
+ \insertsubsubsectionhead
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{function}{\__gotham_inner_disable_partpage:, \__gotham_inner_enable_partpage:}
+% Commands to disable or enable the display of a 'part page' frame at the begining of every new part.
+% It replaces the |\newcommand{\gotham@disablepartpage}| and | \newcommand{\gotham@enablepartpage}|
+% \TestFiles{gotham-test-041}
+% \begin{macrocode}
+\cs_new_protected:Nn \__gotham_inner_disable_partpage:
+{
+ \AtBeginPart{
+ % intentionally empty
+ }
+}
+
+\cs_new_protected:Nn \__gotham_inner_enable_partpage:
+{
+ \AtBeginPart{
+ \ifbeamer@inframe
+ \partpage
+ \else
+ \frame[c, noframenumbering, part]{\partpage}
+ \fi
+
+ \ifbool{partContent}{
+ % true
+ \begin{frame}[noframenumbering, tocpart]
+ \frametitle{\partContentName}
+ \tableofcontents[part=\thepart]
+ \end{frame}
+ }{
+ % else empty
+ }
+ }
+}
+% \end{macrocode}
+% \end{function}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{function}{\__gotham_inner_disable_sectionpage:, \__gotham_inner_enable_sectionpage:}
+% Commands to disable or enable the display of a 'section page' frame at the begining of every new section.
+% It replaces the |\newcommand{\gotham@disablesectionpage}| and | \newcommand{\gotham@enablesectionpage}|
+% \TestFiles{gotham-test-041}
+% \begin{macrocode}
+\cs_new_protected:Nn \__gotham_inner_disable_sectionpage:
+{
+ \AtBeginSection{
+ % intentionally empty
+ }
+}
+
+\cs_new_protected:Nn \__gotham_inner_enable_sectionpage:
+{
+ \AtBeginSection{
+ \ifbeamer@inframe
+ \sectionpage
+ \else
+ \frame[c, noframenumbering, section]{\sectionpage}
+ \fi
+
+ \ifbool{sectionContent}{
+ % true
+ \begin{frame}[noframenumbering, tocsec]
+ \frametitle{\secContentName}
+ {\tableofcontents[currentsection, currentsubsection,
+ hideothersubsections,
+ sectionstyle=show/shaded,
+ ]
+ }
+ \end{frame}
+ }{
+ % else empty
+ }
+ }
+}
+% \end{macrocode}
+% \end{function}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{function}{\__gotham_inner_disable_subsectionpage:, \__gotham_inner_enable_subsectionpage:}
+% Commands to disable or enable the display of a 'subsection page' frame at the begining of every new subsection.
+% It replaces the |\newcommand{\gotham@disablesubsectionpage}| and | \newcommand{\gotham@enablesubsectionpage}|
+% \TestFiles{gotham-test-041}
+% \begin{macrocode}
+\cs_new_protected:Nn \__gotham_inner_disable_subsectionpage:
+{
+ \AtBeginSubsection{
+ % intentionally empty
+ }
+}
+
+\cs_new_protected:Nn \__gotham_inner_enable_subsectionpage:
+{
+ \AtBeginSubsection{
+ \ifbeamer@inframe
+ \subsectionpage
+ \else
+ \frame[c, noframenumbering, subsec]{\subsectionpage}
+ \fi
+
+ \ifbool{subsectionContent}{
+ % true
+ \begin{frame}[noframenumbering, tocsubsec]
+ \frametitle{\subsecContentName}
+ {\tableofcontents[currentsection, currentsubsection,
+ %currentsubsubsection,
+ hideothersubsections,
+ sectionstyle=show/shaded,
+ subsectionstyle=show/shaded/hide,
+ subsubsectionstyle=show/show/hide,
+ ]
+ }
+ \end{frame}
+ }{
+ % else empty
+ }
+ }
+}
+% \end{macrocode}
+% \end{function}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{function}{\__gotham_inner_disable_subsubsectionpage:, \__gotham_inner_enable_subsubsectionpage:}
+% Commands to disable or enable the display of a 'subsubsection page' frame at the begining of every new subsubsection.
+% It replaces the |\newcommand{\gotham@disablesubsubsectionpage}| and | \newcommand{\gotham@enablesubsubsectionpage}|
+% \TestFiles{gotham-test-041}
+% \begin{macrocode}
+\cs_new_protected:Nn \__gotham_inner_disable_subsubsectionpage:
+{
+ \AtBeginSubsubsection{
+ % intentionally empty
+ }
+}
+
+\cs_new_protected:Nn \__gotham_inner_enable_subsubsectionpage:
+{
+ \AtBeginSubsubsection{
+ \ifbeamer@inframe
+ \subsubsectionpage
+ \else
+ \frame[c, noframenumbering, subsubsec]{\subsubsectionpage}
+ \fi
+ }
+}
+% \end{macrocode}
+% \end{function}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{variable}{\gotham@progressonsectionpage@linewidth}
+% Variables used to defined the progress bar in section pages.
+% If the vertical size of the bar want to be changed, the command |\setlength{\gotham@progressonsectionpage@linewidth}{<0.4pt>}| can be used.
+% \end{variable}
+% \end{documentation}
+%%%%%%
+% \begin{implementation}
+% \begin{variable}{\gotham@progressonsectionpage@linewidth}
+% Variables used to defined the progress bar in section pages.
+% \begin{macrocode}
+% horizontal size of the bar (used internally and set to |\textwidth|.
+\newlength{\gotham@progressonsectionpage}
+% vertical size of the bar
+\newlength{\gotham@progressonsectionpage@linewidth}
+\setlength{\gotham@progressonsectionpage@linewidth}{3pt}
+% \end{macrocode}
+% \end{variable}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate{progress~bar~in~section~page}{empty}, \defbeamertemplate{progress~bar~in~section~page}{display}}
+% Templates to disable or enable the display of the progress bar in section pages.
+% \UnitTested
+% \TestFiles{gotham-test-041}
+% \begin{macrocode}
+\defbeamertemplate{progress~bar~in~section~page}{empty}{
+ \vspace{\gotham@progressonsectionpage@linewidth+1ex}
+}
+
+\def\inserttotalframenumber{100}
+\defbeamertemplate{progress~bar~in~section~page}{display}{
+ \setlength{\gotham@progressonsectionpage}{
+ \textwidth * \ratio{\insertframenumber~pt}{\inserttotalframenumber~pt}
+ }
+ \begin{tikzpicture}
+ \fill[bg] (0,0) rectangle (\textwidth, \gotham@progressonsectionpage@linewidth);
+ \fill[fg] (0,0) rectangle (\gotham@progressonsectionpage, \gotham@progressonsectionpage@linewidth);
+ \end{tikzpicture}
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{variable}{\sectionhoffset}
+% length controlling the horizontal offset of the (section title + progress bar) block.
+% Can be useful when extra stuff want to be display on sides of the block.
+% The default value is 0.
+% \end{variable}
+% \end{documentation}
+%%%%%%
+% \begin{implementation}
+% \begin{variable}{\sectionhoffset}
+% length controlling the horizontal offset of the (section title + progress bar) block.
+% \begin{macrocode}
+\newlength{\sectionhoffset}
+\setlength{\sectionhoffset}{0pt}
+% \end{macrocode}
+% \end{variable}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate*{part|section|subsection|subsubsection~page}{progressbar/simple}}
+% Template of part \textbar section \textbar subsection \textbar subsubsection pages shared by 'progressbar' and 'simple' style.
+% These pages contain what is inside the part \textbar section \textbar subsection \textbar subsubsection frame (without background and frametitle).
+% \UnitTested
+% \TestFiles{gotham-test-041}
+% \begin{macrocode}
+\defbeamertemplate{part~page}{progressbar/simple}{
+ %\frametitle{toto section}
+ \centering
+ \hspace*{\sectionhoffset}
+ \begin{minipage}{22em}
+ % \raggedright
+ \centering
+ \usebeamertemplate*{part~title}\\[-1ex]
+ \usebeamertemplate*{progress~bar~in~section~page}
+ \par
+ \end{minipage}
+ \par
+ \vspace{\baselineskip}
+}
+\defbeamertemplate{section~page}{progressbar/simple}{
+ %\frametitle{toto section}
+ \centering
+ \hspace*{\sectionhoffset}
+ \begin{minipage}{22em}
+ \raggedright
+ \usebeamertemplate*{section~title}\\[-1ex]
+ \usebeamertemplate*{progress~bar~in~section~page}
+ \par
+ \end{minipage}
+ \par
+ \vspace{\baselineskip}
+}
+\defbeamertemplate{subsection~page}{progressbar/simple}{
+ %\frametitle{toto section}
+ \centering
+ \hspace*{\sectionhoffset}
+ \begin{minipage}{22em}
+ \raggedright
+ \usebeamertemplate*{section~title}\\[-1ex]
+ \usebeamertemplate*{progress~bar~in~section~page}
+ \par
+ \usebeamertemplate*{subsection~title}
+ \end{minipage}
+ \par
+ \vspace{\baselineskip}
+}
+\defbeamertemplate{subsubsection~page}{progressbar/simple}{
+ % \frametitle{toto section}
+ \centering
+ \hspace*{\sectionhoffset}
+ \begin{minipage}{22em}
+ \raggedright
+ \usebeamertemplate*{section~title}\\[-1ex]
+ \usebeamertemplate*{progress~bar~in~section~page}
+ \par
+ \usebeamertemplate*{subsection~title}
+ \par
+ \usebeamertemplate*{subsubsection~title}
+ \end{minipage}
+ \par
+ \vspace{\baselineskip}
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate{background~canvas}{part|section|subsection|subsubsection/gotham}}
+% Background canvas template of part \textbar section \textbar subsection \textbar subsubsection pages.
+% \UnitTested
+% \TestFiles{gotham-test-041}
+% \begin{macrocode}
+\defbeamertemplate{background~canvas}{part/gotham}{
+ \ifbeamercolorempty[bg]{normal~text}{}{\color{bg}\vrule width\paperwidth height\paperheight}
+}
+\defbeamertemplate{background~canvas}{section/gotham}{
+ \setbeamertemplate{background~canvas}[part/gotham]
+ \usebeamertemplate{background~canvas}
+}
+\defbeamertemplate{background~canvas}{subsection/gotham}{
+ \setbeamertemplate{background~canvas}[part/gotham]
+ \usebeamertemplate{background~canvas}
+}
+\defbeamertemplate{background~canvas}{subsubsection/gotham}{
+ \setbeamertemplate{background~canvas}[part/gotham]
+ \usebeamertemplate{background~canvas}
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate{part|section|subsection|subsubsection~frame}{gotham~simple}}
+% Template for part \textbar section \textbar subsection \textbar subsubsection frames with 'gotham simple' style.
+% \UnitTested
+% \TestFiles{gotham-test-041}
+% \begin{macrocode}
+\defbeamertemplate{part~frame}{gotham~simple}{
+ \setbeamertemplate{background~canvas}[part/gotham]
+ \setbeamercolor{frametitle}{
+ use={frametitleSection, normal~text},
+ bg=frametitleSection.fg,
+ fg=normal~text.fg
+ }
+ \setbeamertemplate{progress~bar~in~section~page}[empty]
+ \setbeamertemplate{part~page}[progressbar/simple]
+ % \usebeamertemplate*{part~page}% activated automatically
+}
+
+\defbeamertemplate{section~frame}{gotham~simple}{
+ \setbeamertemplate{background~canvas}[section/gotham]
+ \setbeamercolor{frametitle}{
+ use={frametitleSection, normal~text},
+ bg=frametitleSection.fg,
+ fg=normal~text.fg
+ }
+ \setbeamertemplate{progress~bar~in~section~page}[empty]
+ \setbeamertemplate{section~page}[progressbar/simple]
+ % \usebeamertemplate*{section~page}% activated automatically
+}
+
+\defbeamertemplate{subsection~frame}{gotham~simple}{
+ \setbeamertemplate{background~canvas}[subsection/gotham]
+ \setbeamercolor{frametitle}{
+ use={frametitleSection, normal~text},
+ bg=frametitleSection.fg,
+ fg=normal~text.fg
+ }
+ \setbeamertemplate{progress~bar~in~section~page}[empty]
+ \setbeamertemplate{subsection~page}[progressbar/simple]
+ % \usebeamertemplate*{subsection~page}% activated automatically
+}
+
+\defbeamertemplate{subsubsection~frame}{gotham~simple}{
+ \setbeamertemplate{background~canvas}[subsubsection/gotham]
+ \setbeamercolor{frametitle}{
+ use={frametitleSection, normal~text},
+ bg=frametitleSection.fg,
+ fg=normal~text.fg
+ }
+ \setbeamertemplate{progress~bar~in~section~page}[empty]
+ \setbeamertemplate{subsubsection~page}[progressbar/simple]
+ % \usebeamertemplate*{subsubsection~page}% activated automatically
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate{part|section|subsection|subsubsection~frame}{gotham~progressbar}}
+% Template for part \textbar section \textbar subsection \textbar subsubsection frames with 'gotham progressbar' style.
+% \UnitTested
+% \TestFiles{gotham-test-041}
+% \begin{macrocode}
+\defbeamertemplate{part~frame}{gotham~progressbar}{
+ \setbeamertemplate{background~canvas}[part/gotham]
+ \setbeamercolor{frametitle}{
+ use={frametitleSection, normal~text},
+ bg=frametitleSection.fg,
+ fg=normal~text.fg
+ }
+ \setbeamertemplate{progress~bar~in~section~page}[display]
+ \setbeamertemplate{part~page}[progressbar/simple]
+ % \usebeamertemplate*{part~page}% activated automatically
+}
+
+\defbeamertemplate{section~frame}{gotham~progressbar}{
+ \setbeamertemplate{background~canvas}[section/gotham]
+ \setbeamercolor{frametitle}{
+ use={frametitleSection, normal~text},
+ bg=frametitleSection.fg,
+ fg=normal~text.fg
+ }
+ \setbeamertemplate{progress~bar~in~section~page}[display]
+ \setbeamertemplate{section~page}[progressbar/simple]
+ % \usebeamertemplate*{section~page}% activated automatically
+}
+
+\defbeamertemplate{subsection~frame}{gotham~progressbar}{
+ \setbeamertemplate{background~canvas}[subsection/gotham]
+ \setbeamercolor{frametitle}{
+ use={frametitleSection, normal~text},
+ bg=frametitleSection.fg,
+ fg=normal~text.fg
+ }
+ \setbeamertemplate{progress~bar~in~section~page}[display]
+ \setbeamertemplate{subsection~page}[progressbar/simple]
+ % \usebeamertemplate*{subsection~page}% activated automatically
+}
+
+\defbeamertemplate{subsubsection~frame}{gotham~progressbar}{
+ \setbeamertemplate{background~canvas}[subsubsection/gotham]
+ \setbeamercolor{frametitle}{
+ use={frametitleSection, normal~text},
+ bg=frametitleSection.fg,
+ fg=normal~text.fg
+ }
+ \setbeamertemplate{progress~bar~in~section~page}[display]
+ \setbeamertemplate{subsubsection~page}[progressbar/simple]
+ % \usebeamertemplate*{subsubsection~page}% activated automatically
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate*{progress~bar~in~splitvert}{empty|dispay}}
+% Internal template to display or disable (empty) the progressbar used in 'splitvert' (split vertically) style.
+% \UnitTested
+% \TestFiles{gotham-test-041}
+% \begin{macrocode}
+\defbeamertemplate{progress~bar~in~splitvert}{empty}{
+ \vspace{-0.5ex}
+}
+
+\defbeamertemplate*{progress~bar~in~splitvert}{display}{
+ % \nointerlineskip
+ \setlength{\gotham@progressonsectionpage}{
+ \paperwidth * \ratio{\insertframenumber pt}{\inserttotalframenumber pt}
+ }
+ \begin{tikzpicture}
+ \fill[bg] (0,0) rectangle (\paperwidth, \gotham@progressonsectionpage@linewidth);
+ \fill[fg] (0,0) rectangle (\gotham@progressonsectionpage, \gotham@progressonsectionpage@linewidth);
+ \end{tikzpicture}
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate{part|section|subsection|subsubsection page}{gotham splitvert progressbar/simple}, \defbeamertemplate{part|section|subsection|subsubsection frame}{gotham splitvert progressbar}, \defbeamertemplate{part|section|subsection|subsubsection frame}{gotham splitvert simple}}
+% Templates for part \textbar section \textbar subsection \textbar subsubsection pages that are common for 'gotham splitvert progressbar' and 'gotham splitvert simple' styles (which implies part \textbar section \textbar subsection \textbar subsubsection frames).
+% \UnitTested
+% \TestFiles{gotham-test-041}
+% \begin{macrocode}
+% Part page splitvert.
+\defbeamertemplate{part~page}{gotham~splitvert~progressbar/simple}{
+ % \frametitle{part!}
+ % \IfEmpty{\insertframetitle}{
+ \ifx\beamer@frametitle\@empty
+ \vspace*{-0.05\paperheight}
+ \else %}{
+ \vspace*{-0.165\paperheight}
+ \fi %}
+ {
+ \usebeamercolor{frametitle}\colorlet{gotham@@tempColor}{bg}
+ \begin{tikzpicture}[overlay, remember~picture]
+ \fill[color=gotham@@tempColor] (current~page.north~west) rectangle ([shift = {(0, -0.45\paperheight)}] current~page.north~east);
+ \end{tikzpicture}
+ }
+
+ % \hspace*{\sectionhoffset}
+ \begin{minipage}[b][0.45\paperheight]{\textwidth}
+ \centering
+ \usebeamertemplate*{part~title}
+ \end{minipage}
+ \\[-0.1\baselineskip]
+ \hspace*{-1.0cm}\noindent
+ \usebeamertemplate*{progress~bar~in~splitvert}
+
+ \newline
+ \begin{minipage}[t][0.5\paperheight]{\textwidth}
+ % \vspace{0.5\baselineskip}
+ % \usebeamerfont{subsection~ttitle}
+ % \usebeamercolor[bg]{frametitle}
+ % empty
+ \end{minipage}
+}
+\defbeamertemplate{part~frame}{gotham~splitvert~progressbar}{
+ \setbeamertemplate{background~canvas}[part/gotham]
+ % \setbeamercolor{frametitle}{}
+ % \setlength{\sectionhoffset}{1cm}
+ \setbeamercolor{part~title}{use=frametitle, fg=frametitle.fg}
+ \setbeamertemplate{progress~bar~in~splitvert}[display]
+ \setbeamertemplate{part~page}[gotham~splitvert~progressbar/simple]
+ % \usebeamertemplate*{part~page}% activated automatically
+}
+\defbeamertemplate{part~frame}{gotham~splitvert~simple}{
+ \setbeamertemplate{background~canvas}[part/gotham]
+ % \setbeamercolor{frametitle}{}
+ % \setlength{\sectionhoffset}{1cm}
+ \setbeamercolor{part~title}{use=frametitle, fg=frametitle.fg}
+ \setbeamertemplate{progress~bar~in~splitvert}[empty]
+ \setbeamertemplate{part~page}[gotham~splitvert~progressbar/simple]
+ % \usebeamertemplate*{part~page}% activated automatically
+}
+
+% Section page splitvert.
+\defbeamertemplate{section~page}{gotham~splitvert~progressbar/simple}{
+ % \frametitle{section!}
+ % \IfEmpty{\insertframetitle}{
+ \ifx\beamer@frametitle\@empty
+ \vspace*{-0.05\paperheight}
+ \else %}{
+ \vspace*{-0.165\paperheight}
+ \fi %}
+ {
+ \usebeamercolor{frametitle}\colorlet{gotham@@tempColor}{bg}
+ \begin{tikzpicture}[overlay, remember~picture]
+ \fill[color=gotham@@tempColor] (current~page.north~west) rectangle ([shift = {(0, -0.45\paperheight)}] current~page.north~east);
+ \end{tikzpicture}
+ }
+
+ \hspace*{\sectionhoffset}
+ \begin{minipage}[b][0.45\paperheight]{\textwidth}
+ \usebeamertemplate*{section~title}
+ \end{minipage}
+ \\[-0.1\baselineskip]
+ \hspace*{-1.0cm}\noindent
+ \usebeamertemplate*{progress~bar~in~splitvert}
+
+ \newline
+ \hspace*{\sectionhoffset}
+ \begin{minipage}[t][0.5\paperheight]{\textwidth}
+ % \vspace{0.5\baselineskip}
+ \usebeamerfont{subsection~title}
+ \usebeamercolor[bg]{frametitle}
+ % empty
+ \end{minipage}
+}
+\defbeamertemplate{section~frame}{gotham~splitvert~progressbar}{
+ \setbeamertemplate{background~canvas}[section/gotham]
+ % \setbeamercolor{frametitle}{}
+ \setlength{\sectionhoffset}{1cm}
+ \setbeamercolor{section~title}{use=frametitle, fg=frametitle.fg}
+ \setbeamertemplate{progress~bar~in~splitvert}[display]
+ \setbeamertemplate{section~page}[gotham~splitvert~progressbar/simple]
+ % \usebeamertemplate*{section~page}% activated automatically
+}
+\defbeamertemplate{section~frame}{gotham~splitvert~simple}{
+ \setbeamertemplate{background~canvas}[section/gotham]
+ % \setbeamercolor{frametitle}{}
+ \setlength{\sectionhoffset}{1cm}
+ \setbeamercolor{section~title}{use=frametitle, fg=frametitle.fg}
+ \setbeamertemplate{progress~bar~in~splitvert}[empty]
+ \setbeamertemplate{section~page}[gotham~splitvert~progressbar/simple]
+ % \usebeamertemplate*{section~page}% activated automatically
+}
+
+% Subsection page splitvert.
+\defbeamertemplate{subsection~page}{gotham~splitvert~progressbar/simple}{
+ % \frametitle{subsection!}
+ % \IfEmpty{\insertframetitle}{
+ \ifx\beamer@frametitle\@empty
+ \vspace*{-0.05\paperheight}
+ \else %}{
+ \vspace*{-0.165\paperheight}
+ \fi %}
+ {
+ \usebeamercolor{frametitle}\colorlet{gotham@@tempColor}{bg}
+ \begin{tikzpicture}[overlay, remember~picture]
+ \fill[color=gotham@@tempColor] (current~page.north~west) rectangle ([shift = {(0, -0.45\paperheight)}] current~page.north~east);
+ \end{tikzpicture}
+ }
+
+ \hspace*{\sectionhoffset}
+ \begin{minipage}[b][0.45\paperheight]{\textwidth}
+ \usebeamertemplate*{section~title}
+ \end{minipage}
+ \\[-0.1\baselineskip]
+ \hspace*{-1.0cm}\noindent
+ \usebeamertemplate*{progress~bar~in~splitvert}
+
+ \newline
+ \hspace*{\sectionhoffset}
+ \begin{minipage}[t][0.5\paperheight]{\textwidth}
+ % \vspace{0.5\baselineskip}
+ \usebeamerfont{subsection~title}
+ \usebeamercolor[bg]{frametitle}
+ \usebeamertemplate*{subsection~title}
+ % \par
+ % \vspace{1em}%phantom subsection
+ \end{minipage}
+}
+\defbeamertemplate{subsection~frame}{gotham~splitvert~progressbar}{
+ \setbeamertemplate{background~canvas}[subsection/gotham]
+ % \setbeamercolor{frametitle}{}
+ \setlength{\sectionhoffset}{1cm}
+ \setbeamercolor{section~title}{use=frametitle, fg=frametitle.fg}
+ \setbeamercolor{subsection~title}{use=frametitle, fg=frametitle.bg}
+ \setbeamertemplate{progress~bar~in~splitvert}[display]
+ \setbeamertemplate{subsection~page}[gotham~splitvert~progressbar/simple]
+ % \usebeamertemplate*{subsection~page}% activated automatically
+}
+\defbeamertemplate{subsection~frame}{gotham~splitvert~simple}{
+ \setbeamertemplate{background~canvas}[subsection/gotham]
+ % \setbeamercolor{frametitle}{}
+ \setlength{\sectionhoffset}{1cm}
+ \setbeamercolor{section~title}{use=frametitle, fg=frametitle.fg}
+ \setbeamercolor{subsection~title}{use=frametitle, fg=frametitle.bg}
+ \setbeamertemplate{progress~bar~in~splitvert}[empty]
+ \setbeamertemplate{subsection~page}[gotham~splitvert~progressbar/simple]
+ % \usebeamertemplate*{subsection~page}% activated automatically
+}
+
+% Subsubection page splitvert.
+\defbeamertemplate{subsubsection~page}{gotham~splitvert~progressbar/simple}{
+ % \frametitle{subsubsection!}
+ % \IfEmpty{\insertframetitle}{
+ \ifx\beamer@frametitle\@empty
+ \vspace*{-0.05\paperheight}
+ \else %}{
+ \vspace*{-0.165\paperheight}
+ \fi %}
+ {
+ \usebeamercolor{frametitle}\colorlet{gotham@@tempColor}{bg}
+ \begin{tikzpicture}[overlay, remember~picture]
+ \fill[color=gotham@@tempColor] (current~page.north~west) rectangle ([shift = {(0, -0.45\paperheight)}] current~page.north~east);
+ \end{tikzpicture}
+ }
+
+ \hspace*{\sectionhoffset}
+ \begin{minipage}[b][0.45\paperheight]{\textwidth}
+ \usebeamertemplate*{section~title}
+ \end{minipage}
+ \\[-0.1\baselineskip]
+ \hspace*{-1.0cm}\noindent
+ \usebeamertemplate*{progress~bar~in~splitvert}
+
+ \newline
+ \hspace*{\sectionhoffset}
+ \begin{minipage}[t][0.5\paperheight]{\textwidth}
+ % \vspace{0.5\baselineskip}
+ \usebeamerfont{subsubsection~title}
+ \usebeamercolor[bg]{frametitle}
+ \usebeamertemplate*{subsection~title}
+ \par
+ \usebeamertemplate*{subsubsection~title}
+ \end{minipage}
+}
+\defbeamertemplate{subsubsection~frame}{gotham~splitvert~progressbar}{
+ \setbeamertemplate{background~canvas}[subsubsection/gotham]
+ % \setbeamercolor{frametitle}{}
+ \setlength{\sectionhoffset}{1cm}
+ \setbeamercolor{section~title}{use=frametitle, fg=frametitle.fg}
+ \setbeamercolor{subsection~title}{use=frametitle, fg=frametitle.bg}
+ \setbeamercolor{subsubsection~title}{use=frametitle, fg=frametitle.bg}
+ \setbeamertemplate{progress~bar~in~splitvert}[display]
+ \setbeamertemplate{subsubsection~page}[gotham~splitvert~progressbar/simple]
+ % \usebeamertemplate*{subsubsection~page}% activated automatically
+}
+\defbeamertemplate{subsubsection~frame}{gotham~splitvert~simple}{
+ \setbeamertemplate{background~canvas}[subsubsection/gotham]
+ % \setbeamercolor{frametitle}{}
+ \setlength{\sectionhoffset}{1cm}
+ \setbeamercolor{section~title}{use=frametitle, fg=frametitle.fg}
+ \setbeamercolor{subsection~title}{use=frametitle, fg=frametitle.bg}
+ \setbeamercolor{subsubsection~title}{use=frametitle, fg=frametitle.bg}
+ \setbeamertemplate{progress~bar~in~splitvert}[empty]
+ \setbeamertemplate{subsubsection~page}[gotham~splitvert~progressbar/simple]
+ % \usebeamertemplate*{subsubsection~page}% activated automatically
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate{part|section|subsection|subsubsection page}{gotham progressvert}, \defbeamertemplate{part|section|subsection|subsubsection frame}{gotham progressvert}}
+% Templates for part \textbar section \textbar subsection \textbar subsubsection pages for 'gotham progressvert'.
+% \UnitTested
+% \TestFiles{gotham-test-041}
+% \begin{macrocode}
+
+% Part page progressvert.
+\defbeamertemplate{part~page}{gotham~progressvert}{
+ % \frametitle{part!}
+ % \IfEmpty{\insertframetitle}{
+ \ifx\beamer@frametitle\@empty
+ \vspace*{-0.05\paperheight}
+ \else %}{
+ \vspace*{-0.165\paperheight}
+ \fi %}
+ \setlength{\gotham@progressonsectionpage}{
+ \paperheight * \ratio{\insertframenumber pt}{\inserttotalframenumber pt}
+ }
+ {
+ \usebeamercolor{frametitle}\colorlet{gotham@@tempColor}{bg}
+ \colorlet{gotham@@tempColorB}{fg}
+ \begin{tikzpicture}[overlay, remember~picture]
+ \fill[color=gotham@@tempColor]
+ ([shift={(0,0)}] current~page.north~west) --
+ ([shift={(0,-\gotham@progressonsectionpage)}] current~page.north~west) --
+ ([shift={(0,-\gotham@progressonsectionpage)}] current~page.north~east) --
+ ([shift={(0,0)}] current~page.north~east)
+ --cycle;
+ \node[color=gotham@@tempColorB, align=left, text~width=0.8\textwidth] at ([shift={(\sectionhoffset,0)}] current~page.center) {
+ {\usebeamerfont{part~title}
+ \partname \ \insertromanpartnumber
+ \\[1.75ex]
+ \insertpart
+ }
+ };
+
+ \clip
+ ([shift={(0,0)}] current~page.south~west) --
+ ([shift={(0,\paperheight-\gotham@progressonsectionpage)}] current~page.south~west) --
+ ([shift={(0,\paperheight-\gotham@progressonsectionpage)}] current~page.south~east) --
+ ([shift={(0,0)}] current~page.south~east)
+ --cycle;
+
+ \fill[color=gotham@@tempColorB]
+ ([shift={(0,0)}]current~page.south~west) --
+ ([shift={(0,\paperheight-\gotham@progressonsectionpage)}] current~page.south~west) --
+ ([shift={(0,\paperheight-\gotham@progressonsectionpage)}] current~page.south~east) --
+ ([shift={(0,0)}] current~page.south~east)
+ --cycle;
+ \node[color=gotham@@tempColor, align=left, text~width=0.8\textwidth] at ([shift={(\sectionhoffset,0)}] current~page.center) {
+ {\usebeamerfont{part~title}
+ \partname \ \insertromanpartnumber
+ \\
+ \insertpart
+ }
+ };
+ \end{tikzpicture}
+ }
+}
+\defbeamertemplate{part~frame}{gotham~progressvert}{
+ \setbeamertemplate{background~canvas}[part/gotham]
+ % \setbeamercolor{frametitle}{}
+ \setlength{\sectionhoffset}{1cm}
+ % \setbeamercolor{section~title}{use=frametitle, fg=frametitle.bg}
+ % \setbeamercolor{subsection~title}{use=frametitle, fg=frametitle.bg}
+ % \setbeamercolor{part~title}{use=frametitle, fg=frametitle.bg}
+ % \setbeamertemplate{progress~bar~in~splitvert}[display]
+ \setbeamertemplate{part~page}[gotham~progressvert]
+ % \usebeamertemplate*{section~page}% activated automatically
+}
+
+% Section page progressvert.
+\defbeamertemplate{section~page}{gotham~progressvert}{
+ % \frametitle{section!}
+ % \IfEmpty{\insertframetitle}{
+ \ifx\beamer@frametitle\@empty
+ \vspace*{-0.05\paperheight}
+ \else %}{
+ \vspace*{-0.165\paperheight}
+ \fi %}
+ \setlength{\gotham@progressonsectionpage}{
+ \paperheight * \ratio{\insertframenumber pt}{\inserttotalframenumber pt}
+ }
+ {
+ \usebeamercolor{frametitle}\colorlet{gotham@@tempColor}{bg}
+ \colorlet{gotham@@tempColorB}{fg}
+ \begin{tikzpicture}[overlay, remember~picture]
+ \fill[color=gotham@@tempColor]
+ ([shift={(0,0)}] current~page.north~west) --
+ ([shift={(0,-\gotham@progressonsectionpage)}] current~page.north~west) --
+ ([shift={(0,-\gotham@progressonsectionpage)}] current~page.north~east) --
+ ([shift={(0,0)}] current~page.north~east)
+ --cycle;
+ \node[color=gotham@@tempColorB, align=left, text~width=0.8\textwidth] at ([shift={(\sectionhoffset,0)}] current~page.center) {
+ {\usebeamerfont{section~title}
+ \insertsectionnumber.~
+ \insertsectionhead}
+ };
+
+ \clip
+ ([shift={(0,0)}] current~page.south~west) --
+ ([shift={(0,\paperheight-\gotham@progressonsectionpage)}] current~page.south~west) --
+ ([shift={(0,\paperheight-\gotham@progressonsectionpage)}] current~page.south~east) --
+ ([shift={(0,0)}] current~page.south~east)
+ --cycle;
+
+ \fill[color=gotham@@tempColorB]
+ ([shift={(0,0)}]current~page.south~west) --
+ ([shift={(0,\paperheight-\gotham@progressonsectionpage)}] current~page.south~west) --
+ ([shift={(0,\paperheight-\gotham@progressonsectionpage)}] current~page.south~east) --
+ ([shift={(0,0)}] current~page.south~east)
+ --cycle;
+ \node[color=gotham@@tempColor, align=left, text~width=0.8\textwidth] at ([shift={(\sectionhoffset,0)}] current~page.center) {
+ {\usebeamerfont{section~title}
+ \insertsectionnumber.~
+ \insertsectionhead}
+ };
+ \end{tikzpicture}
+ }
+}
+\defbeamertemplate{section~frame}{gotham~progressvert}{
+ \setbeamertemplate{background~canvas}[section/gotham]
+ % \setbeamercolor{frametitle}{}
+ \setlength{\sectionhoffset}{1cm}
+ % \setbeamercolor{section~title}{use=frametitle, fg=frametitle.bg}
+ % \setbeamercolor{subsection~title}{use=frametitle, fg=frametitle.bg}
+ % \setbeamercolor{section~title}{use=frametitle, fg=frametitle.bg}
+ % \setbeamertemplate{progress~bar~in~splitvert}[display]
+ \setbeamertemplate{section~page}[gotham~progressvert]
+ % \usebeamertemplate*{section~page}% activated automatically
+}
+
+% Subection page progressvert.
+\defbeamertemplate{subsection~page}{gotham~progressvert}{
+ % \frametitle{subsection!}
+ % \IfEmpty{\insertframetitle}{
+ \ifx\beamer@frametitle\@empty
+ \vspace*{-0.05\paperheight}
+ \else %}{
+ \vspace*{-0.165\paperheight}
+ \fi %}
+ \setlength{\gotham@progressonsectionpage}{
+ \paperheight * \ratio{\insertframenumber pt}{\inserttotalframenumber pt}
+ }
+ {
+ \usebeamercolor{frametitle}\colorlet{gotham@@tempColor}{bg}
+ \colorlet{gotham@@tempColorB}{fg}
+ \begin{tikzpicture}[overlay, remember~picture]
+ \fill[color=gotham@@tempColor]
+ ([shift={(0,0)}] current~page.north~west) --
+ ([shift={(0,-\gotham@progressonsectionpage)}] current~page.north~west) --
+ ([shift={(0,-\gotham@progressonsectionpage)}] current~page.north~east) --
+ ([shift={(0,0)}] current~page.north~east)
+ --cycle;
+ \node[color=gotham@@tempColorB, align=left, text~width=0.8\textwidth] at ([shift={(\sectionhoffset,0)}] current~page.center) {
+ {\usebeamerfont{section~title}
+ \insertsectionnumber.~
+ \insertsectionhead}
+ \\
+ {\usebeamerfont{subsection~title}
+ \insertsectionnumber.\insertsubsectionnumber.~
+ \insertsubsectionhead}
+ };
+
+ \clip
+ ([shift={(0,0)}] current~page.south~west) --
+ ([shift={(0,\paperheight-\gotham@progressonsectionpage)}] current~page.south~west) --
+ ([shift={(0,\paperheight-\gotham@progressonsectionpage)}] current~page.south~east) --
+ ([shift={(0,0)}] current~page.south~east)
+ --cycle;
+
+ \fill[color=gotham@@tempColorB]
+ ([shift={(0,0)}]current~page.south~west) --
+ ([shift={(0,\paperheight-\gotham@progressonsectionpage)}] current~page.south~west) --
+ ([shift={(0,\paperheight-\gotham@progressonsectionpage)}] current~page.south~east) --
+ ([shift={(0,0)}] current~page.south~east)
+ --cycle;
+ \node[color=gotham@@tempColor, align=left, text~width=0.8\textwidth] at ([shift={(\sectionhoffset,0)}] current~page.center) {
+ {\usebeamerfont{section~title}
+ \insertsectionnumber.~
+ \insertsectionhead}
+ \\
+ {\usebeamerfont{subsection~title}
+ \insertsectionnumber.\insertsubsectionnumber.~
+ \insertsubsectionhead}
+ };
+ \end{tikzpicture}
+ }
+}
+\defbeamertemplate{subsection~frame}{gotham~progressvert}{
+ \setbeamertemplate{background~canvas}[subsection/gotham]
+ % \setbeamercolor{frametitle}{}
+ \setlength{\sectionhoffset}{1cm}
+ % \setbeamercolor{section~title}{use=frametitle, fg=frametitle.bg}
+ % \setbeamercolor{subsection~title}{use=frametitle, fg=frametitle.bg}
+ % \setbeamercolor{subsection~title}{use=frametitle, fg=frametitle.bg}
+ % \setbeamertemplate{progress~bar~in~splitvert}[display]
+ \setbeamertemplate{subsection~page}[gotham~progressvert]
+ % \usebeamertemplate*{subsection~page}% activated automatically
+}
+
+% Subsubection page progressvert.
+\defbeamertemplate{subsubsection~page}{gotham~progressvert}{
+ % \frametitle{subsubsection!}
+ % \IfEmpty{\insertframetitle}{
+ \ifx\beamer@frametitle\@empty
+ \vspace*{-0.05\paperheight}
+ \else %}{
+ \vspace*{-0.165\paperheight}
+ \fi %}
+ \setlength{\gotham@progressonsectionpage}{
+ \paperheight * \ratio{\insertframenumber pt}{\inserttotalframenumber pt}
+ }
+ {
+ \usebeamercolor{frametitle}\colorlet{gotham@@tempColor}{bg}
+ \colorlet{gotham@@tempColorB}{fg}
+ \begin{tikzpicture}[overlay, remember~picture]
+ \fill[color=gotham@@tempColor]
+ ([shift={(0,0)}] current~page.north~west) --
+ ([shift={(0,-\gotham@progressonsectionpage)}] current~page.north~west) --
+ ([shift={(0,-\gotham@progressonsectionpage)}] current~page.north~east) --
+ ([shift={(0,0)}] current~page.north~east)
+ --cycle;
+ \node[color=gotham@@tempColorB, align=left, text~width=0.8\textwidth] at ([shift={(\sectionhoffset,0)}] current~page.center) {
+ {\usebeamerfont{section~title}
+ \insertsectionnumber.~
+ \insertsectionhead}
+ \\
+ {\usebeamerfont{subsection~title}
+ \insertsectionnumber.\insertsubsectionnumber.~
+ \insertsubsectionhead}
+ \\
+ {\usebeamerfont{subsubsection~title}
+ \insertsectionnumber.\insertsubsectionnumber.\insertsubsubsectionnumber.~
+ \insertsubsubsectionhead}
+ };
+
+ \clip
+ ([shift={(0,0)}] current~page.south~west) --
+ ([shift={(0,\paperheight-\gotham@progressonsectionpage)}] current~page.south~west) --
+ ([shift={(0,\paperheight-\gotham@progressonsectionpage)}] current~page.south~east) --
+ ([shift={(0,0)}] current~page.south~east)
+ --cycle;
+
+ \fill[color=gotham@@tempColorB]
+ ([shift={(0,0)}]current~page.south~west) --
+ ([shift={(0,\paperheight-\gotham@progressonsectionpage)}] current~page.south~west) --
+ ([shift={(0,\paperheight-\gotham@progressonsectionpage)}] current~page.south~east) --
+ ([shift={(0,0)}] current~page.south~east)
+ --cycle;
+ \node[color=gotham@@tempColor, align=left, text~width=0.8\textwidth] at ([shift={(\sectionhoffset,0)}] current~page.center) {
+ {\usebeamerfont{section~title}
+ \insertsectionnumber.~
+ \insertsectionhead}
+ \\
+ {\usebeamerfont{subsection~title}
+ \insertsectionnumber.\insertsubsectionnumber.~
+ \insertsubsectionhead}
+ \\
+ {\usebeamerfont{subsubsection~title}
+ \insertsectionnumber.\insertsubsectionnumber.\insertsubsubsectionnumber.~
+ \insertsubsubsectionhead}
+ };
+ \end{tikzpicture}
+ }
+}
+\defbeamertemplate{subsubsection~frame}{gotham~progressvert}{
+ \setbeamertemplate{background~canvas}[subsubsection/gotham]
+ % \setbeamercolor{frametitle}{}
+ \setlength{\sectionhoffset}{1cm}
+ % \setbeamercolor{section~title}{use=frametitle, fg=frametitle.bg}
+ % \setbeamercolor{subsection~title}{use=frametitle, fg=frametitle.bg}
+ % \setbeamercolor{subsubsection~title}{use=frametitle, fg=frametitle.bg}
+ % \setbeamertemplate{progress~bar~in~splitvert}[display]
+ \setbeamertemplate{subsubsection~page}[gotham~progressvert]
+ % \usebeamertemplate*{subsubsection~page}% activated automatically
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+
+% \begin{documentation}
+% \begin{function}{\useinnertheme}
+% \begin{syntax}
+% \cs{useinnertheme}\oarg{option1=value1, ...}\marg{gotham}
+% \textrm{where the options are (default marked as} \defopt{default}\textrm{):}
+% \meta{partframe template} = \oarg{\defopt{gotham progressbar} \textbar gotham simple \textbar gotham splitvert progressbar \textbar gotham splitvert simple \textbar gotham progressvert \textbar ...}
+% \meta{partframe default} = \oarg{\defopt{on} \textbar off}
+% \meta{sectionframe template} = \oarg{\defopt{gotham progressbar} \textbar gotham simple \textbar gotham splitvert progressbar \textbar gotham splitvert simple \textbar gotham progressvert \textbar ...}
+% \meta{sectionframe default} = \oarg{\defopt{on} \textbar off}
+% \meta{subsectionframe template} = \oarg{\defopt{gotham progressbar} \textbar gotham simple \textbar gotham splitvert progressbar \textbar gotham splitvert simple \textbar gotham progressvert \textbar ...}
+% \meta{subsectionframe default} = \oarg{\defopt{on} \textbar off}
+% \meta{subsubframe template} = \oarg{\defopt{gotham progressbar} \textbar gotham simple \textbar gotham splitvert progressbar \textbar gotham splitvert simple \textbar gotham progressvert \textbar ...}
+% \meta{subsubframe default} = \oarg{\defopt{on} \textbar off}
+% \end{syntax}
+% The 'package' (useinnertheme) options can control |partframe templates| (or |sectionframe|, |subsectionframe| and |subsubsectionframe| respectively), which define the style of the partframe (or |sectionframe|, |subsectionframe| and |subsubsectionframe| respectively) displayed at every new beginning of sectioning.
+% These templates can be disabled (or re-enabled) by default using the option |partframe default| (or |sectionframe|, |subsectionframe| and |subsubsectionframe| respectively).
+% \end{function}
+% \end{documentation}
+%%%%
+% \begin{implementation}
+% \begin{macro}{inner key -- interface}
+% Controls the inner settings for partframe (or |sectionframe|, |subsectionframe| and |subsubsectionframe| respectively) and standin.
+% \UnitTested
+% \TestFiles{gotham-test-041}
+% \begin{macrocode}
+\keys_define:nn { gotham / inner }{
+ % partframe template
+ partframe~template .usage:n = { general },
+ partframe~template .default:n = { gotham~progressbar },
+ partframe~template .code:n = { \__gotham_set_template:nn{part~frame}{#1} }
+}
+\keys_define:nn { gotham / inner }
+{
+ % partframe default
+ partframe~default .choice:,
+ partframe~default .usage:n = { general },
+ partframe~default .default:n = { true },
+
+ partframe~default / true .code:n = { \__gotham_inner_enable_partpage: },
+ partframe~default / on .code:n = { \__gotham_inner_enable_partpage: },
+ partframe~default / enable .code:n = { \__gotham_inner_enable_partpage: },
+
+ partframe~default / false .code:n = { \__gotham_inner_disable_partpage: },
+ partframe~default / off .code:n = { \__gotham_inner_disable_partpage: },
+ partframe~default / disable .code:n = { \__gotham_inner_disable_partpage: },
+
+ partframe~default / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'#1'~is~unknown~for~the~(known)~option~'partframe~default',~so~being~ignored. }{helping~message: partframe~default / unknown} },
+}
+
+\keys_define:nn { gotham / inner }{
+ % sectionframe template
+ sectionframe~template .usage:n = { general },
+ sectionframe~template .default:n = { gotham~progressbar },
+ sectionframe~template .code:n = { \__gotham_set_template:nn{section~frame}{#1} }
+}
+\keys_define:nn { gotham / inner }
+{
+ % sectionframe default
+ sectionframe~default .choice:,
+ sectionframe~default .usage:n = { general },
+ sectionframe~default .default:n = { true },
+
+ sectionframe~default / true .code:n = { \__gotham_inner_enable_sectionpage: },
+ sectionframe~default / on .code:n = { \__gotham_inner_enable_sectionpage: },
+ sectionframe~default / enable .code:n = { \__gotham_inner_enable_sectionpage: },
+
+ sectionframe~default / false .code:n = { \__gotham_inner_disable_sectionpage: },
+ sectionframe~default / off .code:n = { \__gotham_inner_disable_sectionpage: },
+ sectionframe~default / disable .code:n = { \__gotham_inner_disable_sectionpage: },
+
+ sectionframe~default / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'#1'~is~unknown~for~the~(known)~option~'sectionframe~default',~so~being~ignored. }{helping~message: sectionframe~default / unknown} },
+}
+
+\keys_define:nn { gotham / inner }{
+ % subsectionframe template
+ subsectionframe~template .usage:n = { general },
+ subsectionframe~template .default:n = { gotham~progressbar },
+ subsectionframe~template .code:n = { \__gotham_set_template:nn{subsection~frame}{#1} }
+}
+\keys_define:nn { gotham / inner }
+{
+ % subsectionframe default
+ subsectionframe~default .choice:,
+ subsectionframe~default .usage:n = { general },
+ subsectionframe~default .default:n = { true },
+
+ subsectionframe~default / true .code:n = { \__gotham_inner_enable_subsectionpage: },
+ subsectionframe~default / on .code:n = { \__gotham_inner_enable_subsectionpage: },
+ subsectionframe~default / enable .code:n = { \__gotham_inner_enable_subsectionpage: },
+
+ subsectionframe~default / false .code:n = { \__gotham_inner_disable_subsectionpage: },
+ subsectionframe~default / off .code:n = { \__gotham_inner_disable_subsectionpage: },
+ subsectionframe~default / disable .code:n = { \__gotham_inner_disable_subsectionpage: },
+
+ subsectionframe~default / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'#1'~is~unknown~for~the~(known)~option~'subsectionframe~default',~so~being~ignored. }{helping~message: subsectionframe~default / unknown} },
+}
+
+\keys_define:nn { gotham / inner }{
+ % subsubsectionframe template
+ subsubsectionframe~template .usage:n = { general },
+ subsubsectionframe~template .default:n = { gotham~progressbar },
+ subsubsectionframe~template .code:n = { \__gotham_set_template:nn{subsubsection~frame}{#1} }
+}
+\keys_define:nn { gotham / inner }
+{
+ % subsubsectionframe default
+ subsubsectionframe~default .choice:,
+ subsubsectionframe~default .usage:n = { general },
+ subsubsectionframe~default .default:n = { true },
+
+ subsubsectionframe~default / true .code:n = { \__gotham_inner_enable_subsubsectionpage: },
+ subsubsectionframe~default / on .code:n = { \__gotham_inner_enable_subsubsectionpage: },
+ subsubsectionframe~default / enable .code:n = { \__gotham_inner_enable_subsubsectionpage: },
+
+ subsubsectionframe~default / false .code:n = { \__gotham_inner_disable_subsubsectionpage: },
+ subsubsectionframe~default / off .code:n = { \__gotham_inner_disable_subsubsectionpage: },
+ subsubsectionframe~default / disable .code:n = { \__gotham_inner_disable_subsubsectionpage: },
+
+ subsubsectionframe~default / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'#1'~is~unknown~for~the~(known)~option~'subsubsectionframe~default',~so~being~ignored. }{helping~message: subsubsectionframe~default / unknown} },
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+
+%%%% Table of Content %%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% \begin{implementation}
+% \begin{macro}{\tikzset{section~number/.style={}} }
+% Definition of how sections, subsections and subsubsections' numbers will appear in 'gotham bullet' style for tables of contents.
+% \UnitTested
+% \TestFiles{gotham-test-042}
+% \begin{macrocode}
+\tikzset{section~number/.style={
+ circle,
+ fill=colorAlert,
+ minimum~size=0.4em,
+ text=colorAlert!10,
+ inner~sep=1.5pt,
+ },
+ section/.style={
+ draw=none,
+ rectangle,
+ minimum~height=1em,
+ minimum~width=0.8\textwidth,
+ text~width=0.8\textwidth,
+ text=fg,
+ align=left
+ },
+ subsection~number/.style={
+ circle,
+ fill=colorBackElement!50,
+ inner~sep=0pt,
+ minimum~size=0.15cm,
+ },
+ subsection/.style={
+ draw=none,
+ rectangle,
+ minimum~height=1em,
+ minimum~width=0.8\textwidth,
+ text~width=0.8\textwidth,
+ text=fg!80,
+ align=left
+ },
+ subsubsection~number/.style={
+ circle,
+ fill=colorBackElement!50,
+ inner~sep=0pt,
+ minimum~size=0.06cm,
+ },
+ subsubsection/.style={
+ draw=none,
+ rectangle,
+ minimum~height=1em,
+ minimum~width=0.8\textwidth,
+ text~width=0.8\textwidth,
+ text=fg!80,
+ align=left
+ },
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate{section~in~toc}{gotham~bullet}}
+% Template definitions for |gotham bullet| style of ToC that appear in section \textbar subsection \textbar subsubsection frame.
+% \UnitTested
+% \TestFiles{gotham-test-042}
+% \begin{macrocode}
+\defbeamertemplate{section~in~toc}{gotham~bullet}{
+ \hspace*{0.4cm}\tikz[baseline=-0.5ex]\node[section~number]{\textbf{\small\inserttocsectionnumber}};
+ \ \tikz[baseline=-0.5ex]\node[section]{\usebeamerfont*{toc~title} \inserttocsection};\\[-0.35cm]
+ \hspace*{1.13cm}{\usebeamercolor*[fg]{footer} \rule{0.6\paperwidth}{0.2pt}\\\nointerlineskip}
+}
+\defbeamertemplate{subsection~in~toc}{gotham~bullet}{
+ \hspace*{0.53cm}\tikz[baseline=-0.5ex]\node[subsection~number]{};
+ \hspace*{0.5cm}\tikz[baseline=-0.5ex]\node[subsection]{\usebeamerfont*{toc~subtitle}\inserttocsubsection};\\[-0.2cm]
+}
+\defbeamertemplate{subsubsection~in~toc}{gotham~bullet}{
+ \hspace*{0.58cm}\tikz[baseline=-0.5ex]\node[subsubsection~number]{};
+ \hspace*{0.69cm}\tikz[baseline=-0.5ex]\node[subsubsection]{\usebeamerfont*{toc~subtitle}\inserttocsubsubsection};\\[-0.2cm]
+}
+% Shaded for sections already done in the presentation.
+\defbeamertemplate{section~in~toc~shaded}{gotham~bullet}{
+ \hspace*{0.4cm}\tikz[baseline=-0.5ex]\node[section~number, fill=colorBackElement!40, text=background]{\usebeamerfont*{toc~subtitle}\textbf{\inserttocsectionnumber}};
+ \ \tikz[baseline=-0.5ex]\node[section, text=colorExample!20]{\usebeamerfont*{toc~title} \inserttocsection};\\[-0.35cm]
+ \hspace*{1.3cm}{\usebeamercolor*[fg]{footer} \rule{0.6\paperwidth}{0.2pt}\\\nointerlineskip}
+}
+\defbeamertemplate{subsection~in~toc~shaded}{gotham~bullet}{
+ \hspace*{0.55cm}\tikz[baseline=-0.5ex]\node[subsection~number,fill=colorBackElement!20]{};
+ \hspace*{0.5cm}\tikz[baseline=-0.5ex]\node[subsection, text=colorBackElement!20]{};\\[-0.2cm]
+}
+\defbeamertemplate{subsubsection~in~toc~shaded}{gotham~bullet}{
+ \hspace*{0.58cm}\tikz[baseline=-0.5ex]\node[subsubsection~number,fill=colorBackElement!20]{};
+ \hspace*{0.69cm}\tikz[baseline=-0.5ex]\node[subsubsection,text=colorBackElement!20]{\usebeamerfont*{toc~subtitle}\inserttocsubsubsection};\\[-0.2cm]
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate{section~in~toc}{gotham~bullet}}
+% Template definitions for |gotham simple| style of ToC that appear in section \textbar subsection \textbar subsubsection frame.
+% \UnitTested
+% \TestFiles{gotham-test-042}
+% \begin{macrocode}
+\defbeamertemplate{part~in~toc}{gotham~simple}{
+ {{\inserttocpartnumber}.}~\inserttocpart
+ \\
+}
+\defbeamertemplate{section~in~toc}{gotham~simple}{
+ {{\inserttocsectionnumber}.}~\inserttocsection
+ \\
+}
+\defbeamertemplate{subsection~in~toc}{gotham~simple}{
+ \quad{{\inserttocsectionnumber}.\inserttocsubsectionnumber.}~\inserttocsubsection%
+ \\
+}
+\defbeamertemplate{subsubsection~in~toc}{gotham~simple}{
+ \qquad{{\inserttocsectionnumber}.\inserttocsubsectionnumber.\inserttocsubsubsectionnumber.}~\inserttocsubsubsection
+ \\
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate{background~canvas}{toc/gotham~simple}, \defbeamertemplate{toc~page}{gotham~simple|bullet}}
+% Definition of toc page style named gotham simple and gotham bullet, used for table of content pages.
+% Both are using a dedicated background canvas.
+% \UnitTested
+% \TestFiles{gotham-test-042}
+% \begin{macrocode}
+\defbeamertemplate{background~canvas}{toc/gotham~simple}{
+ \ifbeamercolorempty[bg]{standin}{}{
+ \color{bg}\vrule width\paperwidth height\paperheight
+ }
+}
+\defbeamertemplate{toc~page}{gotham~simple}{
+ \setbeamertemplate{part~in~toc}[gotham~simple]
+ \setbeamertemplate{section~in~toc}[gotham~simple]
+ \setbeamertemplate{subsection~in~toc}[gotham~simple]
+ \setbeamertemplate{subsubsection~in~toc}[gotham~simple]
+ \setbeamertemplate{background~canvas}[toc/gotham~simple]
+}
+\defbeamertemplate{toc~page}{gotham~bullet}{
+ \setbeamertemplate{part~in~toc}[gotham~bullet]
+ \setbeamertemplate{section~in~toc}[gotham~bullet]
+ \setbeamertemplate{subsection~in~toc}[gotham~bullet]
+ \setbeamertemplate{subsubsection~in~toc}[gotham~bullet]
+ \setbeamertemplate{background~canvas}[toc/gotham~simple]
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{function}{\begin{frame}[toc]}
+% Add a frame option |toc| to display the toc frame template.
+% \end{function}
+% \end{documentation}
+%%%%%%
+% \begin{implementation}
+% \begin{macro}{\begin{frame}[toc]}
+% Add a frame option |toc| to display the toc frame template.
+% To do it, we must add a global boolean variable, capture the option at the begin of the frame and patch the end of the frame.
+% \UnitTested
+% \TestFiles{gotham-test-042}
+% \begin{macrocode}
+\newenvironment{tocenv}{
+ \usebeamertemplate{toc~page}
+}{}
+\__gotham_add_beamerframe_key:n {toc}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate{background~canvas}{toc~part|section|subsection~gotham}}
+% Defintion of the background canvas used by the toc in part\,\textbar\,section\,\textbar\,subsection.
+% \UnitTested
+% \TestFiles{gotham-test-042}
+% \begin{macrocode}
+\defbeamertemplate{background~canvas}{toc~part~gotham}{
+ \ifbeamercolorempty[bg]{normal~text}{}{\color{bg}\vrule width\paperwidth height\paperheight}
+}
+\defbeamertemplate{background~canvas}{toc~section~gotham}{
+ \ifbeamercolorempty[bg]{normal~text}{}{\color{bg}\vrule width\paperwidth height\paperheight}
+}
+\defbeamertemplate{background~canvas}{toc~subsection~gotham}{
+ \ifbeamercolorempty[bg]{normal~text}{}{\color{bg}\vrule width\paperwidth height\paperheight}
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate{toc~part~frame}{gotham~simple}}
+% Definition of the toc in part\,\textbar\,section\,\textbar\,subsection templates for gotham simple style.
+% \UnitTested
+% \TestFiles{gotham-test-042}
+% \begin{macrocode}
+\defbeamertemplate{toc~part~frame}{gotham~simple}{
+ \setbeamertemplate{part~in~toc}[gotham~simple]
+ \setbeamertemplate{section~in~toc}[gotham~simple]
+ \setbeamertemplate{subsection~in~toc}[gotham~simple]
+ \setbeamertemplate{subsubsection~in~toc}[gotham~simple]
+ \setbeamertemplate{background~canvas}[toc~part~gotham]
+ \setbeamertemplate{frametitle}[toc~gotham]
+ % \usebeamertemplate*{part~page}% already included
+}
+\defbeamertemplate{toc~section~frame}{gotham~simple}{
+ \setbeamertemplate{part~in~toc}[gotham~simple]
+ \setbeamertemplate{section~in~toc}[gotham~simple]
+ \setbeamertemplate{subsection~in~toc}[gotham~simple]
+ \setbeamertemplate{subsubsection~in~toc}[gotham~simple]
+ \setbeamertemplate{background~canvas}[toc~section~gotham]
+ \setbeamertemplate{frametitle}[toc~gotham]%
+ % \usebeamertemplate*{section~page}% already included
+}
+\defbeamertemplate{toc~subsection~frame}{gotham~simple}{
+ \setbeamertemplate{part~in~toc}[gotham~simple]
+ \setbeamertemplate{section~in~toc}[gotham~simple]
+ \setbeamertemplate{subsection~in~toc}[gotham~simple]
+ \setbeamertemplate{subsubsection~in~toc}[gotham~simple]
+ \setbeamertemplate{background~canvas}[toc~subsection~gotham]
+ \setbeamertemplate{frametitle}[toc~gotham]
+ % \usebeamertemplate*{subsection~page}% already included
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate{toc~part~frame}{gotham~bullet}}
+% Definition of the toc in part\,\textbar\,section\,\textbar\,subsection templates for gotham bullet style.
+% \UnitTested
+% \TestFiles{gotham-test-042}
+% \begin{macrocode}
+\defbeamertemplate{toc~part~frame}{gotham~bullet}{
+ \setbeamertemplate{part~in~toc}[gotham~bullet]
+ \setbeamertemplate{section~in~toc}[gotham~bullet]
+ \setbeamertemplate{subsection~in~toc}[gotham~bullet]
+ \setbeamertemplate{subsubsection~in~toc}[gotham~bullet]
+ \setbeamertemplate{background~canvas}[toc~part~gotham]
+ \setbeamertemplate{frametitle}[toc~gotham]
+ % \usebeamertemplate*{part~page}% already included
+}
+\defbeamertemplate{toc~section~frame}{gotham~bullet}{
+ \setbeamertemplate{part~in~toc}[gotham~bullet]
+ \setbeamertemplate{section~in~toc}[gotham~bullet]
+ \setbeamertemplate{subsection~in~toc}[gotham~bullet]
+ \setbeamertemplate{subsubsection~in~toc}[gotham~bullet]
+ \setbeamertemplate{background~canvas}[toc~section~gotham]
+ \setbeamertemplate{frametitle}[toc~gotham]%
+ % \usebeamertemplate*{section~page}% already included
+}
+\defbeamertemplate{toc~subsection~frame}{gotham~bullet}{
+ \setbeamertemplate{part~in~toc}[gotham~bullet]
+ \setbeamertemplate{section~in~toc}[gotham~bullet]
+ \setbeamertemplate{subsection~in~toc}[gotham~bullet]
+ \setbeamertemplate{subsubsection~in~toc}[gotham~bullet]
+ \setbeamertemplate{background~canvas}[toc~subsection~gotham]
+ \setbeamertemplate{frametitle}[toc~gotham]
+ % \usebeamertemplate*{subsection~page}% already included
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{function}{\begin{frame}[tocpart]}
+% Add a frame option |tocpart| to display the tocpart frame template.
+% \end{function}
+% \end{documentation}
+%%%%%%
+% \begin{implementation}
+% \begin{macro}{\begin{frame}[tocpart]}
+% Add a frame option |tocpart| to display the tocpart frame template.
+% To do it, we must add a global boolean variable, capture the option at the begin of the frame and patch the end of the frame.
+% \UnitTested
+% \TestFiles{gotham-test-042}
+% \begin{macrocode}
+\bool_new:N \l_gotham_tocpartframe
+\bool_set_false:N \l_gotham_tocpartframe
+\define@key{beamerframe}{tocpart}[true]{
+ \bool_set_true:N \l_gotham_tocpartframe
+ \begingroup
+ \usebeamertemplate{toc~part~frame}
+}
+\apptocmd{\beamer@reseteecodes}{
+ \bool_if:NTF \l_gotham_tocpartframe {
+ \endgroup
+ \bool_set_false:N \l_gotham_tocpartframe
+ }{}
+}{}{}
+% \define@key{beamerframe}{tocpart}[true]{
+% \thispagestyle{navigation@tocpart}
+% }
+% \def\ps@navigation@tocpart{
+% \usebeamertemplate{toc~part~frame}
+% \@nameuse{ps@navigation}
+% }
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{function}{\begin{frame}[tocsec]}
+% Add a frame option |tocsec| to display the tocsec frame template.
+% \end{function}
+% \end{documentation}
+%%%%%%
+% \begin{implementation}
+% \begin{macro}{\begin{frame}[tocsec]}
+% Add a frame option |tocsec| to display the tocsec frame template.
+% To do it, we must add a global boolean variable, capture the option at the begin of the frame and patch the end of the frame.
+% \UnitTested
+% \TestFiles{gotham-test-042}
+% \begin{macrocode}
+\bool_new:N \l_gotham_tocsectionframe
+\bool_set_false:N \l_gotham_tocsectionframe
+\define@key{beamerframe}{tocsec}[true]{
+ \bool_set_true:N \l_gotham_tocsectionframe
+ \begingroup
+ \usebeamertemplate{toc~section~frame}
+}
+\apptocmd{\beamer@reseteecodes}{
+ \bool_if:NTF \l_gotham_tocsectionframe {
+ \endgroup
+ \bool_set_false:N \l_gotham_tocsectionframe
+ }{}
+}{}{}
+% \define@key{beamerframe}{tocsec}[true]{
+% \thispagestyle{navigation@tocsec}
+% }
+% \def\ps@navigation@tocsec{
+% \usebeamertemplate{toc~section~frame}
+% \@nameuse{ps@navigation}
+% }
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{function}{\begin{frame}[tocsubsec]}
+% Add a frame option |tocsubsec| to display the tocsubsec frame template.
+% \end{function}
+% \end{documentation}
+%%%%%%
+% \begin{implementation}
+% \begin{macro}{\begin{frame}[tocsubsec]}
+% Add a frame option |tocsubsec| to display the tocsubsec frame template.
+% To do it, we must add a global boolean variable, capture the option at the begin of the frame and patch the end of the frame.
+% \UnitTested
+% \TestFiles{gotham-test-042}
+% \begin{macrocode}
+\bool_new:N \l_gotham_tocsubsectionframe
+\bool_set_false:N \l_gotham_tocsubsectionframe
+\define@key{beamerframe}{tocsubsec}[true]{
+ \bool_set_true:N \l_gotham_tocsubsectionframe
+ \begingroup
+ \usebeamertemplate{toc~subsection~frame}
+}
+\apptocmd{\beamer@reseteecodes}{
+ \bool_if:NTF \l_gotham_tocsubsectionframe {
+ \endgroup
+ \bool_set_false:N \l_gotham_tocsubsectionframe
+ }{}
+}{}{}
+% \define@key{beamerframe}{tocsubsec}[true]{
+% \thispagestyle{navigation@tocsubsec}
+% }
+% \def\ps@navigation@tocsubsec{
+% \usebeamertemplate{toc~subsection~frame}
+% \@nameuse{ps@navigation}
+% }
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{function}{\begin{frame}[tocsubsubsec]}
+% Add a frame option |tocsubsubsec| to display the tocsubsubsec frame template.
+% \end{function}
+% \end{documentation}
+%%%%%%
+% \begin{implementation}
+% \begin{macro}{\begin{frame}[tocsubsubsec]}
+% Add a frame option |tocsubsubsec| to display the tocsubsubsec frame template.
+% To do it, we must add a global boolean variable, capture the option at the begin of the frame and patch the end of the frame.
+% \UnitTested
+% \TestFiles{gotham-test-042}
+% \begin{macrocode}
+\bool_new:N \l_gotham_tocsubsubsectionframe
+\bool_set_false:N \l_gotham_tocsubsubsectionframe
+\define@key{beamerframe}{tocsubsubsec}[true]{
+ \bool_set_true:N \l_gotham_tocsubsubsectionframe
+ \begingroup
+ \usebeamertemplate{toc~subsubsection~frame}
+}
+\apptocmd{\beamer@reseteecodes}{
+ \bool_if:NTF \l_gotham_tocsubsubsectionframe {
+ \endgroup
+ \bool_set_false:N \l_gotham_tocsubsubsectionframe
+ }{}
+}{}{}
+% \define@key{beamerframe}{tocsubsubsec}[true]{
+% \thispagestyle{navigation@tocsubsubsec}
+% }
+% \def\ps@navigation@tocsubsubsec{
+% \usebeamertemplate{toc~subsubsection~frame}
+% \@nameuse{ps@navigation}
+% }
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{function}{\useinnertheme}
+% \begin{syntax}
+% \cs{useinnertheme}\oarg{option1=value1, ...}\marg{gotham}
+% \textrm{where the options are (default marked as} \defopt{default}\textrm{):}
+% \meta{tocframe template} = \oarg{\defopt{gotham bullet} \textbar gotham simple \textbar ...}
+% \meta{parttocframe template default} = \oarg{\defopt{gotham simple} \textbar gotham bullet}
+% \meta{parttocframe default} = \oarg{\defopt{on} \textbar off}
+% \meta{sectocframe template default} = \oarg{\defopt{gotham simple} \textbar gotham bullet}
+% \meta{sectocframe default} = \oarg{\defopt{on} \textbar off}
+% \meta{subsectocframe template default} = \oarg{\defopt{gotham simple} \textbar gotham bullet}
+% \meta{subsectocframe default} = \oarg{\defopt{on} \textbar off}
+% \end{syntax}
+% The 'package' (useinnertheme) options can control |parttocframe templates| (or |sectocframe| and |subsectocframe| respectively), which define the style of the table of content for partframe (or |sectionframe|, and |subsectionframe| respectively) displayed at every new beginning of sectioning.
+% These templates can be disabled (or re-enabled) by default using the option |parttocframe default| (or |sectocframe| and |subssectocframe| respectively).
+% \end{function}
+% \end{documentation}
+%%%%
+% \begin{implementation}
+% \begin{macro}{inner key -- interface}
+% Controls the inner settings for |parttocframe| (or |sectocframe|, |subsectocframe| respectively).
+% \UnitTested
+% \TestFiles{gotham-test-041}
+% \begin{macrocode}
+\keys_define:nn { gotham / inner }
+{
+ % TOC style
+ tocframe~template .usage:n = { general },
+ tocframe~template .default:n = { gotham~bullet },
+ tocframe~template .code:n = { \__gotham_set_template:nn{toc~page}{#1} }
+}
+
+\keys_define:nn { gotham / inner }{
+ % parttocframe template
+ parttocframe~template .usage:n = { general },
+ parttocframe~template .default:n = { gotham~simple },
+ parttocframe~template .code:n = { \__gotham_set_template:nn{toc~part~frame}{#1} }
+}
+\keys_define:nn { gotham / inner }
+{
+ % parttocframe default
+ parttocframe~default .choice:,
+ parttocframe~default .usage:n = { general },
+ parttocframe~default .default:n = { true },
+
+ parttocframe~default / true .code:n = { \booltrue{partContent} },
+ parttocframe~default / on .code:n = { \booltrue{partContent} },
+ parttocframe~default / enable .code:n = { \booltrue{partContent} },
+
+ parttocframe~default / false .code:n = { \boolfalse{partContent} },
+ parttocframe~default / off .code:n = { \boolfalse{partContent} },
+ parttocframe~default / disable .code:n = { \boolfalse{partContent} },
+
+ parttocframe~default / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'#1'~is~unknown~for~the~(known)~option~'parttocframe~default',~so~being~ignored. }{helping~message: parttocframe~default / unknown} },
+}
+
+\keys_define:nn { gotham / inner }{
+ % sectiontocframe template
+ sectiontocframe~template .usage:n = { general },
+ sectiontocframe~template .default:n = { gotham~simple },
+ sectiontocframe~template .code:n = { \__gotham_set_template:nn{toc~section~frame}{#1} }
+}
+\keys_define:nn { gotham / inner }
+{
+ % sectiontocframe default
+ sectiontocframe~default .choice:,
+ sectiontocframe~default .usage:n = { general },
+ sectiontocframe~default .default:n = { true },
+
+ sectiontocframe~default / true .code:n = { \booltrue{sectionContent} },
+ sectiontocframe~default / on .code:n = { \booltrue{sectionContent} },
+ sectiontocframe~default / enable .code:n = { \booltrue{sectionContent} },
+
+ sectiontocframe~default / false .code:n = { \boolfalse{sectionContent} },
+ sectiontocframe~default / off .code:n = { \boolfalse{sectionContent} },
+ sectiontocframe~default / disable .code:n = { \boolfalse{sectionContent} },
+
+ sectiontocframe~default / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'#1'~is~unknown~for~the~(known)~option~'sectiontocframe~default',~so~being~ignored. }{helping~message: sectiontocframe~default / unknown} },
+}
+
+\keys_define:nn { gotham / inner }{
+ % subsectiontocframe template
+ subsectiontocframe~template .usage:n = { general },
+ subsectiontocframe~template .default:n = { gotham~simple },
+ subsectiontocframe~template .code:n = { \__gotham_set_template:nn{toc~subsection~frame}{#1} }
+}
+\keys_define:nn { gotham / inner }
+{
+ % subsectiontocframe default
+ subsectiontocframe~default .choice:,
+ subsectiontocframe~default .usage:n = { general },
+ subsectiontocframe~default .default:n = { true },
+
+ subsectiontocframe~default / true .code:n = { \booltrue{subsectionContent} },
+ subsectiontocframe~default / on .code:n = { \booltrue{subsectionContent} },
+ subsectiontocframe~default / enable .code:n = { \booltrue{subsectionContent} },
+
+ subsectiontocframe~default / false .code:n = { \boolfalse{subsectionContent} },
+ subsectiontocframe~default / off .code:n = { \boolfalse{subsectionContent} },
+ subsectiontocframe~default / disable .code:n = { \boolfalse{subsectionContent} },
+
+ subsectiontocframe~default / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'#1'~is~unknown~for~the~(known)~option~'subsectiontocframe~default',~so~being~ignored. }{helping~message: subsectiontocframe~default / unknown} },
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+
+%% Environments styles %%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% \begin{implementation}
+% \begin{variable}{\gotham@blocksep, \gotham@blockadjust}
+% |blocksep| and |blockadjust| lengths used in |\gotham@block| definition.
+% While |gotham@strut| is a command to ensure verticale spacing equivalent to a line.
+% \begin{macrocode}
+\newlength{\gotham@blocksep}
+\newlength{\gotham@blockadjust}
+\setlength{\gotham@blocksep}{0.75ex}
+\setlength{\gotham@blockadjust}{0.25ex}
+\providecommand{\gotham@strut}{
+ \vphantom{ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz (/)}
+}
+% \end{macrocode}
+% \end{variable}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{variable}{\gotham@parskip, \linespread}
+% length parskip defined by gotham and the linespread are adjusted.
+% \begin{macrocode}
+ \newlength{\gotham@parskip}
+ \setlength{\gotham@parskip}{0.5em}
+ \setlength{\parskip}{\gotham@parskip}
+ \linespread{1.15}
+% \end{macrocode}
+% \end{variable}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\newcommand{\gotham@block}[1]}
+% The three different block environments differ only in their colours.
+% Rather than repeat the essentially the same template three times, we use the auxiliary macro |\gotham@block| to define all three templates.
+% \UnitTested
+% \TestFiles{gotham-test-043}
+% \begin{macrocode}
+\newcommand{\gotham@block}[1]{
+ \par\vskip\medskipamount
+ \setlength{\parskip}{0pt}
+
+ % If a background color is defined for the block title or body, we need to add a little bit of padding to the corresponding box.
+ % Ideally, this would be accomplished by setting |colsep=0.75ex|, which is intended to add ``color separation space'' only when the box has a colored background.
+ % Unfortunately, |colsep| also adds this separation if the background color is inherited, even if the inherited color is actually empty.
+ % (The technical reason for this boils down to the fact that the |\ifx| directive does not expand macros.)
+ %
+ % To achieve the correct spacing for |alertblock|s and |exampleblock|s as well as for normal blocks, we have to begin the |beamercolorbox| differently based on whether |block title| has an empty background.
+ %
+ % If the |block title| background is empty, or the user has explicitly removed the background from (e.g.) |block title alerted|, we just need to set a rightskip for a nice ragged-right block title.
+ \ifbeamercolorempty[bg]{block~title#1}{%
+ \begin{beamercolorbox}[rightskip=0pt~plus~4em]{block~title#1}
+ }{
+ \ifbeamercolorempty[bg]{block~title}{
+ \begin{beamercolorbox}[rightskip=0pt~plus~4em]{block~title#1}
+ }
+ % Otherwise, if the |block title| has a background, we set the padding based on |\gotham@blockskip|.
+ % However, we have to visually compensate for the |\gotham@strut| added to the block title (see below) by subtracting |\gotham@blockadjust| from the top and bottom padding.
+ %
+ {
+ \begin{beamercolorbox}[
+ sep=\dimexpr\gotham@blocksep-\gotham@blockadjust\relax,
+ leftskip=\gotham@blockadjust,
+ rightskip=\dimexpr\gotham@blockadjust~plus~4em\relax,
+ ]{block~title#1}
+ }
+ }
+ % We can now set the contents of the |block title|.
+ % The zero-width but positive-height box |\gotham@strut| ensures that the block title box has a consistent height, even if it lacks punctuation, ascenders, or descenders.
+ %
+ \usebeamerfont*{block~title#1}
+ \gotham@strut
+ \insertblocktitle
+ \gotham@strut
+ \end{beamercolorbox}
+ % Next, we typeset the |block body|.
+ % This the code is similar to, but simpler than, the |block title| code since we don't need to adjust for any struts.
+ \nointerlineskip
+ \ifbeamercolorempty[bg]{block~body#1}{
+ \begin{beamercolorbox}[vmode]{block~body#1}
+ }{
+ \ifbeamercolorempty[bg]{block~body}{
+ \begin{beamercolorbox}[vmode]{block~body#1}
+ }{
+ \begin{beamercolorbox}[sep=\gotham@blocksep, vmode]{block~body#1}
+ \vspace{-\gotham@parskip}
+ }
+ }
+ \usebeamerfont{block~body#1}
+ \setlength{\parskip}{\gotham@parskip}
+}
+% This concludes the auxiliary macro |\gotham@block|.
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{function}{\begin{block}, \begin{alertblock}, \begin{exampleblock}}
+% Three boxed environment are defined by default: |block|, |alertblock| and |exampleblock|.
+% The style of blocks can be changed using |\setbeamertemplate{blocks}[rounded][shadow=true]|.
+% \end{function}
+% \end{documentation}
+%%%%
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate{block~begin}{gotham}}
+% We could define the block beamer templates using the auxiliary macro |\gotham@block|....
+% Yet, following the precious advice from Sam Carter \url{https://github.com/jolars/moloch/issues/6}, we should keep beamer blocks.
+% But of course, one can go back to metropolis style using the commented lines here.
+% \UnitTested
+% \TestFiles{gotham-test-043}
+% \begin{macrocode}
+% \defbeamertemplate*{block~begin}{gotham}{\gotham@block{}}
+% \defbeamertemplate*{block~alerted~begin}{gotham}{\gotham@block{~alerted}}
+% \defbeamertemplate*{block~example~begin}{gotham}{\gotham@block{~example}}
+% \defbeamertemplate*{block~end}{gotham}{\end{beamercolorbox}\vspace*{0.2ex}}
+% \defbeamertemplate*{block~alerted~end}{gotham}{\end{beamercolorbox}\vspace*{0.2ex}}
+% \defbeamertemplate*{block~example~end}{gotham}{\end{beamercolorbox}\vspace*{0.2ex}}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{function}{\begin{itemize}}
+% Three level of itemize environment are defined by default with decreasing size: |circle|, |triangle| and |square|.
+% \end{function}
+% \end{documentation}
+%%%%
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate{block~begin}{gotham}}
+% We define the block beamer templates using the auxiliary macro |\gotham@block|.
+% \UnitTested
+% \TestFiles{gotham-test-043}
+% \begin{macrocode}
+\defbeamertemplate*{itemize~item}{gotham}{%\textbullet}
+ \Large
+ \setbeamertemplate{itemize~item}[circle]
+ \usebeamertemplate{itemize~item}
+}
+\defbeamertemplate*{itemize~subitem}{gotham}{%$\blacktriangleright$
+ \scriptsize
+ \setbeamertemplate{itemize~subitem}[triangle]
+ \usebeamertemplate{itemize~subitem}
+}
+\defbeamertemplate*{itemize~subsubitem}{gotham}{%square or -
+ \Tiny
+ $\blacksquare$ % \textbf{-}
+ % \setbeamertemplate{itemize~subsubitem}[square]
+ % \usebeamertemplate{itemize~subsubitem} % not working because the size of the square is hardcoded.
+}
+
+%% TRY: enumitem package, enumitem and beamer are incompatible.
+% \setitemize{label=\usebeamerfont*{itemize~item}
+% \usebeamercolor[fg]{itemize~item}
+% \usebeamertemplate{itemize~item}}
+%% I tried to redefine everything to make them compatible, but it breaks the [alert] environment... So, I gave up.
+
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{function}{\defbeamertemplate{caption}, \defbeamertemplate{footnote}}
+% Gotham defines float captions with a numbered style and footnotes with traditional style (color can be tuned with |\setbeamercolor{footnote}|).
+% \end{function}
+% \end{documentation}
+%%%%%%
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate{caption}, \defbeamertemplate{footnote}}
+% Templates definitions for caption and footnote.
+% \TestMissing{explanation}
+% \UnitTested
+% \TestFiles{gotham-test-043}
+% \begin{macrocode}
+\defbeamertemplate*{caption~label~separator}{gotham}{:~}
+\setbeamertemplate{caption}[numbered]
+\defbeamertemplate*{footnote}{gotham}{
+ \parindent~0em\noindent
+ \raggedright
+ \usebeamercolor{footnote}\hbox~to~0.8em{\hfil\insertfootnotemark}\insertfootnotetext\par
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{Default inner keys}
+% Apply default key options.
+% \UnitTested
+% \TestFiles{gotham-test-043}
+% \begin{macrocode}
+% when no value is given, default is called.
+\keys_set:nn { gotham / inner } {
+ title~page,
+ watermark~template, watermark~default,
+ standout~template, standin~template,
+ partframe~template, partframe~default,
+ sectionframe~template, sectionframe~default,
+ subsectionframe~template, subsectionframe~default,
+ subsubsectionframe~template, subsubsectionframe~default,
+ tocframe~template,
+ parttocframe~template, parttocframe~default,
+ sectiontocframe~template, sectiontocframe~default,
+ subsectiontocframe~template, subsectiontocframe~default,
+ % subsubsectiontocframe~template, subsubsectiontocframe~default,
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{Process inner keys}
+% Process package options.
+% \UnitTested
+% \TestFiles{gotham-test-043}
+% \begin{macrocode}
+\ProcessKeyOptions[ gotham / inner ]
+% \mode<all>
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+
+% \begin{implementation}
+% \begin{macrocode}
+%\endinput
+%</inner>
+% \end{macrocode}
+% \end{implementation}
+%
+%
+% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%
+%
+%\begin{implementation}
+% \begin{macrocode}
+%<*outer>
+\ProvidesExplPackage{beamerouterthemegotham}{2024/09/20}{1.1.0.b}{gotham outer theme}
+\RequirePackage{expl3}
+\RequirePackage{xfp}
+\RequirePackage{calc}
+\RequirePackage{tikz}
+% \end{macrocode}
+% \end{implementation}
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%% OUTER %%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+%
+% \begin{implementation}
+% \begin{macro}{Compitibility mode for colors}
+% FROM COLOR THEME: useful to provide this recall when the inner theme is loaded without the color theme.
+% \begin{macrocode}
+\@ifundefined{\string\color@colorProgBar}{
+ \providebool{darkBG} \boolfalse{darkBG}
+ \providebool{transparentBG} \booltrue{transparentBG}
+ \colorlet{colorBG}{white}
+ \colorlet{colorFG}{black}
+ \colorlet{colorFrametitle}{purple}
+ \colorlet{colorStandout}{purple}
+ \colorlet{colorStandin}{purple}
+ \colorlet{colorTitlepage}{purple}
+ \colorlet{colorFiligrane}{gray}
+ \colorlet{colorBackElement}{gray}
+ \colorlet{colorProgBar}{orange}
+ \colorlet{colorAlert}{red}
+ \colorlet{colorExample}{green}
+ \colorlet{colorFrametitle}{purple}
+ \colorlet{colorTitlepage}{purple}
+ \setbeamercolor{progress~bar}{
+ use=alerted~text,
+ fg=colorProgBar,
+ bg=alerted~text.fg!50!black!30
+ }
+ \setbeamercolor{progress~bar~in~head/foot}{%
+ use=progress~bar,
+ parent=progress~bar
+ }
+ \setbeamercolor{progress~bar~in~part~page}{
+ use=progress~bar,
+ parent=progress~bar
+ }
+ \setbeamercolor{progress~bar~in~section~page}{
+ use=progress~bar,
+ parent=progress~bar
+ }
+ \setbeamercolor{progress~bar~in~splitvert}{
+ use=progress~bar,
+ parent=progress~bar
+ }
+ \setbeamercolor{frametitleSection}{use=primary~palette, bg=, fg=primary~palette.bg}
+ \setbeamercolor{standout}{use=primary~palette, bg=colorStandout, fg=primary~palette.bg}
+ \setbeamercolor{standin}{use=normal~text, bg=colorStandin, fg=normal~text.fg}
+ \setbeamercolor{section~in~toc}{use=normal~text, parent=normal~text,}
+ \setbeamercolor{subsection~in~toc}{use=normal~text, parent=normal~text,}
+ \setbeamercolor{subsubsection~in~toc}{use=normal~text, parent=normal~text,}
+}{
+ % else the colors are defined: this is fine.
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{variable}{\l__gotham_template_name_prop}
+% Dictionary/map of template elements and predefined option according to the context.
+% Naming convention: template/What/Who, i.e. Name: key=background~canvas/watermark, value = gotham~draft
+% \end{variable}
+% \end{documentation}
+%%%%%%
+% \begin{implementation}
+% \begin{variable}{\l__gotham_template_name_prop}
+% Dictionary/map of template elements and predefined option according to the context.
+% Naming convention: template/What/Who, i.e. Name: key=background~canvas/watermark, value = gotham~draft
+% \begin{macrocode}
+\prop_if_exist:NTF \l__gotham_template_name_prop
+{}{
+ % if not defined than define it.
+ \prop_new:N \l__gotham_template_name_prop
+}
+% \end{macrocode}
+% \end{variable}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{variable}{\l__gotham_tmpa_seq, \l__gotham_tmpa_tl, \l__gotham_tmpb_tl}
+% tmp variables
+% \begin{macrocode}
+\seq_if_exist:NTF \l__gotham_tmpa_seq
+{}{
+ % sequence
+ \seq_new:N \l__gotham_tmpa_seq
+}
+\tl_if_exist:NTF \l__gotham_tmpa_tl
+{}{
+ % token list A
+ \tl_new:N \l__gotham_tmpa_tl
+}
+\tl_if_exist:NTF \l__gotham_tmpb_tl
+{}{
+ % token list B
+ \tl_new:N \l__gotham_tmpb_tl
+}
+% \end{macrocode}
+% \end{variable}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{function}{\__gotham_set_prop_template:nn}
+% \begin{arguments}
+% \item element name (from beamer doc) in other word, the name the template category
+% \item prefined option (from beamer doc)
+% \end{arguments}
+% Function that store in a map the name a template use later.
+% The following naming convention is used: Template/What/Who~Name: watermark/gotham~draft.
+% The means for example that if a beamer template is defined using
+% |\defbeamertemplate{background}{watermark/gotham~draft}{...}|,
+% then the function has to be call using
+% |\__gotham_set_prop_template{background/watermark}{gotham~draft}|,
+% that will filled internally the map using the l3 command
+% |\prop_put:Nnn \l__gotham_template_name_prop {background/watermark}{gotham~draft}|.
+% If the template name given as input does not exist, an error is raised.
+% \TestFiles{gotham-test-044}
+% \begin{macrocode}
+\cs_if_exist:NTF \__gotham_set_prop_template:nn {}{
+ % if it doesn't exist, then create it.
+ \cs_new_protected:Nn \__gotham_set_prop_template:nn
+ {
+ % Check if the first argument contains a /
+ \tl_if_in:nnTF { #1 } { / }
+ {
+ % Split the first around the /
+ \seq_set_split:Nnn \l__gotham_tmpa_seq { / } { #1 }
+ \tl_set:Nn \l__gotham_tmpa_tl { \seq_item:Nn \l__gotham_tmpa_seq { 1 } }
+ \tl_set:Nn \l__gotham_tmpb_tl { \seq_item:Nn \l__gotham_tmpa_seq { 2 } }
+ % Check if template exist
+ \cs_if_exist:cTF {beamer@@tmpop@\exp_not:V \l__gotham_tmpa_tl @\exp_not:V \l__gotham_tmpb_tl /#2} {
+ % set the value in the map, so it can be called later.
+ \prop_put:Nnn \l__gotham_template_name_prop {#1} {#2}
+ % \setbeamertemplate{#1}[#2]
+ }{
+ \PackageError{beamerthemegotham}
+ {The~beamer~template~named~'\l__gotham_tmpa_tl'~with~the~option~'\l__gotham_tmpb_tl/#2'~does~not~exist}
+ {helping~message}
+ }
+ }{% false -> error
+ \PackageError{beamerthemegotham}
+ {
+ When~using~'\c_backslash_str\cs_to_str:N \__gotham_set_prop_template'~the~first~argument~should~contain~a~'/'~to~respect~the~naming~convention~used~(Template/what/Who~name),~but~you~gave~'#1'.~
+ As~example:~if~'\c_backslash_str defbeamertemplate{background}{watermark/gotham~draft}'...,~then~use~'\c_backslash_str\cs_to_str:N \__gotham_set_prop_template{background/watermark}{gotham~draft}'
+ }{helping~message}
+ }
+ }
+}
+% \end{macrocode}
+% \end{function}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{function}{\__gotham_add_beamerframe_key:n}
+% \begin{arguments}
+% \item Name of the option to add, this name should also correspond to the name of the environment followed by the suffix 'env'.
+% \end{arguments}
+% Function to add an option of a frame using an environment.
+% For example, if the name 'optionA' is the argument given to the function, an frame option named 'optionA' will be added, and this option will surround the frame with the environment named 'optionAenv'.
+% So, the environment 'optionA' must have been declared before.
+% \TestFiles{gotham-test-038}
+% \begin{macrocode}
+\seq_if_exist:NTF \l__gotham_frameoption_tmp_seq {}{
+ % Define the sequence of frameoptions environments to close
+ \seq_new:N \l__gotham_frameoption_tmp_seq
+}
+
+\cs_if_exist:NTF \__gotham_add_beamerframe_key:n {}{
+ % if it doesn't exist, then create it.
+
+ % Define the command to add frameoptions
+ \cs_new_protected:Nn \__gotham_add_beamerframe_key:n {
+ \define@key{beamerframe}{ #1 }[true]{
+ \begin{#1env}
+ \seq_put_left:Nn \l__gotham_frameoption_tmp_seq { \end{#1env} }
+ }
+ }
+
+ % At the end of frames close the opened environments.
+ \apptocmd{\beamer@reseteecodes}{
+ % Join elements in the queue without separator then output the result
+ \seq_use:Nn \l__gotham_frameoption_tmp_seq {}
+ % clear working queue
+ \seq_clear:N \l__gotham_frameoption_tmp_seq
+ }{}{}
+}
+% \end{macrocode}
+% \end{function}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{function}{\__gotham_set_template:nn}
+% \begin{syntax}
+% \cs{__gotham_set_template:nn} \marg{element} \marg{option}
+% \end{syntax}
+% Function that test if a beamertemplate with the given element and option name exists. If it exists then it is set (applied), otherwise an error is raised.
+% \end{function}
+% \end{documentation}
+%%%%%%
+% \begin{implementation}
+% \begin{function}{\__gotham_set_template:nn}
+% \begin{arguments}
+% \item element name (from beamer doc) in other word, the name the template category
+% \item prefined option (from beamer doc)
+% \end{arguments}
+% Function to set a beamertemplate with an option if it exists, otherwise an error is raised.
+% Unfortunatly, (as far as I know) it not possible to test if the element name exists independtly from the prefined option.
+% \TestFiles{gotham-test-038}
+% \begin{macrocode}
+\cs_if_exist:NTF \__gotham_set_template:nn {}{
+ % If it doesn't exist, then create it.
+
+ % Define the command to set template if it exists.
+ \cs_new_protected:Nn \__gotham_set_template:nn
+ {
+ \cs_if_exist:cTF {beamer@@tmpop@#1@#2} {
+ \setbeamertemplate{#1}[#2]
+ }{
+ \PackageError{beamerinnerthemegotham}
+ {The~beamer~template~named~'#1'~with~the~option~'#2'~does~not~exist}
+ {helping~message unknown setbeamertemplate option}
+ }
+ }
+}
+% \end{macrocode}
+% \end{function}
+% \end{implementation}
+
+
+%%% Sidebars %%%
+%%%%%%%%%%%%%%%%
+
+% \begin{documentation}
+% \begin{variable}{\sidebarRightHOffset, \sidebarLeftHOffset}
+% Length controling the horizontal offset in order to position |\gothamRightFiligrane| (respectively |\gothamLeftFiligrane|) when using the default sidebar canvas (right and left) from gotham.
+% \end{variable}
+% \end{documentation}
+%%%%%%
+% \begin{implementation}
+% \begin{variable}{\sidebarRightHOffset, \sidebarLeftHOffset}
+% lengths between borders (right and left) and the commands (|\gothamRightFiligrane| and |\gothamleftFiligrane|) used inside |\setbeamertemplate{sidebar~canvas~right}[default/gotham~filigrane]| (left respectively).
+% \UnitTested
+% \TestFiles{gotham-test-044}
+% \begin{macrocode}
+% sidebar lengths
+\newlength{\sidebarRightHOffset}
+\setlength{\sidebarRightHOffset}{-2.5ex}
+\newlength{\sidebarLeftHOffset}
+\setlength{\sidebarLeftHOffset}{+0.5ex}
+% \end{macrocode}
+% \end{variable}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{function}{\gothamRightFiligrane, \gothamLeftFiligrane}
+% Commands used internally by |\setbeamertemplate{sidebar~canvas~right}[default/gotham~filigrane]| (left respectively), that are empty by default.
+% But these commands can be simply redefined to custom watermarks (filigrane) in sidebars.
+% \end{function}
+% \end{documentation}
+%%%%%%
+% \begin{implementation}
+% \begin{macro}{\gothamRightFiligrane, \gothamLeftFiligrane}
+% Commands used internally by |\setbeamertemplate{sidebar~canvas~right}[default/gotham~filigrane]| (left respectively), that are empty by default.
+% But these commands can be simply redefined to custom watermarks (filigrane) in sidebars.
+% \UnitTested
+% \TestFiles{gotham-test-044}
+% \begin{macrocode}
+% Command to add filigrane/edging in sidebar
+\newcommand{\gothamRightFiligrane}{
+ % left empty intentionally
+ % \rotatebox{90}{gotham right filigrane pattern}
+
+}
+\newcommand{\gothamLeftFiligrane}{
+ % left empty intentionally
+ % \rotatebox{-90}{\hspace*{5em} gotham left filigrane pattern}
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate{sidebar~canvas~right}{}, \defbeamertemplate{sidebar~canvas~left}{}}
+% Definitions of |\defbeamertemplate{sidebar~canvas~right}| (respectively |\defbeamertemplate{sidebar~canvas~left}|) that are used by gotham by default.
+% \UnitTested
+% \TestFiles{gotham-test-044}
+% \begin{macrocode}
+\defbeamertemplate{sidebar~right}{default/beamer}{
+ \vfill
+ \llap{\insertlogo\hskip0.1cm}
+ \vskip2pt
+ \llap{\usebeamertemplate***{navigation~symbols}\hskip0.1cm}
+ \vskip2pt
+}
+\defbeamertemplate{sidebar~right}{default/empty}{}
+\defbeamertemplate{sidebar~canvas~right}{default/empty}{}
+\defbeamertemplate{sidebar~canvas~right}{default/gotham~filigrane}{
+ % pull to the left otherwise, the filigrane is outside of the frame.
+ \hspace*{\sidebarRightHOffset}
+ \gothamRightFiligrane
+}
+\defbeamertemplate{sidebar~left}{default/empty}{}
+\defbeamertemplate{sidebar~canvas~left}{default/empty}{}
+\defbeamertemplate{sidebar~canvas~left}{default/gotham~filigrane}{
+ \hspace*{\sidebarLeftHOffset}
+ \gothamLeftFiligrane
+}
+% Add the template to the prop (dictionary) of background template to use according to the situation
+\prop_put:Nnn \l__gotham_template_name_prop {sidebar~canvas~left/default} {gotham~filigrane}
+\prop_put:Nnn \l__gotham_template_name_prop {sidebar~canvas~right/default} {gotham~filigrane}
+\prop_put:Nnn \l__gotham_template_name_prop {sidebar~left/default} {empty}
+\prop_put:Nnn \l__gotham_template_name_prop {sidebar~right/default} {beamer}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{variable}{\l_gotham_defaultEdging}
+% Boolean to triggering if edging should be displayed by default (without giving the frame option).
+% The variable is |false| by default.
+% \end{variable}
+% \end{documentation}
+%%%%%%
+% \begin{implementation}
+% \begin{macro}{\l_gotham_defaultEdging}
+% Boolean variable to display the edging by default (or not).
+% \UnitTested
+% \TestFiles{gotham-test-044}
+% \begin{macrocode}
+\bool_new:N \l_gotham_defaultEdging
+\bool_set_false:N \l_gotham_defaultEdging
+% At every new frame, reset the options to default (unless some options/keys are given)
+\BeforeBeginEnvironment{frame}{
+ \bool_if:NTF \l_gotham_defaultEdging {
+ \setbeamertemplate{sidebar~canvas~left}[default/\prop_item:Nn \l__gotham_template_name_prop {sidebar~canvas~left/default}]
+ \setbeamertemplate{sidebar~canvas~right}[default/\prop_item:Nn \l__gotham_template_name_prop {sidebar~canvas~right/default}]
+ }{
+ % false
+ \setbeamertemplate{sidebar~canvas~left}[default/empty]
+ \setbeamertemplate{sidebar~canvas~right}[default/empty]
+ }
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{function}{\begin{frame}[edging]}
+% Add a frame option |edging| to display edging in sidebar canvas.
+% \end{function}
+% \end{documentation}
+%%%%%%
+% \begin{implementation}
+% \begin{macro}{\begin{frame}[edging]}
+% Add a frame option |edging| to display an empty sidebar canvas canvas.
+% To do it, we must add a global boolean variable, capture the option at the begin of the frame and patch the end of the frame.
+% \UnitTested
+% \TestFiles{gotham-test-044}
+% \begin{macrocode}
+% bool to trigger the add of edging in sidebar canvas
+\newenvironment{edgingenv}{
+ \setbeamertemplate{sidebar~canvas~left}[
+ default/\prop_item:Nn \l__gotham_template_name_prop {sidebar~canvas~left/default}
+ ]
+ \setbeamertemplate{sidebar~canvas~right}[
+ default/\prop_item:Nn \l__gotham_template_name_prop {sidebar~canvas~right/default}
+ ]
+}{}
+\__gotham_add_beamerframe_key:n {edging}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{function}{\begin{frame}[noedging]}
+% Add a frame option |noedging| to do not display noedging in sidebar canvas.
+% \end{function}
+% \end{documentation}
+%%%%%%
+% \begin{implementation}
+% \begin{macro}{\begin{frame}[noedging]}
+% Add a frame option |noedging| to do not display an empty sidebar canvas canvas.
+% To do it, we must add a global boolean variable, capture the option at the begin of the frame and patch the end of the frame.
+% \UnitTested
+% \TestFiles{gotham-test-044}
+% \begin{macrocode}
+% bool to trigger the add of noedging in sidebar canvas
+\newenvironment{noedgingenv}{
+ \setbeamertemplate{sidebar~canvas~left}[default/empty]
+ \setbeamertemplate{sidebar~canvas~right}[default/empty]
+}{}
+\__gotham_add_beamerframe_key:n {noedging}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{function}{\useoutertheme}
+% \begin{syntax}
+% \cs{useoutertheme}\oarg{option1=value1, ...}\marg{gotham}
+% \textrm{where the options are (default marked as} \defopt{default}\textrm{):}
+% \meta{edging default} = \oarg{\defopt{off} \textbar on }
+% \meta{sidebar canvas left template} = \oarg{\defopt{gotham} \textbar ...}
+% \meta{sidebar canvas right template} = \oarg{\defopt{gotham filigrane} \textbar empty \textbar ...}
+% \end{syntax}
+% The 'package' (useoutertheme) options can control |sidebar canvas right| (and |sidebar canvas left|) templates.
+% These templates are activated when giving the frame option |\begin{frame}[edging]|.
+% The option |edging default=on| can enable the |sidebar canvas right| (and |sidebar canvas left|) templates on every frame; but it can still be turned off for specific frames when using the frame option |noedging|.
+% \end{function}
+% \end{documentation}
+%%%%
+% \begin{implementation}
+% \begin{macro}{outer key -- interface}
+% Controls the outer settings for sidebar canvas right and sidebar canvas left.
+% \UnitTested
+% \TestFiles{gotham-test-044}
+% \begin{macrocode}
+\keys_define:nn { gotham / outer }
+{
+ % sidebar~canvas~right template
+ sidebar~canvas~right~template .usage:n = { general },
+ sidebar~canvas~right~template .default:n = { gotham~filigrane },
+ sidebar~canvas~right~template .code:n = { \__gotham_set_prop_template:nn{sidebar~canvas~right/default}{#1} },
+}
+\keys_define:nn { gotham / outer }
+{
+ % sidebar~canvas~left template
+ sidebar~canvas~left~template .usage:n = { general },
+ sidebar~canvas~left~template .default:n = { gotham~filigrane },
+ sidebar~canvas~left~template .code:n = { \__gotham_set_prop_template:nn{sidebar~canvas~left/default}{#1} },
+}
+\keys_define:nn { gotham / outer }{
+ % edging default
+ edging~default .choice:,
+ edging~default .usage:n = { general },
+ edging~default .default:n = { false },
+
+ edging~default / true .code:n = { \bool_set_true:N \l_gotham_defaultEdging },
+ edging~default / on .code:n = { \bool_set_true:N \l_gotham_defaultEdging },
+ edging~default / enable .code:n = { \bool_set_true:N \l_gotham_defaultEdging },
+
+ edging~default / false .code:n = { \bool_set_false:N \l_gotham_defaultEdging },
+ edging~default / off .code:n = { \bool_set_false:N \l_gotham_defaultEdging },
+ edging~default / disable .code:n = { \bool_set_false:N \l_gotham_defaultEdging },
+
+ edging~default / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'#1'~is~unknown~for~the~(known)~option~'edging~default',~so~being~ignored. }{helping~message: edging~default / unknown} },
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+
+%%% Navigation \& Logo %%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% \begin{documentation}
+% \begin{function}{\defbeamertemplate{navigation~symbols}{empty} }
+% By default the navigation symbols are disable.
+% \end{function}
+% \end{documentation}
+%%%%%%
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate*{navigation~symbols}{empty} }
+% Apply the empty navigation symbol template by default.
+% \UnitTested
+% \TestFiles{gotham-test-045}
+% \begin{macrocode}
+\defbeamertemplate*{navigation~symbols}{empty}{}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{function}{\defbeamertemplate{navigation~symbols}{default} }
+% Navigation symbols can be turned on using |\setbeamertemplate{navigation symbols}[default]|.
+% \end{function}
+% \end{documentation}
+%%%%%%
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate{navigation~symbols}{horizontal} }
+% From Beamer default theme.
+% \UnitTested
+% \TestFiles{gotham-test-045}
+% \begin{macrocode}
+% \setbeamertemplate{navigation~symbols}[vertical]
+% \setbeamertemplate{navigation~symbols}[only~frame~symbol]
+% \setbeamertemplate{navigation~symbols}[default]% = horizontal
+% \defbeamertemplate{navigation~symbols}{horizontal}{
+% \usebeamercolor[fg]{navigation~symbols}
+% \insertslidenavigationsymbol
+% \insertframenavigationsymbol
+% \insertsubsectionnavigationsymbol
+% \insertsectionnavigationsymbol
+% \insertdocnavigationsymbol
+% \insertbackfindforwardnavigationsymbol
+% }
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate{logo}{empty}}
+% Template used sometimes to have no logo on specific frames.
+% \UnitTested
+% \TestFiles{gotham-test-045}
+% \begin{macrocode}
+\defbeamertemplate{logo}{empty}{}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{function}{\begin{frame}[nologo]}
+% Add a frame option |nologo|, if you do not want your logo to be displayed.
+% \end{function}
+% \end{documentation}
+%%%%%%
+% \begin{implementation}
+% \begin{macro}{\begin{frame}[nologo]}
+% Add a frame option |nologo|, if you do not want your logo to be displayed.
+% To do it, we must add a global boolean variable, capture the option at the begin of the frame and patch the end of the frame.
+% \UnitTested
+% \TestFiles{gotham-test-045}
+% \begin{macrocode}
+% bool to trigger the add of nologo action on frame.
+\newenvironment{nologoenv}{
+ \setbeamertemplate{logo}[empty]
+}{}
+\__gotham_add_beamerframe_key:n {nologo}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+
+%%% Headline \& Frametitle %%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%% Headline %%%
+
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate{headline}{default/gotham}}
+% The headline template is empty by default by can be changed when using progress bar or the current section.
+% \UnitTested
+% \TestFiles{gotham-test-046, gotham-test-046b, gotham-test-047}
+% \begin{macrocode}
+\defbeamertemplate{headline}{default/gotham}{}
+\prop_put:Nnn \l__gotham_template_name_prop {headline/default} {gotham}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate{headline}{default/gotham~section}}
+% The headline template used to print the current section name and subection.
+% This template is used with |circlehead| progress bar
+% \UnitTested
+% \TestFiles{gotham-test-046, gotham-test-046b, gotham-test-047}
+% \begin{macrocode}
+\defbeamertemplate{headline}{default/gotham~section}{
+ \begin{beamercolorbox}[wd=1.0\paperwidth, ht=2.5ex, dp=1.4ex, left]{headfoot}
+ \usebeamerfont{section~in~head/foot}\hspace*{3.5ex}
+ \usebeamertemplate{section~in~head/foot}
+ \end{beamercolorbox}
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+
+%%% Frametitle %%%
+
+% \begin{documentation}
+% \begin{variable}{\gotham@frametitle@toppadding, \gotham@frametitle@bottompadding, \gotham@frametitle@leftpadding, \gotham@frametitle@rightpadding}
+% Dimensions controlling the top, bottom, left and right padding in the frametitle.
+% \end{variable}
+% \end{documentation}
+%%%%%%
+% \begin{implementation}
+% \begin{variable}{\gotham@frametitle@toppadding, \gotham@frametitle@bottompadding, \gotham@frametitle@leftpadding, \gotham@frametitle@rightpadding}
+% Dimensions of lengths used in the frametitle: top, bottom, left and right padding.
+% All of them are equal to 2.2ex by default.
+% \begin{macrocode}
+\newlength{\gotham@frametitle@toppadding}
+\setlength{\gotham@frametitle@toppadding}{2.2ex}
+\newlength{\gotham@frametitle@bottompadding}
+\setlength{\gotham@frametitle@bottompadding}{2.2ex}
+\newlength{\gotham@frametitle@leftpadding}
+\setlength{\gotham@frametitle@leftpadding}{2.2ex}
+\newlength{\gotham@frametitle@rightpadding}
+\setlength{\gotham@frametitle@rightpadding}{2.2ex}
+% \gotham@strut from inner
+\providecommand{\gotham@strut}{
+ \vphantom{ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz (/)}
+}
+% \end{macrocode}
+% \end{variable}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\gotham@frametitlestrut@start, \gotham@frametitlestrut@end}
+% Commands used to control the space over and under the title in frametitle.
+% \UnitTested
+% \TestFiles{gotham-test-046, gotham-test-046b, gotham-test-047}
+% \begin{macrocode}
+\newcommand{\gotham@frametitlestrut@start}{
+ \rule{0pt}{\gotham@frametitle@toppadding +
+ \totalheightof{
+ \ifcsdef{gotham@frametitleformat}{\gotham@frametitleformat{X}}{X}
+ }
+ }
+}
+\newcommand{\gotham@frametitlestrut@end}{
+ \rule[-\gotham@frametitle@bottompadding]{0pt}{\gotham@frametitle@bottompadding}
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{function}{\gothamInstituteLogoSquare[height]}
+% \begin{syntax}
+% \cs{height} \oarg{height of the logo use in inclugraphics (4ex by default)}
+% \end{syntax}
+% Command to set the image logo to include.
+% \end{function}
+% \end{documentation}
+%%%%%%
+% \begin{implementation}
+% \begin{function}{\gothamInstituteLogoSquare[height] \defbeamertemplate{includeLogo}{default/gotham~square}}
+% \begin{syntax}
+% \cs{gothamInstituteLogoSquare} \oarg{height}
+% \end{syntax}
+% Command to include the desired logo and a template used to add it to the frametitle.
+% For example your can do |\renewcommand{\gothamInstituteLogoSquare}[1][4ex]{\includegraphics[height=#1]{gotham-logo.pdf}}|.
+% \TestFiles{gotham-test-046, gotham-test-047}
+% \begin{macrocode}
+\newcommand{\gothamInstituteLogoSquare}[1][4ex]{
+ %\includegraphics[height=#1]{gotham-logo.pdf}
+}
+\defbeamertemplate{includeLogo}{default/gotham~square}{
+ \gothamInstituteLogoSquare
+}
+\prop_put:Nnn \l__gotham_template_name_prop {includeLogo/default} {gotham~square}
+% \end{macrocode}
+% \end{function}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate{includeLogo}{default/gotham~circle}}
+% Template used in frametitle when the option |progress bar= circlehead| is activated.
+% \UnitTested
+% \TestFiles{gotham-test-046b}
+% \begin{macrocode}
+\defbeamertemplate{includeLogo}{default/gotham~circle}{
+ \gothamProgressCircle
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate{includeLogo}{default/gotham~circle}}
+% Template to make sure the logo will remain centered and to do not change the height of the line when included.
+% This template is used to include logo in frametitle.
+% \UnitTested
+% \TestFiles{gotham-test-046b}
+% \begin{macrocode}
+\defbeamertemplate{instituteLogo}{default/gotham}{
+ % \raisebox{lift}[height][depth]{text}
+ \raisebox{0pt}[0pt][0pt]{
+ \raisebox{.5\fontcharht\font`E-0.5\height}{
+ % \setbeamertemplate{}[]
+ \setbeamertemplate{includeLogo}[default/\prop_item:Nn \l__gotham_template_name_prop {includeLogo/default}]
+ \usebeamertemplate{includeLogo}
+ }
+ }
+}
+\prop_put:Nnn \l__gotham_template_name_prop {instituteLogo/default} {gotham}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{function}{\gothamFrameSubtitleSep}
+% Command that can be redefined to control the separator between the title of the frame and its subtitle.
+% For example if a default Beamer style is desired, one can use |\renewcommand{\gothamFrameSubtitleSep}{\\[-.42em]}|.
+% By default it is a hyphen.
+% \end{function}
+% \end{documentation}
+%%%%%%
+% \begin{implementation}
+% \begin{function}{\gothamFrameSubtitleSep}
+% Hyphen used as separator between title of the frame and its subtitle (within frametitle template).
+% \TestFiles{ gotham-test-047}
+% \begin{macrocode}
+\newcommand{\gothamFrameSubtitleSep}{
+ % \\[-.42em] % if newline (as default Beamer)
+ % or if same line with a -- separator.
+ \ ---~
+}
+% \end{macrocode}
+% \end{function}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{variable}{\gothamFramesubtitleStrutend}
+% Variable vertical length used to adapte the bottom padding when a subtitle is given.
+% \end{variable}
+% \end{documentation}
+%%%%%%
+% \begin{implementation}
+% \begin{variable}{\gothamFramesubtitleStrutend}
+% Length used in |vspace| at the end of framesubtitle.
+% \begin{macrocode}
+\newlength{\gothamFramesubtitleStrutend}
+\setlength{\gothamFramesubtitleStrutend}{0pt}
+% \setlength{\gothamFramesubtitleStrutend}{-1.25ex} %% When \newcommand{\gothamFrameSubtitleSep}{\\[-.42em]}
+% \end{macrocode}
+% \end{variable}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate{frametitle}{default/gotham~subsameline}}
+% Template for frametitle include subtitle on the same line and a logo a flushed left.
+% \UnitTested
+% \TestFiles{gotham-test-047}
+% \begin{macrocode}
+\defbeamertemplate{frametitle}{default/gotham~subsameline}{
+ \nointerlineskip
+ \begin{beamercolorbox}[
+ wd=\paperwidth,
+ sep=0pt,
+ leftskip=\gotham@frametitle@leftpadding,
+ rightskip=\gotham@frametitle@rightpadding,
+ ]{frametitle}
+ \gotham@frametitlestrut@start
+ \insertframetitle
+ \ifx\insertframesubtitle\@empty
+ %% if subtitle to the frame is empty
+ \else
+ %% if not empty: add subtitle
+ {\usebeamerfont{framesubtitle}\usebeamercolor[fg]{framesubtitle}\gothamFrameSubtitleSep \insertframesubtitle}
+ \vspace*{\gothamFramesubtitleStrutend}
+ \fi
+ \nolinebreak
+ %% Add logo
+ \hfill{
+ \setbeamertemplate{instituteLogo}[default/\prop_item:Nn \l__gotham_template_name_prop {instituteLogo/default}]
+ \usebeamertemplate{instituteLogo}
+ }
+ \gotham@frametitlestrut@end
+ \end{beamercolorbox}
+}
+\prop_put:Nnn \l__gotham_template_name_prop {frametitle/default} {gotham~subsameline}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate{framesubtitle}{default/gotham~subnewline}}
+% Template for framesubtitle include subtitle on the same line and a logo a flushed left.
+% \UnitTested
+% \TestFiles{gotham-test-047}
+% \begin{macrocode}
+\dim_new:N \l__gotham_framesubtitle_subnewline_strutend_dim
+\defbeamertemplate{framesubtitle}{default/gotham~subnewline}{
+ \nointerlineskip
+ \begin{beamercolorbox}[
+ wd=\paperwidth,
+ sep=0pt,
+ leftskip=\gotham@frametitle@leftpadding,
+ rightskip=\gotham@frametitle@rightpadding,
+ ]{frametitle}
+ % put the subtitle in a raisebox to have no influence on the result.
+ \raisebox{0pt}[0pt][0pt]{
+ \raisebox{-0.3ex}{
+ { \usebeamerfont{framesubtitle}\usebeamercolor[fg]{framesubtitle}\insertframesubtitle}
+ }
+ }
+ % add 1ex to take into account the subtitle height.
+ \dim_set:Nn \l__gotham_framesubtitle_subnewline_strutend_dim {1.ex+\gothamFramesubtitleStrutend}
+ \vspace{\l__gotham_framesubtitle_subnewline_strutend_dim}
+ \end{beamercolorbox}
+}
+\prop_put:Nnn \l__gotham_template_name_prop {framesubtitle/default} {gotham~subnewline}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate{framesubtitle}{default/gotham~subnewline}}
+% Template for frametitle and a logo a flushed left then the subtitle on a new line.
+% \UnitTested
+% \TestFiles{gotham-test-047}
+% \begin{macrocode}
+\defbeamertemplate{frametitle}{default/gotham~subnewline}{
+ \nointerlineskip
+ \begin{beamercolorbox}[
+ wd=\paperwidth,
+ sep=0pt,
+ leftskip=\gotham@frametitle@leftpadding,
+ rightskip=\gotham@frametitle@rightpadding,
+ ]{frametitle}
+ \gotham@frametitlestrut@start
+ \insertframetitle
+ \nolinebreak
+ \hfill{
+ \setbeamertemplate{instituteLogo}[default/\prop_item:Nn \l__gotham_template_name_prop {instituteLogo/default}]
+ \usebeamertemplate{instituteLogo}
+ }
+ \gotham@frametitlestrut@end
+ \end{beamercolorbox}
+ %% End of the frametitle box, start then use the subtitle template if needed.
+ \ifx\insertframesubtitle\@empty
+ %% if subtitle to the frame is not empty
+ \else
+ % reduce vertical space to have a 1pt overlap, so no white line appears with vectorial viewers.
+ \vspace*{-1pt}
+ % add the subtitle
+ \setbeamertemplate{framesubtitle}[default/\prop_item:Nn \l__gotham_template_name_prop {framesubtitle/default}]
+ % \setbeamertemplate{framesubtitle}%[framesubtitle/default]
+ \usebeamertemplate{framesubtitle}
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{function}{\useoutertheme}
+% \begin{syntax}
+% \cs{useoutertheme}\oarg{option1=value1, ...}\marg{gotham}
+% \textrm{where the options are (default marked as} \defopt{default}\textrm{):}
+% \meta{frametitle template} = \oarg{\defopt{gotham subsameline} \textbar gotham subnewline \textbar ... }
+% \meta{framesubtitle template} = \oarg{\defopt{gotham subnewline} \textbar ...}
+% \end{syntax}
+% The 'package' (useoutertheme) options can control |frametitle| (and |framesubtitle|) templates.
+% \end{function}
+% \end{documentation}
+%%%%
+% \begin{implementation}
+% \begin{macro}{outer key -- interface}
+% Controls the outer settings for frametitle and framesubtitle.
+% \UnitTested
+% \TestFiles{gotham-test-047}
+% \begin{macrocode}
+\keys_define:nn { gotham / outer }{
+ % frametitle template
+ frametitle~template .usage:n = { general },
+ frametitle~template .default:n = { gotham~subsameline },
+ frametitle~template .code:n = {
+ \__gotham_set_prop_template:nn{frametitle/default}{#1}
+ \setbeamertemplate{frametitle}[default/\prop_item:Nn \l__gotham_template_name_prop {frametitle/default}]
+ }
+}
+\keys_define:nn { gotham / outer }{
+ % frametitle template
+ framesubtitle~template .usage:n = { general },
+ framesubtitle~template .default:n = { gotham~subnewline },
+ framesubtitle~template .code:n = {
+ \__gotham_set_prop_template:nn{framesubtitle/default}{#1}
+ \setbeamertemplate{framesubtitle}[default/\prop_item:Nn \l__gotham_template_name_prop {framesubtitle/default}]
+ }
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+
+%%% Continuation %%%
+
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate{frametitle~continuation}{default/beamer}}
+% Template for numerotation of frametitle when a frame are continuing on sevral pages (allowed with the beamer option |allowframebreaks|).
+% Beamer theme (by default) is using roman number with uppercase.
+% \UnitTested
+% \TestFiles{gotham-test-047}
+% \begin{macrocode}
+\defbeamertemplate{frametitle~continuation}{default/beamer}{
+ \usebeamerfont{frametitle}
+ {
+ \MakeUppercase{\romannumeral \insertcontinuationcount}
+ }
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate{frametitle~continuation}{default/tot}}
+% Template for numerotation of frametitle when a frame are continuing on sevral pages (allowed with the beamer option |allowframebreaks|).
+% This template is using arabic number slash over the total number of page for this frame.
+% \UnitTested
+% \TestFiles{gotham-test-047}
+% \begin{macrocode}
+\defbeamertemplate{frametitle~continuation}{default/tot}{
+ \usebeamerfont{frametitle}
+ {
+ \textmd{%
+ [\insertcontinuationcount
+ \,/\,%
+ \the\numexpr\beamer@endpageofframe+1-\beamer@startpageofframe
+ ]%
+ }%
+ }
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate{frametitle~continuation}{default/gotham}}
+% Template for numerotation of frametitle when a frame are continuing on sevral pages (allowed with the beamer option |allowframebreaks|).
+% Gotham theme (by default) is using roman number with lowercase.
+% \UnitTested
+% \TestFiles{gotham-test-047}
+% \begin{macrocode}
+\defbeamertemplate{frametitle~continuation}{default/gotham}{
+ \usebeamerfont{frametitle}
+ {
+ %\small
+ (\romannumeral \insertcontinuationcount)
+ }
+}
+\prop_put:Nnn \l__gotham_template_name_prop {frametitle~continuation/default} {gotham}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{function}{\useoutertheme}
+% \begin{syntax}
+% \cs{useoutertheme}\oarg{option1=value1, ...}\marg{gotham}
+% \textrm{where the options are (default marked as} \defopt{default}\textrm{):}
+% \meta{frametitle continuation template} = \oarg{\defopt{gotham} \textbar tot \textbar beamer \textbar ... }
+% \end{syntax}
+% The 'package' (useoutertheme) options can control |frametitle continuation| templates.
+% \end{function}
+% \end{documentation}
+%%%%
+% \begin{implementation}
+% \begin{macro}{outer key -- interface}
+% Controls the outer settings for frametitle continuation.
+% \UnitTested
+% \TestFiles{gotham-test-047}
+% \begin{macrocode}
+\keys_define:nn { gotham / outer }{
+ % frametitle template
+ frametitle~continuation~template .usage:n = { general },
+ frametitle~continuation~template .default:n = { gotham },
+ frametitle~continuation~template .code:n = {
+ \__gotham_set_prop_template:nn{frametitle~continuation/default}{#1}
+ \setbeamertemplate{frametitle~continuation}[default/\prop_item:Nn \l__gotham_template_name_prop {frametitle~continuation/default}]
+ }
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+
+%%% Footer \& Footline %%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%% Footline %%%
+
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate{footline}{empty}}
+% Empty footline template used when the option nofootline is given.
+% \UnitTested
+% \TestFiles{gotham-test-048}
+% \begin{macrocode}
+\defbeamertemplate{footline}{empty}{}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{function}{\begin{frame}[nofootline]}
+% Add a frame option |nofootline| to do not display nofootline.
+% \end{function}
+% \end{documentation}
+%%%%%%
+% \begin{implementation}
+% \begin{macro}{\begin{frame}[nofootline]}
+% Add a frame option |nofootline| to do not display an empty footline.
+% To do it, we must add a global boolean variable, capture the option at the begin of the frame and patch the end of the frame.
+% \UnitTested
+% \TestFiles{gotham-test-048}
+% \begin{macrocode}
+% bool to trigger the add of nofootline in frame.
+\newenvironment{nofootlineenv}{
+ \setbeamertemplate{footline}[empty]
+}{}
+\__gotham_add_beamerframe_key:n {nofootline}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{variable}{\gothamFootlineOffset, \gothamFootlineHeight, \gothamFootlineDepth}
+% Lengths controlling the position of |footline|.
+% |\gothamFootlineOffset| is controlling space between to bottom of the text (or the footnote) and the footline.
+% |\gothamFootlineOffset| is by default -0.5ex, to have more space in the frame but if the footer is not really used, the space can be even more optimized using |\setlength{\gothamFootlineOffset}{-2.0ex}|.
+% Obviously, it can be back to "normal" setting it to 0pt.
+% |\gothamFootlineHeight| and |\gothamFootlineDepth| are controlling the heigth of the footline and the position of the text within.
+% \end{variable}
+% \end{documentation}
+%%%%%%
+% \begin{implementation}
+% \begin{variable}{\gothamFootlineOffset, \gothamFootlineHeight, \gothamFootlineDepth}
+% Lengths used in |footline| template.
+% \begin{macrocode}
+% Footline lengths
+% space between to bottom of the text (or the footnote) and the footline
+\newlength{\gothamFootlineOffset}
+\setlength{\gothamFootlineOffset}{-0.5ex}
+
+\newlength{\gothamFootlineHeight}
+\setlength{\gothamFootlineHeight}{1.5ex}
+\newlength{\gothamFootlineDepth}
+\setlength{\gothamFootlineDepth}{0.1ex}
+% \end{macrocode}
+% \end{variable}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate*{footline}{default/gotham}}
+% Template that is activate by default since this footline is relatively generic.
+% \UnitTested
+% \TestFiles{gotham-test-048}
+% \begin{macrocode}
+\defbeamertemplate*{footline}{default/gotham}{
+ % new line to adjust the footline position.
+ \vspace*{\gothamFootlineOffset}
+ \begin{beamercolorbox}[
+ wd=\textwidth,
+ sep=0pt,
+ leftskip=3ex,
+ rightskip=3ex,
+ ht={\gothamFootlineHeight},
+ dp={\gothamFootlineDepth},
+ ]{footline}
+ \usebeamerfont{page number in head/foot}
+ \ifbeamertemplateempty{frame~footer}{
+ %executed if empty
+ \hfill \ \gotham@strut
+ }{
+ %⟨executed otherwise⟩
+ \usebeamertemplate*{frame~footer}
+ }
+ \hspace{\gothamRightFooterPadding}
+ {\usebeamertemplate{page~number~in~head/foot}}~
+ \end{beamercolorbox}
+}
+\prop_put:Nnn \l__gotham_template_name_prop {footline/default} {gotham}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+
+%%% Footer %%%
+
+% \begin{documentation}
+% \begin{variable}{\gothamLeftFooterPadding, \gothamRightFooterPadding, \gothamFooterHOffset}
+% Lengths controlling the position of |footer|.
+% |\gothamFooterHOffset| is controlling the horizontal space between the footer and the bottom of the page (or the progressbar).
+% |\gothamLeftFooterPadding| and |\gothamLeftFooterPadding| are controlling the space between the left and right side of the footer and the border of the page.
+% \end{variable}
+% \end{documentation}
+%%%%%%
+% \begin{implementation}
+% \begin{variable}{\gothamLeftFooterPadding, \gothamRightFooterPadding, \gothamFooterHOffset}
+% Lengths used in |footer| template for positioning left right and bottom.
+% \begin{macrocode}
+\newlength{\gothamLeftFooterPadding}
+\setlength{\gothamLeftFooterPadding}{2.0ex}
+\newlength{\gothamRightFooterPadding}
+\setlength{\gothamRightFooterPadding}{3.5ex}
+\newlength{\gothamFooterHOffset}
+\setlength{\gothamFooterHOffset}{0pt}
+% \end{macrocode}
+% \end{variable}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate{frame~footer}{none}}
+% Footer template used when nothing is put as footer but it will create undesired results.
+% \UnitTested
+% \TestFiles{gotham-test-048}
+% \begin{macrocode}
+\defbeamertemplate{frame~footer}{none}{}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate{frame~footer}{empty}}
+% Footer template used when |nofooter| option is given and it presevers spacing to have nice results.
+% \UnitTested
+% \TestFiles{gotham-test-048}
+% \begin{macrocode}
+\defbeamertemplate{frame~footer}{empty}{
+ \hspace{\gothamLeftFooterPadding}
+ \hfill \
+ \gotham@strut
+ % decrease space between progress bar and footer
+ \vspace*{\gothamFooterHOffset}
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{function}{\begin{frame}[nofooter]}
+% Add a frame option |nofooter| to do not display nofooter.
+% \end{function}
+% \end{documentation}
+%%%%%%
+% \begin{implementation}
+% \begin{macro}{\begin{frame}[nofooter]}
+% Add a frame option |nofooter| to do not display an empty footer.
+% To do it, we must add a global boolean variable, capture the option at the begin of the frame and patch the end of the frame.
+% \UnitTested
+% \TestFiles{gotham-test-048}
+% \begin{macrocode}
+% bool to trigger the add of nofooter in frame.
+\newenvironment{nofooterenv}{
+ \setbeamertemplate{frame~footer}[empty]
+}{}
+\__gotham_add_beamerframe_key:n {nofooter}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{variable}{\l_gotham_defaultRotateFooter}
+% Boolean to triggering if rotated footer should be displayed by default (without giving the frame option).
+% The variable is |false| by default.
+% \end{variable}
+% \end{documentation}
+%%%%%%
+% \begin{implementation}
+% \begin{macro}{\l_gotham_defaultRotateFooter}
+% Boolean variable to display the rotated footer by default (or not).
+% \UnitTested
+% \TestFiles{gotham-test-048}
+% \begin{macrocode}
+\bool_new:N \l_gotham_defaultRotateFooter
+\bool_set_false:N \l_gotham_defaultRotateFooter
+\bool_new:N \l_gotham_RotateFooter
+\bool_set_false:N \l_gotham_RotateFooter
+% At every new frame, reset the options to default (unless some options/keys are given)
+\BeforeBeginEnvironment{frame}{
+ \bool_if:NTF \l_gotham_defaultRotateFooter {
+ \bool_set_true:N \l_gotham_RotateFooter
+ }{% false
+ \bool_set_false:N \l_gotham_RotateFooter
+ }
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{function}{\begin{frame}[rotateFooter]}
+% Add a frame option |rotateFooter| to display rotated footer.
+% \end{function}
+% \end{documentation}
+%%%%%%
+% \begin{implementation}
+% \begin{macro}{\begin{frame}[rotateFooter]}
+% Add a frame option |rotateFooter| to display a rotated footer.
+% To do it, we must add a global boolean variable, capture the option at the begin of the frame and patch the end of the frame.
+% \UnitTested
+% \TestFiles{gotham-test-048}
+% \begin{macrocode}
+% bool to trigger
+% Capture new options/keys for frames
+\define@key{beamerframe}{rotateFooter}[true]{
+ \bool_set_true:N \l_gotham_RotateFooter
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{function}{\begin{frame}[noRotateFooter]}
+% Add a frame option |noRotateFooter| to display a none-RotateFooter.
+% \end{function}
+% \end{documentation}
+%%%%%%
+% \begin{implementation}
+% \begin{macro}{\begin{frame}[noRotateFooter]}
+% Add a frame option |noRotateFooter| to display a none-rotated footer.
+% To do it, we must add a global boolean variable, capture the option at the begin of the frame and patch the end of the frame.
+% \UnitTested
+% \TestFiles{gotham-test-048}
+% \begin{macrocode}
+% Capture new options/keys for frames
+\define@key{beamerframe}{noRotateFooter}[true]{
+ \bool_set_false:N \l_gotham_RotateFooter
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{function}{\useoutertheme}
+% \begin{syntax}
+% \cs{useoutertheme}\oarg{option1=value1, ...}\marg{gotham}
+% \textrm{where the options are (default marked as} \defopt{default}\textrm{):}
+% \meta{rotateFooter default} = \oarg{\defopt{off} \textbar on }
+% \end{syntax}
+% The option |rotateFooter default=on| can enable the rotation of the footer on every frame; but it can all be turned on for specific frames when using the frame option |\begin{frame}[rotateFooter]|.
+% \end{function}
+% \end{documentation}
+%%%%
+% \begin{implementation}
+% \begin{macro}{outer key -- interface}
+% Controls the outer settings for sidebar canvas right and sidebar canvas left.
+% \UnitTested
+% \TestFiles{gotham-test-048}
+% \begin{macrocode}
+\keys_define:nn { gotham / outer }{
+ % rotateFooter default
+ rotateFooter~default .choice:,
+ rotateFooter~default .usage:n = { general },
+ rotateFooter~default .default:n = { false },
+
+ rotateFooter~default / true .code:n = { \bool_set_true:N \l_gotham_defaultRotateFooter },
+ rotateFooter~default / on .code:n = { \bool_set_true:N \l_gotham_defaultRotateFooter },
+ rotateFooter~default / enable .code:n = { \bool_set_true:N \l_gotham_defaultRotateFooter },
+
+ rotateFooter~default / false .code:n = { \bool_set_false:N \l_gotham_defaultRotateFooter },
+ rotateFooter~default / off .code:n = { \bool_set_false:N \l_gotham_defaultRotateFooter },
+ rotateFooter~default / disable .code:n = { \bool_set_false:N \l_gotham_defaultRotateFooter },
+
+ rotateFooter~default / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'#1'~is~unknown~for~the~(known)~option~'rotateFooter~default',~so~being~ignored. }{helping~message: rotateFooter~default / unknown} },
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{variable}{\gothamFootlineRuleLeftPadding, \gothamFootlineRuleHeight, \gothamFootlineRuleLength, \gothamHposLeftRotFooter, \gothamHposRightRotFooter, \gothamVposLeftRotFooter, \gothamVposRightRotFooter}
+% Lengths controlling the position of |footer|.
+% |\gothamFootlineRuleLeftPadding| is controlling the horizontal space between the left border of the page and the left side of the rule.
+% |\gothamFootlineRuleHeight| is controlling the height of the rule use to delimit the footer.
+% |\gothamFootlineRuleLength| is controlling the length of the rule use to delimit the footer.
+% |\gothamHposLeftRotFooter| is controlling the horizontal positioning of the left part of the rotatated footer.
+% |\gothamHposRightRotFooter| is controlling the horizontal positioning of the right part of the rotatated footer.
+% |\gothamVposLeftRotFooter| is controlling the vertical positioning of the left part of the rotatated footer.
+% |\gothamVposRightRotFooter| is controlling the vertical positioning of the right part of the rotatated footer.
+%
+% \end{variable}
+% \end{documentation}
+%%%%%%
+% \begin{implementation}
+% \begin{variable}{\gothamFootlineRuleLeftPadding, \gothamFootlineRuleHeight, \gothamFootlineRuleLength, \gothamHposLeftRotFooter, \gothamHposRightRotFooter, \gothamVposLeftRotFooter, \gothamVposRightRotFooter}
+% Lengths used in |footer| template.
+% \begin{macrocode}
+\newlength{\gothamFootlineRuleLeftPadding}
+\newlength{\gothamFootlineRuleHeight}
+\newlength{\gothamFootlineRuleLength}
+\setlength{\gothamFootlineRuleLeftPadding}{7mm}
+\setlength{\gothamFootlineRuleHeight}{0.0pt}
+% \setlength{\gothamFootlineRuleHeight}{0.5pt} % This is nice also but have a cleaner default, I turned it to 0.
+\setlength{\gothamFootlineRuleLength}{15mm}
+
+\newlength{\gothamHposLeftRotFooter}
+\newlength{\gothamHposRightRotFooter}
+\newlength{\gothamVposLeftRotFooter}
+% horizontal position (in picture env) for the rotated footer.
+\newlength{\gothamVposRightRotFooter}
+
+\setlength{\gothamHposLeftRotFooter}{-7pt}
+\setlength{\gothamHposRightRotFooter}{2pt}
+\setlength{\gothamVposLeftRotFooter}{15pt}
+\setlength{\gothamVposRightRotFooter}{15pt}
+% \end{macrocode}
+% \end{variable}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{variable}{\hlenRightRotFooter, \hlenLeftRotFooter}
+% Temporary variables for the horizontal length of the rotated footer
+% \begin{macrocode}
+% Not used yet because I need to have a latex3 settowidth equivalent.
+% I will maybe take inspiration from https://tex.stackexchange.com/questions/492367/does-expl3-have-alternative-to-settowidth-and-settoheight
+% \dim_new:N \l__gotham_HLen_rightRotFooter_dim
+% \dim_new:N \l__gotham_HLen_leftRotFooter_dim
+\newlength{\hlenRightRotFooter}
+\newlength{\hlenLeftRotFooter}
+% \end{macrocode}
+% \end{variable}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate{frame~footer}{default/gotham}}
+% Template for frame footer used by gotham, allowing a rotated footer.
+% \UnitTested
+% \TestFiles{gotham-test-048}
+% \begin{macrocode}
+\defbeamertemplate{frame~footer}{default/gotham}{
+ % add a ruler but wihtout affecting the dimensions of the footline
+ \vbox to 0pt{
+ % Vertical stretch to ensure proper spacing
+ \vss
+ \hbox to 0pt{
+ \hspace*{\gothamFootlineRuleLeftPadding}
+ \usebeamercolor{frametitle}
+ \color{frametitle.bg}
+ \rule{\gothamFootlineRuleLength}{\gothamFootlineRuleHeight}
+ \vspace*{
+ \dimexpr \gothamFootlineHeight -0.25em\relax
+ }
+ % Horizontal stretch to ensure proper spacing
+ \hss
+ }
+ }
+ \hspace{\gothamLeftFooterPadding}
+ \settowidth{\hlenLeftRotFooter}{\hspace{-\gothamLeftFooterPadding}}
+ \addtolength{\hlenLeftRotFooter}{\gothamHposLeftRotFooter}
+ % \ifbool{rotateFooter}{
+ \bool_if:NTF \l_gotham_RotateFooter {
+ % rotateFooter true
+ \begin{picture}(0,0)(0,0)
+ \put(\hlenLeftRotFooter,\gothamVposLeftRotFooter){\rotatebox{90}{\insertshortdate}}
+ \end{picture}
+ }{
+ % rotateFooter false
+ \insertshortdate
+ }
+ \hfill \
+ \hfill \ \insertshorttitle
+ % make sure that the vertical space is constant: strut.
+ \gotham@strut
+ \hfill \
+ \hfill \
+ % \ifbool{rotateFooter}{
+ \bool_if:NTF \l_gotham_RotateFooter {
+ % rotateFooter true
+ \settowidth{\hlenRightRotFooter}{\hspace{\gothamRightFooterPadding}\usebeamertemplate{page~number~in~head/foot}}
+ \addtolength{\hlenRightRotFooter}{\gothamHposRightRotFooter}
+ \begin{picture}(0,0)(0,0)
+ \put(\hlenRightRotFooter,\gothamVposRightRotFooter){\rotatebox{90}{\insertshortauthor}}
+ \end{picture}
+ }{
+ % rotateFooter false
+ \insertshortauthor
+ %\hspace{-7em}
+ }
+ % decrease space between progress bar and footer
+ \vspace*{\gothamFooterHOffset}
+}
+\prop_put:Nnn \l__gotham_template_name_prop {frame~footer/default} {gotham}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{function}{\useoutertheme}
+% \begin{syntax}
+% \cs{useoutertheme}\oarg{option1=value1, ...}\marg{gotham}
+% \textrm{where the options are (default marked as} \defopt{default}\textrm{):}
+% \meta{footer template} = \oarg{\defopt{gotham} \textbar ... }
+% \end{syntax}
+% The option |footer template| can which template to use as a footer.
+% \end{function}
+% \end{documentation}
+%%%%
+% \begin{implementation}
+% \begin{macro}{outer key -- interface}
+% Controls the outer settings for footer template.
+% \UnitTested
+% \TestFiles{gotham-test-048}
+% \begin{macrocode}
+\keys_define:nn { gotham / outer }{
+ % footer template
+ footer~template .usage:n = { general },
+ footer~template .default:n = { gotham },
+ footer~template .code:n = {
+ \__gotham_set_prop_template:nn{frame~footer/default}{#1}
+ \setbeamertemplate{frame~footer}[
+ default/\prop_item:Nn \l__gotham_template_name_prop {frame~footer/default}
+ ]
+ }
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+
+%%% Numbering %%%
+%%%%%%%%%%%%%%%%%
+
+% \begin{implementation}
+% \begin{macro}{\inserttotalframenumber}
+% We defined the number of total frame, if not defined or equal to 0 because of the first compilation, we set it to avoid arthimetical errors
+% \UnitTested
+% \TestFiles{gotham-test-046}
+% \begin{macrocode}
+%
+\def\inserttotalframenumber{100}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate{page~number~in~head/foot}{none}}
+% Template to do not numbering the current frame.
+% \UnitTested
+% \TestFiles{gotham-test-048}
+% \begin{macrocode}
+\defbeamertemplate{page~number~in~head/foot}{none}{ }
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{variable}{\gothamCircleNumberingVshift, \gothamCircleNumberingHshift}
+% Variable lengths controling the vertical and horizontal positioning of the |circle| numbering template.
+% \end{variable}
+% \end{documentation}
+%%%%
+% \begin{implementation}
+% \begin{variable}{\gothamCircleNumberingVshift, \gothamCircleNumberingHshift}
+% Length used in |raisebox| and |hspace| in |circle| frame numbering.
+% \begin{macrocode}
+\newlength{\gothamCircleNumberingVshift}
+\setlength{\gothamCircleNumberingVshift}{1.4mm}
+\newlength{\gothamCircleNumberingHshift}
+\setlength{\gothamCircleNumberingHshift}{2.6mm}
+% \end{macrocode}
+% \end{variable}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate{page~number~in~head/foot}{circle}}
+% Template to add, in a circle, the number of the current frame over (slash) the total number of frames.
+% \UnitTested
+% \TestFiles{gotham-test-048}
+% \begin{macrocode}
+\defbeamertemplate{page~number~in~head/foot}{circle}{
+ % horizontal space between the circle and the right part of the footer (email).
+ \hspace{+2em}
+ % \raisebox{lift}[height][depth]{text} => lift here = vertical space between the bottom of the page (or the progress bar) and the center of the circle
+ \raisebox{\gothamCircleNumberingVshift}[0pt][0pt]{
+ \begin{tikzpicture}[remember~picture, overlay]
+ \coordinate (circleCenter);
+
+ \usebeamercolor{frametitle}
+
+ \draw[fill, color=frametitle.bg] (circleCenter) circle (6mm);
+ \draw[fill, color=frametitle.fg] (circleCenter) circle (5mm);
+ \node[color=frametitle.bg] at (circleCenter)
+ {\small$^{\insertframenumber}\negmedspace/\negthinspace\sb{\inserttotalframenumber}$}
+ ;
+ \end{tikzpicture}
+ % horizontal space between the right border of the page and the center of the circle.
+ \hspace{\gothamCircleNumberingHshift}
+ }
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{function}{\useoutertheme}
+% \begin{syntax}
+% \cs{useoutertheme}\oarg{option1=value1, ...}\marg{gotham}
+% \textrm{where the options are (default marked as} \defopt{default}\textrm{):}
+% \meta{numbering} = \oarg{\defopt{none} \textbar framenumber \textbar totalframenumber \textbar appendixframenumber \textbar pagenumber \textbar totalpagenumber \textbar circle \textbar ... }
+% \meta{framesubtitle template} = \oarg{\defopt{gotham subnewline} \textbar ...}
+% \end{syntax}
+% The 'package' (useoutertheme) options can control |frame numbering| templates used in |footer| template.
+% \end{function}
+% \end{documentation}
+%%%%
+% \begin{implementation}
+% \begin{macro}{outer key -- interface}
+% Controls the outer settings for frame numbering.
+% \UnitTested
+% \TestFiles{gotham-test-048}
+% \begin{macrocode}
+\keys_define:nn { gotham / outer }{
+ % numbering
+ numbering .choice:,
+ numbering .usage:n = { general },
+ numbering .default:n = { none },
+
+ % \__gotham_set_template:nn{title~page}{#1}
+ numbering / none .code:n = { \setbeamertemplate{page~number~in~head/foot}[none] },
+ numbering / framenumber .code:n = { \setbeamertemplate{page~number~in~head/foot}[framenumber] },
+ numbering / totalframenumber .code:n = {\setbeamertemplate{page~number~in~head/foot}[totalframenumber] },
+ numbering / appendixframenumber .code:n = {\setbeamertemplate{page~number~in~head/foot}[appendixframenumber] },
+ numbering / pagenumber .code:n = { \setbeamertemplate{page~number~in~head/foot}[pagenumber] },
+ numbering / totalpagenumber .code:n = {\setbeamertemplate{page~number~in~head/foot}[totalpagenumber] },
+ numbering / circle .code:n = {\setbeamertemplate{page~number~in~head/foot}[circle] },
+
+ numbering / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'#1'~is~unknown~for~the~(known)~option~'numbering',~so~being~ignored. }{helping~message} },
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+
+%%% MiniFrames \& Progress bar %%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%% MiniFrames %%%
+
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate{section~in~head/foot}{default/beamer}}
+% Template control how the section appears by default when sections are add to the headline or footline.
+% \UnitTested
+% \TestFiles{gotham-test-048}
+% \begin{macrocode}
+\defbeamertemplate{section~in~head/foot}{default/beamer}{
+ \insertsectionhead
+}
+\defbeamertemplate{section~in~head/foot~shaded}{default/beamer}{
+ \color{fg!50!bg}\usebeamertemplate{section~in~head/foot}
+}
+
+% \defbeamertemplate{includeLogo}{default/gotham~square}{
+\prop_put:Nnn \l__gotham_template_name_prop {section~in~head/foot~shaded/default} {beamer}
+% \defbeamertemplate{includeLogo}{default/gotham~square}{
+\prop_put:Nnn \l__gotham_template_name_prop {section~in~head/foot/default} {beamer}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate{section~in~head/foot}{default/gotham~secSubsec}}
+% Template for section and subsection in headline.
+% \UnitTested
+% \TestFiles{gotham-test-048}
+% \begin{macrocode}
+\defbeamertemplate{section~in~head/foot}{default/gotham~secSubsec}{
+ \insertsectionhead
+ \ifx\insertsubsection\empty\else
+ \ifdefempty{\subsecname}{\relax}{
+ \ \textbar\ \insertsubsectionhead
+ }
+ \fi
+}
+\defbeamertemplate{section~in~head/foot~shaded}{default/gotham~secSubsec}{
+ \insertsectionhead
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate{section~in~head/foot}{default/empty}}
+% Empty template for section in headline, compensating the height of a line.
+% \UnitTested
+% \TestFiles{gotham-test-048}
+% \begin{macrocode}
+\defbeamertemplate{section~in~head/foot}{default/empty}{
+ \vspace{3.875ex}
+}
+\defbeamertemplate{section~in~head/foot~shaded}{default/empty}{
+ \vspace{3.875ex}
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{variable}{\gotham@temp@heightFrametitle, \gotham@temp@PaperheightFrametitle}
+% Temporary length variables to compute the height of the frametitle and the height of the paper minus the frametitle.
+% \begin{macrocode}
+\newlength{\gotham@temp@heightFrametitle}
+\newlength{\gotham@temp@PaperheightFrametitle}
+% \end{macrocode}
+% \end{variable}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate*{mini~nav~progress~head/foot left right}{gotham~miniframes~theme}}
+% Template to insert the navigation bar (using miniframes) that can be added to headline (or footline) left sidebar or righ sidebar.
+% \UnitTested
+% \TestFiles{gotham-test-048}
+% \begin{macrocode}
+\defbeamertemplate*{mini~nav~progress~head/foot}{gotham~miniframes~theme}
+{
+ %,ht=1.75ex,dp=2.75ex
+ \begin{beamercolorbox}[ignorebg]{section~in~head/foot}
+ \hfuzz=\paperwidth
+ \insertnavigation{\paperwidth}
+ % \dohead
+ \vspace{0.05cm}
+ \end{beamercolorbox}
+}
+\defbeamertemplate*{mini~nav~progress~left}{gotham~miniframes~theme}
+{
+ \settoheight{\gotham@temp@heightFrametitle}{\gotham@strut}
+ \addtolength{\gotham@temp@heightFrametitle}{\gotham@frametitle@toppadding+\gotham@frametitle@bottompadding+\gothamProgressHeadFootLineheight}
+
+ \setlength{\gotham@temp@PaperheightFrametitle}{\paperheight-\gotham@temp@heightFrametitle-\gothamFootlineHeight-\gothamFootlineDepth-\gothamProgressHeadFootLineheight}
+
+ \vspace{-0.6\paperheight}
+ \rotatebox{90}{
+ %,ht=1.75ex,dp=2.75ex
+ \begin{beamercolorbox}[ignorebg]{section~in~head/foot}
+ \hfuzz=\gotham@temp@PaperheightFrametitle
+ \insertnavigation{\gotham@temp@PaperheightFrametitle}
+ % \dohead
+ % \vspace{0.05cm}
+ \end{beamercolorbox}
+ }
+}
+\defbeamertemplate*{mini~nav~progress~right}{gotham~miniframes~theme}
+{
+ \settoheight{\gotham@temp@heightFrametitle}{\gotham@strut}
+ \addtolength{\gotham@temp@heightFrametitle}{\gotham@frametitle@toppadding+\gotham@frametitle@bottompadding+\gothamProgressHeadFootLineheight}
+
+ \setlength{\gotham@temp@PaperheightFrametitle}{\paperheight-\gotham@temp@heightFrametitle-\gothamFootlineHeight-\gothamFootlineDepth-\gothamProgressHeadFootLineheight}
+
+ \vspace{\gotham@temp@heightFrametitle}
+ \hspace{-2.3em}
+ \rotatebox{-90}{
+ %,ht=1.75ex,dp=2.75ex
+ \begin{beamercolorbox}[ignorebg]{section~in~head/foot}
+ \hfuzz=\gotham@temp@PaperheightFrametitle
+ \insertnavigation{\gotham@temp@PaperheightFrametitle}
+ % \dohead
+ % \vspace{0.05cm}
+ \end{beamercolorbox}
+ }
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+%% Select the bullets shape
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate{mini~frame}{gotham~box}}
+% Template to add a new shape for miniframes |gotham box|.
+% \UnitTested
+% \TestFiles{gotham-test-048}
+% \begin{macrocode}
+\defbeamertemplate{mini~frame}{gotham~box}
+{
+ \begin{pgfpicture}{0pt}{0pt}{.1cm}{.1cm}
+ \pgfpathrectangle{\pgfpointorigin}{\pgfpoint{0.1cm}{0.1cm}}
+ \pgfusepath{fill,stroke}
+ \end{pgfpicture}
+}[action]{
+ \setbeamersize{mini~frame~size=.14cm, mini~frame~offset=.05cm}
+}
+%
+\defbeamertemplate{mini~frame~in~current~subsection}{gotham~box}
+{
+ \begin{pgfpicture}{0pt}{0pt}{.1cm}{.1cm}
+ \pgfpathrectangle{\pgfpointorigin}{\pgfpoint{0.1cm}{0.1cm}}
+ \pgfusepath{stroke}
+ \end{pgfpicture}
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate{mini~frame}{gotham~minibox}}
+% Template to add a new shape for miniframes |gotham minibox|.
+% \UnitTested
+% \TestFiles{gotham-test-048}
+% \begin{macrocode}
+\defbeamertemplate{mini~frame}{gotham~minibox}
+{
+ \begin{pgfpicture}{0pt}{0pt}{.05cm}{.05cm}
+ \pgfpathrectangle{\pgfpointorigin}{\pgfpoint{0.05cm}{0.05cm}}
+ \pgfusepath{fill,stroke}
+ \end{pgfpicture}
+}[action]{
+ \setbeamersize{mini~frame~size=.08cm, mini~frame~offset=.05cm}
+}
+%
+\defbeamertemplate{mini~frame~in~current~subsection}{gotham~minibox}
+{
+ \begin{pgfpicture}{0pt}{0pt}{.05cm}{.05cm}
+ \pgfpathrectangle{\pgfpointorigin}{\pgfpoint{0.05cm}{0.05cm}}
+ \pgfusepath{stroke}
+ \end{pgfpicture}
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate{mini~frame}{gotham~minibullet}}
+% Template to add a new shape for miniframes |gotham minibullet|.
+% \UnitTested
+% \TestFiles{gotham-test-048}
+% \begin{macrocode}
+\defbeamertemplate{mini~frame}{gotham~minibullet}
+{
+ \beamer@xelatex@fixminiframes
+ \begin{pgfpicture}{0pt}{0pt}{0.05cm}{0.05cm}
+ \pgfpathcircle{\pgfpoint{0.03cm}{0.03cm}}{0.03cm}
+ \pgfusepath{fill,stroke}
+ \end{pgfpicture}
+}[action]{
+ \setbeamersize{mini~frame~size=.09cm, mini~frame~offset=.05cm}
+}
+%
+\defbeamertemplate{mini~frame~in~current~subsection}{gotham~minibullet}
+{
+ \beamer@xelatex@fixminiframes
+ \begin{pgfpicture}{0pt}{0pt}{0.05cm}{0.05cm}
+ \pgfpathcircle{\pgfpoint{0.03cm}{0.03cm}}{0.03cm}
+ \pgfusepath{stroke}
+ \end{pgfpicture}
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{function}{\useoutertheme}
+% \begin{syntax}
+% \cs{useoutertheme}\oarg{option1=value1, ...}\marg{gotham}
+% \textrm{where the options are (default marked as} \defopt{default}\textrm{):}
+% \meta{mini frames shape} = \oarg{\defopt{gotham minibullet} \textbar default (bullet from beamer) \textbar tick \textbar box \textbar gotham box \textbar gotham minibox \textbar ... }
+% \meta{framesubtitle template} = \oarg{\defopt{gotham subnewline} \textbar ...}
+% \end{syntax}
+% The 'package' (useoutertheme) options can control |frame numbering| templates used in |footer| template.
+% \end{function}
+% \end{documentation}
+%%%%
+% \begin{implementation}
+% \begin{macro}{outer key -- interface}
+% Controls the outer settings for mini frames shape template.
+% \UnitTested
+% \TestFiles{gotham-test-048}
+% \begin{macrocode}
+\keys_define:nn { gotham / outer }{
+ %% mini~frames~shape
+ % mini~frames~shape .choice:,
+ mini~frames~shape .usage:n = { general },
+ mini~frames~shape .default:n = { gotham~minibullet },
+ % \__gotham_set_template:nn{title~page}{#1}
+ mini~frames~shape .code:n = {
+ % \__gotham_set_template:nn{mini~frames}{#1}% This can not work since this is an alias, so go back to normal
+ \setbeamertemplate{mini~frames}[#1]
+ },
+ % mini~frames~shape / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'#1'~is~unknown~for~the~(known)~option~'numbering',~so~being~ignored. }{helping~message} },
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate*{miniframe~home}}
+% Template to adapt Beamer to the internal modification brought by Gotham: differientiation between slide to come and those done, idem for section, subsection...
+% \UnitTested
+% \TestFiles{gotham-test-048}
+% \begin{macrocode}
+\defbeamertemplate*{miniframe~home}{beamer}{
+ % $\equiv$
+}
+\defbeamertemplate*{miniframe~current~slide}{beamer}{
+ \usebeamertemplate{mini~frame}
+}
+\defbeamertemplate*{miniframe~done~current~section}{beamer}{
+ \usebeamertemplate{mini~frame~in~current~subsection}
+}
+\defbeamertemplate*{miniframe~todo~current~section}{beamer}{
+ \usebeamertemplate{mini~frame~in~current~subsection}
+}
+\defbeamertemplate*{miniframe~done~other~section}{beamer}{
+ \usebeamertemplate{mini~frame~in~other~subsection}
+}
+\defbeamertemplate*{miniframe~todo~other~section}{beamer}{
+ \usebeamertemplate{mini~frame~in~other~subsection}
+}
+% Templates about should appear sectioning in mini frame.
+% \defbeamertemplate*{miniframe~part}{beamer}{}
+\defbeamertemplate*{miniframe~section~current}{beamer}{}
+\defbeamertemplate*{miniframe~section~done}{beamer}{}
+\defbeamertemplate*{miniframe~section~todo}{beamer}{}
+\defbeamertemplate*{miniframe~subsection~current}{beamer}{}
+\defbeamertemplate*{miniframe~subsection~todo}{beamer}{}
+\defbeamertemplate*{miniframe~subsection~done}{beamer}{}
+% \defbeamertemplate*{miniframe~subsubsection}{beamer}{}
+\defbeamertemplate*{miniframe~section~done~in~other~section}{default}[1][50]
+{
+ \color{fg!#1!bg}\usebeamertemplate{miniframe~section~done}
+}
+\defbeamertemplate*{miniframe~section~todo~in~other~section}{default}[1][50]
+{
+ \color{fg!#1!bg}\usebeamertemplate{miniframe~section~todo}
+}
+\defbeamertemplate*{miniframe~subsection~done~in~other~section}{default}[1][50]
+{
+ \color{fg!#1!bg}\usebeamertemplate{miniframe~subsection~done}
+}
+\defbeamertemplate*{miniframe~subsection~todo~in~other~section}{default}[1][50]
+{
+ \color{fg!#1!bg}\usebeamertemplate{miniframe~subsection~todo}
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate{miniframe~home}{gotham~mini}}
+% Templates for miniframes using a Gotham style inspired by a miniaturization than the one from Beamer.
+% \UnitTested
+% \TestFiles{gotham-test-048}
+% \begin{macrocode}
+\defbeamertemplate{miniframe~home}{gotham~mini}{
+ \resizebox{0.85\beamer@boxsize}{\beamer@boxsize}{$\equiv$}
+ % \scalebox{0.5}[0.95]{$\equiv$}
+}
+\defbeamertemplate{miniframe~current~slide}{gotham~mini}{
+ \usebeamercolor[fg]{alerted~text}
+ \usebeamertemplate{mini~frame}
+}
+\defbeamertemplate{miniframe~done~current~section}{gotham~mini}{
+ \usebeamertemplate{mini~frame}
+}
+\defbeamertemplate{miniframe~todo~current~section}{gotham~mini}{
+ \usebeamertemplate{mini~frame~in~current~subsection}
+}
+\defbeamertemplate{miniframe~done~other~section}{gotham~mini}[1][50]{
+ \color{fg!#1!bg}\usebeamertemplate{mini~frame}
+}
+\defbeamertemplate{miniframe~todo~other~section}{gotham~mini}[1][50]{
+ \color{fg!#1!bg}\usebeamertemplate{mini~frame~in~other~subsection}
+}
+% Templates about should appear sectioning in mini frame.
+% \defbeamertemplate{miniframe~part}{gotham~mini}[1][]{
+% p
+% }
+\defbeamertemplate{miniframe~section~current}{gotham~mini}{
+ \fontsize{3pt}{0pt}\selectfont
+ % \color{blue}
+ \tl_use:N \l__gotham_minif_tmpa_tl
+ \hspace{1.pt}
+}
+\defbeamertemplate{miniframe~section~done}{gotham~mini}{
+ \fontsize{3pt}{0pt}\selectfont
+ % \color{green}
+ \tl_use:N \l__gotham_minif_tmpa_tl
+ \hspace{1.pt}
+}
+\defbeamertemplate{miniframe~section~todo}{gotham~mini}{
+ \fontsize{3pt}{0pt}\selectfont
+ % \color{red}
+ \tl_use:N \l__gotham_minif_tmpa_tl
+ \hspace{1.pt}
+}
+\defbeamertemplate{miniframe~subsection~current}{gotham~mini}{
+ \usebeamercolor[fg]{alerted~text}
+ \hspace{-0.15pt}
+ \resizebox{\beamer@boxsize}{!}{\hspace{-0.75pt}$\blacklozenge$}
+}
+\defbeamertemplate{miniframe~subsection~todo}{gotham~mini}{
+ \hspace{-0.15pt}
+ \resizebox{\beamer@boxsize}{!}{\hspace{-0.75pt}$\lozenge$}
+}
+\defbeamertemplate{miniframe~subsection~done}{gotham~mini}{
+ \hspace{-0.15pt}
+ \resizebox{\beamer@boxsize}{!}{\hspace{-0.75pt}$\blacklozenge$}
+}
+% \defbeamertemplate{miniframe~subsubsection}{gotham~mini}{
+% d
+% }
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate{miniframe~home}{gotham~nano}}
+% Template for Gotham mini frame style using even less space.
+% \UnitTested
+% \TestFiles{gotham-test-048}
+% \begin{macrocode}
+\defbeamertemplate{miniframe~home}{gotham~nano}{
+ % \resizebox{\beamer@boxsize}{!}{$\equiv$}
+ \scalebox{0.5}[0.95]{$\equiv$}
+}
+\defbeamertemplate{miniframe~current~slide}{gotham~nano}{
+ o
+}
+\defbeamertemplate{miniframe~done~current~section}{gotham~nano}{
+ x
+}
+\defbeamertemplate{miniframe~todo~current~section}{gotham~nano}{
+ $\cdot$
+}
+\defbeamertemplate{miniframe~done~other~section}{gotham~nano}{
+ x
+}
+\defbeamertemplate{miniframe~todo~other~section}{gotham~nano}{
+ $\cdot$
+}
+% Templates about should appear sectioning in mini frame.
+% \defbeamertemplate{miniframe~part}{gotham~nano}[1][]{
+% p
+% }
+\defbeamertemplate{miniframe~section~current}{gotham~nano}{
+ \tl_use:N \l__gotham_minif_tmpa_tl
+}
+\defbeamertemplate{miniframe~section~done}{gotham~nano}{
+ \tl_use:N \l__gotham_minif_tmpa_tl
+}
+\defbeamertemplate{miniframe~section~todo}{gotham~nano}{
+ \tl_use:N \l__gotham_minif_tmpa_tl
+}
+\defbeamertemplate{miniframe~subsection~current}{gotham~nano}{
+ \usebeamercolor[fg]{alerted~text}$\diamond$
+}
+\defbeamertemplate{miniframe~subsection~todo}{gotham~nano}{
+ $\diamond$
+}
+\defbeamertemplate{miniframe~subsection~done}{gotham~nano}{
+ $\diamond$
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplateparent{mini~frames~bundle}}
+% Define a parent template to set the 6 templates at once.
+% \UnitTested
+% \TestFiles{gotham-test-048}
+% \begin{macrocode}
+\defbeamertemplateparent{mini~frames~bundle}
+{ miniframe~home, miniframe~current~slide,
+ miniframe~done~current~section, miniframe~todo~current~section, miniframe~done~other~section, miniframe~todo~other~section,
+ miniframe~section~current, miniframe~section~done, miniframe~section~todo,
+ miniframe~subsection~current, miniframe~subsection~done, miniframe~subsection~todo,
+}{}
+%\setbeamertemplate{mini~frames~bundle}[gotham~mini]%[beamer]%[gotham~nano]%
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{function}{\useoutertheme}
+% \begin{syntax}
+% \cs{useoutertheme}\oarg{option1=value1, ...}\marg{gotham}
+% \textrm{where the options are (default marked as} \defopt{default}\textrm{):}
+% \meta{mini frames bundle} = \oarg{\defopt{gotham minibullet} \textbar default (bullet from beamer) \textbar tick \textbar box \textbar gotham box \textbar gotham minibox \textbar ... }
+% \meta{framesubtitle template} = \oarg{\defopt{gotham subnewline} \textbar ...}
+% \end{syntax}
+% The 'package' (useoutertheme) options can control |mini frame| templates.
+% \end{function}
+% \end{documentation}
+%%%%
+% \begin{implementation}
+% \begin{macro}{outer key -- interface}
+% Controls the outer settings for mini frames bundle template.
+% \UnitTested
+% \TestFiles{gotham-test-050}
+% \begin{macrocode}
+\keys_define:nn { gotham / outer }{
+ %% mini~frames~bundle
+ % mini~frames~bundle .choice:,
+ mini~frames~bundle .usage:n = { general },
+ mini~frames~bundle .default:n = { gotham~mini },
+ % \__gotham_set_template:nn{title~page}{#1}
+ mini~frames~bundle .code:n = {
+ % \__gotham_set_template:nn{mini~frames}{#1}% This can not work since this is an alias, so go back to normal
+ \setbeamertemplate{mini~frames~bundle}[#1]
+ },
+ % mini~frames~bundle / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'#1'~is~unknown~for~the~(known)~option~'numbering',~so~being~ignored. }{helping~message} },
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+
+%%% MiniFrames Navigation %%%
+
+% \begin{documentation}
+% \begin{function}{\useoutertheme}
+% \begin{syntax}
+% \cs{useoutertheme}\oarg{option1=value1, ...}\marg{gotham}
+% \textrm{where the options are (default marked as} \defopt{default}\textrm{):}
+% \meta{mini frames compress} = \oarg{\defopt{on} \textbar off }
+% \end{syntax}
+% The 'package' (useoutertheme) options can control |compress| option in mini frames.
+% \end{function}
+% \end{documentation}
+%%%%
+% \begin{implementation}
+% \begin{macro}{outer key -- interface}
+% Controls the outer settings for mini frames compress template.
+% \UnitTested
+% \TestFiles{gotham-test-050}
+% \begin{macrocode}
+\keys_define:nn { gotham / outer }{
+ % mini~frames~compress default
+ mini~frames~compress .choice:,
+ mini~frames~compress .usage:n = { general },
+ mini~frames~compress .default:n = { true },
+
+ mini~frames~compress / true .code:n = { \beamer@compresstrue },
+ mini~frames~compress / on .code:n = { \beamer@compresstrue },
+ mini~frames~compress / enable .code:n = { \beamer@compresstrue },
+
+ mini~frames~compress / false .code:n = { \beamer@compressfalse },
+ mini~frames~compress / off .code:n = { \beamer@compressfalse },
+ mini~frames~compress / disable .code:n = { \beamer@compressfalse },
+
+ mini~frames~compress / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'#1'~is~unknown~for~the~(known)~option~'mini~frames~compress',~so~being~ignored. }{helping~message: mini~frames~compress / unknown} },
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{variable}{\l__gotham_minif_tmpa_tl, \gotham@temp@MiniframeSubsecDim, \gotham@temp@lastSec}
+% Temporary variables used for the store dimension of the miniframe subsection, check if the last section treated and the pass the value of the section to the section template.
+% \begin{macrocode}
+\newlength{\gotham@temp@MiniframeSubsecDim}
+\newlength{\gotham@temp@MiniframeSecDim}
+\def\gotham@temp@lastSec{-1}
+\tl_new:N \l__gotham_minif_tmpa_tl
+\tl_new:N \l__gotham_minif_tmpb_tl
+% \end{macrocode}
+% \end{variable}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{function}{\renewcommand{\slideentry}}
+% Redefinition of the slideentry command from Beamer in order to add home page symbol, section symbol, subsection symbol to come and done.
+% \TestFiles{gotham-test-048}
+% \begin{macrocode}
+% definition from Beamerbasenavigation.sty
+% \def\slideentry#1#2#3#4#5#6{%
+\renewcommand{\slideentry}[6]{%
+ %section number, subsection number, slide number, first/last frame, page number, part number
+ \ifnum#6=\c@part\ifnum#3>0%\ifnum#6=\c@part\ifnum#1>0\ifnum#3>0 MODIF
+ \ifbeamer@compress%
+ \advance\beamer@xpos by1\relax%
+ \else%
+ \ifnum#2=0%
+ \beamer@ypos@offset=1\relax%
+ \fi%
+ \beamer@xpos=#3\relax%
+ \beamer@ypos=#2\relax%
+ \advance\beamer@ypos by \beamer@ypos@offset\relax%
+ \fi%
+ %% Add section number and subsection symbol to miniframes.
+ %% MODIF below, inspired from https://tex.stackexchange.com/questions/722523
+ \ifnum#3=1%\c@subsectionslide=#3 % if =1, so it has been reset => new section or subsection
+ \ifnum#1>0\ifnum#2<2% => there no subsection in this section.
+ \ifnum\gotham@temp@lastSec=#1%
+ % this means, that we already went through: there no subsec, then the first subsec has been defined.
+ \else%
+ \tl_set:Nn \l__gotham_minif_tmpa_tl {#1}
+ \settowidth{\gotham@temp@MiniframeSecDim}{\usebeamertemplate{miniframe~section~current}}%
+ % \addtolength{\gotham@temp@MiniframeSecDim}{1.5pt}
+ \hbox to 0pt{%
+ \beamer@tempdim=-\beamer@vboxoffset%
+ \advance\beamer@tempdim by-\beamer@boxsize%
+ \multiply\beamer@tempdim by\beamer@ypos%
+ \advance\beamer@tempdim by -.05cm%
+ \raise\beamer@tempdim\hbox{%
+ \beamer@tempdim=\beamer@boxsize%
+ \multiply\beamer@tempdim by\beamer@xpos%
+ \advance\beamer@tempdim by -\beamer@boxsize%
+ \advance\beamer@tempdim by -\gotham@temp@MiniframeSecDim% NEW
+ \advance\beamer@tempdim by 1pt%
+ \kern\beamer@tempdim%
+ \global\beamer@section@min@dim\beamer@tempdim%
+ \hbox{\beamer@link(#4){%
+ % \usebeamertemplate{miniframe~section}%
+ % if not first page then check if it is the current section.
+ \ifnum\c@section=#1%
+ % check if it is the current slide
+ \ifnum\c@subsectionslide=#3%
+ \usebeamertemplate{miniframe~section~current}
+ \else%
+ \ifnum\c@subsectionslide<#3
+ \usebeamertemplate{miniframe~section~todo}
+ \else%
+ \usebeamertemplate{miniframe~section~done}
+ \fi%
+ \fi%
+ \else% \ifnum\c@section=#1%
+ \ifnum\c@section<#1
+ \usebeamertemplate{miniframe~section~todo~in~other~section}
+ \else%
+ \usebeamertemplate{miniframe~section~done~in~other~section}
+ \fi%
+ \fi% \ifnum\c@section=#1
+ }}%
+ }%
+ }%
+ \def\gotham@temp@lastSec{#1}%
+ \fi%
+ \fi\fi%
+ \ifnum#2>0%
+ % Check if the miniframe subsection template is empty
+ \ifbeamertemplateempty{miniframe~subsection~current}{
+ % do nothing
+ }{
+ \tl_set:Nn \l__gotham_minif_tmpb_tl {#2}
+ \settowidth{\gotham@temp@MiniframeSubsecDim}{}%\usebeamertemplate{miniframe~subsection~current}}%
+ \addtolength{\gotham@temp@MiniframeSubsecDim}{+1.\beamer@boxsize}%
+ \advance\beamer@xpos by1\relax%
+ \hbox to 0pt{%
+ \beamer@tempdim=-\beamer@vboxoffset%
+ \advance\beamer@tempdim by-\beamer@boxsize%
+ \multiply\beamer@tempdim by\beamer@ypos%
+ \advance\beamer@tempdim by -.05cm%
+ \raise\beamer@tempdim\hbox{%
+ \beamer@tempdim=\beamer@boxsize%
+ \multiply\beamer@tempdim by\beamer@xpos%
+ \advance\beamer@tempdim by -\beamer@boxsize%
+ \advance\beamer@tempdim by -\gotham@temp@MiniframeSubsecDim% NEW
+ \advance\beamer@tempdim by 1pt%
+ \kern\beamer@tempdim%
+ \global\beamer@section@min@dim\beamer@tempdim%
+ \hbox{\beamer@link(#4){%
+ % \usebeamertemplate{miniframe~subsection~current}%
+ % if not first page then check if it is the current section.
+ \ifnum\c@section=#1%
+ % check if it is the current subsection
+ \ifnum\c@subsection=#2%
+ % check if it is the current slide
+ \ifnum\c@subsectionslide=#3%
+ \usebeamertemplate{miniframe~subsection~current}
+ \else%
+ \ifnum\c@subsectionslide<#3
+ \usebeamertemplate{miniframe~subsection~todo}
+ \else%
+ \usebeamertemplate{miniframe~subsection~done}
+ \fi%
+ \fi%
+ \else% \ifnum\c@subsection=#2%
+ \ifnum\c@subsection<#2
+ \usebeamertemplate{miniframe~subsection~todo}
+ \else%
+ \usebeamertemplate{miniframe~subsection~done}
+ \fi%
+ \fi% \ifnum\c@subsection=#2%
+ \else% \ifnum\c@section=#1%
+ \ifnum\c@section<#1
+ \usebeamertemplate{miniframe~subsection~todo~in~other~section}
+ \else%
+ \usebeamertemplate{miniframe~subsection~done~in~other~section}
+ \fi%
+ \fi% \ifnum\c@section=#1
+ }}% \hbox{\beamer@link
+ }% raisebox
+ }% hbox
+ }% end if template empty
+ \fi% \ifnum#2>0
+ \else
+ \ifbeamer@compress%
+ % \advance\beamer@xpos by1\relax%
+ \else%
+ \ifbeamertemplateempty{miniframe~subsection~current}{
+ % NEW
+ % do nothing
+ }{
+ \advance\beamer@xpos by 1\relax%
+ }
+ \fi%
+ \fi% \ifnum#3=1
+
+ %% end of modif to add section number and subsection symbol.
+ \hbox to 0pt{%
+ \beamer@tempdim=-\beamer@vboxoffset%
+ \advance\beamer@tempdim by-\beamer@boxsize%
+ \multiply\beamer@tempdim by\beamer@ypos%
+ \advance\beamer@tempdim by -.05cm%
+ \raise\beamer@tempdim\hbox{%
+ \beamer@tempdim=\beamer@boxsize%
+ \multiply\beamer@tempdim by\beamer@xpos%
+ \advance\beamer@tempdim by -\beamer@boxsize%
+ \advance\beamer@tempdim by 1pt%
+ \kern\beamer@tempdim
+ \global\beamer@section@min@dim\beamer@tempdim
+ \hbox{\beamer@link(#4){%
+ \usebeamerfont{mini~frame}%
+ % \ifnum\c@section=#1%
+ % \ifnum\c@subsection=#2%
+ % \usebeamercolor[fg]{mini~frame}%
+ % \ifnum\c@subsectionslide=#3%
+ % \usebeamertemplate{mini~frame}%\beamer@minislidehilight%
+ % \else%
+ % \usebeamertemplate{mini~frame~in~current~subsection}%\beamer@minisliderowhilight%
+ % \fi%
+ % \else%
+ % \usebeamercolor{mini~frame}%
+ % %\color{fg!50!bg}%
+ % \usebeamertemplate{mini~frame~in~other~subsection}%\beamer@minislide%
+ % \fi%
+ % \else%
+ % \usebeamercolor{mini~frame}%
+ % %\color{fg!50!bg}%
+ % \usebeamertemplate{mini~frame~in~other~subsection}%\beamer@minislide%
+ % \fi%
+ %%
+ %% CHANGE FROM HERE: I rewrote this part.
+ % If first page (ie. 1/1)
+ \def\gotham@temp@i{1/1}
+ \def\gotham@temp@ii{#4}
+ \ifx\gotham@temp@i\gotham@temp@ii
+ % If first page (ie. title page) then apply a special mini frame
+ \usebeamertemplate{miniframe~home}
+ \else
+ % if not first page then check if it is the current section.
+ \ifnum\c@section=#1%
+ % check if it is the current subsection
+ \ifnum\c@subsection=#2%
+ \usebeamercolor[fg]{mini~frame}%
+ % check if it is the current slide
+ \ifnum\c@subsectionslide=#3%
+ \usebeamertemplate{miniframe~current~slide}
+ % \usebeamertemplate{mini~frame}% \beamer@minislidehilight%
+ \else%
+ % \usebeamertemplate{mini~frame~in~current~subsection}% \beamer@minisliderowhilight%
+ \ifnum\c@subsectionslide<#3
+ \usebeamertemplate{miniframe~todo~current~section}
+ \else%
+ \usebeamertemplate{miniframe~done~current~section}
+ \fi%
+ \fi%
+ \else% \ifnum\c@subsection=#2%
+ \usebeamercolor{mini~frame}%
+ % \usebeamertemplate{mini~frame~in~other~subsection}% \beamer@minislide%
+ \ifnum\c@subsection<#2
+ \usebeamertemplate{miniframe~todo~other~section}
+ \else%
+ \usebeamertemplate{miniframe~done~other~section}
+ \fi%
+ \fi% \ifnum\c@subsection=#2%
+ \else% \ifnum\c@section=#1%
+ \usebeamercolor{mini~frame}%
+ % \usebeamertemplate{mini~frame~in~other~subsection}% \beamer@minislide%
+ \ifnum\c@section<#1
+ \usebeamertemplate{miniframe~todo~other~section}
+ \else%
+ \usebeamertemplate{miniframe~done~other~section}
+ \fi%
+ \fi% \ifnum\c@section=#1
+ \fi% \ifx\gotham@temp@i\gotham@temp@ii
+ }}}\hskip-10cm plus 1fil%
+ }\fi% \ifnum#1>0\ifnum#3>0%
+ \else% \ifnum#6=\c@part
+ \fakeslideentry{#1}{#2}{#3}{#4}{#5}{#6}%
+ \fi\ignorespaces%
+ % \def\gotham@temp@lastSec{-1}%
+}%
+% \end{macrocode}
+% \end{function}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{variable}{gothamZerosectionframes}
+% Boolean variable to flag if they are frame in a zeroth section.
+% This variable helps to adapt the spreading of |mini frames nav| bar.
+% This variable is automatically set if the spread is set correctly at the beginning of the presention.
+% If the spreading or the mini frame nav is disable at the zeroth section then reactivated latter, it might create unwanted spreading.
+% In such situation the variable has to be set manually to correct the spreading.
+% \end{variable}
+% \end{documentation}
+%%%%
+% \begin{implementation}
+% \begin{variable}{gothamZerosectionframes}
+% Boolean variable to flag if they are frame in a zeroth section.
+% \begin{macrocode}
+\providebool{gothamZerosectionframes}
+\boolfalse{gothamZerosectionframes}
+% \end{macrocode}
+% \end{variable}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\insertnavigation,\sectionentry}
+% Patches for |\insertnavigation| and |\sectionentry| to be able to adapt with spreading values.
+% \UnitTested
+% \TestFiles{gotham-test-048}
+% \begin{macrocode}
+\providecommand{\gothamInsertNavlength}{
+ % spreading by default
+ \ifbool{gothamZerosectionframes}{
+ %true
+ % spreading
+ \hskip-0.5ex~plus~1fill
+ }{
+ %false
+ \hskip-1.875ex~plus-1fill
+ }%
+}
+\providecommand{\gothamPatchInsertNav}{
+ % Don't patch for now
+ \box\beamer@sectionbox\hfil\hskip.3cm
+}
+\providecommand{\gothamPatchSectionentry}{
+ % Don't patch for now
+ \hskip1.875ex~plus~1fill
+}
+\providecommand{\gothamPatchSectionbox}{
+ % Don't patch for now
+ \ht\beamer@sectionbox=1.875ex
+ \dp\beamer@sectionbox=0.75ex
+}
+\ExplSyntaxOff
+ % To let the 0-th section appear.
+ \patchcmd{\insertnavigation}{\hskip-1.875ex plus-1fill}{%
+ \ifnum\value{section}=0%
+ \ifnum\value{framenumber}>0%
+ \hskip-0ex%
+ \global\booltrue{gothamZerosectionframes}%
+ \fi\fi%
+ \gothamInsertNavlength%
+ }{}{}
+ %% Remove hfill between sections => flush right bullet bar, if not corrected.
+ \patchcmd{\sectionentry}{\hskip1.875ex plus 1fill}{\gothamPatchSectionentry}{}{}
+ %% Centering the bullet bar
+ \patchcmd{\insertnavigation}{\box\beamer@sectionbox\hfil\hskip.3cm}{\gothamPatchInsertNav}{}{}
+ % Patch size of sectionbox
+ \patchcmd{\insertnavigation}{\ht\beamer@sectionbox=1.875ex%
+ \dp\beamer@sectionbox=0.75ex%
+ }{
+ \gothamPatchSectionbox
+ }{}{}
+ \patchcmd{\sectionentry}{\ht\beamer@sectionbox=1.875ex%
+ \dp\beamer@sectionbox=0.75ex%
+ }{
+ \gothamPatchSectionbox
+ }{}{}
+\ExplSyntaxOn
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{function}{\useoutertheme}
+% \begin{syntax}
+% \cs{useoutertheme}\oarg{option1=value1, ...}\marg{gotham}
+% \textrm{where the options are (default marked as} \defopt{default}\textrm{):}
+% \meta{mini frames nav spreading} = \oarg{\defopt{centering} \textbar spreading \textbar left \textbar right }
+% \end{syntax}
+% The 'package' (useoutertheme) options can control spreading of the mini frames navigation.
+% \end{function}
+% \end{documentation}
+%%%%
+% \begin{implementation}
+% \begin{macro}{outer key -- interface}
+% Controls the outer settings for mini frames navigation spreading.
+% \UnitTested
+% \TestFiles{gotham-test-051}
+% \begin{macrocode}
+\keys_define:nn { gotham / outer }{
+ % mini~frames~nav~spreading default
+ mini~frames~nav~spreading .choice:,
+ mini~frames~nav~spreading .usage:n = { general },
+ mini~frames~nav~spreading .default:n = { spreading },
+
+ mini~frames~nav~spreading / spreading .code:n = {
+ %
+ \renewcommand{\gothamInsertNavlength}{
+ \ifbool{gothamZerosectionframes}{
+ %true
+ % spreading
+ \hskip-0.5ex
+ }{
+ %false
+ \hskip-1.875ex~plus-1fill
+ }%
+ }
+ % No other patch needed, but renewcommand if it has been modified previously.
+ \renewcommand{\gothamPatchInsertNav}{
+ % Don't patch for now
+ \box\beamer@sectionbox\hfil\hskip.3cm
+ }
+ \renewcommand{\gothamPatchSectionentry}{
+ % Don't patch for now
+ \hskip1.875ex~plus~1fill
+ }
+ },
+ mini~frames~nav~spreading / centering .code:n = {
+ %
+ \renewcommand{\gothamInsertNavlength}{
+ \ifbool{gothamZerosectionframes}{
+ %true
+ % centering +patch sectionenty +patch insertnav @sectionbox
+ \hskip-0.5ex~plus~1fill
+ }{
+ %false
+ % \patchcmd{\insertnavigation}{\hskip-1.875ex plus-1fill}{\hfill}{}{}
+ \hfill
+ }%
+ }
+ % Centering the bullet bar
+ % \patchcmd{\insertnavigation}{\box\beamer@sectionbox\hfil\hskip.3cm}{ \box\beamer@sectionbox\hfill\hskip.3cm}{}{}
+ \renewcommand{\gothamPatchInsertNav}{
+ \box\beamer@sectionbox\hfill\hskip.3cm
+ }
+ %% Remove hfill between sections => flush right bullet bar, if not corrected.
+ % \patchcmd{\sectionentry}{\hskip1.875ex plus 1fill}{\hskip 3.5ex}{}{}
+ \renewcommand{\gothamPatchSectionentry}{
+ \hskip~3.5ex
+ }
+ },
+ mini~frames~nav~spreading / left .code:n = {
+ %
+ \renewcommand{\gothamInsertNavlength}{
+ \ifbool{gothamZerosectionframes}{
+ %true
+ % flush left +patch sectionenty
+ \hskip-0.5ex
+ }{
+ %false
+ % no patch
+ \hskip-1.875ex plus-1fill
+ }%
+ }
+ % Centering the bullet bar : NO
+ % no patch
+ \renewcommand{\gothamPatchInsertNav}{
+ \box\beamer@sectionbox\hfil\hskip.3cm
+ }
+ %% Remove hfill between sections => flush right bullet bar, if not corrected.
+ % \patchcmd{\sectionentry}{\hskip1.875ex plus 1fill}{\hskip 3.5ex}{}{}
+ \renewcommand{\gothamPatchSectionentry}{
+ \hskip~3.5ex
+ }
+ },
+ mini~frames~nav~spreading / right .code:n = {
+ %
+ \renewcommand{\gothamInsertNavlength}{
+ \ifbool{gothamZerosectionframes}{
+ %true
+ % flush right +patch sectionenty
+ \hskip-0.5ex~plus~1fill
+ }{
+ %false
+ % no patch
+ \hskip-1.875ex plus-1fill
+ }%
+ }
+ % Centering the bullet bar : NO
+ % no patch
+ \renewcommand{\gothamPatchInsertNav}{
+ \box\beamer@sectionbox\hfil\hskip.3cm
+ }
+ %% Remove hfill between sections => flush right bullet bar, if not corrected.
+ % \patchcmd{\sectionentry}{\hskip1.875ex plus 1fill}{\hskip 3.5ex}{}{}
+ \renewcommand{\gothamPatchSectionentry}{
+ \hskip~3.5ex
+ }
+ },
+ mini~frames~nav~spreading / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'#1'~is~unknown~for~the~(known)~option~'mini~frames~nav~spreading',~so~being~ignored. }{helping~message: mini~frames~nav~spreading / unknown} },
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{function}{\useoutertheme}
+% \begin{syntax}
+% \cs{useoutertheme}\oarg{option1=value1, ...}\marg{gotham}
+% \textrm{where the options are (default marked as} \defopt{default}\textrm{):}
+% \meta{mini frames nav sectioning} = \oarg{\defopt{on} \textbar off }
+% \end{syntax}
+% The 'package' (useoutertheme) options can control navigation sectioning option in mini frames.
+% \end{function}
+% \end{documentation}
+%%%%
+% \begin{implementation}
+% \begin{macro}{outer key -- interface}
+% Controls the outer settings for mini frames navigation sectioning template.
+% \UnitTested
+% \TestFiles{gotham-test-051}
+% \begin{macrocode}
+\keys_define:nn { gotham / outer }{
+ % mini~frames~nav~sectioning default
+ mini~frames~nav~sectioning .choice:,
+ mini~frames~nav~sectioning .usage:n = { general },
+ mini~frames~nav~sectioning .default:n = { secsubsection },
+
+ mini~frames~nav~sectioning / none .code:n = {
+ %
+ \__gotham_set_template:nn{section~in~head/foot~shaded}{default/empty}
+ \__gotham_set_template:nn{section~in~head/foot}{default/empty}
+ \renewcommand{\gothamPatchSectionbox}{
+ % patch to set section box height to 0.
+ \ht\beamer@sectionbox=0pt
+ \dp\beamer@sectionbox=0pt
+ }
+ },
+ mini~frames~nav~sectioning / section .code:n = {
+ %
+ \__gotham_set_template:nn{section~in~head/foot~shaded}{default} %from Beamer
+ \__gotham_set_template:nn{section~in~head/foot}{default} %from Beamer
+ },
+ mini~frames~nav~sectioning / secsubsection .code:n = {
+ %
+ \__gotham_set_template:nn{section~in~head/foot~shaded}{default/gotham~secSubsec}
+ \__gotham_set_template:nn{section~in~head/foot}{default/gotham~secSubsec}
+ },
+
+ mini~frames~nav~sectioning / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'#1'~is~unknown~for~the~(known)~option~'mini~frames~nav~sectioning',~so~being~ignored. }{helping~message: mini~frames~nav~sectioning / unknown} },
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{function}{\useoutertheme}
+% \begin{syntax}
+% \cs{useoutertheme}\oarg{option1=value1, ...}\marg{gotham}
+% \textrm{where the options are (default marked as} \defopt{default}\textrm{):}
+% \meta{mini frames nav position} = \oarg{\defopt{none} \textbar head \textbar foot \textbar left \textbar right}
+% \end{syntax}
+% The 'package' (useoutertheme) options can control navigation position option in mini frames.
+% \end{function}
+% \end{documentation}
+%%%%
+% \begin{implementation}
+% \begin{macro}{outer key -- interface}
+% Controls the outer settings for mini frames navigation position template.
+% \UnitTested
+% \TestFiles{gotham-test-051}
+% \begin{macrocode}
+\tl_new:N \l__gotham_out_tmp_mfnposi_tl
+\keys_define:nn { gotham / outer }{
+ % mini~frames~nav~position default
+ mini~frames~nav~position .choice:,
+ mini~frames~nav~position .usage:n = { general },
+ mini~frames~nav~position .default:n = { none },
+
+ mini~frames~nav~position / none .code:n = {
+ %
+ % reset if it has modified by another progressbar strategy
+ % \__gotham_set_prop_template:nn{sidebar~canvas~right/default}{#1}
+ \tl_set:Nn \l__gotham_out_tmp_mfnposi_tl {none}
+
+ % head
+ \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {head} {
+ % True: nothing to do it is already occupied.
+ }{
+ \setbeamertemplate{headline}[default/\prop_item:Nn \l__gotham_template_name_prop {headline/default}]
+ }
+ % frametitle
+ % \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {frametitle} {
+ % % True: nothing to do it is already occupied.
+ % }{
+ % \setbeamertemplate{frametitle}[default/\prop_item:Nn \l__gotham_template_name_prop {frametitle/default}]
+ % }
+ % foot
+ \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {footline} {
+ % True: nothing to do it is already occupied.
+ }{
+ \setbeamertemplate{footline}[default/\prop_item:Nn \l__gotham_template_name_prop {footline/default}]
+ }
+ % left
+ \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {left} {
+ % True: nothing to do it is already occupied.
+ }{
+ \setbeamertemplate{sidebar~left}[default/\prop_item:Nn \l__gotham_template_name_prop {sidebar~left/default}]
+ }
+ % right
+ \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {right} {
+ % True: nothing to do it is already occupied.
+ }{
+ \setbeamertemplate{sidebar~right}[default/\prop_item:Nn \l__gotham_template_name_prop {sidebar~right/default}]
+ }
+ },
+ mini~frames~nav~position / head .code:n = {
+ %
+ \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {head} {
+ % True: nothing to do it is already done.
+ }{
+ % False : remember that choice in order to do not apply it several time and add to beamer template.
+ \tl_set:Nn \l__gotham_out_tmp_mfnposi_tl {head}
+
+ \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {head} {
+ % True: nothing to do it is already occupied.
+ }{
+ \setbeamertemplate{headline}[default/\prop_item:Nn \l__gotham_template_name_prop {headline/default}]
+ }
+ % \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {frametitle} {
+ % % True: nothing to do it is already occupied.
+ % }{
+ % \setbeamertemplate{frametitle}[default/\prop_item:Nn \l__gotham_template_name_prop {frametitle/default}]
+ % }
+ \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {footline} {
+ % True: nothing to do it is already occupied.
+ }{
+ \setbeamertemplate{footline}[default/\prop_item:Nn \l__gotham_template_name_prop {footline/default}]
+ }
+ \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {left} {
+ % True: nothing to do it is already occupied.
+ }{
+ \setbeamertemplate{sidebar~left}[default/\prop_item:Nn \l__gotham_template_name_prop {sidebar~left/default}]
+ }
+ \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {right} {
+ % True: nothing to do it is already occupied.
+ }{
+ \setbeamertemplate{sidebar~right}[default/\prop_item:Nn \l__gotham_template_name_prop {sidebar~right/default}]
+ }
+
+ %
+ \addtobeamertemplate{headline}{}{
+ \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {head} {
+ \usebeamertemplate*{mini~nav~progress~head/foot}
+ }{}
+ }
+ }
+ },
+ mini~frames~nav~position / foot .code:n = {
+ %
+ \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {foot} {
+ % True: nothing to do it is already done.
+ }{
+ % False : remember that choice in order to do not apply it several time and add to beamer template.
+ \tl_set:Nn \l__gotham_out_tmp_mfnposi_tl {foot}
+
+ \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {head} {
+ % True: nothing to do it is already occupied.
+ }{
+ \setbeamertemplate{headline}[default/\prop_item:Nn \l__gotham_template_name_prop {headline/default}]
+ }
+ % \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {frametitle} {
+ % % True: nothing to do it is already occupied.
+ % }{
+ % \setbeamertemplate{frametitle}[default/\prop_item:Nn \l__gotham_template_name_prop {frametitle/default}]
+ % }
+ \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {footline} {
+ % True: nothing to do it is already occupied.
+ }{
+ \setbeamertemplate{footline}[default/\prop_item:Nn \l__gotham_template_name_prop {footline/default}]
+ }
+ \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {left} {
+ % True: nothing to do it is already occupied.
+ }{
+ \setbeamertemplate{sidebar~left}[default/\prop_item:Nn \l__gotham_template_name_prop {sidebar~left/default}]
+ }
+ \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {right} {
+ % True: nothing to do it is already occupied.
+ }{
+ \setbeamertemplate{sidebar~right}[default/\prop_item:Nn \l__gotham_template_name_prop {sidebar~right/default}]
+ }
+
+ \addtobeamertemplate{footline}{}{
+ \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {foot} {
+ \usebeamertemplate*{mini~nav~progress~head/foot}
+ }{}
+ }
+ }
+ },
+ mini~frames~nav~position / left .code:n = {
+ %
+ \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {left} {
+ % True: nothing to do it is already done.
+ }{
+ % False : remember that choice in order to do not apply it several time and add to beamer template.
+ \tl_set:Nn \l__gotham_out_tmp_mfnposi_tl {left}
+
+ \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {head} {
+ % True: nothing to do it is already occupied.
+ }{
+ \setbeamertemplate{headline}[default/\prop_item:Nn \l__gotham_template_name_prop {headline/default}]
+ }
+ % \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {frametitle} {
+ % % True: nothing to do it is already occupied.
+ % }{
+ % \setbeamertemplate{frametitle}[default/\prop_item:Nn \l__gotham_template_name_prop {frametitle/default}]
+ % }
+ \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {footline} {
+ % True: nothing to do it is already occupied.
+ }{
+ \setbeamertemplate{footline}[default/\prop_item:Nn \l__gotham_template_name_prop {footline/default}]
+ }
+ \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {left} {
+ % True: nothing to do it is already occupied.
+ }{
+ \setbeamertemplate{sidebar~left}[default/\prop_item:Nn \l__gotham_template_name_prop {sidebar~left/default}]
+ }
+ \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {right} {
+ % True: nothing to do it is already occupied.
+ }{
+ \setbeamertemplate{sidebar~right}[default/\prop_item:Nn \l__gotham_template_name_prop {sidebar~right/default}]
+ }
+
+ %
+ \addtobeamertemplate{sidebar~left}{}{
+ \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {left} {
+ \usebeamertemplate*{mini~nav~progress~left}
+ }{}
+ }
+ }
+ },
+ mini~frames~nav~position / right .code:n = {
+ %
+ \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {right} {
+ % True: nothing to do it is already done.
+ }{
+ % False : remember that choice in order to do not apply it several time and add to beamer template.
+ \tl_set:Nn \l__gotham_out_tmp_mfnposi_tl {right}
+
+ \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {head} {
+ % True: nothing to do it is already occupied.
+ }{
+ \setbeamertemplate{headline}[default/\prop_item:Nn \l__gotham_template_name_prop {headline/default}]
+ }
+ % \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {frametitle} {
+ % % True: nothing to do it is already occupied.
+ % }{
+ % \setbeamertemplate{frametitle}[default/\prop_item:Nn \l__gotham_template_name_prop {frametitle/default}]
+ % }
+ \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {footline} {
+ % True: nothing to do it is already occupied.
+ }{
+ \setbeamertemplate{footline}[default/\prop_item:Nn \l__gotham_template_name_prop {footline/default}]
+ }
+ \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {left} {
+ % True: nothing to do it is already occupied.
+ }{
+ \setbeamertemplate{sidebar~left}[default/\prop_item:Nn \l__gotham_template_name_prop {sidebar~left/default}]
+ }
+ \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {right} {
+ % True: nothing to do it is already occupied.
+ }{
+ \setbeamertemplate{sidebar~right}[default/\prop_item:Nn \l__gotham_template_name_prop {sidebar~right/default}]
+ }
+
+ %
+ \addtobeamertemplate{sidebar~right}{}{
+ \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {right} {
+ \usebeamertemplate*{mini~nav~progress~right}
+ }{}
+ }
+ }
+ },
+
+ mini~frames~nav~position / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'#1'~is~unknown~for~the~(known)~option~'mini~frames~nav~position',~so~being~ignored. }{helping~message: mini~frames~nav~position / unknown} },
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+
+%%% Progress bar %%%
+
+% \begin{documentation}
+% \begin{variable}{\gothamProgressHeadFootLineheight}
+% Variable vertical length defining the height of the progressbar.
+% \end{variable}
+% \end{documentation}
+%%%%%%
+% \begin{implementation}
+% \begin{variable}{\gothamProgressHeadFootLineheight}
+% Lengths used in tikz rectangle.
+% \begin{macrocode}
+\newlength{\gotham@progressinheadfoot}
+\newlength{\gothamProgressHeadFootLineheight}
+\setlength{\gothamProgressHeadFootLineheight}{1.2ex}
+% \end{macrocode}
+% \end{variable}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{variable}{\l_gotham_ProgCircleMoving_bool, \l_gotham_progbar_advancement_tlbr_bool, \l_gotham_pmfn_bool}
+% Boolean variables controlling the direction of progression and if the current frame number is moving with the progression.
+% \end{variable}
+% \end{documentation}
+%%%%%%
+% \begin{implementation}
+% \begin{variable}{\l_gotham_ProgCircleMoving_bool, \l_gotham_progbar_advancement_tlbr_bool, \l_gotham_pmfn_bool}
+% Boolean variables controlling the direction of progression and if the current frame number is moving with the progression and if the miniframes navigation should be printed inside the progress bar.
+% \begin{macrocode}
+\bool_new:N \l_gotham_ProgCircleMoving_bool
+\bool_set_true:N \l_gotham_ProgCircleMoving_bool
+
+\bool_new:N \l_gotham_progbar_advancement_tlbr_bool
+\bool_set_true:N \l_gotham_progbar_advancement_tlbr_bool
+
+\bool_new:N \l_gotham_pmfn_bool
+\bool_set_false:N \l_gotham_pmfn_bool
+% \end{macrocode}
+% \end{variable}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{function}{\__gotham_rectangle_box_progressbar:n}
+% \begin{arguments}
+% \item |width| of the progress bar.
+% \end{arguments}
+% Command to draw a rectangular progress bar that can go from left to right or the opposite and that can include a navigation miniframes bar.
+% \TestFiles{gotham-test-048}
+% \begin{macrocode}
+% #1: 'linewidth'
+\cs_new_protected:Npn \__gotham_rectangle_box_progressbar:n #1
+{
+ %
+ \setlength{\gotham@progressinheadfoot}{
+ #1 * \ratio{\insertframenumber pt}{\inserttotalframenumber pt}
+ }
+
+ %
+ \begin{beamercolorbox}[wd=#1]{progress~bar~in~head/foot}
+ \begin{tikzpicture}
+ \usebeamercolor{progress~bar~in~head/foot}
+
+ % gray rectangle in the background.
+ \fill[color=progress~bar~in~head/foot.bg]
+ (0pt, 0pt) rectangle ++ (#1, \gothamProgressHeadFootLineheight)
+ ;
+
+ \bool_if:NTF \l_gotham_progbar_advancement_tlbr_bool {
+ % from left to right
+ % orange rectangle progressing
+ \fill[color=progress~bar~in~head/foot.fg]
+ (0pt, 0pt) rectangle ++ (\gotham@progressinheadfoot, \gothamProgressHeadFootLineheight)
+ ;
+ }{
+ % from right to left
+ % orange rectangle progressing
+ \fill[color=progress~bar~in~head/foot.fg]
+ (#1, \gothamProgressHeadFootLineheight) rectangle ++ (-\gotham@progressinheadfoot, -\gothamProgressHeadFootLineheight)
+ ;
+ }
+
+ \bool_if:NTF \l_gotham_pmfn_bool {
+ % progress miniframes navigation is on.
+ \node at (#1/2, \gothamProgressHeadFootLineheight/2)
+ [text~height=0.1pt, text~depth=0.05pt, inner~sep=0pt] %draw=red,
+ {
+ \usebeamercolor[fg]{normal~text}
+ % \fontsize{3.5pt}{0pt}\selectfont
+ \raisebox{0.5\gothamProgressHeadFootLineheight+1.4pt}[0pt][0pt]{
+ %\dohead
+ \hfuzz=#1
+ \insertnavigation{#1}
+ }
+ }
+ ;
+ }{
+ % false
+ % nothing to do since progress miniframes navigation is off.
+ }
+ \end{tikzpicture}
+ \end{beamercolorbox}
+}
+% \end{macrocode}
+% \end{function}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate{progress~bar~in~head/foot}{gotham~rectangle}}
+% template displaying the progress bar in head, frametitle or footline.
+% \UnitTested
+% \TestFiles{gotham-test-046, gotham-test-046b, gotham-test-047, gotham-test-048}
+% \begin{macrocode}
+\defbeamertemplate{progress~bar~in~head/foot}{gotham~rectangle}{
+ \nointerlineskip
+ \__gotham_rectangle_box_progressbar:n {\paperwidth}
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate{progress~bar~in~left/right}{gotham~rectangle}}
+% template displaying the progress bar in left or right.
+% \UnitTested
+% \TestFiles{gotham-test-046, gotham-test-046b, gotham-test-047,gotham-test-048}
+% \begin{macrocode}
+\defbeamertemplate{progress~bar~in~left}{gotham~rectangle}{
+ \nointerlineskip
+
+ \settoheight{\gotham@temp@heightFrametitle}{\gotham@strut}
+ \addtolength{\gotham@temp@heightFrametitle}{\gotham@frametitle@toppadding+\gotham@frametitle@bottompadding+\gothamProgressHeadFootLineheight}
+
+ \setlength{\gotham@temp@PaperheightFrametitle}{\paperheight-\gotham@temp@heightFrametitle-\gothamFootlineHeight-\gothamFootlineDepth-0.25\baselineskip}
+
+ \vspace{0.12275\paperheight}
+ \rotatebox{90}{
+ \__gotham_rectangle_box_progressbar:n {\gotham@temp@PaperheightFrametitle}
+ }
+}
+\defbeamertemplate{progress~bar~in~right}{gotham~rectangle}{
+ \nointerlineskip
+
+ \settoheight{\gotham@temp@heightFrametitle}{\gotham@strut}
+ \addtolength{\gotham@temp@heightFrametitle}{\gotham@frametitle@toppadding+\gotham@frametitle@bottompadding+\gothamProgressHeadFootLineheight}
+
+ \setlength{\gotham@temp@PaperheightFrametitle}{\paperheight-\gotham@temp@heightFrametitle-\gothamFootlineHeight-\gothamFootlineDepth-0.25\baselineskip}
+
+ \hspace{-\gothamProgressHeadFootLineheight}
+ \vspace{\gotham@temp@heightFrametitle-27.75pt}
+ \rotatebox{-90}{
+ \__gotham_rectangle_box_progressbar:n {\gotham@temp@PaperheightFrametitle}
+ }
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{function}{\__gotham_rounded_box_progressbar:nnnn}
+% \begin{arguments}
+% \item |width| Name of the option to add, this name should also correspond to the name of the environment followed by the suffix 'env'.
+% \item |ratio progressbar/extra command|
+% \item |colorbox name|
+% \item |extra command|
+% \end{arguments}
+% Command to draw a rounded box progress bar that can go from left to right or the opposite and that can include a navigation miniframes bar.
+% The fourth argument is a command to control what to display at the right side of the rounded box.
+% \TestFiles{gotham-test-048}
+% \begin{macrocode}
+% #1: 'linewidth'
+% #2: ratio of the progress bar
+% #3: colorbox name
+% #4: command for percent of progress
+\cs_new_protected:Npn \__gotham_rounded_box_progressbar:nnnn #1#2#3#4
+{
+ \setlength{\gotham@progressinheadfoot}{
+ #2#1 * \ratio{\insertframenumber pt}{\inserttotalframenumber pt}
+ }
+
+ % 1.035\gothamProgressHeadFootLineheight is to include the border inside the box.
+ \begin{beamercolorbox}[wd=#1, ht=1.035\gothamProgressHeadFootLineheight]{#3}
+ \;\hfill
+ %\tikzexternaldisable%
+ \begin{tikzpicture}[rounded~corners=0.5\gothamProgressHeadFootLineheight, very~thin]
+ \usebeamercolor{progress~bar~in~head/foot}
+
+ % gray rectangle in the background.
+ \shade[top~color=progress~bar~in~head/foot.bg!65, bottom~color=progress~bar~in~head/foot.bg!65, middle~color=progress~bar~in~head/foot.bg]
+ (0pt, 0pt) rectangle ++ (#2#1, \gothamProgressHeadFootLineheight)
+ ;
+
+ \bool_if:NTF \l_gotham_progbar_advancement_tlbr_bool {
+ % from left to right
+ % orange rectangle progressing
+ \shade[draw=progress~bar~in~head/foot.fg, top~color=progress~bar~in~head/foot.fg!70, bottom~color=progress~bar~in~head/foot.fg!70, middle~color=progress~bar~in~head/foot.fg]
+ (0pt, 0pt) rectangle ++ (\gotham@progressinheadfoot, \gothamProgressHeadFootLineheight)
+ ;
+ }{
+ % from right to left
+ % orange rectangle progressing
+ \shade[draw=progress~bar~in~head/foot.fg, top~color=progress~bar~in~head/foot.fg!70, bottom~color=progress~bar~in~head/foot.fg!70, middle~color=progress~bar~in~head/foot.fg]
+ (#2#1, \gothamProgressHeadFootLineheight) rectangle ++ (-\gotham@progressinheadfoot, -\gothamProgressHeadFootLineheight)
+ ;
+ }
+
+ \bool_if:NTF \l_gotham_pmfn_bool {
+ % progress miniframes navigation is on.
+ \node at (#2#1/2, \gothamProgressHeadFootLineheight/2)
+ [text~height=0.1pt, text~depth=0.05pt, inner~sep=0pt] %draw=red,
+ {
+ \usebeamercolor[fg]{normal~text}
+ % \fontsize{3.5pt}{0pt}\selectfont
+ \raisebox{0.5\gothamProgressHeadFootLineheight+1.4pt}[0pt][0pt]{
+ \hfuzz=#2#1
+ %\dohead
+ \insertnavigation{#2#1}
+ }
+ }
+ ;
+ }{
+ % false
+ % nothing to do since progress miniframes navigation is off.
+ }
+ \end{tikzpicture}
+ #4
+ \hfill \;
+ \end{beamercolorbox}
+}
+% \cs_generate_variant:Nn \__gotham_rounded_box_progressbar:nnnn { Nnnn }
+% \end{macrocode}
+% \end{function}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate{progress~bar~in~head/foot}{gotham~rounded~box}}
+% template displaying the progress bar in head, frametitle or footline.
+% \UnitTested
+% \TestFiles{gotham-test-046, gotham-test-046b, gotham-test-047,gotham-test-048}
+% \begin{macrocode}
+\defbeamertemplate{progress~bar~in~head/foot}{gotham~rounded~box}{
+ \nointerlineskip
+ \__gotham_rounded_box_progressbar:nnnn {\paperwidth}{0.93}{footline}{
+ \hfill
+ \raisebox{0.5\gothamProgressHeadFootLineheight-1.75pt}[0pt][0pt]{
+ \fontsize{5pt}{0pt}\selectfont
+ \usebeamercolor[fg]{normal~text}
+ \fp_eval:n {round(\insertframenumber*100/\inserttotalframenumber,0)}\,\%
+ }
+ }
+ % \__gotham_rounded_box_progressbar:nnnn {\paperwidth}{0.53}{progress~bar~in~head/foot}{}
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{\defbeamertemplate{progress~bar~in~left/right}{gotham~rounded~box}}
+% template displaying the progress bar in left or right sidebar.
+% \UnitTested
+% \TestFiles{gotham-test-046, gotham-test-046b, gotham-test-047,gotham-test-048}
+% \begin{macrocode}
+\defbeamertemplate{progress~bar~in~left}{gotham~rounded~box}{
+ \nointerlineskip
+
+ \settoheight{\gotham@temp@heightFrametitle}{\gotham@strut}
+ \addtolength{\gotham@temp@heightFrametitle}{\gotham@frametitle@toppadding+\gotham@frametitle@bottompadding+\gothamProgressHeadFootLineheight}
+
+ \setlength{\gotham@temp@PaperheightFrametitle}{\paperheight-\gotham@temp@heightFrametitle-\gothamFootlineHeight-\gothamFootlineDepth-0.25\baselineskip}
+
+ \vspace{0.12275\paperheight}
+ % \hspace{\gothamProgressHeadFootLineheight}
+ \rotatebox{90}{
+ \__gotham_rounded_box_progressbar:nnnn {\gotham@temp@PaperheightFrametitle}{0.89}{footline}{
+ \hfill
+ \raisebox{0.5\gothamProgressHeadFootLineheight-1.75pt}[0pt][0pt]{
+ \fontsize{5pt}{0pt}\selectfont
+ \fp_eval:n {round(\insertframenumber*100/\inserttotalframenumber,0)}\,\%
+ }
+ }
+ }
+}
+\defbeamertemplate{progress~bar~in~right}{gotham~rounded~box}{
+ \nointerlineskip
+
+ \settoheight{\gotham@temp@heightFrametitle}{\gotham@strut}
+ \addtolength{\gotham@temp@heightFrametitle}{\gotham@frametitle@toppadding+\gotham@frametitle@bottompadding+\gothamProgressHeadFootLineheight}
+
+ \setlength{\gotham@temp@PaperheightFrametitle}{\paperheight-\gotham@temp@heightFrametitle-\gothamFootlineHeight-\gothamFootlineDepth-0.25\baselineskip}
+
+ \hspace{-\gothamProgressHeadFootLineheight-0.2pt}
+ \vspace{\gotham@temp@heightFrametitle-27.75pt}
+ \rotatebox{-90}{
+ \__gotham_rounded_box_progressbar:nnnn {\gotham@temp@PaperheightFrametitle}{0.89}{footline}{
+ \hfill
+ \raisebox{0.5\gothamProgressHeadFootLineheight-1.75pt}[0pt][0pt]{
+ \fontsize{5pt}{0pt}\selectfont
+ \fp_eval:n {round(\insertframenumber*100/\inserttotalframenumber,0)}\,\%
+ }
+ }
+ }
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{variable}{\gothamProgressCircHeight, \gothamCounterCircleRadius, \gothamProgressCircBorderWidth}
+% Lengths controlling the aspect of |progress circle|.
+% |\gothamProgressCircHeight| is controlling the inner height of the circle (related to its diameter).
+% |\gothamCounterCircleRadius| is controlling the size of the counter circle containing the frame number.
+% |\gothamProgressCircBorderWidth| is controlling width of the progress circle.
+% \end{variable}
+% \end{documentation}
+%%%%%%
+% \begin{implementation}
+% \begin{variable}{\gothamProgressCircHeight, \gothamCounterCircleRadius, \gothamProgressCircBorderWidth}
+% Lengths used in tikz rectangle.
+% \begin{macrocode}
+%the height of the header is 1.8 times the lineheight of the frame title
+\newlength{\gothamProgressCircHeight}
+\setlength{\gothamProgressCircHeight}{1.8\baselineskip}
+%\setlength{\gothamProgressCircHeight}{2\baselineskip}
+\newlength{\gothamCounterCircleRadius}
+\setlength{\gothamCounterCircleRadius}{1.12ex}
+% width of the border
+\newlength{\gothamProgressCircBorderWidth}
+\setlength{\gothamProgressCircBorderWidth}{1.65mm}
+
+%% Induced length used internally, but can still be tuned manually by inspired people.
+% radius of the logo
+\newlength{\gothamProgressCircLogoRadius}
+\setlength{\gothamProgressCircLogoRadius}{1.2\gothamProgressCircHeight/2}
+% inner radius of border of the logo frame
+\newlength{\gothamProgressCircLogoInnerRadius}
+\setlength{\gothamProgressCircLogoInnerRadius}{1.1\gothamProgressCircLogoRadius}
+% radius of the outer border of the logo frame
+\newlength{\gothamProgressCircLogoOuterRadius}
+\setlength{\gothamProgressCircLogoOuterRadius}{\gothamProgressCircLogoInnerRadius+\gothamProgressCircBorderWidth}
+% radius of the counters
+\newlength{\gothamCounterRadius}
+\setlength{\gothamCounterRadius}{\gothamProgressCircLogoInnerRadius/2+\gothamProgressCircLogoOuterRadius/2}
+% \end{macrocode}
+% \end{variable}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{variable}{\l_gotham_ratio_progresscircle_fp, \l_gotham_angle_counterradius_fp}
+% angle ratio of the progress in degree and angle of the counter circle intercepted by the half of the border.
+% \begin{macrocode}
+% \fp_new:N \l_gotham_ratio_progress_fp
+\fp_new:N \l_gotham_ratio_progresscircle_fp
+% the angle token by the counter radius
+\fp_new:N \l_gotham_angle_counterradius_fp
+% requires xfp for asind
+\fp_set:Nn \l_gotham_angle_counterradius_fp {
+ \fpeval{ 2* asind (\gothamCounterCircleRadius / (2*\gothamCounterRadius)) }
+}
+% \end{macrocode}
+% \end{variable}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{function}{\gothamInstituteLogoCircle[#1]}
+% \begin{syntax}
+% \cs{gothamInstituteLogoCircle} \oarg{height (4ex)}
+% \end{syntax}
+% Command that have to be redefined in order to include your circular logo.
+% For example your can do |\renewcommand{\gothamInstituteLogoCircle}[1][4ex]{\includegraphics[height=#1]{gotham-logo.pdf}}|.
+% \end{function}
+% \end{documentation}
+%%%%%%
+% \begin{implementation}
+% \begin{function}{\gothamInstituteLogoCircle[#1]}
+% \begin{arguments}
+% \item |height| of the picture
+% \end{arguments}
+% Command to be redefined by users.
+% \TestFiles{ gotham-test-046b}
+% \begin{macrocode}
+\newcommand{\gothamInstituteLogoCircle}[1][4ex]{
+ \includegraphics[height=#1]{gotham-logo.pdf}
+}
+% \end{macrocode}
+% \end{function}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{function}{\gothamProgressCircle}
+% Internal command plotting the circle progress and that is used internal in the instituteLogo template within the frametitle template.
+% \TestFiles{ gotham-test-046b}
+% \begin{macrocode}
+\newcommand{\gothamProgressCircle}{
+ % \tikzexternaldisable
+ \begin{tikzpicture}[remember~picture,overlay]
+ % Load colors
+ \usebeamercolor{standin}
+ \usebeamercolor{frametitle}
+ \usebeamercolor{progress~bar~in~head/foot}
+
+ % Define center
+ \coordinate (localCenter);
+ % draw the outer circle
+ \fill[fill=progress~bar~in~head/foot.bg] (localCenter) circle (\gothamProgressCircLogoOuterRadius);
+ % draw the inner circle
+ \fill[fill=frametitle.bg] (localCenter) circle (\gothamProgressCircLogoInnerRadius);
+ \node at (localCenter) {\gothamInstituteLogoCircle[1.9\gothamProgressCircLogoRadius]};
+
+ %% draw progress circle/bar
+ \bool_if:NTF \l_gotham_ProgCircleMoving_bool {
+ % the circular counter with a moving counter
+
+ %% compute the angle for the progress circle
+ \bool_if:NTF \l_gotham_progbar_advancement_tlbr_bool {
+ \fp_set:Nn \l_gotham_ratio_progresscircle_fp {-(360)*\insertframenumber/\inserttotalframenumber }
+ }{
+ %\else% clockwise rotation
+ \fp_set:Nn \l_gotham_ratio_progresscircle_fp {(360)*(\insertframenumber/\inserttotalframenumber)}
+ }
+ %\fi
+
+ % draw the arc progress bar
+ \draw[
+ color=progress~bar~in~head/foot.fg,
+ line~width=0.6*\gothamProgressCircBorderWidth
+ ]
+ (localCenter)
+ ++
+ ([
+ xshift=\gothamCounterRadius
+ ]localCenter)
+ arc[
+ radius=\gothamCounterRadius,
+ start~angle=0,
+ end~angle={\fp_eval:n \l_gotham_ratio_progresscircle_fp}
+ ]
+ ;
+
+ % draw a point at the beginning of the progress circle
+ \fill[fill=frametitle.bg]
+ ([
+ xshift={\gothamCounterRadius}
+ ]localCenter.center)
+ circle (0.3*\gothamProgressCircBorderWidth)
+ ;
+ % place the current frame number
+ \node[
+ % fill=standin.bg, draw=progress~bar~in~head/foot.bg, thick, circle, minimum~width={\gothamCounterCircleRadius}, text~width={0pt}
+ ]
+ (pagenumframe) at (
+ [rotate=
+ {\fp_eval:n {\l_gotham_ratio_progresscircle_fp}},
+ xshift=\gothamCounterRadius
+ ]localCenter) {}
+ ;
+ \filldraw[
+ draw=progress~bar~in~head/foot.bg,
+ fill=standin.bg,
+ thick,
+ ]
+ (pagenumframe) circle (\gothamCounterCircleRadius)
+ ;
+ % place the frame number in another node to avoid unwanted rescaling.
+ \node[at=(pagenumframe.center), anchor=center] {
+ {\usebeamercolor[fg]{standin}\tiny\insertframenumber}
+ };
+ }{
+ %\else gothamProgCircleMoving
+ % the circular counter with a fixed counter
+
+ %% compute the angle for the progress circle
+ \bool_if:NTF \l_gotham_progbar_advancement_tlbr_bool {
+ \fp_set:Nn \l_gotham_ratio_progresscircle_fp {-(360-2\l_gotham_angle_counterradius_fp)*\insertframenumber/\inserttotalframenumber -\l_gotham_angle_counterradius_fp}
+ }{
+ %\else% clockwise rotation
+ \fp_set:Nn \l_gotham_ratio_progresscircle_fp {(360-2\l_gotham_angle_counterradius_fp)*(\insertframenumber/\inserttotalframenumber) +\l_gotham_angle_counterradius_fp}
+ }
+ %\fi
+
+ % draw the arc progress bar
+ \draw[
+ color=progress~bar~in~head/foot.fg,
+ line~width=0.6*\gothamProgressCircBorderWidth
+ ]
+ (localCenter)
+ ++
+ ([rotate={\fp_eval:n {\l_gotham_angle_counterradius_fp}},
+ xshift=\gothamCounterRadius
+ ]localCenter)
+ arc[
+ radius=\gothamCounterRadius,
+ start~angle={\fp_eval:n \l_gotham_angle_counterradius_fp},
+ end~angle={\fp_eval:n \l_gotham_ratio_progresscircle_fp}
+ ]
+ ;
+
+ % draw a point at the end of the progress circle
+ \fill[fill=frametitle.bg]
+ ([
+ rotate={\fp_eval:n {\l_gotham_ratio_progresscircle_fp}}, xshift={\gothamCounterRadius}
+ ]localCenter.center)
+ circle (0.3*\gothamProgressCircBorderWidth)
+ ;
+ % place the total number of frames
+ \node[] (leftick)
+ at ([xshift={\gothamProgressCircLogoOuterRadius+1.25ex}]localCenter) {}
+ ;
+ %% draw a line ticks
+ \draw[
+ color=frametitle.fg,
+ fill=frametitle.fg,
+ ]
+ ([xshift=\gothamProgressCircLogoOuterRadius,yshift={-0.05ex}] localCenter)
+ rectangle ([yshift={0.05ex}] leftick)
+ ;
+ \node[ at=(leftick), anchor=west, inner~sep = 1pt,]
+ {\usebeamercolor[fg]{frametitle}\tiny\inserttotalframenumber}
+ ;
+ % place the current frame number
+ \node[
+ % fill=standin.bg, draw=progress~bar~in~head/foot.bg, thick, circle, minimum~width={\gothamCounterCircleRadius}, text~width={0pt}
+ ]
+ (pagenumframe) at ([xshift=\gothamCounterRadius]localCenter) {}
+ ;
+ \filldraw[
+ draw=progress~bar~in~head/foot.bg,
+ fill=standin.bg,
+ thick,
+ ]
+ (pagenumframe) circle (\gothamCounterCircleRadius)
+ ;
+ % place the frame number in another node to avoid unwanted rescaling.
+ \node[at=(pagenumframe.center), anchor=center] {
+ {\usebeamercolor[fg]{standin}\tiny\insertframenumber}
+ };
+ }
+ %\fi gothamProgCircleMoving
+ \end{tikzpicture}
+ \bool_if:NTF \l_gotham_ProgCircleMoving_bool {
+ % nothing
+ \hspace{\gothamProgressCircLogoOuterRadius+0.75ex}
+ }{
+ % else
+ % extra space to compensate the total number of frame
+ \hspace{\gothamProgressCircLogoOuterRadius+3ex}
+ }
+ % \tikzexternalenable
+}
+% \end{macrocode}
+% \end{function}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{function}{\useoutertheme}
+% \begin{syntax}
+% \cs{useoutertheme}\oarg{option1=value1, ...}\marg{gotham}
+% \textrm{where the options are (default marked as} \defopt{default}\textrm{):}
+% \meta{progressbar~position} = \oarg{\defopt{foot} \textbar none \textbar head \textbar circlehead \textbar ... }
+% \end{syntax}
+% The 'package' (useoutertheme) options can control |progress bar| templates that be placed in the head (over the frametitle), frametitle (under it), below the footer or the circlehead (around the logo in the frametitle).
+% \end{function}
+% \end{documentation}
+%%%%
+% \begin{implementation}
+% \begin{macro}{outer key -- interface}
+% Controls the outer settings for progress bar.
+% \UnitTested
+% \TestFiles{gotham-test-048}
+% \begin{macrocode}
+% token list to remember what is the current state
+\tl_new:N \l__gotham_out_tmp_pbar_tl
+\keys_define:nn { gotham / outer }{
+ % progressbar~position default
+ progressbar~position .choice:,
+ progressbar~position .usage:n = { general },
+ progressbar~position .default:n = { none },
+
+ progressbar~position / none .code:n = {
+ % reset if it has modified by another progressbar~position strategy
+ % \__gotham_set_prop_template:nn{sidebar~canvas~right/default}{#1}
+ \tl_set:Nn \l__gotham_out_tmp_pbar_tl {none}
+
+ % head
+ \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {head} {
+ % True: nothing to do it is already occupied.
+ }{
+ \setbeamertemplate{headline}[default/\prop_item:Nn \l__gotham_template_name_prop {headline/default}]
+ }
+ % frametitle
+ % \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {frametitle} {
+ % % True: nothing to do it is already occupied.
+ % }{
+ \setbeamertemplate{frametitle}[default/\prop_item:Nn \l__gotham_template_name_prop {frametitle/default}]
+ % }
+ % foot
+ \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {foot} {
+ % True: nothing to do it is already occupied.
+ }{
+ \setbeamertemplate{footline}[default/\prop_item:Nn \l__gotham_template_name_prop {footline/default}]
+ }
+ % left
+ \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {left} {
+ % True: nothing to do it is already occupied.
+ }{
+ \setbeamertemplate{sidebar~left}[default/\prop_item:Nn \l__gotham_template_name_prop {sidebar~left/default}]
+ }
+ % right
+ \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {right} {
+ % True: nothing to do it is already occupied.
+ }{
+ \setbeamertemplate{sidebar~right}[default/\prop_item:Nn \l__gotham_template_name_prop {sidebar~right/default}]
+ }
+
+ % logo
+ \__gotham_set_prop_template:nn{includeLogo/default}{gotham~square}
+ % section in head
+ \setbeamertemplate{section~in~head/foot~shaded}[default/\prop_item:Nn \l__gotham_template_name_prop {section~in~head/foot~shaded/default}]
+ \setbeamertemplate{section~in~head/foot}[default/\prop_item:Nn \l__gotham_template_name_prop {section~in~head/foot/default}]
+ },
+ progressbar~position / head .code:n = {
+ \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {head} {
+ % True: nothing to do it is already done.
+ } {
+ % False : remember that choice in order to do not apply it several time and add to beamer template.
+ \tl_set:Nn \l__gotham_out_tmp_pbar_tl {head}
+
+ \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {head} {
+ % True: nothing to do it is already occupied.
+ }{
+ \setbeamertemplate{headline}[default/\prop_item:Nn \l__gotham_template_name_prop {headline/default}]
+ }
+ % \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {frametitle} {
+ % % True: nothing to do it is already occupied.
+ % }{
+ \setbeamertemplate{frametitle}[default/\prop_item:Nn \l__gotham_template_name_prop {frametitle/default}]
+ % }
+ \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {foot} {
+ % True: nothing to do it is already occupied.
+ }{
+ \setbeamertemplate{footline}[default/\prop_item:Nn \l__gotham_template_name_prop {footline/default}]
+ }
+ \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {left} {
+ % True: nothing to do it is already occupied.
+ }{
+ \setbeamertemplate{sidebar~left}[default/\prop_item:Nn \l__gotham_template_name_prop {sidebar~left/default}]
+ }
+ \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {right} {
+ % True: nothing to do it is already occupied.
+ }{
+ \setbeamertemplate{sidebar~right}[default/\prop_item:Nn \l__gotham_template_name_prop {sidebar~right/default}]
+ }
+
+ %
+ \addtobeamertemplate{headline}{}{
+ \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {head} {
+ \usebeamertemplate*{progress~bar~in~head/foot}
+ }{}
+ }
+ }
+ },
+ progressbar~position / frametitle .code:n = {
+ \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {frametitle} {
+ % True: nothing to do it is already done.
+ } {
+ % False : remember that choice in order to do not apply it several time and add to beamer template.
+ \tl_set:Nn \l__gotham_out_tmp_pbar_tl {frametitle}
+
+ \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {head} {
+ % True: nothing to do it is already occupied.
+ }{
+ \setbeamertemplate{headline}[default/\prop_item:Nn \l__gotham_template_name_prop {headline/default}]
+ }
+ % \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {frametitle} {
+ % % True: nothing to do it is already occupied.
+ % }{
+ \setbeamertemplate{frametitle}[default/\prop_item:Nn \l__gotham_template_name_prop {frametitle/default}]
+ % }
+ \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {foot} {
+ % True: nothing to do it is already occupied.
+ }{
+ \setbeamertemplate{footline}[default/\prop_item:Nn \l__gotham_template_name_prop {footline/default}]
+ }
+ \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {left} {
+ % True: nothing to do it is already occupied.
+ }{
+ \setbeamertemplate{sidebar~left}[default/\prop_item:Nn \l__gotham_template_name_prop {sidebar~left/default}]
+ }
+ \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {right} {
+ % True: nothing to do it is already occupied.
+ }{
+ \setbeamertemplate{sidebar~right}[default/\prop_item:Nn \l__gotham_template_name_prop {sidebar~right/default}]
+ }
+
+ %
+ \addtobeamertemplate{frametitle}{}{
+ \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {frametitle} {
+ \usebeamertemplate*{progress~bar~in~head/foot}
+ }{}
+ }
+ }
+ },
+ progressbar~position / foot .code:n = {
+ \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {footline} {
+ % True: nothing to do it is already done.
+ } {
+ % False : remember that choice in order to do not apply it several time and add to beamer template.
+ \tl_set:Nn \l__gotham_out_tmp_pbar_tl {footline}
+
+ \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {head} {
+ % True: nothing to do it is already occupied.
+ }{
+ \setbeamertemplate{headline}[default/\prop_item:Nn \l__gotham_template_name_prop {headline/default}]
+ }
+ % \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {frametitle} {
+ % % True: nothing to do it is already occupied.
+ % }{
+ \setbeamertemplate{frametitle}[default/\prop_item:Nn \l__gotham_template_name_prop {frametitle/default}]
+ % }
+ \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {foot} {
+ % True: nothing to do it is already occupied.
+ }{
+ \setbeamertemplate{footline}[default/\prop_item:Nn \l__gotham_template_name_prop {footline/default}]
+ }
+ \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {left} {
+ % True: nothing to do it is already occupied.
+ }{
+ \setbeamertemplate{sidebar~left}[default/\prop_item:Nn \l__gotham_template_name_prop {sidebar~left/default}]
+ }
+ \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {right} {
+ % True: nothing to do it is already occupied.
+ }{
+ \setbeamertemplate{sidebar~right}[default/\prop_item:Nn \l__gotham_template_name_prop {sidebar~right/default}]
+ }
+
+ %
+ \addtobeamertemplate{footline}{}{
+ \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {footline} {
+ \usebeamertemplate*{progress~bar~in~head/foot}
+ }{}
+ }
+ }
+ },
+ progressbar~position / circlehead .code:n = {
+ \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {circlehead} {
+ % True: nothing to do it is already done.
+ } {
+ % False : remember that choice in order to do not apply it several time and add to beamer template.
+ \tl_set:Nn \l__gotham_out_tmp_pbar_tl {circlehead}
+
+ %
+ %%%\prop_put:Nnn \l__gotham_template_name_SAVE_prop {includeLogo/default} {gotham~square} % not needed after all.
+ \__gotham_set_prop_template:nn{includeLogo/default}{gotham~circle}
+ \__gotham_set_template:nn{section~in~head/foot~shaded}{default/gotham~secSubsec}
+ \__gotham_set_template:nn{section~in~head/foot}{default/gotham~secSubsec}
+ % \__gotham_set_template:nn{headline}{default/gotham~section}
+ % \setbeamertemplate{headline}[default/gotham~section]
+
+ \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {head} {
+ % True: it is already occupied, so let's emulate the gotham section
+ \addtobeamertemplate{headline}{}{
+ \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {circlehead} {
+ \begin{beamercolorbox}[wd=1.0\paperwidth, ht=2.5ex, dp=1.4ex, left]{headfoot}
+ \usebeamerfont{section~in~head/foot}\hspace*{3.5ex}
+ \usebeamertemplate{section~in~head/foot}
+ \end{beamercolorbox}
+ }{}
+ }
+ }{
+ % \setbeamertemplate{headline}[default/\prop_item:Nn \l__gotham_template_name_prop {headline/default}]
+ \__gotham_set_template:nn{headline}{default/gotham~section}
+ }
+ % \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {frametitle} {
+ % % True: nothing to do it is already occupied.
+ % }{
+ \setbeamertemplate{frametitle}[default/\prop_item:Nn \l__gotham_template_name_prop {frametitle/default}]
+ % }
+ \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {foot} {
+ % True: nothing to do it is already occupied.
+ }{
+ \setbeamertemplate{footline}[default/\prop_item:Nn \l__gotham_template_name_prop {footline/default}]
+ }
+ \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {left} {
+ % True: nothing to do it is already occupied.
+ }{
+ \setbeamertemplate{sidebar~left}[default/\prop_item:Nn \l__gotham_template_name_prop {sidebar~left/default}]
+ }
+ \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {right} {
+ % True: nothing to do it is already occupied.
+ }{
+ \setbeamertemplate{sidebar~right}[default/\prop_item:Nn \l__gotham_template_name_prop {sidebar~right/default}]
+ }
+ }
+ },
+ progressbar~position / left .code:n = {
+ \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {left} {
+ % True: nothing to do it is already done.
+ } {
+ % False : remember that choice in order to do not apply it several time and add to beamer template.
+ \tl_set:Nn \l__gotham_out_tmp_pbar_tl {left}
+
+ \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {head} {
+ % True: nothing to do it is already occupied.
+ }{
+ \setbeamertemplate{headline}[default/\prop_item:Nn \l__gotham_template_name_prop {headline/default}]
+ }
+ % \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {frametitle} {
+ % % True: nothing to do it is already occupied.
+ % }{
+ \setbeamertemplate{frametitle}[default/\prop_item:Nn \l__gotham_template_name_prop {frametitle/default}]
+ % }
+ \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {foot} {
+ % True: nothing to do it is already occupied.
+ }{
+ \setbeamertemplate{footline}[default/\prop_item:Nn \l__gotham_template_name_prop {footline/default}]
+ }
+ \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {left} {
+ % True: nothing to do it is already occupied.
+ }{
+ \setbeamertemplate{sidebar~left}[default/\prop_item:Nn \l__gotham_template_name_prop {sidebar~left/default}]
+ }
+ \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {right} {
+ % True: nothing to do it is already occupied.
+ }{
+ \setbeamertemplate{sidebar~right}[default/\prop_item:Nn \l__gotham_template_name_prop {sidebar~right/default}]
+ }
+
+ %
+ \addtobeamertemplate{sidebar~left}{}{
+ \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {left} {
+ \usebeamertemplate*{progress~bar~in~left}
+ }{}
+ }
+ }
+ },
+ progressbar~position / right .code:n = {
+ \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {right} {
+ % True: nothing to do it is already done.
+ } {
+ % False : remember that choice in order to do not apply it several time and add to beamer template.
+ \tl_set:Nn \l__gotham_out_tmp_pbar_tl {right}
+
+ \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {head} {
+ % True: nothing to do it is already occupied.
+ }{
+ \setbeamertemplate{headline}[default/\prop_item:Nn \l__gotham_template_name_prop {headline/default}]
+ }
+ % \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {frametitle} {
+ % % True: nothing to do it is already occupied.
+ % }{
+ \setbeamertemplate{frametitle}[default/\prop_item:Nn \l__gotham_template_name_prop {frametitle/default}]
+ % }
+ \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {foot} {
+ % True: nothing to do it is already occupied.
+ }{
+ \setbeamertemplate{footline}[default/\prop_item:Nn \l__gotham_template_name_prop {footline/default}]
+ }
+ \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {left} {
+ % True: nothing to do it is already occupied.
+ }{
+ \setbeamertemplate{sidebar~left}[default/\prop_item:Nn \l__gotham_template_name_prop {sidebar~left/default}]
+ }
+ \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {right} {
+ % True: nothing to do it is already occupied.
+ }{
+ \setbeamertemplate{sidebar~right}[default/\prop_item:Nn \l__gotham_template_name_prop {sidebar~right/default}]
+ }
+
+ %
+ \addtobeamertemplate{sidebar~right}{}{
+ \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {right} {
+ \usebeamertemplate*{progress~bar~in~right}
+ }{}
+ }
+ }
+ },
+
+ progressbar~position / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'#1'~is~unknown~for~the~(known)~option~'progressbar~position',~so~being~ignored. }{helping~message: progressbar~position / unknown} },
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{function}{\useoutertheme}
+% \begin{syntax}
+% \cs{useoutertheme}\oarg{option1=value1, ...}\marg{gotham}
+% \textrm{where the options are (default marked as} \defopt{default}\textrm{):}
+% \meta{progressbar style} = \oarg{\defopt{rectangle} \textbar rounded box \textbar moving circle \textbar fixed circle }
+% \end{syntax}
+% The 'package' (useoutertheme) options can control |progress bar style| templates that .
+% \end{function}
+% \end{documentation}
+%%%%
+% \begin{implementation}
+% \begin{macro}{outer key -- interface}
+% Controls the outer settings for progress bar style.
+% \UnitTested
+% \TestFiles{gotham-test-049}
+% \begin{macrocode}
+% token list to remember what is the current state
+\keys_define:nn { gotham / outer }{
+ % progressbar~style default
+ progressbar~style .choice:,
+ progressbar~style .usage:n = { general },
+ progressbar~style .default:n = { rectangle },
+
+ progressbar~style / rectangle .code:n = {
+ %
+ % \defbeamertemplate*{progress~bar~in~head/foot}{gotham~rectangle}
+ \__gotham_set_template:nn{progress~bar~in~head/foot}{gotham~rectangle}
+ \__gotham_set_template:nn{progress~bar~in~left}{gotham~rectangle}
+ \__gotham_set_template:nn{progress~bar~in~right}{gotham~rectangle}
+ },
+
+ progressbar~style / rounded~box .code:n = {
+ %
+ \__gotham_set_template:nn{progress~bar~in~head/foot}{gotham~rounded~box}
+ \__gotham_set_template:nn{progress~bar~in~left}{gotham~rounded~box}
+ \__gotham_set_template:nn{progress~bar~in~right}{gotham~rounded~box}
+ },
+
+ progressbar~style / moving~circle .code:n = {
+ %
+ \bool_set_true:N \l_gotham_ProgCircleMoving_bool
+ },
+
+ progressbar~style / fixed~circle .code:n = {
+ %
+ \bool_set_false:N \l_gotham_ProgCircleMoving_bool
+ },
+
+ progressbar~style / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'#1'~is~unknown~for~the~(known)~option~'progressbar~style',~so~being~ignored. }{helping~message: progressbar~style / unknown} },
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{function}{\useoutertheme}
+% \begin{syntax}
+% \cs{useoutertheme}\oarg{option1=value1, ...}\marg{gotham}
+% \textrm{where the options are (default marked as} \defopt{default}\textrm{):}
+% \meta{progressbar~advancement} = \oarg{\defopt{tlbr} \textbar brlt }
+% \end{syntax}
+% The 'package' (useoutertheme) options can control |progress bar| advandement: tlbr) from top left corner to the bottom and right or brlt) from the bottom right to the left and top.
+% \end{function}
+% \end{documentation}
+%%%%
+% \begin{implementation}
+% \begin{macro}{outer key -- interface}
+% Controls the outer settings for progress bar style.
+% \UnitTested
+% \TestFiles{gotham-test-049}
+% \begin{macrocode}
+% token list to remember what is the current state
+\keys_define:nn { gotham / outer }{
+ % progressbar~advancement default
+ progressbar~advancement .choice:,
+ progressbar~advancement .usage:n = { general },
+ progressbar~advancement .default:n = { tlbr },
+
+ progressbar~advancement / tlbr .code:n = {
+ %
+ \bool_set_true:N \l_gotham_progbar_advancement_tlbr_bool
+ },
+ progressbar~advancement / TLBR .code:n = {
+ %
+ \bool_set_true:N \l_gotham_progbar_advancement_tlbr_bool
+ },
+
+ progressbar~advancement / brlt .code:n = {
+ %
+ \bool_set_false:N \l_gotham_progbar_advancement_tlbr_bool
+ },
+ progressbar~advancement / BRLT .code:n = {
+ %
+ \bool_set_false:N \l_gotham_progbar_advancement_tlbr_bool
+ },
+
+ progressbar~advancement / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'#1'~is~unknown~for~the~(known)~option~'progressbar~advancement',~so~being~ignored. }{helping~message: progressbar~advancement / unknown} },
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{documentation}
+% \begin{function}{\useoutertheme}
+% \begin{syntax}
+% \cs{useoutertheme}\oarg{option1=value1, ...}\marg{gotham}
+% \textrm{where the options are (default marked as} \defopt{default}\textrm{):}
+% \meta{progressbar mfn} = \oarg{\defopt{off} \textbar on }
+% \end{syntax}
+% The 'package' (useoutertheme) options can control if the progress bar includes a miniframe navigation.
+% \end{function}
+% \end{documentation}
+%%%%
+% \begin{implementation}
+% \begin{macro}{outer key -- interface}
+% Controls the outer settings for progress bar style.
+% \UnitTested
+% \TestFiles{gotham-test-049}
+% \begin{macrocode}
+% token list to remember what is the current state
+\keys_define:nn { gotham / outer }{
+ % progressbar~mfn default
+ progressbar~mfn .choice:,
+ progressbar~mfn .usage:n = { general },
+ progressbar~mfn .default:n = { off },
+
+ progressbar~mfn / true .code:n = {
+ \bool_set_true:N \l_gotham_pmfn_bool
+
+ \__gotham_set_template:nn{section~in~head/foot~shaded}{default/empty}
+ \__gotham_set_template:nn{section~in~head/foot}{default/empty}
+ \renewcommand{\gothamPatchSectionbox}{
+ % patch to set section box height to 0.
+ \ht\beamer@sectionbox=0.ex
+ \dp\beamer@sectionbox=0.ex
+ }
+ },
+ progressbar~mfn / on .code:n = {
+ \bool_set_true:N \l_gotham_pmfn_bool
+
+ \__gotham_set_template:nn{section~in~head/foot~shaded}{default/empty}
+ \__gotham_set_template:nn{section~in~head/foot}{default/empty}
+ \renewcommand{\gothamPatchSectionbox}{
+ % patch to set section box height to 0.
+ \ht\beamer@sectionbox=0.ex
+ \dp\beamer@sectionbox=0.ex
+ }
+ },
+ progressbar~mfn / enable .code:n = {
+ \bool_set_true:N \l_gotham_pmfn_bool
+
+ \__gotham_set_template:nn{section~in~head/foot~shaded}{default/empty}
+ \__gotham_set_template:nn{section~in~head/foot}{default/empty}
+ \renewcommand{\gothamPatchSectionbox}{
+ % patch to set section box height to 0.
+ \ht\beamer@sectionbox=0.ex
+ \dp\beamer@sectionbox=0.ex
+ }
+ },
+
+ progressbar~mfn / false .code:n = { \bool_set_false:N \l_gotham_pmfn_bool },
+ progressbar~mfn / off .code:n = { \bool_set_false:N \l_gotham_pmfn_bool },
+ progressbar~mfn / disable .code:n = { \bool_set_false:N \l_gotham_pmfn_bool },
+
+ progressbar~mfn / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'#1'~is~unknown~for~the~(known)~option~'progressbar~mfn',~so~being~ignored. }{helping~message: progressbar~mfn / unknown} },
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% \begin{implementation}
+% \begin{macro}{Default outer keys}
+% Apply default key options.
+% \UnitTested
+% \TestFiles{gotham-test-048}
+% \begin{macrocode}
+% when no value is given, default is called.
+\keys_set:nn { gotham / outer } {
+ sidebar~canvas~right~template, sidebar~canvas~left~template,
+ edging~default,
+ frametitle~template, framesubtitle~template, frametitle~continuation~template,
+ numbering,
+ rotateFooter~default,
+ footer~template,
+ mini~frames~shape, mini~frames~bundle,
+ mini~frames~compress,
+ mini~frames~nav~spreading,
+ mini~frames~nav~sectioning,
+ mini~frames~nav~position,
+ progressbar~position, progressbar~style, progressbar~advancement, progressbar~mfn,
+}
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+% \begin{implementation}
+% \begin{macro}{Process outer keys}
+% Process package options.
+% \UnitTested
+% \TestFiles{gotham-test-048}
+% \begin{macrocode}
+\ProcessKeyOptions[ gotham / outer ]
+% \mode<all>
+% \end{macrocode}
+% \end{macro}
+% \end{implementation}
+
+%
+%
+% \begin{implementation}
+% \begin{macrocode}
+%\endinput
+%</outer>
+% \end{macrocode}
+% \end{implementation}
+%
+% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%
+%
+%\begin{implementation}
+% \begin{macrocode}
+%<*package>
+\RequirePackage{expl3}
+\RequirePackage{xparse}
+% \RequirePackage{ifxetex}
+% \RequirePackage{ifluatex}
+% \RequirePackage{etoolbox}
+% \RequirePackage{xcolor}
+% \RequirePackage{tikz}
+% \RequirePackage{calc} % I think I can remove it with a bit of work
+% \RequirePackage{xfp}
+% \end{macrocode}
+% \end{implementation}
+%
+% \begin{implementation}
+% \begin{macrocode}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%% PACKAGE %%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+%
+%
+\providecommand\ifratio[3]{%
+ \ifnum#1=169%
+ \ifdim\beamer@paperwidth=16.00cm\relax%
+ \ifdim\beamer@paperheight=9.00cm\relax%
+ #2%
+ \else%
+ #3%
+ \fi%
+ \else%
+ #3%
+ \fi%
+ \else%
+ \ifnum#1=43%
+ \ifdim\beamer@paperwidth=12.80cm\relax%
+ \ifdim\beamer@paperheight=9.60cm\relax%
+ #2%
+ \else%
+ #3%
+ \fi%
+ \else%
+ #3%
+ \fi%
+ \fi%
+ \fi%
+}
+\providecommand\ifscreenratio[2]{%
+ \ifdim\beamer@paperwidth=16.00cm\relax%
+ \ifdim\beamer@paperheight=9.00cm\relax%
+ #1%
+ \fi%
+ \fi%
+ \ifdim\beamer@paperwidth=12.80cm\relax%
+ \ifdim\beamer@paperheight=9.60cm\relax%
+ #2%
+ \fi%
+ \fi%
+}
+% \end{macrocode}
+% \end{implementation}
+%
+% Most options are passed off to the component sub-packages.
+% \begin{implementation}
+% \begin{macrocode}
+
+%
+\usefonttheme{gotham}
+\usecolortheme{gotham}
+\useinnertheme{gotham}
+\useoutertheme{gotham}
+%
+%
+%
+
+%%%%% Setting keys %%%%%
+
+% set new counter for how many time the lookup is used
+\int_new:N \l_gotham_lookup_cnt
+\int_set:Nn \l_gotham_lookup_cnt {0}
+
+\seq_const_from_clist:Nn \c__gotham_load_submodules_seq { font, color, inner, outer }
+
+\cs_new_protected:Npn \__gotham_lookup_keymodules:nn #1#2
+{
+ \int_incr:N \l_gotham_lookup_cnt
+ % \int_show:n \l_gotham_lookup_cnt
+
+ % if lookup counter is lower than the number of submodules-1 [before it was +1, not completely clear to me], do nothing (let the other submodules do their job), otherwise lookup in the submodules
+ \if_int_compare:w \l_gotham_lookup_cnt < 2
+ %true : do nothing
+ \else:
+ % \int_show:n \l_gotham_lookup_cnt
+ \seq_map_inline:Nn \c__gotham_load_submodules_seq
+ {
+ \keys_if_exist:nnT { gotham / ##1 } {#1}
+ {
+ % missing feature in l3keys, we have no better way to detect an omitted value, so we have to guess that all empty values are in fact omitted values.
+ \tl_if_empty:nTF {#2}
+ { \keys_set:nn { gotham / ##1 } { #1 } }
+ { \keys_set:nn { gotham / ##1 } { #1 = {#2} } }
+ \prg_break:
+ }
+ }
+ \msg_error:nnn { gotham } { unknown-key } {#1}
+ \prg_break_point:
+ \fi:
+}
+\cs_generate_variant:Nn \__gotham_lookup_keymodules:nn { Vn }
+\msg_new:nnn { gotham } { unknown-key } { Unknown~ key~ #1~ encountered. }
+
+% Property list for all groups.
+\prop_new:N \l__gotham_all_all_user_keys_prop
+\prop_const_from_keyval:Nn \c__gotham_all_pkg_keys_prop {}
+
+\keys_define:nn { gotham / all / all }
+{
+ unknown .code:n =
+ {\__gotham_lookup_keymodules:Vn \l_keys_key_str {#1}}
+}
+
+% Set default keys/options from keyval
+% \__gotham_set_default_from_keyval: variant, keyval, group command
+\cs_new_protected:Npn \__gotham_set_default_from_keyval:nnn #1 #2 #3
+{ %%
+ % Check if keyvalues have been given.
+ \tl_if_novalue:nTF {#2}
+ { % no user keys given so _user_keys_prop is taking pkg prop
+ \prop_set_eq:cc { l__gotham_#3_#1_user_keys_prop } { c__gotham_#3_pkg_keys_prop }
+ }{ % user key given and put it in prop
+ \prop_put_from_keyval:cn { l__gotham_#3_#1_user_keys_prop } {#2}
+ }% end if
+ %
+ % xx
+ \__gotham_set_default_auxi:cnn { l__gotham_#3_#1_user_keys_prop } {#1} {#3}
+ %
+ % xx
+ \keys_set:nn { gotham/#3/#1 } { default }
+}
+%
+% prop-key-val, variant, group command
+\cs_new_protected:Npn \__gotham_set_default_auxi:Nnn #1 #2 #3
+{
+ \__gotham_set_default_auxii:fnn { \prop_to_keyval:N #1 } {#2} {#3}
+}
+\cs_generate_variant:Nn \__gotham_set_default_auxi:Nnn { c }
+%
+% key-val, variant, group command
+\cs_new_protected:Npn \__gotham_set_default_auxii:nnn #1 #2 #3
+{
+ \keys_define:nn { gotham/#3/#2 } { default .meta:n = {#1} }
+}
+\cs_generate_variant:Nn \__gotham_set_default_auxii:nnn { f }
+%
+%
+% (re)set keys/options by default for a group of commands.
+% \gothamset m:options:#1
+\DeclareDocumentCommand{\gothamset}{ m }
+{
+ \__gotham_set_default_from_keyval:nnn { all } {#1} { all }
+ \keys_set:nn { gotham/all/all } { default }
+}
+
+\def\gotham@plaintitleformat#1{#1}
+\newcommand{\mreducelistspacing}{\vspace{-\topsep}}
+
+\ProcessOptionsBeamer
+\keys_define:nn { gotham / font }
+{
+ unknown .code:n =
+ {\__gotham_lookup_keymodules:Vn \l_keys_key_str {#1}}
+}
+\keys_define:nn { gotham / color }
+{
+ unknown .code:n =
+ {\__gotham_lookup_keymodules:Vn \l_keys_key_str {#1}}
+}
+\keys_define:nn { gotham / inner }
+{
+ unknown .code:n =
+ {\__gotham_lookup_keymodules:Vn \l_keys_key_str {#1}}
+}
+\keys_define:nn { gotham / outer }
+{
+ unknown .code:n =
+ {\__gotham_lookup_keymodules:Vn \l_keys_key_str {#1}}
+}
+
+\ProcessKeyOptions[ gotham / font ]
+\ProcessKeyOptions[ gotham / color ]
+\ProcessKeyOptions[ gotham / inner ]
+\ProcessKeyOptions[ gotham / outer ]
+
+%
+% \end{macrocode}
+% \end{implementation}
+%
+% \begin{implementation}
+% \begin{macrocode}
+%\endinput
+%</package>
+% \end{macrocode}
+% \end{implementation}
+%
+%
+\endinput
+%
+% \Finale
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham.ins b/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham.ins
new file mode 100644
index 0000000000..6bccc22ba9
--- /dev/null
+++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham.ins
@@ -0,0 +1,75 @@
+%%
+%% Copyright (C) 2008 by Romain NOËL <romainoel@free.fr>
+%%
+%% This file may be distributed and/or modified under the conditions of
+%% the LaTeX Project Public License, either version 1.3c 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.3c or later is part of all distributions of LaTeX
+%% version 2006/05/20 or later.
+%%
+
+\input docstrip.tex
+\keepsilent
+\askforoverwritefalse
+\preamble
+
+Copyright (C) 2023-20** by Romain NOËL <romainoel@free.fr>
+
+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 Romain NOËL.
+Contributors: Romain NOËL (2023-20**)
+
+\endpreamble
+
+\postamble
+
+Adapted from classic "A model .dtx file" by Joseph Wright
+https://www.texdev.net/2009/10/06/a-model-dtx-file/
+\endpostamble
+
+\usedir{tex/latex/gotham}
+\generate{
+ \file{beamerthemegotham.sty}{\from{gotham.dtx}{package}}%
+ \file{beamerfontthemegotham.sty}{\from{gotham.dtx}{font}}%
+ \file{beamercolorthemegotham.sty}{\from{gotham.dtx}{color}}%
+ \file{beamerinnerthemegotham.sty}{\from{gotham.dtx}{inner}}%
+ \file{beamerouterthemegotham.sty}{\from{gotham.dtx}{outer}}%
+ \nopreamble\nopostamble
+ \file{gotham-user-cmds.tex}{\from{gotham.dtx}{userCmd}}%
+ \file{gotham-dev-impl.tex}{\from{gotham.dtx}{devImpl}}%
+}
+
+
+\obeyspaces
+\Msg{*************************************************************}
+\Msg{* *}
+\Msg{* To finish the installation you have to move the following *}
+\Msg{* file into a directory searched by TeX: *}
+\Msg{* *}
+\Msg{* beamercolorthemegotham.sty *}
+\Msg{* beamerfontthemegotham.sty *}
+\Msg{* beamerinnerthemegotham.sty *}
+\Msg{* beamerouterthemegotham.sty *}
+\Msg{* beamerthemegotham.sty *}
+\Msg{* *}
+\Msg{* To produce the documentation run the file gotham.dtx *}
+\Msg{* through LaTeX. *}
+\Msg{* *}
+\Msg{* Happy TeXing! *}
+\Msg{* *}
+\Msg{*************************************************************}
+
+\endbatchfile \ No newline at end of file
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham.pdf b/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham.pdf
new file mode 100644
index 0000000000..83effd4537
--- /dev/null
+++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/gotham.pdf
Binary files differ
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/section-Beamer.tex b/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/section-Beamer.tex
new file mode 100644
index 0000000000..dd7a5e78fa
--- /dev/null
+++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/section-Beamer.tex
@@ -0,0 +1,379 @@
+\documentclass[aspectratio=169]{beamer}
+
+ \usepackage{standalone}
+ \usepackage{tikz}
+ \usepackage{pgfplots}
+
+ \usepackage{tabularray} % Typeset tabulars and arrays (contains equivalent of longtable, booktabs and dcolumn at least)
+ \UseTblrLibrary{booktabs} % to load extra commands from booktabs
+
+ \usepackage{natbib}
+\begin{filecontents*}[overwrite]{pres.bib}
+
+@article{Knuth92,
+ author = "D.E. Knuth",
+ title = "Two notes on notation",
+ journal = "Amer. Math. Monthly",
+ volume = "99",
+ year = "1992",
+ pages = "403--422",
+}
+
+@book{ConcreteMath,
+ author = "R.L. Graham and D.E. Knuth and O. Patashnik",
+ title = "Concrete mathematics",
+ publisher = "Addison-Wesley",
+ address = "Reading, MA",
+ year = "1989"
+}
+
+@unpublished{Simpson,
+ author = "H. Simpson",
+ title = "Proof of the {R}iemann {H}ypothesis",
+ note = "preprint (2003), available at \texttt{http://www.math.drofnats.edu/riemann.ps}",
+ year = "2003"
+}
+
+@incollection{Er01,
+ author = "P. Erd{\H o}s",
+ title = "A selection of problems and results in combinatorics",
+ booktitle = "Recent trends in combinatorics (Matrahaza, 1995)",
+ publisher = "Cambridge Univ. Press",
+ address = "Cambridge",
+ pages = "1--6",
+ year = "1995"
+}
+
+@article{greenwade93,
+ author = "George D. Greenwade",
+ title = "The {C}omprehensive {T}ex {A}rchive {N}etwork ({CTAN})",
+ year = "1993",
+ journal = "TUGBoat",
+ volume = "14",
+ number = "3",
+ pages = "342--351"
+}
+\end{filecontents*}
+
+\begin{document}
+
+\section{Introduction: Beamer}
+
+ % FRAME
+ \begin{frame}[fragile]{Title page}
+ The Title page is printed using the command:
+ \begin{verbatim} \maketitle\end{verbatim}
+
+ The element printed on this page are defined in the preamble by
+ \begin{verbatim}
+ \title[]{Gotham}
+ \subtitle{A Modern, versatile and extendable theme for Beamer}
+ \date[]{\today}
+ \author[]{Romain NOËL}
+ \institute{Center for modern beamer themes}
+ \titlegraphic{\hfill\includegraphics[height=1.5cm, draft]{Title_logo.pdf}}
+ \end{verbatim}
+ \end{frame}
+
+ % FRAME
+ \begin{frame}[fragile]{Plain Slide}
+ The usual page is printed and defined using the command:
+ \begin{verbatim}
+ \begin{frame}{Title on top of the frame}
+ contenu...
+ \end{frame }
+ \end{verbatim}
+
+ Note that the logo printed on this page are defined in the preamble by
+ \begin{verbatim}
+ \logo{\includegraphics[height=1.5cm, draft]{logo.pdf}}
+ \end{verbatim}
+ \end{frame}
+
+ % FRAME
+ \begin{frame}[fragile]{Sections}
+ Sections group slides of the same topic
+
+ \begin{verbatim} \section{Elements}\end{verbatim}
+ \end{frame}
+
+ % FRAME
+ \begin{frame}[fragile]{Typography}
+ \begin{verbatim}
+ The theme provides sensible defaults to
+ \emph{emphasize} text, \alert{accent} parts
+ or show \textbf{bold} results.
+ \end{verbatim}
+
+ \begin{center}becomes\end{center}
+
+ The theme provides sensible defaults to \emph{emphasize} text,
+ \alert{accent} parts or show \textbf{bold} results.
+ \end{frame}
+
+ % FRAME
+ \begin{frame}{Font feature test}
+ \begin{itemize}
+ \item Regular
+ \item \textit{Italic}
+ \item \textsc{Small Caps}
+ \item \textbf{Bold}
+ \item \textbf{\textit{Bold Italic}}
+ \item \textbf{\textsc{Bold Small Caps}}
+ \item \texttt{Monospace}
+ \item \texttt{\textit{Monospace Italic}}
+ \item \texttt{\textbf{Monospace Bold}}
+ \item \texttt{\textbf{\textit{Monospace Bold Italic}}}
+ \end{itemize}
+ \end{frame}
+
+ % FRAME
+ \begin{frame}{Lists}
+ \begin{columns}[T,onlytextwidth]
+ \column{0.33\textwidth}
+ Items
+ \begin{itemize}
+ \item Milk \item Eggs \item Potatoes
+ \begin{itemize}
+ \item Milk \item Eggs \item Potatoes
+ \begin{itemize}
+ \item Milk
+ \end{itemize}
+ \end{itemize}
+ \end{itemize}
+
+ \column{0.33\textwidth}
+ Enumerations
+ \begin{enumerate}
+ \item First, \item Second and \item Last.
+ \end{enumerate}
+
+ \column{0.33\textwidth}
+ Descriptions
+ \begin{description}
+ \item[PowerPoint] Meeh. \item[Beamer] Yeeeha.
+ \end{description}
+ \end{columns}
+
+ \vspace{2em}
+ Then, something below the columns, that be long enough to recover all the line-width.
+ \end{frame}
+
+ % FRAME
+ \begin{frame}{Animation}
+ \begin{itemize}[<+- | alert@+>]
+ \item \alert<4>{This is\only<4>{ really} important}
+ \item Now this
+ \item And now this
+ \end{itemize}
+ \end{frame}
+
+ % FRAME from https://www.edpif.org/documents/latex/intermediate/beamer/latex-int-beamer_handout.pdf
+ \begin{frame}[fragile]{Commands controlling overlay}
+ Beamer defines a bunch of commands intended to control overlays:
+ \verb$\only<...>{text}$ Throws away \verb$text$ content on slides not in \verb$<...>$
+ \verb$\onslide<...>{text}$ Same, but when hidden \verb$text$ still takes space.
+ \verb$\visible<...>{text}$ Same.
+ \verb$\uncover<...>{text}$ Same, but also handle transparency.
+ \verb$\invisible<...>{text}$ Opposite of \verb$\visible$
+ \verb$\alt<...>{text1}{text2}$ Alternates between \verb$text1$ and \verb$text2$ for\verb$ <...>$.
+ \verb$\temporal<...>{before}{inside}{after}$ Alternate between three texts depending on slide index before, inside or after the range of \verb$<...>$.
+ For the commands \verb$\only$ and \verb$\alt$ the \verb$<...>$ can also be after the text.
+ Then \verb$\only$ can be used to make commands \verb$<...>$-aware (§9.3) like in:
+ \verb$\newcommand{\myblue}{\only{\color{blue}}}$
+ \verb$\myblue<2> This text is blue only on slide 2.$
+ Finally, \verb$\only$ and \verb$\onslide$ without text argument work as toogles.
+ Much more options, described in §9.4 to 9.6
+ \end{frame}
+
+ % FRAME from https://www.edpif.org/documents/latex/intermediate/beamer/latex-int-beamer_handout.pdf
+ \begin{frame}[fragile]{Action specifications}
+ Inside \verb$<...>$ it is possible to add some action specifications
+ Action are specified after the slide range \& a | and followed by @ and the target slide or range.
+ For example one can write:
+ \verb$\item<3-|alert@4> Shown from slide 3 on, alerted on slide 4.$
+ which set the \verb$\alert$ for item 3 only in slide 4.
+ Actions can be defined for \verb$\item$, \verb$\action$, \verb$\begin{actionenv}\verb$
+ and the block environments and the possible actions are by default,
+ alert, uncover, only, visible, invisible, but other can be
+ defined by the user. See manual § 9.6.3
+ Simple example using uncover with specified transparency:
+ \begin{verbatim}
+ \setbeamercovered{transparent=30}
+ \begin{itemize}[<+-|uncover@+>]
+ \item first
+ \item second
+ \item third
+ \end{itemize}
+ \end{verbatim}
+ \end{frame}
+
+ % FRAME
+ \begin{frame}{Figures}
+ \begin{figure}
+ \centering
+ \newcounter{density}
+ \setcounter{density}{20}
+ \begin{tikzpicture}
+ \def\couleur{alerted text.fg}
+ \path[coordinate] (0,0) coordinate(A)
+ ++( 90:5cm) coordinate(B)
+ ++(0:5cm) coordinate(C)
+ ++(-90:5cm) coordinate(D);
+ \draw[fill=\couleur!\thedensity] (A) -- (B) -- (C) --(D) -- cycle;
+ \foreach \x in {1,...,40}{%
+ \pgfmathsetcounter{density}{\thedensity+20}
+ \setcounter{density}{\thedensity}
+ \path[coordinate] coordinate(X) at (A){};
+ \path[coordinate] (A) -- (B) coordinate[pos=.10](A)
+ -- (C) coordinate[pos=.10](B)
+ -- (D) coordinate[pos=.10](C)
+ -- (X) coordinate[pos=.10](D);
+ \draw[fill=\couleur!\thedensity] (A)--(B)--(C)-- (D) -- cycle;
+ }
+ \end{tikzpicture}
+ \caption{Rotated square with Tikz package from
+ \href{http://www.texample.net/tikz/examples/rotated-polygons/}{texample.net}.}
+ \end{figure}
+ \end{frame}
+
+ % FRAME
+ \begin{frame}{Tables}
+ \begin{table}
+ \centering
+ \caption{Largest cities in the world (source: Wikipedia)}
+ \begin{tabular}{@{} lr @{}}
+ \toprule
+ City & Population\\
+ \midrule
+ Mexico City & 20,116,842\\
+ Shanghai & 19,210,000\\
+ Peking & 15,796,450\\
+ Istanbul & 14,160,467\\
+ \bottomrule
+ \end{tabular}
+ \end{table}
+ \end{frame}
+
+ % FRAME
+ \begin{frame}{Blocks}
+ Three different block environments are pre-defined.
+
+ \begin{block}{Default}
+ Block content.
+ \end{block}
+
+ \begin{alertblock}{Alert}
+ Block content.
+ \end{alertblock}
+
+ \begin{exampleblock}{Example}
+ Block content.
+ \end{exampleblock}
+ \end{frame}
+
+ % FRAME
+ \begin{frame}{Math}
+ \begin{equation}
+ e = \lim_{n\to \infty} \left(1 + \frac{1}{n}\right)^n
+ \end{equation}
+ \end{frame}
+
+ % FRAME
+ \begin{frame}{Line plots}
+ \begin{figure}
+ \centering
+ \begin{tikzpicture}
+ \begin{axis}[
+ width=0.9\textwidth,
+ height=6cm,
+ ]
+
+ \addplot {sin(deg(x))};
+ \addplot+[samples=100] {sin(deg(2*x))};
+
+ \end{axis}
+ \end{tikzpicture}
+ \caption{A nice sinus plot with Tikz.}
+ \end{figure}
+ \end{frame}
+
+ % FRAME
+ \begin{frame}{Bar charts}
+ \begin{figure}
+ \centering
+ \begin{tikzpicture}
+ \begin{axis}[
+ ybar,
+ xlabel={Foo},
+ ylabel={Bar},
+ width=0.9\textwidth,
+ height=6cm,
+ nodes near coords,
+ nodes near coords align={vertical},
+ ]
+
+ \addplot plot coordinates {(1, 20) (2, 25) (3, 22.4) (4, 12.4)};
+ \addplot plot coordinates {(1, 18) (2, 24) (3, 23.5) (4, 13.2)};
+ \addplot plot coordinates {(1, 10) (2, 19) (3, 25) (4, 15.2)};
+
+ \legend{lorem, ipsum, dolor}
+
+ \end{axis}
+ \end{tikzpicture}
+ \caption{A nice bar chart with Tikz.}
+ \end{figure}
+ \end{frame}
+
+ % FRAME
+ \begin{frame}{Quotes}
+ \begin{quote}
+ Veni, Vidi, Vici
+ \end{quote}
+ from Julius Caesar.
+ \end{frame}
+
+ % FRAME
+ \begin{frame}[fragile]{References}
+ Some references to showcase \verb|[allowframebreaks]| on next slide \cite{Knuth92,ConcreteMath,Simpson,Er01,greenwade93}
+ \end{frame}
+
+ % % FRAME
+ % \begin{frame}{References}
+ % \bibliography{pres}
+ % \bibliographystyle{abbrv}
+ % \end{frame}
+
+ % FRAME
+ \begin{frame}[allowframebreaks]{References}
+ \begin{thebibliography}{1}
+
+ \bibitem{Er01}
+ P.~Erd{\H o}s.
+ \newblock A selection of problems and results in combinatorics.
+ \newblock In {\em Recent trends in combinatorics (Matrahaza, 1995)}, pages 1--6. Cambridge Univ. Press, Cambridge, 1995.
+
+ \bibitem{ConcreteMath}
+ R.~Graham, D.~Knuth, and O.~Patashnik.
+ \newblock {\em Concrete mathematics}.
+ \newblock Addison-Wesley, Reading, MA, 1989.
+
+ \bibitem{greenwade93}
+ G.~D. Greenwade.
+ \newblock The {C}omprehensive {T}ex {A}rchive {N}etwork ({CTAN}).
+ \newblock {\em TUGBoat}, 14(3):342--351, 1993.
+
+ \bibitem{Knuth92}
+ D.~Knuth.
+ \newblock Two notes on notation.
+ \newblock {\em Amer. Math. Monthly}, 99:403--422, 1992.
+
+ \bibitem{Simpson}
+ H.~Simpson.
+ \newblock Proof of the {R}iemann {H}ypothesis.
+ \newblock preprint (2003), available at \texttt{http://www.math.drofnats.edu/riemann.ps}, 2003.
+
+ \end{thebibliography}
+ \end{frame}
+
+\end{document}
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/section-Conclusion.tex b/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/section-Conclusion.tex
new file mode 100644
index 0000000000..ec4c8a37de
--- /dev/null
+++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/section-Conclusion.tex
@@ -0,0 +1,37 @@
+\documentclass[aspectratio=169]{beamer}
+% \usetheme{gotham}
+
+ \usepackage{appendixnumberbeamer}
+ \usepackage[scale=2]{ccicons}
+ \newcommand{\themename}{\textbf{\textsc{Gotham}}}
+
+
+\begin{document}
+
+\section{Conclusion}
+
+ \begin{frame}{Summary}
+ Get the source of this theme and the demo presentation from
+
+ \begin{center}\url{https://gitlab.com/RomainNOEL/beamertheme-gotham}\end{center}
+
+ The theme \emph{itself} is licensed under a \href{http://creativecommons.org/licenses/by-sa/4.0/}{Creative Commons Attribution-ShareAlike 4.0 International License}.
+ \begin{center} \ccbysa \end{center}
+ \end{frame}
+
+ \begin{standoutenv}
+ \begin{frame}[fragile]
+ The final slide using the standout style with command:
+ \begin{verbatim}
+ \begin{frame}[standout]{Thank You !}
+ Questions ?
+ \end{frame }
+ \end{verbatim}
+
+ \begin{center}
+ Et voilà !
+ \end{center}
+ \end{frame}
+ \end{standoutenv}
+
+\end{document}
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/section-Gotham.tex b/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/section-Gotham.tex
new file mode 100644
index 0000000000..eb9b4bef0d
--- /dev/null
+++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-gotham/section-Gotham.tex
@@ -0,0 +1,398 @@
+\documentclass[aspectratio=169]{beamer}
+\usetheme{gotham}
+
+ \usepackage{standalone}
+ \usepackage{tikz}
+ \usepackage{pgfplots}
+ \usepackage{tabularray} % Typeset tabulars and arrays (contains equivalent of longtable, booktabs and dcolumn at least)
+ \UseTblrLibrary{booktabs} % to load extra commands from booktabs
+ \usepackage{changepage}
+
+ \newcommand{\themename}{\textbf{\textsc{Gotham}}}
+
+
+\begin{document}
+
+\section{Gotham Theme}
+
+ % FRAME
+ \begin{frame}[fragile]{Gotham}
+
+ The \themename{} theme is a Beamer theme with a minimal-ish visual style largely inspired by the \href{https://github.com/matze/mtheme}{\textsc{Metropolis} Beamer Theme} by Matthias Vogelgesang (and some other Beamer themes).
+
+ Yet, \themename{} is highly extendable and versatile.
+ \bigskip
+
+ First, enable the theme by classically loading it:
+
+ \begin{verbatim}
+ \documentclass{beamer}
+ \usetheme{gotham}
+ \end{verbatim}
+
+ Then, the all customization can be performed at any moment in the presentation using:
+
+ \begin{verbatim}
+ \gothamset{<option>=...}
+ \end{verbatim}
+ \end{frame}
+
+
+\subsection{Fonts}
+
+ % FRAME
+ \begin{frame}[fragile]{Gotham title formats}
+ Note, that you have to have Mozilla's \emph{Fira Sans} font and XeTeX or LuaTeX installed to enjoy this wonderful typography.
+
+ \begin{columns}[T,onlytextwidth]
+ \column{0.49\textwidth}
+ \themename{} supports 4 different title formats \verb|\gothamset{format frametitle=}|
+ \begin{itemize}
+ \item regular
+ \item \MakeLowercase{Lower}
+ \item \MakeUppercase{Upper}
+ \item \MakeTitlecase{Title Case}
+ \end{itemize}
+ \column{0.49\textwidth}
+ \themename{} supports 3 different title shape \verb|\gothamset{shape frametitle=...}|:
+ \begin{itemize}
+ \item regular
+ \item \textsc{Small caps}
+ \item \textit{italic}
+ \end{itemize}
+ \end{columns}
+
+ \vspace{2em}
+ They can either be set at once for every title type or individually.
+ \end{frame}
+
+ {
+ \gothamset{shape frametitle=smallcaps, format frametitle=titlecase}
+ % FRAME
+ \begin{frame}{Titles: Small caps and titlecase}
+ This frame uses the title format options: \texttt{shape frametitle=smallcaps, format frametitle=titlecase}.
+
+ \begin{alertblock}{Potential Problems}
+ Be aware that not every font supports small caps.
+ If for example you typeset your presentation with pdfTeX and the Computer Modern Sans Serif font, every text in small caps will be typeset with the Computer Modern Serif font instead.
+ Please refer to the documentation if you consider using it.
+
+ As a rule of thumb: just use it for plaintext-only titles.
+ \end{alertblock}
+ \end{frame}
+ }
+
+ {
+ \gothamset{format frametitle=upper, shape frametitle=italic}
+ % FRAME
+ \begin{frame}{Titles: Upper and italic}
+ This frame uses the title format options: \texttt{format frametitle=upper, shape frametitle=smallcaps}.
+
+ \begin{alertblock}{Potential problems}
+ As this title format also uses small caps you face the same problems as with the \texttt{smallcaps} title format.
+ Additionally this format can cause some other problems.
+ Please refer to the documentation if you consider using it.
+
+
+ \end{alertblock}
+ \end{frame}
+ }
+
+ {
+ \gothamset{format frametitle=lower}
+ % FRAME
+ \begin{frame}{Titles: LOWER and regular}
+ This frame uses the title format options: \texttt{format frametitle=lower, shape frametitle=regular}.
+ \end{frame}
+ }
+
+
+\subsection{Colors}
+
+ {
+ \gothamset{background=dark}
+ % FRAME
+ \begin{frame}[fragile]{Presentation style via background color}
+ The color mode (a.k.a. background color) can be changed using:
+ \begin{verbatim} \gothamset{background=dark | light | transparent} \end{verbatim}
+ \end{frame}
+ }
+
+ % FRAME
+ \begin{frame}[fragile]{Blocks}
+ Three different block environments are pre-defined and may be styled with an optional background color.
+
+ \begin{columns}[T,onlytextwidth]
+ \column{0.3\textwidth}
+ \begin{verbatim}\gothamset{
+ block=native}\end{verbatim}
+
+ \begin{block}{Default}
+ Block content.
+ \end{block}
+
+ \begin{alertblock}{Alert}
+ Block content.
+ \end{alertblock}
+
+ \begin{exampleblock}{Example}
+ Block content.
+ \end{exampleblock}
+
+ \column{0.3\textwidth}
+
+ \gothamset{block=transparent}
+ \begin{verbatim}\gothamset{
+ block=transparent}\end{verbatim}
+
+ \begin{block}{Default}
+ Block content.
+ \end{block}
+
+ \begin{alertblock}{Alert}
+ Block content.
+ \end{alertblock}
+
+ \begin{exampleblock}{Example}
+ Block content.
+ \end{exampleblock}
+
+ \column{0.3\textwidth}
+
+ \gothamset{block=fill}
+ \begin{verbatim}\gothamset{
+ block=fill}\end{verbatim}
+
+ \begin{block}{Default}
+ Block content.
+ \end{block}
+
+ \begin{alertblock}{Alert}
+ Block content.
+ \end{alertblock}
+
+ \begin{exampleblock}{Example}
+ Block content.
+ \end{exampleblock}
+
+ \end{columns}
+ \end{frame}
+
+ % FRAME
+ \begin{frame}[fragile]{Color customization}
+ The colors can be changed using:
+ \begin{verbatim}
+ \colorlet{colorPale}{gPaleYell} % BG in light/normal mode
+ \colorlet{colorDark}{gDarkBlack} % FG in light/normal mode
+ \colorlet{colorA}{gDarkTeal} % frametitle, standin.out,
+ \colorlet{colorAreversed}{gLightTeal} % frametitle, standin.in,
+ \colorlet{colorB}{gMidGrey} % gray BG : progress bar, blocks
+ \colorlet{colorC}{gDeepYellOr} % progress bar
+ \colorlet{colorD}{gLightOrange} % alert
+ \colorlet{colorE}{gLightGreen} % example
+ \end{verbatim}
+ \end{frame}
+
+
+\subsection{Inner}
+
+ % FRAME
+ \begin{frame}[fragile]{Title page}
+ \themename{} offers the possibility to adapt the title page layout (printed with \verb|\maketitle| or \verb|\titlepage|).
+ This can be achieved using:
+
+ \begin{verbatim} \defbeamertemplate{title page}{your name}{your defintion}
+ \gothamset{title page= your name}\end{verbatim}
+
+ \themename{} also predefined several templates such as:
+ \verb$gotham normal | gotham splitvert | gotham dividedpic$ \verb$| gotham reversed$
+ \end{frame}
+
+ % FRAME
+ \begin{frame}[fragile]{Table of contents}
+ \themename{} come with the possibility to apply different style for your table of contents (ToC) page.
+ You can define your own ToC style as it follows:
+ \begin{verbatim}
+ \defbeamertemplate{toc page}{your name}{your def}
+ \gothamset{tocframe template= your name}
+ \end{verbatim}
+ Then, referring to this template using the frame option \verb|[toc]| in your presentation:
+ \begin{verbatim}
+ \begin{frame}[toc]{Table of contents}
+ \tableofcontents%[hideallsubsections]
+ \end{frame }\end{verbatim}
+
+ Or using one of the \themename{} predefined template, such as: \verb$gotham simple | gotham bullet$
+ \end{frame}
+
+ % FRAME
+ \begin{frame}[fragile]{Sections}
+ \themename{} provides a multiple options to tune sections (respectively \verb|part|, \verb|section|, \verb|subsection| and \verb|subsubsection|).
+ Thus, using the setting controls:
+
+ The section command \verb|\section{Elements}| from Beamer will appear very differently.
+ The section page will appear or disappear thanks to: \verb$\gothamset{sectionframe default=<on|off>}$, while its layout (when appearing) is controlled by:
+ \begin{verbatim}
+ \defbeamertemplate{part|sub|subsub|section frame}
+ {your name}{your def}
+ \gothamset{sectionframe template= your name}\end{verbatim}
+
+ \themename{} predefined template are: \verb$gotham progressbar | gotham simple |$ \verb$gotham splitvert progressbar |$ \verb$gotham splitvert simple | gotham progressvert$
+ \end{frame}
+
+ % FRAME
+ \begin{frame}[fragile]{Sections contents}
+ After the section page, you can (de)activate a page with table of contents in the section using \verb$\gothamset{sectiontocframe default=<on|off>}$, and its layout is controlled by:
+ \begin{verbatim}
+ \defbeamertemplate{toc subsection frame}{your name}{your def}
+ \gothamset{sectionframe template= your name}
+ \end{verbatim}
+
+ \themename{} predefined template are: \verb$gotham simple | gotham bullet$
+ \end{frame}
+
+ % FRAME
+ \begin{frame}[fragile, watermark]{Watermark}
+
+ With \themename{} you can locally or globally add watermark to your slides by using:
+ \begin{verbatim} \defbeamertemplate{background}{watermark/your name}{your def}
+ \gothamset{watermark template= your name}\end{verbatim}
+
+ Then, this watermark can be turn on locally using \verb|\begin{frame}[watermark]| or globally with \verb|\gothamset{watermark default= on}| .
+ \end{frame}
+
+ % FRAME
+ \begin{standinenv}
+ \begin{frame}[fragile]{Standin}
+
+ \themename{} comes with 2 environments/specials layouts named \verb|standin| and \verb|standout|.
+ These specials layouts can be used to emphasize some content or last slide\textellipsis
+
+ This layout can be turn on using \verb|\begin{frame}[standin]| or using the dedicated environment (\verb|\begin{standinenv}\begin{frame}...\end{frame}\end{standinenv}|).
+
+ Note that the background can also be tuned using:
+ \begin{verbatim} \defbeamertemplate{background canvas}{standin/name}{your def}
+ \gothamset{standin template= name}\end{verbatim}
+
+ \end{frame}
+ \end{standinenv}
+
+ % FRAME
+ \begin{frame}[fragile, standout, watermark]{Standout}
+ Here is an example of standout (working as standin), that can be combined with a watermark.
+
+ Another difference, apart the obvious color change is the font size and series.
+ \end{frame}
+
+
+\subsection{Outer}
+
+ {%
+ \setbeamertemplate{frame footer}{My custom footer}
+ % FRAME
+ \begin{frame}[fragile]{Frame footer}
+ \themename{} defines a custom Beamer template to add a text to the footer.
+ It can be set via
+ \begin{verbatim}\setbeamertemplate{frame footer}{My custom footer}\end{verbatim}
+
+ Even after redefining (or not) your frame footer template, you can locally remove it with the frame option \verb|\begin{frame}[nofooter]|.
+ \end{frame}
+ }
+
+ \title[your shorttitle]{Gotham}
+ \date[shortdate]{\today}
+ \author[your shortauthor name]{Romain NOËL}
+ % FRAME
+ \begin{frame}[fragile, rotateFooter]{rotateFooter}
+ The default footer from \themename{}, it displays the \verb|shortdate|, \verb|shorttitle| and \verb|shortauthor|.
+ So by filling these fields in your document setup, you will see them appear in your footer:
+ \begin{verbatim} \title[your shorttitle]{Your title}
+ \date[shortdate]{\today}
+ \author[your shortauthor name]{John DOE} \end{verbatim}
+
+ Since, we always need some extra space on some frames that would like to overlay a bit the footer, \themename{}'s footer offers also possibility to be put on side locally using \verb|\begin{frame}[rotateFooter]|, or globally with
+ \begin{verbatim} \gothamset{rotateFooter default=on} \end{verbatim}
+ If it has set globally, it can be deactivated locally with the frame option \verb|\begin{frame}[norotateFooter]|.
+ \end{frame}
+
+ \title[]{Gotham}
+ \date[]{\today}
+ \renewcommand{\gothamRightFiligrane}{%
+ \rotatebox{90}{gotham right filigrane pattern}
+ }
+ % FRAME
+ \begin{frame}[edging, fragile]{Edging}
+ \themename{} has two hook commands, \verb|\gothamRightFiligrane| and \verb|\gothamLeftFiligrane|, that can be redefined to customize what to display in the edgings (a.k.a. filigrane, a.k.a. sidebar).
+ As example, one could do:
+ \begin{verbatim}
+ \renewcommand{\gothamRightFiligrane}{%
+ \rotatebox{90}{gotham right filigrane pattern}
+ }\end{verbatim}
+
+ Then, to set if it should be displayed or not, globally \begin{verbatim} \gothamset{edging default=on} \end{verbatim}
+ or locally with the frame option \verb|\begin{frame}[edging]| or \verb|\begin{frame}[noedging]|.
+ \end{frame}
+
+ % FRAME
+ % \begin{nofootlineenv}
+ \begin{frame}[fragile,noedging,nofooter]{Really wide contents}
+ \begin{adjustwidth}{-2em}{-2em}
+ If you want a really wide content in your frame, you can change the size of your margin (requires \verb|\usepackage{changepage}| in your preamble).
+ You can also suppress the edging (\verb|[noedging]|) and footer (\verb|[nofooter]|) or even more radically footline (\verb|[nofootline]|).
+
+ Here is an example combining them:
+ \begin{verbatim}
+ \begin{frame}[noedging,nofootline]{extended frame}
+ \begin{adjustwidth}{-2em}{-2em}% 2em extra to the left and 2em for right margin.
+ wide content
+ \end{adjustwidth}
+ \end{frame }
+ \end{verbatim}
+ \end{adjustwidth}
+ \end{frame}
+ % \end{nofootlineenv}
+
+ {%
+ \renewcommand{\gothamInstituteLogoSquare}[1][4ex]{%
+ \includegraphics[height=#1]{gotham-logo.pdf}
+ }
+ \logo{extra LOGO}
+ % FRAME
+ \begin{frame}[fragile]{Frametitle}
+ \framesubtitle{with a subtitle}
+ The frametile template brought by \themename{} is relatively classic: it supports \verb|\subframetitle| and frame continuation (with \verb|[allowframebreaks]|) through templates that can be tuned.
+ Nevertheless, it the frametitle template also includes a hook for your institute logo in the top right corner, leaving the command \verb|\logo{}| free for your extra logos.
+
+ So, one can have both logos using:
+ \begin{verbatim}
+ \renewcommand{\gothamInstituteLogoSquare}[1][4ex]{
+ \includegraphics[height=#1]{gotham-logo.pdf}
+ }
+ \logo{extra LOGO}
+ \end{verbatim}
+ \end{frame}
+ }
+
+ \author[]{Romain NOËL}
+ {%
+ \gothamset{progressbar position=foot, numbering= totalframenumber}
+ % FRAME
+ \begin{frame}[fragile]{Numbering and progressbar}
+
+ \themename{} theme can numbering your frames in the bottom right corner using different styles.
+ You can also decide to use a progression bar to indicate how much of your presentation remains.
+
+ The setup of numbering and progression bar can be performed through:
+ \begin{verbatim}
+ \gothamset{numbering= totalframenumber, progressbar position=foot}
+ \end{verbatim}
+
+ Numbering available options are: \verb$none | framenumber | totalframenumber | appendixframenumber | pagenumber | totalpagenumber | circle$
+
+ Progressbar position available options are: \verb$none | head | frametitle | foot | circlehead$
+ \end{frame}
+ }
+
+
+\end{document}
+%EoF \ No newline at end of file
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-tcolorbox/README.md b/macros/latex/contrib/beamer-contrib/themes/beamertheme-tcolorbox/README.md
index b8501189d6..0215359b46 100644
--- a/macros/latex/contrib/beamer-contrib/themes/beamertheme-tcolorbox/README.md
+++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-tcolorbox/README.md
@@ -1,12 +1,12 @@
# beamertheme-tcolorbox
-[![GitHub](https://img.shields.io/github/license/samcarter/beamertheme-tcolorbox.svg?color=blue)](http://www.latex-project.org/lppl.txt)
-[![GitHub tag (latest SemVer)](https://img.shields.io/github/tag/samcarter/beamertheme-tcolorbox.svg?label=current%20version)](https://github.com/samcarter/beamertheme-tcolorbox/releases/latest)
-[![CTAN](https://img.shields.io/ctan/v/beamertheme-tcolorbox.svg)](https://ctan.org/pkg/beamertheme-tcolorbox)
+[![License](https://img.shields.io/github/license/samcarter/beamertheme-tcolorbox.svg?color=blue)](https://www.latex-project.org/lppl.txt)
+[![GitHub tag](https://img.shields.io/github/tag/samcarter/beamertheme-tcolorbox.svg?label=current%20version&color=blue)](https://github.com/samcarter/beamertheme-tcolorbox/releases/latest)
+[![CTAN](https://img.shields.io/ctan/v/beamertheme-tcolorbox.svg?color=blue)](https://ctan.org/pkg/beamertheme-tcolorbox)
A beamer inner theme which reproduces standard beamer blocks using tcolorboxes.
-This project is licensed under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt .
+This project is licensed under the LaTeX Project Public License v1.3c or later, see https://www.latex-project.org/lppl.txt .
The project repository, including a bug tracker, can be found at https://github.com/samcarter/beamertheme-tcolorbox .
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-tcolorbox/beamerinnerthemetcolorbox.sty b/macros/latex/contrib/beamer-contrib/themes/beamertheme-tcolorbox/beamerinnerthemetcolorbox.sty
index 9469f0591e..1a2af1a6d8 100644
--- a/macros/latex/contrib/beamer-contrib/themes/beamertheme-tcolorbox/beamerinnerthemetcolorbox.sty
+++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-tcolorbox/beamerinnerthemetcolorbox.sty
@@ -1,4 +1,4 @@
-% !TeX root = test.tex
+% !TeX root = ./testing/test.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% The tcolorbox inner theme
@@ -9,10 +9,10 @@
% https://github.com/samcarter/beamertheme-tcolorbox
%
% Released under the LaTeX Project Public License v1.3c or later
-% See http://www.latex-project.org/lppl.txt
+% See https://www.latex-project.org/lppl.txt
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesPackage{beamerinnerthemetcolorbox}[2024/04/29 version v0.7 Beamer blocks with tcolorboxes]
+\ProvidesPackage{beamerinnerthemetcolorbox}[2024/09/23 version v0.8 Beamer blocks with tcolorboxes]
\RequirePackage{tcolorbox}
\tcbuselibrary{skins,hooks}
@@ -197,11 +197,11 @@
\ifbeamer@tcb@blocks
\setbeamertemplate{block begin}{\begin{beamer@tcb@block}}
- \setbeamertemplate{block end}{\end{beamer@tcb@block}}
+ \setbeamertemplate{block end}{\onslide<1->\end{beamer@tcb@block}}
\setbeamertemplate{block alerted begin}{\begin{beamer@tcb@block}[ alerted]}
- \setbeamertemplate{block alerted end}{\end{beamer@tcb@block}}
+ \setbeamertemplate{block alerted end}{\onslide<1->\end{beamer@tcb@block}}
\setbeamertemplate{block example begin}{\begin{beamer@tcb@block}[ example]}
- \setbeamertemplate{block example end}{\end{beamer@tcb@block}}
+ \setbeamertemplate{block example end}{\onslide<1->\end{beamer@tcb@block}}
\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-tcolorbox/beamertheme-tcolorbox-doc-settings.sty b/macros/latex/contrib/beamer-contrib/themes/beamertheme-tcolorbox/beamertheme-tcolorbox-doc-settings.sty
index 777cedba6e..cd57229fcf 100644
--- a/macros/latex/contrib/beamer-contrib/themes/beamertheme-tcolorbox/beamertheme-tcolorbox-doc-settings.sty
+++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-tcolorbox/beamertheme-tcolorbox-doc-settings.sty
@@ -21,7 +21,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{xcolor}
\definecolor{samyellow}{RGB}{246,193,65}
-\definecolor{samorange}{RGB}{241,147,45}
+\definecolor{samorange}{RGB}{241,147,45}% pgfplotsthemebeamer
\definecolor{samred}{RGB}{191,26,46}% TikZbricks
\definecolor{sammagenta}{RGB}{170,42,104}% TikZmarmots
\definecolor{samviolet}{RGB}{136,46,114}% TikZlings
@@ -69,6 +69,7 @@
% \RequirePackage[scale=0.85]{cascadia-code}
% \AddToHook{cmd/ttfamily/before}{\fontseries{sl}}
\RequirePackage{iexec}
+\usepackage{synthslant}% to fake slented comments in inconsolata
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
@@ -81,7 +82,7 @@
% smuggling custom pygmentize style in cache folder
% (a real pygmentise style would need installtion in some python folder)
-\begin{filecontents*}[noheader]{./sam.pygstyle}
+\begin{filecontents*}[noheader,overwrite]{./sam.pygstyle}
\makeatletter
\def\PYG@reset{\let\PYG@it=\relax \let\PYG@bf=\relax%
\let\PYG@ul=\relax \let\PYG@tc=\relax%
@@ -102,7 +103,7 @@
\expandafter\def\csname PYG@tok@nb\endcsname{\def\PYG@tc##1{\textcolor{listingcolor}{\bfseries ##1}}}
% comments (italics won't work with the inconsolata font)
-\expandafter\def\csname PYG@tok@c\endcsname{\def\PYG@tc##1{\textcolor{gray}{##1}}}
+\expandafter\def\csname PYG@tok@c\endcsname{\def\PYG@tc##1{\textcolor{gray}{\textsynthslant{##1}}}}
\def\PYGZbs{\char`\\}
\def\PYGZus{\char`\_}
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-tcolorbox/beamertheme-tcolorbox-doc.pdf b/macros/latex/contrib/beamer-contrib/themes/beamertheme-tcolorbox/beamertheme-tcolorbox-doc.pdf
index fe64e72639..a7c6c23efb 100644
--- a/macros/latex/contrib/beamer-contrib/themes/beamertheme-tcolorbox/beamertheme-tcolorbox-doc.pdf
+++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-tcolorbox/beamertheme-tcolorbox-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-tcolorbox/beamertheme-tcolorbox-doc.tex b/macros/latex/contrib/beamer-contrib/themes/beamertheme-tcolorbox/beamertheme-tcolorbox-doc.tex
index c17e7fc17e..18c2daacc0 100644
--- a/macros/latex/contrib/beamer-contrib/themes/beamertheme-tcolorbox/beamertheme-tcolorbox-doc.tex
+++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-tcolorbox/beamertheme-tcolorbox-doc.tex
@@ -8,7 +8,7 @@
% https://github.com/samcarter/beamertheme-tcolorbox
%
% Released under the LaTeX Project Public License v1.3c or later
-% See http://www.latex-project.org/lppl.txt
+% See https://www.latex-project.org/lppl.txt
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% !TeX program = txs:///arara
@@ -31,7 +31,7 @@
\url{https://github.com/samcarter/beamertheme-tcolorbox}\\
\url{https://www.ctan.org/pkg/beamertheme-tcolorbox}
}{samcarter}}
-\date{Version v0.7 \textendash{} 2024/04/29}
+\date{Version v0.8 \textendash{} 2024/09/23}
\usepackage[
themecolor=samteal
@@ -53,10 +53,10 @@ Over the last decade of answering beamer problems and more recently also being o
For all these cases, there is now an alternative to the default beamer blocks: The tcolorbox inner beamer theme will replace the usual beamer mechanism to draw blocks with tcolorboxes. The tcolorboxes will automatically adopt the look and feel (round vs.\ sharp corners and shadows) as well as the colours of the normal beamer blocks.
-The package is included in \TeX{}Live and MiK\TeX\ and available from \textsc{CTAN} (\url{https://www.ctan.org/pkg/beamertheme-tcolorbox}).
+The package is included in \texlive and \miktex and available from \CTAN (\url{https://www.ctan.org/pkg/beamertheme-tcolorbox}).
The development version of this package is located at \url{https://github.com/samcarter/beamertheme-tcolorbox}. If you have any problems, ideas or other feedback, please make constructive use of the issue tracker.
-Copyright \raisebox{0.2em}{\tiny\fontfamily{cmr}\selectfont\textcopyright} \texttt{samcarter}. Permission is granted to copy, distribute and\slash or modify this software under the terms of the LaTeX project public licence, version 1.3c or later \url{http://www.latex-project.org/lppl.txt}.
+Copyright \raisebox{0.2em}{\tiny\fontfamily{cmr}\selectfont\textcopyright} \texttt{samcarter}. Permission is granted to copy, distribute and\slash or modify this software under the terms of the LaTeX project public licence, version 1.3c or later \url{https://www.latex-project.org/lppl.txt}.
\section{Usage}
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-oxref/Makefile b/macros/latex/contrib/biblatex-contrib/biblatex-oxref/Makefile
index c51927feb8..c3e48e3484 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-oxref/Makefile
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-oxref/Makefile
@@ -3,8 +3,8 @@ PFX = biblatex-
STY1 = oxnotes
STYS = oxnotes oxyear oxnum oxalph
VARS = ibid note inote trad1 trad2 trad3
-LANGS = american british english spanish
-LANGX = spanish
+LANGS = american british english spanish polish
+LANGX = spanish polish
TESTS = $(STYS) $(foreach sty, $(STYS), $(LANGX:%=%-$(sty)))
AUX = aux,bbl,bcf,blg,doc,fdb_latexmk,fls,glo,gls,hd,idx,ilg,ind,listing,log,nav,out,run.xml,snm,synctex.gz,toc,vrb
SHELL = bash
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-oxref/README.md b/macros/latex/contrib/biblatex-contrib/biblatex-oxref/README.md
index c8b147bc81..a6d358af66 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-oxref/README.md
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-oxref/README.md
@@ -46,7 +46,7 @@ UNIX-like systems:
oxnotes-trad1.cbx, oxnotes-trad2.cbx, oxnotes-trad3.cbx, oxyear.cbx,
oxnum.cbx, oxalph.cbx
- american-oxref.lbx, british-oxref.lbx, english-oxref.lbx,
- spanish-oxref.lbx
+ spanish-oxref.lbx, polish.lbx
- oxnotes.dbx, oxnotes-ibid.dbx, oxnotes-note.dbx, oxnotes-inote.dbx,
oxnotes-trad1.dbx, oxnotes-trad2.dbx, oxnotes-trad3.dbx, oxyear.dbx,
oxnum.dbx, oxalph.dbx
@@ -89,7 +89,8 @@ first two steps.
american-oxref.lbx,
british-oxref.lbx,
english-oxref.lbx,
- spanish-oxref.lbx
+ spanish-oxref.lbx,
+ polish-oxref.lbx,
oxalph.bbx,
oxalph.cbx,
oxalph.dbx,
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-oxref/oxalph-doc.pdf b/macros/latex/contrib/biblatex-contrib/biblatex-oxref/oxalph-doc.pdf
index 0ce372ce9b..464db54ffe 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-oxref/oxalph-doc.pdf
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-oxref/oxalph-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-oxref/oxnotes-doc.pdf b/macros/latex/contrib/biblatex-contrib/biblatex-oxref/oxnotes-doc.pdf
index 649083bbef..4ce50328b3 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-oxref/oxnotes-doc.pdf
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-oxref/oxnotes-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-oxref/oxnum-doc.pdf b/macros/latex/contrib/biblatex-contrib/biblatex-oxref/oxnum-doc.pdf
index 7c8b8360de..cde0ea096b 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-oxref/oxnum-doc.pdf
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-oxref/oxnum-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-oxref/oxref.dtx b/macros/latex/contrib/biblatex-contrib/biblatex-oxref/oxref.dtx
index 8c8c94d432..18bf56b898 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-oxref/oxref.dtx
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-oxref/oxref.dtx
@@ -1,6 +1,6 @@
% \iffalse
%<*internal|bbx|cbx|dbx|lbx|doc>
-\def\Version{2023/11/23 v3.2}
+\def\Version{2024/08/26 v3.3}
%</internal|bbx|cbx|dbx|lbx|doc>
%<*internal>
\iffalse
@@ -87,6 +87,10 @@
\ProvidesFile{spanish-oxref.lbx}
[\Version\space Spanish conventions required by the biblatex-oxref styles]
%</lbx&es>
+%<*lbx&pl>
+\ProvidesFile{polish-oxref.lbx}
+ [\Version\space Polish conventions required by the biblatex-oxref styles]
+%</lbx&pl>
%<*doc&n>
\ProvidesFile{oxnotes-doc.tex}
[\Version\space Footnote-based biblatex style inspired by the Oxford Guide to Style]
@@ -220,6 +224,7 @@ Copyright (C) 2016–2023 Alex Ball
\file{british-\jobname.lbx}{\from{\jobname.dtx}{lbx,gb}}
\file{english-\jobname.lbx}{\from{\jobname.dtx}{lbx,en}}
\file{spanish-\jobname.lbx}{\from{\jobname.dtx}{lbx,es}}
+ \file{polish-\jobname.lbx}{\from{\jobname.dtx}{lbx,pl}}
\file{oxnotes-doc.tex}{\from{\jobname.dtx}{doc,n}}
\file{oxnum-doc.tex}{\from{\jobname.dtx}{doc,m}}
\file{oxalph-doc.tex}{\from{\jobname.dtx}{doc,a}}
@@ -659,18 +664,24 @@ Copyright (C) 2016–2023 Alex Ball
\newcounter{elementcount}
\newcommand{\commaorandlist}[1]{%
+ % Counting up
\renewcommand*{\do}[1]{\stepcounter{elementcount}}%
\dolistloop{#1}%
\ifnumgreater{\value{elementcount}}{2}{%
- \def\finaland{, and }%
+ \def\thisfinaland{,\space and\space}%
}{%
- \def\finaland{ and }%
+ \def\thisfinaland{\space and\space}%
}%
+ % Counting back down
\renewcommand*{\do}[1]{%
- \ifnumequal{\value{elementcount}}{1}{%
- ##1%
+ \ifnumgreater{\value{elementcount}}{2}{% antipenultimate or earlier
+ ##1,\space
}{%
- \ifnumequal{\value{elementcount}}{2}{#1\finaland}{##1, }%
+ \ifnumequal{\value{elementcount}}{2}{% penultimate
+ ##1\thisfinaland
+ }{% last
+ ##1%
+ }%
}%
\addtocounter{elementcount}{-1}%
}%
@@ -678,6 +689,7 @@ Copyright (C) 2016–2023 Alex Ball
\author{Alex Ball}
\listadd\thetranslators{Bruno Maltras}
+\listadd\thetranslators{Sebastian Wasiuta}
\date{\printdateTeX{\filedate}}
\begin{document}
\thispagestyle{empty}
@@ -799,7 +811,7 @@ UNIX-like systems:
oxnotes-trad1.cbx, oxnotes-trad2.cbx, oxnotes-trad3.cbx, oxyear.cbx,
oxnum.cbx, oxalph.cbx
- american-oxref.lbx, british-oxref.lbx, english-oxref.lbx,
- spanish-oxref.lbx
+ spanish-oxref.lbx, polish.lbx
- oxnotes.dbx, oxnotes-ibid.dbx, oxnotes-note.dbx, oxnotes-inote.dbx,
oxnotes-trad1.dbx, oxnotes-trad2.dbx, oxnotes-trad3.dbx, oxyear.dbx,
oxnum.dbx, oxalph.dbx
@@ -842,7 +854,8 @@ first two steps.
american-oxref.lbx,
british-oxref.lbx,
english-oxref.lbx,
- spanish-oxref.lbx
+ spanish-oxref.lbx,
+ polish-oxref.lbx,
oxalph.bbx,
oxalph.cbx,
oxalph.dbx,
@@ -1663,9 +1676,12 @@ This can be set globally or on a per-type or per-entry basis.
\section{Works in foreign languages}
-If you used a foreign language work, you might want to recommend a good translation.
+If you used a work in a different language from the one in which you are currently writing,
+you might want to recommend a good translation into the latter language.
-\tip{Add the translation in \code{related}, and set \code{relatedtype} to \code{translationas}.}
+\tip{Add the translation in \code{related}, and set \code{relatedtype} to \code{translationas}.
+ The localized bibstring reflects the current localization language:
+ \enquote{English translation}, \enquote{traducido espa\~nol}, and so on.}
\begin{bibexbox}
%<n|m><NHR \S18.2.5*>
@@ -1691,7 +1707,8 @@ If you used a foreign language work, you might want to recommend a good translat
\end{Verbatim}
\end{bibexbox}
-\tip{To specify the translator up front, set the \code{relatedtype} to \code{bytranslator} instead.}
+\tip{To specify the translator up front, or to recommend a translation into a third language,
+ set the \code{relatedtype} to \code{bytranslator} instead.}
\begin{bibexbox}
%<n|m><NHR \S18.2.14>
@@ -7770,6 +7787,7 @@ rather than \pkg[biblatex]{oxref}.}
\newcommand*{\uscasetitlepunct}{\addcomma\space}
\renewcommand*{\relateddelim}{\addsemicolon\space}
\DeclareDelimFormat{revsdnamedelim}{\addcomma}
+\DeclareDelimFormat[pair]{revsdnamedelim}{}
\DeclareDelimFormat{authortypedelim}{\addspace}
\DeclareDelimFormat{editortypedelim}{\addspace}
\DeclareDelimFormat{translatortypedelim}{\addspace}
@@ -7846,7 +7864,7 @@ rather than \pkg[biblatex]{oxref}.}
and
test {\ifdefvoid{#2}}%
}{}{%
- \printdelim{revsdnamedelim}}%
+ \printdelim{revsdnamepunct}}%
\ifdefvoid{#5}{}{\iftoggle{blx@ox@nametitle}{\bibnamedelimd\mkbibnametitle{#5}\isdot}{}}%
\ifdefvoid{#2}{}{\bibnamedelimd\mkbibnamegiven{#2}\isdot}%
}{%
@@ -7861,7 +7879,7 @@ rather than \pkg[biblatex]{oxref}.}
and
test {\ifdefvoid{#3}}%
}{}{%
- \printdelim{revsdnamedelim}}%
+ \printdelim{revsdnamepunct}}%
\ifdefvoid{#5}{}{\iftoggle{blx@ox@nametitle}{\bibnamedelimd\mkbibnametitle{#5}\isdot}{}}%
\ifdefvoid{#2}{}{\bibnamedelimd\mkbibnamegiven{#2}\isdot}%
\ifdefvoid{#3}{}{\bibnamedelimd\mkbibnameprefix{#3}\isdot}}}
@@ -7871,9 +7889,22 @@ rather than \pkg[biblatex]{oxref}.}
% the bibliography, but in natural order in citations. We implement this, along
% with the case changing option, in the following name format. We also add a
% second hash for checking if names (e.g.\@ |author| and |authoraddon|) are the
-% same.
+% same. We only need |name:revsdelim| on the first item, and only if it will be
+% followed by something else.
%
% \begin{macrocode}
+\renewbibmacro*{name:revsdelim}{%
+ \ifboolexpr{
+ (
+ test {\ifnumequal{\value{liststop}}{1}}
+ and
+ test \ifmorenames
+ )
+ or
+ test {\ifnumequal{\value{liststop}}{2}}
+ }
+ {\printdelim{revsdnamedelim}}
+ {}}
\def\blx@ox@lasthash{}
\DeclareNameFormat{bib-family-given/cite-given-family}{%
\iffieldannotation{inferred}{\ifnumequal{\value{listcount}}{1}{\bibopenbracket}{}}{}%
@@ -7918,13 +7949,22 @@ rather than \pkg[biblatex]{oxref}.}
\renewcommand*{\mkbibnametitle}[1]{##1}%
}{}%
\ifboolexpe{%
- test {\ifnumgreater{\value{listcount}}{1}}
- or (
+ test {\ifnumequal{\value{listcount}}{\@ne}}
+ and
+ (
+ test {\ifnumless{\value{listcount}}{\value{liststop}}}
+ or
+ test {\ifnumgreater{\value{listtotal}}{\value{maxnames}}}
+ or
+ test {\ifandothers{\currentname}}
+ )
+ and not
+ (
test {\ifdefvoid\namepartgiven}
and
test {\ifdefvoid\namepartprefix}
)
- }{}{\usebibmacro{name:revsdelim}}%
+ }{\usebibmacro{name:revsdelim}}{}%
}{%
% \end{macrocode}
%
@@ -7967,6 +8007,10 @@ rather than \pkg[biblatex]{oxref}.}
\savefield{hash}{\blx@ox@lasthash}%
}%
\ifitemannotation{inferred}{\bibclosebracket}{}%
+ \ifitemannotation{variant}{%
+ \global\settoggle{blx@ox@variantname}{true}%
+ }{%
+ \global\settoggle{blx@ox@variantname}{false}}%
\usebibmacro{name:andothers}%
\iffieldannotation{inferred}{%
\ifboolexpr{
@@ -8012,7 +8056,9 @@ rather than \pkg[biblatex]{oxref}.}
\usebibmacro{name:andothers}}
% \end{macrocode}
%
-% We do likewise for the regular |family-given| format.
+% We do likewise for the regular |family-given| format. Also, we only want to
+% use the |name:revsdelim| on the last name in the list if it will be followed
+% by \enquote{et al.}.
%
% \begin{macrocode}
\DeclareNameFormat{family-given}{%
@@ -8035,13 +8081,20 @@ rather than \pkg[biblatex]{oxref}.}
}{%
\global\settoggle{blx@ox@variantname}{false}}%
\ifboolexpe{%
- test {\ifnumgreater{\value{listcount}}{1}}
- or (
+ (
+ test {\ifnumless{\value{listcount}}{\value{liststop}}}
+ or
+ test {\ifnumgreater{\value{listtotal}}{\value{maxnames}}}
+ or
+ test {\ifandothers{\currentname}}
+ )
+ and not
+ (
test {\ifdefvoid\namepartgiven}
and
test {\ifdefvoid\namepartprefix}
)
- }{}{\usebibmacro{name:revsdelim}}%
+ }{\usebibmacro{name:revsdelim}}{}%
\usebibmacro{name:andothers}}
% \end{macrocode}
%
@@ -8068,21 +8121,46 @@ rather than \pkg[biblatex]{oxref}.}
\DeclareFieldFormat{namevariant}{\mkbibparens{\bibstring{equals}\space #1}}
% \end{macrocode}
%
-% We provide an alternative method that uses new name fields |authoraddon| and
-% |editoraddon|. To do this, we define a bibmacro that reimplements the loopcode
-% logic of \cs{printnames}, but operates on two name lists simultaneously; we use
-% saveboxes to extract the hashes, and only print the alternative name if it has
-% a different hash. The same technique is used by \textsf{oxyear} below to pair
-% up names with the short form used in references, so this bibmacro is written
-% to handle both cases.
+% We have two use cases for a bibmacro that reimplements the loopcode logic of
+% \cs{printnames}, but operates on two name lists simultaneously. One is to
+% support the new name fields |authoraddon| and |editoraddon|; the other is to
+% pair up names with the short form used in references, as required by
+% \textsf{oxyear} below.
+%
+% We need to do this in a way that doesn't break the patterns used for
+% configuring and adapting the punctuation that delimits the list items, so the
+% |namepair:delim| macro does the same as |name:delim| but instead of reading
+% the current counters, takes two extra arguments (in addition to the current name):
+% the number of the current name pair and the total number of name pairs.
+% The regular |finallistdelim| delimiter format looks up the value of the
+% |liststop| counter, so we need to give it the right value.
+%
+% \begin{macrocode}
+\newbibmacro*{namepair:delim}[3]{%
+ \ifnumgreater{#2}{\@ne}{%
+ \ifnumless{#2}{#3}{%
+ \printdelim{multinamedelim}%
+ }{%
+ \ifnumgreater{#3}{\c@maxnames}{%
+ \c@liststop\c@minnames
+ }{%
+ \c@liststop#3}%
+ \lbx@finalnamedelim{#1}}%
+ }{}}
+% \end{macrocode}
%
% The |namepairs| bibmacro takes two arguments: the data fields holding the main
-% name and alternative name respectively.
+% name and alternative name respectively. When rendering the names, we use
+% saveboxes to extract the hashes, and only print the alternative name if it has
+% a different hash. In this case, we also switch to the \enquote{pair}
+% delimiter context, where the |revsdnamedelim| (if any) is suppressed.
%
% \begin{macrocode}
+\DeclareFieldFormat{expanded}{\mkbibparens{#1}}
\newcounter{namepairs}
\newsavebox{\blx@ox@namebox}
\newsavebox{\blx@ox@altnamebox}
+\newtoggle{blx@ox@thispairvariant}%
\newbibmacro*{namepairs}[2]{%
\setcounter{namepairs}{0}%
\savebibmacro{name:andothers}%
@@ -8106,21 +8184,19 @@ rather than \pkg[biblatex]{oxref}.}
)
}{%
\stepcounter{namepairs}%
- \ifnumgreater{\value{namepairs}}{1}{%
- \ifnumequal{\value{#1}}{2}{%
- \setunit*{\addspace\bibstring{and}\addspace}%
- }{%
- \ifnumequal{\value{namepairs}}{\value{#1}}{%
- \setunit*{\addcomma\space\bibstring{and}\addspace}%
- }{%
- \setunit*{\addcomma\space}%
- }%
- }%
- }{}%
\savebox{\blx@ox@namebox}{%
\printnames[#1][\value{namepairs}-\value{namepairs}]{#1}%
}%
\let\blx@ox@firsthash=\blx@ox@lasthash
+ \savebox{\blx@ox@altnamebox}{%
+ \printnames[#1][\value{namepairs}-\value{namepairs}]{#2}%
+ }%
+ \let\blx@ox@secondhash=\blx@ox@lasthash
+ \iftoggle{blx@ox@variantname}{%
+ \toggletrue{blx@ox@thispairvariant}%
+ }{%
+ \togglefalse{blx@ox@thispairvariant}%
+ }%
% \end{macrocode}
%
% This is the part intended for |authoraddon| and |editoraddon|. Note that it
@@ -8128,20 +8204,28 @@ rather than \pkg[biblatex]{oxref}.}
%
% \begin{macrocode}
\IfEndWith{#2}{addon}{%
- \savebox{\blx@ox@altnamebox}{%
- \printnames[by#1][\value{namepairs}-\value{namepairs}]{#2}%
- }%
- \let\blx@ox@secondhash=\blx@ox@lasthash
+ \usebibmacro{namepair:delim}%
+ {\unhbox\blx@ox@namebox}{\value{namepairs}}{\value{#1}}%
\ifdefstrequal{\blx@ox@firsthash}{\blx@ox@secondhash}{%
- \unhbox\blx@ox@namebox
+ \hbox{}\unhbox\blx@ox@namebox
}{%
- \unhbox\blx@ox@namebox\addspace
- \iftoggle{blx@ox@variantname}{%
+ \iftoggle{blx@ox@thispairvariant}{%
\ifbibliography{%
- \printtext[namevariant]{\printnames[#1][\value{namepairs}-\value{namepairs}]{#2}}%
- }{}%
+ \delimcontext{pair}%
+ \printnames[#1][\value{namepairs}-\value{namepairs}]{#1}%
+ \setunit{\addspace}%
+ \printtext[namevariant]{%
+ \printnames[#1][\value{namepairs}-\value{namepairs}]{#2}}%
+ }{%
+ \hbox{}\unhbox\blx@ox@namebox
+ }%
}{%
- \printtext[nameaddon]{\unhbox\blx@ox@altnamebox}%
+ \delimcontext{pair}%
+ \printnames[#1][\value{namepairs}-\value{namepairs}]{#1}%
+ \setunit{\addspace}%
+ \printtext[nameaddon]{%
+ \printnames[#1][\value{namepairs}-\value{namepairs}]{#2}%
+ }%
}%
}%
% \end{macrocode}
@@ -8152,15 +8236,19 @@ rather than \pkg[biblatex]{oxref}.}
%
% \begin{macrocode}
}{%
- \savebox{\blx@ox@altnamebox}{%
- \printnames[#1][\value{namepairs}-\value{namepairs}]{#2}%
- }%
- \let\blx@ox@secondhash=\blx@ox@lasthash
\ifdefstrequal{\blx@ox@firsthash}{\blx@ox@secondhash}{%
- \unhbox\blx@ox@namebox
+ \usebibmacro{namepair:delim}%
+ {\unhbox\blx@ox@namebox}{\value{namepairs}}{\value{#1}}%
+ \hbox{}\unhbox\blx@ox@namebox
}{%
- \unhbox\blx@ox@altnamebox
- \addspace\mkbibparens{\unhbox\blx@ox@namebox}%
+ \usebibmacro{namepair:delim}%
+ {\unhbox\blx@ox@altnamebox}{\value{namepairs}}{\value{#1}}%
+ \delimcontext{pair}%
+ \printnames[#1][\value{namepairs}-\value{namepairs}]{#2}%
+ \setunit{\addspace}%
+ \printtext[expanded]{%
+ \printnames[#1][\value{namepairs}-\value{namepairs}]{#1}%
+ }%
}%
}%
}%
@@ -8725,7 +8813,7 @@ rather than \pkg[biblatex]{oxref}.}
\DeclareFieldFormat{pages}{%
\iffieldundef{bookpagination}%
{\mkcomprange{#1}}%
- {\mkcomprange[{\mkpageprefix[bookpagination]}]{#1}}%
+ {\mkpageprefix[bookpagination][\mkcomprange]{#1}}%
}
% \end{macrocode}
%
@@ -8735,7 +8823,7 @@ rather than \pkg[biblatex]{oxref}.}
\DeclareFieldFormat{postnote}{%
\iffieldundef{pagination}%
{\mkcomprange{#1}}%
- {\mkcomprange[{\mkpageprefix}]{#1}}%
+ {\mkpageprefix[pagination][\mkcomprange]{#1}}%
}
% \end{macrocode}
@@ -9299,6 +9387,7 @@ rather than \pkg[biblatex]{oxref}.}
% considered on request.
%
% \begin{macrocode}
+\newcommand*{\mkvolroman}[1]{\Rn{#1}}
\DeclareFieldFormat[book,mvbook,bookinbook,inbook,suppbook,%
collection,mvcollection,incollection,suppcollection,%
proceedings,mvproceedings,inproceedings,%
@@ -9306,11 +9395,11 @@ reference,mvreference,inreference]{volume}{%
\IfSubStr{#1}{-}{%
\StrCount{#1}{-}[\blx@ox@dashnum]%
\StrBefore{#1}{-}[\blx@ox@volnum]%
- \expandafter\ifinteger\blx@ox@volnum{\Rn{\blx@ox@volnum}}{\blx@ox@volnum}\bibrangedash
+ \expandafter\ifinteger\blx@ox@volnum{\mkvolroman{\blx@ox@volnum}}{\blx@ox@volnum}\bibrangedash
\StrBehind[\blx@ox@dashnum]{#1}{-}[\blx@ox@volnum]%
- \expandafter\ifinteger\blx@ox@volnum{\Rn{\blx@ox@volnum}}{\blx@ox@volnum}%
+ \expandafter\ifinteger\blx@ox@volnum{\mkvolroman{\blx@ox@volnum}}{\blx@ox@volnum}%
}{%
- \ifinteger{#1}{\Rn{#1}}{#1}}}
+ \ifinteger{#1}{\mkvolroman{#1}}{#1}}}
% \end{macrocode}
%
% Where a multi-volume work is more like a series, the volume number and
@@ -9377,6 +9466,37 @@ reference,mvreference,inreference]{volume}{%
{Valid values are 'in' and 'out'.}}}}
% \end{macrocode}
%
+% If there are the same number of locations and publishers, and there are more
+% than one pair, we print them pairwaise rather than in two separate lists. In
+% order to do this while retaining the normal mechanisms for punctuating the
+% list, we need a |listpair:delim| macro similar to |namepair:delim| (above)
+% that uses the generic list punctuation. Again, the three arguments are the
+% item being printed, the number of the current item pair and the total number
+% of item pairs.
+%
+% \begin{macrocode}
+\newbibmacro*{listpair:delim}[3]{%
+ \ifnumgreater{#2}{\@ne}{%
+ \ifnumless{#2}{#3}{%
+ \printdelim{multilistdelim}%
+ }{%
+ \c@liststop#3%
+ \lbx@finallistdelim{#1}}%
+ }{}}
+% \end{macrocode}
+%
+% We use this as the basis of a list format that will be applied to the location
+% element of a location--publisher pair.
+%
+% \begin{macrocode}
+\newcounter{locpubpairs}
+\DeclareListFormat{locpub}{%
+ \usebibmacro{listpair:delim}%
+ {#1}{\value{locpubpairs}}{\value{location}}%
+ #1\isdot
+}
+% \end{macrocode}
+%
% When citing both the first and a later edition, the first one comes
% first, and the later one comes after a semicolon. As per standard
% \pkg{biblatex}, the elements of a single edition are separated by commas
@@ -9385,7 +9505,7 @@ reference,mvreference,inreference]{volume}{%
% origpublisher is also specified.
%
% \begin{macrocode}
-\newcounter{locpubpairs}
+\newsavebox{\blx@ox@locbox}
\newbibmacro*{edition+publisher+location+date}{%
\printlist{origlocation}%
\iflistundef{origpublisher}%
@@ -9406,10 +9526,11 @@ reference,mvreference,inreference]{volume}{%
\setunit*{\addcomma\space}%
% \end{macrocode}
%
-% If there are the same number of locations and publishers, and there
-% are more than one pair, we print them pairwaise rather than in two
+% As mentioned, if there are the same number of locations and publishers, and
+% there are more than one pair, we print them pairwaise rather than in two
% separate lists. This uses the same principle as the |namepairs| bibmacro,
-% but does not have the list truncation apparatus.
+% but does not have the list truncation apparatus. This time we use a savebox
+% just for efficiency.
%
% \begin{macrocode}
\ifboolexpr{%
@@ -9424,19 +9545,8 @@ reference,mvreference,inreference]{volume}{%
test {\ifnumcomp{\value{locpubpairs}}{<}{\value{publisher}}}
}{%
\stepcounter{locpubpairs}%
- \ifnumcomp{\value{locpubpairs}}{>}{1}{%
- \ifnumequal{\value{publisher}}{2}{%
- \setunit*{\addspace\bibstring{and}\addspace}%
- }{%
- \ifnumequal{\value{locpubpairs}}{\value{publisher}}{%
- \setunit*{\addcomma\space\bibstring{and}\addspace}%
- }{%
- \setunit*{\addcomma\space}%
- }%
- }%
- }{}%
- \printlist[][\value{locpubpairs}-\value{locpubpairs}]{location}%
- \setunit*{\addcolon\space}%
+ \printlist[locpub][\value{locpubpairs}-\value{locpubpairs}]{location}%
+ \setunit{\addcolon\space}%
\printlist[][\value{locpubpairs}-\value{locpubpairs}]{publisher}%
}%
\restorebibmacro{list:andothers}%
@@ -11383,7 +11493,11 @@ reference,mvreference,inreference]{volume}{%
\setcounter{blx@tmpcnt}{\value{listcount}}%
\addtocounter{blx@tmpcnt}{1}%
\ifnumequal{\value{blx@tmpcnt}}{\value{listtotal}}{%
- #1\space\bibstring{and}\addspace
+ \ifnumgreater{\value{listtotal}}{2}{%
+ #1\finalandcomma\space\bibstring{and}\addspace
+ }{%
+ #1\space\bibstring{and}\addspace
+ }
}{%
#1\addcomma\space}}}%
@@ -14256,11 +14370,6 @@ reference,mvreference,inreference]{volume}{%
% \code{authoraddon} has not been provided.
%
% \begin{macrocode}
-\xpatchbibmacro{namepairs}{%
- \printnames[by#1]%
-}{%
- \printnames[#1]%
-}{}{\wlog{WARNING: biblatex-oxref (oxyear) failed to patch namepairs}}
\xpatchbibmacro{author+altauthor}{%
\printnames{author}%
}{%
@@ -15085,7 +15194,7 @@ reference,mvreference,inreference]{volume}{%
\InheritBibliographyExtras{english}
\DeclareBibliographyExtras{%
\def\finalandcomma{\addcomma}%
- \def\blx@ox@langbibstring#1#2{#1\addspace\bibstring{#2}}%
+ \def\blx@ox@langbibstring#1#2{#1\setunit*{\addspace}\bibstring{#2}}%
}
\UndeclareBibliographyExtras{%
\def\blx@ox@langbibstring#1#2{\bibstring{#2}}%
@@ -15296,11 +15405,11 @@ reference,mvreference,inreference]{volume}{%
byreviser = {{revised by}{rev\adddot}},
byreviewer = {{reviewed by}{rev\adddot}},
bycollaborator = {{in collaboration with}{in collab\adddotspace with}},
- bytranslator = {{translated \lbx@lfromlang\ by}{trans\adddot\ \lbx@sfromlang}},
+ bytranslator = {{translated by}{trans\adddot}},
bycommentator = {{commented by}{comm\adddot}},
byannotator = {{annotated by}{annot\adddot}},
- byeditortr = {{edited and translated \lbx@lfromlang\ by}%
- {ed\adddotspace and trans\adddot\ \lbx@sfromlang}},
+ byeditortr = {{edited and translated by}%
+ {ed\adddotspace and trans\adddot}},
byeditorco = {{edited and commented by}%
{ed\adddotspace and comm\adddot}},
byeditoran = {{edited and annotated by}%
@@ -15311,16 +15420,16 @@ reference,mvreference,inreference]{volume}{%
{ed.\adddotspace with foreword}},
byeditoraf = {{edited, with an afterword, by}%
{ed.\adddotspace with afterword}},
- byeditortrco = {{edited, translated \lbx@lfromlang\finalandcomma\ and commented by}%
- {ed.,\addabbrvspace trans\adddot\ \lbx@sfromlang\finalandcomma\ and comm\adddot}},
- byeditortran = {{edited, translated \lbx@lfromlang\finalandcomma\ and annotated by}%
- {ed.,\addabbrvspace trans\adddot\ \lbx@sfromlang\finalandcomma\ and annot\adddot}},
- byeditortrin = {{edited and translated \lbx@lfromlang, with an introduction, by}%
- {with introduction, ed\adddotspace and trans\adddot\ \lbx@sfromlang}},
- byeditortrfo = {{edited and translated \lbx@lfromlang, with a foreword, by}%
- {with foreword, ed\adddotspace and trans\adddot\ \lbx@sfromlang}},
- byeditortraf = {{edited and translated \lbx@lfromlang, with an afterword, by}%
- {with afterword, ed\adddotspace and trans\adddot\ \lbx@sfromlang}},
+ byeditortrco = {{edited, translated\finalandcomma\ and commented by}%
+ {ed.,\addabbrvspace trans\adddot\finalandcomma\ and comm\adddot}},
+ byeditortran = {{edited, translated\finalandcomma\ and annotated by}%
+ {ed.,\addabbrvspace trans\adddot\finalandcomma\ and annot\adddot}},
+ byeditortrin = {{edited and translated, with an introduction, by}%
+ {with introduction, ed\adddotspace and trans\adddot}},
+ byeditortrfo = {{edited and translated, with a foreword, by}%
+ {with foreword, ed\adddotspace and trans\adddot}},
+ byeditortraf = {{edited and translated, with an afterword, by}%
+ {with afterword, ed\adddotspace and trans\adddot}},
byeditorcoin = {{edited and commented, with an introduction, by}%
{with introduction, ed\adddotspace and comm\adddot}},
byeditorcofo = {{edited and commented, with a foreword, by}%
@@ -15333,47 +15442,46 @@ reference,mvreference,inreference]{volume}{%
{with foreword, ed\adddotspace and annot\adddot}},
byeditoranaf = {{edited and annotated, with an afterword, by}%
{with afterword, ed\adddotspace and annot\adddot}},
- byeditortrcoin = {{edited, translated \lbx@lfromlang\finalandcomma\ and commented, with an introduction, by}%
- {with introduction, ed.,\addabbrvspace trans\adddot\ \lbx@sfromlang\finalandcomma\ and comm\adddot}},
- byeditortrcofo = {{edited, translated \lbx@lfromlang\finalandcomma\ and commented, with a foreword, by}%
- {with foreword, ed.,\addabbrvspace trans\adddot\ \lbx@sfromlang\finalandcomma\ and comm\adddot}},
- byeditortrcoaf = {{edited, translated \lbx@lfromlang\finalandcomma\ and commented, with an afterword, by}%
- {with afterword, ed.,\addabbrvspace trans\adddot\ \lbx@sfromlang\finalandcomma\ and comm\adddot}},
- byeditortranin = {{edited, translated \lbx@lfromlang\finalandcomma\ and annotated, with an introduction, by}%
- {with introduction, ed.,\addabbrvspace trans\adddot\ \lbx@sfromlang\finalandcomma\ and annot\adddot}},
- byeditortranfo = {{edited, translated \lbx@lfromlang\finalandcomma\ and annotated, with a foreword, by}%
- {with foreword, ed.,\addabbrvspace trans\adddot\ \lbx@sfromlang\finalandcomma\ and annot\adddot}},
- byeditortranaf = {{edited, translated \lbx@lfromlang\finalandcomma\ and annotated, with an afterword, by}%
- {with afterword, ed.,\addabbrvspace trans\adddot\ \lbx@sfromlang\finalandcomma\ and annot\adddot}},
- bytranslatorco = {{translated \lbx@lfromlang\ and commented by}%
- {trans\adddot\ \lbx@sfromlang\ and comm\adddot}},
- bytranslatoran = {{translated \lbx@lfromlang\ and annotated by}%
- {trans\adddot\ \lbx@sfromlang\ and annot\adddot}},
- bytranslatorin = {{translated \lbx@lfromlang, with an introduction, by}%
- {trans\adddot\ \lbx@sfromlang\ with introduction}},
- bytranslatorfo = {{translated \lbx@lfromlang, with a foreword, by}%
- {trans\adddot\ \lbx@sfromlang\ with foreword}},
- bytranslatoraf = {{translated \lbx@lfromlang, with an afterword, by}%
- {trans\adddot\ \lbx@sfromlang\ with afterword}},
- bytranslatorcoin = {{translated \lbx@lfromlang\ and commented, with an introduction, by}%
- {with introduction, trans\adddot\ \lbx@sfromlang\ and comm\adddot}},
- bytranslatorcofo = {{translated \lbx@lfromlang\ and commented, with a foreword, by}%
- {with foreword, trans\adddot\ \lbx@sfromlang\ and comm\adddot}},
- bytranslatorcoaf = {{translated \lbx@lfromlang\ and commented, with an afterword, by}%
- {with afterword, trans\adddot\ \lbx@sfromlang\ and comm\adddot}},
- bytranslatoranin = {{translated \lbx@lfromlang\ and annotated, with an introduction, by}%
- {with introduction, trans\adddot\ \lbx@sfromlang\ and annot\adddot}},
- bytranslatoranfo = {{translated \lbx@lfromlang\ and annotated, with a foreword, by}%
- {with foreword, trans\adddot\ \lbx@sfromlang\ and annot\adddot}},
- bytranslatoranaf = {{translated \lbx@lfromlang\ and annotated, with an afterword, by}%
- {with afterword, trans\adddot\ \lbx@sfromlang\ and annot\adddot}},
+ byeditortrcoin = {{edited, translated\finalandcomma\ and commented, with an introduction, by}%
+ {with introduction, ed.,\addabbrvspace trans\adddot\finalandcomma\ and comm\adddot}},
+ byeditortrcofo = {{edited, translated\finalandcomma\ and commented, with a foreword, by}%
+ {with foreword, ed.,\addabbrvspace trans\adddot\finalandcomma\ and comm\adddot}},
+ byeditortrcoaf = {{edited, translated\finalandcomma\ and commented, with an afterword, by}%
+ {with afterword, ed.,\addabbrvspace trans\adddot\finalandcomma\ and comm\adddot}},
+ byeditortranin = {{edited, translated\finalandcomma\ and annotated, with an introduction, by}%
+ {with introduction, ed.,\addabbrvspace trans\adddot\finalandcomma\ and annot\adddot}},
+ byeditortranfo = {{edited, translated\finalandcomma\ and annotated, with a foreword, by}%
+ {with foreword, ed.,\addabbrvspace trans\adddot\finalandcomma\ and annot\adddot}},
+ byeditortranaf = {{edited, translated\finalandcomma\ and annotated, with an afterword, by}%
+ {with afterword, ed.,\addabbrvspace trans\adddot\finalandcomma\ and annot\adddot}},
+ bytranslatorco = {{translated and commented by}%
+ {trans\adddotspace and comm\adddot}},
+ bytranslatoran = {{translated and annotated by}%
+ {trans\adddotspace and annot\adddot}},
+ bytranslatorin = {{translated, with an introduction, by}%
+ {trans\adddotspace with introduction}},
+ bytranslatorfo = {{translated, with a foreword, by}%
+ {trans\adddotspace with foreword}},
+ bytranslatoraf = {{translated, with an afterword, by}%
+ {trans\adddotspace with afterword}},
+ bytranslatorcoin = {{translated and commented, with an introduction, by}%
+ {with introduction, trans\adddotspace and comm\adddot}},
+ bytranslatorcofo = {{translated and commented, with a foreword, by}%
+ {with foreword, trans\adddotspace and comm\adddot}},
+ bytranslatorcoaf = {{translated and commented, with an afterword, by}%
+ {with afterword, trans\adddotspace and comm\adddot}},
+ bytranslatoranin = {{translated and annotated, with an introduction, by}%
+ {with introduction, trans\adddotspace and annot\adddot}},
+ bytranslatoranfo = {{translated and annotated, with a foreword, by}%
+ {with foreword, trans\adddotspace and annot\adddot}},
+ bytranslatoranaf = {{translated and annotated, with an afterword, by}%
+ {with afterword, trans\adddotspace and annot\adddot}},
% \end{macrocode}
%
% The roles expressed as objects and terms for supplementary material
% are not abbreviated.
%
% \begin{macrocode}
- withintroduction = {{with an introduction by}{with an introduction by}},
withcommentator = {{with a commentary by}{with a commentary by}},
withannotator = {{with annotations by}{with annotations by}},
withintroduction = {{with an introduction by}{with an introduction by}},
@@ -15428,8 +15536,10 @@ reference,mvreference,inreference]{volume}{%
% Languages are abbreviated.
%
% \begin{macrocode}
- langamerican = {{English}{Eng\adddot}},
- langbrazilian = {{Brazilian}{Braz\adddot}},
+ langamerican = {{American English}{Amer\adddotspace Eng\adddot}},
+ langbasque = {{Basque}{Basq\adddot}},
+ langbrazilian = {{Brazilian Portuguese}{Braz\adddotspace Port\adddot}},
+ langbulgarian = {{Bulgarian}{Bulg\adddot}},
langcatalan = {{Catalan}{Catal\adddot}},
langcroatian = {{Croatian}{Croat\adddot}},
langczech = {{Czech}{Czech}},
@@ -15439,17 +15549,28 @@ reference,mvreference,inreference]{volume}{%
langestonian = {{Estonian}{Eston\adddot}},
langfinnish = {{Finnish}{Finn\adddot}},
langfrench = {{French}{Fr\adddot}},
+ langgalician = {{Galician}{Galic\adddot}},
langgerman = {{German}{Ger\adddot}},
langgreek = {{Greek}{Gr\adddot}},
+ langhungarian = {{Hungarian}{Hung\adddot}},
langitalian = {{Italian}{It\adddot}},
+ langjapanese = {{Japanese}{Jap\adddot}},
langlatin = {{Latin}{Lat\adddot}},
+ langlatvian = {{Latvian}{Latv\adddot}},
+ langlithuanian = {{Lithuanian}{Lith\adddot}},
+ langmarathi = {{Marathi}{Mar\adddot}},
langnorwegian = {{Norwegian}{Norw\adddot}},
langpolish = {{Polish}{Pol\adddot}},
langportuguese = {{Portuguese}{Port\adddot}},
+ langromanian = {{Romanian}{Rom\adddot}},
langrussian = {{Russian}{Russ\adddot}},
+ langserbian = {{Serbian}{Serb\adddot}},
+ langslovak = {{Slovak}{Slovak}},
langslovene = {{Slovene}{Slov\adddot}},
langspanish = {{Spanish}{Sp\adddot}},
langswedish = {{Swedish}{Swed\adddot}},
+ langturkish = {{Turkish}{Turk\adddot}},
+ langukrainian = {{Ukrainian}{Ukr\adddot}},
}
% \end{macrocode}
%
@@ -15742,11 +15863,11 @@ reference,mvreference,inreference]{volume}{%
byfounder = {{fundado por}{fund\adddotspace}},
bycontinuator = {{continuado por}{cont\adddotspace}},
bycollaborator = {{colaboraci\'on de}{col\adddotspace de}},
- bytranslator = {{traducido \lbx@lfromlang\ por}{trad\adddotspace \lbx@sfromlang}},
+ bytranslator = {{traducido por}{trad\adddotspace}},
bycommentator = {{comentado por}{com\adddotspace}},
byannotator = {{anotado por}{anot\adddotspace}},
- byeditortr = {{editado y traducido \lbx@lfromlang\ por}%
- {ed\adddotspace y trad\adddotspace \lbx@sfromlang}},
+ byeditortr = {{editado y traducido por}%
+ {ed\adddotspace y trad\adddotspace}},
byeditorco = {{editado y comentado por}%
{ed\adddotspace y com\adddotspace }},
byeditoran = {{edici\'on y notas de}%
@@ -15757,16 +15878,16 @@ reference,mvreference,inreference]{volume}{%
{ed\adddotspace y pr\'ol\adddotspace}},
byeditoraf = {{edici\'on y ep\'ilogo de}%
{ed\adddotspace y ep\'il\adddotspace}},
- byeditortrco = {{editado, traducido \lbx@lfromlang\ y comentado por}%
- {ed.,\addabbrvspace trad\adddotspace \lbx@sfromlang\ y com\adddotspace}},
- byeditortran = {{edici\'on, traducci\'on \lbx@lfromlang\ y notas de}%
- {ed.,\addabbrvspace trad\adddotspace \lbx@sfromlang\ y not\adddotspace}},
- byeditortrin = {{edici\'on, traducci\'on \lbx@lfromlang\ e introducci\'on de}%
- {ed.,\addabbrvspace trad\adddotspace \lbx@sfromlang\ e intr\adddotspace}},
- byeditortrfo = {{edici\'on, traducci\'on \lbx@lfromlang\ y pr\'ologo de}%
- {ed.,\addabbrvspace trad\adddotspace \lbx@sfromlang\ y pr\'ol\adddotspace}},
- byeditortraf = {{editado, traducido \lbx@lfromlang\ y epilogado}%
- {ed.,\addabbrvspace trad\adddotspace \lbx@sfromlang\ y ep\'il\adddotspace}},
+ byeditortrco = {{editado, traducido y comentado por}%
+ {ed.,\addabbrvspace trad\adddotspace y com\adddotspace}},
+ byeditortran = {{edici\'on, traducci\'on y notas de}%
+ {ed.,\addabbrvspace trad\adddotspace y not\adddotspace}},
+ byeditortrin = {{edici\'on, traducci\'on e introducci\'on de}%
+ {ed.,\addabbrvspace trad\adddotspace e intr\adddotspace}},
+ byeditortrfo = {{edici\'on, traducci\'on y pr\'ologo de}%
+ {ed.,\addabbrvspace trad\adddotspace y pr\'ol\adddotspace}},
+ byeditortraf = {{editado, traducido y epilogado}%
+ {ed.,\addabbrvspace trad\adddotspace y ep\'il\adddotspace}},
byeditorcoin = {{editado, comentado e introducido}%
{ed.,\addabbrvspace com\adddotspace e intr\adddotspace}},
byeditorcofo = {{edici\'on, comentarios y pr\'ologo de}%
@@ -15779,40 +15900,40 @@ reference,mvreference,inreference]{volume}{%
{ed.,\addabbrvspace anot\adddotspace y pr\'ol\adddotspace}},
byeditoranaf = {{edici\'on, notas y ep\'ilogo de}%
{ed.,\addabbrvspace anot\adddotspace y ep\'il\adddotspace}},
- byeditortrcoin = {{edici\'on, traducci\'on \lbx@lfromlang, comentarios e introducci\'on de}%
- {ed.,\addabbrvspace trad\adddotspace \lbx@sfromlang, com\adddotspace e intr\adddotspace}},
- byeditortrcofo = {{edici\'on, traducci\'on \lbx@lfromlang, comentarios y pr\'ologo de}%
- {ed.,\addabbrvspace trad\adddotspace \lbx@sfromlang, com\adddotspace y pr\'ol\adddotspace}},
- byeditortrcoaf = {{edici\'on, traducci\'on \lbx@lfromlang, comentarios y ep\'ilogo de}%
- {ed.,\addabbrvspace trad\adddotspace \lbx@sfromlang, com\adddotspace y ep\'il\adddotspace}},
- byeditortranin = {{edici\'on, traducci\'on \lbx@lfromlang, notas e introducci\'on de}%
- {ed.,\addabbrvspace trad\adddotspace \lbx@sfromlang, anot\adddotspace e intr\adddotspace}},
- byeditortranfo = {{edici\'on, traducci\'on \lbx@lfromlang, notas y pr\'ologo de}%
- {ed.,\addabbrvspace trad\adddotspace \lbx@sfromlang, anot\adddotspace y pr\'ol\adddotspace}},
- byeditortranaf = {{edici\'on, traducci\'on \lbx@lfromlang, notas y ep\'ilogo de}%
- {ed.,\addabbrvspace trad\adddotspace \lbx@sfromlang, anot\adddotspace y ep\'il\adddotspace}},
- bytranslatorco = {{traducci\'on \lbx@lfromlang\ y comentarios de}%
- {trad\adddotspace \lbx@sfromlang\ y com\adddotspace}},
- bytranslatoran = {{traducci\'on \lbx@lfromlang\ y notas de}%
- {trad\adddotspace \lbx@sfromlang\ y not\adddotspace}},
- bytranslatorin = {{traducci\'on \lbx@lfromlang\ e introducci\'on de}%
- {trad\adddotspace \lbx@sfromlang\ e introd\adddotspace}},
- bytranslatorfo = {{traducci\'on \lbx@lfromlang\ y pr\'ologo de}%
- {trad\adddotspace \lbx@sfromlang\ y pr\'ol\adddotspace}},
- bytranslatoraf = {{traducci\'on \lbx@lfromlang\ y ep\'ilogo de}%
- {trad\adddotspace \lbx@sfromlang\ y ep\'il\adddotspace}},
- bytranslatorcoin = {{traducci\'on \lbx@lfromlang, comentarios e introducci\'on de}%
- {trad\adddotspace \lbx@sfromlang, com\adddotspace e intr\adddotspace}},
- bytranslatorcofo = {{traducci\'on \lbx@lfromlang, comentarios y pr\'ologo de}%
- {trad\adddotspace \lbx@sfromlang, com\adddotspace y pr\'ol\adddotspace}},
- bytranslatorcoaf = {{traducci\'on \lbx@lfromlang, comentarios y ep\'ilogo de}%
- {trad\adddotspace \lbx@sfromlang, com\adddotspace y ep\'il\adddotspace}},
- bytranslatoranin = {{traducci\'on \lbx@lfromlang, notas e introducci\'on de}%
- {trad\adddotspace \lbx@sfromlang, anot\adddotspace e intr\adddotspace}},
- bytranslatoranfo = {{traducci\'on \lbx@lfromlang, notas y pr\'ologo}%
- {trad\adddotspace \lbx@sfromlang, anot\adddotspace y pr\'ol\adddotspace}},
- bytranslatoranaf = {{traducci\'on \lbx@lfromlang, notas y ep\'ilogo}%
- {trad\adddotspace \lbx@sfromlang, anot\adddotspace y ep\'il\adddotspace}},
+ byeditortrcoin = {{edici\'on, traducci\'on, comentarios e introducci\'on de}%
+ {ed.,\addabbrvspace trad.,\addabbrvspace com\adddotspace e intr\adddotspace}},
+ byeditortrcofo = {{edici\'on, traducci\'on, comentarios y pr\'ologo de}%
+ {ed.,\addabbrvspace trad.,\addabbrvspace com\adddotspace y pr\'ol\adddotspace}},
+ byeditortrcoaf = {{edici\'on, traducci\'on, comentarios y ep\'ilogo de}%
+ {ed.,\addabbrvspace trad.,\addabbrvspace com\adddotspace y ep\'il\adddotspace}},
+ byeditortranin = {{edici\'on, traducci\'on, notas e introducci\'on de}%
+ {ed.,\addabbrvspace trad.,\addabbrvspace anot\adddotspace e intr\adddotspace}},
+ byeditortranfo = {{edici\'on, traducci\'on, notas y pr\'ologo de}%
+ {ed.,\addabbrvspace trad.,\addabbrvspace anot\adddotspace y pr\'ol\adddotspace}},
+ byeditortranaf = {{edici\'on, traducci\'on, notas y ep\'ilogo de}%
+ {ed.,\addabbrvspace trad.,\addabbrvspace anot\adddotspace y ep\'il\adddotspace}},
+ bytranslatorco = {{traducci\'on y comentarios de}%
+ {trad\adddotspace y com\adddotspace}},
+ bytranslatoran = {{traducci\'on y notas de}%
+ {trad\adddotspace y not\adddotspace}},
+ bytranslatorin = {{traducci\'on e introducci\'on de}%
+ {trad\adddotspace e introd\adddotspace}},
+ bytranslatorfo = {{traducci\'on y pr\'ologo de}%
+ {trad\adddotspace y pr\'ol\adddotspace}},
+ bytranslatoraf = {{traducci\'on y ep\'ilogo de}%
+ {trad\adddotspace y ep\'il\adddotspace}},
+ bytranslatorcoin = {{traducci\'on, comentarios e introducci\'on de}%
+ {trad.,\addabbrvspace com\adddotspace e intr\adddotspace}},
+ bytranslatorcofo = {{traducci\'on, comentarios y pr\'ologo de}%
+ {trad.,\addabbrvspace com\adddotspace y pr\'ol\adddotspace}},
+ bytranslatorcoaf = {{traducci\'on, comentarios y ep\'ilogo de}%
+ {trad.,\addabbrvspace com\adddotspace y ep\'il\adddotspace}},
+ bytranslatoranin = {{traducci\'on, notas e introducci\'on de}%
+ {trad.,\addabbrvspace anot\adddotspace e intr\adddotspace}},
+ bytranslatoranfo = {{traducci\'on, notas y pr\'ologo}%
+ {trad.,\addabbrvspace anot\adddotspace y pr\'ol\adddotspace}},
+ bytranslatoranaf = {{traducci\'on, notas y ep\'ilogo}%
+ {trad.,\addabbrvspace anot\adddotspace y ep\'il\adddotspace}},
% \end{macrocode}
%
% The roles expressed as objects and terms for supplementary material
@@ -15848,6 +15969,14 @@ reference,mvreference,inreference]{volume}{%
% for shorthands and \enquote{at} to cite a page within a range.
%
% \begin{macrocode}
+ idem = {{idem}{id\adddot}},
+ idemsm = {{idem}{id\adddot}},
+ idemsf = {{eadem}{ead\adddot}},
+ idemsn = {{idem}{id\adddot}},
+ idempm = {{eidem}{eid\adddot}},
+ idempf = {{eaedem}{eaed\adddot}},
+ idempn = {{eadem}{ead\adddot}},
+ idempp = {{eidem}{eid\adddot}},
citedas = {{en adelante}{en adelante}},
thiscite = {{en}{en}},
% \end{macrocode}
@@ -15855,50 +15984,510 @@ reference,mvreference,inreference]{volume}{%
% Languages are abbreviated.
%
% \begin{macrocode}
- langamerican = {{ingl\'es americano}{ing\adddotspace amer\adddotspace}},
- langbrazilian = {{brasile\~no}{por\adddotspace bras\adddotspace}},
- langbulgarian = {{b\'ulgaro}{bul\adddotspace}},
- langcatalan = {{catal\'an}{cat\adddotspace}},
- langcroatian = {{croata}{hrv\adddotspace}},
- langczech = {{checo}{ces\adddotspace}},
- langdanish = {{dan\'es}{dan\adddotspace}},
- langdutch = {{neerland\'es}{nld\adddotspace}},
- langenglish = {{ingl\'es}{ing\adddotspace}},
- langestonian = {{estonio}{est\adddotspace}},
- langfinnish = {{fin\'es}{fin\adddotspace}},
- langfrench = {{franc\'es}{fra\adddotspace}},
- langgalician = {{gallego}{glg\adddotspace}},
- langgerman = {{alem\'an}{ale\adddotspace}},
- langgreek = {{griego}{gr\adddotspace}},
- langhungarian = {{h\'ungaro}{hun\adddotspace}},
- langitalian = {{italiano}{ita\adddotspace}},
- langjapanese = {{japon\'es}{jap\adddotspace}},
- langlatin = {{lat\'in}{lat\adddotspace}},
- langlatvian = {{lituano}{lit\adddotspace}},
- langnorwegian = {{noruego}{nor\adddotspace}},
- langpolish = {{polaco}{pol\adddotspace}},
- langportuguese = {{portugu\'es}{port\adddotspace}},
- langrussian = {{ruso}{rus\adddotspace}},
- langserbian = {{serbio}{srp\adddotspace}},
- langslovak = {{eslovaco}{slk\adddotspace}},
- langslovene = {{esloveno}{slv\adddotspace}},
- langspanish = {{espa\~nol}{esp\adddotspace}},
+ langamerican = {{ingl\'es americano}{ing\adddotspace amer\adddot}},
+ langbasque = {{vasco}{vasc\adddot}},
+ langbrazilian = {{portugu\'es brasile\~no}{por\adddotspace bras\adddot}},
+ langbulgarian = {{b\'ulgaro}{bul\adddot}},
+ langcatalan = {{catal\'an}{cat\adddot}},
+ langcroatian = {{croata}{hrv\adddot}},
+ langczech = {{checo}{ces\adddot}},
+ langdanish = {{dan\'es}{dan\adddot}},
+ langdutch = {{neerland\'es}{nld\adddot}},
+ langenglish = {{ingl\'es}{ing\adddot}},
+ langestonian = {{estonio}{est\adddot}},
+ langfinnish = {{fin\'es}{fin\adddot}},
+ langfrench = {{franc\'es}{fra\adddot}},
+ langgalician = {{gallego}{glg\adddot}},
+ langgerman = {{alem\'an}{ale\adddot}},
+ langgreek = {{griego}{gr\adddot}},
+ langhungarian = {{h\'ungaro}{hun\adddot}},
+ langitalian = {{italiano}{ita\adddot}},
+ langjapanese = {{japon\'es}{jap\adddot}},
+ langlatin = {{lat\'in}{lat\adddot}},
+ langlatvian = {{let\'on}{let\adddot}},
+ langlithuanian = {{lituano}{lit\adddot}},
+ langmarathi = {{marathi}{mar\adddot}},
+ langnorwegian = {{noruego}{nor\adddot}},
+ langpolish = {{polaco}{pol\adddot}},
+ langportuguese = {{portugu\'es}{port\adddot}},
+ langrussian = {{ruso}{rus\adddot}},
+ langserbian = {{serbio}{srp\adddot}},
+ langslovak = {{eslovaco}{slk\adddot}},
+ langslovene = {{esloveno}{slv\adddot}},
+ langspanish = {{espa\~nol}{esp\adddot}},
langswedish = {{sueco}{sueco}},
- langukrainian = {{ucraniano}{ucr\adddotspace}},
+ langturkish = {{turco}{turco}},
+ langukrainian = {{ucraniano}{ucr\adddot}},
}
% \end{macrocode}
%
% \iffalse %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%</es>
+%<*pl>
+% \fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% \section{Polish: polish-oxref.lbx}
+%
+% \setcounter{FancyVerbLine}{19}
+%
+% Thanks to Sebastian Wasiuta for contributing these translations and extras.
+%
+% We load the standard language-specific punctuation and date formatting.
+%
+% \begin{macrocode}
+\InheritBibliographyExtras{polish}
+% \end{macrocode}
+%
+% Here are some additional specific settings we need.
+%
+% There is no comma after forenames in the inverted position.
+%
+% \begin{macrocode}
+\DeclareBibliographyExtras{%
+ \DeclareDelimFormat{revsdnamedelim}{}%
+% \end{macrocode}
+%
+% We need to use the right case for month names in treaty execution dates.
+%
+% \begin{macrocode}
+ \savecommand\makebbx@dateii
+ \def\makebbx@dateii#1#2#3{%
+ \blx@imc@stripzeros{#3}~\lbx@pl@mkbibmonth{#2}%
+ \space
+ #1}%
+% \end{macrocode}
+%
+% Volume numbers are expressed in uppercase Roman numerals.
+%
+% \begin{macrocode}
+ \savecommand\mkvolroman
+ \renewcommand*{\mkvolroman}[1]{\RN{#1}}%
+% \end{macrocode}
+%
+% There is no compression of years.
+%
+% \begin{macrocode}
+ \savecommand\blx@ox@compyear
+ \renewcommand*{\blx@ox@compyear}[2]{#2}%
+% \end{macrocode}
+%
+% There is no compression of pagination ranges.
+%
+% \begin{macrocode}
+ \savefieldformat{pages}%
+ \DeclareFieldFormat{pages}{%
+ \iffieldundef{bookpagination}%
+ {\mknormrange{#1}}%
+ {\mkpageprefix[bookpagination][\mknormrange]{#1}}%
+ }%
+ \savefieldformat{postnote}%
+ \DeclareFieldFormat{postnote}{%
+ \iffieldundef{pagination}%
+ {\mknormrange{#1}}%
+ {\mkpageprefix[pagination][\mknormrange]{#1}}%
+ }%
+% \end{macrocode}
+%
+% We flip the word order when specifying the edition.
+%
+% \begin{macrocode}
+ \savefieldformat{edition}%
+ \DeclareFieldFormat{edition}{%
+ \ifinteger{#1}
+ {\bibstring{edition}~\mkbibordedition{#1}}
+ {\ifbibstring{#1}{\bibstring{#1}}{#1\isdot}}}%
+}
+% \end{macrocode}
+%
+% Lastly we add code to undo these changes before switching to another language.
+%
+% \begin{macrocode}
+\UndeclareBibliographyExtras{%
+ \DeclareDelimFormat{revsdnamedelim}{\addcomma}%
+ \restorecommand\makebbx@dateii
+ \restorecommand\mkvolroman
+ \restorecommand\blx@ox@compyear
+ \restorefieldformat{pages}%
+ \restorefieldformat{postnote}%
+ \restorefieldformat{edition}%
+}
+% \end{macrocode}
+%
+% We load the standard set of localization strings, then add our
+% adjustments.
+%
+% \begin{macrocode}
+\DeclareBibliographyStrings{%
+ inherit = {polish},
+% \end{macrocode}
+%
+% These are new strings defined by \pkg[biblatex]{oxref}:
+%
+% \begin{itemize}
+% \item Roles expressed as functions
+% \end{itemize}
+%
+% \begin{macrocode}
+ director = {{re\.{z}yser}{re\.{z}\adddot}},
+ directors = {{re\.{z}yserzy}{re\.{z}\adddot}},
+ performer = {{wykonawca}{wyk\adddot}},
+ performers = {{wykonawcy}{wyk\adddot}},
+ reader = {{czytelnik}{czytelnik}},
+ readers = {{czytelnicy}{czytelnicy}},
+ conductor = {{dyrygent}{dyr\adddot}},
+ conductors = {{dyrygenci}{dyr\adddot}},
+ serieseditor = {{redaktor serii}{red\adddotspace serii}},
+ serieseditors = {{redaktor serii}{red\adddotspace serii}},
+ holder = {{w\l a\'{s}ciciel}{w\l a\'{s}ciciel}},
+ holders = {{w\l a\'{s}ciciele}{w\l a\'{s}ciciele}},
+ editorcm = {{redaktor i~kompilator}{red\adddotspace i~kompilator}},
+ editorcms = {{redaktorzy i~kompilatorzy}{red\adddotspace i~kompilatorzy}},
+% \end{macrocode}
+%
+% \begin{itemize}
+% \item Roles expressed as actions
+% \end{itemize}
+%
+% \begin{macrocode}
+ byperformer = {{wykonawca}{wyk\adddot}},
+ bydirector = {{re\.{z}yseria}{re\.{z}\adddot}},
+ byreader = {{czyta}{czyta}},
+ byconductor = {{kieruje}{kier\adddot}},
+ byserieseditor = {{redakcja}{red\adddot}},
+ byholder = {{w~posiadaniu}{w~posiadaniu}},
+ byeditorcm = {{redakcja i~opracowanie}{red\adddotspace i~oprac\adddot}},
+% \end{macrocode}
+%
+% \begin{itemize}
+% \item Publication details
+% \end{itemize}
+%
+% \begin{macrocode}
+ facsimile = {{wydanie faksymile}{wyd\adddotspace faksymile}},
+ revised = {{wydanie poprawione}{wyd\adddotspace popr\adddot}},
+ revisedenlarged = {{wydanie poprawione i~rozszerzone}{wyd\adddotspace popr\addotspace i~rozszerz\adddot}},
+ revisedreprint = {{przedruk poprawiony}{przedr\adddotspace popr\adddot}},
+ suppto = {{dodatek do}{dod\adddotspace do}},
+ equals = {{=}{=}},
+ original = {{oryginalny}{oryg\adddot}},
+ amendedby = {{zmienione przez}{zmien\adddotspace przez}},
+% \end{macrocode}
+%
+% \begin{itemize}
+% \item Publication state
+% \end{itemize}
+%
+% \begin{macrocode}
+ inpressin = {{z\l o\.{z}one do}{z\l o\.{z}one do}},
+% \end{macrocode}
+%
+% \begin{itemize}
+% \item Pagination
+% \end{itemize}
+%
+% \begin{macrocode}
+ book = {{ksi\k{e}ga}{ks\adddot}},
+ books = {{ksi\k{e}gi}{ks\adddot}},
+ canto = {{pie\'{s}\'{n}}{pie\'{s}\'{n}}},
+ cantos = {{pie\'{s}ni}{pie\'{s}ni}},
+ stanza = {{zwrotka}{zwr\adddot}},
+ stanzas = {{zwrotki}{zwr\adddot}},
+ act = {{akt}{a\adddot}},
+ acts = {{akty}{aa\adddot}},
+ scene = {{scena}{sc\adddot}},
+ scenes = {{sceny}{sc\adddot}},
+ folio = {{karta}{k\adddot}},
+ folios = {{karty}{kk\adddot}},
+ article = {{artyku\l }{art\adddot}},
+ articles = {{artyku\l y}{art\adddot}},
+ clause = {{klauzula}{klauz\adddot}},
+ clauses = {{klauzule}{klauz\adddot}},
+ regulation = {{rozporz\k{a}dzenie}{rozp\adddot}},
+ regulations = {{rozporz\k{a}dzenia}{rozp\adddot}},
+ rule = {{przepis}{przep\adddot}},
+ rules = {{przepisy}{przep\adddot}},
+ booktotal = {{ksi\k{e}ga}{ks\adddot}},
+ booktotals = {{ksi\k{e}gi}{ks\adddot}},
+ cantototal = {{pie\'{s}\'{n}}{pie\'{s}\'{n}}},
+ cantototals = {{pie\'{s}ni}{pie\'{s}ni}},
+ stanzatotal = {{zwrotka}{zwr\adddot}},
+ stanzatotals = {{zwrotki}{zwr\adddot}},
+ acttotal = {{akt}{a\adddot}},
+ acttotals = {{akty}{aa\adddot}},
+ scenetotal = {{scena}{sc\adddot}},
+ scenetotals = {{sceny}{sc\adddot}},
+ foliototal = {{karta}{k\adddot}},
+ foliototals = {{karty}{kk\adddot}},
+ articletotal = {{artyku\l }{art\adddot}},
+ articletotals = {{artyku\l y}{art\adddot}},
+ clausetotal = {{klauzula}{klauz\adddot}},
+ clausetotals = {{klauzule}{klauz\adddot}},
+ regulationtotal = {{rozporz\k{a}dzenie}{rozp\adddot}},
+ regulationtotals = {{rozporz\k{a}dzenia}{rozp\adddot}},
+ ruletotal = {{przepis}{przep\adddot}},
+ ruletotals = {{przepisy}{przep\adddot}},
+% \end{macrocode}
+%
+% \begin{itemize}
+% \item Types
+% \end{itemize}
+%
+% \begin{macrocode}
+ facebook = {{wpis na Facebooku}{wpis na Facebooku}},
+ tweet = {{wpis na Twitterze}{wpis na Twitterze}},
+ podcast = {{podcast}{podcast}},
+ clip = {{wideo}{wideo}},
+ webcast = {{webcast}{webcast}},
+ poster = {{plakat}{plakat}},
+% \end{macrocode}
+%
+% \begin{itemize}
+% \item Miscellaneous
+% \end{itemize}
+%
+% \begin{macrocode}
+ nolocation = {{bez miejsca}{b\adddot m\adddot}},
+ modified = {{ostatnio zmodyfikowany}{ostatnio zmodyf\adddot}},
+ recorded = {{nagrane}{nagr\adddot}},
+ uploaded = {{za\l adowane}{za\l ad\adddot}},
+ filed = {{wniesione}{wniesione}},
+ issued = {{wydany}{wyd\adddot}},
+% \end{macrocode}
+%
+% \begin{itemize}
+% \item Labels
+% \end{itemize}
+%
+% \begin{macrocode}
+ anon = {{Anonim}{Anon\adddot}},
+ pseudo = {{Pseudo-}{Ps\adddot-}},
+ urldown = {{pobrane}{pobrane}},
+% \end{macrocode}
+%
+% \begin{itemize}
+% \item Country names, patents, and patent requests,
+% \end{itemize}
+%
+% \begin{macrocode}
+ countryjp = {{Japonia}{JP}},
+ patentjp = {{japo\'{n}ski patent}{jap\adddotspace pat\adddot}},
+ patreqjp = {{japo\'{n}ski wniosek patentowy}{jap\adddotspace wniosek pat\adddot}},
+% \end{macrocode}
+%
+% \begin{itemize}
+% \item These are borrowed from other styles.
+% \end{itemize}
+%
+% \begin{macrocode}
+ 1column = {{jedna kolumna}{1\addnbspace kol\adddot}},
+ 2column = {{dwie kolumny}{2\addnbspace kol\adddot}},
+ inflayer = {{warstwa ni\.{z}sza}{warstwa ni\.{z}sza}},
+ suplayer = {{warstwa wy\.{z}sza}{warstwa wy\.{z}sza}},
+ paper = {{gazeta}{gazeta}},
+ papyrus = {{papirus}{papirus}},
+ parchment = {{pergamin}{pergamin}},
+ eucase = {{sprawa}{sprawa}},
+ eujoinedcases = {{po\l \k{a}czone sprawy}{po\l \k{a}czone sprawy}},
+ commissiondecision = {{decyzja komisji}{decyzja komisji}},
+ application = {{wniosek}{wniosek}},
+ order = {{polecenie}{polecenie}},
+ bill = {{rachunek}{rachunek}},
+ draft = {{projekt}{proj\adddot}},
+ opened = {{przed\l o\.{z}one do podpisu}{przed\l\adddotspace do podp\adddot}},
+ signed = {{podpisane}{podpisane}},
+ adopted = {{przyj\k{e}te}{przyj\k{e}te}},
+ inforce = {{wesz\l o w~\.{z}ycie}{wesz\l o w~\.{z}ycie}},
+% \end{macrocode}
+%
+% The rest of these strings are overrides for the standard ones.
+%
+% \begin{macrocode}
+ byeditor = {{redakcja}{red\adddot}},
+ bycompiler = {{opracowanie}{oprac\adddot}},
+ byfounder = {{za\l o\.{z}one przez}{za\l o\.{z}\adddotspace przez}},
+ bycontinuator = {{kontynuowane przez}{kont\adddotspace przez}},
+ byredactor = {{redakcja}{red\adddot}},
+ byreviser = {{poprawki}{popr\adddot}},
+ byreviewer = {{recenzja}{rec\adddot}},
+ bycollaborator = {{we wsp\'{o}\l pracy z}{we wsp\'{o}\l pr\adddotspace z}},
+ bytranslator = {{t\l umaczenie}{t\l um\adddot}},
+ bycommentator = {{komentarz}{kom\adddot}},
+ byannotator = {{obja\'{s}nienia}{obja\'{s}n\adddot}},
+ byeditortr = {{redakcja i~t\l umaczenie}%
+ {red\adddotspace i~t\l um\adddot}},
+ byeditorco = {{redakcja i~komentarz}%
+ {red\adddotspace i~kom\adddot}},
+ byeditoran = {{redakcja i~obja\'{s}nienia}%
+ {red\adddotspace i~obja\'{s}n\adddot}},
+ byeditorin = {{redakcja i~wst\k{e}p}%
+ {red\adddotspace i~wst\k{e}p}},
+ byeditorfo = {{redakcja i~przedmowa}%
+ {red\adddotspace i~przedm\adddot}},
+ byeditoraf = {{redakcja i~pos\l owie}%
+ {red\adddotspace i~pos\l \adddot}},
+ byeditortrco = {{redakcja, t\l umaczenie i~komentarz}%
+ {red.,\addabbrvspace t\l um.,\addabbrvspace kom\adddot}},
+ byeditortran = {{redakcja, t\l umaczenie i~obja\'{s}nienia}%
+ {red.,\addabbrvspace t\l um.,\addabbrvspace obja\'{s}n\adddot}},
+ byeditortrin = {{redakcja, t\l umaczenie, wst\k{e}p}%
+ {red.,\addabbrvspace t\l um.,\addabbrvspace wst\k{e}p}},
+ byeditortrfo = {{redakcja, t\l umaczenie, przedmowa}%
+ {red.,\addabbrvspace t\l um.,\addabbrvspace przedm\adddot}},
+ byeditortraf = {{redakcja, t\l umaczenie, pos\l \adddot}%
+ {red.,\addabbrvspace t\l um.,\addabbrvspace pos\l \adddot}},
+ byeditorcoin = {{redakcja, komentarz, wst\k{e}p}%
+ {red.,\addabbrvspace kom.,\addabbrvspace wst\k{e}p}},
+ byeditorcofo = {{redakcja, komentarz i~przedmowa}%
+ {red.,\addabbrvspace kom.,\addabbrvspace przedm\adddot}},
+ byeditorcoaf = {{redakcja, komentarz, pos\l owie}%
+ {red.,\addabbrvspace kom.,\addabbrvspace pos\l \adddot}},
+ byeditoranin = {{redakcja, obja\'{s}nienia, wst\k{e}p}%
+ {red.,\addabbrvspace obja\'{s}n.,\addabbrvspace wst\k{e}p}},
+ byeditoranfo = {{redakcja, obja\'{s}nienia, przedmowa}%
+ {red.,\addabbrvspace obja\'{s}n.,\addabbrvspace przedm\adddot}},
+ byeditoranaf = {{redakcja, obja\'{s}nienia, pos\l owie}%
+ {red.,\addabbrvspace obja\'{s}n.,\addabbrvspace pos\l \adddot}},
+ byeditortrcoin = {{redakcja, t\l umaczenie, komentarz, wst\k{e}p}%
+ {red.,\addabbrvspace t\l um.,\addabbrvspace kom.,\addabbrvspace wst\k{e}p}},
+ byeditortrcofo = {{redakcja, t\l umaczenie, komentarz, przedmowa}%
+ {red.,\addabbrvspace t\l um.,\addabbrvspace kom.,\addabbrvspace przedm\adddot}},
+ byeditortrcoaf = {{redakcja, t\l umaczenie, komentarz, pos\l owie}%
+ {red.,\addabbrvspace t\l um.,\addabbrvspace kom.,\addabbrvspace pos\l \adddot}},
+ byeditortranin = {{redakcja, t\l umaczenie, obja\'{s}nienia, wst\k{e}p}%
+ {red.,\addabbrvspace t\l um.,\addabbrvspace obja\'{s}n.,\addabbrvspace wst\k{e}p}},
+ byeditortranfo = {{redakcja, t\l umaczenie, obja\'{s}nienia, przedmowa}%
+ {red.,\addabbrvspace t\l um.,\addabbrvspace obja\'{s}n.,\addabbrvspace przedm\adddot}},
+ byeditortranaf = {{redakcja, t\l umaczenie, obja\'{s}nienia, pos\l owie}%
+ {red.,\addabbrvspace t\l um.,\addabbrvspace obja\'{s}n.,\addabbrvspace pos\l \adddot}},
+ bytranslatorco = {{t\l umaczenie i~komentarz}%
+ {t\l um\adddotspace i~kom\adddot}},
+ bytranslatoran = {{t\l umaczenie i~obja\'{s}nienia}%
+ {t\l um\adddotspace i~obja\'{s}n\adddot}},
+ bytranslatorin = {{t\l umaczenie i~wst\k{e}p}%
+ {t\l um.,\addabbrvspace wst\k{e}p}},
+ bytranslatorfo = {{t\l umaczenie i~przedmowa}%
+ {t\l um.,\addabbrvspace przedm\adddot}},
+ bytranslatoraf = {{t\l umaczenie i~pos\l owie}%
+ {t\l um.,\addabbrvspace pos\l \adddot}},
+ bytranslatorcoin = {{t\l umaczenie, komentarz i~wst\k{e}p}%
+ {t\l um.,\addabbrvspace kom.,\addabbrvspace wst\k{e}p}},
+ bytranslatorcofo = {{t\l umaczenie, komentarz i~przedmowa}%
+ {t\l um.,\addabbrvspace kom.,\addabbrvspace przedm\adddot}},
+ bytranslatorcoaf = {{t\l umaczenie, komentarz i~pos\l owie}%
+ {t\l um.,\addabbrvspace kom.,\addabbrvspace pos\l \adddot}},
+ bytranslatoranin = {{t\l umaczenie, obja\'{s}nienia i~wst\k{e}p}%
+ {t\l um.,\addabbrvspace obja\'{s}n.,\addabbrvspace wst\k{e}p}},
+ bytranslatoranfo = {{t\l umaczenie, obja\'{s}nienia i~przedmowa}%
+ {t\l um.,\addabbrvspace obja\'{s}n.,\addabbrvspace przedm\adddot}},
+ bytranslatoranaf = {{t\l umaczenie, obja\'{s}nienia i~pos\l owie}%
+ {t\l um.,\addabbrvspace obja\'{s}n.,\addabbrvspace pos\l \adddot}},
+% \end{macrocode}
+%
+% The roles expressed as objects and terms for supplementary material
+% are not abbreviated.
+%
+% \begin{macrocode}
+ withcommentator = {{komentarz}{komentarz}},
+ withannotator = {{obja\'{s}nienia}{obja\'{s}nienia}},
+ withintroduction = {{wst\k{e}p}{wst\k{e}p}},
+ withforeword = {{przedmowa}{przedmowa}},
+ withafterword = {{pos\l owie}{pos\l owie}},
+ introduction = {{wst\k{e}p}{wst\k{e}p}},
+% \end{macrocode}
+%
+% The translations and abbreviations for some publication details are different.
+%
+% \begin{macrocode}
+ newseries = {{nowa seria}{nowa seria}},
+ oldseries = {{dawna seria}{dawna seria}},
+ edition = {{wydanie}{wyd\adddot}},
+ reviewof = {{recenzja}{rec\adddot}},
+ reprintfrom = {{przedruk z}{przedr\adddotspace z}},
+ translationas = {{t\l umaczenie polskie}{t\l um\adddotspace pol\adddotspace}},
+ origpubin = {{pierwodruk w}{pierwodr\adddotspace w}},
+% \end{macrocode}
+%
+% We use a different translation for \enquote{paragraph}.
+%
+% \begin{macrocode}
+ paragraph = {{ust\k{e}p}{ust\adddot}},
+ paragraphs = {{ust\k{e}py}{ust\adddot}},
+% \end{macrocode}
+%
+% \emph{New Hart's Rules} uses \enquote{accessed} for URL dates.
+%
+% \begin{macrocode}
+ urlseen = {{dost\k{e}p}{dost\k{e}p}},
+% \end{macrocode}
+%
+% Scholarly citation terms are abbreviated. Oxford style is to use \enquote{henceforth}
+% for shorthands and \enquote{at} to cite a page within a range.
+%
+% \begin{macrocode}
+ idem = {{idem}{id\adddot}},
+ idemsm = {{idem}{id\adddot}},
+ idemsf = {{eadem}{ead\adddot}},
+ idemsn = {{idem}{id\adddot}},
+ idempm = {{eidem}{eid\adddot}},
+ idempf = {{eaedem}{eaed\adddot}},
+ idempn = {{eadem}{ead\adddot}},
+ idempp = {{eidem}{eid\adddot}},
+ citedas = {{dalej}{dalej}},
+ thiscite = {{na}{na}},
+% \end{macrocode}
+%
+% Languages are abbreviated.
+%
+% \begin{macrocode}
+ langamerican = {{ameryka\'{n}ski angielski}{amer\adddotspace ang\adddot}},
+ langbasque = {{baskijski}{bask\adddot}},
+ langbrazilian = {{brazylijski portugalski}{braz\adddot port\adddot}},
+ langbulgarian = {{bu\l garski}{bu\l g\adddot}},
+ langcatalan = {{katalo\'{n}ski}{katal\adddot}},
+ langcroatian = {{chorwacki}{chorw\adddot}},
+ langczech = {{czeski}{czeski}},
+ langdanish = {{du\'{n}ski}{du\'{n}\adddot}},
+ langdutch = {{holenderski}{holend\adddot}},
+ langenglish = {{angielski}{ang\adddot}},
+ langestonian = {{esto\'{n}ski}{est\adddot}},
+ langfinnish = {{fi\'{n}ski}{fi\'{n}\adddot}},
+ langfrench = {{francuski}{fr\adddot}},
+ langgalician = {{galicyjski}{galic\adddot}},
+ langgerman = {{niemiecki}{niem\adddot}},
+ langgreek = {{grecki}{gr\adddot}},
+ langhungarian = {{w\k{e}gierski}{w\k{e}g\adddot}},
+ langitalian = {{w\l oski}{w\l \adddot}},
+ langjapanese = {{japo\'{n}ski}{jap\adddot}},
+ langlatin = {{\l aci\'{n}ski}{\l ac\adddot}},
+ langlatvian = {{\l otewski}{\l ot\adddot}},
+ langlithuanian = {{litewski}{lit\adddot}},
+ langmarathi = {{marathi}{mar\adddot}},
+ langnorwegian = {{norweski}{norw\adddot}},
+ langpolish = {{polski}{pol\adddot}},
+ langportuguese = {{portugalski}{port\adddot}},
+ langromanian = {{rumu\'{n}ski}{rum\adddot}},
+ langrussian = {{rosyjski}{ros\adddot}},
+ langserbian = {{serbski}{serb\adddot}},
+ langslovak = {{s\l owacki}{s\l c\adddot}},
+ langslovene = {{s\l owe\'{n}ski}{s\l owe\'{n}\adddot}},
+ langspanish = {{hiszpa\'{n}ski}{hiszp\adddot}},
+ langswedish = {{szwedzki}{szw\adddot}},
+ langturkish = {{turecki}{tur\adddot}},
+ langukrainian = {{ukrai\'{n}ski}{ukr\adddot}},
+}
+% \end{macrocode}
+%
+% \iffalse %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%</pl>
% \fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \section{Other languages}
%
-% Currently \pkg[biblatex]{oxref} only supports English (British and American)
-% and Spanish explicitly, but if there is demand more languages may be added. If
-% you would like to contribute support for your language, a list of the
-% non-standard bibliography strings requiring definition may be found in
-% section~\ref{sec:setup}.
+% Currently \pkg[biblatex]{oxref} only supports English (British and American),
+% Spanish, and Polish explicitly,
+% but if there is demand more languages may be added. If you would like to
+% contribute support for your language, a list of the non-standard bibliography
+% strings requiring definition may be found in section~\ref{sec:setup}.
%
% \iffalse %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%</lbx>
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-oxref/oxref.pdf b/macros/latex/contrib/biblatex-contrib/biblatex-oxref/oxref.pdf
index 08147694cc..5834fb1590 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-oxref/oxref.pdf
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-oxref/oxref.pdf
Binary files differ
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-oxref/oxyear-doc.pdf b/macros/latex/contrib/biblatex-contrib/biblatex-oxref/oxyear-doc.pdf
index 89a6515237..61c1abb84e 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-oxref/oxyear-doc.pdf
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-oxref/oxyear-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/bmstu-iu8/README.md b/macros/latex/contrib/bmstu-iu8/README.md
index 485014041c..f5a699970b 100644
--- a/macros/latex/contrib/bmstu-iu8/README.md
+++ b/macros/latex/contrib/bmstu-iu8/README.md
@@ -1,6 +1,6 @@
# IU8 package
-Version: v1.3 (released 17.08.2024).
+Version: v1.4 (released 2024/09/09).
This package consist of class file and style files for writing
reports at the IU8 department of IU faculty of BMSTU
diff --git a/macros/latex/contrib/bmstu-iu8/bmstu-example.pdf b/macros/latex/contrib/bmstu-iu8/bmstu-example.pdf
index b0d4cc2ea7..b13b2d86c8 100644
--- a/macros/latex/contrib/bmstu-iu8/bmstu-example.pdf
+++ b/macros/latex/contrib/bmstu-iu8/bmstu-example.pdf
Binary files differ
diff --git a/macros/latex/contrib/bmstu-iu8/bmstu-iu8/BMSTU-IU8.cls b/macros/latex/contrib/bmstu-iu8/bmstu-iu8/BMSTU-IU8.cls
index 17c168f9f2..ebd30e1991 100644
--- a/macros/latex/contrib/bmstu-iu8/bmstu-iu8/BMSTU-IU8.cls
+++ b/macros/latex/contrib/bmstu-iu8/bmstu-iu8/BMSTU-IU8.cls
@@ -1,6 +1,6 @@
% Author: CatInCosmicSpace
\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{BMSTU-IU8}[2024/08/17 IU8 class]
+\ProvidesClass{BMSTU-IU8}[2024/09/09 IU8 class]
\LoadClass{article}
diff --git a/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-01-base.sty b/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-01-base.sty
index c51f336b7c..11533ec0e7 100644
--- a/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-01-base.sty
+++ b/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-01-base.sty
@@ -1,6 +1,6 @@
% Author: CatInCosmicSpace
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{IU8-01-base}[2024/08/17 v1.3 Общие требования]
+\ProvidesPackage{IU8-01-base}[2024/09/09 v1.4 Общие требования]
% 6.1.1 Изложение текста и оформление отчета выполняют в соответствии с
% требованиями настоящего стандарта. Страницы текста отчета о НИР и включенные в
diff --git a/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-02-construction.sty b/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-02-construction.sty
index 0c684a5700..3825090729 100644
--- a/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-02-construction.sty
+++ b/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-02-construction.sty
@@ -1,6 +1,6 @@
% Author: CatInCosmicSpace
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{IU8-02-construction}[2024/08/17 v1.3 Построение отчета]
+\ProvidesPackage{IU8-02-construction}[2024/09/09 v1.4 Построение отчета]
% 6.2.1 Наименования структурных элементов отчета:
% "СПИСОК ИСПОЛНИТЕЛЕЙ", % у нас не используется
@@ -25,10 +25,11 @@
\renewcommand{\thestructure}{} % Убрать появление счётчика в содержании
\titleclass{\structure}{straight}[\section]
\titleformat{\structure}[hang]{\clearpage\normalfont\bfseries\centering}{}{0em}{}
-\titlespacing*{\structure}{0pt}{0pt}{2\baselineskip}
+\titlespacing*{\structure}{0pt}{0pt}{1em}
\titlecontents{structure}{}{}{}{}
\renewcommand*\l@structure{\@dottedtocline{0}{0mm}{0em}}
+
\newcommand{\structurebreak}{\clearpage}
\newcommand{\sectionbreak}{\clearpage}
@@ -54,6 +55,14 @@
\titlespacing*{\paragraph}{0pt}{2ex}{2ex}[2ex]
\titlespacing*{\subparagraph}{0pt}{2ex}{2ex}[2ex]
+\makeatletter
+\renewcommand*\l@section{\@dottedtocline{0}{12.5mm}{2em}}
+\renewcommand*\l@structure{\@dottedtocline{0}{12.5mm}{0em}}
+\renewcommand*\l@subsection{\@dottedtocline{1}{12.5mm}{3em}}
+\renewcommand*\l@subsubsection{\@dottedtocline{2}{12.5mm}{4em}}
+\renewcommand*\l@paragraph{\@dottedtocline{3}{12.5mm}{5em}}
+\makeatother
+
% 6.2.4 Если заголовок включает несколько предложений, их разделяют точками.
% Переносы слов в заголовках не допускаются.
diff --git a/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-03-numbering.sty b/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-03-numbering.sty
index 3d0bb94e9f..7e0ed595e1 100644
--- a/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-03-numbering.sty
+++ b/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-03-numbering.sty
@@ -1,6 +1,6 @@
% Author: CatInCosmicSpace
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{IU8-03-numbering}[2024/08/17 v1.3 Нумерация страниц отчета]
+\ProvidesPackage{IU8-03-numbering}[2024/09/09 v1.4 Нумерация страниц отчета]
% 6.3.1 Страницы отчета следует нумеровать арабскими цифрами, соблюдая сквозную
% нумерацию по всему тексту отчета, включая приложения. Номер страницы
diff --git a/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-04-section-numbering.sty b/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-04-section-numbering.sty
index af812f5855..ec865d745b 100644
--- a/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-04-section-numbering.sty
+++ b/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-04-section-numbering.sty
@@ -1,6 +1,6 @@
% Author: CatInCosmicSpace
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{IU8-04-section-numbering}[2024/08/17 v1.3 Нумерация разделов, подразделов, пунктов, подпунктов и книг отчета]
+\ProvidesPackage{IU8-04-section-numbering}[2024/09/09 v1.4 Нумерация разделов, подразделов, пунктов, подпунктов и книг отчета]
% 6.4.1 Разделы должны иметь порядковые номера в пределах всего отчета,
% обозначенные арабскими цифрами без точки и расположенные с абзацного отступа.
diff --git a/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-05-figures.sty b/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-05-figures.sty
index 4ccda32cda..f8536ffed1 100644
--- a/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-05-figures.sty
+++ b/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-05-figures.sty
@@ -1,6 +1,6 @@
% Author: CatInCosmicSpace
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{IU8-05-figures}[2024/08/17 v1.3 Иллюстрации]
+\ProvidesPackage{IU8-05-figures}[2024/09/09 v1.4 Иллюстрации]
% 6.5.1 Иллюстрации (чертежи, графики, схемы, компьютерные распечатки, диаграммы,
% фотоснимки) следует располагать в отчете непосредственно после текста отчета,
diff --git a/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-06-tables.sty b/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-06-tables.sty
index 705924bd99..52e8358a39 100644
--- a/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-06-tables.sty
+++ b/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-06-tables.sty
@@ -1,6 +1,6 @@
% Author: CatInCosmicSpace
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{IU8-06-tables}[2024/08/17 v1.3 Таблицы]
+\ProvidesPackage{IU8-06-tables}[2024/09/09 v1.4 Таблицы]
% Пакеты, которые скорее всего пригодятся
\RequirePackage{tabularx}
diff --git a/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-07-footnotes.sty b/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-07-footnotes.sty
index 9efd173fb0..2dd2f6e42b 100644
--- a/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-07-footnotes.sty
+++ b/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-07-footnotes.sty
@@ -1,6 +1,6 @@
% Author: CatInCosmicSpace
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{IU8-07-footnotes}[2024/08/17 v1.3 Примечания и сноски]
+\ProvidesPackage{IU8-07-footnotes}[2024/09/09 v1.4 Примечания и сноски]
% 6.7.1 Примечания приводят в отчете, если необходимы пояснения или справочные
% данные к содержанию текста, таблиц или графического материала.
diff --git a/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-08-formulas.sty b/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-08-formulas.sty
index cfe0b98dbd..8e4c8ef43a 100644
--- a/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-08-formulas.sty
+++ b/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-08-formulas.sty
@@ -1,5 +1,5 @@
% Author: CatInCosmicSpace
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{IU8-08-formulas}[2024/08/17 v1.3 Формулы]
+\ProvidesPackage{IU8-08-formulas}[2024/09/09 v1.4 Формулы]
% Настройки по умолчанию в целом соответствуют ГОСТ \ No newline at end of file
diff --git a/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-09-cites.sty b/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-09-cites.sty
index 6d070074b3..fb5d4f13cd 100644
--- a/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-09-cites.sty
+++ b/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-09-cites.sty
@@ -1,6 +1,6 @@
% Author: CatInCosmicSpace
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{IU8-09-cites}[2024/08/17 v1.3 Ссылки]
+\ProvidesPackage{IU8-09-cites}[2024/09/09 v1.4 Ссылки]
% 6.9.1 В отчете о НИР рекомендуется приводить ссылки на использованные
% источники. При нумерации ссылок на документы, использованные при составлении
diff --git a/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-10-titlepage.sty b/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-10-titlepage.sty
index 97fc11ecc5..fb5e8c949f 100644
--- a/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-10-titlepage.sty
+++ b/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-10-titlepage.sty
@@ -1,6 +1,6 @@
% Author: CatInCosmicSpace
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{IU8-10-titlepage}[2024/08/17 v1.3 Титульный лист]
+\ProvidesPackage{IU8-10-titlepage}[2024/09/09 v1.4 Титульный лист]
% Поля для заполнения для ВКР
\def\student#1{\gdef\@student{#1}}
diff --git a/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-11-performers.sty b/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-11-performers.sty
index e628023df4..20ba0e0c48 100644
--- a/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-11-performers.sty
+++ b/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-11-performers.sty
@@ -1,5 +1,5 @@
% Author: CatInCosmicSpace
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{IU8-11-performers}[2024/08/17 v1.3 Список исполниетелей]
+\ProvidesPackage{IU8-11-performers}[2024/09/09 v1.4 Список исполниетелей]
% Т.к. у нас это не используется, я оставляю это пустымы \ No newline at end of file
diff --git a/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-12-abstract.sty b/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-12-abstract.sty
index c1e1a6dc86..1c389e08f4 100644
--- a/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-12-abstract.sty
+++ b/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-12-abstract.sty
@@ -1,6 +1,6 @@
% Author: CatInCosmicSpace
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{IU8-12-abstract}[2024/08/17 v1.3 Реферат]
+\ProvidesPackage{IU8-12-abstract}[2024/09/09 v1.4 Реферат]
% 6.12.1 Сведения об общем объеме отчета, количестве книг отчета, иллюстраций,
% таблиц, использованных источников, приложений являются первой компонентой
diff --git a/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-13-contents.sty b/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-13-contents.sty
index 3bd4e67716..c19a7b41b1 100644
--- a/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-13-contents.sty
+++ b/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-13-contents.sty
@@ -1,6 +1,6 @@
% Author: CatInCosmicSpace
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{IU8-13-contents}[2024/08/17 v1.3 Содержание]
+\ProvidesPackage{IU8-13-contents}[2024/09/09 v1.4 Содержание]
% Каждую запись содержания оформляют как отдельный абзац, выровненный влево.
% Номера страниц указывают выровненными по правому краю поля и соединяют
@@ -17,13 +17,16 @@
% ГОСТ 7.32-2017. Пункт 5.4.1:
% Обозначения подразделов приводят после абзацного отступа,
% равного двум знакам, относительно обозначения разделов.
-\renewcommand*\l@subsection{\@dottedtocline{1}{5mm}{3em}}
+\renewcommand*\l@section{\@dottedtocline{1}{5mm}{3em}}
+\renewcommand*\l@subsection{\@dottedtocline{1}{10mm}{3em}}
% ГОСТ 7.32-2017. Пункт 5.4.1:
% Обозначения пунктов приводят после абзацного отступа,
% равного четырем знакам, относительно обозначения разделов.
-\renewcommand*\l@subsubsection{\@dottedtocline{2}{10mm}{4em}}
+\renewcommand*\l@subsubsection{\@dottedtocline{2}{15mm}{4em}}
% Остальное - индуктивно
\renewcommand*\l@paragraph{\@dottedtocline{3}{15mm}{5em}}
+
\setcounter{secnumdepth}{5} % Глубина заголовков - до пятого уровня
\setcounter{tocdepth}{2} % Глубина содержания - до второго уровня
+
diff --git a/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-14-terms-and-definitions.sty b/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-14-terms-and-definitions.sty
index 8378ff2826..544d077a73 100644
--- a/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-14-terms-and-definitions.sty
+++ b/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-14-terms-and-definitions.sty
@@ -1,6 +1,6 @@
% Author: CatInCosmicSpace
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{IU8-14-terms-and-definitions}[2024/08/17 v1.3 Содержание]
+\ProvidesPackage{IU8-14-terms-and-definitions}[2024/09/09 v1.4 Содержание]
\RequirePackage[
acronym,
diff --git a/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-15-list-of-abbreviations.sty b/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-15-list-of-abbreviations.sty
index 49a5aeb8aa..ff904e74ee 100644
--- a/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-15-list-of-abbreviations.sty
+++ b/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-15-list-of-abbreviations.sty
@@ -1,6 +1,6 @@
% Author: CatInCosmicSpace
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{IU8-15-list-of-abbreviations}[2024/08/17 v1.3 Содержание]
+\ProvidesPackage{IU8-15-list-of-abbreviations}[2024/09/09 v1.4 Содержание]
\RequirePackage[abbreviations]{glossaries-extra}
diff --git a/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-16-references.sty b/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-16-references.sty
index 7e7fd9d347..6236003c9b 100644
--- a/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-16-references.sty
+++ b/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-16-references.sty
@@ -1,6 +1,6 @@
% Author: CatInCosmicSpace
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{IU8-16-references}[2024/08/17 v1.3 Список использованных источников]
+\ProvidesPackage{IU8-16-references}[2024/09/09 v1.4 Список использованных источников]
% Сведения об источниках следует располагать в порядке появления ссылок на
% источники в тексте отчета и нумеровать арабскими цифрами с точкой и печатать
@@ -12,10 +12,28 @@
% refsection=structure,
% sorting=ynt,
]{biblatex}
+
+\defbibenvironment{bibliography}
+ {\list
+ {}
+ {\setlength{\leftmargin}{1.25cm}
+ \setlength{\itemindent}{0em}
+ \setlength{\itemsep}{\bibitemsep}
+ \setlength{\parsep}{\bibparsep}}}
+ {\endlist}
+ {\item\printtext[labelnumberwidth]{\printfield{labelprefix}\printfield{labelnumber}}\addspace}
+
\defbibheading{bibliography}[СПИСОК~ИСПОЛЬЗОВАННЫХ~ИСТОЧНИКОВ]{\structure{#1}}
\addto{\captionsrussian}{%
\renewcommand{\contentsname}{СОДЕРЖАНИЕ}
}
+\DefineBibliographyStrings{russian}{%
+ urlseen = {дата обращения},
+}
+
% Специально изменим шрифт для URL, чтобы он соответсвовал ГОСТ и остальному тексту документа
\renewcommand{\UrlFont}{\normalfont}
+
+% Изменяем шрифт для авторов в списке литературы на обычный
+\renewcommand{\mkgostheading}[1]{\normalfont{#1}} \ No newline at end of file
diff --git a/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-17-appendices.sty b/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-17-appendices.sty
index e89c637ec6..9881ec6498 100644
--- a/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-17-appendices.sty
+++ b/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-17-appendices.sty
@@ -1,6 +1,6 @@
% Author: CatInCosmicSpace
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{IU8-17-appendices}[2024/08/17 v1.3 Приложения]
+\ProvidesPackage{IU8-17-appendices}[2024/09/09 v1.4 Приложения]
\newcommand{\appendixsection}[1]{
\stepcounter{apps}
diff --git a/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-18-extra.sty b/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-18-extra.sty
index 44e932a3e9..9999fd77df 100644
--- a/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-18-extra.sty
+++ b/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-18-extra.sty
@@ -1,6 +1,6 @@
% Author: CatInCosmicSpace
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{IU8-18-extra}[2024/08/17 v1.3 Разные улучшения]
+\ProvidesPackage{IU8-18-extra}[2024/09/09 v1.4 Разные улучшения]
\RequirePackage{graphicx}
@@ -23,3 +23,18 @@
} % Кликабельные ссылки в pdf
\hbadness=10000
+
+\setlist[enumerate]{
+ leftmargin=\parindent,
+ labelindent=\parindent,
+ align=left,
+ nosep,
+}
+
+\setlist[itemize]{
+ label=\textendash,
+ leftmargin=\parindent,
+ labelindent=\parindent,
+ align=left,
+ nosep,
+}
diff --git a/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-19-counters.sty b/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-19-counters.sty
index c5e7d80136..b0c49532dc 100644
--- a/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-19-counters.sty
+++ b/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-19-counters.sty
@@ -1,6 +1,6 @@
% Author: CatInCosmicSpace
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
-\ProvidesPackage{IU8-19-counters}[2024/08/17 v1.3 Счётчики]
+\ProvidesPackage{IU8-19-counters}[2024/09/09 v1.4 Счётчики]
\RequirePackage{calc}
\RequirePackage{xassoccnt}
diff --git a/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-20-listing.sty b/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-20-listing.sty
index 22dd68b97b..85b7f9e2fa 100644
--- a/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-20-listing.sty
+++ b/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-20-listing.sty
@@ -1,6 +1,6 @@
% Author: CatInCosmicSpace
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
-\ProvidesPackage{IU8-20-listing}[2024/08/17 v1.3 Листинги]
+\ProvidesPackage{IU8-20-listing}[2024/09/09 v1.4 Листинги]
\RequirePackage{listings}
\RequirePackage{xcolor}
@@ -10,7 +10,7 @@
\lstdefinestyle{IU8}{
frame=single,
- backgroundcolor=\color{seashell},
+ % backgroundcolor=\color{seashell},
commentstyle=\color{blue},
keywordstyle=\color{magenta},
basicstyle=\ttfamily\footnotesize,
@@ -36,3 +36,25 @@
\newcommand{\listing}[2][]{%
\lstinputlisting[caption={\texttt{\detokenize{#2}}},#1]{#2}%
}
+
+\lstnewenvironment{codelisting}[1][]
+{
+\lstset{
+ frame=single,
+ % backgroundcolor=\color{seashell},
+ commentstyle=\color{blue},
+ keywordstyle=\color{magenta},
+ basicstyle=\ttfamily\footnotesize,
+ breakatwhitespace=false,
+ breaklines=true,
+ captionpos=tl,
+ keepspaces=false,
+ showspaces=false,
+ showstringspaces=false,
+ showtabs=false,
+ extendedchars=\true,
+ tabsize=2,
+ #1
+}
+}
+{} \ No newline at end of file
diff --git a/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-21-math.sty b/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-21-math.sty
index b72be1370c..bda74f008c 100644
--- a/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-21-math.sty
+++ b/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-21-math.sty
@@ -1,6 +1,6 @@
% Author: CatInCosmicSpace
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
-\ProvidesPackage{IU8-21-math}[2024/08/17 v1.3 Математика]
+\ProvidesPackage{IU8-21-math}[2024/09/09 v1.4 Математика]
\RequirePackage{amsthm}
\theoremstyle{definition}
diff --git a/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-22-algorithms.sty b/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-22-algorithms.sty
index 5cf8831462..7232bccaaa 100644
--- a/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-22-algorithms.sty
+++ b/macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-22-algorithms.sty
@@ -1,6 +1,6 @@
% Author: CatInCosmicSpace
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
-\ProvidesPackage{IU8-22-algorithms}[2024/08/17 v1.3 Алгоритмы]
+\ProvidesPackage{IU8-22-algorithms}[2024/09/09 v1.4 Алгоритмы]
\RequirePackage[linesnumbered,boxruled]{algorithm2e}
\SetAlCapSty{}
diff --git a/macros/latex/contrib/changelog/README.md b/macros/latex/contrib/changelog/README.md
index ab16196d1e..6b7d251083 100644
--- a/macros/latex/contrib/changelog/README.md
+++ b/macros/latex/contrib/changelog/README.md
@@ -2,12 +2,21 @@
[Available on CTAN as `changelog`][changelog]
-Changelogs are important. Unfortunately, there are few facilities
-for typesetting changelogs in LaTeX. `changelog` defines a `changelog`
+Changelogs are important. The `changelog` package defines a `changelog`
environment to make changelogs simple and intuitive.
Inspired by [keepachangelog.com].
+```latex
+\begin{changelog}[author=Rebecca Turner, simple, sectioncmd=\section*]
+\begin{version}[v=1.0.0, date=2018-12-28]
+ \item Cool features
+ \item Bug fixes
+\end{version}
+\shortversion{v=0.1.0, date=2018-10-25, changes=Initial beta}
+\end{changelog}
+```
+
File | Description
-----------------------------|-------------------------------
changelog.sty | The changelog package
diff --git a/macros/latex/contrib/changelog/changelog.pdf b/macros/latex/contrib/changelog/changelog.pdf
index c80cec01db..f0e2277664 100644
--- a/macros/latex/contrib/changelog/changelog.pdf
+++ b/macros/latex/contrib/changelog/changelog.pdf
Binary files differ
diff --git a/macros/latex/contrib/changelog/changelog.sty b/macros/latex/contrib/changelog/changelog.sty
index 4c95edd805..b58e33479a 100644
--- a/macros/latex/contrib/changelog/changelog.sty
+++ b/macros/latex/contrib/changelog/changelog.sty
@@ -1,5 +1,5 @@
\RequirePackage{expl3}
-\ProvidesExplPackage{changelog}{2023/02/16}{2.5.0}{Typesetting changelogs}
+\ProvidesExplPackage{changelog}{2024/09/17}{2.5.1}{Typesetting changelogs}
% Description: Provides the changelog environment for typesetting changelogs
% License: LPPL 1.3c
% Homepage: https://github.com/9999years/latex-changelog
@@ -210,24 +210,28 @@
{}
}
-\cs_set:Npn \changelog__short_version_define_date
+% Display the current version, which may be a version number, a date, or "Unreleased".
+\cs_set:Npn \changelog__display_version
{
- \tl_if_empty:NT \g__changelog_version_tl
+ \tl_if_empty:NTF \g__changelog_version_tl
{
\tl_if_empty:NTF \g__changelog_date_tl
{
- \tl_set:Nn \g__changelog_version_tl { \GetTranslation{changelog-Unreleased} }
+ \GetTranslation{changelog-Unreleased}
\tl_set:Nn \g__changelog_date_tl { \today }
}
{
- \tl_set_eq:NN \g__changelog_version_tl \g__changelog_date_tl
+ \tl_use:N \g__changelog_date_tl
}
}
+ {
+ \tl_use:N \g__changelog_version_tl
+ }
}
\cs_set:Npn \changelog__short_version_item
{
- \tl_use:N \g__changelog_version_tl
+ \changelog__display_version
\bool_if:NT \g__changelog_yanked_bool
{
\ \changelogyanked
@@ -247,12 +251,21 @@
\cs_set:Npn \changelog__short_version_author_date
{
+ % This might output nothing if there's no author and the date is being used
+ % as a version number, so make sure to `\leavevmode` to avoid a weird
+ % indent at the start of the item.
+ \mode_leave_vertical:
\tl_use:N \g__changelog_author_tl
\tl_if_empty:NF \g__changelog_date_tl
{
- \tl_if_empty:NF \g__changelog_author_tl
- { ~ }
- (\tl_use:N \g__changelog_date_tl)
+ % If no version number is given, the date is used instead, so we don't
+ % want to show the date twice.
+ \tl_if_empty:NF \g__changelog_version_tl
+ {
+ \tl_if_empty:NF \g__changelog_author_tl
+ { ~ }
+ (\tl_use:N \g__changelog_date_tl)
+ }
}
}
@@ -308,7 +321,6 @@
% environment
\cs_set:Npn \changelog__short_version
{
- \changelog__short_version_define_date
\bool_gset_true:N \g__changelog_seen_version_bool
\item[\changelog__short_version_item]
diff --git a/macros/latex/contrib/changelog/changelog.tex b/macros/latex/contrib/changelog/changelog.tex
index f4d0706350..9c949501fc 100644
--- a/macros/latex/contrib/changelog/changelog.tex
+++ b/macros/latex/contrib/changelog/changelog.tex
@@ -30,14 +30,13 @@
\author{Rebecca Turner\thanks{\email{rbt@sent.as}}}
\title{The \cl\ Package}
-\date{2.5.0 (2023/02/16)}
+\date{2.5.1 (2024/09/17)}
\begin{document}
\maketitle
\begin{abstract}
- Changelogs are important. Unfortunately, there are few facilities
- for typesetting changelogs in \LaTeX. \cl\ defines a |changelog|
- environment to make changelogs simple and intuitive.
+ Changelogs are important. \cl\ defines a |changelog|
+ environment to make writing changelogs declarative and easy.
For rationale, read \keepachangelog.
\end{abstract}
@@ -346,15 +345,27 @@ an email} and I'll incorporate the translation into \cl's next release!
This is this package's actual changelog --- not an example!
\begin{changelog}[author=Rebecca Turner <\email{rbt@sent.as}>, section=false]
+\begin{version}[v=2.5.1, date=2024-09-17]
+\fixed
+ \item Fixed \href{https://github.com/9999years/latex-changelog/issues/13}{a
+ bug where a version with a date and no version number would display the
+ date twice}, like ``\textbf{2024-09-17} (2024-09-17)''. Now, the date will
+ correctly only be shown once.
+
+ \item Fixed a bug where a version with a version number but no date or author
+ would be indented.
+\end{version}
+
\begin{version}[v=2.5.0, date=2023-02-16]
\added
- \item Added the \cs{newchangelogsection} command to support custom
- sections.
+ \item Added the \cs{newchangelogsection} command to support custom
+ sections.
\item Added the |remark| and |remarks| keys to support custom remarks (like
``YANKED'') on versions.
\item Added the |\changelogremark| command, which renders the ``YANKED''
remark and other custom remarks.
\end{version}
+
\begin{version}[v=2.4.1, date=2023-02-14]
\changed
\item Converted the |changelog.sty| implementation to use the \ctan{expl3}
@@ -362,6 +373,7 @@ This is this package's actual changelog --- not an example!
environment. I believe \ctan{expl3} is the future of programming in
\LaTeX, despite its verbosity.
\end{version}
+
\begin{version}[v=2.4.0, date=2020-09-02,
author={cmplstofB <\https{github.com/cmplstofB}>}]
\added
diff --git a/macros/latex/contrib/changelog/example.pdf b/macros/latex/contrib/changelog/example.pdf
index 110ae72c38..d31f6729c8 100644
--- a/macros/latex/contrib/changelog/example.pdf
+++ b/macros/latex/contrib/changelog/example.pdf
Binary files differ
diff --git a/macros/latex/contrib/changelog/example.tex b/macros/latex/contrib/changelog/example.tex
index 9db61a2ea7..8b1557ee92 100644
--- a/macros/latex/contrib/changelog/example.tex
+++ b/macros/latex/contrib/changelog/example.tex
@@ -7,17 +7,28 @@
title=Example changelog]
\begin{version}
\critical
- \item A critical new feature
+ \item A critical new feature.
\added
- \item Really cool features
+ \item Really cool feature.
+ \item A second feature.
\end{version}
\begin{version}[date=2019-01-23, short]
- A version with only a date
+ A version with only a date.
+\end{version}
+
+\begin{version}[date=2019-01-23]
+\added
+ \item A ``full'' version with only a date.
\end{version}
\begin{version}[v=1.1.0, simple]
- \item A version with no date
+ \item A version with no date.
+\end{version}
+
+\begin{version}[v=1.1.0, author=]
+\added
+ \item A version with no date or author.
\end{version}
\begin{version}[v=1.0.3, remark=Remark, simple]
@@ -29,24 +40,24 @@
\end{version}
\begin{version}[v=1.0.1, yanked, simple]
- \item A version with a terrible bug
+ \item A version with a terrible bug.
\end{version}
\begin{version}[v=1.0.0, date=2018-10-26]
\added
- \item A cool feature
+ \item A cool feature.
\changed
- \item Some \textsc{api} detail
+ \item Some \textsc{api} detail.
\deprecated
- \item Something that was a bad idea in the first place
+ \item Something that was a bad idea in the first place.
\removed
- \item Something that was deprecated 3 versions ago
+ \item Something that was deprecated 3 versions ago.
\fixed
- \item A bug that would delete files instead of saving them
+ \item A bug that would delete files instead of saving them.
\security
- \item improved with addition of buffer bound checks
+ \item improved with addition of buffer bound checks.
\misc
- \item A change that doesn't fit into any other category
+ \item A change that doesn't fit into any other category.
\end{version}
\shortversion{v=0.1.0, date=2018-10-19,
diff --git a/macros/latex/contrib/circledtext/README.md b/macros/latex/contrib/circledtext/README.md
index 6c49b9f7cd..d73cb72047 100644
--- a/macros/latex/contrib/circledtext/README.md
+++ b/macros/latex/contrib/circledtext/README.md
@@ -37,7 +37,7 @@ Contributing
Copyright and Licence
---------------------
- Copyright (C) 2020-2022 by Nan Geng <nangeng@nwafu.edu.cn>
+ Copyright (C) 2020-2024 by Nan Geng <nangeng@nwafu.edu.cn>
----------------------------------------------------------------------
This work may be distributed and/or modified under the
@@ -56,5 +56,3 @@ Copyright and Licence
This package consists of circledtext.sty, circledtext.tex and README.md(this file),
and the derived files circledtext.pdf.
-
-
diff --git a/macros/latex/contrib/circledtext/circledtext.pdf b/macros/latex/contrib/circledtext/circledtext.pdf
index 63396e64fc..bf721ce710 100644
--- a/macros/latex/contrib/circledtext/circledtext.pdf
+++ b/macros/latex/contrib/circledtext/circledtext.pdf
Binary files differ
diff --git a/macros/latex/contrib/circledtext/circledtext.sty b/macros/latex/contrib/circledtext/circledtext.sty
index f70b716814..47c62817e7 100644
--- a/macros/latex/contrib/circledtext/circledtext.sty
+++ b/macros/latex/contrib/circledtext/circledtext.sty
@@ -19,7 +19,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{expl3}
-\ProvidesExplPackage{circledtext}{2022-04-28}{v1.1.0}
+\ProvidesExplPackage{circledtext}{2024-09-09}{v1.1.1}
{Typeset circled text with l3draw}
\RequirePackage { xtemplate, l3keys2e, l3draw, xparse }
@@ -187,18 +187,18 @@
% 正方形边长
\dim_compare:nNnTF \l_tmpa_dim > \l_tmpb_dim
{
- \dim_gset_eq:NN \l__circledtext_char_box_size_dim \l_tmpa_dim
+ \dim_set_eq:NN \l__circledtext_char_box_size_dim \l_tmpa_dim
}
{
- \dim_gset_eq:NN \l__circledtext_char_box_size_dim \l_tmpb_dim
+ \dim_set_eq:NN \l__circledtext_char_box_size_dim \l_tmpb_dim
}
% 设置基字符盒子正方形宽和高(相等)
- \dim_gset_eq:NN \charboxwd \l__circledtext_char_box_size_dim
- \dim_gset_eq:NN \charboxht \l__circledtext_char_box_size_dim
+ \dim_set_eq:NN \charboxwd \l__circledtext_char_box_size_dim
+ \dim_set_eq:NN \charboxht \l__circledtext_char_box_size_dim
% 外接圆半径
- \dim_gset:Nn \l__circledtext_char_box_radius_dim
+ \dim_set:Nn \l__circledtext_char_box_radius_dim
{
\fp_to_dim:n
{
@@ -244,6 +244,8 @@
% 类似\cs_new:cn __circledtext_char_box_construct_type_none:nnnnnn
\cs_new:cn { \__circledtext_char_box_type:n {#1} }
}
+\cs_generate_variant:Nn \__circledtext_new_char_box_construct:nn { V }
+\cs_generate_variant:Nn \__circledtext_new_char_box_construct:nn { x }
% 定义字符边框盒子类型
@@ -328,6 +330,105 @@
}
}
+% 无反色底层填充正方形
+\__circledtext_new_char_box_construct:nn { __lowerfilledsquare }
+ {
+ \draw_scope_begin:
+ \color_fill:n { lowerbgboxfill }
+ \draw_transform_shift:n { (#3-#3*#5)/2, (#4-#4*#6)/2 }
+ \draw_path_rectangle:nn { #1, #2 } { #3*#5, #4*#6 }
+ \draw_path_use_clear:n { fill }
+ \draw_scope_end:
+ }
+
+% 无反色上层填充正方形
+\__circledtext_new_char_box_construct:nn { __upperfilledsquare }
+ {
+ \draw_scope_begin:
+ \color_fill:n { upperbgboxfill }
+ \draw_transform_shift:n { (#3-#3*#5)/2, (#4-#4*#6)/2 }
+ \draw_path_rectangle:nn { #1, #2 } { #3*#5, #4*#6 }
+ \draw_path_use_clear:n { fill }
+ \draw_scope_end:
+ }
+
+% 无反色阴影填充正方形
+\__circledtext_new_char_box_construct:nn { __shadowfilledsquare }
+ {
+ \draw_scope_begin:
+ \color_fill:n { shadowboxfill }
+ \draw_transform_shift:n { (#3-#3*#5)/2 + \charboxwd * 0.1,
+ (#4-#4*#6)/2 - \charboxht * 0.1 }
+ \draw_path_rectangle:nn { #1, #2 } { #3*#5, #4*#6 }
+ \draw_path_use_clear:n { fill }
+ \draw_scope_end:
+ }
+
+% 无反色底层填充内切圆
+\__circledtext_new_char_box_construct:nn { __innerlowerfilledcircle }
+ {
+ \draw_scope_begin:
+ \color_fill:n { lowerbgboxfill }
+ \draw_path_circle:nn { #3/2, #4/2 } { #3*#5/2 }
+ \draw_path_use_clear:n { fill }
+ \draw_scope_end:
+ }
+
+% 无反色上层填充内切圆
+\__circledtext_new_char_box_construct:nn { __innerupperfilledcircle }
+ {
+ \draw_scope_begin:
+ \color_fill:n { upperbgboxfill }
+ \draw_path_circle:nn { #3/2, #4/2 } { #3*#5/2 }
+ \draw_path_use_clear:n { fill }
+ \draw_scope_end:
+ }
+
+% 无反色阴影填充内切圆
+\__circledtext_new_char_box_construct:nn { __innershadowfilledcircle }
+ {
+ \draw_scope_begin:
+ \color_fill:n { shadowboxfill }
+ \draw_transform_shift:n { \charboxwd*0.1, -\charboxht*0.1 }
+ \draw_path_circle:nn { #3/2, #4/2 } { #3*#5/2 }
+ \draw_path_use_clear:n { fill }
+ \draw_scope_end:
+ }
+
+% 无反色底层填充外接圆
+\__circledtext_new_char_box_construct:nn { __outerlowerfilledcircle }
+ {
+ \draw_scope_begin:
+ \color_fill:n { lowerbgboxfill }
+ \draw_path_circle:nn { #3/2, #4/2 }
+ { \l__circledtext_char_box_radius_dim*#5 }
+ \draw_path_use_clear:n { fill }
+ \draw_scope_end:
+ }
+
+% 无反色上层填充外接圆
+\__circledtext_new_char_box_construct:nn { __outerupperfilledcircle }
+ {
+ \draw_scope_begin:
+ \color_fill:n { upperbgboxfill }
+ \draw_path_circle:nn { #3/2, #4/2 }
+ { \l__circledtext_char_box_radius_dim*#5 }
+ \draw_path_use_clear:n { fill }
+ \draw_scope_end:
+ }
+
+% 无反色阴影填充外接圆
+\__circledtext_new_char_box_construct:nn { __outershadowfilledcircle }
+ {
+ \draw_scope_begin:
+ \color_fill:n { shadowboxfill }
+ \draw_transform_shift:n { \charboxwd*0.1, -\charboxht*0.1 }
+ \draw_path_circle:nn { #3/2, #4/2 }
+ { \l__circledtext_char_box_radius_dim*#5 }
+ \draw_path_use_clear:n { fill }
+ \draw_scope_end:
+ }
+
% 正方形边框
\__circledtext_new_char_box_construct:nn { __squarebox }
{
@@ -499,35 +600,47 @@
}
% 填充内切圆叠加正方形正十字线与内切圆边框
-\__circledtext_new_char_box_construct:nn { o+ }
+\clist_map_variable:nNn {o+,+o} \l_tmpa_tl
{
- \__circledtext_char_box_type_c:n { __innerfilledcircle } {#1} {#2} {#3} {#4} {#5} {#6}
- \__circledtext_char_box_type_c:n { __scross } {#1} {#2} {#3} {#4} {#5} {#6}
- \__circledtext_char_box_type_c:n { __innercirclebox } {#1} {#2} {#3} {#4} {#5} {#6}
+ \__circledtext_new_char_box_construct:Vn \l_tmpa_tl
+ {
+ \__circledtext_char_box_type_c:n { __innerfilledcircle } {#1} {#2} {#3} {#4} {#5} {#6}
+ \__circledtext_char_box_type_c:n { __scross } {#1} {#2} {#3} {#4} {#5} {#6}
+ \__circledtext_char_box_type_c:n { __innercirclebox } {#1} {#2} {#3} {#4} {#5} {#6}
+ }
}
% 填充内切圆叠加内切圆斜十字线与内切圆边框
-\__circledtext_new_char_box_construct:nn { ox }
+\clist_map_variable:nNn {ox,xo} \l_tmpa_tl
{
- \__circledtext_char_box_type_c:n { __innerfilledcircle } {#1} {#2} {#3} {#4} {#5} {#6}
- \__circledtext_char_box_type_c:n { __innerdcross } {#1} {#2} {#3} {#4} {#5} {#6}
- \__circledtext_char_box_type_c:n { __innercirclebox } {#1} {#2} {#3} {#4} {#5} {#6}
+ \__circledtext_new_char_box_construct:Vn \l_tmpa_tl
+ {
+ \__circledtext_char_box_type_c:n { __innerfilledcircle } {#1} {#2} {#3} {#4} {#5} {#6}
+ \__circledtext_char_box_type_c:n { __innerdcross } {#1} {#2} {#3} {#4} {#5} {#6}
+ \__circledtext_char_box_type_c:n { __innercirclebox } {#1} {#2} {#3} {#4} {#5} {#6}
+ }
}
% 填充内切圆叠加内切圆正斜十字线与内切圆边框
-\__circledtext_new_char_box_construct:nn { ox+ }
+\clist_map_variable:nNn {ox+,o+x,xo+,x+o,+ox,+xo} \l_tmpa_tl
{
- \__circledtext_char_box_type_c:n { __innerfilledcircle } {#1} {#2} {#3} {#4} {#5} {#6}
- \__circledtext_char_box_type_c:n { __innerdcross } {#1} {#2} {#3} {#4} {#5} {#6}
- \__circledtext_char_box_type_c:n { __scross } {#1} {#2} {#3} {#4} {#5} {#6}
- \__circledtext_char_box_type_c:n { __innercirclebox } {#1} {#2} {#3} {#4} {#5} {#6}
+ \__circledtext_new_char_box_construct:Vn \l_tmpa_tl
+ {
+ \__circledtext_char_box_type_c:n { __innerfilledcircle } {#1} {#2} {#3} {#4} {#5} {#6}
+ \__circledtext_char_box_type_c:n { __innerdcross } {#1} {#2} {#3} {#4} {#5} {#6}
+ \__circledtext_char_box_type_c:n { __scross } {#1} {#2} {#3} {#4} {#5} {#6}
+ \__circledtext_char_box_type_c:n { __innercirclebox } {#1} {#2} {#3} {#4} {#5} {#6}
+ }
}
% 内切圆斜十字线叠加正十字线
-\__circledtext_new_char_box_construct:nn { x+ }
+\clist_map_variable:nNn {x+,+x} \l_tmpa_tl
{
- \__circledtext_char_box_type_c:n { __innerdcross } {#1} {#2} {#3} {#4} {#5} {#6}
- \__circledtext_char_box_type_c:n { __scross } {#1} {#2} {#3} {#4} {#5} {#6}
+ \__circledtext_new_char_box_construct:Vn \l_tmpa_tl
+ {
+ \__circledtext_char_box_type_c:n { __innerdcross } {#1} {#2} {#3} {#4} {#5} {#6}
+ \__circledtext_char_box_type_c:n { __scross } {#1} {#2} {#3} {#4} {#5} {#6}
+ }
}
% 填充正方形叠加正方形边框
@@ -538,35 +651,47 @@
}
% 填充正方形叠加正方形正十字线与正方形边框
-\__circledtext_new_char_box_construct:nn { O+ }
+\clist_map_variable:nNn {O+,+O} \l_tmpa_tl
{
- \__circledtext_char_box_type_c:n { __filledsquare } {#1} {#2} {#3} {#4} {#5} {#6}
- \__circledtext_char_box_type_c:n { __scross } {#1} {#2} {#3} {#4} {#5} {#6}
- \__circledtext_char_box_type_c:n { __squarebox } {#1} {#2} {#3} {#4} {#5} {#6}
+ \__circledtext_new_char_box_construct:Vn \l_tmpa_tl
+ {
+ \__circledtext_char_box_type_c:n { __filledsquare } {#1} {#2} {#3} {#4} {#5} {#6}
+ \__circledtext_char_box_type_c:n { __scross } {#1} {#2} {#3} {#4} {#5} {#6}
+ \__circledtext_char_box_type_c:n { __squarebox } {#1} {#2} {#3} {#4} {#5} {#6}
+ }
}
% 填充正方形叠加正方形斜十字线与正方形边框
-\__circledtext_new_char_box_construct:nn { OX }
+\clist_map_variable:nNn {OX,XO} \l_tmpa_tl
{
- \__circledtext_char_box_type_c:n { __filledsquare } {#1} {#2} {#3} {#4} {#5} {#6}
- \__circledtext_char_box_type_c:n { __dcross } {#1} {#2} {#3} {#4} {#5} {#6}
- \__circledtext_char_box_type_c:n { __squarebox } {#1} {#2} {#3} {#4} {#5} {#6}
+ \__circledtext_new_char_box_construct:Vn \l_tmpa_tl
+ {
+ \__circledtext_char_box_type_c:n { __filledsquare } {#1} {#2} {#3} {#4} {#5} {#6}
+ \__circledtext_char_box_type_c:n { __dcross } {#1} {#2} {#3} {#4} {#5} {#6}
+ \__circledtext_char_box_type_c:n { __squarebox } {#1} {#2} {#3} {#4} {#5} {#6}
+ }
}
% 填充正方形叠加正方形斜正十字线与正方形边框
-\__circledtext_new_char_box_construct:nn { OX+ }
+\clist_map_variable:nNn {OX+,O+X,XO+,X+O,+OX,+XO} \l_tmpa_tl
{
- \__circledtext_char_box_type_c:n { __filledsquare } {#1} {#2} {#3} {#4} {#5} {#6}
- \__circledtext_char_box_type_c:n { __dcross } {#1} {#2} {#3} {#4} {#5} {#6}
- \__circledtext_char_box_type_c:n { __scross } {#1} {#2} {#3} {#4} {#5} {#6}
- \__circledtext_char_box_type_c:n { __squarebox } {#1} {#2} {#3} {#4} {#5} {#6}
+ \__circledtext_new_char_box_construct:Vn \l_tmpa_tl
+ {
+ \__circledtext_char_box_type_c:n { __filledsquare } {#1} {#2} {#3} {#4} {#5} {#6}
+ \__circledtext_char_box_type_c:n { __dcross } {#1} {#2} {#3} {#4} {#5} {#6}
+ \__circledtext_char_box_type_c:n { __scross } {#1} {#2} {#3} {#4} {#5} {#6}
+ \__circledtext_char_box_type_c:n { __squarebox } {#1} {#2} {#3} {#4} {#5} {#6}
+ }
}
% 正方形斜十字线叠加正十字线
-\__circledtext_new_char_box_construct:nn { X+ }
+\clist_map_variable:nNn {X+,+X} \l_tmpa_tl
{
- \__circledtext_char_box_type_c:n { __dcross } {#1} {#2} {#3} {#4} {#5} {#6}
- \__circledtext_char_box_type_c:n { __scross } {#1} {#2} {#3} {#4} {#5} {#6}
+ \__circledtext_new_char_box_construct:Vn \l_tmpa_tl
+ {
+ \__circledtext_char_box_type_c:n { __dcross } {#1} {#2} {#3} {#4} {#5} {#6}
+ \__circledtext_char_box_type_c:n { __scross } {#1} {#2} {#3} {#4} {#5} {#6}
+ }
}
% 内切圆叠加同心82%内切圆边框
@@ -578,11 +703,14 @@
}
% 反色正方形叠加内切填充圆
-\__circledtext_new_char_box_construct:nn { Oo }
+\clist_map_variable:nNn {Oo,oO} \l_tmpa_tl
{
- \__circledtext_char_box_type_c:n { __negfilledsquare } {#1} {#2} {#3} {#4} {#5} {#6}
- \__circledtext_char_box_type_c:n { __innerfilledcircle } {#1} {#2} {#3} {#4} {#5} {#6}
- \__circledtext_char_box_type_c:n { __squarebox } {#1} {#2} {#3} {#4} {#5} {#6}
+ \__circledtext_new_char_box_construct:Vn \l_tmpa_tl
+ {
+ \__circledtext_char_box_type_c:n { __negfilledsquare } {#1} {#2} {#3} {#4} {#5} {#6}
+ \__circledtext_char_box_type_c:n { __innerfilledcircle } {#1} {#2} {#3} {#4} {#5} {#6}
+ \__circledtext_char_box_type_c:n { __squarebox } {#1} {#2} {#3} {#4} {#5} {#6}
+ }
}
% 正方形叠加同心82%正方形边框
@@ -592,6 +720,53 @@
\__circledtext_char_box_type_c:n { __squarebox } {#1} {#2} {#3} {#4} {#5} {#6}
\__circledtext_char_box_type_c:n { __squarebox } {#1} {#2} {#3} {#4} {0.82} {0.82}
}
+
+% 3同心圆叠加(类似中国象棋棋子形状)
+\__circledtext_new_char_box_construct:nn { ooo }
+ {
+ % 绘制填充外接圆阴影
+ \__circledtext_char_box_type_c:n { __outershadowfilledcircle }
+ {#1} {#2} {#3} {#4} {1.0} {1.0}
+ % 绘制填充外接圆外圈背景
+ \__circledtext_char_box_type_c:n { __outerlowerfilledcircle }
+ {#1} {#2} {#3} {#4} {#5} {#6}
+ % 绘制填充外接边环背景
+ \__circledtext_char_box_type_c:n { __outerupperfilledcircle }
+ {#1} {#2} {#3} {#4} {0.88} {0.88}
+ % 绘制填充外接圆内圈背景
+ \__circledtext_char_box_type_c:n { __outerlowerfilledcircle }
+ {#1} {#2} {#3} {#4} {0.72} {0.72}
+ % 绘制双边刻环线
+ \__circledtext_char_box_type_c:n { __outercirclebox }
+ {#1} {#2} {#3} {#4} {0.88} {0.88}
+ \__circledtext_char_box_type_c:n { __outercirclebox }
+ {#1} {#2} {#3} {#4} {0.72} {0.72}
+
+ }
+
+% 3同心正方形叠加
+\__circledtext_new_char_box_construct:nn { OOO }
+ {
+ % 绘制填充正方形阴影
+ \__circledtext_char_box_type_c:n { __shadowfilledsquare }
+ {#1} {#2} {#3} {#4} {1.0} {1.0}
+ % 绘制填充正方形外圈背景
+ \__circledtext_char_box_type_c:n { __lowerfilledsquare}
+ {#1} {#2} {#3} {#4} {#5} {#6}
+ % 绘制填充正方形边环背景
+ \__circledtext_char_box_type_c:n { __upperfilledsquare}
+ {#1} {#2} {#3} {#4} {0.88} {0.88}
+ % 绘制填充正方形内圈背景
+ \__circledtext_char_box_type_c:n { __lowerfilledsquare}
+ {#1} {#2} {#3} {#4} {0.72} {0.72}
+ % 绘制双边刻环线
+ \__circledtext_char_box_type_c:n { __squarebox }
+ {#1} {#2} {#3} {#4} {0.88} {0.88}
+ \__circledtext_char_box_type_c:n { __squarebox }
+ {#1} {#2} {#3} {#4} {0.72} {0.72}
+
+ }
+
\msg_new:nnn { circledtext } { box-exists } { The~ box~ type~ `#1~ not~ exists. }
% 缩放类型名称生成函数
@@ -874,6 +1049,49 @@
\cs_set_nopar:Npn \__circledtext_aux_color_boxfill:
{ \color_fill:nn #1 }
} ,
+
+ % 无反色时底层盒子背景填充颜色
+ lowerbgcolor .code:n = { \exp_args:Nx \tl_if_empty:nTF {#1}
+ {
+ \__circledtext_color_select:nn { lowerbgboxfill }
+ { yellow!70!red }
+ \cs_set_nopar:Npn \__circledtext_aux_color_boxfill:
+ { \color_fill:n { yellow!70!red } }
+ }{ \__circledtext_color_select:nn { lowerbgboxfill } { #1 }
+ \cs_set_nopar:Npn \__circledtext_aux_color_boxfill:
+ { \color_fill:n { #1 } }
+ }
+ } ,
+ lowerbgcolor .initial:n = {} ,
+
+ % 无反色时上层盒子背景填充颜色
+ upperbgcolor .code:n = { \exp_args:Nx \tl_if_empty:nTF {#1}
+ {
+ \__circledtext_color_select:nn { upperbgboxfill }
+ { yellow!80!black }
+ \cs_set_nopar:Npn \__circledtext_aux_color_boxfill:
+ { \color_fill:n { yellow!80!black } }
+ }{ \__circledtext_color_select:nn { upperbgboxfill } { #1 }
+ \cs_set_nopar:Npn \__circledtext_aux_color_boxfill:
+ { \color_fill:n { #1 } }
+ }
+ } ,
+ upperbgcolor .initial:n = {} ,
+
+ % 盒子阴影填充颜色
+ shadowcolor .code:n = { \exp_args:Nx \tl_if_empty:nTF {#1}
+ {
+ \__circledtext_color_select:nn { shadowboxfill }
+ { black!35!white }
+ \cs_set_nopar:Npn \__circledtext_aux_color_boxfill:
+ { \color_fill:n { black!35!white } }
+ }{ \__circledtext_color_select:nn { shadowboxfill } { #1 }
+ \cs_set_nopar:Npn \__circledtext_aux_color_boxfill:
+ { \color_fill:n { #1 } }
+ }
+ } ,
+ shadowcolor .initial:n = {} ,
+
% 笔画参数
charstroke .choice:,
charstroke .value_required:n = true,
@@ -965,17 +1183,17 @@
% 复制盒子准备缩放与输出
\coffin_set_eq:NN \l__circledtext_box_coffin \l__circledtext_char_coffin
- % % 测量盒子容器总高度(用内切圆则不需要)
- % \dim_set:Nn \l_tmpa_dim
- % { \__circledtext_coffin_ht_plus_dp:N \l__circledtext_box_coffin }
- % % 缩放字符盒子容器到字符大小
- % \coffin_scale:Nnn \l__circledtext_box_coffin
- % {
- % \dim_ratio:nn { \charboxht } { \l_tmpa_dim }
- % }
- % {
- % \dim_ratio:nn { \charboxht } { \l_tmpa_dim }
- % }
+ % 测量盒子容器总高度(用内切圆则不需要)
+ \dim_set:Nn \l_tmpa_dim
+ { \__circledtext_coffin_ht_plus_dp:N \l__circledtext_box_coffin }
+ % 缩放字符盒子容器到字符大小
+ \coffin_scale:Nnn \l__circledtext_box_coffin
+ {
+ \dim_ratio:nn { \charboxht } { \l_tmpa_dim }
+ }
+ {
+ \dim_ratio:nn { \charboxht } { \l_tmpa_dim }
+ }
% 根据指定的方式缩放盒子
\__circledtext_resize_c:n { \l__circledtext_resize_method_tl }
diff --git a/macros/latex/contrib/circledtext/circledtext.tex b/macros/latex/contrib/circledtext/circledtext.tex
index 2df0d98782..5c52cc15d4 100644
--- a/macros/latex/contrib/circledtext/circledtext.tex
+++ b/macros/latex/contrib/circledtext/circledtext.tex
@@ -119,7 +119,7 @@
{ \__codedoc_cmd:no {#1} { #2 } }
\ExplSyntaxOff
-\def\vers{\texttt{v1.1.0} }
+\def\vers{\texttt{v1.1.1} }
\begin{document}
\title{
@@ -488,7 +488,7 @@ starred macro can create negative ``circled'' text.
a macro \tn{circledtextset} to set the format of ``circled''
text.
-\section{Inerface}
+\section{Interface}
\subsection{\cs{circledtext} macro}
diff --git a/macros/latex/contrib/coloredtheorem/coloredtheorem-doc.pdf b/macros/latex/contrib/coloredtheorem/coloredtheorem-doc.pdf
index abccef5167..9cf5839b1e 100644
--- a/macros/latex/contrib/coloredtheorem/coloredtheorem-doc.pdf
+++ b/macros/latex/contrib/coloredtheorem/coloredtheorem-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/coloredtheorem/coloredtheorem-doc.tex b/macros/latex/contrib/coloredtheorem/coloredtheorem-doc.tex
index 875851d600..cd5b6691d2 100644
--- a/macros/latex/contrib/coloredtheorem/coloredtheorem-doc.tex
+++ b/macros/latex/contrib/coloredtheorem/coloredtheorem-doc.tex
@@ -40,9 +40,9 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% MAIN DOCUMENT
\begin{document}
- \title{The \tcthrm package {\footnotesize(v1.0.2)}}
+ \title{The \tcthrm package {\footnotesize(v1.0.4)}}
\author{João M. Lourenço\\\texttt{\small joao.lourenco@fct.unl.pt}}
- \date{March 31, 2024}
+ \date{September 15, 2024}
\maketitle
diff --git a/macros/latex/contrib/coloredtheorem/coloredtheorem.sty b/macros/latex/contrib/coloredtheorem/coloredtheorem.sty
index 4e128bf80b..4d24f77056 100644
--- a/macros/latex/contrib/coloredtheorem/coloredtheorem.sty
+++ b/macros/latex/contrib/coloredtheorem/coloredtheorem.sty
@@ -14,7 +14,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[2020/06/01]
\ProvidesPackage{coloredtheorem}
- [2024/04/03 v1.0.2 - A colorful boxed theorem environment]
+ [2024/09/15 v1.0.4 - A colorful boxed theorem environment]
\RequirePackage{tcolorbox}
\tcbuselibrary{breakable}
@@ -27,10 +27,11 @@
\expandafter\gdef\csname\tcbth list#1name\endcsname{List of #2s}%
\expandafter\gdef\csname#1autorefname\endcsname{#2}%
\AtEndPreamble{%
- \ifdefined\crefname\expandafter\crefname\csname\tcbth#1\endcsname{#2}{#2s}\fi}%
+ \ifdefined\crefname\expandafter\crefname\expandafter{\tcbth#1}{#2}{#2s}\fi}%
\expandafter\gdef\csname\tcbth listof#1s\endcsname
{%
- \section*{\csname\tcbth list#1name\endcsname}%
+ \ifdefined\chapter\chapter*{\csname\tcbth list#1name\endcsname}%
+ \else\section*{\csname\tcbth list#1name\endcsname}\fi%
\expandafter\@starttoc\expandafter{lo#1}%
}
\expandafter\NewDocumentEnvironment\expandafter{\tcbth#1} {O{} m O{}}%
@@ -53,6 +54,9 @@
~\csname the\tcbth#1\endcsname\fi}~~##2},
#3, ##3,
]%
+ \let\origpar=\par%
+ \def\par{\origpar\medskip}%
+ \ignorespaces%
}{% \end{tcb<SOMETHING>}
\end{tcolorbox}%
\end{center}%
diff --git a/macros/latex/contrib/commalists-tools/README.md b/macros/latex/contrib/commalists-tools/README.md
new file mode 100644
index 0000000000..2691841bce
--- /dev/null
+++ b/macros/latex/contrib/commalists-tools/README.md
@@ -0,0 +1,6 @@
+This package provides some macros for manipulating numeral comma separated lists.
+Available tools are adding, removing, counting, testing, reversing, sorting, etc
+---------------------------------------------------------------------------------
+Author..: Cédric Pierquet
+email...: cpierquet@outlook.fr
+Licence.: Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt \ No newline at end of file
diff --git a/macros/latex/contrib/commalists-tools/doc/commalists-tools-doc.pdf b/macros/latex/contrib/commalists-tools/doc/commalists-tools-doc.pdf
new file mode 100644
index 0000000000..8720ca502e
--- /dev/null
+++ b/macros/latex/contrib/commalists-tools/doc/commalists-tools-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/commalists-tools/doc/commalists-tools-doc.tex b/macros/latex/contrib/commalists-tools/doc/commalists-tools-doc.tex
new file mode 100644
index 0000000000..daab3e3183
--- /dev/null
+++ b/macros/latex/contrib/commalists-tools/doc/commalists-tools-doc.tex
@@ -0,0 +1,415 @@
+% !TeX TXS-program:compile = txs:///arara
+% arara: pdflatex: {shell: no, synctex: no, interaction: batchmode}
+% arara: pdflatex: {shell: no, synctex: no, interaction: batchmode}
+
+\documentclass[11pt,a4paper]{ltxdoc}
+\usepackage{bera}
+\usepackage{inconsolata}
+\usepackage[T1]{fontenc}
+\usepackage[scale=0.875]{cabin}
+\usepackage{commalists-tools}
+\usepackage{fancyvrb}
+\usepackage{fancyhdr}
+\usepackage{tabularray}
+\usepackage{fontawesome5}
+\fancyhf{}
+\renewcommand{\headrulewidth}{0pt}
+\lfoot{\sffamily\small [commalists-tools]}
+\cfoot{\sffamily\small - \thepage{} -}
+\rfoot{\hyperlink{matoc}{\small\faArrowAltCircleUp[regular]}}
+\usepackage{hologo}
+\providecommand\tikzlogo{Ti\textit{k}Z}
+\providecommand\TeXLive{\TeX{}Live\xspace}
+\let\TikZ\tikzlogo
+
+\usepackage{hyperref}
+\urlstyle{same}
+\hypersetup{pdfborder=0 0 0}
+\usepackage[margin=2cm]{geometry}
+\setlength{\parindent}{0pt}
+\def\TPversion{0.1.0}
+\def\TPdate{25/09/2024}
+\usepackage{tcolorbox}
+\usepackage{pgffor}
+\tcbuselibrary{breakable,skins,hooks,listingsutf8}
+%\usepackage{soul}
+%\sethlcolor{lightgray!25}
+
+\lstset{
+ language=[LaTeX]TeX,%
+ basicstyle=\ttfamily,%
+ keywordstyle={\color{blue}},%
+ classoffset=0,%
+ keywords={},%
+ alsoletter={-},%
+ keywordstyle={\color{blue}},%
+ classoffset=1,%
+ alsoletter={-},%
+ morekeywords={commalists-tools},%
+ keywordstyle={\color{violet}},%
+ classoffset=2,%
+ alsoletter={-},%
+ morekeywords={\sortasclist,\sortdeslist,\addvalinlist,\removevalinlist,\boolvalinlist,\xintifvalinlist,\countvalinlist,\minoflist,\maxoflist,\meanoflist,\sumoflist,\prodoflist,\reverselist,\getvaluefromlist},%
+ keywordstyle={\color{green!50!black}},%
+ classoffset=3,%
+ morekeywords={},%
+ keywordstyle={\color{orange}}
+}
+
+\newtcblisting{DemoCode}[1]{%
+ enhanced,width=\linewidth,%
+ bicolor,size=title,%
+ colback=cyan!10!white,%
+ colbacklower=cyan!5!white,%
+ colframe=cyan!75!black,%
+ listing options={%
+ breaklines=true,%
+ breakatwhitespace=true,%
+ style=tcblatex,basicstyle=\small\ttfamily,%
+ tabsize=4,%
+ commentstyle={\itshape\color{gray}},
+ keywordstyle={\color{blue}},%
+ classoffset=0,%
+ keywords={\usepackage,\includegraphics,xstring,listofitems,\readlist,\showitems,\xintFor,\xintSeq},%
+ alsoletter={-},%
+ keywordstyle={\color{blue}},%
+ classoffset=1,%
+ alsoletter={-},%
+ morekeywords={euromoney},%
+ keywordstyle={\color{violet}},%
+ classoffset=2,%
+ alsoletter={-},%
+ morekeywords={\sortasclist,\sortdeslist,\addvalinlist,\removevalinlist,\boolvalinlist,\xintifvalinlist,\countvalinlist,\minoflist,\maxoflist,\meanoflist,\sumoflist,\prodoflist,\reverselist,\getvaluefromlist},%
+ keywordstyle={\color{green!50!black}},%
+ classoffset=3,%
+ morekeywords={},%
+ keywordstyle={\color{orange}}
+ },%
+ #1
+}
+
+\newtcbinputlisting\DemoCodeFile[1]{%
+ enhanced,width=\linewidth,%
+ bicolor,size=title,%
+ colback=lightgray!10!white,%
+ colbacklower=lightgray!5!white,%
+ colframe=lightgray!75!black,%
+ listing options={%
+ breaklines=true,%
+ breakatwhitespace=true,%
+ style=tcblatex,
+ basicstyle=\scriptsize\ttfamily,%
+ tabsize=4,%
+ commentstyle={\itshape\color{gray}},%
+ %lastline=148
+ },%
+ breakable,
+ listing only,%
+ listing file={#1}
+}
+
+\NewDocumentCommand\ShowCode{ m }{%
+ \lstinline{#1}%
+}
+
+\begin{document}
+
+\thispagestyle{empty}
+
+\begin{center}
+ \begin{minipage}{0.88\linewidth}
+ \begin{tcolorbox}[colframe=yellow,colback=yellow!15]
+ \begin{center}
+ \renewcommand{\arraystretch}{1.25}%
+ \begin{tabular}{c}
+ {\Huge \texttt{commalists-tools}}\\
+ \\
+ {\LARGE Macros for manipulating numeral} \\
+ {\LARGE comma separated lists :} \\
+ {\LARGE sorting, adding, removing, etc} \\
+ \\
+ {\small \texttt{Version \TPversion{} -- \TPdate}}
+ \end{tabular}
+ \end{center}
+ \end{tcolorbox}
+ \end{minipage}
+\end{center}
+
+\begin{center}
+ \begin{tabular}{c}
+ \texttt{Cédric Pierquet}\\
+ {\ttfamily c pierquet -- at -- outlook . fr}\\
+ \texttt{\url{https://github.com/cpierquet/commalists-tools}} \\
+ \end{tabular}
+\end{center}
+
+\hrule
+
+\vfill
+
+\begin{tcblisting}{colframe=lightgray,colback=lightgray!5,listing only}
+\def\mytestlist{14,10,15,11,9,10}
+\minoflist*{\mytestlist}
+\maxoflist*{14,10,15,11,9,10}
+\sortasclist*{\mytestlist}
+\meanoflist*{\mytestlist}
+\removevalinlist*{10}{\mytestlist}
+\xintifvalinlist{15}{\mytestlist}{true}{false}
+\end{tcblisting}
+
+\begin{tcolorbox}[colframe=lightgray,colback=lightgray!5]
+\def\mytestlist{14,10,15,11,9,10}
+We consider the list : \mytestlist\par\smallskip
+The minimum value is \minoflist*{\mytestlist} and the maximum is \maxoflist*{14,10,15,11,9,10}\par\smallskip
+Ascending sorted list is \sortasclist*{\mytestlist}\par\smallskip
+Meaning value of the list is \meanoflist*{\mytestlist}\par\smallskip
+If we remove the value 10, the the list is \removevalinlist*{10}{\mytestlist}\par\smallskip
+We test if 15 is in the list : \xintifvalinlist{15}{\mytestlist}{true}{false}
+\end{tcolorbox}
+
+\vfill~
+
+%\hrule
+%
+%\medskip
+
+%\emph{%
+% The \textsf{luarandom} package do the same things, but with the obligation to compile with \hologo{LuaLaTeX}.
+%}
+%
+%\medskip
+
+\hrule
+
+\vspace*{5mm}
+
+\pagebreak
+
+\phantomsection
+
+\hypertarget{matoc}{}
+
+\tableofcontents
+
+\vspace*{5mm}
+
+%\hrule
+
+\pagebreak
+
+\section{Loading, useful packages}
+
+In order to load \texttt{randintlist}, simply use :
+
+\begin{DemoCode}{listing only}
+\usepackage{commalists-tools}
+\end{DemoCode}
+
+Loaded packages are \texttt{listofitems}, \texttt{xintexpr} and \texttt{xstring}.
+
+\smallskip
+
+The idea is to propose "reusage" of lists with \texttt{listofitems} or other commands, for example.
+
+\section{The Macros}
+
+\subsection{Global usage}
+
+Package \texttt{commalists-tools} supports (basic) manipulations on numeral comma separated lists :
+
+\begin{itemize}
+ \item sorting ;
+ \item adding values ;
+ \item removing values ;
+ \item counting values ;
+ \item mean, sum, product ;
+ \item etc
+\end{itemize}
+
+Starred versions only print the result, whereas non starred versions store the result into a macro.
+
+\medskip
+
+\hfill\textbf{All engines \TeX\ are compatible with this package.}\hfill~
+
+\subsection{The macros for calculing}
+
+\begin{DemoCode}{listing only}
+%getting min of list, only printing
+\minoflist*{list}
+%storing min of list into \macro (\resmin by default)
+\minoflist{list}[\macro]
+%getting max of list, only printing
+\maxoflist*{list}
+%storing max of list into \macro (\resmax by default)
+\maxoflist{list}[\macro]
+\end{DemoCode}
+
+\begin{DemoCode}{}
+%only printing
+\minoflist*{14,10,15,11,9,10} and \maxoflist*{14,10,15,11,9,10} \\
+%storing min/max of list
+\def\mytestlist{10,14.5,20,12,8.5}
+\minoflist{\mytestlist}[\mymin]Min of list is \mymin\ \&
+\maxoflist{\mytestlist}[\mymax]Max of list is \mymax
+\end{DemoCode}
+
+\begin{DemoCode}{listing only}
+%getting mean of list, only printing
+\meanoflist*{list}
+%storing mean of list into \macro (\resmean by default)
+\meanoflist{list}[\macro]
+%getting sum of list, only printing
+\sumoflist*{list}
+%storing max of list into \macro (\ressum by default)
+\sumoflist{list}[\macro]
+%getting prod of list, only printing
+\prodoflist*{list}
+%storing max of list into \macro (\resprod by default)
+\prodoflist{list}[\macro]
+\end{DemoCode}
+
+\begin{DemoCode}{}
+%only printing
+\meanoflist*{14,10,15,11,9,10} \\
+%storing
+\meanoflist{14,10,15,11,9,10}[\mymean]\mymean \\
+%only printing
+\sumoflist*{14,10,15,11,9,10} and \prodoflist*{14,10,15,11,9,10} \\
+%storing
+\sumoflist{14,10,15,11,9,10}[\mysum]\prodoflist{14,10,15,11,9,10}[\myprod]
+The sum is \mysum\ and the prod is \myprod
+\end{DemoCode}
+
+\subsection{Macros for manipulating}
+
+\begin{DemoCode}{listing only}
+%sorting (asc), only printing
+\sortasclist*{list}
+%sorting (asc) and storing (overwrite)
+\sortasclist{list}
+%sorting (des), only printing
+\sortdeslist*{list}
+%sorting (des) and storing (overwrite)
+\sortdeslist{list}
+\end{DemoCode}
+
+\begin{DemoCode}{}
+%sorting (asc), only printing
+\sortasclist*{14,10,15,11,9,10}\\
+%sorting (asc) and storing (overwrite)
+\def\tmpsortlist{14,10,15,11,9,10}
+\sortasclist{\tmpsortlist}\tmpsortlist\\
+%analysing
+\readlist*\tmpSORTlist{\tmpsortlist}
+\showitems{\tmpSORTlist}
+\end{DemoCode}
+
+\begin{DemoCode}{}
+%sorting (des), only printing
+\sortdeslist*{14,10,15,11,9,10}\\
+%sorting (asc) and storing (overwrite)
+\def\tmpsortlist{14,10,15,11,9,10}
+\sortdeslist{\tmpsortlist}\tmpsortlist\\
+%analysing
+\readlist*\tmpSORTlist{\tmpsortlist}
+\showitems{\tmpSORTlist}
+\end{DemoCode}
+
+\begin{DemoCode}{listing only}
+%adding, only printing
+\addvalinlist*{values}{list}
+%adding and storing (overwrite)
+\addvalinlist{values}{list}
+%removing, only printing
+\removevalinlist*{value}{list}
+%removing and storing (overwrite)
+\removevalinlist{value}{list}
+\end{DemoCode}
+
+\begin{DemoCode}{}
+%only printing
+\addvalinlist*{3}{1,2,5,6}\\
+%defining and adding
+\def\tmpaddlist{1,2,4,5,6}
+\addvalinlist{3}{\tmpaddlist}\tmpaddlist\\
+%analysing
+\readlist*\tmpADDlist{\tmpaddlist}
+\showitems{\tmpADDlist}
+\end{DemoCode}
+
+\begin{DemoCode}{}
+%only printing
+\removevalinlist*{3}{1,2,3,6,3,1,5,7,3}\\
+%defining and removing
+\def\tmpremlist{1,2,3,6,3,1,5,7,3}
+\removevalinlist{3}{\tmpremlist}\tmpremlist\\
+%analysing
+\readlist*\tmpREMlist{\tmpremlist}
+\showitems{\tmpREMlist}
+\end{DemoCode}
+
+\begin{DemoCode}{listing only}
+%reversing, only printing
+\reverselist*{list}
+%reversing and storing (overwrite)
+\reverselist{list}
+\end{DemoCode}
+
+\begin{DemoCode}{}
+%only printing
+\reverselist*{14,10,15,11,9,10}\\
+%reversing and storing
+%storing
+\reverselist{14,10,15,11,9,10}[\myreverse]\myreverse\\
+%analysing
+\readlist*\tmpREVERSElist{\myreverse}
+\showitems{\tmpREVERSElist}
+\end{DemoCode}
+
+\subsection{Macros with testing}
+
+\begin{DemoCode}{listing only}
+%testing if value is in list, with boolean result in \macro (\resisinlist by default)
+\boolvalinlist{value}{list}[\macro]
+%conditionnal test if value is in list, according to xint syntax
+\xintifvalinlist{3}{0,1,2,3}{true}{false}
+\end{DemoCode}
+
+\begin{DemoCode}{}
+%test with xint syntax
+\xintifvalinlist{-1}{0,1,2,3}{true}{false}\\
+%test with xint syntax
+\xintifvalinlist{3}{0,1,2,3}{true}{false}\\
+%boolean macro
+\def\myteslist{0,5,10,5,6,9,7,8}
+\boolvalinlist{5}{\myteslist}[\resisinlist]\resisinlist
+\end{DemoCode}
+
+\begin{DemoCode}{listing only}
+%counting value, only printing
+\countvalinlist*{value}{list}
+%counting value, with result in \macro (\rescount by default)
+\countvalinlist{value}{list}[\macro]
+\end{DemoCode}
+
+\begin{DemoCode}{}
+%only printing
+\countvalinlist*{8}{1,2,3,4,5,6,6,7,8,8,8,9}\\
+%storing
+\def\tmpcountlist{1,2,3,4,5,6,6,7,8,8,8,9}
+\countvalinlist{6}{\tmpcountlist}[\rescountsix]\rescountsix\\
+\countvalinlist{10}{\tmpcountlist}[\rescountten]\rescountten
+\end{DemoCode}
+
+\pagebreak
+
+\section{History}
+
+\texttt{0.1.0 : Initial version}
+
+\section{The code}
+
+\DemoCodeFile{commalists-tools.sty}
+
+\end{document}
diff --git a/macros/latex/contrib/commalists-tools/tex/commalists-tools.sty b/macros/latex/contrib/commalists-tools/tex/commalists-tools.sty
new file mode 100644
index 0000000000..7809c82721
--- /dev/null
+++ b/macros/latex/contrib/commalists-tools/tex/commalists-tools.sty
@@ -0,0 +1,188 @@
+% Author : C. Pierquet
+% licence : Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txtf
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{commalists-tools}[2024/09/25 0.1.0 Basic operations for numeral comma separated lists]
+
+%------History
+% 0.1.0 Initial version
+
+%------Packages
+\RequirePackage{listofitems}
+\RequirePackage{xintexpr}
+\RequirePackage{xstring}
+
+%-----Macros (LaTeX3...) for sorting
+\ExplSyntaxOn
+\NewDocumentCommand\sortasclist{ s m }
+{
+ \clist_set:Nx \l_foo_clist {#2}
+ \clist_sort:Nn \l_foo_clist{
+ \int_compare:nNnTF { ##1 } > { ##2 }
+ { \sort_return_swapped: }
+ { \sort_return_same: }
+ }
+ \IfBooleanTF{#1}%if star := just printing // if not, storing
+ {%
+ {\l_foo_clist}%
+ }%
+ {%
+ \xdef#2{\l_foo_clist}%
+ }%
+}
+
+\NewDocumentCommand\sortdeslist{ s m }
+{
+ \clist_set:Nx \l_foo_clist {#2}
+ \clist_sort:Nn \l_foo_clist{
+ \int_compare:nNnTF { ##1 } < { ##2 }
+ { \sort_return_swapped: }
+ { \sort_return_same: }
+ }
+ \IfBooleanTF{#1}%if star := just printing // if not, storing
+ {%
+ {\l_foo_clist}%
+ }%
+ {%
+ \xdef#2{\l_foo_clist}%
+ }%
+}
+\ExplSyntaxOff
+
+%----Macros (LaTeX2)
+\NewDocumentCommand\addvalinlist{ s m m }{%
+ \IfBooleanTF{#1}%if star := just printing // if not, storing
+ {%
+ #3,#2%
+ }%
+ {%
+ \xdef#3{#3,#2}%
+ }%
+}
+
+\NewDocumentCommand\removevalinlist{ s m m }{%
+ \readlist*\tmplistread{#3}%
+ \xdef\tmpresremovelist{}%
+ \xintFor* ##1 in {\xintSeq{1}{\tmplistreadlen}}\do{%
+ \xintifboolexpr{ \tmplistread[##1] == #2}%
+ {}%
+ {%
+ \xintifboolexpr{ ##1 == 1 }%
+ {%
+ \xdef\tmpresremovelist{\tmplistread[##1]}%
+ }%
+ {%
+ \xdef\tmpresremovelist{\tmpresremovelist,\tmplistread[##1]}%
+ }%
+ }%
+ }%
+ \IfBooleanTF{#1}%if star := just printing // if not, storing
+ {%
+ \tmpresremovelist%
+ }%
+ {%
+ \xdef#3{\tmpresremovelist}%
+ }%
+}
+
+\NewDocumentCommand\boolvalinlist{ m m O{\resisinlist} }{%
+ \IfSubStr{,#2,}{,#1,}{\def#3{1}}{\def#3{0}}%
+}
+
+\NewDocumentCommand\xintifvalinlist{ m m m m }{%
+ \IfSubStr{,#2,}{,#1,}{\xdef\RESTMPVALUE{1}}{\xdef\RESTMPVALUE{0}}%
+ \xintifboolexpr{ \RESTMPVALUE == 1}{#3}{#4}%
+}
+
+\NewDocumentCommand\countvalinlist{ s m m O{\rescount} }{%
+ \readlist*\tmplistread{#3}%
+ \xdef#4{0}%
+ \xintFor* ##1 in {\xintSeq{1}{\tmplistreadlen}}\do{%
+ \xintifboolexpr{ \tmplistread[##1] == #2}%
+ {%
+ \xdef#4{\fpeval{#4+1}}%
+ }%
+ {}%
+ }%
+ \IfBooleanT{#1}%if star := just printing // if not, storing
+ {%
+ #4%
+ }%
+}
+
+\NewDocumentCommand\minoflist{ s m O{\resmin} }{%
+ \IfBooleanTF{#1}%
+ {%
+ \fpeval{min(#2)}%
+ }%
+ {%
+ \xdef#3{\fpeval{min(#2)}}%
+ }%
+}
+
+\NewDocumentCommand\maxoflist{ s m O{\resmax} }{%
+ \IfBooleanTF{#1}%
+ {%
+ \fpeval{max(#2)}%
+ }%
+ {%
+ \xdef#3{\fpeval{max(#2)}}%
+ }%
+}
+
+\NewDocumentCommand\meanoflist{ s m O{\resmean} }{%
+ \xdef#3{0}%
+ \readlist*\tmpmeanlist{#2}%
+ \xintFor* ##1 in {\xintSeq{1}{\tmpmeanlistlen}}\do{%
+ \xdef#3{\fpeval{#3+\tmpmeanlist[##1]}}%
+ }%
+ \xdef#3{\fpeval{(#3)/\tmpmeanlistlen}}%
+ \IfBooleanT{#1}%if star := just printing // if not, storing
+ {%
+ #3%
+ }%
+}
+
+\NewDocumentCommand\sumoflist{ s m O{\ressum} }{%
+ \xdef#3{0}%
+ \readlist*\tmpsumlist{#2}%
+ \xintFor* ##1 in {\xintSeq{1}{\tmpsumlistlen}}\do{%
+ \xdef#3{\fpeval{#3+\tmpsumlist[##1]}}%
+ }%
+ \IfBooleanT{#1}%if star := just printing // if not, storing
+ {%
+ #3%
+ }%
+}
+
+\NewDocumentCommand\prodoflist{ s m O{\resprod} }{%
+ \xdef#3{1}%
+ \readlist*\tmpprodlist{#2}%
+ \xintFor* ##1 in {\xintSeq{1}{\tmpprodlistlen}}\do{%
+ \xdef#3{\fpeval{(#3)*\tmpprodlist[##1]}}%
+ }%
+ \IfBooleanT{#1}%if star := just printing // if not, storing
+ {%
+ #3%
+ }%
+}
+
+\NewDocumentCommand\reverselist{ s m O{\resrevlist} }{%
+ \readlist*\tmpreverselist{#2}%
+ \xdef#3{\tmpreverselist[-1]}%
+ \xintFor* ##1 in {\xintSeq{2}{\tmpreverselistlen}}\do{%
+ \xdef#3{#3,\tmpreverselist[-##1]}%
+ }%
+ \IfBooleanT{#1}%if star := just printing // if not, storing
+ {%
+ #3%
+ }%
+}
+
+\NewDocumentCommand\getvaluefromlist{ s m m O{\resmyelt} }{%
+ \readlist*\tmpreadlist{#2}%
+ \xdef#4{\tmpreadlist[#3]}%
+ \IfBooleanT{#1}{#4}%
+}
+
+\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/cs-techrep/README b/macros/latex/contrib/cs-techrep/README
index bb3aefdd37..fbe8f9aff8 100644
--- a/macros/latex/contrib/cs-techrep/README
+++ b/macros/latex/contrib/cs-techrep/README
@@ -1,5 +1,5 @@
-----------------------------
- Version 0.2 of the cs-techrep class
+ Version 0.4 of the cs-techrep class
Christoph P. Neumann
-----------------------------
diff --git a/macros/latex/contrib/cs-techrep/cs-techrep.dtx b/macros/latex/contrib/cs-techrep/cs-techrep.dtx
index 35775ca107..ccc3475664 100644
--- a/macros/latex/contrib/cs-techrep/cs-techrep.dtx
+++ b/macros/latex/contrib/cs-techrep/cs-techrep.dtx
@@ -1,16 +1,16 @@
%\iffalse
% cs-techrep.dtx generated using makedtx version 1.2 (c) Nicola Talbot
% Command line args:
-% -preamble "Copyright 2023-2024 Christoph P. Neumann This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3c of this license or any later version. The latest version of this license is in https://www.latex-project.org/lppl.txt and version 1.3c or later is part of all distributions of LaTeX version 2008 or later. This work has the LPPL maintenance status maintained. The Current Maintainer of this work is Christoph P. Neumann. "
-% -setambles ".*=>\nopreamble"
-% -author "Christoph P. Neumann "
-% -dir "src"
-% -src "(_cpn_copyIntoExamplesFolder_cls.cmd|cs-techrep.cls)=>\1"
% -doc "doc/cs-techrep.tex"
+% -author "Christoph P. Neumann "
+% -setambles ".*=>\nopreamble"
% -date "2023-2024"
+% -dir "src"
% -macrocode ".*"
+% -preamble "Copyright 2023-2024 Christoph P. Neumann This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3c of this license or any later version. The latest version of this license is in https://www.latex-project.org/lppl.txt and version 1.3c or later is part of all distributions of LaTeX version 2008 or later. This work has the LPPL maintenance status maintained. The Current Maintainer of this work is Christoph P. Neumann. "
+% -src "(_cpn_copyIntoExamplesFolder_cls.cmd|cs-techrep.cls)=>\1"
% cs-techrep
-% Created on 2024/4/10 18:14
+% Created on 2024/9/14 21:40
%\fi
%\iffalse
%<*package>
@@ -56,7 +56,7 @@
%\title{\textsf{cs-techrep}\\
%Technical Reports in Computer Science and Software Engineering}
%\author{Christoph P.\ Neumann \texttt{$<$cyberpetaneuron@gmail.com$>$}}
-%\date{Version 0.2}
+%\date{Version 0.4}
%\maketitle
%\PrintChanges
%
@@ -117,14 +117,33 @@
%This package provides the documentclass \texttt{cs-techrep}. The documentclass
%supports the following options:
%
-%
%\begin{itemize}
%\item |conference| Passed to IEEEtran
%\item |a4paper| Passed to IEEEtran
-%\item |flushend| Activate flushend package
-%\item |pbalance| Activate pbalance package
+%\item |subfig| Loads subfig package with custom style settings
+%\item |subcaption| Loads subcaption package with custom style settings
+%\item |flushend| Activate flushend package (compatible with arXiv build process)
+%\item |pbalance| Activate pbalance package (incompatible with arXiv build process)
%\end{itemize}
%
+%A Remark about two-column document balancing on the last page:
+%The flushend package is recommended, because it works within the arXiv automated build process.
+%However, flushend has a major incampatibility with package lineno, which is, e.\,g., transitively loaded by package mindflow.
+%Thus, in case when flushend does not have any effect, check whether one of your packages loads lineno.
+%Usually you are stuck with your packages and, thus, will instead be forced to switch from flushend to pbalance.
+%Please be aware that pbalance works great and has high compatibility, but unfortunately it will not have any effect within the arXiv automated build process.
+%In case of both, a somehow needed lineno package and an intended arXiv upload, I recommend to do without two-column balancing on the last page and just to stay away from both flushend and pbalance, in order to ensure that your paper is layouted identically in any initial publication and a later arXiv upload.
+%I hope this remark proves helpful, it took me some nerve to find out.
+%
+%There is also another important difference between flushend and pbalance: the handling of footnotes on the last page.
+%Flushend provides a decent result, but the result of pbalance is incomprehensible.
+%I strongly recommend avoiding footnotes on the last page.
+%If you absolutely need footnotes on the last page, consider staying away from two-column balancing on the last page.
+%
+%About subfigures:
+%Both well-known packages subfig and subcaption can be used.
+%However, they are not compatible with each other and we can either load one or the other.
+%The document class provides options to load them for you with some customized style settings.
%
%\section{Requirements}
%
@@ -142,6 +161,7 @@
%\item cleveref
%\item csquotes
%\item diagbox
+%\item doclicense
%\item etoolbox
%\item extdash
%\item flushend
@@ -164,6 +184,7 @@
%\item pdflscape
%\item siunitx
%\item stfloats
+%\item subcaption
%\item subfig
%\item tcolorbox
%\item times
@@ -222,13 +243,25 @@ pause% \end{macrocode}
\NeedsTeXFormat{LaTeX2e}
% Provide the name of your document class, the date it was last updated, and a comment about what it's used for
-\ProvidesClass{cs-techrep}[2024/04/10 Technical Reports in Computer Science and Software Engineering v0.2]
+\ProvidesClass{cs-techrep}[2024/09/16 Technical Reports in Computer Science and Software Engineering v0.4]
% Define marker counter for options (counter are global in latex):
+\newcounter{cstechrep@subfigtracker}
+\newcounter{cstechrep@subcaptiontracker}
\newcounter{cstechrep@pbalancetracker}
\newcounter{cstechrep@flushendtracker}
% Declare options:
+
+\DeclareOption{subfig}{
+ \setcounter{cstechrep@subfigtracker}{1}
+ \typeout{cs-techrep class: subfig option is set (use subfloat command).}
+}
+\DeclareOption{subcaption}{
+ \setcounter{cstechrep@subcaptiontracker}{1}
+ \typeout{cs-techrep class: subcaption option is set (use subfigure command).}
+}
+
\DeclareOption{onecolumn}{\OptionNotUsed} % IEEE option onecolumn will be ignored
\DeclareOption{pbalance}{
@@ -268,7 +301,7 @@ pause% \end{macrocode}
\DefcstechrepVar{Department} % e.g., Department of Electrical Engineering, Media and Computer Science
\DefcstechrepVar{Institution} % e.g., Ostbayerische Technische Hochschule Amberg-Weiden
\DefcstechrepVar{Address} % e.g., Amberg, Germany
-\DefcstechrepVar{Series} % e.g., Technical Reports
+\DefcstechrepVar{Type} % e.g., Technical Report
\DefcstechrepVar{Year} % e.g., 2023
\DefcstechrepVar{Title}
\DefcstechrepVar{Month} % e.g., 6 (for June)
@@ -355,7 +388,7 @@ pause% \end{macrocode}
\RequirePackage[cmyk, table]{xcolor}
-\RequirePackage[nolist]{acronym}
+\RequirePackage[nolist,smaller]{acronym}
% Code Listings
\RequirePackage{listings}
@@ -456,7 +489,7 @@ pause% \end{macrocode}
\RequirePackage{booktabs}
% Extended enumerate, such as \begin{compactenum}
-\RequirePackage{paralist}
+\RequirePackage[alwaysadjust]{paralist}
% Read: Is there a disadvantage to using natbib=true with biblatex?
% https://tex.stackexchange.com/questions/149313/is-there-a-disadvantage-to-using-natbib-true-with-biblatex
@@ -490,6 +523,7 @@ pause% \end{macrocode}
autolang=other
]{biblatex}
+% Due to applied option defernumbers=true:
% Prevent citations in the references are being numbered as '0' in ArXiv
% https://tex.stackexchange.com/questions/463556/all-the-citations-in-the-references-are-being-numbered-as-0-in-arxiv-while-upl
\makeatletter
@@ -636,9 +670,9 @@ pause% \end{macrocode}
\RequirePackage{pdflscape}
\RequirePackage{afterpage}
-% Allows to hyphenate a word that contains a dash:
-% https://stackoverflow.com/questions/2193307/how-do-i-get-latex-to-hyphenate-a-word-that-contains-a-dash
-\RequirePackage[shortcuts]{extdash} % Use \-/ for a breakable dash that does not prevent the remainer of the word to be hyphenated
+% requires, e.g., \PassOptionsToPackage{
+% type=CC,modifier=by,version=4.0}{doclicense} before \documentclass
+\RequirePackage[hyperxmp=false,lang=English]{doclicense}
% Improve wrapping of URLs - hint by http://tex.stackexchange.com/a/10419/9075
\makeatletter
@@ -651,7 +685,9 @@ pause% \end{macrocode}
\begin{minipage}{0.8\textwidth}
\centering
% Creative Commons / Open Access:
- \href{https://creativecommons.org/licenses/by/4.0/}{\ccby{} This work is licensed under a Creative Commons Attribution 4.0 International (CC BY 4.0) License.}
+ %\href{https://creativecommons.org/licenses/by/4.0/}{\ccby{} This work is %licensed under a Creative Commons Attribution 4.0 International (CC BY 4.0) %License.}
+ % License based on doclicense package:
+ \href{\doclicenseURL}{\doclicenseIcon{} This work is licensed under a \doclicenseLongNameRef{} (\doclicenseNameRef{}) license.}
% Citation advice:
\\Please cite as: \fullcite{selfref}.
\end{minipage}
@@ -683,7 +719,18 @@ pause% \end{macrocode}
\cstechrepAddress
}}
-\IEEEspecialpapernotice{\cstechrepSeries: \cstechrepNumber, \citemonth{selfref} \cstechrepYear}
+\IEEEspecialpapernotice{\cstechrepType: \cstechrepNumber, \citemonth{selfref} \cstechrepYear}
+
+% subfigure captions with parentheses and footnotesize:
+\ifnum\value{cstechrep@subfigtracker}=1
+ \typeout{cs-techrep class: load subfig package (use subfloat command).}
+ \RequirePackage[caption=false,font=footnotesize]{subfig}
+\fi
+\ifnum\value{cstechrep@subcaptiontracker}=1
+ \typeout{cs-techrep class: load subcaption package (use subfigure command).}
+ \RequirePackage{subcaption}
+ \captionsetup[subfigure]{labelformat=parens,font=footnotesize}
+\fi
% Balance/level columns at the last page / in bibliography
% DISCLAIMER: No solution is a 100%/perfect one!
@@ -699,6 +746,14 @@ pause% \end{macrocode}
\RequirePackage{flushend}
\fi
+% ========================================================
+% Packages that need to be loaded last:
+
+% Allows to hyphenate a word that contains a dash:
+% https://stackoverflow.com/questions/2193307/how-do-i-get-latex-to-hyphenate-a-word-that-contains-a-dash
+\RequirePackage[shortcuts]{extdash} % Use \-/ for a breakable dash that does not prevent the remainer of the word to be hyphenated
+% ========================================================
+
% Finally, we'll use \endinput to indicate that LaTeX can stop reading this file. LaTeX will ignore anything after this line.
\endinput
% \end{macrocode}
diff --git a/macros/latex/contrib/cs-techrep/cs-techrep.ins b/macros/latex/contrib/cs-techrep/cs-techrep.ins
index 0fc5868464..51ed401600 100644
--- a/macros/latex/contrib/cs-techrep/cs-techrep.ins
+++ b/macros/latex/contrib/cs-techrep/cs-techrep.ins
@@ -1,4 +1,4 @@
-% cs-techrep.ins generated using makedtx version 1.2 2024/4/10 18:14
+% cs-techrep.ins generated using makedtx version 1.2 2024/9/14 21:40
\input docstrip
\preamble
diff --git a/macros/latex/contrib/cs-techrep/cs-techrep.pdf b/macros/latex/contrib/cs-techrep/cs-techrep.pdf
index 766e80d57b..6374436b6c 100644
--- a/macros/latex/contrib/cs-techrep/cs-techrep.pdf
+++ b/macros/latex/contrib/cs-techrep/cs-techrep.pdf
Binary files differ
diff --git a/macros/latex/contrib/cs-techrep/template/cpn_all_all.bib b/macros/latex/contrib/cs-techrep/template/cpn_all_all.bib
index cc7abaec4a..ba79c01832 100644
--- a/macros/latex/contrib/cs-techrep/template/cpn_all_all.bib
+++ b/macros/latex/contrib/cs-techrep/template/cpn_all_all.bib
@@ -1,3 +1,4 @@
+
@Thesis{neumann2004sa,
author = {Neumann, Christoph P.},
title = {{Conceptional Design and Realization of a `Component Test Stand' for Measurements on Enterprise JavaBeans}},
@@ -7,6 +8,7 @@
type = {Studienarbeit},
_url = {https://www.cyberlytics.eu/theses/all/Studienarbeit_ChristophPeterNeumann_revised/}
}
+
@Thesis{neumann2005da,
author = {Neumann, Christoph P.},
title = {{Design of an Open Framework for Optimizing the Distribution of Hardware and Software Components in Control Networks for Vehicles}},
@@ -16,6 +18,7 @@
type = {Diplomarbeit},
_url = {https://www.cyberlytics.eu/theses/all/Diplomarbeit_ChristophPeterNeumann_original/}
}
+
@INPROCEEDINGS{MeNe04testejb,
author = {Marcus Meyerh{\"o}fer and Christoph Neumann},
title = {{TestEJB} -- A Measurement Framework for {EJBs}},
@@ -35,21 +38,20 @@
@INPROCEEDINGS{NHSL09oxdbs,
author = {Christoph P. Neumann and Stefan Hanisch and Bernhard Schiemann and
- Richard Lenz},
+ Richard Lenz},
title = {{OXDBS -- Erweiterung einer nativen XML\-/Datenbank um die Validierung
- und Konsistenzpr{\"u}fung gegen eine OWL\-/Ontologie}},
+ und Konsistenzpr{\"u}fung gegen eine OWL\-/Ontologie}},
booktitle = {Tagungsband der 54.\,GMDS\-/Jahrestagung},
year = {2009},
_pages = {271:1--271:2},
address = {Essen, DE},
month = sep,
organization = {{Deutsche Gesellschaft f{\"u}r Medizinische Informatik, Biometrie
- und Epidemiologie} (GMDS)},
+ und Epidemiologie} (GMDS)},
doi = {10.3205/09GMDS271},
_url = {http://www.egms.de/en/meetings/gmds2009/09gmds271.shtml},
}
-
@INPROCEEDINGS{NeWL09xdsrig,
author = {Christoph P. Neumann and Florian Wagner and Richard Lenz},
title = {{XdsRig -- Eine Open\-/Source IHE XDS Testumgebung}},
@@ -59,15 +61,14 @@
address = {Essen, DE},
month = sep,
organization = {{Deutsche Gesellschaft f{\"u}r Medizinische Informatik, Biometrie
- und Epidemiologie} (GMDS)},
+ und Epidemiologie} (GMDS)},
doi = {10.3205/09GMDS276},
_url = {http://www.egms.de/en/meetings/gmds2009/09gmds276.shtml},
}
-
@INPROCEEDINGS{NRDL09deus,
- author = {Christoph P. Neumann and Florian Rampp and Michael Daum and Richard Lenz},
- title = {{A Mediated Publish\-/Subscribe System for Inter\-/Institutional Process Support in Healthcare}},
+ author = {Christoph P. Neumann and Florian Rampp and Michael Daum and Richard Lenz},
+ title = {{A Mediated Publish\-/Subscribe System for Inter\-/Institutional Process Support in Healthcare}},
booktitle = {Proc of the 3rd ACM Int'l Conf on Distributed Event\-/Based Systems (DEBS 2009)},
year = {2009},
_chapter = {14},
@@ -85,8 +86,8 @@
author = {Christoph P. Neumann and Richard Lenz},
title = {{alpha\-/Flow: A Document\-/based Approach to Inter\-/Institutional Process Support in Healthcare}},
booktitle = {Proc of the 3rd Int'l Workshop on Process\-/oriented Information Systems
- in Healthcare (ProHealth'09) in conjunction with the 7th Int'l Conf
- on Business Process Management (BPM'09)},
+ in Healthcare (ProHealth'09) in conjunction with the 7th Int'l Conf
+ on Business Process Management (BPM'09)},
year = {2009},
pages = {569--580},
address = {Ulm, DE},
@@ -100,10 +101,10 @@
@INPROCEEDINGS{NeLe09dmps,
author = {Christoph P. Neumann and Richard Lenz},
title = {{A Light\-/Weight System Extension Supporting Document\-/based Processes
- in Healthcare}},
+ in Healthcare}},
booktitle = {Proc of the 3rd Int'l Workshop on Process\-/oriented Information Systems
- in Healthcare (ProHealth'09) in conjunction with the 7th Int'l Conf
- on Business Process Management (BPM'09)},
+ in Healthcare (ProHealth'09) in conjunction with the 7th Int'l Conf
+ on Business Process Management (BPM'09)},
year = {2009},
pages = {557--568},
address = {Ulm, DE},
@@ -140,12 +141,13 @@
doi = {10.1145/1866480.1866502},
_isbn = {978\-/1\-/60558\-/900\-/8},
}
+
@INPROCEEDINGS{NSWL11alphaadaptive,
author = {Christoph P. Neumann and Peter K. Schwab and Andreas M. Wahl and Richard Lenz},
title = {{alpha\-/Adaptive: Evolutionary Workflow Metadata in Distributed Document\-/Oriented Process Management}},
booktitle = {Proc of the 4th Int'l Workshop on Process\-/oriented Information Systems
- in Healthcare (ProHealth'11) in conjunction with the 9th Int'l Conf
- on Business Process Management (BPM'11)},
+ in Healthcare (ProHealth'11) in conjunction with the 9th Int'l Conf
+ on Business Process Management (BPM'11)},
year = {2011},
pages = {225--236},
address = {Clermont\-/Ferrand, FR},
@@ -209,26 +211,26 @@
}
@MastersThesis{Neumann2012dissPreprint_OldBibTeX,
- author = {Christoph P. Neumann},
- title = {{Distributed Document\-/Oriented Process Management in Healthcare}},
- school = {Friedrich\-/Alexander\-/Universit{\"a}t Erlangen\-/N{\"u}rnberg},
- type = {Dissertation},
- _type = {`Dissertation' (PhD thesis)},
- _type = {PhD thesis (`Dissertation' in Germany)},
- month = nov,
- year = 2012,
- url = {https://nbn-resolving.org/urn:nbn:de:bvb:29-opus-39070}
+ author = {Christoph P. Neumann},
+ title = {{Distributed Document\-/Oriented Process Management in Healthcare}},
+ school = {Friedrich\-/Alexander\-/Universit{\"a}t Erlangen\-/N{\"u}rnberg},
+ type = {Dissertation},
+ _type = {`Dissertation' (PhD thesis)},
+ _type = {PhD thesis (`Dissertation' in Germany)},
+ month = nov,
+ year = 2012,
+ url = {https://nbn-resolving.org/urn:nbn:de:bvb:29-opus-39070}
}
@phdthesis{Neumann2012dissPreprint,
- author = {Christoph P. Neumann},
- title = {{Distributed Document\-/Oriented Process Management in Healthcare}},
- school = {Friedrich\-/Alexander\-/Universit{\"a}t Erlangen\-/N{\"u}rnberg},
- month = nov,
- year = 2012,
- address = {Erlangen},
- doi = {10.13140/RG.2.2.14719.79521},
- url = {https://nbn-resolving.org/urn:nbn:de:bvb:29-opus-39070}
+ author = {Christoph P. Neumann},
+ title = {{Distributed Document\-/Oriented Process Management in Healthcare}},
+ school = {Friedrich\-/Alexander\-/Universit{\"a}t Erlangen\-/N{\"u}rnberg},
+ month = nov,
+ year = 2012,
+ address = {Erlangen},
+ doi = {10.13140/RG.2.2.14719.79521},
+ url = {https://nbn-resolving.org/urn:nbn:de:bvb:29-opus-39070}
}
@INPROCEEDINGS{NeLe13adhocCoop,
@@ -244,7 +246,9 @@
_isbn = {978\-/3\-/642\-/36437\-/2},
doi = {10.1007/978-3-642-36438-9_8},
_url = {https://doi.org/10.1007/978-3-642-36438-9_8},
-}@incollection{Neumann2012lni,
+}
+
+@incollection{Neumann2012lni,
author={Christoph P. Neumann},
editor={Abraham Bernstein and Wolfgang Effelsberg and Steffen H{\"o}lldobler and Hans{-}Peter Lenhof and Klaus{-}Peter L{\"o}hr and Paul Molitor and Gustaf Neumann and R{\"u}diger Reischuk and Nicole Schweikardt and Myra Spiliopoulou and Harald St{\"o}rrle and Sabine S{\"u}sstrunk},
title={Verteiltes Dokumenten\-/orientiertes Prozessmanagement im Gesundheitswesen},
@@ -256,18 +260,19 @@
year={2012},
url={https://dl.gi.de/20.500.12116/33740}
}
+
@BOOK{Neumann2013dissBook,
- author = {Christoph P. Neumann},
- title = {{Distributed Case Handling}},
- year = 2013,
- publisher = {Verlag Dr.~Hut},
- address = {M{\"u}nchen},
- isbn = {9783843909198},
- _urn = {urn:nbn:de:bvb:29\-/opus\-/39070},
- _url = {https://d-nb.info/1033041637},
- _note = {\url{http://www.opus.ub.uni-erlangen.de/opus/volltexte/2012/3907/}(preprint version)},
- _note = {\url{https://d-nb.info/1033041637}(DNB)},
- _note = {\url{https://www.dr.hut-verlag.de/978-3-8439-0919-8.html}(URL)}
+ author = {Christoph P. Neumann},
+ title = {{Distributed Case Handling}},
+ year = 2013,
+ publisher = {Verlag Dr.~Hut},
+ address = {M{\"u}nchen},
+ isbn = {9783843909198},
+ _urn = {urn:nbn:de:bvb:29\-/opus\-/39070},
+ _url = {https://d-nb.info/1033041637},
+ _note = {\url{http://www.opus.ub.uni-erlangen.de/opus/volltexte/2012/3907/}(preprint version)},
+ _note = {\url{https://d-nb.info/1033041637}(DNB)},
+ _note = {\url{https://www.dr.hut-verlag.de/978-3-8439-0919-8.html}(URL)}
}
@INPROCEEDINGS{IND+09lzatav,
@@ -363,11 +368,10 @@
month=apr,
year={2024},
doi = {10.48550/arXiv.2404.02637},
- _url = {https://www.thinkmind.org/index.php?view=article&articleid=cloud_computing_2024_X_YY_ZZZZZ},
- _url = {https://doi.org/10.48550/arXiv.2404.02637},
+ _url = {https://www.thinkmind.org/index.php?view=article&articleid=cloud_computing_2024_2_10_28007},
+ _url2 = {https://doi.org/10.48550/arXiv.2404.02637},
_issn = {2308\-/4294},
- _pages = {AA--OO},
- note = {accepted for publication}
+ pages = {19--24}
}
@INPROCEEDINGS{ToNe11alphaprops,
@@ -425,6 +429,28 @@
_url2 = {https://www.oth-aw.de/files/oth-aw/Aktuelles/Veroeffentlichungen/Forschungsbericht/OTH_Forschungsbericht_2024.pdf},
_url3 = {https://www.researchgate.net/profile/Christoph-Neumann-8/publication/379109359_Analyse_von_Methoden_zur_Sicherung_der_Vertraulichkeit_in_Neuronalen_Netzen/links/65faff43a4857c7962654c5c/Analyse-von-Methoden-zur-Sicherung-der-Vertraulichkeit-in-Neuronalen-Netzen.pdf}
}
+
+@MISC{StNe24kosmosis,
+ title={The Kosmosis Use-Case of Crypto Rug Pull Detection and Prevention},
+ author={Philipp Stangl and Christoph P. Neumann},
+ year={2024},
+ eprint={2405.19762},
+ archivePrefix={arXiv},
+ primaryClass={cs.CR}
+}
+
+@TECHREPORT{StNe24kosmosis-TR,
+ author = {Philipp Stangl and Christoph P. Neumann},
+ title = {{The Kosmosis Use-Case of Crypto Rug Pull Detection and Prevention}},
+ institution = {Ostbayerische Technische Hochschule Amberg\-/Weiden, CyberLytics\-/Lab at the Department of Electrical Engineering, Media and Computer Science},
+ series = {Technischer Bericht},
+ number = {CL-2024-01},
+ year = 2024,
+ month = 2,
+ doi = {10.48550/arXiv.2405.19762},
+ _url = {https://doi.org/10.48550/arXiv.2405.19762},
+}
+
@TECHREPORT{ModA-TR-2021SS-WAE-TeamWeiss-CovidDashboard,
author = {Tobias Bauer and Albert Hahn and Lukas Kleinlein and Nicolas Proske and Leonard W{\"o}llmer and Andrei Trukhin and Christoph P. Neumann},
title = {{Covidash: Eine MEAN\-/Variation-basierte Webanwendung für Inzidenz\-/Zahlen und Impffortschritt in Deutschland}},
@@ -543,7 +569,6 @@
_url = {https://dx.doi.org/10.13140/RG.2.2.33933.31209},
}
-
@TECHREPORT{ModA-TR-2023SS-BDCC-TeamRot-CompVisPipeline,
author = {André Kestler and Antonio Vidos and Marcus Haberl and Tobias Dobmeier and Tobias Lettner and Tobias Weiß and Christoph P. Neumann},
title = {{Computer Vision Pipeline: Eine React- und Flask\-/basierte Webanwendung zur No\-/Code\-/Bildverarbeitung mit Cloud\-/Deployment}},
@@ -622,4 +647,107 @@
doi = {10.13140/RG.2.2.22177.79209},
_url = {https://dx.doi.org/10.13140/RG.2.2.22177.79209},
}
+@TECHREPORT{ModA-TR-2024SS-CCT-TeamGruen-CloudDice,
+ author = {Lukas Rupp and Franziska Rubenbauer and Christoph P. Neumann},
+ title = {{CloudDice: Ein React\-/basiertes Kniffel-Würfelspiel}},
+ institution = {Ostbayerische Technische Hochschule Amberg\-/Weiden, CyberLytics\-/Lab an der Fakult{\"a}t Elektrotechnik, Medien und Informatik},
+ series = {Technische Berichte},
+ number = {CL-2024-14},
+ year = 2024,
+ month = 7,
+ doi = {10.13140/RG.2.2.11229.83686},
+ _url = {https://dx.doi.org/10.13140/RG.2.2.11229.83686},
+}
+
+@TECHREPORT{ModA-TR-2024SS-BCN-TeamCyan-SkillIssue,
+ author = {Fabian Heindl and Paul Brand and Daniel Reichert and Christoph P. Neumann},
+ title = {{SkillIssue: A MERN\-/based Low\-/Latency Multi\-/User Game for Displaying True Skill With Your Friends}},
+ institution = {Ostbayerische Technische Hochschule Amberg\-/Weiden, CyberLytics\-/Lab an der Fakult{\"a}t Elektrotechnik, Medien und Informatik},
+ type = {Technical Reports},
+ number = {CL-2024-12},
+ year = 2024,
+ month = 7,
+ doi = {10.13140/RG.2.2.32201.35686},
+ _url = {https://dx.doi.org/10.13140/RG.2.2.32201.35686},
+}
+@TECHREPORT{ModA-TR-2024SS-BCN-TeamGelb-GoalGuru,
+ author = {Bernhard Gailer and Timo Gräf and Maria Lyoteva and Tsvetan Stanchev and Apporva Bhoir and Christoph P. Neumann},
+ title = {{GoalGuru: A React- and FastAPI\-/based Cloud Application for Predicting Soccer Games Outcome}},
+ institution = {Ostbayerische Technische Hochschule Amberg\-/Weiden, CyberLytics\-/Lab an der Fakult{\"a}t Elektrotechnik, Medien und Informatik},
+ type = {Technical Reports},
+ number = {CL-2024-11},
+ year = 2024,
+ month = 7,
+ doi = {10.13140/RG.2.2.18779.58407},
+ _url = {https://dx.doi.org/10.13140/RG.2.2.18779.58407},
+}
+@TECHREPORT{ModA-TR-2024SS-BCN-TeamWeiss-InfluenzaConnect,
+ author = {Sebastian Weidner and Jonas Hermann and Nils Bayerl and Dominik Schwagerl and \ Timon Spichtinger and Christoph P. Neumann},
+ title = {{InfluenzaConnect: Eine React- und Flask\-/basierte Webanwendung für Influencer\-/Marketing}},
+ institution = {Ostbayerische Technische Hochschule Amberg\-/Weiden, CyberLytics\-/Lab an der Fakult{\"a}t Elektrotechnik, Medien und Informatik},
+ type = {Technische Berichte},
+ number = {CL-2024-10},
+ year = 2024,
+ month = 7,
+ doi = {10.13140/RG.2.2.25490.47041},
+ _url = {https://dx.doi.org/10.13140/RG.2.2.25490.47041},
+}
+
+@TECHREPORT{ModA-TR-2024SS-BCN-TeamGruen-NanoVend,
+ author = {Lukas Hirsch and Johannes Küffner and Denis Tomazi and Christoph P. Neumann},
+ title = {{NanoVend: Ein Cloud\-/native E-Commerce\-/Backend als Baukasten für mittelständische Unternehmen}},
+ institution = {Ostbayerische Technische Hochschule Amberg\-/Weiden, CyberLytics\-/Lab an der Fakult{\"a}t Elektrotechnik, Medien und Informatik},
+ type = {Technische Berichte},
+ number = {CL-2024-08},
+ year = 2024,
+ month = 7,
+ doi = {10.13140/RG.2.2.12068.69761},
+ _url = {https://dx.doi.org/10.13140/RG.2.2.12068.69761},
+}
+@TECHREPORT{ModA-TR-2024SS-BCN-TeamRot-StockSentinel,
+ author = {Andreas Hecht and Linus Heise and Oliver Kneidl and Eva-Maria Maurer and Christoph P. Neumann},
+ title = {{StockSentinel: AI\-/Powered Web Tool for Analyzing the Markets Perception of Stocks}},
+ institution = {Ostbayerische Technische Hochschule Amberg\-/Weiden, CyberLytics\-/Lab an der Fakult{\"a}t Elektrotechnik, Medien und Informatik},
+ type = {Technical Reports},
+ number = {CL-2024-07},
+ year = 2024,
+ month = 7,
+ doi = {10.13140/RG.2.2.20457.30564},
+ _url = {https://dx.doi.org/10.13140/RG.2.2.20457.30564},
+}
+@TECHREPORT{ModA-TR-2024SS-WAE-TeamCyan-Connect4IfYouCan,
+ author = {Amos Asmerom and Daniel Reichert and Fabian Heindl and Christoph P. Neumann},
+ title = {{Connect4IfYouCan: A MERN\-/based Web Game for Competitive Two Player Matches}},
+ institution = {Ostbayerische Technische Hochschule Amberg\-/Weiden, CyberLytics\-/Lab an der Fakult{\"a}t Elektrotechnik, Medien und Informatik},
+ type = {Technical Reports},
+ number = {CL-2024-06},
+ year = 2024,
+ month = 7,
+ doi = {10.13140/RG.2.2.27168.19200},
+ _url = {https://dx.doi.org/10.13140/RG.2.2.27168.19200},
+}
+
+@TECHREPORT{ModA-TR-2024SS-WAE-TeamWeiss-Geodingens,
+ author = {Viktor Hense and Johannes Lindner and Lukas Mrosek and Christoph P. Neumann},
+ title = {{Geodingens: A Web Application for Intuitive and User\-/friendly Work with Geopandas}},
+ institution = {Ostbayerische Technische Hochschule Amberg\-/Weiden, CyberLytics\-/Lab an der Fakult{\"a}t Elektrotechnik, Medien und Informatik},
+ type = {Technical Reports},
+ number = {CL-2024-04},
+ year = 2024,
+ month = 7,
+ doi = {10.13140/RG.2.2.13746.41929},
+ _url = {https://dx.doi.org/10.13140/RG.2.2.13746.41929},
+}
+
+@TECHREPORT{ModA-TR-2024SS-WAE-TeamGruen-MunchMunch,
+ author = {Juliana Kühn and Nikolett Rácz and Raffael Friedl and Maximilian Lippmann and Christoph P. Neumann},
+ title = {{MunchMunch: Eine MERN\-/basierte kulinarische Web-Anwendung für verbessertes User Engagement beim Entdecken neuer Gerichte und Rezepte}},
+ institution = {Ostbayerische Technische Hochschule Amberg\-/Weiden, CyberLytics\-/Lab an der Fakult{\"a}t Elektrotechnik, Medien und Informatik},
+ type = {Technische Berichte},
+ number = {CL-2024-02},
+ year = 2024,
+ month = 7,
+ doi = {10.13140/RG.2.2.23812.74883},
+ _url = {https://dx.doi.org/10.13140/RG.2.2.23812.74883},
+}
diff --git a/macros/latex/contrib/cs-techrep/template/cpn_supervised_all.bib b/macros/latex/contrib/cs-techrep/template/cpn_supervised_all.bib
index d4341f790c..910906ac9a 100644
--- a/macros/latex/contrib/cs-techrep/template/cpn_supervised_all.bib
+++ b/macros/latex/contrib/cs-techrep/template/cpn_supervised_all.bib
@@ -1,3 +1,4 @@
+
@Thesis{kampf2012bt,
author = {Kampf, Marvin},
title = {{alpha\-/CDM: Konzeption und Implementierung eines Modells zur Inhaltsabh{\"a}ngigkeit als Baustein einer Prozessunterst{\"u}tzung auf Basis von aktiven Dokumenten}},
diff --git a/macros/latex/contrib/cs-techrep/template/cs-techrep-example-neumann.pdf b/macros/latex/contrib/cs-techrep/template/cs-techrep-example-neumann.pdf
index ca478d3d61..c0c516b25b 100644
--- a/macros/latex/contrib/cs-techrep/template/cs-techrep-example-neumann.pdf
+++ b/macros/latex/contrib/cs-techrep/template/cs-techrep-example-neumann.pdf
Binary files differ
diff --git a/macros/latex/contrib/cs-techrep/template/cs-techrep-example-neumann.tex b/macros/latex/contrib/cs-techrep/template/cs-techrep-example-neumann.tex
index 1ae583aed0..5dc34ceb3f 100644
--- a/macros/latex/contrib/cs-techrep/template/cs-techrep-example-neumann.tex
+++ b/macros/latex/contrib/cs-techrep/template/cs-techrep-example-neumann.tex
@@ -1,7 +1,8 @@
+\PassOptionsToPackage{type=CC,modifier=by,version=4.0}{doclicense}
\documentclass[conference,a4paper,flushend]{cs-techrep}
\pdfoutput=1 % pdflatex hint for arxiv.org (within first 5 lines)
-% Class iaria.cls loads biblatex / biber with predefined options
+% Class cs-techrep.cls loads biblatex / biber with predefined options
\addbibresource{embedded.bib} % its content is declared below, embedded within this tex-file
\addbibresource{webdev_commons.bib} % includes REST, React, Angular, Vue, Svelte, Docker, AWS-*, Socket.IO, and many more!
\addbibresource{cpn_all_all.bib} % includes all previous CyberLytics@OTH-AW technical reports
@@ -17,7 +18,7 @@
%\cstechrepAuthorListBib{Vorname1 Nachname1 and Vorname2 Nachname2 and Vorname3 Nachname3 and Vorname4 Nachname4 and Vorname5 Nachname5 and Vorname6 Nachname6 and Christoph P. Neumann}
% Capitalization: https://capitalizemytitle.com/style/Chicago/
-\cstechrepTitleTex{The cs-techrep Example of a Technical Report in Computer Science and Software Engineering}
+\cstechrepTitleTex{The cs-techrep Paper Example of a Technical Report in Computer Science or Software Engineering}
% IF you need manual linebreaks in the titel, then clone the title without linebreaks for BibTeX:
\cstechrepTitleBib{{\cstechrepTitleTex}}
%\cstechrepTitleBib{The cs-techrep \LaTeX{} Class Example of a Software Engineering Technical Report}
@@ -27,11 +28,11 @@
\cstechrepInstitution{Ostbayerische Technische Hochschule Amberg\-/Weiden}
\cstechrepAddress{Amberg, Germany}
%\cstechrepAddress{Amberg, Deutschland} % DE
-\cstechrepSeries{Technical Reports}
-%\cstechrepSeries{Technische Berichte} % DE
-\cstechrepYear{2024}
-\cstechrepMonth{3}
-\cstechrepNumber{CL-\cstechrepYear{}-42}
+\cstechrepType{Technical Report}
+%\cstechrepType{Technischer Bericht} % DE
+\cstechrepYear{2024} % CTAN
+\cstechrepMonth{9} % CTAN
+\cstechrepNumber{CL-TR-\cstechrepYear{}-99}
\cstechrepLang{english} % en-US
%\cstechrepLang{ngerman} % DE
@@ -47,7 +48,7 @@
author = {|cstechrepAuthorListBib},
title = {\cstechrepTitleBib},
institution = {\cstechrepInstitution, \cstechrepDepartment},
- series = {\cstechrepSeries},
+ type = {\cstechrepType},
number = {\cstechrepNumber},
year = {|cstechrepYear},
month = {|cstechrepMonth},
@@ -123,7 +124,7 @@
\maketitle
\begin{abstract}
-\lipsum[1][3-10]
+\lipsum[11]%[3-10]
\{\,\faWarning{}The abstract does neither mention a teaching module nor a team/project,
it is a summary of the content of the technical report, thus, the objectives and architecture.\}
\end{abstract}
@@ -146,7 +147,7 @@ The pipe symbol \textquote{\textbar{}} in the headings represents alternatives.
The problem statement needs to be written from perspective of a subject-matter expert (\textquote{Fachkonzept}). Like an elevator pitch / mission statement \faWarning{}. NOT from a technical perspective.
\section{Optional: Related Work \textbar{} State of the Art \textbar{} Methods \textbar{} Data Acquisition}
-\lipsum[2]
+\lipsum[12]
\section{Architectural Goals} % \textbar{} \textquote{Architekturziele}}
Provides
@@ -169,13 +170,13 @@ In discussions concerning multi-tier architecture, the term \textquote{layer} is
\subsection{Presentation Tier \textbar{} Frontend}
-\lipsum[3]
+\lipsum[13]
\subsection{Application Tier \textbar{} Backend \textbar{} \textquote{Anwendungskern}}
-\lipsum[4]
+\lipsum[14]
\subsection{Data Tier \textbar{} Persistence}
-\lipsum[5]
+\lipsum[15]
\subsection{Optional: Infrastructure and Deployment \textbar{} Distribution Perspective \textbar{} \textquote{Verteilungssicht}}
Provides (1) information about configuration, exact software versions, SBOM, DevOps, Cloud, AWS, and others.
@@ -184,51 +185,54 @@ Could include (3) a software bill of materials (SBOM), at least for the major li
\section{Discussion \textbar{} Evaluation \textbar{} \\ Lessons Learned \textbar{} Impediments}
-\lipsum[6]
+\lipsum[16]
\section{Conclusion and Future Work \textbar{} \\ \textquote{Fazit und Ausblick}}
-\lipsum[7]
+\lipsum[17]
-
-%%% Advisor
-\nocite{StNe23foodfresh}
-
-%%% First-Author
+%%% CPN Peer-Rev'd
+\nocite{LeNe24vocattllm} % Co
+\nocite{PANP23seccloudfogai} % Co
+\nocite{StNe23foodfresh} % Advisor
\nocite{NeLe13adhocCoop}
\nocite{Neumann2012lni}
\nocite{NeLe12alphaFlow}
\nocite{NeHL12hydra}
\nocite{NeWL12offsync}
+\nocite{WaNe12alphaoffsync} % Co
\nocite{NSWL11alphaadaptive}
+\nocite{ToNe11alphaprops} % Co
+\nocite{JBN+10fcmdb} % Co
+\nocite{FDI+10esmmog} % Co
\nocite{NeFL10oxdbs}
\nocite{NeLe10alphaUC}
+\nocite{ILN+09semrttx} % Co
+\nocite{NHSL09oxdbs} % DE
\nocite{NeLe09alphaflow}
\nocite{NeLe09dmps}
-\nocite{NHSL09oxdbs} % DE
\nocite{NeWL09xdsrig} % DE
\nocite{NRDL09deus}
+\nocite{IND+09lzatav} % Co (DE)
+\nocite{MeNe04testejb} % Pseudo-Co
-%%% Co-Authorship
-\nocite{LeNe24vocattllm}
-\nocite{PANP23seccloudfogai}
-\nocite{WaNe12alphaoffsync}
-\nocite{ToNe11alphaprops}
-\nocite{FDI+10esmmog}
-\nocite{JBN+10fcmdb}
-\nocite{ILN+09semrttx}
-\nocite{IND+09lzatav} % DE
-\nocite{MeNe04testejb}
-
-%%% Monographic Work
+%%% CPN Monographic Work
\nocite{Neumann2013dissBook}
\nocite{Neumann2012dissPreprint}
\nocite{neumann2005da}
\nocite{neumann2004sa}
%%% TechRep / Non-Peer-Reviewed
-
+\nocite{ModA-TR-2024SS-CCT-TeamGruen-CloudDice}
+\nocite{ModA-TR-2024SS-BCN-TeamCyan-SkillIssue}
+\nocite{ModA-TR-2024SS-BCN-TeamGelb-GoalGuru}
+\nocite{ModA-TR-2024SS-BCN-TeamWeiss-InfluenzaConnect}
+\nocite{ModA-TR-2024SS-BCN-TeamGruen-NanoVend}
+\nocite{ModA-TR-2024SS-BCN-TeamRot-StockSentinel}
+\nocite{ModA-TR-2024SS-WAE-TeamCyan-Connect4IfYouCan}
+\nocite{ModA-TR-2024SS-WAE-TeamWeiss-Geodingens}
+\nocite{ModA-TR-2024SS-WAE-TeamGruen-MunchMunch}
\nocite{SaNe24othfb}
-
+\nocite{StNe24kosmosis-TR}
\nocite{ModA-TR-2023SS-WAE-TeamWeiss-Neunerln}
\nocite{ModA-TR-2023SS-BDCC-TeamRot-CompVisPipeline}
\nocite{ModA-TR-2023SS-BDCC-TeamBlau-NauticalNonsense}
@@ -246,7 +250,6 @@ Could include (3) a software bill of materials (SBOM), at least for the major li
\nocite{ModA-TR-2021SS-WAE-TeamWeiss-CovidDashboard}
\nocite{ModA-TR-2021SS-WAE-TeamRot-FireForceDefense}
\nocite{ModA-TR-2021SS-WAE-TeamGruen-MedPlanner}
-
\nocite{NeRL12deus}
\nocite{LNR+11egr}
diff --git a/macros/latex/contrib/cs-techrep/template/selfref.bib b/macros/latex/contrib/cs-techrep/template/selfref.bib
index f498920efc..b6e15b23a7 100644
--- a/macros/latex/contrib/cs-techrep/template/selfref.bib
+++ b/macros/latex/contrib/cs-techrep/template/selfref.bib
@@ -2,9 +2,9 @@
author = {Christoph P. Neumann},
title = {\cstechrepTitleBib},
institution = {\cstechrepInstitution, \cstechrepDepartment},
- series = {\cstechrepSeries},
+ type = {\cstechrepType},
number = {\cstechrepNumber},
year = {2024},
- month = {3},
+ month = {9},
langid = {english},
}
diff --git a/macros/latex/contrib/cs-techrep/template/webdev_commons.bib b/macros/latex/contrib/cs-techrep/template/webdev_commons.bib
index 159bef9d0e..602a25edb6 100644
--- a/macros/latex/contrib/cs-techrep/template/webdev_commons.bib
+++ b/macros/latex/contrib/cs-techrep/template/webdev_commons.bib
@@ -1,572 +1,1234 @@
-
-@Online{sqlite,
- author = {Richard Hipp},
+@online{angular,
+ title = {{Angular}},
+ author = {Google},
+ url = {https://angular.io/},
+ note = {[Online]}
+}
+@online{asp,
+ title = {{ASP.NET}},
+ author = {Microsoft},
+ url = {https://dotnet.microsoft.com/apps/aspnet},
note = {[Online]},
- title = {{SQLite}: {F}eatures},
- url = {https://sqlite.org/features.html}
+ addendum = {(aufgerufen: 22.06.2024)},
+ ids = {asp_net}
+}
+@online{authjs,
+ title = {{Auth.js}},
+ author = {Balázs Orbán},
+ url = {https://authjs.dev/},
+ note = {[Online]}
+}
+@online{aws,
+ title = {{Amazon Web Services}},
+ author = {Amazon},
+ url = {https://aws.amazon.com/},
+ note = {[Online]}
+}
+@online{aws-apigateway,
+ title = {{AWS API Gateway}},
+ author = {Amazon},
+ url = {https://aws.amazon.com/api-gateway/},
+ note = {[Online]}
+}
+@online{aws-apprunner,
+ title = {{AWS AppRunner}},
+ author = {Amazon},
+ url = {https://aws.amazon.com/apprunner/},
+ note = {[Online]}
+}
+@online{aws-cli,
+ title = {{AWS CLI}},
+ author = {Amazon},
+ url = {https://aws.amazon.com/cli/},
+ note = {[Online]}
+}
+@online{aws-codebuild,
+ title = {{AWS CodeBuild}},
+ author = {Amazon},
+ url = {https://aws.amazon.com/de/codebuild/},
+ note = {[Online]}
+}
+@online{aws-codecommit,
+ title = {{AWS CodeCommit}},
+ author = {Amazon},
+ url = {https://aws.amazon.com/de/codecommit/},
+ note = {[Online]}
+}
+@online{aws-codepipeline,
+ title = {{AWS CodePipeline}},
+ author = {Amazon},
+ url = {https://aws.amazon.com/de/codepipeline/},
+ note = {[Online]}
+}
+@online{aws-cognito,
+ title = {{{AWS Cognito}: Identity Platform}},
+ author = {Amazon},
+ url = {https://aws.amazon.com/cognito/},
+ note = {[Online]}
+}
+@online{aws-ec2,
+ title = {{AWS EC2}},
+ author = {Amazon},
+ url = {https://aws.amazon.com/ec2/},
+ note = {[Online]}
+}
+@online{aws-ecr,
+ title = {{AWS ECR}},
+ author = {Amazon},
+ url = {https://aws.amazon.com/ecr/},
+ note = {[Online]}
+}
+@online{aws-elasticbeanstalk,
+ title = {{AWS Elastic Beanstalk}},
+ author = {Amazon},
+ url = {https://aws.amazon.com/elasticbeanstalk/},
+ note = {[Online]}
+}
+@online{aws-iam,
+ title = {{AWS IAM}},
+ author = {Amazon},
+ url = {https://aws.amazon.com/iam/},
+ note = {[Online]}
+}
+@online{aws-lambda,
+ title = {{AWS Lambda}},
+ author = {Amazon},
+ url = {https://aws.amazon.com/lambda/},
+ note = {[Online]}
+}
+@online{aws-s3,
+ title = {{Amazon S3}},
+ author = {Amazon},
+ url = {https://aws.amazon.com/s3/},
+ note = {[Online]}
+}
+@online{aws-sam,
+ title = {{AWS SAM}},
+ author = {Amazon},
+ url = {https://aws.amazon.com/serverless/sam/},
+ note = {[Online]}
+}
+@online{aws-sdk-js,
+ title = {{{AWS SDK} for {JavaScript}}},
+ author = {Amazon},
+ url = {https://www.npmjs.com/package/aws-sdk},
+ note = {[Online]}
}
-
-@Online{django,
+@online{aws-toolkit-intelij,
+ title = {{{AWS Toolkit} for {IntelliJ IDEA}}},
+ author = {Amazon},
+ url = {https://aws.amazon.com/intellij/},
+ note = {[Online]}
+}
+@online{axios,
+ title = {{Axios}},
+ author = {Matt Zabriskie},
+ url = {https://axios-http.com/},
+ note = {[Online]}
+}
+@online{bootstrap,
+ title = {{Bootstrap: Build fast, responsive sites}},
+ author = {Mark Otto und Jacob Thornton},
+ url = {https://getbootstrap.com/},
+ note = {[Online]}
+}
+@online{boto3,
+ title = {{{Boto3}: {AWS SDK} for Python}},
+ author = {Amazon},
+ url = {https://boto3.amazonaws.com/v1/documentation/api/latest/index.html},
+ note = {[Online]}
+}
+@online{catapi,
+ title = {{The Cat {API}}},
+ author = {Aden Forshaw},
+ url = {https://thecatapi.com/},
+ note = {[Online]}
+}
+@online{chai,
+ title = {{Chai Assertion Library}},
+ author = {Chai},
+ url = {https://www.chaijs.com/},
+ note = {[Online]}
+}
+@online{chess,
+ title = {{Chess}},
+ author = {chess.com},
+ url = {https://www.chess.com/},
+ note = {[Online]}
+}
+@online{csharp,
+ title = {{{C\#} Programming Language}},
+ author = {Microsoft},
+ url = {https://learn.microsoft.com/dotnet/csharp/},
+ note = {[Online]}
+}
+@online{cypress,
+ title = {{Cypress}},
+ author = {Brian Mann},
+ url = {https://www.cypress.io/},
+ note = {[Online]}
+}
+@online{d3js,
+ title = {{D3.js}},
+ author = {Observable},
+ url = {https://d3js.org},
+ note = {[Online]}
+}
+@online{django,
+ title = {{Django}},
author = {Adrian Holovaty and Simon Willison},
- note = {[Online]},
- title = {Django},
url = {https://www.djangoproject.com/},
+ note = {[Online]}
}
-
-@Online{fastapi,
- author = {Sebastián Ramírez},
- note = {[Online]},
- title = {FastAPI},
- url = {https://fastapi.tiangolo.com/},
-}
-
-@Online{docker,
+@online{docker,
+ title = {{Docker: Accelerated Container Application Development}},
author = {Docker},
- note = {[Online]},
- title = {Docker: Accelerated Container Application Development},
url = {https://www.docker.com/},
+ note = {[Online]}
}
-
-@Online{elasticsearch,
- author = {Elastic},
- note = {[Online]},
- title = {Elasticsearch Platform},
- url = {https://www.elastic.co/de/elasticsearch/},
-}
-
-@Online{react,
- author = {Facebook},
- note = {[Online]},
- title = {React},
- url = {https://react.dev/},
+@online{docker-compose,
+ title = {{Compose: Defining and Running Multi-Container Docker Applications}},
+ author = {Docker},
+ url = {https://docs.docker.com/compose/},
+ note = {[Online]}
}
-
-@Online{angular,
- author = {Google},
- note = {[Online]},
- title = {Angular},
- url = {https://angular.io/},
+@online{dotnet,
+ title = {{{.NET}: free, open-source, cross-platform framework}},
+ author = {Microsoft},
+ url = {https://dotnet.microsoft.com/},
+ note = {[Online]}
}
-
-@Online{vue,
- author = {Evan You},
- note = {[Online]},
- title = {Vue.js},
- url = {https://vuejs.org/},
+@online{elasticsearch,
+ title = {{Elasticsearch Platform}},
+ author = {Elastic},
+ url = {https://www.elastic.co/de/elasticsearch/},
+ note = {[Online]}
}
-
-@Online{eslint,
+@online{eslint,
+ title = {{ESLint: {P}luggable {J}avaScript linter}},
author = {Nicholas Zakas},
- note = {[Online]},
- title = {ESLint: {P}luggable {J}avaScript linter},
url = {https://eslint.org/},
+ note = {[Online]}
}
-
-@Online{express,
+@online{express,
+ title = {{Express}},
author = {Douglas Christopher Wilson},
- note = {[Online]},
- title = {Express},
url = {https://expressjs.com/},
+ note = {[Online]}
+}
+@online{fastapi,
+ title = {{FastAPI}},
+ author = {Sebastián Ramírez},
+ url = {https://fastapi.tiangolo.com/},
+ note = {[Online]}
}
-
-@Online{graphql,
+@online{flask,
+ title = {{Flask User's Guide}},
+ author = {Pallets},
+ url = {https://flask.palletsprojects.com/},
+ note = {[Online]}
+}
+@online{GitHub,
+ title = {{GitHub}},
+ url = {https://github.com/},
+ note = {[Online]}
+}
+@online{graphql,
+ title = {{GraphQL: {A} query language for your {API}}},
author = {Facebook},
- note = {[Online]},
- title = {GraphQL: {A} query language for your {API}},
url = {https://graphql.org/},
+ note = {[Online]}
+}
+@online{grpc,
+ title = {{gRPC: A high performance, open source universal RPC framework}},
+ author = {{CNCF}},
+ url = {https://grpc.io/},
+ note = {[Online]}
+}
+@online{hetzner,
+ title = {{Hetzner Cloud Hosting}},
+ author = {Hetzner},
+ url = {https://www.hetzner.com/cloud/},
+ note = {[Online]}
+}
+@online{InstaApi,
+ title = {{Instagram Basic Display API}},
+ author = {Facebook},
+ url = {https://developers.facebook.com/docs/instagram-basic-display-api},
+ note = {[Online]}
}
-
-@Online{istanbuljs,
+@online{istanbuljs,
+ title = {{Istanbul: {J}avaScript test coverage made simple}},
author = {Istanbul},
- note = {[Online]},
- title = {Istanbul: {J}avaScript test coverage made simple},
url = {https://istanbul.js.org/},
+ note = {[Online]}
}
-
-@Online{node,
- author = {Ryan Dahl},
+@online{jest,
+ title = {{Jest is a delightful JavaScript Testing Framework with a focus on simplicity}},
+ author = {Facebook},
+ url = {https://jestjs.io/},
+ note = {[Online]}
+}
+@online{json,
+ title = {{JSON}},
+ author = {Douglas Crockford},
+ url = {https://www.json.org/},
+ note = {[Online]}
+}
+@online{kaggle-elonmusktweets,
+ title = {{Kaggle Datasets: Elon Musk Tweets}},
+ author = {Google},
+ url = {https://www.kaggle.com/datasets/gpreda/elon-musk-tweets},
+ note = {[Online]}
+}
+@online{kubernetes,
+ title = {{Kubernetes/K8s: open-source system for automating deployment, scaling, and management of containerized applications}},
+ author = {{CNCF}},
+ url = {https://kubernetes.io/},
+ note = {[Online]},
+ ids = {k8s}
+}
+@online{mariadb,
+ title = {{MariaDB Community Server}},
+ author = {Michael Widenius},
+ url = {https://mariadb.com/},
+ note = {[Online]},
+ ids = {maria}
+}
+@online{mocha,
+ title = {{Mocha Testing Framework}},
+ author = {Mocha},
+ url = {https://mochajs.org/},
+ note = {[Online]}
+}
+@book{mongo_book,
+ title = {{MongoDB: The Definitive Guide}},
+ author = {Kristina Chodorow},
+ year = 2013,
+ publisher = {O'Reilly Media}
+}
+@online{mongodb,
+ title = {{MongoDB}},
+ author = {Dwight Merriman and Eliot Horowitz and Kevin Ryan},
+ url = {https://www.mongodb.com/},
note = {[Online]},
- title = {Node.js},
+ ids = {mongo}
+}
+@online{mongodb-atlas,
+ title = {{MongoDB Atlas}},
+ author = {{MongoDB, Inc.}},
+ url = {https://www.mongodb.com/atlas},
+ note = {[Online]}
+}
+@online{mongodb-atlas-serverless,
+ title = {{{AWS} Prescriptive Guidance: {MongoDB Atlas} on {AWS} -- Migrating from a self-managed environment to the {AWS} Cloud}},
+ author = {Amazon},
+ url = {https://docs.aws.amazon.com/prescriptive-guidance/latest/migration-mongodb-atlas/serverless.html},
+ note = {[Online]}
+}
+@online{mongodb-replication,
+ title = {{{MongoDB} Replication}},
+ author = {{MongoDB, Inc.}},
+ url = {https://www.mongodb.com/docs/manual/replication/},
+ note = {[Online]}
+}
+@online{mswjs,
+ title = {{Mock Service Worker: {API} mocking library for browser and Node.js}},
+ author = {Artem Zakharchenko},
+ url = {https://mswjs.io/},
+ note = {[Online]}
+}
+@online{mui,
+ title = {{{MUI}: The React component library you always wanted}},
+ author = {{Material UI SAS}},
+ url = {https://mui.com},
+ note = {[Online]}
+}
+@online{mysql,
+ title = {{MySQL: high-performance and scalable Online Transaction Processing}},
+ author = {Michael Widenius und David Axmark},
+ url = {https://www.mysql.com/},
+ note = {[Online]}
+}
+@online{nextjs,
+ title = {{Next.js}},
+ author = {Vercel},
+ url = {https://nextjs.org/},
+ note = {[Online]}
+}
+@online{node,
+ title = {{Node.js}},
+ author = {Ryan Dahl},
url = {https://www.nodejs.org/},
+ note = {[Online]},
+ ids = {nodejs}
}
-
-@Online{npm,
+@online{npm,
+ title = {{npm}},
author = {Isaac Schlueter},
- note = {[Online]},
- title = {npm},
url = {https://www.npmjs.com/},
+ note = {[Online]}
}
-
-@Online{prettier,
- author = {Prettier},
+@online{ontotext,
+ title = {{GraphDB}},
+ author = {Ontotext},
+ url = {https://www.ontotext.com/products/graphdb/},
+ note = {[Online]}
+}
+@online{opcua,
+ title = {{OPC Unified Architecture: a platform independent service-oriented architecture that integrates all the functionality of the individual OPC Classic specifications into one extensible framework}},
+ author = {{OPC}},
+ url = {https://opcfoundation.org/about/opc-technologies/opc-ua/},
+ note = {[Online]}
+}
+@online{opencv,
+ title = {{{OpenCV}: Open Source Computer Vision Library}},
+ author = {Gray Bradsky},
+ url = {https://opencv.org},
+ note = {[Online]}
+}
+@online{phaser,
+ title = {{Phaser Game Framework}},
+ author = {{Photon Storm}},
+ url = {https://phaser.io/},
+ note = {[Online]}
+}
+@online{pinia,
+ title = {{Pinia}},
+ author = {Eduardo San Martin Morote},
+ url = {https://pinia.vuejs.org/},
+ note = {[Online]}
+}
+@online{postgresql,
+ title = {{PostgreSQL: Open Source Relational Database}},
+ author = {Andrew Yu and Jolly Chen},
+ url = {https://www.postgresql.org/},
note = {[Online]},
- title = {Prettier: {O}pinionated {C}ode {F}ormatter},
+ ids = {postgres}
+}
+@online{prettier,
+ title = {{Prettier: {O}pinionated {C}ode {F}ormatter}},
+ author = {Prettier},
url = {https://prettier.io/},
+ note = {[Online]}
+}
+@online{prisma,
+ title = {{Prisma}},
+ author = {{Prisma Data, Inc.}},
+ url = {https://www.prisma.io/},
+ note = {[Online]}
+}
+@online{pydantic,
+ title = {{Pydantic Documentation}},
+ author = {Sebastián Ramírez},
+ url = {https://docs.pydantic.dev/},
+ note = {[Online]}
+}
+@online{pymongo,
+ title = {{PyMongo}},
+ author = {{MongoDB, Inc.}},
+ url = {https://pypi.org/project/pymongo/},
+ note = {[Online]}
+}
+@online{pytest,
+ title = {{pytest: helps you write better programs}},
+ author = {Guido van Rossum},
+ url = {https://docs.pytest.org/},
+ note = {[Online]}
+}
+@online{pytest,
+ title = {{Pytest}},
+ author = {Holger Krekel and {pytest Entwicklungteam}},
+ url = {https://pytest.org/},
+ note = {[Online]}
+}
+@online{python,
+ title = {{Python}},
+ author = {Guido van Rossum},
+ url = {https://www.python.org},
+ note = {[Online]}
+}
+@online{react,
+ title = {{React}},
+ author = {Facebook},
+ url = {https://react.dev/},
+ note = {[Online]}
+}
+@online{reacttestinglibrary,
+ title = {{TestingLibraryReact}},
+ author = {React Testing Library},
+ url = {https://testing-library.com/docs/react-testing-library/intro/},
+ note = {[Online]}
+}
+@book{restful,
+ title = {{Architectural styles and the design of network-based software architectures}},
+ author = {Fielding, Roy Thomas},
+ year = 2000,
+ publisher = {University of California, Irvine},
+ ids = {rest}
+}
+@online{restfulapi,
+ title = {{REST API Tutorial}},
+ author = {Lokesh Gupta},
+ url = {https://restfulapi.net/},
+ note = {[Online]}
+}
+@techreport{rfc6455,
+ title = {{The WebSocket Protocol}},
+ author = {Alexey Melnikov and Ian Fette},
+ year = 2011,
+ month = dec,
+ number = 6455,
+ doi = {10.17487/RFC6455},
+ issn = {2070-1721},
+ url = {https://www.rfc-editor.org/info/rfc6455},
+ type = {{RFC}}
+}
+@online{scikit,
+ title = {{scikit-learn: Machine Learning in Python}},
+ author = {David Cournapeau},
+ url = {https://scikit-learn.org/},
+ note = {[Online]},
+ ids = {scikit-learn}
+}
+@article{scikit-image,
+ title = {{scikit-image: image processing in {P}ython}},
+ author = {van der Walt, {S}t\'efan and {S}ch\"onberger, {J}ohannes {L}. and {Nunez-Iglesias}, {J}uan and {B}oulogne, {F}ran\c{c}ois and {W}arner, {J}oshua {D}. and {Y}ager, {N}eil and {G}ouillart, {E}mmanuelle and {Y}u, {T}ony and the scikit-image contributors},
+ year = 2014,
+ month = 6,
+ journal = {PeerJ},
+ volume = 2,
+ pages = {e453},
+ doi = {10.7717/peerj.453},
+ issn = {2167-8359},
+ url = {https://doi.org/10.7717/peerj.453},
+ keywords = {Image processing, Reproducible research, Education, Visualization, Open source, Python, Scientific programming}
+}
+@online{scratch,
+ title = {{Scratch}},
+ author = {{MIT Media Lab}},
+ url = {https://scratch.mit.edu/projects/editor/},
+ note = {[Online]}
+}
+@online{selenium,
+ title = {{Selenium}},
+ author = {Selenium},
+ url = {https://www.selenium.dev/},
+ note = {[Online]}
+}
+@online{socketio,
+ title = {{Socket.IO}},
+ author = {Guillermo Rauch},
+ url = {https://socket.io/},
+ note = {[Online]}
}
-
-@Online{svelte,
+@online{sqlite,
+ title = {{{SQLite}: {F}eatures}},
+ author = {Richard Hipp},
+ url = {https://sqlite.org/features.html},
+ note = {[Online]}
+}
+@online{starlette,
+ title = {{Starlette}},
+ author = {Sebastián Ramírez},
+ url = {https://www.starlette.io/},
+ note = {[Online]}
+}
+@online{svelte,
+ title = {{Svelte: Cybernetically enhanced web apps}},
author = {Rich Harris},
- note = {[Online]},
- title = {Svelte: Cybernetically enhanced web apps},
url = {https://www.svelte.dev/},
+ note = {[Online]}
}
-
-@Online{sveltekit,
+@online{sveltekit,
+ title = {{Svelte Kit: {T}he fastest way to build {S}velte Apps}},
author = {Rich Harris},
- note = {[Online]},
- title = {Svelte Kit: {T}he fastest way to build {S}velte Apps},
url = {https://kit.svelte.dev/},
+ note = {[Online]}
}
-
-@Online{typescript,
+@online{tailwind,
+ title = {{Tailwind {CSS}}},
+ author = {Adam Wathan and Jonathan Reinink and David Hemphill and Steve Schoger},
+ url = {https://tailwindcss.com/},
+ note = {[Online]}
+}
+@online{terraform,
+ title = {{Terraform}},
+ author = {{HashiCorp}},
+ url = {https://www.terraform.io/},
+ note = {[Online]}
+}
+@online{tinydb,
+ title = {{TinyDB: Lightweight Document-oriented Database}},
+ author = {Markus Siemens},
+ url = {https://github.com/msiemens/tinydb},
+ note = {[Online]}
+}
+@online{typescript,
+ title = {{TypeScript: JavaScript With Syntax For Types}},
author = {Microsoft},
- note = {[Online]},
- title = {TypeScript: {J}avaScript {W}ith {S}yntax {F}or {T}ypes},
url = {https://www.typescriptlang.org/},
+ note = {[Online]}
}
-
-@Online{jest,
- author = {Facebook},
- note = {[Online]},
- title = {Jest is a delightful JavaScript Testing Framework with a focus on simplicity},
- url = {https://jestjs.io/},
-
+@online{uvicorn,
+ title = {{Uvicorn}},
+ author = {Sebastián Ramírez},
+ url = {https://www.uvicorn.org/},
+ note = {[Online]}
+}
+@online{virtuoso,
+ title = {{Virtuoso Universal Server}},
+ author = {OpenLink},
+ url = {https://virtuoso.openlinksw.com/},
+ note = {[Online]}
}
-
-@Online{vite,
+@online{vite,
+ title = {{Vite: {N}ext {G}eneration {F}rontend {T}ooling}},
author = {Evan You},
- note = {[Online]},
- title = {Vite: {N}ext {G}eneration {F}rontend {T}ooling},
url = {https://github.com/vitejs/vite},
+ note = {[Online]}
}
-
-@Online{vitest,
+@online{vitest,
+ title = {{Vitest: {A} {V}ite-native unit test framework}},
author = {Anthony Fu and Matías Capeletto},
- note = {[Online]},
- title = {Vitest: {A} {V}ite-native unit test framework},
url = {https://vitest.dev/},
+ note = {[Online]}
}
-
-@Online{pinia,
- author = {Eduardo San Martin Morote},
- note = {[Online]},
- title = {Pinia},
- url = {https://pinia.vuejs.org/},
+@online{vue,
+ title = {{Vue.js}},
+ author = {Evan You},
+ url = {https://vuejs.org/},
+ note = {[Online]}
}
-
-@Online{virtuoso,
- author = {OpenLink},
- note = {[Online]},
- title = {Virtuoso Universal Server},
- url = {https://virtuoso.openlinksw.com/},
+@online{websocket-whatwg,
+ title = {{Origin of {WebSocket} ({IRC} logs: freenode / \#whatwg / 20080618)}},
+ author = {Ian Hickson and Michael Carter},
+ url = {https://krijnhoetmer.nl/irc-logs/whatwg/20080618#l-1145},
+ note = {[Online]}
}
-
-@Online{ontotext,
- author = {Ontotext},
- note = {[Online]},
- title = {GraphDB},
- url = {https://www.ontotext.com/products/graphdb/},
+@online{yfinance,
+ title = {{Yahoo Finance}},
+ author = {Yahoo},
+ url = {https://finance.yahoo.com},
+ note = {[Online]}
}
-
-@Online{mongodb,
- author = {Dwight Merriman and Eliot Horowitz and Kevin Ryan},
- note = {[Online]},
- title = {MongoDB},
- url = {https://www.mongodb.com/},
+@online{angular,
+ title = {{Angular}},
+ author = {Google},
+ url = {https://angular.io/},
+ note = {[Online]}
}
-
-@Online{dotnet,
+@online{asp,
+ title = {{ASP.NET}},
author = {Microsoft},
+ url = {https://dotnet.microsoft.com/apps/aspnet},
note = {[Online]},
- title = {{.NET}: free, open-source, cross-platform framework},
- url = {https://dotnet.microsoft.com/},
+ addendum = {(aufgerufen: 22.06.2024)},
+ ids = {asp_net}
}
-
-@Online{phaser,
- author = {{Photon Storm}},
- note = {[Online]},
- title = {Phaser Game Framework},
- url = {https://phaser.io/},
+@online{authjs,
+ title = {{Auth.js}},
+ author = {Balázs Orbán},
+ url = {https://authjs.dev/},
+ note = {[Online]}
}
-
-@Online{kubernetes,
- author = {{CNCF}},
- note = {[Online]},
- title = {Kubernetes/K8s: open-source system for automating deployment, scaling, and management of containerized applications},
- url = {https://kubernetes.io/},
+@online{aws,
+ title = {{Amazon Web Services}},
+ author = {Amazon},
+ url = {https://aws.amazon.com/},
+ note = {[Online]}
}
-
-@Online{bootstrap,
- author = {Mark Otto und Jacob Thornton},
- note = {[Online]},
- title = {Bootstrap: Build fast, responsive sites},
- url = {https://getbootstrap.com/},
+@online{aws-apigateway,
+ title = {{AWS API Gateway}},
+ author = {Amazon},
+ url = {https://aws.amazon.com/api-gateway/},
+ note = {[Online]}
}
-
-@Online{docker-compose,
- author = {Docker},
- note = {[Online]},
- title = {Compose: Defining and Running Multi-Container Docker Applications},
- url = {https://docs.docker.com/compose/},
+@online{aws-apprunner,
+ title = {{AWS AppRunner}},
+ author = {Amazon},
+ url = {https://aws.amazon.com/apprunner/},
+ note = {[Online]}
}
-
-@book{restful,
- title={Architectural styles and the design of network-based software architectures},
- author={Fielding, Roy Thomas},
- year={2000},
- publisher={University of California, Irvine}
+@online{aws-cli,
+ title = {{AWS CLI}},
+ author = {Amazon},
+ url = {https://aws.amazon.com/cli/},
+ note = {[Online]}
}
-
-@Online{grpc,
- author = {{CNCF}},
- note = {[Online]},
- title = {gRPC: A high performance, open source universal RPC framework},
- url = {https://grpc.io/},
+@online{aws-codebuild,
+ title = {{AWS CodeBuild}},
+ author = {Amazon},
+ url = {https://aws.amazon.com/de/codebuild/},
+ note = {[Online]}
}
-
-@Online{mysql,
- author = {Michael Widenius und David Axmark},
- note = {[Online]},
- title = {MySQL: high-performance and scalable Online Transaction Processing},
- url = {https://www.mysql.com/},
+@online{aws-codecommit,
+ title = {{AWS CodeCommit}},
+ author = {Amazon},
+ url = {https://aws.amazon.com/de/codecommit/},
+ note = {[Online]}
}
-
-@Online{mariadb,
- author = {Michael Widenius},
- note = {[Online]},
- title = {MariaDB Community Server},
- url = {https://mariadb.com/},
+@online{aws-codepipeline,
+ title = {{AWS CodePipeline}},
+ author = {Amazon},
+ url = {https://aws.amazon.com/de/codepipeline/},
+ note = {[Online]}
}
-
-@Online{postgresql,
- author = {Andrew Yu and Jolly Chen},
- note = {[Online]},
- title = {PostgreSQL: Open Source Relational Database},
- url = {https://www.postgresql.org/},
+@online{aws-cognito,
+ title = {{{AWS Cognito}: Identity Platform}},
+ author = {Amazon},
+ url = {https://aws.amazon.com/cognito/},
+ note = {[Online]}
}
-
-@Online{opcua,
- author = {{OPC}},
- note = {[Online]},
- title = {OPC Unified Architecture: a platform independent service-oriented architecture that integrates all the functionality of the individual OPC Classic specifications into one extensible framework},
- url = {https://opcfoundation.org/about/opc-technologies/opc-ua/},
+@online{aws-ec2,
+ title = {{AWS EC2}},
+ author = {Amazon},
+ url = {https://aws.amazon.com/ec2/},
+ note = {[Online]}
}
-
-@Online{aws,
+@online{aws-ecr,
+ title = {{AWS ECR}},
author = {Amazon},
- note = {[Online]},
- title = {Amazon Web Services},
- url = {https://aws.amazon.com/}
+ url = {https://aws.amazon.com/ecr/},
+ note = {[Online]}
}
-
-@Online{aws-cognito,
+@online{aws-elasticbeanstalk,
+ title = {{AWS Elastic Beanstalk}},
author = {Amazon},
- note = {[Online]},
- title = {{AWS Cognito}: Identity Platform},
- url = {https://aws.amazon.com/cognito/}
+ url = {https://aws.amazon.com/elasticbeanstalk/},
+ note = {[Online]}
}
-
-@Online{aws-apigateway,
+@online{aws-iam,
+ title = {{AWS IAM}},
author = {Amazon},
- note = {[Online]},
- title = {{AWS API Gateway}},
- url = {https://aws.amazon.com/api-gateway/}
+ url = {https://aws.amazon.com/iam/},
+ note = {[Online]}
}
-
-@Online{mongodb-atlas,
- author = {{MongoDB, Inc.}},
- note = {[Online]},
- title = {{MongoDB Atlas}},
- url = {https://www.mongodb.com/atlas},
+@online{aws-lambda,
+ title = {{AWS Lambda}},
+ author = {Amazon},
+ url = {https://aws.amazon.com/lambda/},
+ note = {[Online]}
}
-
-@Online{mongodb-atlas-serverless,
+@online{aws-s3,
+ title = {{Amazon S3}},
author = {Amazon},
- note = {[Online]},
- title = {{AWS} Prescriptive Guidance: {MongoDB Atlas} on {AWS} -- Migrating from a self-managed environment to the {AWS} Cloud},
- url = {https://docs.aws.amazon.com/prescriptive-guidance/latest/migration-mongodb-atlas/serverless.html}
+ url = {https://aws.amazon.com/s3/},
+ note = {[Online]}
}
-
-@Online{aws-lambda,
+@online{aws-sam,
+ title = {{AWS SAM}},
author = {Amazon},
- note = {[Online]},
- title = {{AWS Lambda}},
- url = {https://aws.amazon.com/lambda/}
+ url = {https://aws.amazon.com/serverless/sam/},
+ note = {[Online]}
}
-
-@Online{aws-ec2,
+@online{aws-sdk-js,
+ title = {{{AWS SDK} for {JavaScript}}},
author = {Amazon},
- note = {[Online]},
- title = {{AWS EC2}},
- url = {https://aws.amazon.com/ec2/}
+ url = {https://www.npmjs.com/package/aws-sdk},
+ note = {[Online]}
}
-
-@Online{nextjs,
- author = {Vercel},
- note = {[Online]},
- title = {Next.js},
- url = {https://nextjs.org/}
+@online{aws-toolkit-intelij,
+ title = {{{AWS Toolkit} for {IntelliJ IDEA}}},
+ author = {Amazon},
+ url = {https://aws.amazon.com/intellij/},
+ note = {[Online]}
}
-
-@Online{aws-lambda-runtime,
+@online{axios,
+ title = {{Axios}},
+ author = {Matt Zabriskie},
+ url = {https://axios-http.com/},
+ note = {[Online]}
+}
+@online{bootstrap,
+ title = {{Bootstrap: Build fast, responsive sites}},
+ author = {Mark Otto und Jacob Thornton},
+ url = {https://getbootstrap.com/},
+ note = {[Online]}
+}
+@online{boto3,
+ title = {{{Boto3}: {AWS SDK} for Python}},
author = {Amazon},
- note = {[Online]},
- title = {{AWS Lambda}: Run-Time Environment},
- url = {https://docs.aws.amazon.com/de_de/lambda/latest/dg/lambda-runtime-environment.html}
+ url = {https://boto3.amazonaws.com/v1/documentation/api/latest/index.html},
+ note = {[Online]}
}
-
-@Online{authjs,
- author = {Balázs Orbán},
- note = {[Online]},
- title = {Auth.js},
- url = {https://authjs.dev/}
+@online{catapi,
+ title = {{The Cat {API}}},
+ author = {Aden Forshaw},
+ url = {https://thecatapi.com/},
+ note = {[Online]}
+}
+@online{chai,
+ title = {{Chai Assertion Library}},
+ author = {Chai},
+ url = {https://www.chaijs.com/},
+ note = {[Online]}
+}
+@online{chess,
+ title = {{Chess}},
+ author = {chess.com},
+ url = {https://www.chess.com/},
+ note = {[Online]}
+}
+@online{csharp,
+ title = {{{C\#} Programming Language}},
+ author = {Microsoft},
+ url = {https://learn.microsoft.com/dotnet/csharp/},
+ note = {[Online]}
}
-
-@Online{mongodb-via-aws,
- author = {{MongoDB, Inc.}},
- note = {[Online]},
- title = {{MongoDB Atlas} via {AWS}},
- url = {https://www.mongodb.com/docs/atlas/reference/amazon-aws/}
+@online{cypress,
+ title = {{Cypress}},
+ author = {Brian Mann},
+ url = {https://www.cypress.io/},
+ note = {[Online]}
}
-
-@Online{mongodb-replication,
- author = {{MongoDB, Inc.}},
- note = {[Online]},
- title = {{MongoDB} Replication},
- url = {https://www.mongodb.com/docs/manual/replication/}
+@online{d3js,
+ title = {{D3.js}},
+ author = {Observable},
+ url = {https://d3js.org},
+ note = {[Online]}
}
-
-@Online{prisma,
- author = {{Prisma Data, Inc.}},
- note = {[Online]},
- title = {Prisma},
- url = {https://www.prisma.io/}
+@online{django,
+ title = {{Django}},
+ author = {Adrian Holovaty and Simon Willison},
+ url = {https://www.djangoproject.com/},
+ note = {[Online]}
}
-
-@Online{prisma-schema,
- author = {{Prisma Data, Inc.}},
- note = {[Online]},
- title = {Prisma Schema},
- url = {https://www.prisma.io/docs/concepts/components/prisma-schema}
+@online{docker,
+ title = {{Docker: Accelerated Container Application Development}},
+ author = {Docker},
+ url = {https://www.docker.com/},
+ note = {[Online]}
}
-
-@Online{aws-s3,
- author = {Amazon},
- note = {[Online]},
- title = {{Amazon S3}},
- url = {https://aws.amazon.com/s3/},
+@online{docker-compose,
+ title = {{Compose: Defining and Running Multi-Container Docker Applications}},
+ author = {Docker},
+ url = {https://docs.docker.com/compose/},
+ note = {[Online]}
}
-@Online{aws-sam,
- author = {Amazon},
- note = {[Online]},
- title = {{AWS SAM}},
- url = {https://aws.amazon.com/serverless/sam/},
+@online{dotnet,
+ title = {{{.NET}: free, open-source, cross-platform framework}},
+ author = {Microsoft},
+ url = {https://dotnet.microsoft.com/},
+ note = {[Online]}
}
-
-@Online{aws-cli,
- author = {Amazon},
- note = {[Online]},
- title = {{AWS CLI}},
- url = {https://aws.amazon.com/cli/},
+@online{elasticsearch,
+ title = {{Elasticsearch Platform}},
+ author = {Elastic},
+ url = {https://www.elastic.co/de/elasticsearch/},
+ note = {[Online]}
}
-
-@Online{aws-iam,
- author = {Amazon},
- note = {[Online]},
- title = {{AWS IAM}},
- url = {https://aws.amazon.com/iam/},
+@online{eslint,
+ title = {{ESLint: {P}luggable {J}avaScript linter}},
+ author = {Nicholas Zakas},
+ url = {https://eslint.org/},
+ note = {[Online]}
}
-
-@Online{aws-toolkit-intelij,
- author = {Amazon},
- note = {[Online]},
- title = {{AWS Toolkit} for {IntelliJ IDEA}},
- url = {https://aws.amazon.com/intellij/},
+@online{express,
+ title = {{Express}},
+ author = {Douglas Christopher Wilson},
+ url = {https://expressjs.com/},
+ note = {[Online]}
}
-
-@Online{kaggle-elonmusktweets,
+@online{fastapi,
+ title = {{FastAPI}},
+ author = {Sebastián Ramírez},
+ url = {https://fastapi.tiangolo.com/},
+ note = {[Online]}
+}
+@online{flask,
+ title = {{Flask User's Guide}},
+ author = {Pallets},
+ url = {https://flask.palletsprojects.com/},
+ note = {[Online]}
+}
+@online{GitHub,
+ title = {{GitHub}},
+ url = {https://github.com/},
+ note = {[Online]}
+}
+@online{graphql,
+ title = {{GraphQL: {A} query language for your {API}}},
+ author = {Facebook},
+ url = {https://graphql.org/},
+ note = {[Online]}
+}
+@online{grpc,
+ title = {{gRPC: A high performance, open source universal RPC framework}},
+ author = {{CNCF}},
+ url = {https://grpc.io/},
+ note = {[Online]}
+}
+@online{hetzner,
+ title = {{Hetzner Cloud Hosting}},
+ author = {Hetzner},
+ url = {https://www.hetzner.com/cloud/},
+ note = {[Online]}
+}
+@online{InstaApi,
+ title = {{Instagram Basic Display API}},
+ author = {Facebook},
+ url = {https://developers.facebook.com/docs/instagram-basic-display-api},
+ note = {[Online]}
+}
+@online{istanbuljs,
+ title = {{Istanbul: {J}avaScript test coverage made simple}},
+ author = {Istanbul},
+ url = {https://istanbul.js.org/},
+ note = {[Online]}
+}
+@online{jest,
+ title = {{Jest is a delightful JavaScript Testing Framework with a focus on simplicity}},
+ author = {Facebook},
+ url = {https://jestjs.io/},
+ note = {[Online]}
+}
+@online{json,
+ title = {{JSON}},
+ author = {Douglas Crockford},
+ url = {https://www.json.org/},
+ note = {[Online]}
+}
+@online{kaggle-elonmusktweets,
+ title = {{Kaggle Datasets: Elon Musk Tweets}},
author = {Google},
- note = {[Online]},
- title = {Kaggle Datasets: Elon Musk Tweets},
url = {https://www.kaggle.com/datasets/gpreda/elon-musk-tweets},
+ note = {[Online]}
}
-
-@Online{yfinance,
- author = {Yahoo},
+@online{kubernetes,
+ title = {{Kubernetes/K8s: open-source system for automating deployment, scaling, and management of containerized applications}},
+ author = {{CNCF}},
+ url = {https://kubernetes.io/},
note = {[Online]},
- title = {Yahoo Finance},
- url = {https://finance.yahoo.com},
+ ids = {k8s}
}
-
-@Online{d3js,
- author = {Observable},
+@online{mariadb,
+ title = {{MariaDB Community Server}},
+ author = {Michael Widenius},
+ url = {https://mariadb.com/},
note = {[Online]},
- title = {D3.js},
- url = {https://d3js.org},
+ ids = {maria}
}
-
-@Online{mui,
- author = {{Material UI SAS}},
+@online{mocha,
+ title = {{Mocha Testing Framework}},
+ author = {Mocha},
+ url = {https://mochajs.org/},
+ note = {[Online]}
+}
+@book{mongo_book,
+ title = {{MongoDB: The Definitive Guide}},
+ author = {Kristina Chodorow},
+ year = 2013,
+ publisher = {O'Reilly Media}
+}
+@online{mongodb,
+ title = {{MongoDB}},
+ author = {Dwight Merriman and Eliot Horowitz and Kevin Ryan},
+ url = {https://www.mongodb.com/},
note = {[Online]},
- title = {{MUI}: The React component library you always wanted},
+ ids = {mongo}
+}
+@online{mongodb-atlas,
+ title = {{MongoDB Atlas}},
+ author = {{MongoDB, Inc.}},
+ url = {https://www.mongodb.com/atlas},
+ note = {[Online]}
+}
+@online{mongodb-atlas-serverless,
+ title = {{{AWS} Prescriptive Guidance: {MongoDB Atlas} on {AWS} -- Migrating from a self-managed environment to the {AWS} Cloud}},
+ author = {Amazon},
+ url = {https://docs.aws.amazon.com/prescriptive-guidance/latest/migration-mongodb-atlas/serverless.html},
+ note = {[Online]}
+}
+@online{mongodb-replication,
+ title = {{{MongoDB} Replication}},
+ author = {{MongoDB, Inc.}},
+ url = {https://www.mongodb.com/docs/manual/replication/},
+ note = {[Online]}
+}
+@online{mswjs,
+ title = {{Mock Service Worker: {API} mocking library for browser and Node.js}},
+ author = {Artem Zakharchenko},
+ url = {https://mswjs.io/},
+ note = {[Online]}
+}
+@online{mui,
+ title = {{{MUI}: The React component library you always wanted}},
+ author = {{Material UI SAS}},
url = {https://mui.com},
+ note = {[Online]}
}
-
-
-@Online{pytest,
- author = {Holger Krekel and {pytest Entwicklungteam}},
+@online{mysql,
+ title = {{MySQL: high-performance and scalable Online Transaction Processing}},
+ author = {Michael Widenius und David Axmark},
+ url = {https://www.mysql.com/},
+ note = {[Online]}
+}
+@online{nextjs,
+ title = {{Next.js}},
+ author = {Vercel},
+ url = {https://nextjs.org/},
+ note = {[Online]}
+}
+@online{node,
+ title = {{Node.js}},
+ author = {Ryan Dahl},
+ url = {https://www.nodejs.org/},
note = {[Online]},
- title = {Pytest},
- url = {https://pytest.org/}
+ ids = {nodejs}
}
-
-@Online{starlette,
- author = {Sebastián Ramírez},
+@online{npm,
+ title = {{npm}},
+ author = {Isaac Schlueter},
+ url = {https://www.npmjs.com/},
+ note = {[Online]}
+}
+@online{ontotext,
+ title = {{GraphDB}},
+ author = {Ontotext},
+ url = {https://www.ontotext.com/products/graphdb/},
+ note = {[Online]}
+}
+@online{opcua,
+ title = {{OPC Unified Architecture: a platform independent service-oriented architecture that integrates all the functionality of the individual OPC Classic specifications into one extensible framework}},
+ author = {{OPC}},
+ url = {https://opcfoundation.org/about/opc-technologies/opc-ua/},
+ note = {[Online]}
+}
+@online{opencv,
+ title = {{{OpenCV}: Open Source Computer Vision Library}},
+ author = {Gray Bradsky},
+ url = {https://opencv.org},
+ note = {[Online]}
+}
+@online{phaser,
+ title = {{Phaser Game Framework}},
+ author = {{Photon Storm}},
+ url = {https://phaser.io/},
+ note = {[Online]}
+}
+@online{pinia,
+ title = {{Pinia}},
+ author = {Eduardo San Martin Morote},
+ url = {https://pinia.vuejs.org/},
+ note = {[Online]}
+}
+@online{postgresql,
+ title = {{PostgreSQL: Open Source Relational Database}},
+ author = {Andrew Yu and Jolly Chen},
+ url = {https://www.postgresql.org/},
note = {[Online]},
- title = {Starlette},
- url = {https://www.starlette.io/},
+ ids = {postgres}
}
-
-@Online{pydantic,
+@online{prettier,
+ title = {{Prettier: {O}pinionated {C}ode {F}ormatter}},
+ author = {Prettier},
+ url = {https://prettier.io/},
+ note = {[Online]}
+}
+@online{prisma,
+ title = {{Prisma}},
+ author = {{Prisma Data, Inc.}},
+ url = {https://www.prisma.io/},
+ note = {[Online]}
+}
+@online{pydantic,
+ title = {{Pydantic Documentation}},
author = {Sebastián Ramírez},
- note = {[Online]},
- title = {Pydantic Documentation},
url = {https://docs.pydantic.dev/},
+ note = {[Online]}
}
-
-@Online{uvicorn,
- author = {Sebastián Ramírez},
- note = {[Online]},
- title = {Uvicorn},
- url = {https://www.uvicorn.org/}
+@online{pymongo,
+ title = {{PyMongo}},
+ author = {{MongoDB, Inc.}},
+ url = {https://pypi.org/project/pymongo/},
+ note = {[Online]}
}
-
-@Online{terraform,
- author = {{HashiCorp}},
- note = {[Online]},
- title = {Terraform},
- url = {https://www.terraform.io/}
+@online{pytest,
+ title = {{pytest: helps you write better programs}},
+ author = {Guido van Rossum},
+ url = {https://docs.pytest.org/},
+ note = {[Online]}
}
-
-@Online{cypress,
- author = {Brian Mann},
- note = {[Online]},
- title = {Cypress},
- url = {https://www.cypress.io/}
+@online{pytest,
+ title = {{Pytest}},
+ author = {Holger Krekel and {pytest Entwicklungteam}},
+ url = {https://pytest.org/},
+ note = {[Online]}
}
-
-@Online{pymongo,
- author = {{MongoDB, Inc.}},
- note = {[Online]},
- title = {PyMongo},
- url = {https://pypi.org/project/pymongo/}
+@online{python,
+ title = {{Python}},
+ author = {Guido van Rossum},
+ url = {https://www.python.org},
+ note = {[Online]}
}
-
-@Online{websocket-whatwg,
- author = {Ian Hickson and Michael Carter},
- note = {[Online]},
- title = {Origin of {WebSocket} ({IRC} logs: freenode / \#whatwg / 20080618)},
- url = {https://krijnhoetmer.nl/irc-logs/whatwg/20080618#l-1145},
+@online{react,
+ title = {{React}},
+ author = {Facebook},
+ url = {https://react.dev/},
+ note = {[Online]}
}
-
-@TechReport{rfc6455,
- type ={{RFC}},
- number = 6455,
- doi = {10.17487/RFC6455},
- url = {https://www.rfc-editor.org/info/rfc6455},
- author = {Alexey Melnikov and Ian Fette},
- title = {{The WebSocket Protocol}},
- year = 2011,
- month = dec,
- issn = {2070-1721},
-}
-
-@Online{socketio,
- author = {Guillermo Rauch},
- note = {[Online]},
+@online{reacttestinglibrary,
+ title = {{TestingLibraryReact}},
+ author = {React Testing Library},
+ url = {https://testing-library.com/docs/react-testing-library/intro/},
+ note = {[Online]}
+}
+@book{restful,
+ title = {{Architectural styles and the design of network-based software architectures}},
+ author = {Fielding, Roy Thomas},
+ year = 2000,
+ publisher = {University of California, Irvine},
+ ids = {rest}
+}
+@online{restfulapi,
+ title = {{REST API Tutorial}},
+ author = {Lokesh Gupta},
+ url = {https://restfulapi.net/},
+ note = {[Online]}
+}
+@techreport{rfc6455,
+ title = {{The WebSocket Protocol}},
+ author = {Alexey Melnikov and Ian Fette},
+ year = 2011,
+ month = dec,
+ number = 6455,
+ doi = {10.17487/RFC6455},
+ issn = {2070-1721},
+ url = {https://www.rfc-editor.org/info/rfc6455},
+ type = {{RFC}}
+}
+@online{scikit,
+ title = {{scikit-learn: Machine Learning in Python}},
+ author = {David Cournapeau},
+ url = {https://scikit-learn.org/},
+ note = {[Online]},
+ ids = {scikit-learn}
+}
+@article{scikit-image,
+ title = {{scikit-image: image processing in {P}ython}},
+ author = {van der Walt, {S}t\'efan and {S}ch\"onberger, {J}ohannes {L}. and {Nunez-Iglesias}, {J}uan and {B}oulogne, {F}ran\c{c}ois and {W}arner, {J}oshua {D}. and {Y}ager, {N}eil and {G}ouillart, {E}mmanuelle and {Y}u, {T}ony and the scikit-image contributors},
+ year = 2014,
+ month = 6,
+ journal = {PeerJ},
+ volume = 2,
+ pages = {e453},
+ doi = {10.7717/peerj.453},
+ issn = {2167-8359},
+ url = {https://doi.org/10.7717/peerj.453},
+ keywords = {Image processing, Reproducible research, Education, Visualization, Open source, Python, Scientific programming}
+}
+@online{scratch,
+ title = {{Scratch}},
+ author = {{MIT Media Lab}},
+ url = {https://scratch.mit.edu/projects/editor/},
+ note = {[Online]}
+}
+@online{selenium,
+ title = {{Selenium}},
+ author = {Selenium},
+ url = {https://www.selenium.dev/},
+ note = {[Online]}
+}
+@online{socketio,
title = {{Socket.IO}},
+ author = {Guillermo Rauch},
url = {https://socket.io/},
+ note = {[Online]}
}
-
-@Online{catapi,
- author = {Aden Forshaw},
- note = {[Online]},
- title = {The Cat {API}},
- url = {https://thecatapi.com/},
+@online{sqlite,
+ title = {{{SQLite}: {F}eatures}},
+ author = {Richard Hipp},
+ url = {https://sqlite.org/features.html},
+ note = {[Online]}
}
-
-@Online{boto3,
- author = {Amazon},
- note = {[Online]},
- title = {{Boto3}: {AWS SDK} for Python},
- url = {https://boto3.amazonaws.com/v1/documentation/api/latest/index.html},
+@online{starlette,
+ title = {{Starlette}},
+ author = {Sebastián Ramírez},
+ url = {https://www.starlette.io/},
+ note = {[Online]}
}
-
-@Online{aws-sdk-js,
- author = {Amazon},
- note = {[Online]},
- title = {{AWS SDK} for {JavaScript}},
- url = {https://www.npmjs.com/package/aws-sdk},
+@online{svelte,
+ title = {{Svelte: Cybernetically enhanced web apps}},
+ author = {Rich Harris},
+ url = {https://www.svelte.dev/},
+ note = {[Online]}
}
-
-@Online{pytest-cov,
- author = {Holger Krekel and {pytest Entwicklungteam}},
- note = {[Online]},
- title = {pytest Coverage Reports},
- url = {https://pypi.org/project/pytest-cov/},
+@online{sveltekit,
+ title = {{Svelte Kit: {T}he fastest way to build {S}velte Apps}},
+ author = {Rich Harris},
+ url = {https://kit.svelte.dev/},
+ note = {[Online]}
}
-
-@Online{scratch,
- author = {{MIT Media Lab}},
- note = {[Online]},
- title = {Scratch},
- url = {https://scratch.mit.edu/projects/editor/},
+@online{tailwind,
+ title = {{Tailwind {CSS}}},
+ author = {Adam Wathan and Jonathan Reinink and David Hemphill and Steve Schoger},
+ url = {https://tailwindcss.com/},
+ note = {[Online]}
}
-
-@Online{python,
- author = {Guido van Rossum},
- note = {[Online]},
- title = {Python},
- url = {https://www.python.org},
+@online{terraform,
+ title = {{Terraform}},
+ author = {{HashiCorp}},
+ url = {https://www.terraform.io/},
+ note = {[Online]}
}
-
-@Online{opencv,
- author = {Gray Bradsky},
- note = {[Online]},
- title = {{OpenCV}: Open Source Computer Vision Library},
- url = {https://opencv.org},
+@online{tinydb,
+ title = {{TinyDB: Lightweight Document-oriented Database}},
+ author = {Markus Siemens},
+ url = {https://github.com/msiemens/tinydb},
+ note = {[Online]}
}
-
-@article{scikit-image,
- title = {scikit-image: image processing in {P}ython},
- author = {van der Walt, {S}t\'efan and {S}ch\"onberger, {J}ohannes {L}. and
- {Nunez-Iglesias}, {J}uan and {B}oulogne, {F}ran\c{c}ois and {W}arner,
- {J}oshua {D}. and {Y}ager, {N}eil and {G}ouillart, {E}mmanuelle and
- {Y}u, {T}ony and the scikit-image contributors},
- year = {2014},
- month = {6},
- keywords = {Image processing, Reproducible research, Education,
- Visualization, Open source, Python, Scientific programming},
- volume = {2},
- pages = {e453},
- journal = {PeerJ},
- issn = {2167-8359},
- url = {https://doi.org/10.7717/peerj.453},
- doi = {10.7717/peerj.453}
-}
-
-
-@Online{flask,
- author = {Pallets},
- note = {[Online]},
- title = {Flask User's Guide},
- url = {https://flask.palletsprojects.com/},
+@online{typescript,
+ title = {{TypeScript: JavaScript With Syntax For Types}},
+ author = {Microsoft},
+ url = {https://www.typescriptlang.org/},
+ note = {[Online]}
+}
+@online{uvicorn,
+ title = {{Uvicorn}},
+ author = {Sebastián Ramírez},
+ url = {https://www.uvicorn.org/},
+ note = {[Online]}
+}
+@online{virtuoso,
+ title = {{Virtuoso Universal Server}},
+ author = {OpenLink},
+ url = {https://virtuoso.openlinksw.com/},
+ note = {[Online]}
+}
+@online{vite,
+ title = {{Vite: {N}ext {G}eneration {F}rontend {T}ooling}},
+ author = {Evan You},
+ url = {https://github.com/vitejs/vite},
+ note = {[Online]}
+}
+@online{vitest,
+ title = {{Vitest: {A} {V}ite-native unit test framework}},
+ author = {Anthony Fu and Matías Capeletto},
+ url = {https://vitest.dev/},
+ note = {[Online]}
+}
+@online{vue,
+ title = {{Vue.js}},
+ author = {Evan You},
+ url = {https://vuejs.org/},
+ note = {[Online]}
+}
+@online{websocket-whatwg,
+ title = {{Origin of {WebSocket} ({IRC} logs: freenode / \#whatwg / 20080618)}},
+ author = {Ian Hickson and Michael Carter},
+ url = {https://krijnhoetmer.nl/irc-logs/whatwg/20080618#l-1145},
+ note = {[Online]}
+}
+@online{yfinance,
+ title = {{Yahoo Finance}},
+ author = {Yahoo},
+ url = {https://finance.yahoo.com},
+ note = {[Online]}
}
-
-
@Online{bibtemplate,
- author = {},
- note = {[Online]},
title = {},
+ author = {},
url = {},
+ note = {[Online]},
} \ No newline at end of file
diff --git a/macros/latex/contrib/csthm/README.md b/macros/latex/contrib/csthm/README.md
new file mode 100644
index 0000000000..6a3186b8a7
--- /dev/null
+++ b/macros/latex/contrib/csthm/README.md
@@ -0,0 +1,89 @@
+---
+title: Theorem Environments for Computer Science (`csthm.sty`)
+linter-yaml-title-alias: Theorem Environments for Computer Science (`csthm.sty`)
+date created: Monday, March 25th 2024, 14:13:16
+date modified: Saturday, August 31st 2024, 11:32:48
+aliases: [Theorem Environments for Computer Science (`csthm.sty`)]
+---
+
+# Theorem Environments for Computer Science (`csthm.sty`)
+
+## Overview
+
+The `csthm` package provides customized theorem-like environments specifically designed for computer science documents. It offers a set of pre-defined theorem styles and environments to streamline the creation of theorems, definitions, remarks, and other common structures in computer science papers and documents.
+
+## Features
+
+- **Pre-defined theorem styles:** `thmstyle`, `defstyle`, `remarkstyle`, and `hltstyle`
+- **Theorem environments:** theorem, fact, assumption, claim, conjecture, corollary, lemma, property, proposition
+- **Definition environments:** definition, example, exercise, problem, question
+- **Remark environments:** note, remark, solution
+- **Highlight environments:** important, highlight, key-point
+- **Custom environments:** case, axiom
+- **Accent Colour:** Customizable accent colour
+- **Cleveref Support:** Optional integration with `cleveref` package
+
+## Installation
+
+1. Download the `csthm.sty` file.
+2. Place it in the same directory as your LaTeX document or in your local TeX tree.
+
+## Usage
+
+Load the package in your LaTeX document:
+
+```latex
+\usepackage{csthm}
+```
+
+To use the package with `cleveref` support:
+
+```latex
+\usepackage[cleveref]{csthm}
+```
+
+## Examples
+
+```latex
+\begin{theorem}
+ This is a theorem.
+\end{theorem}
+
+\begin{definition}
+ This is a definition.
+\end{definition}
+
+\begin{remark}
+ This is a remark.
+\end{remark}
+
+\begin{case}
+ \item This is case 1.
+ \item This is case 2.
+\end{case}
+
+\begin{axiom}
+ \item This is axiom A.
+ \item This is axiom B.
+\end{axiom}
+```
+
+## Customization
+
+To change the accent colour:
+
+```latex
+\setaccentcolor{blue}
+```
+
+## License
+
+This file may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3c 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.3c or later is part of all distributions of LaTeX version 2008/05/04 or later.
+
+## Author
+
+Agni Datta <agnidatta.org@gmail.com>
+
+## Bug Reports and Feature Requests
+
+Please report any issues or feature requests on the package’s GitHub repository.
diff --git a/macros/latex/contrib/csthm/csthm-example.pdf b/macros/latex/contrib/csthm/csthm-example.pdf
new file mode 100644
index 0000000000..2f33de7d87
--- /dev/null
+++ b/macros/latex/contrib/csthm/csthm-example.pdf
Binary files differ
diff --git a/macros/latex/contrib/csthm/csthm-example.tex b/macros/latex/contrib/csthm/csthm-example.tex
new file mode 100644
index 0000000000..670f632051
--- /dev/null
+++ b/macros/latex/contrib/csthm/csthm-example.tex
@@ -0,0 +1,407 @@
+\documentclass{ltxdoc}
+
+% Encoding and Fonts
+\usepackage[utf8]{inputenc}
+\usepackage[T1]{fontenc}
+\usepackage{amsfonts}
+\usepackage{amsmath}
+\usepackage{amssymb}
+\usepackage{lmodern}
+
+% Geometry and Layout
+\usepackage{csquotes}
+\usepackage[a4paper, margin=3.5cm]{geometry}
+\usepackage{microtype}
+\usepackage{parskip}
+\usepackage[onehalfspacing]{setspace}
+
+% Code Listings
+\usepackage{listings}
+\lstset{%
+ basicstyle=\scriptsize\ttfamily,
+ breaklines=true,
+ frame=single,
+ columns=fullflexible,
+ numbers=left,
+ numberstyle=\tiny\ttfamily\color{gray},
+ breakindent=0pt
+}
+
+% Colors and Hyperlinks
+\usepackage{xcolor}
+\usepackage[pdfusetitle, colorlinks=true, linkcolor=blue, urlcolor=violet]{hyperref}
+\usepackage{xurl}
+
+% Theorem-like Environments
+\usepackage{csthm}
+
+\definecolor{darkgreen}{rgb}{0,0.5,0}
+
+\newcommand{\pkg}[1]{\textsf{#1}}
+\newcommand{\opt}[1]{\texttt{#1}}
+\newcommand{\env}[1]{\texttt{#1}}
+\newcommand{\cmnd}[1]{\texttt{\textbackslash#1}}
+
+\title{The \pkg{csthm} Package}
+\author{Agni Datta \\ \texttt{agnidatta.org@gmail.com}}
+\date{Version 1.2 (August 31, 2024)}
+
+\begin{document}
+
+\maketitle
+
+\tableofcontents
+
+\section{Introduction}
+
+The \pkg{csthm} package provides a set of customised theorem-like environments specifically designed for computer science documents. It offers pre-defined theorem styles and environments to streamline the creation of theorems, definitions, remarks, and other common structures in computer science papers and documents.
+
+\section{Package Options}
+
+The \pkg{csthm} package supports the following option:
+
+\begin{description}
+ \item[\opt{cleveref}] Loads the \pkg{cleveref} package for enhanced cross-referencing capabilities. This option requires the \pkg{hyperref} package to be loaded before \pkg{csthm}.
+\end{description}
+
+\section{Usage}
+
+To use the package with default settings:
+
+\begin{verbatim}
+\usepackage{csthm}
+\end{verbatim}
+
+To use the package with \pkg{cleveref} support:
+
+\begin{verbatim}
+\usepackage{hyperref}
+\usepackage[cleveref]{csthm}
+\end{verbatim}
+
+\section{Theorem Styles}
+
+The package defines four theorem styles:
+
+\begin{description}
+ \item[thmstyle] Used for theorems, lemmas, corollaries, etc.
+ \item[defstyle] Used for definitions, examples, problems, etc.
+ \item[remarkstyle] Used for remarks, notes, solutions, etc.
+ \item[hltstyle] Used for highlighted content like important points.
+\end{description}
+
+\section{Predefined Environments}
+
+\subsection{Theorem-like Environments}
+
+\begin{itemize}
+ \item \env{theorem}
+ \item \env{fact}
+ \item \env{assumption}
+ \item \env{claim}
+ \item \env{conjecture}
+ \item \env{corollary}
+ \item \env{lemma}
+ \item \env{property}
+ \item \env{proposition}
+\end{itemize}
+
+Usage:
+\begin{verbatim}
+\begin{theorem}[Optional Title]
+ Theorem content...
+\end{theorem}
+\end{verbatim}
+
+\subsection{Definition-like Environments}
+
+\begin{itemize}
+ \item \env{definition}
+ \item \env{example}
+ \item \env{exercise}
+ \item \env{problem}
+ \item \env{question}
+\end{itemize}
+
+Usage:
+\begin{verbatim}
+\begin{definition}[Optional Title]
+ Definition content...
+\end{definition}
+\end{verbatim}
+
+\subsection{Remark-like Environments}
+
+\begin{itemize}
+ \item \env{note}
+ \item \env{remark}
+ \item \env{solution}
+\end{itemize}
+
+Usage:
+\begin{verbatim}
+\begin{remark}[Optional Title]
+ Remark content...
+\end{remark}
+\end{verbatim}
+
+\subsection{Highlight Environments}
+
+\begin{itemize}
+ \item \env{important}
+ \item \env{highlight}
+ \item \env{keypoint}
+\end{itemize}
+
+Usage:
+\begin{verbatim}
+\begin{important}[Optional Title]
+ Important content...
+\end{important}
+\end{verbatim}
+
+\subsection{Special Environments}
+
+\subsubsection{Case Environment}
+
+The \env{case} environment provides an enumerated list for describing different cases in a proof or analysis.
+
+Usage:
+\begin{verbatim}
+\begin{case}[Optional arguments for enumerate]
+ \item Case 1: ...
+ \item Case 2: ...
+\end{case}
+\end{verbatim}
+
+\subsubsection{Axiom Environment}
+
+The \env{axiom} environment provides an enumerated list for stating axioms.
+
+Usage:
+\begin{verbatim}
+\begin{axiom}[Optional arguments for enumerate]
+ \item Axiom 1: ...
+ \item Axiom 2: ...
+\end{axiom}
+\end{verbatim}
+
+\section{Customization}
+
+\subsection{Accent Color}
+
+You can customise the accent colour used in the package by redefining the \cmnd{accentcolor} command:
+
+\begin{verbatim}
+\renewcommand{\accentcolor}{blue}
+\end{verbatim}
+
+Or use the provided command:
+
+\begin{verbatim}
+\setaccentcolor{blue}
+\end{verbatim}
+
+\subsection{QED Symbol}
+
+The package redefines the QED symbol to a filled black square. You can customise this by redefining the \cmnd{qedsymbol} command:
+
+\begin{verbatim}
+\renewcommand\qedsymbol{$\square$}
+\end{verbatim}
+
+\section{Examples}
+
+Here are some examples demonstrating the usage of various environments:
+
+\begin{theorem}[Complexity of Bubble Sort]
+ The time complexity of the Bubble Sort algorithm is $\mathcal{O}(n^2)$ in the worst and average cases, where $n$ is the number of elements to be sorted.
+\end{theorem}
+
+\begin{proof}
+ Bubble Sort uses two nested loops to compare and swap adjacent elements. The outer loop runs $n-1$ times, and the inner loop runs $n-i-1$ times for each iteration $i$ of the outer loop. This results in approximately $n^2/2$ comparisons, leading to a time complexity of $\mathcal{O}(n^2)$.
+\end{proof}
+
+\begin{definition}[Big O Notation]
+ For functions $f(n)$ and $g(n)$, we say $f(n) = \mathcal{O}(g(n))$ if there exist positive constants $c$ and $n_0$ such that $0 \leq f(n) \leq cg(n)$ for all $n \geq n_0$.
+\end{definition}
+
+\begin{remark}
+ While Bubble Sort has a worst-case time complexity of $\mathcal{O}(n^2)$, it can be useful for small datasets or nearly sorted arrays due to its simplicity and in-place sorting nature.
+\end{remark}
+
+\begin{important}
+ Understanding time and space complexity is crucial for designing efficient algorithms and selecting appropriate data structures.
+\end{important}
+
+\begin{case}
+ \item Best Case: The time complexity is $\mathcal{O}(n \log n)$ when the pivot always divides the array into two halves.
+ \item Average Case: The expected time complexity is $\mathcal{O}(n \log n)$ with random pivot selection.
+ \item Worst Case: The time complexity is $\mathcal{O}(n^2)$ when the pivot is always the smallest or largest element.
+\end{case}
+
+\begin{axiom}
+ \item Axiom of Extensionality: Two sets are equal if and only if they have the same elements.
+ \item Axiom of Pairing: For any two sets $a$ and $b$, there exists a set $\{a, b\}$ that contains exactly $a$ and $b$ as its elements.
+\end{axiom}
+
+\section{Requirements}
+
+The \pkg{csthm} package requires the following packages:
+
+\begin{itemize}
+ \item \pkg{amsmath}
+ \item \pkg{amssymb}
+ \item \pkg{amsthm}
+ \item \pkg{enumitem}
+ \item \pkg{thmtools}
+\end{itemize}
+
+If the \opt{cleveref} option is used, the \pkg{hyperref} package must be loaded before \pkg{csthm}.
+
+\section{Version History}
+
+\begin{description}
+ \item[v1.0 (2024/08/31)] Initial version
+ \item[v1.1 (2024/08/31)] Added \opt{cleveref} support
+ \item[v1.2 (2024/08/31)] Improved documentation, code structure, and added to CTAN
+\end{description}
+
+\section{License}
+
+This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3c of this license or (at your option) any later version. The latest version of this license is in:
+
+\url{http://www.latex-project.org/lppl.txt}
+
+and version 1.3c or later is part of all distributions of LaTeX version 2008/05/04 or later.
+
+\section{Feedback and Contributions}
+
+For bug reports, feature requests, or general feedback, please contact the package maintainer, Agni Datta, at \texttt{\hyperlink{mailto:agnidatta.org@gmail.com}{agnidatta.org@gmail.com}}.
+
+Contributions to the package are welcome. Please submit pull requests or issues to the package's GitHub repository.
+
+\section{Package Source Code}
+
+The following listing shows the source code of the \texttt{csthm.sty} file:
+
+\lstinputlisting{csthm.sty}
+
+\appendix
+
+\section{Real-Life Usage Examples}
+
+\subsection{Theorem Environments}
+
+The \pkg{csthm} package provides several theorem-like environments commonly used in computer science literature:
+
+\begin{theorem}[Graph Colouring]
+ For any graph $G$, the chromatic number $\chi(G)$ is the minimum number of colours needed to colour the vertices of $G$ such that no two adjacent vertices share the same colour.
+\end{theorem}
+
+\begin{lemma}[Sum of Odd Numbers]
+ For every positive integer $n$, the sum of the first $n$ odd numbers is equal to $n^2$.
+\end{lemma}
+
+\begin{proof}
+ We can prove this by induction on $n$:
+
+ \begin{case}
+ \item \textbf{Base case:} For $n=1$, the first odd number is 1, and $1^2 = 1$. The statement holds.
+
+ \item \textbf{Inductive step:} Assume the statement holds for some $k \geq 1$. We need to prove it for $k+1$.
+
+ The $(k+1)$-th odd number is $2k+1$. So, we have:
+
+ $\sum_{i=1}^{k+1} (2i-1) = \sum_{i=1}^k (2i-1) + (2k+1)$
+
+ $= k^2 + (2k+1)$ (by induction hypothesis)
+
+ $= k^2 + 2k + 1$
+
+ $= (k+1)^2$
+
+ Thus, the statement holds for $k+1$, completing the proof.
+ \end{case}
+\end{proof}
+
+\begin{corollary}[Sum of Integers]
+ The sum of the first $n$ positive integers is given by $\frac{n(n+1)}{2}$.
+\end{corollary}
+
+\begin{proposition}[Even Sum Property]
+ The sum of two even integers is always even.
+\end{proposition}
+
+\begin{conjecture}[Goldbach's Conjecture]
+ Every even integer greater than 2 can be expressed as the sum of two prime numbers.
+\end{conjecture}
+
+\subsection{Definition and Example Environments}
+
+To introduce key definitions and illustrative examples:
+
+\begin{definition}[Tree]
+ A \emph{tree} is a connected, undirected graph with no cycles.
+\end{definition}
+
+\begin{example}[Binary Tree]
+ Consider a binary tree with 7 nodes labelled from 1 to 7:
+ \begin{verbatim}
+ 1
+ / \
+ 2 3
+ / \ / \
+ 4 5 6 7
+ \end{verbatim}
+ This tree has 3 levels, and each parent node has at most 2 children.
+\end{example}
+
+\subsection{Remark Environments}
+
+To include remarks and notes that highlight important observations:
+
+\begin{remark}
+ While all trees are graphs, not all graphs are trees. A graph must be acyclic and connected to be classified as a tree.
+\end{remark}
+
+\begin{note}
+ Many conjectures, like Goldbach's Conjecture, remain unproven for centuries despite numerous verified instances. This highlights the complexity of certain mathematical problems.
+\end{note}
+
+\subsection{Highlight Environments}
+
+To emphasise crucial points within the document:
+
+\begin{important}
+ Algorithm efficiency is critical in computer science. Always consider time and space complexity when designing and analysing algorithms.
+\end{important}
+
+\begin{keypoint}
+ Understanding the P vs NP problem is fundamental in computational complexity theory and has significant implications for algorithm design and cryptography.
+\end{keypoint}
+
+\subsection{Case Environment}
+
+Used to present distinct cases in an argument or proof:
+
+\begin{theorem}[Factorial Definition]
+ The factorial of a non-negative integer $n$, denoted as $n!$, is defined as follows:
+\end{theorem}
+
+\begin{case}
+ \item When $n = 0$, $0! = 1$ (by definition).
+ \item When $n > 0$, $n! = n \times (n-1) \times \cdots \times 2 \times 1$.
+\end{case}
+
+\subsection{Axiom Environment}
+
+To enumerate foundational axioms in formal proofs:
+
+\begin{axiom}
+ \item For any sets $A$ and $B$, $A \cup B = B \cup A$ (Commutative Law of Union).
+ \item For any sets $A$, $B$, and $C$, $A \cap (B \cup C) = (A \cap B) \cup (A \cap C)$ (Distributive Law).
+ \item For any set $A$, $A \cup \emptyset = A$ (Identity Law of Union).
+\end{axiom}
+
+\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/csthm/csthm.dtx b/macros/latex/contrib/csthm/csthm.dtx
new file mode 100644
index 0000000000..5c059b3523
--- /dev/null
+++ b/macros/latex/contrib/csthm/csthm.dtx
@@ -0,0 +1,238 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2024 by Agni Datta <agnidatta.org@gmail.com>
+%
+% This file may be distributed and/or modified under the conditions of
+% the LaTeX Project Public License, either version 1.3c 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.3c or later is part of all distributions of LaTeX
+% version 2008/05/04 or later.
+%
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Agni Datta.
+%
+% This work consists of the files csthm.dtx and csthm.ins
+% and the derived file csthm.sty.
+%
+% \fi
+%
+% \iffalse
+%<*driver>
+\ProvidesFile{csthm.dtx}
+%</driver>
+%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+%<package>\ProvidesPackage{csthm}
+%<*package>
+ [2024/08/31 v1.2 Theorem Environments for Computer Science]
+%</package>
+%
+%<*driver>
+\documentclass{ltxdoc}
+\usepackage{csthm}
+\EnableCrossrefs
+\CodelineIndex
+\RecordChanges
+\begin{document}
+\DocInput{csthm.dtx}
+\PrintChanges
+\PrintIndex
+\end{document}
+%</driver>
+% \fi
+%
+% \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 \~}
+%
+%
+% \changes{v1.0}{2024/08/31}{Initial version}
+% \changes{v1.1}{2024/08/31}{Added cleveref support}
+% \changes{v1.2}{2024/08/31}{Improved documentation and code structure}
+%
+% \DoNotIndex{\newcommand,\newenvironment}
+%
+% \providecommand*{\url}{\texttt}
+% \GetFileInfo{csthm.dtx}
+% \title{The \textsf{csthm} package}
+% \author{Agni Datta \\ \url{agnidatta.org@gmail.com}}
+% \date{\filedate}
+%
+% \maketitle
+%
+% \section{Introduction}
+%
+% This package provides customized theorem-like environments specifically designed for computer science documents. It offers a set of pre-defined theorem styles and environments to streamline the creation of theorems, definitions, remarks, and other common structures in computer science papers and documents.
+%
+% \section{Usage}
+%
+% Load the package with:
+% \begin{verbatim}
+% \usepackage{csthm}
+% \end{verbatim}
+%
+% To use the package with cleveref support:
+% \begin{verbatim}
+% \usepackage[cleveref]{csthm}
+% \end{verbatim}
+%
+% \section{Implementation}
+%
+% \begin{macrocode}
+%<*package>
+% Package options
+\newif\if@csthm@loadcleveref
+\DeclareOption{cleveref}{\@csthm@loadclevereftrue}
+\ProcessOptions\relax
+
+% Required packages
+\RequirePackage{amsmath}
+\RequirePackage{amssymb}
+\RequirePackage{amsthm}
+\RequirePackage{enumitem}
+\RequirePackage{thmtools}
+
+% Conditionally load cleveref if the option is set and hyperref is loaded
+\if@csthm@loadcleveref
+\AtBeginDocument{%
+ \@ifpackageloaded{hyperref}{%
+ \RequirePackage{cleveref}
+ }{%
+ \PackageWarning{csthm}{The 'cleveref' option was set, but 'hyperref' is not loaded. Skipping 'cleveref' loading.}
+ }%
+}
+\fi
+
+% Define theorem styles
+\declaretheoremstyle[
+ spaceabove=\topsep,
+ spacebelow=\topsep,
+ headfont=\scshape,
+ notefont=\scshape,
+ bodyfont=\normalfont,
+ postheadspace=5pt,
+ numberwithin=section,
+ qed=$\scriptstyle\star$,
+ headpunct={.}
+]{thmstyle}
+
+\declaretheoremstyle[
+ spaceabove=\topsep,
+ spacebelow=\topsep,
+ headfont=\bfseries,
+ notefont=\bfseries,
+ bodyfont=\normalfont,
+ postheadspace=5pt,
+ numberwithin=section,
+ qed=$\scriptstyle\maltese$,
+ headpunct={.}
+]{defstyle}
+
+\declaretheoremstyle[
+ spaceabove=\topsep,
+ spacebelow=\topsep,
+ headfont=\itshape,
+ notefont=\itshape,
+ bodyfont=\normalfont,
+ postheadspace=5pt,
+ numberwithin=section,
+ qed=$\scriptstyle\maltese$,
+ headpunct={.}
+]{remarkstyle}
+
+\declaretheoremstyle[
+ spaceabove=\topsep,
+ spacebelow=\topsep,
+ headfont=\sffamily\scshape,
+ notefont=\sffamily\scshape,
+ bodyfont=\normalfont\sffamily,
+ postheadspace=5pt,
+ numberwithin=section,
+ qed=$\scriptstyle\maltese$,
+ headpunct={.}
+]{hltstyle}
+
+% Define theorem environments
+\declaretheorem[style=thmstyle,name=Theorem]{theorem}
+\declaretheorem[style=defstyle,sibling=theorem]{fact}
+\declaretheorem[style=thmstyle,sibling=theorem]{assumption}
+\declaretheorem[style=thmstyle,sibling=theorem]{claim}
+\declaretheorem[style=thmstyle,sibling=theorem]{conjecture}
+\declaretheorem[style=thmstyle,sibling=theorem]{corollary}
+\declaretheorem[style=thmstyle,sibling=theorem]{lemma}
+\declaretheorem[style=thmstyle,sibling=theorem]{property}
+\declaretheorem[style=thmstyle,sibling=theorem]{proposition}
+
+% Define definition environments
+\declaretheorem[style=defstyle,sibling=theorem]{definition}
+\declaretheorem[style=defstyle,sibling=theorem]{example}
+\declaretheorem[style=defstyle,sibling=theorem]{exercise}
+\declaretheorem[style=defstyle,sibling=theorem]{problem}
+\declaretheorem[style=defstyle,sibling=theorem]{question}
+
+% Define remark environments
+\declaretheorem[style=remarkstyle,sibling=theorem]{note}
+\declaretheorem[style=remarkstyle,sibling=theorem]{remark}
+\declaretheorem[style=remarkstyle,sibling=theorem]{solution}
+
+% Define highlight environments
+\declaretheorem[style=hltstyle,name=Important]{important}
+\declaretheorem[style=hltstyle]{highlight}
+\declaretheorem[style=hltstyle]{keypoint}
+
+% Define case environment
+\newlist{caseList}{enumerate}{1}
+\setlist[caseList]{label=\textbf{Case~\arabic*:},leftmargin=*}
+
+\NewDocumentEnvironment{case}{O{}}{%
+ \begin{caseList}[#1]%
+ }{%
+ \end{caseList}%
+}
+
+% Define axiom environment
+\newlist{axiomList}{enumerate}{1}
+\setlist[axiomList]{label=\textbf{Axiom~\Alph*:}, leftmargin=*}
+
+\NewDocumentEnvironment{axiom}{O{}}{%
+ \begin{axiomList}[#1]%
+ }{%
+ \end{axiomList}%
+}
+
+% Custom QED symbol
+\renewcommand\qedsymbol{$\scriptstyle\blacksquare$}
+
+% Define accent color (customizable by the user)
+\providecommand{\accentcolor}{black}
+
+% Package documentation commands
+\providecommand{\csthmpkg}{\textsf{csthm}}
+\providecommand{\email}[1]{\href{mailto:#1}{\texttt{#1}}}
+
+% User-level commands for customization
+\newcommand{\setaccentcolor}[1]{\renewcommand{\accentcolor}{#1}}
+%</package>
+% \end{macrocode}
+%
+% \Finale
+\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/csthm/csthm.ins b/macros/latex/contrib/csthm/csthm.ins
new file mode 100644
index 0000000000..02d0c9ea13
--- /dev/null
+++ b/macros/latex/contrib/csthm/csthm.ins
@@ -0,0 +1,55 @@
+%%
+%% Copyright (C) 2024 by Agni Datta <agnidatta.org@gmail.com>
+%%
+%% This file may be distributed and/or modified under the conditions of
+%% the LaTeX Project Public License, either version 1.3c 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.3c or later is part of all distributions of LaTeX
+%% version 2008/05/04 or later.
+%%
+
+\input docstrip.tex
+\keepsilent
+
+\usedir{tex/latex/csthm}
+
+\preamble
+
+This is a generated file.
+
+Copyright (C) 2024 by Agni Datta <agnidatta.org@gmail.com>
+
+This file may be distributed and/or modified under the conditions of
+the LaTeX Project Public License, either version 1.3c 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.3c or later is part of all distributions of LaTeX
+version 2008/05/04 or later.
+
+\endpreamble
+
+\generate{\file{csthm.sty}{\from{csthm.dtx}{package}}}
+
+\obeyspaces
+\Msg{************************************************************************}
+\Msg{* *}
+\Msg{* To finish the installation you have to move the following *}
+\Msg{* file into a directory searched by TeX: *}
+\Msg{* *}
+\Msg{* csthm.sty *}
+\Msg{* *}
+\Msg{* To produce the documentation run the file csthm.dtx *}
+\Msg{* through LaTeX. *}
+\Msg{* *}
+\Msg{* Happy TeXing! *}
+\Msg{* *}
+\Msg{************************************************************************}
+
+\endbatchfile \ No newline at end of file
diff --git a/macros/latex/contrib/csvsimple/CHANGES.md b/macros/latex/contrib/csvsimple/CHANGES.md
index 3178395f76..e2ccf7af24 100644
--- a/macros/latex/contrib/csvsimple/CHANGES.md
+++ b/macros/latex/contrib/csvsimple/CHANGES.md
@@ -17,6 +17,20 @@ and this project adheres to
+## [2.7.0] - 2024-09-27
+
+### Added
+- Warning, if the CSV file does not contain (accepted) data lines
+
+### Changed
+- Comment lines or empty line before header line are now supported (issue #41)
+- If there is no data line, `late after head` and `late after last line` are applied nonetheless
+ (loosely connected to issue #41). Note: You should not use files without data!
+- Technical information: The package documentation is now produced with lualatex instead of pdflatex
+- Technical information: The documentation loads `minted2`, if it exists, to avoid encoding errors and latexmk problems with minted v3
+
+
+
## [2.6.1] - 2024-05-16
### Changed
diff --git a/macros/latex/contrib/csvsimple/README.md b/macros/latex/contrib/csvsimple/README.md
index 29196c03e9..47c07daf07 100644
--- a/macros/latex/contrib/csvsimple/README.md
+++ b/macros/latex/contrib/csvsimple/README.md
@@ -1,4 +1,4 @@
-# The LaTeX package csvsimple - version 2.6.1 (2024/05/16)
+# The LaTeX package csvsimple - version 2.7.0 (2024/09/27)
> Copyright (c) 2008-2024 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
diff --git a/macros/latex/contrib/csvsimple/csvsimple-doc.sty b/macros/latex/contrib/csvsimple/csvsimple-doc.sty
index c8d933c684..12141768f5 100644
--- a/macros/latex/contrib/csvsimple/csvsimple-doc.sty
+++ b/macros/latex/contrib/csvsimple/csvsimple-doc.sty
@@ -1,5 +1,5 @@
% !TeX encoding=UTF-8
-%% The LaTeX package csvsimple - version 2.6.1 (2024/05/16)
+%% The LaTeX package csvsimple - version 2.7.0 (2024/09/27)
%% csvsimple-doc.sty: style file for the documentation
%%
%% -------------------------------------------------------------------------------------------
@@ -18,8 +18,8 @@
%%
%% This work consists of all files listed in README.md
%%
-\def\version{2.6.1}%
-\def\datum{2024/05/16}%
+\def\version{2.7.0}%
+\def\datum{2024/09/27}%
\IfFileExists{csvsimple-doc.cfg}{\input{csvsimple-doc.cfg}}{}\providecommand\csvpkgprefix{}
@@ -55,6 +55,7 @@
\RequirePackage{longtable,booktabs,ifthen,etoolbox}
+\IfFileExists{minted2.sty}{\RequirePackage{minted2}}{}
\RequirePackage{tcolorbox}
\tcbuselibrary{skins,xparse,minted,breakable,documentation,raster}
@@ -112,4 +113,4 @@
\makeindex
-\pdfsuppresswarningpagegroup=1
+%\pdfsuppresswarningpagegroup=1
diff --git a/macros/latex/contrib/csvsimple/csvsimple-example.pdf b/macros/latex/contrib/csvsimple/csvsimple-example.pdf
index f85684f6d1..b916830089 100644
--- a/macros/latex/contrib/csvsimple/csvsimple-example.pdf
+++ b/macros/latex/contrib/csvsimple/csvsimple-example.pdf
Binary files differ
diff --git a/macros/latex/contrib/csvsimple/csvsimple-example.tex b/macros/latex/contrib/csvsimple/csvsimple-example.tex
index 0baf2183c7..73b321be2b 100644
--- a/macros/latex/contrib/csvsimple/csvsimple-example.tex
+++ b/macros/latex/contrib/csvsimple/csvsimple-example.tex
@@ -1,4 +1,4 @@
-%% The LaTeX package csvsimple - version 2.6.1 (2024/05/16)
+%% The LaTeX package csvsimple - version 2.7.0 (2024/09/27)
%% csvsimple-example.tex: an example for csvsimple
%%
%% -------------------------------------------------------------------------------------------
diff --git a/macros/latex/contrib/csvsimple/csvsimple-l3.pdf b/macros/latex/contrib/csvsimple/csvsimple-l3.pdf
index f17b9183c3..66d770fefe 100644
--- a/macros/latex/contrib/csvsimple/csvsimple-l3.pdf
+++ b/macros/latex/contrib/csvsimple/csvsimple-l3.pdf
Binary files differ
diff --git a/macros/latex/contrib/csvsimple/csvsimple-l3.sty b/macros/latex/contrib/csvsimple/csvsimple-l3.sty
index 849aa79aec..3d8d1484b6 100644
--- a/macros/latex/contrib/csvsimple/csvsimple-l3.sty
+++ b/macros/latex/contrib/csvsimple/csvsimple-l3.sty
@@ -1,4 +1,4 @@
-%% The LaTeX package csvsimple - version 2.6.1 (2024/05/16)
+%% The LaTeX package csvsimple - version 2.7.0 (2024/09/27)
%% csvsimple-l3.sty: Simple LaTeX CSV file processing (LaTeX3)
%%
%% -------------------------------------------------------------------------------------------
@@ -18,7 +18,7 @@
%% This work consists of all files listed in README.md
%%
\NeedsTeXFormat{LaTeX2e}[2023-11-01]
-\ProvidesExplPackage{csvsimple-l3}{2024/05/16}{2.6.1}
+\ProvidesExplPackage{csvsimple-l3}{2024/09/27}{2.7.0}
{LaTeX3 CSV file processing}
@@ -148,9 +148,6 @@
Therefore,~the~macro~#2 is~not~defined.
}
-\msg_new:nnn { csvsimple }{ empty-head }
- { File~'#1'~starts~with~an~empty~line~(empty~head)!.}
-
\msg_new:nnn { csvsimple }{ file-error }
{ File~'#1'~not~existent,~not~readable,~or~empty!}
@@ -167,6 +164,8 @@
{ Call~of~CSV-Sorter~failed! }
{ See~log~file~'\l__csvsim_csvsorter_log_str'. }
+\msg_new:nnn { csvsimple }{ data-missing }
+ { File~'#1'~does~not~contain~(accepted)~data~lines!~The~result~may~be~unpleasant.}
%---- core loop processing
@@ -227,18 +226,18 @@
\cs_new_protected_nopar:Npn \__csvsim_read_head:
{
- \__csvsim_read_line:
- \tl_if_eq:NNTF \csvline \c__csvsim_par_tl
+ \bool_do_while:nn
{
- \msg_error:nne { csvsimple }{ empty-head }{ \g__csvsim_filename_str }
+ \bool_lazy_or_p:nn { \tl_if_eq_p:NN \csvline \c__csvsim_par_tl }{ \tl_if_blank_p:o \csvline }
}
{
- \int_gzero:N \g_csvsim_columncount_int
- \__csvsim_scan_line:
- \bool_if:NT \g__csvsim_colnames_detection_bool
- {
- \int_step_function:nN \g_csvsim_columncount_int \__csvsim_process_head_name:n
- }
+ \__csvsim_read_line:
+ }
+ \int_gzero:N \g_csvsim_columncount_int
+ \__csvsim_scan_line:
+ \bool_if:NT \g__csvsim_colnames_detection_bool
+ {
+ \int_step_function:nN \g_csvsim_columncount_int \__csvsim_process_head_name:n
}
}
@@ -395,10 +394,15 @@
}
\__csvsim_set_colnames:
\seq_gclear:N \g__csvsim_colname_seq
- \bool_if:NF \g__csvsim_line_firstline_bool
+ \bool_if:NT \g__csvsim_line_firstline_bool
{
- \g__csvsim_hook_late_after_last_line_tl
+ \msg_warning:nne { csvsimple }{ data-missing }{ \g__csvsim_filename_str }
+ \bool_if:NT \g__csvsim_head_bool
+ {
+ \g__csvsim_hook_late_after_head_tl
+ }
}
+ \g__csvsim_hook_late_after_last_line_tl
\g__csvsim_hook_table_end_tl
\g__csvsim_hook_after_reading_tl
\bool_if:NT \g__csvsim_collect_data_bool
diff --git a/macros/latex/contrib/csvsimple/csvsimple-l3.tex b/macros/latex/contrib/csvsimple/csvsimple-l3.tex
index 6c70fa3003..fba06f6660 100644
--- a/macros/latex/contrib/csvsimple/csvsimple-l3.tex
+++ b/macros/latex/contrib/csvsimple/csvsimple-l3.tex
@@ -1,7 +1,7 @@
% \LaTeX-Main\
% !TeX encoding=UTF-8
% !TeX spellcheck=en_US
-%% The LaTeX package csvsimple - version 2.6.1 (2024/05/16)
+%% The LaTeX package csvsimple - version 2.7.0 (2024/09/27)
%% csvsimple.tex: Manual
%%
%% -------------------------------------------------------------------------------------------
@@ -1027,14 +1027,14 @@ see Section~\ref{subsec:tabsupport} from page~\pageref{subsec:tabsupport}.
\clearpage
\subsection{Header Processing and Column Name Assignment}%
-\begin{docCsvKey}{head}{\colOpt{=true\textbar false}}{default |true|, initially |true|}
- If this key is set, the first line of the CSV file is treated as a header
+\begin{docCsvKey}[doc updated=2024-09-18]{head}{\colOpt{=true\textbar false}}{default |true|, initially |true|}
+ If this key is set, the first non-empty line of the CSV file is treated as a header
line which can be used for column name assignments.
\end{docCsvKey}
\begin{docCsvKey}{no head}{}{no value}
- Abbreviation for |head=false|, i.\,e. the first line of the CSV file is
+ Abbreviation for |head=false|, i.\,e. the first non-empty line of the CSV file is
treated as data line.
Note that this option cannot be used in combination with
the |\csvauto...| commands like \refCom{csvautotabular}, etc.
@@ -1842,6 +1842,7 @@ completeness, but are unlikely to be used directly.
\subsection{Special Characters}\label{subsec:specchar}
Be default, the CSV content is treated like normal \LaTeX\ text, see
Subsection~\ref{macrocodexample} on page~\pageref{macrocodexample}.
+For example, \%~can be used to start an in-line comment.
But, \TeX\ special characters of the CSV content may also be interpreted
as normal characters (|\catcode| 12, other), if one or more of the following options are used.
diff --git a/macros/latex/contrib/csvsimple/csvsimple-legacy.pdf b/macros/latex/contrib/csvsimple/csvsimple-legacy.pdf
index 6138c507e3..25285b6379 100644
--- a/macros/latex/contrib/csvsimple/csvsimple-legacy.pdf
+++ b/macros/latex/contrib/csvsimple/csvsimple-legacy.pdf
Binary files differ
diff --git a/macros/latex/contrib/csvsimple/csvsimple-legacy.sty b/macros/latex/contrib/csvsimple/csvsimple-legacy.sty
index ecaba4a7b0..7db0c82117 100644
--- a/macros/latex/contrib/csvsimple/csvsimple-legacy.sty
+++ b/macros/latex/contrib/csvsimple/csvsimple-legacy.sty
@@ -1,4 +1,4 @@
-%% The LaTeX package csvsimple - version 2.6.1 (2024/05/16)
+%% The LaTeX package csvsimple - version 2.7.0 (2024/09/27)
%% csvsimple-legacy.sty: Simple LaTeX CSV file processing (LaTeX2e)
%%
%% -------------------------------------------------------------------------------------------
@@ -18,7 +18,7 @@
%% This work consists of all files listed in README.md
%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{csvsimple-legacy}[2024/05/16 version 2.6.1 LaTeX2e CSV file processing]
+\ProvidesPackage{csvsimple-legacy}[2024/09/27 version 2.7.0 LaTeX2e CSV file processing]
%---- check package
diff --git a/macros/latex/contrib/csvsimple/csvsimple-legacy.tex b/macros/latex/contrib/csvsimple/csvsimple-legacy.tex
index ae40e8563d..2161afddb2 100644
--- a/macros/latex/contrib/csvsimple/csvsimple-legacy.tex
+++ b/macros/latex/contrib/csvsimple/csvsimple-legacy.tex
@@ -1,6 +1,6 @@
% \LaTeX-Main\
% !TeX encoding=UTF-8
-%% The LaTeX package csvsimple - version 2.6.1 (2024/05/16)
+%% The LaTeX package csvsimple - version 2.7.0 (2024/09/27)
%% csvsimple.tex: Manual
%%
%% -------------------------------------------------------------------------------------------
diff --git a/macros/latex/contrib/csvsimple/csvsimple.pdf b/macros/latex/contrib/csvsimple/csvsimple.pdf
index 8d148b5a6f..a5cb3da2e5 100644
--- a/macros/latex/contrib/csvsimple/csvsimple.pdf
+++ b/macros/latex/contrib/csvsimple/csvsimple.pdf
Binary files differ
diff --git a/macros/latex/contrib/csvsimple/csvsimple.sty b/macros/latex/contrib/csvsimple/csvsimple.sty
index 01ccbb3f72..a9d549f76d 100644
--- a/macros/latex/contrib/csvsimple/csvsimple.sty
+++ b/macros/latex/contrib/csvsimple/csvsimple.sty
@@ -1,4 +1,4 @@
-%% The LaTeX package csvsimple - version 2.6.1 (2024/05/16)
+%% The LaTeX package csvsimple - version 2.7.0 (2024/09/27)
%% csvsimple.sty: Simple LaTeX CSV file processing
%%
%% -------------------------------------------------------------------------------------------
@@ -18,7 +18,7 @@
%% This work consists of all files listed in README.md
%%
\NeedsTeXFormat{LaTeX2e}[2022-06-01]
-\ProvidesExplPackage{csvsimple}{2024/05/16}{2.6.1}
+\ProvidesExplPackage{csvsimple}{2024/09/27}{2.7.0}
{LaTeX CSV file processing}
\cs_if_exist:NT \c__csvsim_package_expl_bool
diff --git a/macros/latex/contrib/csvsimple/csvsimple.tex b/macros/latex/contrib/csvsimple/csvsimple.tex
index 73d34f4c34..f3a5d66953 100644
--- a/macros/latex/contrib/csvsimple/csvsimple.tex
+++ b/macros/latex/contrib/csvsimple/csvsimple.tex
@@ -1,6 +1,6 @@
% \LaTeX-Main\
% !TeX encoding=UTF-8
-%% The LaTeX package csvsimple - version 2.6.1 (2024/05/16)
+%% The LaTeX package csvsimple - version 2.7.0 (2024/09/27)
%% csvsimple.tex: Manual
%%
%% -------------------------------------------------------------------------------------------
diff --git a/macros/latex/contrib/customenvs/doc/customenvs-doc-en.pdf b/macros/latex/contrib/customenvs/doc/customenvs-doc-en.pdf
index adbd84e2f6..212a2da0c9 100644
--- a/macros/latex/contrib/customenvs/doc/customenvs-doc-en.pdf
+++ b/macros/latex/contrib/customenvs/doc/customenvs-doc-en.pdf
Binary files differ
diff --git a/macros/latex/contrib/customenvs/doc/customenvs-doc-en.tex b/macros/latex/contrib/customenvs/doc/customenvs-doc-en.tex
index 9d38bb03ee..abfa9021a9 100644
--- a/macros/latex/contrib/customenvs/doc/customenvs-doc-en.tex
+++ b/macros/latex/contrib/customenvs/doc/customenvs-doc-en.tex
@@ -34,8 +34,8 @@
\usepackage[margin=1.5cm]{geometry}
\setlength{\parindent}{0pt}
-\def\TPversion{0.1.9}
-\def\TPdate{20/08/2024}
+\def\TPversion{0.2.3}
+\def\TPdate{09/14/2024}
\usepackage{tcolorbox}
\sethlcolor{lightgray!25}
\NewDocumentCommand\MontreCode{ m }{%
@@ -59,7 +59,7 @@
{\Huge \texttt{customenvs [en]}}\\
\\
{\Large Some custom environments,} \\
- {\Large with spacing enhancements.} \\
+ {\Large or small patches.} \\
\end{tabular}
\renewcommand\arraystretch{1}
@@ -111,6 +111,14 @@
\section{History}
+\verb|v0.2.3|~:~~~Highway signs + sold banners (see \textsf{[fr]} doc)
+
+\verb|v0.2.2|~:~~~Flared arrow, with \TikZ
+
+\verb|v0.2.1|~:~~~Enhancements for \textit{stars skills} + AutoGrid for \TikZ\ (see \textsf{[fr]} doc)
+
+\verb|v0.2.0|~:~~~~Skills with stars (\textsf{fontawesome5} or \TikZ)
+
\verb|v0.1.9|~:~~~~Title banner
\verb|v0.1.8|~:~~~~Score banner
@@ -633,5 +641,77 @@ Available \MontreCode{keys} are :
It's possible to redefine \MontreCode{\textbackslash part} (for example).
+\pagebreak
+
+\section{Various commands}
+
+\subsection{Difficulty levels with stars (fontawesome5)}
+
+\begin{codehigh}[language=latex/latex3,style/main=teal!25,style/code=teal!25]
+\DiffLevelStars[max level (3)]{level}
+\end{codehigh}
+
+\begin{demohigh}[language=latex/latex3,style/main=teal!25,style/code=teal!25]
+\DiffLevelStars{0}\par
+\DiffLevelStars{2.5}\par
+\textcolor{teal}{\LARGE\DiffLevelStars[5]{4}}\par
+\DiffLevelStars[5]{1.5}\par
+\end{demohigh}
+
+\subsection{Difficulty levels with stars (tikz)}
+
+\begin{codehigh}[language=latex/latex3,style/main=teal!25,style/code=teal!25]
+\tkzLevelStars[colframe=...,colback=...,offset=...,maxlevel=...,valign=...]{level}
+\end{codehigh}
+
+\begin{demohigh}[language=latex/latex3,style/main=teal!25,style/code=teal!25]
+\tkzLevelStars{2.5}\par
+{\LARGE We ty inline \tkzLevelStars{2.25} with score 2.25}\par
+{\LARGE We ty inline \tkzLevelStars[valign=false]{1.75} with score 1.75}\par
+\tkzLevelStars[colframe=red,colback=yellow,maxlevel=5]{3}
+\end{demohigh}
+
+\subsection{Flared arrow}
+
+\begin{codehigh}[language=latex/latex3,style/main=teal!25,style/code=teal!25]
+\tkzFlaredArrow[%
+ color=..., %color of arrow
+ arrowsize=..., %size (auto or H/W )
+ bend=..., %empty for straigth or left/... or right/...
+ thickness=..., %size for the beginning
+ factor=..., %factor for calculing size for ending
+ arrowstyle=..., %style (arrows.meta)
+ move=... %boolean for moving instead coordinates
+ ]%
+ {begin}{end or move}
+\end{codehigh}
+
+\begin{demohigh}[language=latex/latex3,style/main=teal!25,style/code=teal!25]
+%arrow 0.5mm -> 1.25mm
+\begin{tikzpicture}
+\tkzFlaredArrow%
+ [thickness=0.5mm,factor=2.5,bend=left/30,color=red,arrowstyle=Triangle]%
+ {0,0}{5,1.5}
+\end{tikzpicture}
+\end{demohigh}
+
+\begin{demohigh}[language=latex/latex3,style/main=teal!25,style/code=teal!25]
+\begin{tikzpicture}
+ \draw[thin,lightgray] (-3,-1) grid (5,5) ;
+ \coordinate (A) at (0,0) ; \coordinate (B) at (4,1) ;
+ \coordinate (C) at (1,1) ; \coordinate (D) at (5,4) ;
+ \coordinate (E) at (0,1) ; \coordinate (F) at (0,5) ;
+ \coordinate (G) at (-2,0) ;
+ \tkzFlaredArrow[color=green,arrowstyle=Triangle]{A}{B}
+ \tkzFlaredArrow[color=blue,bend=right/10]{D}{C}
+ \tkzFlaredArrow%
+ [color=red,bend=left/45,arrowstyle=Stealth,thickness=0.1mm,factor=10]%
+ {-2,1}{0,4}
+ \tkzFlaredArrow%
+ [color=red,bend=right/45,thickness=0.1mm,factor=10,arrowstyle=Stealth]%
+ {-2,1}{0,4}
+ \tkzFlaredArrow[color=teal,move,bend=left/10]{-3,-1}{5,1}
+ \end{tikzpicture}
+\end{demohigh}
\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/customenvs/doc/customenvs-doc-fr.pdf b/macros/latex/contrib/customenvs/doc/customenvs-doc-fr.pdf
index 5f86baf5c9..4c5cd3cd2f 100644
--- a/macros/latex/contrib/customenvs/doc/customenvs-doc-fr.pdf
+++ b/macros/latex/contrib/customenvs/doc/customenvs-doc-fr.pdf
Binary files differ
diff --git a/macros/latex/contrib/customenvs/doc/customenvs-doc-fr.tex b/macros/latex/contrib/customenvs/doc/customenvs-doc-fr.tex
index 1d9576f944..5f319afb89 100644
--- a/macros/latex/contrib/customenvs/doc/customenvs-doc-fr.tex
+++ b/macros/latex/contrib/customenvs/doc/customenvs-doc-fr.tex
@@ -39,10 +39,11 @@
\usepackage[margin=1.5cm]{geometry}
\setlength{\parindent}{0pt}
-\def\TPversion{0.1.9}
-\def\TPdate{20 août 2024}
+\def\TPversion{0.2.3}
+\def\TPdate{14 septembre 2024}
\usepackage{tcolorbox}
\tcbuselibrary{listingsutf8}
+%\usepackage{eurosym}
\newtcblisting{DemoCode}[1]{%
enhanced,width=0.95\linewidth,center,%
bicolor,size=title,%
@@ -50,6 +51,8 @@
colbacklower=cyan!1!white,%
colframe=cyan!75!black,%
listing options={%
+ inputencoding=utf8,
+ %literate={`E}{{€}}{1},
breaklines=true,%
breakatwhitespace=true,%
style=tcblatex,basicstyle=\small\ttfamily,%
@@ -62,14 +65,14 @@
keywordstyle={\color{blue}},%
classoffset=1,%
alsoletter={-},%
- morekeywords={center,justify,\LstDeuxNiv,\LstTroisNiv,\LstQuatreNiv,\NoticeDeuxNiv,\NoticeTroisNiv,\NoticeQuatreNiv,\DeuxNivBatterie,\TroisNivBatterie,\QuatreNivBatterie,\DeuxNivSmiley,\TroisNivSmiley,\QuatreNivSmiley,\vcenterfa,\faIcon,part,RenewDocumentCommand,IfBooleanTF},%
+ morekeywords={center,justify,\LstDeuxNiv,\LstTroisNiv,\LstQuatreNiv,\NoticeDeuxNiv,\NoticeTroisNiv,\NoticeQuatreNiv,\DeuxNivBatterie,\TroisNivBatterie,\QuatreNivBatterie,\DeuxNivSmiley,\TroisNivSmiley,\QuatreNivSmiley,\vcenterfa,\faIcon,part,RenewDocumentCommand,IfBooleanTF,\VilleDist},%
keywordstyle={\color{violet}},%
classoffset=2,%
alsoletter={-},%
- morekeywords={\ReponsesQCM,MultiCols,\CreerListeItems,\ListeChoixItems,\TableauCompetences,\CrayonDeCompetences,\StyleEnvtExo,\StyleEnvtExoDefaut,\TitreExo,\ipsum,EnvSMS,\SMSrec,\SMSenv,BoiteSimple,\SujetTitreExo,\CircledNumber,\AffVignette,\BoiteArrondie,\ChangerDisplaySkip,\celcouleur,\celfusion,\lignetxt,\colonnetxt,\celnumbreak,\celtxt,\BandeauScore,\InsererImage,\tkzBannerTri},%
+ morekeywords={\ReponsesQCM,MultiCols,\CreerListeItems,\ListeChoixItems,\TableauCompetences,\CrayonDeCompetences,\StyleEnvtExo,\StyleEnvtExoDefaut,\TitreExo,\ipsum,EnvSMS,\SMSrec,\SMSenv,BoiteSimple,\SujetTitreExo,\CircledNumber,\AffVignette,\BoiteArrondie,\ChangerDisplaySkip,\celcouleur,\celfusion,\lignetxt,\colonnetxt,\celnumbreak,\celtxt,\BandeauScore,\InsererImage,\tkzBannerTri,\NiveauDiffExos,\tkzEtoiles,\tkzGrilleAuto,\tkzAutoGridLocal,\tkzAutoGridActivate,\tkzFlecheEvasee,PanneauAutoroute,\AfficheSoldes},%
keywordstyle={\color{green!50!black}},%
classoffset=3,%
- morekeywords={Largeur,Filets,EspacesCL,NbCols,Labels,PoliceLabels,EspaceLabels,Swap,Type,CoeffEspVert,EpTrait,Alea,LargeurNivs,Niveaux,NoticeNiveaux,Titre,PolTitre,PolNotice,PolComp,LigneSep,CouleurNotice,CouleurNiveaux,CouleurFond,Note,Notice,PoliceCateg,PoliceBloc,Couleurs,LargeurBloc,Echelle,NoirBlanc,Libelle,EpTrait,Police,Type,ComplementTitre,Titre,CodeDebut,Couleur,EchelleImage,Decoration,Trait,Avatar,AffAvatar,NoirBlanc,CouleurE,CouleurR,CouleurFond,Hauteur,Largeur,PoliceTxt,CouleurTitre,AlignH,bg,txt,bthick,bcol,raise,Type,EspH,Fond,Texte,Style,Dense,Avant,AvantS,Apres,ApresS,Global,align,width,Legende,CouleurFond,Hauteur,Ratio,AffLegende,Couleurs,EchelleSymboles,Symboles,vRemplir,vOffset,vCentrer,height,width,blockwidth,collight,colmedium,coldar,coltxt,fonttxt,swap,maincolor,logo,type,num,dispblock,customtype},%
+ morekeywords={Largeur,Filets,EspacesCL,NbCols,Labels,PoliceLabels,EspaceLabels,Swap,Type,CoeffEspVert,EpTrait,Alea,LargeurNivs,Niveaux,NoticeNiveaux,Titre,PolTitre,PolNotice,PolComp,LigneSep,CouleurNotice,CouleurNiveaux,CouleurFond,Note,Notice,PoliceCateg,PoliceBloc,Couleurs,LargeurBloc,Echelle,NoirBlanc,Libelle,EpTrait,Police,Type,ComplementTitre,Titre,CodeDebut,Couleur,EchelleImage,Decoration,Trait,Avatar,AffAvatar,NoirBlanc,CouleurE,CouleurR,CouleurFond,Hauteur,Largeur,PoliceTxt,CouleurTitre,AlignH,bg,txt,bthick,bcol,raise,Type,EspH,Fond,Texte,Style,Dense,Avant,AvantS,Apres,ApresS,Global,align,width,Legende,CouleurFond,Hauteur,Ratio,AffLegende,Couleurs,EchelleSymboles,Symboles,vRemplir,vOffset,vCentrer,height,width,blockwidth,collight,colmedium,coldar,coltxt,fonttxt,swap,maincolor,logo,type,num,dispblock,customtype,Couleur,AlignV,Offset,NiveauMax,pasX,pasY,grilleauto,TailleFleche,Direction,Coeff,TypeFleche,Deplacement,LineCap,Epaisseur,CouleurCartouche,Fleches,CouleurFond,CouleurTitre,PoliceCartouche,TypeFleche,EspacementV,OffsetFleches,Dernier,PoliceEntete,PolicePrix,PoliceReduc,OffsetReduc,AgrandirReduc},%
keywordstyle={\color{orange}}
},%
#1
@@ -149,6 +152,14 @@
\section{Historique}
+\verb|v0.2.3|~:~~~Panneaux autoroutiers + Affichettes de soldes
+
+\verb|v0.2.2|~:~~~Ajout d'une commande pour des flèches évasées, en \TikZ\
+
+\verb|v0.2.1|~:~~~Amélioration de la gestion des étoiles pour des niveaux de difficultés + Grille auto pour \TikZ\
+
+\verb|v0.2.0|~:~~~Étoiles pour des niveaux de difficultés (compatible avec \texttt{EnvtExo})
+
\verb|v0.1.9|~:~~~Bannière de titre + Insertion d'images en remplissage vertical
\verb|v0.1.8|~:~~~Nutriscore
@@ -214,7 +225,10 @@ Les packages chargés sont :
\item \MontreCode{tabularray} ;
\item \MontreCode{xcolor} ;
\item \MontreCode{fontawesome5} ;
- \item \MontreCode{tikz} avec les librairies \MontreCode{decorations.pathmorphing,positioning,shapes.misc,calc}.
+ \item \MontreCode{tikz} avec les librairies :
+ \begin{itemize}
+ \item \MontreCode{decorations.pathmorphing,positioning,shapes.misc,calc,arrows,arrows.meta}.
+ \end{itemize}
\end{itemize}
À noter que, pour des raisons de compatibilité (ou d'incompatibilité), les packages \MontreCode{enumitem}/\MontreCode{multicol}/\MontreCode{tabularray}/\MontreCode{xcolor}/\MontreCode{fontawesome5} peuvent ne pas être chargés par \MontreCode{customenvs} (auxquels cas l'utilisateur devra les avoir chargés pour faire fonctionner certains environnements) via les options :
@@ -956,6 +970,8 @@ Les éléments personnalisables sont :
\begin{itemize}
\item le libellé via la clé \MontreCode{[Libelle]}, qui vaut \MontreCode{Exercice~} par défaut ;
\item la couleur via la clé \MontreCode{[Couleur]}, qui vaut \MontreCode{blue!50!black} par défaut ;
+ \item la couleur de la décoration (si textuelle) via la clé \MontreCode{[CouleurDeco]}, qui vaut \MontreCode{blue!50!black} par défaut ;
+ \item la couleur de fond la décoration (si il existe) via la clé \MontreCode{[CouleurFondDeco]}, qui vaut 50\,\% de \MontreCode{blue!50!black} par défaut ;
\item la police via la clé \MontreCode{[Police]}, qui vaut \MontreCode{\textbackslash bfseries\textbackslash LARGE\textbackslash sffamily} par défaut ;
\item l'épaisseur du trait (éventuel) via la clé \MontreCode{[EpTrait]}, qui vaut \MontreCode{1.1pt} par défaut.
\end{itemize}
@@ -1003,14 +1019,13 @@ Hormis le style global, il est possible de modifier/ajouter certains éléments
\item des points, sous la forme \texttt{(xx points)} ;
\item une image, via \texttt{graphicx}, dont la hauteur est adaptée à la hauteur de la ligne en cours ;
\item une icône, via \texttt{fontawesome5}, dont la hauteur est adaptée à la hauteur de la ligne en cours ;
+ \item des étoiles, via \texttt{fontawesome5} ou \TikZ, dont la hauteur est adaptée à la hauteur de la ligne en cours ;
\item un petit chronomètre, via \texttt{pictochrono}, dont la hauteur est adaptée à la hauteur de la ligne en cours ;
\item une ceinture colorée, via \texttt{coloredbelts}, dont la hauteur est adaptée à la hauteur de la ligne en cours ;
\end{itemize}
\item le compteur (nommé \MontreCode{numeroexo}) peut être désactivé et \textit{adpaté} via les commandes classiques de compteurs.
\end{itemize}
-\pagebreak
-
Les \MontreCode{clés} disponibles, à donner entre \MontreCode{[...]}, sont :
\begin{itemize}
@@ -1026,6 +1041,8 @@ Les \MontreCode{clés} disponibles, à donner entre \MontreCode{[...]}, sont :
\item \MontreCode{Ceinture/...} := afficher la ceinture couleur \MontreCode{...} à la fin de la ligne ;
\item \MontreCode{Chrono/...} := afficher le chrono de durée \MontreCode{...} à la fin de la ligne ;
\item \MontreCode{Points/...} := afficher les points \MontreCode{(... points)} à la fin de la ligne ;
+ \item \MontreCode{faEtoiles/...} := afficher des étoiles de difficultés à la fin de la ligne ;
+ \item \MontreCode{tkzEtoiles/...} := afficher des étoiles de difficultés à la fin de la ligne ;
\end{itemize}
\item \MontreCode{Trait} : choix du trait parmi :
\begin{itemize}
@@ -1036,6 +1053,34 @@ Les \MontreCode{clés} disponibles, à donner entre \MontreCode{[...]}, sont :
\end{itemize}
\end{itemize}
+La commande d'affichage des étoiles de difficultés est indépendante de l'environnement \MontreCode{EnvtExo}, la clé \MontreCode{Decoration=xxxEtoiles/niv} ou \MontreCode{Decoration=xxxEtoiles/niv§max} permet de l'y intégrer.
+
+\begin{DemoCode}{listing only}
+%commande d'étoiles (max=3 par défaut) avec fontawesome5
+\NiveauDiffExos[max]{nb}
+
+%commande d'étoiles (max=3 par défaut) avec tikz
+\tkzEtoiles[Couleur=...,CouleurFond=...,Offset=...,NiveauMax=...,AlignV=...]{nb}
+\end{DemoCode}
+
+\begin{DemoCode}{}
+%des demies étoiles sont possibles
+\NiveauDiffExos{0}\par
+\NiveauDiffExos{2.5}\par
+\textcolor{teal}{\LARGE\NiveauDiffExos[5]{4}}\par
+\NiveauDiffExos[5]{1.5}\par
+\end{DemoCode}
+
+\begin{DemoCode}{}
+%des portions d'étoiles sont possibles
+%Offset=... permet de gérer l'espacement horizontal
+%AlignV est un booléen pour décaler verticalement les étoiles (inline)
+\tkzEtoiles{2.5}\par
+{\LARGE On essaye en ligne \tkzEtoiles{2.5} avec une note de 2.5}\par
+{\LARGE On essaye en ligne \tkzEtoiles[AlignV=false]{2.5} avec une note de 2.5}\par
+\tkzEtoiles[Couleur=red,CouleurFond=yellow,NiveauMax=5]{3.5}
+\end{DemoCode}
+
\subsection{Exemples}
Les exemples suivants ont été obtenus via un document externe (fourni avec le package), du fait du chargement de packages spécifiques.
@@ -1063,65 +1108,46 @@ Le code proposé utilise l'environnement, mais la commande simple est complètem
\pagebreak
\begin{DemoCode}{listing only}
-\begin{EnvtExo}%exo1
-\ipsum<Lang=FR,Type=sent>
-\end{EnvtExo}
+\begin{EnvtExo}\ipsum<Lang=FR,Type=sent>\end{EnvtExo}%exo1
-\begin{EnvtExo}[Trait=pointilles]%exo2
-\ipsum<Lang=FR,Type=sent>
-\end{EnvtExo}
+\begin{EnvtExo}[Trait=pointilles]\ipsum<Lang=FR,Type=sent>\end{EnvtExo}%exo2
-\begin{EnvtExo}[Trait=dashilles]%exo3
-\ipsum<Lang=FR,Type=sent>
-\end{EnvtExo}
+\begin{EnvtExo}[Trait=dashilles]\ipsum<Lang=FR,Type=sent>\end{EnvtExo}%exo3
-\begin{EnvtExo}[Decoration=Icone/\faPython]%exo4
-\ipsum<Lang=FR,Type=sent>
-\end{EnvtExo}
+\begin{EnvtExo}[Decoration=Icone/\faPython]\ipsum<Lang=FR,Type=sent>\end{EnvtExo}%exo4
-\begin{EnvtExo}[Decoration=Ceinture/rouge]%exo5
-\ipsum<Lang=FR,Type=sent>
-\end{EnvtExo}
+\begin{EnvtExo}[Decoration=Ceinture/rouge]\ipsum<Lang=FR,Type=sent>\end{EnvtExo}%exo5
-\begin{EnvtExo}[Decoration=Chrono/20]%exo6
-\ipsum<Lang=FR,Type=sent>
-\end{EnvtExo}
+\begin{EnvtExo}[Decoration=Chrono/20]\ipsum<Lang=FR,Type=sent>\end{EnvtExo}%exo6
-\begin{EnvtExo}[Decoration=Image/goku_ssj4]%exo7
-\ipsum<Lang=FR,Type=sent>
-\end{EnvtExo}
+\begin{EnvtExo}[Decoration=Image/goku_ssj4]\ipsum<Lang=FR,Type=sent>\end{EnvtExo}%exo7
-\begin{EnvtExo}[Decoration=Image/sseiya_shura]%exo8
-\ipsum<Lang=FR,Type=sent>
-\end{EnvtExo}
+\begin{EnvtExo}[Decoration=faEtoiles/1.5§4]\ipsum<Lang=FR,Type=sent>\end{EnvtExo}%exo8
-\begin{EnvtExo}[Decoration=Points/7]%exo9
-\ipsum<Lang=FR,Type=sent>
-\end{EnvtExo}
+\begin{EnvtExo}[Decoration=tkzEtoiles/3.5§5]\ipsum<Lang=FR,Type=sent>\end{EnvtExo}%exo8
-\begin{EnvtExo}[Type=Perso/{Titre perso }]%exo10
-\ipsum<Lang=FR,Type=sent>
-\end{EnvtExo}
+\begin{EnvtExo}[Decoration=Points/7]\ipsum<Lang=FR,Type=sent>\end{EnvtExo}%exo9
+
+\begin{EnvtExo}[Type=Perso/{Titre perso }]\ipsum<Lang=FR,Type=sent>\end{EnvtExo}%exo10
-\StyleEnvtExo[Couleur=red,Police=\bfseries\ttfamily,EpTrait=2pt,Libelle={Exercice n°}]
+\StyleEnvtExo[Couleur=red,CouleurDeco=teal,Police=\bfseries\ttfamily,EpTrait=2pt, Libelle={Exercice n°}]
-\begin{EnvtExo}[Decoration=Icone/\faAddressBook]%exo11
+\begin{EnvtExo}[Decoration=Icone/\faAddressBook]
\ipsum<Lang=FR,Type=sent>
-\end{EnvtExo}
+\end{EnvtExo}%exo11
+
-\begin{EnvtExo}[Type=Perso/{Titre perso },Decoration=Chrono/25,Couleur=red,Trait=dashilles]%exo12
+\begin{EnvtExo}[Type=Perso/{Titre perso },Decoration=Chrono/25,Trait=dashilles]%exo12
\ipsum<Lang=FR,Type=sent>
\end{EnvtExo}
\StyleEnvtExoDefaut
-
\begin{EnvtExo}%
[Type=Perso/{Titre perso~},Decoration=Image/goku_ssj4,Trait=non,Compteur=false]%exo13
\ipsum<Lang=FR,Type=sent>
\end{EnvtExo}
\TitreExo[Type=Perso/{Annexe Exercice 3},Compteur=false,Decoration=Image/sseiya_aiolos]%exo14
-
\ipsum<Lang=FR,Type=sent>
\end{DemoCode}
@@ -1399,6 +1425,117 @@ Il est de ce fait \textit{normalement} possible (à vérifier quand même\ldots)
\pagebreak
+\subsection{Panneaux autoroutiers}
+
+L'idée est de proposer des panneaux type \textit{autoroutes}, réalisés via \MontreCode{tcolorbox}.
+
+Le style global est fixé, mais des éléments de personnalisations sont possibles..
+
+\begin{DemoCode}{listing only}
+\begin{PanneauAutoroute}[clés]{titre}
+%contenu
+\end{PanneauAutoroute}
+\end{DemoCode}
+
+\begin{DemoCode}{}
+\begin{PanneauAutoroute}{A4}
+REIMS\hfill~145\\
+PARIS\hfill~250
+\end{PanneauAutoroute}
+\end{DemoCode}
+
+Les clés, optionnelles et entre \MontreCode{[...]} sont :
+
+\begin{itemize}
+ \item \MontreCode{Fleches} : nombre de flèches à afficher (\MontreCode{0} par défaut)
+ \item \MontreCode{CouleurFond} : couleur de fond (\MontreCode{blue} par défaut)
+ \item \MontreCode{CouleurTitre} : couleur de la boîte \textit{titre} (\MontreCode{red} par défaut)
+ \item \MontreCode{Largeur} : largeur du panneau (\MontreCode{10cm} par défaut)
+ \item \MontreCode{Police} : police du panneau
+ \item \MontreCode{PoliceCartouche} : police du titre
+ \item \MontreCode{TypeFleche} : flèche(s) à afficher
+ \item \MontreCode{EspacementV} : interligne (\MontreCode{2.5mm} par défaut)
+ \item \MontreCode{Dernier} : booléen pour préciser que la boîte sera la dernière de la série (pour l'espace après).
+\end{itemize}
+
+\begin{DemoCode}{}
+\begin{PanneauAutoroute}[Largeur=\linewidth,Dernier=false]{TD01}
+ \VilleDist{COMPETENCE 1}{\faCheck} %macro interne pour afficher une ligne
+ \VilleDist*{COMPETENCE 2}{\faCheck} %macro pour afficher la dernière ligne
+\end{PanneauAutoroute}
+
+\begin{PanneauAutoroute}%
+ [CouleurFond=olive,Fleches=2,Police=\bfseries\huge\fontfamily{phv}\selectfont]{}
+ LILLE\hfill~301\\
+ AMIENS\hfill~213
+\end{PanneauAutoroute}
+\end{DemoCode}
+
+\pagebreak
+
+\subsection{Affichettes de soldes}
+
+L'idée est de proposer des petites affichettes pour des réductions, réalisées via \MontreCode{tcolorbox} (sur une idée de \textit{Sébastien Lozano}).
+
+Le style global est fixé, mais des éléments de personnalisations sont possibles..
+
+\begin{DemoCode}{listing only}
+\AfficheSoldes[clés]{prix avant}{prix après}{réduction}
+\end{DemoCode}
+
+\begin{DemoCode}{}
+\AfficheSoldes{99\texteuro}{79\texteuro}{-20\%}
+\end{DemoCode}
+
+Les clés, optionnelles et entre \MontreCode{[...]} sont :
+
+\begin{itemize}
+ \item \MontreCode{Couleur} : couleur principale (\MontreCode{gray} par défaut)
+ \item \MontreCode{Largeur} : largeur (\MontreCode{auto} ou par défaut) à définir
+ \item \MontreCode{PoliceEntete} : police du titre
+ \item \MontreCode{PolicePrix} : police des prix
+ \item \MontreCode{PoliceReduc} : police de la réduction
+ \item \MontreCode{Titre} : titre de l'affiche (\MontreCode{GRANDE DÉMARQUE} par défaut)
+ \item \MontreCode{OffsetReduc} : \textit{pente} pour le bandeau de réduction (\MontreCode{1.25cm} par défaut)
+ \item \MontreCode{AgrandirReduc} : augmenter la hauteur de la partie réduction
+\end{itemize}
+
+Donc la hauteur est fixée par \textit{calculs}, et également la largeur si \MontreCode{Largeur=auto}.
+
+La largeur \MontreCode{auto} permet de faire \textit{marcher} des prix jusque \MontreCode{99\,999\,€}.
+
+\begin{DemoCode}{}
+\AfficheSoldes{99\texteuro}{79\texteuro}{-20\,\%}~%
+\AfficheSoldes[Couleur=red]{99\texteuro}{79\texteuro}{-20\,\%}~%
+\AfficheSoldes[Couleur=blue]{\ldots\texteuro}{79\texteuro}{-20\,\%}~%
+\AfficheSoldes[Couleur=teal]{\ldots}{\ldots}{\ldots}
+\end{DemoCode}
+
+\begin{DemoCode}{}
+\AfficheSoldes[%
+ Couleur=magenta,%
+ Largeur=6cm,%
+ PoliceEntete=\huge\sffamily\bfseries,%
+ PolicePrix=\ttfamily,%
+ PoliceReduc=\bfseries\Huge\sffamily,%
+ AgrandirReduc=8mm
+ ]%
+ {1\,500\texteuro}{1\,299\texteuro}{-\ldots\,\%}
+\end{DemoCode}
+
+\begin{DemoCode}{}
+\AfficheSoldes[%
+ Couleur=cyan,%
+ PoliceEntete=\bfseries\huge\fontfamily{qhv}\selectfont,%
+ PolicePrix=\fontfamily{qhv}\selectfont,%
+ PoliceReduc=\bfseries\Huge\fontfamily{qhv}\selectfont,%
+ AgrandirReduc=1cm
+ ]%
+ {\makebox[1cm]{\dotfill}\texteuro}{1\,299\texteuro}{-30\,\%}
+\end{DemoCode}
+
+\pagebreak
+
\section{Patchs divers}
\subsection{Gérer l'espacement vertical du mode hors-ligne}
@@ -1506,4 +1643,158 @@ La clé \MontreCode{vCentrer} (parmi \MontreCode{m/h/b/n} permet de spécifier u
\InsererImage<vRemplir,vOffset=5mm,vCentrer=m>{example-image}
+\subsection{Grille automatique pour les environnements tikzpicture}
+
+L'idée est de proposer de quoi afficher, en \textit{surimpression}, une grille automatique sur une figure \MontreCode{tikzpicture}.
+
+Cela peut-être utile dans la construction de graphes ou de figures géométriques pour placer plus facilement des objets.
+
+\smallskip
+
+Il est possible de :
+
+\begin{itemize}
+ \item demander ponctuellement l'affichage avec une macro à placer en fin d'environnement ;
+ \item automatiser l'affichage pour une figure avec une \MontreCode{clé} et une macro locale ;
+ \item automatiser l'affichage pour toutes les figures avec une macro globale et une \MontreCode{clé}.
+\end{itemize}
+
+\textbf{\large Version manuelle}
+
+\begin{DemoCode}{listing only}
+%macro locale, utilisation ponctuelle
+\begin{tikzpicture}
+ %codes
+ \tkzGrilleAuto(*){pasX§pasY}
+\end{tikzpicture}
+\end{DemoCode}
+
+La version étoilée marque également l'origine $(0;0)$.
+
+L'argument obligatoire permet de spécifier les pas (\texttt{H§V}) pour la grille.
+
+\begin{DemoCode}{}
+\begin{tikzpicture}
+ %population
+ \draw[very thick,purple] (0,0) circle[x radius=3cm,y radius=2cm] ;
+ \draw[purple] (0.5,1.25) node[font=\small] {Population E} ;
+ %ss population
+ \draw[very thick,teal] (-0.75,-0.25) circle[x radius=1.75cm,y radius=1cm] ;
+ \draw[teal] (-0.75,-0.25) node[font=\small] {Sous-population A} ;
+ %grille auto manuelle, avec origine
+ \tkzGrilleAuto*{0.5§0.5}
+\end{tikzpicture}
+\end{DemoCode}
+
+\textbf{\large Version automatique locale, avec clé}
+
+\begin{DemoCode}{listing only}
+%clé locale, utilisation ponctuelle
+\begin{tikzpicture}[grilleauto=pasX§pasY]
+ \tkzAutoGridLocal(*)
+ %codes
+\end{tikzpicture}
+\end{DemoCode}
+
+La version étoilée marque également l'origine $(0;0)$.
+
+\begin{DemoCode}{}
+\begin{tikzpicture}[x=0.5cm,y=0.5cm,grilleauto=0.25§0.25]
+ %grille (qui sera affichée en dernier)
+ \tkzAutoGridLocal*
+ %triangle
+ \draw[very thick,red] (-4,-2)--(0,7)--(6,1)--cycle ;
+ %cercle
+ \draw[very thick,blue] (0,0) circle[radius=5] ;
+ %segment
+ \draw[very thick,orange] (-1.75,1.25)--(1,-7);
+\end{tikzpicture}
+\end{DemoCode}
+
+\textbf{\large Version automatique globale, avec clé}
+
+\begin{DemoCode}{listing only}
+%préambule, la commande sera active pour tous les environnements tikz
+\tkzAutoGridActivate(*)
+
+%document
+\begin{tikzpicture}[grilleauto=pasX§pasY]
+ %codes
+\end{tikzpicture}
+\end{DemoCode}
+
+La version étoilée marquera également l'origine $(0;0)$.
+
+\pagebreak
+
+\subsection{Flèche évasée, en \TikZ}
+
+L'idée est de proposer une commande, en \TikZ, pour représenter une flèche évasée, avec des paramètres optionnels.
+
+\begin{DemoCode}{listing only}
+\tkzFlecheEvasee[clés]{départ}{arrivée ou déplacement}
+\end{DemoCode}
+
+\begin{DemoCode}{}
+\begin{tikzpicture}
+ \tkzFlecheEvasee{0,0}{5,1.5}
+\end{tikzpicture}
+\end{DemoCode}
+
+Les \MontreCode{clés} disponibles, à donner entre \MontreCode{[...]}, sont :
+
+\begin{itemize}
+ \item \MontreCode{Couleur=...} : couleur de la flèche ;
+ \item \MontreCode{Epaisseur=...} : taille initiale du trait (\MontreCode{0.5mm} par défaut) ;
+ \item \MontreCode{Direction=...} : direction de la flèche, avec angle éventuel ;
+ \item \MontreCode{Coeff=...} : coefficient pour la taille finale du trait (\MontreCode{4} par défaut) ;
+ \item \MontreCode{TypeFleche=...} : type de la flèche, issue de \MontreCode{arrows.meta} ;
+ \item \MontreCode{TailleFleche=...} : booléen pour la taille de la partie flèche (\MontreCode{auto} par défaut), en langage \MontreCode{arrows.meta} ;
+ \item \MontreCode{Deplacement} : booléen pour spécifier qu'on travaille avec un déplacement pour l'arrivée.
+\end{itemize}
+
+Le premier argument obligatoire, permet de spécifier le nœud de départ ou les coordonnées du point de départ.
+
+Le second argument obligatoire, permet de spécifier le nœud d'arrivée ou les coordonnées du point d'arrivée, mais également le déplacement dans le cas ou \MontreCode{Deplacement=true}.
+
+\medskip
+
+Par défaut, et en mode \MontreCode{auto} :
+
+\begin{itemize}
+ \item le début du trait mesure \MontreCode{Epaisseur=0.5mm} ;
+ \item la fin du trait mesure \MontreCode{4*Epaisseur=2mm} ;
+ \item les dimensions de la flèche sont \MontreCode{H=2*4*Epaisseur=4mm} et \MontreCode{L=2.1*4*Epaisseur=4.2mm}.
+\end{itemize}
+
+À noter que pour les flèches type \MontreCode{Stealth}, un ajustement est sans doute à prévoir pour compenser le \textit{creux}.
+
+\begin{DemoCode}{}
+%flèche 0.5mm -> 1.25mm
+\begin{tikzpicture}
+ \tkzFlecheEvasee%
+ [Epaisseur=0.5mm,Coeff=2.5,Direction=left/30,Couleur=red,TypeFleche=Triangle]%
+ {0,0}{5,1.5}
+\end{tikzpicture}
+\end{DemoCode}
+
+\begin{DemoCode}{}
+\begin{tikzpicture}
+ \draw[thin,lightgray] (-3,-1) grid (5,5) ;
+ \coordinate (A) at (0,0) ; \coordinate (B) at (4,1) ;
+ \coordinate (C) at (1,1) ; \coordinate (D) at (5,4) ;
+ \coordinate (E) at (0,1) ; \coordinate (F) at (0,5) ;
+ \coordinate (G) at (-2,0) ;
+ \tkzFlecheEvasee[Couleur=green,TypeFleche=Triangle]{A}{B}
+ \tkzFlecheEvasee[Couleur=blue,Direction=right/10]{D}{C}
+ \tkzFlecheEvasee%
+ [Couleur=red,Direction=left/45,TypeFleche=Stealth,Epaisseur=0.1mm,Coeff=10]%
+ {-2,1}{0,4}
+ \tkzFlecheEvasee%
+ [Couleur=red,Direction=right/45,Epaisseur=0.1mm,Coeff=10,TypeFleche=Stealth]%
+ {-2,1}{0,4}
+ \tkzFlecheEvasee[Couleur=teal,Deplacement,Direction=left/10]{-3,-1}{5,1}
+\end{tikzpicture}
+\end{DemoCode}
+
\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/customenvs/doc/envtexo_exemples.pdf b/macros/latex/contrib/customenvs/doc/envtexo_exemples.pdf
index 717f3a12c9..aed4fe853c 100644
--- a/macros/latex/contrib/customenvs/doc/envtexo_exemples.pdf
+++ b/macros/latex/contrib/customenvs/doc/envtexo_exemples.pdf
Binary files differ
diff --git a/macros/latex/contrib/customenvs/doc/envtexo_exemples.tex b/macros/latex/contrib/customenvs/doc/envtexo_exemples.tex
index 2daa195179..d32d06230a 100644
--- a/macros/latex/contrib/customenvs/doc/envtexo_exemples.tex
+++ b/macros/latex/contrib/customenvs/doc/envtexo_exemples.tex
@@ -16,6 +16,8 @@
\begin{document}
+\pagestyle{empty}
+
\begin{EnvtExo}%exo1
\ipsum<Lang=FR,Type=sent>
\end{EnvtExo}
@@ -40,40 +42,44 @@
\ipsum<Lang=FR,Type=sent>
\end{EnvtExo}
-\begin{EnvtExo}[Decoration=Image/goku_ssj4]%exo7
+\begin{EnvtExo}[Etoiles=2,Decoration=Image/goku_ssj4]%exo7
+ \ipsum<Lang=FR,Type=sent>
+\end{EnvtExo}
+
+\begin{EnvtExo}[Decoration=faEtoiles/1.5§4]%exo8
\ipsum<Lang=FR,Type=sent>
\end{EnvtExo}
-\begin{EnvtExo}[Decoration=Image/sseiya_shura]%exo8
+\begin{EnvtExo}[Decoration=tkzEtoiles/3.5§5]%exo9
\ipsum<Lang=FR,Type=sent>
\end{EnvtExo}
-\begin{EnvtExo}[Decoration=Points/7]%exo9
+\begin{EnvtExo}[Decoration=Points/7]%exo10
\ipsum<Lang=FR,Type=sent>
\end{EnvtExo}
-\begin{EnvtExo}[Type=Perso/{Titre perso }]%exo10
+\begin{EnvtExo}[Type=Perso/{Titre perso },Etoiles={2.5§5}]%exo11
\ipsum<Lang=FR,Type=sent>
\end{EnvtExo}
-\StyleEnvtExo[Couleur=red,Police=\bfseries\ttfamily,EpTrait=2pt,Libelle={Exercice n°}]
+\StyleEnvtExo[Couleur=red,CouleurDeco=teal,Police=\bfseries\ttfamily,EpTrait=2pt,Libelle={Exercice n°}]
-\begin{EnvtExo}[Decoration=Icone/\faAddressBook]%exo11
+\begin{EnvtExo}[Decoration=Icone/\faAddressBook]%exo12
\ipsum<Lang=FR,Type=sent>
\end{EnvtExo}
-\begin{EnvtExo}[Type=Perso/{Titre perso },Decoration=Chrono/25,Couleur=red,Trait=dashilles]%exo12
+\begin{EnvtExo}[Type=Perso/{Titre perso },Decoration=Chrono/25,Trait=dashilles,Etoiles=0.5]%exo13
\ipsum<Lang=FR,Type=sent>
\end{EnvtExo}
\StyleEnvtExoDefaut
\begin{EnvtExo}%
- [Type=Perso/{Titre perso~},Decoration=Image/goku_ssj4,Trait=non,Compteur=false]%exo13
+ [Type=Perso/{Titre perso~},Decoration=Image/goku_ssj4,Trait=non,Compteur=false]%exo14
\ipsum<Lang=FR,Type=sent>
\end{EnvtExo}
-\TitreExo[Type=Perso/{Annexe Exercice 3},Compteur=false,Decoration=Image/sseiya_aiolos]%exo14
+\TitreExo[Type=Perso/{Annexe Exercice 3},Compteur=false,Decoration=Image/sseiya_aiolos]%exo15
\ipsum<Lang=FR,Type=sent>
diff --git a/macros/latex/contrib/customenvs/tex/customenvs.sty b/macros/latex/contrib/customenvs/tex/customenvs.sty
index 535baa0f18..a54da462ab 100644
--- a/macros/latex/contrib/customenvs/tex/customenvs.sty
+++ b/macros/latex/contrib/customenvs/tex/customenvs.sty
@@ -3,9 +3,13 @@
% source pencil...: CC-BY-SA 4.0 https://tex.stackexchange.com/questions/504092/replicating-a-fancy-bordered-text-style-in-latex/504145#504145
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{customenvs}[2024/08/20 0.1.9 Custom classic environments]
+\ProvidesPackage{customenvs}[2024/09/14 0.2.3 Custom classic environments]
%====HISTORIQUE
+% v 0.2.3 Panneau autoroutier + Panneau Soldes
+% v 0.2.2 Flèche évasée, en TikZ
+% v 0.2.1 Modification mineure de la gestion des étoiles tikz (baseline) + grille auto tikzpicture
+% v 0.2.0 Ajout d'étoiles pour les difficultés d'exercices (2 versions)
% v 0.1.9 tkzBanner + tkzBannerTri + includegraphicsfill
% v 0.1.8 Nutriscore
% v 0.1.7 Style perso pour les vignettes
@@ -678,7 +682,155 @@
}
%====EXERCICE PERSO
+\newlength{\largstarsempty}
+\newlength{\largstarsmid}
+\newlength{\largstarfull}
+\newlength{\largmaxstars}
+
+%commande annexe tkzlevelstars [en] + [fr]
+\usetikzlibrary{shapes.geometric}
+
+\newlength{\tmphauteuretoiles}
+\newlength{\tmpprofondeuretoiles}
+\newlength{\tmpoffsetetoiles}\setlength{\tmpoffsetetoiles}{0.25pt}
+
+\defKV[levelstars]{%
+ colframe=\def\tkzLevelStarsColor{#1},
+ colback=\def\tkzLevelStarsColorBg{#1},
+ offset=\setlength{\tmpoffsetetoiles}{#1},
+ maxlevel=\def\tkzLevelStarsMaxLevel{#1}
+}
+
+\setKVdefault[levelstars]{%
+ colframe=black,
+ colback=gray,
+ offset={0.025em},
+ maxlevel=3,
+ valign=true
+}
+
+\NewDocumentCommand{\tkzLevelStars}{ O{} m }{%
+ %lectures des clés
+ \restoreKV[levelstars]%
+ \setKV[levelstars]{#1}%
+ %dimensions
+ \settototalheight{\tmphauteuretoiles}{\hbox{azertyuiopqsdfghjklmwxcvbnAZERTYUIOPQSDFGHJKLMWXCVBN}}%
+ \setlength{\tmphauteuretoiles}{0.95\tmphauteuretoiles}%
+ \ifboolKV[levelstars]{valign}%
+ {%
+ \settodepth{\tmpprofondeuretoiles}{\hbox{azertyuiopqsdfghjklmwxcvbnAZERTYUIOPQSDFGHJKLMWXCVBN}}%
+ \begin{tikzpicture}[baseline={-1.25\tmpprofondeuretoiles},fill=\tkzLevelStarsColorBg,draw=\tkzLevelStarsColor,rounded corners={0.05\tmphauteuretoiles},line width={0.04\tmphauteuretoiles}]
+ }%
+ {%
+ \begin{tikzpicture}[fill=\tkzLevelStarsColorBg,draw=\tkzLevelStarsColor,rounded corners={0.05\tmphauteuretoiles},line width={0.04\tmphauteuretoiles}]
+ }%
+ \foreach \X in {1,...,\tkzLevelStarsMaxLevel}{%
+ \xdef\tmpxfill{\xintfloateval{min(1,max(1+#2-\X,0))}}%
+ %\pgfmathsetmacro{\tmpxfill}{min(1,max(1+#2-\X,0))}
+ \path ({\X*(\tmphauteuretoiles+\tmpoffsetetoiles)},0) node[star,draw,star point height={0.25\tmphauteuretoiles},minimum size={\tmphauteuretoiles},inner sep=0pt,path picture={\fill (path picture bounding box.south west) rectangle ([xshift=\tmpxfill*0.9515*\tmphauteuretoiles]path picture bounding box.north west);}]{};
+ }
+ \end{tikzpicture}%
+}
+
+\defKV[tkznivetoiles]{%
+ Couleur=\def\tkzLevelStarsColor{#1},
+ CouleurFond=\def\tkzLevelStarsColorBg{#1},
+ Offset=\setlength{\tmpoffsetetoiles}{#1},
+ NiveauMax=\def\tkzLevelStarsMaxLevel{#1}
+}
+
+\setKVdefault[tkznivetoiles]{%
+ Couleur=black,
+ CouleurFond=gray,
+ Offset={0.025em},
+ NiveauMax=3,
+ AlignV=true
+}
+
+\NewDocumentCommand{\tkzEtoiles}{ O{} m }{%
+ %lectures des clés
+ \restoreKV[tkznivetoiles]%
+ \setKV[tkznivetoiles]{#1}%
+ %dimensions
+ \settototalheight{\tmphauteuretoiles}{\hbox{azertyuiopqsdfghjklmwxcvbnAZERTYUIOPQSDFGHJKLMWXCVBN}}%
+ \setlength{\tmphauteuretoiles}{0.95\tmphauteuretoiles}%
+ \ifboolKV[tkznivetoiles]{AlignV}%
+ {%
+ \settodepth{\tmpprofondeuretoiles}{\hbox{azertyuiopqsdfghjklmwxcvbnAZERTYUIOPQSDFGHJKLMWXCVBN}}%
+ \begin{tikzpicture}[baseline={-1.25\tmpprofondeuretoiles},fill=\tkzLevelStarsColorBg,draw=\tkzLevelStarsColor,rounded corners={0.05\tmphauteuretoiles},line width={0.04\tmphauteuretoiles}]
+ }%
+ {%
+ \begin{tikzpicture}[fill=\tkzLevelStarsColorBg,draw=\tkzLevelStarsColor,rounded corners={0.05\tmphauteuretoiles},line width={0.04\tmphauteuretoiles}]
+ }%
+ \foreach \X in {1,...,\tkzLevelStarsMaxLevel}{%
+ \xdef\tmpxfill{\xintfloateval{min(1,max(1+#2-\X,0))}}%
+ %\pgfmathsetmacro{\tmpxfill}{min(1,max(1+#2-\X,0))}
+ \path ({\X*(\tmphauteuretoiles+\tmpoffsetetoiles)},0) node[star,draw,star point height={0.25\tmphauteuretoiles},minimum size={\tmphauteuretoiles},inner sep=0pt,path picture={\fill (path picture bounding box.south west) rectangle ([xshift=\tmpxfill*0.9515*\tmphauteuretoiles]path picture bounding box.north west);}]{};
+ }
+ \end{tikzpicture}%
+}
+
+%commande annexe ;-)
+\NewDocumentCommand\NiveauDiffExos{ O{3} m }{%avec des demis ??
+ %les tailles de boîtes
+ \settowidth{\largstarsempty}{{\faStar[regular]}}%
+ \settowidth{\largstarsmid}{{\faIcon{star-half-alt}}}%
+ \settowidth{\largstarfull}{{\faStar}}%
+ \pgfmathsetlength{\largmaxstars}{max(\largstarsempty,\largstarsmid,\largstarfull)}%
+ %les calculs intermédiaires
+ \xintifboolexpr{#1 < 0}{\xdef\tmpstarsmax{3}}{\xdef\tmpstarsmax{#1}}%on met à 3 si pas valide
+ \xintifboolexpr{#2 >= 0 'and' #2 <= \tmpstarsmax 'and' isint(2*#2) == 1}{\xdef\tmpstars{#2}}{\xdef\tmpstars{0}}%on met à zéro si pas valide
+ %
+ \xintifboolexpr{isint(\tmpstars) == 1}%
+ {%
+ \xdef\tmpstarsexosfull{\tmpstars}%
+ \xdef\tmpstarsexosmid{0}%
+ \xdef\tmpstarsexosempty{\xinteval{\tmpstarsmax-\tmpstars}}%
+ }%
+ {%
+ \xdef\tmpstarsexosmid{1}%
+ \xdef\tmpstarsexosfull{\xinteval{(\tmpstars-0.5)}}%
+ \xdef\tmpstarsexosempty{\xinteval{\tmpstarsmax-1-\tmpstarsexosfull}}%
+ }%
+ %affichage des full
+ \xintifboolexpr{\tmpstarsexosfull > 0}{\xintFor* ##1 in {\xintSeq{1}{\tmpstarsexosfull}}\do{\makebox[\largmaxstars][c]{\faStar}}}{}%
+ %affichage des mid
+ \xintifboolexpr{\tmpstarsexosmid > 0}{\xintFor* ##1 in {\xintSeq{1}{\tmpstarsexosmid}}\do{\makebox[\largmaxstars][c]{\faIcon{star-half-alt}}}}{}%
+ %affichage des vides
+ \xintifboolexpr{\tmpstarsexosempty > 0}{\xintFor* ##1 in {\xintSeq{1}{\tmpstarsexosempty}}\do{\makebox[\largmaxstars][c]{\faStar[regular]}}}{}%
+}
+
+%commande annexe [en] ;-)
+\NewDocumentCommand\DiffLevelStars{ O{3} m }{%avec des demis ??
+ %les tailles de boîtes
+ \settowidth{\largstarsempty}{{\faStar[regular]}}%
+ \settowidth{\largstarsmid}{{\faIcon{star-half-alt}}}%
+ \settowidth{\largstarfull}{{\faStar}}%
+ \pgfmathsetlength{\largmaxstars}{max(\largstarsempty,\largstarsmid,\largstarfull)}%
+ %les calculs intermédiaires
+ \xintifboolexpr{#1 < 0}{\xdef\tmpstarsmax{3}}{\xdef\tmpstarsmax{#1}}%on met à 3 si pas valide
+ \xintifboolexpr{#2 >= 0 'and' #2 <= \tmpstarsmax 'and' isint(2*#2) == 1}{\xdef\tmpstars{#2}}{\xdef\tmpstars{0}}%on met à zéro si pas valide
+ %
+ \xintifboolexpr{isint(\tmpstars) == 1}%
+ {%
+ \xdef\tmpstarsexosfull{\tmpstars}%
+ \xdef\tmpstarsexosmid{0}%
+ \xdef\tmpstarsexosempty{\xinteval{\tmpstarsmax-\tmpstars}}%
+ }%
+ {%
+ \xdef\tmpstarsexosmid{1}%
+ \xdef\tmpstarsexosfull{\xinteval{(\tmpstars-0.5)}}%
+ \xdef\tmpstarsexosempty{\xinteval{\tmpstarsmax-1-\tmpstarsexosfull}}%
+ }%
+ %affichage des full
+ \xintifboolexpr{\tmpstarsexosfull > 0}{\xintFor* ##1 in {\xintSeq{1}{\tmpstarsexosfull}}\do{\makebox[\largmaxstars][c]{\faStar}}}{}%
+ %affichage des mid
+ \xintifboolexpr{\tmpstarsexosmid > 0}{\xintFor* ##1 in {\xintSeq{1}{\tmpstarsexosmid}}\do{\makebox[\largmaxstars][c]{\faIcon{star-half-alt}}}}{}%
+ %affichage des vides
+ \xintifboolexpr{\tmpstarsexosempty > 0}{\xintFor* ##1 in {\xintSeq{1}{\tmpstarsexosempty}}\do{\makebox[\largmaxstars][c]{\faStar[regular]}}}{}%
+}
+%code ppal
\newcounter{numeroexo}
\setcounter{numeroexo}{0}
\newlength{\eptraitexo}
@@ -689,6 +841,8 @@
\newlength{\tmp@image@profondeur}
\colorlet{macouleurexo}{blue!50!black}
+\colorlet{macouleurexodeco}{blue!50!black}
+\colorlet{macouleurexodecofond}{blue!50!black}
\newcommand\tmpstyleexo{\bfseries\LARGE\sffamily}%
\newcommand\tmplabelexo{Exercice~}%
@@ -696,15 +850,21 @@
\defKV[globalstyleexo]{%
Libelle=\renewcommand\tmplabelexo{#1},%
Couleur=\colorlet{macouleurexo}{#1},%
+ CouleurDeco=\colorlet{macouleurexodeco}{#1},%
+ CouleurFondDeco=\colorlet{macouleurexodecofond}{#1},%
Police=\renewcommand\tmpstyleexo{#1},%
- EpTrait=\setlength{\eptraitexo}{#1}
+ EpTrait=\setlength{\eptraitexo}{#1},%
+ EchelleEtoiles=\def\tmpscalestarsexos{#1}
}
\setKVdefault[globalstyleexo]{%
Libelle={Exercice~},%
Couleur={blue!50!black},%
+ CouleurDeco={blue!50!black},%
+ CouleurFondDeco={macouleurexodeco!50},%
Police={\bfseries\LARGE\sffamily},%
- EpTrait={1.1pt}
+ EpTrait={1.1pt},%
+ EchelleEtoiles=0.85
}
\NewDocumentCommand\StyleEnvtExo{ O{} }{%
@@ -719,20 +879,20 @@
Type=\def\EnvtExoType{#1},%
ComplementTitre=\def\EnvtExoCpltTitre{#1},%
CodeDebut=\def\EnvtExoCodeAvant{#1},%
- %Couleur=\def\EnvtExoCouleur{#1},%
EchelleImage=\def\EnvtExoScaleImg{#1},%
Decoration=\def\EnvtExoDeco{#1},%
- Trait=\def\EnvtExoTrait{#1}
+ Trait=\def\EnvtExoTrait{#1},%
+ Etoiles=\def\EnvtExoEtoiles{#1}
}
\setKVdefault[EnvtExercice]{
Type=Classique,%
ComplementTitre={},%
CodeDebut={},%
- %Couleur=macouleurexo,%
EchelleImage=1.15,%
Compteur=true,%
Decoration={},%
- Trait=plein
+ Trait=plein,%
+ Etoiles={}
}
\NewDocumentEnvironment{EnvtExo}{ !O{} }%
@@ -747,18 +907,32 @@
{%
%label avec numéro et complément
\tmpstyleexo\tmplabelexo\ifboolKV[EnvtExercice]{Compteur}{\thenumeroexo}{}\EnvtExoCpltTitre%
+ %étoiles eventuelles
+ \IfStrEq{\EnvtExoEtoiles}{}{}%
+ {%
+ \,(\IfSubStr{\EnvtExoEtoiles}{§}%
+ {%
+ \StrCut{\EnvtExoEtoiles}{§}{\EnvtExoStarNb}{\EnvtExoStarTot}%
+ \tkzEtoiles[Couleur=macouleurexodeco,CouleurFond=macouleurexodecofond,NiveauMax=\EnvtExoStarTot]{\EnvtExoStarNb}%
+ }%
+ {%
+ \tkzEtoiles[Couleur=macouleurexodeco,CouleurFond=macouleurexodecofond]{\EnvtExoEtoiles}%
+ }%
+ )%
+ }%
%trait éventuel
\IfStrEqCase{\EnvtExoTrait}{%
{plein}{\,\hrulefill}%
{pointilles}{\,\dotfill}%
{dashilles}{\,\hdashrule{\fill}{\eptraitexo}{\eptraitexospace}}%
{non}{\hfill}%
+ {aucun}{~}%
}%
%décoration éventuelle
\IfSubStr{\EnvtExoDeco}{Icone}%
{%
\StrBehind{\EnvtExoDeco}{/}[\EnvtExoIcon]%
- \,\scalebox{0.85}[0.85]{\EnvtExoIcon}%
+ \,\textcolor{macouleurexodeco}{\scalebox{0.85}[0.85]{\EnvtExoIcon}}%
}{}%
\IfSubStr{\EnvtExoDeco}{Ceinture}%
{%
@@ -768,13 +942,13 @@
\IfSubStr{\EnvtExoDeco}{Chrono}%
{%
\StrBehind{\EnvtExoDeco}{/}[\EnvtExoChrono]%
- \,\pictochrono[ColTime=macouleurexo!50]{\EnvtExoChrono}%
+ \,\pictochrono[ColTime=macouleurexodeco!50]{\EnvtExoChrono}%
}{}%
\IfSubStr{\EnvtExoDeco}{Points}%
{%
\StrBehind{\EnvtExoDeco}{/}[\EnvtExoPts]%
\IfStrEq{\EnvtExoPts}{1}{\def\pts{point}}{\def\pts{points}}%
- \,(\EnvtExoPts\ \pts)%
+ \,\textcolor{macouleurexodeco}{(\EnvtExoPts\ \pts)}%
}{}%
\IfSubStr{\EnvtExoDeco}{Image}%
{%
@@ -782,12 +956,49 @@
\settototalheight{\tmp@image@hauteur@totale}{\hbox{\tmpstyleexo qB}}%
\,$\vcenter{\hbox{\includegraphics[height=\EnvtExoScaleImg\tmp@image@hauteur@totale]{\EnvtExoImg}}}$%
}{}%
+ \IfSubStr{\EnvtExoDeco}{faEtoiles}%
+ {%
+ \StrBehind{\EnvtExoDeco}{/}[\EnvtExoStars]%
+ \IfSubStr{\EnvtExoStars}{§}%
+ {%
+ \StrCut{\EnvtExoStars}{§}{\EnvtExoStarNb}{\EnvtExoStarTot}%
+ \textcolor{macouleurexodeco}{\scalebox{\tmpscalestarsexos}[\tmpscalestarsexos]{\NiveauDiffExos[\EnvtExoStarTot]{\EnvtExoStarNb}}}%
+ }%
+ {%
+ \textcolor{macouleurexodeco}{\scalebox{\tmpscalestarsexos}[\tmpscalestarsexos]{\NiveauDiffExos{\EnvtExoStars}}}%
+ }%
+ }{}%
+ \IfSubStr{\EnvtExoDeco}{tkzEtoiles}%
+ {%
+ \StrBehind{\EnvtExoDeco}{/}[\EnvtExoStars]%
+ \IfSubStr{\EnvtExoStars}{§}%
+ {%
+ \StrCut{\EnvtExoStars}{§}{\EnvtExoStarNb}{\EnvtExoStarTot}%
+ \tkzEtoiles[Couleur=macouleurexodeco,CouleurFond=macouleurexodecofond,NiveauMax=\EnvtExoStarTot]{\EnvtExoStarNb}%
+ }%
+ {%
+ \tkzEtoiles[Couleur=macouleurexodeco,CouleurFond=macouleurexodecofond]{\EnvtExoStars}%
+ }%
+ }{}%
}{}%
\IfSubStr{\EnvtExoType}{Perso}%OK perso____déco
{%
\StrBehind{\EnvtExoType}{/}[\EnvtExoLabel]%
%label avec numéro et complément
\tmpstyleexo\EnvtExoLabel\ifboolKV[EnvtExercice]{Compteur}{\thenumeroexo}{}\EnvtExoCpltTitre%
+ %étoiles eventuelles
+ \IfStrEq{\EnvtExoEtoiles}{}{}%
+ {%
+ \,(\IfSubStr{\EnvtExoEtoiles}{§}%
+ {%
+ \StrCut{\EnvtExoEtoiles}{§}{\EnvtExoStarNb}{\EnvtExoStarTot}%
+ \tkzEtoiles[Couleur=macouleurexodeco,CouleurFond=macouleurexodecofond,NiveauMax=\EnvtExoStarTot]{\EnvtExoStarNb}%
+ }%
+ {%
+ \tkzEtoiles[Couleur=macouleurexodeco,CouleurFond=macouleurexodecofond]{\EnvtExoEtoiles}%
+ }%
+ )%
+ }%
%trait éventuel
\IfStrEqCase{\EnvtExoTrait}{%
{plein}{\,\hrulefill}%
@@ -799,7 +1010,7 @@
\IfSubStr{\EnvtExoDeco}{Icone}%
{%
\StrBehind{\EnvtExoDeco}{/}[\EnvtExoIcon]%
- \,\scalebox{0.85}[0.85]{\EnvtExoIcon}%
+ \,\textcolor{macouleurexodeco}{\scalebox{0.85}[0.85]{\EnvtExoIcon}}%
}{}%
\IfSubStr{\EnvtExoDeco}{Ceinture}%
{%
@@ -809,13 +1020,13 @@
\IfSubStr{\EnvtExoDeco}{Chrono}%
{%
\StrBehind{\EnvtExoDeco}{/}[\EnvtExoChrono]%
- \,\pictochrono[ColTime=macouleurexo!50]{\EnvtExoChrono}%
+ \,\pictochrono[ColTime=macouleurexodeco!50]{\EnvtExoChrono}%
}{}%
\IfSubStr{\EnvtExoDeco}{Points}%
{%
\StrBehind{\EnvtExoDeco}{/}[\EnvtExoPts]%
\IfStrEq{\EnvtExoPts}{1}{\def\pts{point}}{\def\pts{points}}%
- \,(\EnvtExoPts\ \pts)%
+ \,\textcolor{macouleurexodeco}{(\EnvtExoPts\ \pts)}%
}{}%
\IfSubStr{\EnvtExoDeco}{Image}%
{%
@@ -823,6 +1034,30 @@
\settototalheight{\tmp@image@hauteur@totale}{\hbox{\tmpstyleexo qB}}%
\,$\vcenter{\hbox{\includegraphics[height=\EnvtExoScaleImg\tmp@image@hauteur@totale]{\EnvtExoImg}}}$%
}{}%
+ \IfSubStr{\EnvtExoDeco}{faEtoiles}%
+ {%
+ \StrBehind{\EnvtExoDeco}{/}[\EnvtExoStars]%
+ \IfSuStr{\EnvtExoStars}{§}%
+ {%
+ \StrCut{\EnvtExoStars}{§}{\EnvtExoStarNb}{\EnvtExoStarTot}%
+ \textcolor{macouleurexodeco}{\scalebox{\tmpscalestarsexos}[\tmpscalestarsexos]{\NiveauDiffExos[\EnvtExoStarTot]{\EnvtExoStarNb}}}%
+ }%
+ {%
+ \textcolor{macouleurexodeco}{\scalebox{\tmpscalestarsexos}[\tmpscalestarsexos]{\NiveauDiffExos{\EnvtExoStars}}}%
+ }%
+ }{}%
+ \IfSubStr{\EnvtExoDeco}{tkzEtoiles}%
+ {%
+ \StrBehind{\EnvtExoDeco}{/}[\EnvtExoStars]%
+ \IfSubStr{\EnvtExoStars}{§}%
+ {%
+ \StrCut{\EnvtExoStars}{§}{\EnvtExoStarNb}{\EnvtExoStarTot}%
+ \tkzEtoiles[Couleur=macouleurexodeco,CouleurFond=macouleurexodecofond,NiveauMax=\EnvtExoStarTot]{\EnvtExoStarNb}%
+ }%
+ {%
+ \tkzEtoiles[Couleur=macouleurexodeco,CouleurFond=macouleurexodecofond]{\EnvtExoStars}%
+ }%
+ }{}%
}{}%
\endgroup%
\def\hrulefill{\leavevmode\leaders\hrule height 0.4pt\hfill\kern\z@}%
@@ -842,6 +1077,19 @@
{%
%label avec numéro et complément
\tmpstyleexo\tmplabelexo\ifboolKV[EnvtExercice]{Compteur}{\thenumeroexo}{}\EnvtExoCpltTitre%
+ %étoiles eventuelles
+ \IfStrEq{\EnvtExoEtoiles}{}{}%
+ {%
+ \,(\IfSubStr{\EnvtExoEtoiles}{§}%
+ {%
+ \StrCut{\EnvtExoEtoiles}{§}{\EnvtExoStarNb}{\EnvtExoStarTot}%
+ \tkzEtoiles[Couleur=macouleurexodeco,CouleurFond=macouleurexodecofond,NiveauMax=\EnvtExoStarTot]{\EnvtExoStarNb}%
+ }%
+ {%
+ \tkzEtoiles[Couleur=macouleurexodeco,CouleurFond=macouleurexodecofond]{\EnvtExoEtoiles}%
+ }%
+ )%
+ }%
%trait éventuel
\IfStrEqCase{\EnvtExoTrait}{%
{plein}{\,\hrulefill}%
@@ -877,12 +1125,49 @@
\settototalheight{\tmp@image@hauteur@totale}{\hbox{\tmpstyleexo qB}}%
\,$\vcenter{\hbox{\includegraphics[height=\EnvtExoScaleImg\tmp@image@hauteur@totale]{\EnvtExoImg}}}$%
}{}%
+ \IfSubStr{\EnvtExoDeco}{faEtoiles}%
+ {%
+ \StrBehind{\EnvtExoDeco}{/}[\EnvtExoStars]%
+ \IfSuStr{\EnvtExoStars}{§}%
+ {%
+ \StrCut{\EnvtExoStars}{§}{\EnvtExoStarNb}{\EnvtExoStarTot}%
+ \textcolor{macouleurexodeco}{\scalebox{\tmpscalestarsexos}[\tmpscalestarsexos]{\NiveauDiffExos[\EnvtExoStarTot]{\EnvtExoStarNb}}}%
+ }%
+ {%
+ \textcolor{macouleurexodeco}{\scalebox{\tmpscalestarsexos}[\tmpscalestarsexos]{\NiveauDiffExos{\EnvtExoStars}}}%
+ }%
+ }{}%
+ \IfSubStr{\EnvtExoDeco}{tkzEtoiles}%
+ {%
+ \StrBehind{\EnvtExoDeco}{/}[\EnvtExoStars]%
+ \IfSubStr{\EnvtExoStars}{§}%
+ {%
+ \StrCut{\EnvtExoStars}{§}{\EnvtExoStarNb}{\EnvtExoStarTot}%
+ \tkzEtoiles[Couleur=macouleurexodeco,CouleurFond=macouleurexodecofond,NiveauMax=\EnvtExoStarTot]{\EnvtExoStarNb}%
+ }%
+ {%
+ \tkzEtoiles[Couleur=macouleurexodeco,CouleurFond=macouleurexodecofond]{\EnvtExoStars}%
+ }%
+ }{}%
}{}%
\IfSubStr{\EnvtExoType}{Perso}%OK perso____déco
{%
\StrBehind{\EnvtExoType}{/}[\EnvtExoLabel]%
%label avec numéro et complément
\tmpstyleexo\EnvtExoLabel\ifboolKV[EnvtExercice]{Compteur}{\thenumeroexo}{}\EnvtExoCpltTitre%
+ %étoiles eventuelles
+ \IfStrEq{\EnvtExoEtoiles}{}{}%
+ {%
+ \,(\IfSubStr{\EnvtExoEtoiles}{§}%
+ {%
+ \StrCut{\EnvtExoEtoiles}{§}{\EnvtExoStarNb}{\EnvtExoStarTot}%
+ \tkzEtoiles[Couleur=macouleurexodeco,CouleurFond=macouleurexodecofond,NiveauMax=\EnvtExoStarTot]{\EnvtExoStarNb}%
+ }%
+ {%
+ \tkzEtoiles[Couleur=macouleurexodeco,CouleurFond=macouleurexodecofond]{\EnvtExoEtoiles}%
+ }%
+ )%
+ }%
%trait éventuel
\IfStrEqCase{\EnvtExoTrait}{%
{plein}{\,\hrulefill}%
@@ -918,6 +1203,30 @@
\settototalheight{\tmp@image@hauteur@totale}{\hbox{\tmpstyleexo qB}}%
\,$\vcenter{\hbox{\includegraphics[height=\EnvtExoScaleImg\tmp@image@hauteur@totale]{\EnvtExoImg}}}$%
}{}%
+ \IfSubStr{\EnvtExoDeco}{faEtoiles}%
+ {%
+ \StrBehind{\EnvtExoDeco}{/}[\EnvtExoStars]%
+ \IfSuStr{\EnvtExoStars}{§}%
+ {%
+ \StrCut{\EnvtExoStars}{§}{\EnvtExoStarNb}{\EnvtExoStarTot}%
+ \textcolor{macouleurexodeco}{\scalebox{\tmpscalestarsexos}[\tmpscalestarsexos]{\NiveauDiffExos[\EnvtExoStarTot]{\EnvtExoStarNb}}}%
+ }%
+ {%
+ \textcolor{macouleurexodeco}{\scalebox{\tmpscalestarsexos}[\tmpscalestarsexos]{\NiveauDiffExos{\EnvtExoStars}}}%
+ }%
+ }{}%
+ \IfSubStr{\EnvtExoDeco}{tkzEtoiles}%
+ {%
+ \StrBehind{\EnvtExoDeco}{/}[\EnvtExoStars]%
+ \IfSubStr{\EnvtExoStars}{§}%
+ {%
+ \StrCut{\EnvtExoStars}{§}{\EnvtExoStarNb}{\EnvtExoStarTot}%
+ \tkzEtoiles[Couleur=macouleurexodeco,CouleurFond=macouleurexodecofond,NiveauMax=\EnvtExoStarTot]{\EnvtExoStarNb}%
+ }%
+ {%
+ \tkzEtoiles[Couleur=macouleurexodeco,CouleurFond=macouleurexodecofond]{\EnvtExoStars}%
+ }%
+ }{}%
}{}%
\endgroup%
\def\hrulefill{\leavevmode\leaders\hrule height 0.4pt\hfill\kern\z@}%
@@ -2237,7 +2546,7 @@
\setKVdefault[tkzBannerpartKeys]{%
height=2.5em,%
- width=\linewidth,%
+ width={\linewidth-0.5pt},%
blockwidth=2.75em,%
collight=darkgray!25,%
colmedium=darkgray!50,%
@@ -2260,10 +2569,10 @@
\noindent%
\restoreKV[tkzBannerpartKeys]%
\setKV[tkzBannerpartKeys]{#1}%
- \pgfmathsetmacro{\tkzBannertriscale}{0.75*\useKV[tkzBannerpartKeys]{height}/1.25cm}%
- \pgfmathsetmacro{\scaletypedoctribanner}{1.05*0.75*\useKV[tkzBannerpartKeys]{height}/1.25cm}%
- \pgfmathsetmacro{\scaletypedoctribannernum}{2.5*0.75*\useKV[tkzBannerpartKeys]{height}/1.25cm}%
- \pgfmathsetmacro{\tkzBannertriangle}{0.10*\useKV[tkzBannerpartKeys]{height}/\useKV[tkzBannerpartKeys]{width}}%
+ \pgfmathsetmacro{\tkzBannertriscale}{0.75*(\useKV[tkzBannerpartKeys]{height})/1.25cm}%
+ \pgfmathsetmacro{\scaletypedoctribanner}{1.05*0.75*(\useKV[tkzBannerpartKeys]{height})/1.25cm}%
+ \pgfmathsetmacro{\scaletypedoctribannernum}{2.5*0.75*(\useKV[tkzBannerpartKeys]{height})/1.25cm}%
+ \pgfmathsetmacro{\tkzBannertriangle}{0.10*(\useKV[tkzBannerpartKeys]{height})/(\useKV[tkzBannerpartKeys]{width})}%
\IfEq{\tkzBannermaintriblockwidth}{auto}%
{%
\settowidth{\tmp@tkzbanner@autowidthtype}{\scalebox{\scaletypedoctribanner}[\scaletypedoctribanner]{\sffamily\bfseries\vphantom{qÉ}\tkzBannermaintritype}}%
@@ -2309,34 +2618,34 @@
\begin{scope}
\clip ($(tkzBannerTri-SW)!0.0375!(tkzBannerTri-NW)$) -- ($(tkzBannerTri-SE)!0.1375!(tkzBannerTri-NE)$) -- (tkzBannerTri-NE) -| cycle ;
%light
- \fill[tkzbannertrilight] (tkzBannerTri-NW) --++ ({\tmp@tkzbanner@autowidth+2*\tmp@tkzbanner@marginoffsetbanner},0) -- ({\tmp@tkzbanner@autowidth+2*\tmp@tkzbanner@marginoffsetbanner+1em},{0.5*\useKV[tkzBannerpartKeys]{height}}) -- ({\tmp@tkzbanner@autowidth+2*\tmp@tkzbanner@marginoffsetbanner},0) -- (tkzBannerTri-SW) -- cycle ;
+ \fill[tkzbannertrilight] (tkzBannerTri-NW) --++ ({\tmp@tkzbanner@autowidth+2*\tmp@tkzbanner@marginoffsetbanner},0) -- ({\tmp@tkzbanner@autowidth+2*\tmp@tkzbanner@marginoffsetbanner+1em},{0.5*(\useKV[tkzBannerpartKeys]{height})}) -- ({\tmp@tkzbanner@autowidth+2*\tmp@tkzbanner@marginoffsetbanner},0) -- (tkzBannerTri-SW) -- cycle ;
\end{scope}
\begin{scope}
\clip ($(tkzBannerTri-SW)!0.025!(tkzBannerTri-NW)$) -- ($(tkzBannerTri-SE)!0.125!(tkzBannerTri-NE)$) -- (tkzBannerTri-NE) -| cycle ;
%medium
- \fill[tkzbannertrimedium] (tkzBannerTri-NW) --++ ({\tmp@tkzbanner@autowidth+\tmp@tkzbanner@marginoffsetbanner},0) -- ({\tmp@tkzbanner@autowidth+\tmp@tkzbanner@marginoffsetbanner+1em},{0.5*\useKV[tkzBannerpartKeys]{height}}) -- ({\tmp@tkzbanner@autowidth+\tmp@tkzbanner@marginoffsetbanner},0) -- (tkzBannerTri-SW) -- cycle ;
+ \fill[tkzbannertrimedium] (tkzBannerTri-NW) --++ ({\tmp@tkzbanner@autowidth+\tmp@tkzbanner@marginoffsetbanner},0) -- ({\tmp@tkzbanner@autowidth+\tmp@tkzbanner@marginoffsetbanner+1em},{0.5*(\useKV[tkzBannerpartKeys]{height})}) -- ({\tmp@tkzbanner@autowidth+\tmp@tkzbanner@marginoffsetbanner},0) -- (tkzBannerTri-SW) -- cycle ;
\end{scope}
\begin{scope}
\clip ($(tkzBannerTri-SW)!0.0125!(tkzBannerTri-NW)$) -- ($(tkzBannerTri-SE)!0.1125!(tkzBannerTri-NE)$) -- (tkzBannerTri-NE) -| cycle ;
%dark
- \fill[tkzbannertridark] (tkzBannerTri-NW) --++ ({\tmp@tkzbanner@autowidth},0) -- ({\tmp@tkzbanner@autowidth+1em},{0.5*\useKV[tkzBannerpartKeys]{height}}) -- ({\tmp@tkzbanner@autowidth},0) -- (tkzBannerTri-SW) -- cycle ;
+ \fill[tkzbannertridark] (tkzBannerTri-NW) --++ ({\tmp@tkzbanner@autowidth},0) -- ({\tmp@tkzbanner@autowidth+1em},{0.5*(\useKV[tkzBannerpartKeys]{height})}) -- ({\tmp@tkzbanner@autowidth},0) -- (tkzBannerTri-SW) -- cycle ;
\IfEq{\tkzBannermaintritypelibre}{}%
{%
\ifboolKV[tkzBannerpartKeys]{num}%
{%
\IfEq{\tkzBannermaintritype}{}%
{%
- \node[inner sep=2pt,text={\useKV[tkzBannerpartKeys]{coltxt}},font={\useKV[tkzBannerpartKeys]{fonttxt}},scale={2.5*\tkzBannertriscale},rotate={atan(\tkzBannertriangle)}] at ({0.5*\tmp@tkzbanner@autowidth},{0.5*\useKV[tkzBannerpartKeys]{height}}) {\vphantom{qÉ}#2};
+ \node[inner sep=2pt,text={\useKV[tkzBannerpartKeys]{coltxt}},font={\useKV[tkzBannerpartKeys]{fonttxt}},scale={2.5*\tkzBannertriscale},rotate={atan(\tkzBannertriangle)}] at ({0.5*\tmp@tkzbanner@autowidth},{0.5*(\useKV[tkzBannerpartKeys]{height})}) {\vphantom{qÉ}#2};
}%
{%
\node[inner sep=2pt,below=1pt,text={\useKV[tkzBannerpartKeys]{coltxt}},font={\useKV[tkzBannerpartKeys]{fonttxt}},scale={1.05*\tkzBannertriscale},rotate={atan(\tkzBannertriangle)}] at ({0.5*\tmp@tkzbanner@autowidth},{\useKV[tkzBannerpartKeys]{height}}) {\vphantom{qÉ}\tkzBannermaintritype};
- \node[inner sep=2pt,text={\useKV[tkzBannerpartKeys]{coltxt}},font={\useKV[tkzBannerpartKeys]{fonttxt}},scale={2.5*\tkzBannertriscale},rotate={atan(\tkzBannertriangle)}] at ({0.5*\tmp@tkzbanner@autowidth},{0.425*\useKV[tkzBannerpartKeys]{height}}) {\vphantom{qÉ}#2};
+ \node[inner sep=2pt,text={\useKV[tkzBannerpartKeys]{coltxt}},font={\useKV[tkzBannerpartKeys]{fonttxt}},scale={2.5*\tkzBannertriscale},rotate={atan(\tkzBannertriangle)}] at ({0.5*\tmp@tkzbanner@autowidth},{0.425*(\useKV[tkzBannerpartKeys]{height})}) {\vphantom{qÉ}#2};
}%
}%
{}%
}%
{%
- \node[inner sep=2pt,text={\useKV[tkzBannerpartKeys]{coltxt}},font={\useKV[tkzBannerpartKeys]{fonttxt}},scale={2.5*\tkzBannertriscale},rotate={atan(\tkzBannertriangle)}] at ({0.5*\tmp@tkzbanner@autowidth},{0.5*\useKV[tkzBannerpartKeys]{height}}) {\vphantom{qÉ}\tkzBannermaintritypelibre};
+ \node[inner sep=2pt,text={\useKV[tkzBannerpartKeys]{coltxt}},font={\useKV[tkzBannerpartKeys]{fonttxt}},scale={2.5*\tkzBannertriscale},rotate={atan(\tkzBannertriangle)}] at ({0.5*\tmp@tkzbanner@autowidth},{0.5*(\useKV[tkzBannerpartKeys]{height})}) {\vphantom{qÉ}\tkzBannermaintritypelibre};
}%
\end{scope}
}%
@@ -2346,26 +2655,417 @@
\clip (tkzBannerTri-SWd) -- (tkzBannerTri-SEd) -- (tkzBannerTri-NE) -| cycle ;
\ifboolKV[tkzBannerpartKeys]{swap}%
{%
- \node[inner sep=2pt,right,text=\tkzBannermaintricol,font={\useKV[tkzBannerpartKeys]{fonttxt}},scale={2.75*\tkzBannertriscale},rotate={atan(\tkzBannertriangle)}] at ({\tmp@tkzbanner@autowidth+2*\tmp@tkzbanner@marginoffsetbanner+1.25em},{0.5*\useKV[tkzBannerpartKeys]{height}}) {\vphantom{qÉ}#3};
+ \node[inner sep=2pt,right,text=\tkzBannermaintricol,font={\useKV[tkzBannerpartKeys]{fonttxt}},scale={2.75*\tkzBannertriscale},rotate={atan(\tkzBannertriangle)}] at ({\tmp@tkzbanner@autowidth+2*\tmp@tkzbanner@marginoffsetbanner+1.25em},{0.5*(\useKV[tkzBannerpartKeys]{height})}) {\vphantom{qÉ}#3};
%logo
\IfEq{\tkzBannermaintrilogo}{}%
{}%
{%
- \node[inner sep=2pt,left,text=\tkzBannermaintricol,font={\useKV[tkzBannerpartKeys]{fonttxt}},scale={2.5*\tkzBannertriscale},rotate={atan(\tkzBannertriangle)}] at ({\useKV[tkzBannerpartKeys]{width}},{0.55*\useKV[tkzBannerpartKeys]{height}}) {\vphantom{qÉ}\tkzBannermaintrilogo};
+ \node[inner sep=2pt,left,text=\tkzBannermaintricol,font={\useKV[tkzBannerpartKeys]{fonttxt}},scale={2.5*\tkzBannertriscale},rotate={atan(\tkzBannertriangle)}] at ({\useKV[tkzBannerpartKeys]{width}},{0.55*(\useKV[tkzBannerpartKeys]{height})}) {\vphantom{qÉ}\tkzBannermaintrilogo};
}%
}%
{%
- \node[inner sep=2pt,right,text={\useKV[tkzBannerpartKeys]{coltxt}},font={\useKV[tkzBannerpartKeys]{fonttxt}},scale={2.75*\tkzBannertriscale},rotate={atan(\tkzBannertriangle)}] at ({\tmp@tkzbanner@autowidth+2*\tmp@tkzbanner@marginoffsetbanner+1.25em},{0.5*\useKV[tkzBannerpartKeys]{height}}) {\vphantom{qÉ}#3};
+ \node[inner sep=2pt,right,text={\useKV[tkzBannerpartKeys]{coltxt}},font={\useKV[tkzBannerpartKeys]{fonttxt}},scale={2.75*\tkzBannertriscale},rotate={atan(\tkzBannertriangle)}] at ({\tmp@tkzbanner@autowidth+2*\tmp@tkzbanner@marginoffsetbanner+1.25em},{0.5*(\useKV[tkzBannerpartKeys]{height})}) {\vphantom{qÉ}#3};
%logo
\IfEq{\tkzBannermaintrilogo}{}%
{}%
{%
- \node[inner sep=2pt,left,text={\useKV[tkzBannerpartKeys]{coltxt}},font={\useKV[tkzBannerpartKeys]{fonttxt}},scale={2.5*\tkzBannertriscale},rotate={atan(\tkzBannertriangle)}] at ({\useKV[tkzBannerpartKeys]{width}},{0.55*\useKV[tkzBannerpartKeys]{height}}) {\vphantom{qÉ}\tkzBannermaintrilogo};
+ \node[inner sep=2pt,left,text={\useKV[tkzBannerpartKeys]{coltxt}},font={\useKV[tkzBannerpartKeys]{fonttxt}},scale={2.5*\tkzBannertriscale},rotate={atan(\tkzBannertriangle)}] at ({\useKV[tkzBannerpartKeys]{width}},{0.55*(\useKV[tkzBannerpartKeys]{height})}) {\vphantom{qÉ}\tkzBannermaintrilogo};
}%
}%
\end{scope}
\end{tikzpicture}%
}
+%====grille automatique tikz ?
+\NewDocumentCommand\tkzGrilleAuto{ s O{thin,lightgray} m }{%
+ \IfBooleanT{#1}{\filldraw (0,0) circle[radius=2pt] ;}
+ \StrCut{#3}{§}{\tkzautogridx}{\tkzautogridy}%
+ \draw[xstep=\tkzautogridx,ystep=\tkzautogridy,#2] (current bounding box.south west) grid (current bounding box.north east) ;
+}
+\NewDocumentCommand\tkzAutoGrid{ s O{thin,lightgray} m }{%
+ \IfBooleanT{#1}{\filldraw (0,0) circle[radius=2pt] ;}
+ \StrCut{#3}{§}{\tkzautogridx}{\tkzautogridy}%
+ \draw[xstep=\tkzautogridx,ystep=\tkzautogridy,#2] (current bounding box.south west) grid (current bounding box.north east) ;
+}
+
+\tikzset{grilleauto/.store in=\tkzautogrid,grilleauto/.default={},grilleauto={}}
+\tikzset{autogrid/.store in=\tkzautogrid,autogrid/.default={},autogrid={}}
+
+\NewDocumentCommand\tkzAutoGridActivate{ s }{%
+ \@ifundefined{tkzautogrid}%
+ {}%
+ {%
+ \tikzset{every picture/.style={%
+ execute at end picture={%
+ \IfEq{\tkzautogrid}{}{}{\IfBooleanTF{#1}{\tkzGrilleAuto*{\tkzautogrid}}{\tkzGrilleAuto{\tkzautogrid}}}%
+ },
+ },
+ }%
+ }%
+}
+
+\NewDocumentCommand\tkzAutoGridLocal{ s }{%
+ \@ifundefined{tkzautogrid}%
+ {}%
+ {%
+ \tikzset{execute at end picture={%
+ \IfEq{\tkzautogrid}{}{}{\IfBooleanTF{#1}{\tkzGrilleAuto*{\tkzautogrid}}{\tkzGrilleAuto{\tkzautogrid}}}%
+ },
+ },
+ }%
+}
+
+%====FLÈCHE ÉVASÉE [FR]
+\usetikzlibrary{arrows,arrows.meta}
+
+\defKV[FlecheEvasee]{%
+ Couleur=\def\FlecheEvaseeCouleur{#1},%
+ TailleFleche=\def\FlecheEvaseeFleche{#1},%
+ Direction=\def\FlecheEvaseeDirectionAngle{#1},%
+ Coeff=\def\FlecheEvaseeCoeff{#1},%
+ TypeFleche=\def\FlecheEvaseeType{#1},%
+ Epaisseur=\def\FlecheEvaseeEpaisseur{#1},%
+ LineCap=\def\FlecheEvaseeLineCap{#1}
+}
+\setKVdefault[FlecheEvasee]{%
+ Couleur=black,%
+ TailleFleche=auto,%
+ Direction={},%
+ Coeff=4,%
+ TypeFleche=Latex,%
+ Deplacement=false,%
+ Epaisseur=0.5mm,%
+ LineCap=butt
+}
+
+\NewDocumentCommand\tkzFlecheEvasee{ O{} m m }{%1=options,2=début,3=fin
+ \restoreKV[FlecheEvasee]%
+ \setKV[FlecheEvasee]{#1}%
+ \begin{scope}[line width=0.05mm]
+ \IfStrEq{\FlecheEvaseeFleche}{auto}%
+ {%
+ \xdef\FlecheEvaseeH{2*\FlecheEvaseeCoeff*\FlecheEvaseeEpaisseur}%
+ \xdef\FlecheEvaseeW{2.1*\FlecheEvaseeCoeff*\FlecheEvaseeEpaisseur}%
+ }%
+ {%
+ \StrCut{\FlecheEvaseeFleche}{/}{\FlecheEvaseeH}{\FlecheEvaseeW}%
+ }%
+ \IfEq{\FlecheEvaseeDirectionAngle}{}%
+ {%
+ \xdef\FlecheEvaseeDirection{}\xdef\FlecheEvaseeAngle{0}%
+ }%
+ {%
+ \StrCut{\FlecheEvaseeDirectionAngle}{/}{\FlecheEvaseeDirection}{\FlecheEvaseeAngle}%
+ }%
+ %coordonnées
+ \coordinate (TMPDEPART) at (#2) ;
+ \ifboolKV[FlecheEvasee]{Deplacement}%
+ {%
+ \coordinate (TMPARRIVEE) at ($(TMPDEPART)+(#3)$) ;
+ }%
+ {%
+ \coordinate (TMPARRIVEE) at (#3) ;
+ }
+ \pgfmathanglebetweenpoints{\pgfpointanchor{TMPDEPART}{center}}{\pgfpointanchor{TMPARRIVEE}{center}}%
+ \edef\tmpangle{\pgfmathresult}%
+ %nœuds
+ \IfEq{\FlecheEvaseeDirection}{right}%
+ {%
+ \coordinate (TMPDG) at ([shift={({90+\tmpangle-\FlecheEvaseeAngle}:{0.5*\FlecheEvaseeEpaisseur})}]TMPDEPART) ;
+ \coordinate (TMPDD) at ([shift={({-90+\tmpangle-\FlecheEvaseeAngle}:{0.5*\FlecheEvaseeEpaisseur})}]TMPDEPART) ;
+ \coordinate (TMPF) at ($(TMPARRIVEE)+({\FlecheEvaseeAngle+\tmpangle+180}:\FlecheEvaseeH)$) ;
+ \coordinate (TMPFG) at ($(TMPARRIVEE)+({\FlecheEvaseeAngle+\tmpangle+180}:\FlecheEvaseeH)+({\FlecheEvaseeAngle+\tmpangle-90}:{0.5*\FlecheEvaseeCoeff*\FlecheEvaseeEpaisseur})$) ;
+ \coordinate (TMPFD) at ($(TMPARRIVEE)+({\FlecheEvaseeAngle+\tmpangle+180}:\FlecheEvaseeH)+({\FlecheEvaseeAngle+\tmpangle+90}:{0.5*\FlecheEvaseeCoeff*\FlecheEvaseeEpaisseur})$) ;
+ \IfStrEq{\FlecheEvaseeType}{Stealth}%
+ {%
+ \draw[\FlecheEvaseeCouleur,->,-{\FlecheEvaseeType[length={1.5*\FlecheEvaseeH},width={1.1*\FlecheEvaseeW}]}] (TMPF)--(TMPARRIVEE) ;
+ }%
+ {%
+ \draw[\FlecheEvaseeCouleur,->,-{\FlecheEvaseeType[length=\FlecheEvaseeH,width=\FlecheEvaseeW]}] (TMPF)--(TMPARRIVEE) ;
+ }%
+ \filldraw[line cap=\FlecheEvaseeLineCap,\FlecheEvaseeCouleur] (TMPDD) to[bend right=\FlecheEvaseeAngle] (TMPFG) -- (TMPFD) to[bend left=\FlecheEvaseeAngle] (TMPDG) --cycle ;
+ }%
+ {}%
+ \IfEq{\FlecheEvaseeDirection}{left}%
+ {%
+ \coordinate (TMPDG) at ([shift={({90+\tmpangle+\FlecheEvaseeAngle}:{0.5*\FlecheEvaseeEpaisseur})}]TMPDEPART) ;
+ \coordinate (TMPDD) at ([shift={({-90+\tmpangle+\FlecheEvaseeAngle}:{0.5*\FlecheEvaseeEpaisseur})}]TMPDEPART) ;
+ \coordinate (TMPF) at ($(TMPARRIVEE)+({180+\tmpangle-\FlecheEvaseeAngle}:\FlecheEvaseeH)$) ;
+ \coordinate (TMPFG) at ($(TMPARRIVEE)+({180+\tmpangle-\FlecheEvaseeAngle}:\FlecheEvaseeH)+({180+\tmpangle-\FlecheEvaseeAngle+90}:{0.5*\FlecheEvaseeCoeff*\FlecheEvaseeEpaisseur})$) ;
+ \coordinate (TMPFD) at ($(TMPARRIVEE)+({180+\tmpangle-\FlecheEvaseeAngle}:\FlecheEvaseeH)+({180+\tmpangle-\FlecheEvaseeAngle-90}:{0.5*\FlecheEvaseeCoeff*\FlecheEvaseeEpaisseur})$) ;
+ \IfStrEq{\FlecheEvaseeType}{Stealth}%
+ {%
+ \draw[\FlecheEvaseeCouleur,->,-{\FlecheEvaseeType[length={1.5*\FlecheEvaseeH},width={1.1*\FlecheEvaseeW}]}] (TMPF)--(TMPARRIVEE) ;
+ }%
+ {%
+ \draw[\FlecheEvaseeCouleur,->,-{\FlecheEvaseeType[length=\FlecheEvaseeH,width=\FlecheEvaseeW]}] (TMPF)--(TMPARRIVEE) ;
+ }%
+ \filldraw[line cap=\FlecheEvaseeLineCap,\FlecheEvaseeCouleur] (TMPDD) to[bend left=\FlecheEvaseeAngle] (TMPFG) -- (TMPFD) to[bend right=\FlecheEvaseeAngle] (TMPDG) --cycle ;
+ }%
+ {}%
+ \IfEq{\FlecheEvaseeDirection}{}%
+ {%
+ \coordinate (TMPF) at ($(TMPARRIVEE)+({180+\tmpangle-\FlecheEvaseeAngle}:\FlecheEvaseeH)$) ;
+ \coordinate (TMPDG) at ([shift={({90+\tmpangle-\FlecheEvaseeAngle}:{0.5*\FlecheEvaseeEpaisseur})}]TMPDEPART) ;
+ \coordinate (TMPFG) at ($(TMPARRIVEE)+({180+\tmpangle-\FlecheEvaseeAngle}:\FlecheEvaseeH)+({-90+\tmpangle-\FlecheEvaseeAngle}:{-0.5*\FlecheEvaseeCoeff*\FlecheEvaseeEpaisseur})$) ;
+ \coordinate (TMPFD) at ($(TMPARRIVEE)+({180+\tmpangle-\FlecheEvaseeAngle}:\FlecheEvaseeH)+({-90+\tmpangle-\FlecheEvaseeAngle}:{0.5*\FlecheEvaseeCoeff*\FlecheEvaseeEpaisseur})$) ;
+ \coordinate (TMPDD) at ([shift={({-90+\tmpangle-\FlecheEvaseeAngle}:{0.5*\FlecheEvaseeEpaisseur})}]TMPDEPART) ;
+ \IfStrEq{\FlecheEvaseeType}{Stealth}%
+ {%
+ \draw[\FlecheEvaseeCouleur,->,-{\FlecheEvaseeType[length={1.5*\FlecheEvaseeH},width={1.1*\FlecheEvaseeW}]}] (TMPF)--(TMPARRIVEE) ;
+ }%
+ {%
+ \draw[\FlecheEvaseeCouleur,->,-{\FlecheEvaseeType[length=\FlecheEvaseeH,width=\FlecheEvaseeW]}] (TMPF)--(TMPARRIVEE) ;
+ }%
+ \filldraw[line cap=\FlecheEvaseeLineCap,\FlecheEvaseeCouleur] (TMPDG) to (TMPFG) -- (TMPFD) to (TMPDD) --cycle ;
+ }%
+ {}%
+ \end{scope}
+}
+
+%====FLÈCHE ÉVASÉE [EN]
+\defKV[flaredarrow]{%
+ color=\def\FlecheEvaseeCouleur{#1},%
+ arrowsize=\def\FlecheEvaseeFleche{#1},%
+ bend=\def\FlecheEvaseeDirectionAngle{#1},%
+ factor=\def\FlecheEvaseeCoeff{#1},%
+ arrowstyle=\def\FlecheEvaseeType{#1},%
+ thickness=\def\FlecheEvaseeEpaisseur{#1},%
+ linecap=\def\FlecheEvaseeLineCap{#1}
+}
+\setKVdefault[flaredarrow]{%
+ color=black,%
+ arrowsize=auto,%
+ bend={},%
+ factor=4,%
+ arrowstyle=Latex,%
+ move=false,%
+ thickness=0.5mm,%
+ linecap=butt
+}
+
+\NewDocumentCommand\tkzFlaredArrow{ O{} m m }{%1=options,2=début,3=fin
+ \restoreKV[flaredarrow]%
+ \setKV[flaredarrow]{#1}%
+ \begin{scope}[line width=0.05mm]
+ \IfStrEq{\FlecheEvaseeFleche}{auto}%
+ {%
+ \xdef\FlecheEvaseeH{2*\FlecheEvaseeCoeff*\FlecheEvaseeEpaisseur}%
+ \xdef\FlecheEvaseeW{2.1*\FlecheEvaseeCoeff*\FlecheEvaseeEpaisseur}%
+ }%
+ {%
+ \StrCut{\FlecheEvaseeFleche}{/}{\FlecheEvaseeH}{\FlecheEvaseeW}%
+ }%
+ \IfEq{\FlecheEvaseeDirectionAngle}{}%
+ {%
+ \xdef\FlecheEvaseeDirection{}\xdef\FlecheEvaseeAngle{0}%
+ }%
+ {%
+ \StrCut{\FlecheEvaseeDirectionAngle}{/}{\FlecheEvaseeDirection}{\FlecheEvaseeAngle}%
+ }%
+ %coordonnées
+ \coordinate (TMPDEPART) at (#2) ;
+ \ifboolKV[flaredarrow]{move}%
+ {%
+ \coordinate (TMPARRIVEE) at ($(TMPDEPART)+(#3)$) ;
+ }%
+ {%
+ \coordinate (TMPARRIVEE) at (#3) ;
+ }
+ \pgfmathanglebetweenpoints{\pgfpointanchor{TMPDEPART}{center}}{\pgfpointanchor{TMPARRIVEE}{center}}%
+ \edef\tmpangle{\pgfmathresult}%
+ %nœuds
+ \IfEq{\FlecheEvaseeDirection}{right}%
+ {%
+ \coordinate (TMPDG) at ([shift={({90+\tmpangle-\FlecheEvaseeAngle}:{0.5*\FlecheEvaseeEpaisseur})}]TMPDEPART) ;
+ \coordinate (TMPDD) at ([shift={({-90+\tmpangle-\FlecheEvaseeAngle}:{0.5*\FlecheEvaseeEpaisseur})}]TMPDEPART) ;
+ \coordinate (TMPF) at ($(TMPARRIVEE)+({\FlecheEvaseeAngle+\tmpangle+180}:\FlecheEvaseeH)$) ;
+ \coordinate (TMPFG) at ($(TMPARRIVEE)+({\FlecheEvaseeAngle+\tmpangle+180}:\FlecheEvaseeH)+({\FlecheEvaseeAngle+\tmpangle-90}:{0.5*\FlecheEvaseeCoeff*\FlecheEvaseeEpaisseur})$) ;
+ \coordinate (TMPFD) at ($(TMPARRIVEE)+({\FlecheEvaseeAngle+\tmpangle+180}:\FlecheEvaseeH)+({\FlecheEvaseeAngle+\tmpangle+90}:{0.5*\FlecheEvaseeCoeff*\FlecheEvaseeEpaisseur})$) ;
+ \IfStrEq{\FlecheEvaseeType}{Stealth}%
+ {%
+ \draw[\FlecheEvaseeCouleur,->,-{\FlecheEvaseeType[length={1.5*\FlecheEvaseeH},width={1.1*\FlecheEvaseeW}]}] (TMPF)--(TMPARRIVEE) ;
+ }%
+ {%
+ \draw[\FlecheEvaseeCouleur,->,-{\FlecheEvaseeType[length=\FlecheEvaseeH,width=\FlecheEvaseeW]}] (TMPF)--(TMPARRIVEE) ;
+ }%
+ \filldraw[line cap=\FlecheEvaseeLineCap,\FlecheEvaseeCouleur] (TMPDD) to[bend right=\FlecheEvaseeAngle] (TMPFG) -- (TMPFD) to[bend left=\FlecheEvaseeAngle] (TMPDG) --cycle ;
+ }%
+ {}%
+ \IfEq{\FlecheEvaseeDirection}{left}%
+ {%
+ \coordinate (TMPDG) at ([shift={({90+\tmpangle+\FlecheEvaseeAngle}:{0.5*\FlecheEvaseeEpaisseur})}]TMPDEPART) ;
+ \coordinate (TMPDD) at ([shift={({-90+\tmpangle+\FlecheEvaseeAngle}:{0.5*\FlecheEvaseeEpaisseur})}]TMPDEPART) ;
+ \coordinate (TMPF) at ($(TMPARRIVEE)+({180+\tmpangle-\FlecheEvaseeAngle}:\FlecheEvaseeH)$) ;
+ \coordinate (TMPFG) at ($(TMPARRIVEE)+({180+\tmpangle-\FlecheEvaseeAngle}:\FlecheEvaseeH)+({180+\tmpangle-\FlecheEvaseeAngle+90}:{0.5*\FlecheEvaseeCoeff*\FlecheEvaseeEpaisseur})$) ;
+ \coordinate (TMPFD) at ($(TMPARRIVEE)+({180+\tmpangle-\FlecheEvaseeAngle}:\FlecheEvaseeH)+({180+\tmpangle-\FlecheEvaseeAngle-90}:{0.5*\FlecheEvaseeCoeff*\FlecheEvaseeEpaisseur})$) ;
+ \IfStrEq{\FlecheEvaseeType}{Stealth}%
+ {%
+ \draw[\FlecheEvaseeCouleur,->,-{\FlecheEvaseeType[length={1.5*\FlecheEvaseeH},width={1.1*\FlecheEvaseeW}]}] (TMPF)--(TMPARRIVEE) ;
+ }%
+ {%
+ \draw[\FlecheEvaseeCouleur,->,-{\FlecheEvaseeType[length=\FlecheEvaseeH,width=\FlecheEvaseeW]}] (TMPF)--(TMPARRIVEE) ;
+ }%
+ \filldraw[line cap=\FlecheEvaseeLineCap,\FlecheEvaseeCouleur] (TMPDD) to[bend left=\FlecheEvaseeAngle] (TMPFG) -- (TMPFD) to[bend right=\FlecheEvaseeAngle] (TMPDG) --cycle ;
+ }%
+ {}%
+ \IfEq{\FlecheEvaseeDirection}{}%
+ {%
+ \coordinate (TMPF) at ($(TMPARRIVEE)+({180+\tmpangle-\FlecheEvaseeAngle}:\FlecheEvaseeH)$) ;
+ \coordinate (TMPDG) at ([shift={({90+\tmpangle-\FlecheEvaseeAngle}:{0.5*\FlecheEvaseeEpaisseur})}]TMPDEPART) ;
+ \coordinate (TMPFG) at ($(TMPARRIVEE)+({180+\tmpangle-\FlecheEvaseeAngle}:\FlecheEvaseeH)+({-90+\tmpangle-\FlecheEvaseeAngle}:{-0.5*\FlecheEvaseeCoeff*\FlecheEvaseeEpaisseur})$) ;
+ \coordinate (TMPFD) at ($(TMPARRIVEE)+({180+\tmpangle-\FlecheEvaseeAngle}:\FlecheEvaseeH)+({-90+\tmpangle-\FlecheEvaseeAngle}:{0.5*\FlecheEvaseeCoeff*\FlecheEvaseeEpaisseur})$) ;
+ \coordinate (TMPDD) at ([shift={({-90+\tmpangle-\FlecheEvaseeAngle}:{0.5*\FlecheEvaseeEpaisseur})}]TMPDEPART) ;
+ \IfStrEq{\FlecheEvaseeType}{Stealth}%
+ {%
+ \draw[\FlecheEvaseeCouleur,->,-{\FlecheEvaseeType[length={1.5*\FlecheEvaseeH},width={1.1*\FlecheEvaseeW}]}] (TMPF)--(TMPARRIVEE) ;
+ }%
+ {%
+ \draw[\FlecheEvaseeCouleur,->,-{\FlecheEvaseeType[length=\FlecheEvaseeH,width=\FlecheEvaseeW]}] (TMPF)--(TMPARRIVEE) ;
+ }%
+ \filldraw[line cap=\FlecheEvaseeLineCap,\FlecheEvaseeCouleur] (TMPDG) to (TMPFG) -- (TMPFD) to (TMPDD) --cycle ;
+ }%
+ {}%
+ \end{scope}
+}
+
+%====PANO AUTOROUTE
+\newlength{\PanoTorouteStretch}
+\newlength{\PanoTorouteOffsetArrow}
+
+\defKV[PanoAutoroute]{%
+ Fleches=\def\PanoTorouteArrow{#1},%
+ CouleurFond=\def\PanoTorouteCoul{#1},%
+ CouleurTitre=\def\PanoTorouteCoulTitre{#1},%
+ Police=\def\PanoTorouteFonte{#1},%
+ PoliceCartouche=\def\PanoTorouteFonteTitre{#1},%
+ TypeFleche=\def\PanoTorouteStyleArrow{#1},%
+ EspacementV=\setlength{\PanoTorouteStretch}{#1},%
+ OffsetFleches=\setlength{\PanoTorouteOffsetArrow}{#1}
+}
+
+\setKVdefault[PanoAutoroute]{%
+ Fleches=0,%
+ CouleurFond=blue,%
+ CouleurTitre=red,%
+ Largeur=10cm,%
+ Police=\LARGE\bfseries\sffamily,%
+ PoliceCartouche=\Large\bfseries\sffamily,%
+ TypeFleche={\scalebox{1.33}[1.25]{\faArrowDown}},%
+ EspacementV={2.5mm},%
+ OffsetFleches={5mm},%
+ Dernier=true
+}
+
+\NewDocumentEnvironment{PanneauAutoroute}{ O{} D<>{} m }%
+{%
+ \restoreKV[PanoAutoroute]%
+ \setKV[PanoAutoroute]{#1}
+ \IfEq{#3}{}%
+ {%
+ \tcolorbox[enhanced,width={\useKV[PanoAutoroute]{Largeur}},fontupper=\PanoTorouteFonte,colback=\PanoTorouteCoul,colframe=\PanoTorouteCoul!5!white,coltext=white,sharp corners,boxsep=1mm,left=1mm,right=1mm,top=1mm,bottom=1mm,#2]
+ }%
+ {%
+ \tcolorbox[enhanced,width={\useKV[PanoAutoroute]{Largeur}},fontupper=\PanoTorouteFonte,colback=\PanoTorouteCoul,colframe=\PanoTorouteCoul!5!white,coltext=white,sharp corners,boxsep=1mm,left=1mm,right=1mm,top=1mm,bottom=1mm,attach boxed title to top center,fonttitle=\PanoTorouteFonteTitre,coltitle=white,boxed title style={colback=\PanoTorouteCoulTitre,size=small,sharp corners,left=0mm,right=0mm,colframe=\PanoTorouteCoulTitre!5!white},title={#3},#2]
+ }%
+ \baselineskip=-1000pt\lineskip=\PanoTorouteStretch\lineskiplimit=\maxdimen%
+}%
+{%
+ \ifnum\PanoTorouteArrow>0
+
+ \medskip
+ \hspace*{\PanoTorouteOffsetArrow}\foreach \i in {1,...,\PanoTorouteArrow}{\hfill\PanoTorouteStyleArrow}\hfill\hspace*{\PanoTorouteOffsetArrow}
+ \fi%
+ \endtcolorbox%
+ %
+ \ifboolKV[PanoAutoroute]{Dernier}{}{\vspace*{\dimexpr-\baselineskip-0.5mm\relax}}%
+}
+
+\NewDocumentCommand\VilleDist{ s m m }{%
+ \IfBooleanTF{#1}%
+ {%
+ #2\hfill~#3
+ }%
+ {%
+ #2\hfill~#3\\
+ }%
+}
+
+%====PANOSOLDES
+\newlength{\tmphautbannsold}
+\newlength{\tmphautbannsoldextra}
+\newlength{\tmplargbannsold}
+\newlength{\tmplargasold}
+\newlength{\tmplargbsold}
+\newlength{\tmplargtotsold}
+\newlength{\tmpoffsetbannsold}
+\newlength{\tmphautlignesol}
+\newlength{\tmphautsoles}
+
+\def\labelancienprix{Ancien Prix~:~}
+\def\labelnouveauprix{Nouveau Prix~:~}
+\def\labelreduction{SOLDES~:~}
+
+\defKV[PanoSoldes]{%
+ Couleur=\def\panosoldescolor{#1},%
+ Largeur=\def\panosoldeswidth{#1},%
+ PoliceEntete=\def\panosoldesfonthaut{#1},%
+ PolicePrix=\def\panosoldesfontprix{#1},%
+ PoliceReduc=\def\panosoldesfontreduc{#1},%
+ OffsetReduc=\setlength{\tmpoffsetbannsold}{#1},%
+ Titre=\def\panosoldestitre{#1},%
+ AgrandirReduc=\setlength{\tmphautbannsoldextra}{#1}
+}
+
+\setKVdefault[PanoSoldes]{%
+ Couleur=gray,
+ Largeur=auto,
+ PoliceEntete=\large\bfseries,%
+ PolicePrix=\footnotesize,%
+ PoliceReduc=\large\bfseries,%
+ Titre=GRANDE DÉMARQUE,%
+ OffsetReduc=1.25cm,%
+ AgrandirReduc=0mm
+}
+
+\NewDocumentCommand\AfficheSoldes{ O{} m m m }{%
+ \restoreKV[PanoSoldes]%
+ \setKV[PanoSoldes]{#1}%
+ %calcul de la largeur
+ \IfEq{\panosoldeswidth}{auto}%
+ {%
+ \settowidth{\tmplargbannsold}{{\panosoldesfontreduc\labelreduction-999X}}%largeur avec un peu de marge dûe à la rotation
+ \settowidth{\tmplargasold}{{\panosoldesfontprix\labelancienprix99999X}}%largeur avec un peu de marge dûe au prix "élastique"
+ \settowidth{\tmplargbsold}{{\panosoldesfontprix\labelnouveauprix99999X}}%largeur avec un peu de marge dûe au prix "élastique"
+ \pgfmathsetlength{\tmplargtotsold}{max(\tmplargbannsold,\tmplargasold,\tmplargbsold)+1mm}%on rajoute encore un peu de marge pour être sûr
+ }%
+ {%
+ \setlength{\tmplargtotsold}{\panosoldeswidth}%
+ }%
+ %calcul de la hauteur
+ \settototalheight{\tmphautlignesol}{\panosoldesfontprix\labelancienprix\labelnouveauprix0,123456789X}%
+ \settototalheight{\tmphautbannsold}{\panosoldesfontreduc\labelreduction-0,123456789X}%
+ \addtolength{\tmphautbannsold}{6mm+\tmphautbannsoldextra}%
+ \setlength{\tmphautsoles}{2\tmphautlignesol}%
+ \addtolength{\tmphautsoles}{\tmpoffsetbannsold+2mm}%
+ \addtolength{\tmphautsoles}{\tmphautbannsold}%
+ %boîte
+ \tcolorbox[%
+ enhanced,nobeforeafter,width=\tmplargtotsold,text height=\tmphautsoles,boxrule=0.5mm,boxsep=0.5mm,title={\panosoldestitre},halign title=flush center,colframe=\panosoldescolor,colback=white,top=1.25mm,bottom=1.25mm,left=1.25mm,right=1.25mm,fonttitle=\panosoldesfonthaut,%
+ overlay={%
+ \begin{tcbclipframe}
+ \draw ([shift={(1.25mm,-2mm)}]interior.north west) node[anchor=north west,font=\panosoldesfontprix,inner sep=0pt] {Ancien prix : {#2}} ;
+ \draw ([shift={(-1.25mm,2.5mm)}]interior.south east) node[anchor=south east,left,font=\panosoldesfontprix,inner sep=0pt] {Nouveau prix : {#3}} ;
+ %bannière (cf Séb Lozano)
+ \fill[line cap=rect,\panosoldescolor] ([shift={(0,2.5mm+\tmphautlignesol)}]interior.south west)--([shift={(0,2.5mm+\tmphautlignesol+\tmpoffsetbannsold)}]interior.south east)--++(0,\tmphautbannsold)--([shift={(0,2.5mm+\tmphautlignesol+\tmphautbannsold)}]interior.south west) ;
+ %petit filet
+ \draw[white,semithick] ([shift={(0,2.5mm+\tmphautlignesol+1pt)}]interior.south west)--([shift={(0,2.5mm+\tmphautlignesol+\tmpoffsetbannsold+1pt)}]interior.south east)--++(0,\tmphautbannsold-2pt)--([shift={(0,2.5mm+\tmphautlignesol+\tmphautbannsold-1pt)}]interior.south west)--cycle ;
+ %label
+ \draw[draw=none] ([shift={(0,2.5mm+\tmphautlignesol+0.5\tmphautbannsold)}]interior.south west) -- ([shift={(0,2.5mm+\tmphautlignesol+\tmpoffsetbannsold+0.5\tmphautbannsold)}]interior.south east) node[midway,sloped,font=\panosoldesfontreduc,text=white] {SOLDES : {#4}} ;
+ \end{tcbclipframe}%
+ }%
+ ]%
+ \endtcolorbox%
+}
\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/easybook/README.md b/macros/latex/contrib/easybook/README.md
index a04be06f54..b87e8cafbc 100644
--- a/macros/latex/contrib/easybook/README.md
+++ b/macros/latex/contrib/easybook/README.md
@@ -1,5 +1,5 @@
# The `easybook` document class
-Easily typesetting Chinese theses or books (v2024dj)
+Easily typesetting Chinese theses or books (v2024ed)
## Abstract
`easybook` is a pure academic template created based on the `ctexbook` book document class. It also has the functions of `book` and `article` document class. Combined with the general framework design of the theses of many universities in China, providing multiple commands and interfaces allows users to easily customize the theses templates. Its basic macro package `easybase` can also be used with `ctex` and standard document classes.
diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx
index 30f7860795..87629837bb 100644
--- a/macros/latex/contrib/easybook/easybook.dtx
+++ b/macros/latex/contrib/easybook/easybook.dtx
@@ -14,7 +14,7 @@
% This work has the LPPL maintenance status `maintained'.
%<class|package>\NeedsTeXFormat{LaTeX2e}[2021/11/15]
%<*class>
-\ProvidesExplClass{easybook}{2024/08/14}{2024dj}
+\ProvidesExplClass{easybook}{2024/10/02}{2024ed}
{Easily typesetting Chinese theses or books}
\bool_new:N \l__eb_compile_draft_bool
@@ -301,19 +301,16 @@
%</class>
%<*package>
\RequirePackage{etoolbox}
-\ProvidesExplPackage{easybase}{2024/08/14}{2024dj}
+\ProvidesExplPackage{easybase}{2024/10/02}{2024ed}
{Easily typesetting Chinese theses or books}
\cs_generate_variant:Nn \dim_set:Nn { NV }
\cs_generate_variant:Nn \dim_sign:n { V }
\cs_generate_variant:Nn \int_to_arabic:n { v }
\cs_generate_variant:Nn \msg_warning:nnn { nnV }
-\cs_generate_variant:Nn \prop_set_from_keyval:Nn { NV }
\cs_generate_variant:Nn \skip_set:Nn { NV }
-\cs_generate_variant:Nn \seq_set_from_clist:Nn { No }
\cs_generate_variant:Nn \ctex_define:nn { nx }
\cs_generate_variant:Nn \eb_set_hyperref:n { x }
-\cs_generate_variant:Nn \eb_at_begin_environment:nn { o }
\cs_generate_variant:Nn \tl_if_novalue:nF { V }
\cs_set_protected:Npn \ctex_define:nn #1
@@ -327,11 +324,6 @@
{ \AddToHook{cmd/#1/before}{#2} }
\cs_new_protected:Npn \eb_appto_cmd:nn #1#2
{ \AddToHook{cmd/#1/after}{#2} }
-\cs_new_protected:Npn \eb_at_begin_environment:nn #1#2
- {
- \clist_map_inline:nn {#1}
- { \AtBeginEnvironment{##1}{#2} }
- }
\cs_set_protected:Npn \ctex_before_end_preamble:n
{ \BeforeBeginEnvironment{document} }
\cs_new_protected:Npn \eb_if_package_loaded:nnF #1#2#3
@@ -405,9 +397,13 @@
floatpage .bool_set:N = \l__eb_float_page_bool,
floatpage .default:n = true,
floatpage .initial:n = false,
- theorem .bool_set:N = \l__eb_theorem_support_bool,
- theorem .default:n = true,
- theorem .initial:n = true,
+ theorem .choices:nn =
+ { thmtools,keytheorems,false }
+ { \tl_set:Nn \l__eb_theorem_support_tl {#1} },
+ theorem .value_required:n = true,
+ theorem/true .meta:n = { theorem = thmtools },
+ theorem .default:n = thmtools,
+ theorem .initial:n = thmtools,
paper .code:n = \eb_put_geometry:n {#1},
paper .initial:n = a4paper,
class .choice:,
@@ -416,13 +412,15 @@
{
\bool_set_true:N \l__eb_class_mode_book_bool
\eb_put_geometry:n { twoside }
+ \booltrue{@titlepage}
},
class/article .code:n =
{
\bool_set_false:N \l__eb_class_mode_book_bool
\eb_put_geometry:n { twoside = false }
+ \boolfalse{@titlepage}
},
- class .initial:n = book,
+ class .initial:x = \ifbool{@titlepage}{book}{article},
book .meta:n = { class = book },
article .meta:n = { class = article },
unknown .code:n = \clist_gput_right:NV \g__eb_ctex_options_clist \CurrentOption
@@ -702,18 +700,18 @@
}
\cs_set:Npn \markdouble #1 { \markboth{#1}{\ifbool{@twoside}{#1}{}} }
-\cs_new:Npn \eb@level@markdouble #1#2
+\cs_new_protected:Npn \eb@level@markdouble #1#2
{ \markdouble{\use:c { eb@mark@#1@whole }{#2}} }
-\cs_new:Npn \eb@level@markright #1#2
+\cs_new_protected:Npn \eb@level@markright #1#2
{ \markright{\use:c { eb@mark@#1@whole }{#2}} }
\cs_gset:Npn \chaptermark #1 { \eb@level@markdouble{chapter}{#1} }
-\cs_gset:Npn \sectionmark #1
+\cs_gset:Npx \sectionmark #1
{
\bool_if:NTF \l__eb_class_mode_book_bool
{ \eb@level@markright{section}{#1} }
{ \eb@level@markdouble{section}{#1} }
}
-\cs_gset:Npn \subsectionmark #1
+\cs_gset:Npx \subsectionmark #1
{
\bool_if:NF \l__eb_class_mode_book_bool
{ \eb@level@markright{subsection}{#1} }
@@ -805,25 +803,14 @@
\UseFntSymbsList{empty}
\cs_set_eq:NN \DefineFntSymbols \SetFntSymbsList
\cs_set_eq:NN \setfntsymbol \UseFntSymbsList
-\cs_new:Npn \eb_int_type_trans:NN #1
- {
- \str_case:nn {#1}
- {
- { A } { \int_to_Alph:n }
- { a } { \int_to_alph:n }
- { 1 } { \int_to_arabic:n }
- { I } { \int_to_Roman:n }
- { i } { \int_to_roman:n }
- { c } { \exp_args:NV \zhnumber }
- { s } { \eb_int_to_symbols:n }
- }
- }
+\tl_new:N \l__eb_fnmarktext_tmpa_tl
+\tl_new:N \l__eb_fnmarktext_tmpb_tl
\cs_new_protected:Npn \eb_fnmarktext_normal_label_set:Nn #1#2
{
- \tl_set:Nn \l__eb_fnmarktext_number_type_tl {#2}
+ \tl_set:Nn \l__eb_fnmarktext_tmpa_tl {#2}
\cs_set:Npx #1
{
- \str_case:VnT \l__eb_fnmarktext_number_type_tl
+ \str_case:VnT \l__eb_fnmarktext_tmpa_tl
{
{ plain }
{ \exp_not:N \int_use:N }
@@ -841,18 +828,33 @@
\cs_set_eq:NN \thedownfootnote \thefootnote
}
\cs_generate_variant:Nn \msg_warning:nnnn { nnnV }
+\cs_new:Npn \eb_footnote_int_trans:n #1
+ {
+ \prop_item:Nn \l__eb_int_trans_cmds_prop {#1}
+ \exp_not:N \c@footnote
+ }
+\prop_set_from_keyval:Nn \l__eb_int_trans_cmds_prop
+ {
+ A = \exp_not:N \int_to_Alph:n,
+ a = \exp_not:N \int_to_alph:n,
+ 1 = \exp_not:N \int_to_arabic:n,
+ I = \exp_not:N \int_to_Roman:n,
+ i = \exp_not:N \int_to_roman:n,
+ c = \exp_not:n { \exp_args:NV \zhnumber },
+ s = \exp_not:N \eb_int_to_symbols:n
+ }
\cs_new_protected:Npn \eb_fnmarktext_short_label_set:Nn #1#2
{
- \tl_set:Nn \l__eb_fnmarktext_short_tokens_tl {#2}
+ \tl_set:Nn \l__eb_fnmarktext_tmpb_tl {#2}
\clist_map_inline:nn
{ A,a,1,I,i,c,s }
{
\regex_match:nnTF {##1} {#2}
{
\regex_replace_once:nnN {##1}
- { \c{eb_int_type_trans:NN} ##1 \c{c@footnote} }
- \l__eb_fnmarktext_short_tokens_tl
- \cs_set_eq:NN #1 \l__eb_fnmarktext_short_tokens_tl
+ { \c{eb_footnote_int_trans:n}\0 }
+ \l__eb_fnmarktext_tmpb_tl
+ \cs_set:Npx #1 { \l__eb_fnmarktext_tmpb_tl }
\clist_map_break:
}
{
@@ -964,7 +966,11 @@
\str_case:VnT \l__eb_fnt_parent_counter_tl
{
{ part } { \counterwithin*{footnote}{part} }
- { page } { \counterwithin*{footnote}{page} }
+ { page }
+ {
+ \RequirePackage{zref-perpage}
+ \zmakeperpage{footnote}
+ }
}
{ \counterwithout*{footnote}{chapter} }
}
@@ -1107,13 +1113,12 @@
\l__eb_fnpara_format_tl{#1}
\tl_if_eq:NnT \l__eb_footnote_value_tl { hang } { \par }
}
-\cs_new_protected:Npn \setspread #1 { \linespread{#1}\selectfont }
\clist_map_inline:nn { \@footnotetext,\@mpfootnotetext }
{
\eb_patch_cmd:Nnn #1
{ \reset@font }
{
- \setspread{\eb@spread@footnote}
+ \usestretch{\eb@spread@footnote}
\eb@font@footnote
}
}
@@ -1697,6 +1702,7 @@
\tl_set:cn { ttll@#2 } {#1}
}
\contentsuse{lstlisting}{lol}
+\cs_set:Npn \hytoclink #1 { \Hy@toclinkstart #1\Hy@toclinkend }
\seq_put_left:Nn \c__ctex_headings_seq { chapter }
\seq_put_right:Nn \c__ctex_headings_seq { table }
\seq_put_right:Nn \c__ctex_headings_seq { figure }
@@ -1750,7 +1756,7 @@
\bool_if:NTF \l__eb_toc_entry_hang_bool
{ \IfBooleanTF{##3}{\use:n}{\contentspush} }
{ \use:n }
- { ##1\tl_use:c { l__eb_toc_##2_after_tl } }
+ { \hytoclink{##1}\tl_use:c { l__eb_toc_##2_after_tl } }
},
tocafter = \hspace{1em},
tocsep = .—,
@@ -1849,8 +1855,6 @@
hang .initial:n = true,
pagenumwd .code:n = \contentsmargin{#1},
pagenumwd .initial:n = 1.55em,
- fileopen .tl_set:N = \l__eb_fileopen_type_tl,
- fileopen .initial:n = once,
unknown .code:n = \eb_msg_deprecated_option:n { toc }
}
@@ -1871,21 +1875,13 @@
\group_begin:
\makeatletter
\file_if_exist_input:n { \jobname.#1 }
- \UseHookWithArguments{starttoc/after}{1}{#1}
+ \AddToHook{enddocument/afterlastpage}
+ {\UseHookWithArguments{starttoc/after}{1}{#1}}
\boolfalse{@nobreak}
\group_end:
}
{ \eb@starttoc{#1} }
}
-\AddToHook{enddocument/afterlastpage}
- {
- \tl_if_eq:NnTF \l__eb_fileopen_type_tl { once }
- { \iow_now:Nn \@mainaux { \RemoveFromHook{starttoc/after}[*] } }
- {
- \IfHookEmptyTF{starttoc/after}{}
- {\iow_now:Nn \@mainaux { \RemoveFromHook{starttoc/after}[aux] }}
- }
- }
\cs_set_protected:Npn \AssignPartialExt #1#2
{
\tl_if_exist:cTF { ttl@partial#1 }
@@ -2069,19 +2065,46 @@
}
\cs_set_eq:NN \addtosubfont \ebaddtofont
+\cs_new_protected:Npn \usestretch #1
+ {
+ \edef\baselinestretch{#1}
+ \@currsize
+ }
+\cs_set_eq:NN \setspread \usestretch
+\cs_new_protected:Npn \restore@usespace
+ {
+ \par
+ \vskip\parskip
+ \vskip\baselineskip
+ \endgroup
+ \vskip -\parskip
+ \vskip -\baselineskip
+ }
+\NewDocumentEnvironment{usespace}{m+b}
+ {
+ \par
+ \begingroup
+ \usestretch{#1}#2
+ \restore@usespace
+ }{}
+\msg_new:nnn { easybase } { invalid-spread }
+ {
+ The~line~spacing~factor~option~'#1'~is~invalid. \\
+ Please~use~the~'usespace'~environment~to~set~the~line~spacing.
+ }
+\cs_new_protected:Npn \eb_invalid_spread_warning:
+ { \msg_warning:nnV { easybase } { invalid-spread } \l_keys_key_str }
\ctex_define:nn { space }
{
- linespread .code:n = \setspread{#1},
- tabspread .fp_set:N = \l__eb_spread_table_fp,
- tabspread .initial:n = 1.2,
- mathspread .tl_set:N = \eb@spread@math,
- mathspread .initial:n = 1.2,
+ linespread .code:n = \usestretch{#1},
+ tabspread .code:n = \eb_invalid_spread_warning:,
+ mathspread .code:n = \eb_invalid_spread_warning:,
fntspread .code:n =
{
\tl_set:Nn \eb@spread@footnote {#1}
\group_begin:
\footnotesize
- \setspread{\eb@spread@footnote}
+ \usestretch{\eb@spread@footnote}
\exp_args:NNNo \group_end:
\dim_set:Nn \footnotesep { \dim_use:N \box_ht:N \strutbox }
},
@@ -2097,8 +2120,8 @@
caption-spread .initial:n = 1.2,
everyspread .meta:n =
{
- linespread = {#1},tabspread = {#1},mathspread = {#1},
- caption-spread = {#1},fntspread = {#1}
+ linespread = {#1},caption-spread = {#1},
+ fntspread = {#1}
},
abovedisplayskip .code:n =
{ \AfterPreamble{\skip_set:Nn \abovedisplayskip {#1}} },
@@ -2117,14 +2140,8 @@
\tl_if_eq:NnT \l__ctex_scheme_tl { chinese }
{
\fp_compare:nNnTF { \l__ctex_line_spread_fp } = { 1.3 }
- {
- \ctex_set:nn { space }
- { linespread = 1.354,tabspread = 1.354 }
- }
- {
- \ctex_set:nn { space }
- { linespread = \fp_use:N \l__ctex_line_spread_fp }
- }
+ { \usestretch{1.354} }
+ { \usestretch{\fp_use:N \l__ctex_line_spread_fp} }
}
\AfterPreamble{\skip_set:Nn \abovedisplayshortskip { 0ex plus .1ex }}
@@ -2155,7 +2172,7 @@
{
\DeclareCaptionFont{eb@#1@font}
{
- \setspread{\fp_use:c { l__eb_spread_caption_#1_fp }}
+ \usestretch{\fp_use:c { l__eb_spread_caption_#1_fp }}
\tl_use:c { l__eb_font_caption_#1_tl }
}
}
@@ -2175,9 +2192,6 @@
\captionsetup[figure][bi-second]{name = Figure}
\captionsetup[table][bi-second]{name = Table}
}
-\eb_at_begin_environment:nn
- { tabular,tabularx,longtable }
- { \setspread{\fp_use:N \l__eb_spread_table_fp} }
\UseTblrLibrary{booktabs}
\bool_if:NF \l__eb_float_page_bool
@@ -2328,24 +2342,46 @@
\tl_clear:N \l__eb_eqsymb_intro_tl
\ignorespaces
}
-\bool_if:NT \l__eb_theorem_support_bool
+\cs_new:Npn \eb_tl_exist_noempty:cT #1#2
+ { \tl_if_exist:cT {#1} { \tl_if_empty:cF {#1} {#2} } }
+\cs_new:Npn \eb_undefine_counter:n #1
+ {
+ \cs_undefine:c { c@#1 }
+ \cs_undefine:c { the#1 }
+ \exp_args:Nc \providecommand { c@@ckpt }{}
+ \@removefromreset{#1}{@ckpt}
+ }
+\ProvideDocumentCommand{\declarecounter}{mo}
+ {
+ \eb_undefine_counter:n {#1}
+ \IfValueTF{#2}{\newcounter{#1}[#2]}{\newcounter{#1}}
+ }
+\cs_new_protected:Npn \eb_theorem_load_thmtools:
{
\RequirePackage{amsthm,thmtools}
\cs_set_eq:NN \eb@declaretheoremstyle@save \declaretheoremstyle
\cs_set_eq:NN \eb@declaretheorem@save \declaretheorem
\RenewDocumentCommand{\declaretheoremstyle}{+O{}m+O{}}
- {\eb@declaretheoremstyle@save[#1,#3]{#2}}
+ {\eb@declaretheoremstyle@save[##1,##3]{##2}}
\RenewDocumentCommand{\declaretheorem}{+O{}m+O{}}
{
- \eb@declaretheorem@save[style = default,#1,#3]{#2}
- \settheoremtocline{#2}
+ \cs_undefine:c {##2}
+ \eb_undefine_counter:n {##2}
+ \eb_tl_exist_noempty:cT { g__eb_thmt_##2_parent_tl }
{
- \listnumberline{#2}
+ \exp_args:Nnv \@removefromreset {##2}
+ { g__eb_thmt_##2_parent_tl }
+ }
+ \eb@declaretheorem@save[style = default,##1,##3]{##2}
+ \tl_gset:cV { g__eb_thmt_##2_parent_tl } \thmt@parent
+ \settheoremtocline{##2}
+ {
+ \listnumberline{##2}
\thmtname\thmtifnote{~(\thmtnote)}{}
}
- \cs_gset:cpn { thmt@contentsline@#2 }
+ \cs_gset:cpn { thmt@contentsline@##2 }
{ \thmt@contentslineIfNamed }
- \exp_args:Nc \providecommand { p@#2 }[1]{##1}
+ \exp_args:Nc \providecommand { p@##2 }[1]{####1}
}
\ctex_define:nn { thmt }
{
@@ -2363,14 +2399,13 @@
bodyfont = \normalfont,
postheadspace = 1em
]
- \theoremstyle{default}
- \cs_undefine:N \proof
\DeclareFloatList{theorem}{loe}
\AssignPartialExt{loe}{ple}
\eb_preto_cmd:nn { listoftheorems }
{
\group_begin:
- \def\contentsline #1 {\use:c { thmt@contentsline@#1 }{#1}}
+ \let\thmt@contentsline\contentsline
+ \def\contentsline ##1 {\use:c { thmt@contentsline@##1 }{##1}}
}
\eb_appto_cmd:nn { listoftheorems } { \group_end: }
\eb_preto_cmd:nn { @chapter }
@@ -2382,21 +2417,34 @@
\def\thmtname{\thmt@thmname}
\def\thmtenvname{\thmt@envname}
\def\thmtnote{\thmt@shortoptarg}
- \def\thmtformatoptarg #1 {#1}
- \def\thmtifname #1#2 {\ifbool{thmt@isstarred}{#2}{#1}}
- \def\thmtifnote #1#2
+ \def\thmtformatoptarg ##1 {##1}
+ \def\thmtifname ##1##2 {\ifbool{thmt@isstarred}{##2}{##1}}
+ \def\thmtifnote ##1##2
{
\tl_if_empty:NTF \thmt@shortoptarg
- {#2}
- { \protect\thmtformatoptarg{#1} }
+ {##2}
+ { \protect\thmtformatoptarg{##1} }
}
\NewDocumentCommand{\settheoremtocline}{smm}
{
- \IfBooleanT{#1}{\def\thmt@contentslineIgnore{\thmt@contentsline}}
- \cs_set:cpn { ll@#2 } { \@bsphack #3\@esphack }
+ \IfBooleanT{##1}{\def\thmt@contentslineIgnore{\thmt@contentsline}}
+ \cs_set:cpn { ll@##2 } { \@bsphack ##3\@esphack }
}
}
-
+\cs_new_protected:Npn \eb_theorem_load_keytheorems:
+ {
+ \RequirePackage{keytheorems}
+ \DeclareFloatList{theorem}{thlist}
+ \AssignPartialExt{thlist}{ple}
+ }
+\str_case:VnT \l__eb_theorem_support_tl
+ {
+ { thmtools }
+ { \eb_theorem_load_thmtools: }
+ { keytheorems }
+ { \eb_theorem_load_keytheorems: }
+ }
+ { \cs_undefine:N \proof }
\setchemformula
{
math-scripts = false,
@@ -2415,30 +2463,6 @@
group-digits = none
}
}{}
-\eb_at_begin_environment:nn
- {
- array,matrix,pmatrix,bmatrix,Bmatrix,vmatrix,Vmatrix,
- matrix*,pmatrix*,bmatrix*,Bmatrix*,vmatrix*,Vmatrix*,
- cases,cases*,dcases,dcases*,rcases,rcases*,drcases,drcases*,
- aligned,alignedat,gathered,multlined,lgathered,rgathered
- }
- { \setspread{\eb@spread@math} }
-\clist_map_inline:nn
- { \start@gather,\start@align,\start@multline }
- {
- \eb_patch_cmd:Nnn #1
- { \collect@body }
- {
- \setspread{\eb@spread@math}
- \collect@body
- }
- }
-\eb_patch_cmd:Nnn \gather@split
- { \spread@equation }
- {
- \setspread{\eb@spread@math}
- \spread@equation
- }
\ctex_at_end_package:nn { unicode-math }
{ \msg_redirect_module:nnn { unicode-math } { warning } { info } }
\ctex_at_end_package:nn { tcolorbox }
@@ -2459,7 +2483,6 @@
bititle .initial:n = Bibliography,
unknown .code:n = \eb_msg_deprecated_option:n { bib }
}
-
\cs_new_protected:Npn \eb_bibtex_natbib_set:
{
\RequirePackage[sort&compress]{natbib}
@@ -2742,6 +2765,8 @@
lstlistingname = 代码,
listtheoremname = 定理清单
}
+ \ctex_at_end_package:nn { keytheorems }
+ { \keytheoremlistset{title = 定理清单} }
}
{
\keys_set_known:nn { ctex }
@@ -2794,15 +2819,18 @@
{
\renewcommand{\theupfootnote}{\@fnsymbol\c@footnote}
\renewcommand{\thefootnote}{\@fnsymbol\c@footnote}
+ \let\footnote\thanks
}
{}
- \LARGE\@title\par\vskip 3em
- \large
+ \bgroup\LARGE\@title\par\egroup
+ \notbool{@titlepage}{\vskip 1.5em}{\vskip 3em}
+ \bgroup\large
\begin{tabular}[t]{c}
\@author
- \end{tabular}\par\vskip 1.5em
- \@date
- \notbool{@titlepage}{\par\vskip 1.5em}{}
+ \end{tabular}\par\egroup
+ \notbool{@titlepage}{\vskip 0.75em}{\vskip 1.5em}
+ \bgroup\large\@date\par\egroup
+ \notbool{@titlepage}{\vskip 1.5em}{}
\@thanks
},
beforecode =
@@ -2843,15 +2871,13 @@
}
%</package>
%<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2024/08/14}{2024dj}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2024/10/02}{2024ed}
{Customization of tcolorbox for easybook}
\cs_set_protected:Npn \addtotcbstyle #1#2
{ \tcbset{#1/.append~style = {#2}} }
\cs_set_protected:Npn \deftcbstyle #1#2
{ \tcbset{#1/.style = {#2}} }
-\cs_new_protected:Npn \tcbappstyle
- { \@ifstar{\deftcbstyle}{\addtotcbstyle} }
\deftcbstyle{tc-easyboxi}
{
diff --git a/macros/latex/contrib/easybook/easybook.pdf b/macros/latex/contrib/easybook/easybook.pdf
index 54a5f7024c..8884707b5f 100644
--- a/macros/latex/contrib/easybook/easybook.pdf
+++ b/macros/latex/contrib/easybook/easybook.pdf
Binary files differ
diff --git a/macros/latex/contrib/easybook/easybook.tex b/macros/latex/contrib/easybook/easybook.tex
index 02adc43f5f..ab3b72d1f9 100644
--- a/macros/latex/contrib/easybook/easybook.tex
+++ b/macros/latex/contrib/easybook/easybook.tex
@@ -23,8 +23,8 @@
name = easybook,
color-scheme = blue,
title = EASYBOOK使用手册,
- version = v2024dj,
- date = 2024/08/14,
+ version = v2024ed,
+ date = 2024/10/02,
authors = 瞿毅,
info = 简便地排版中文学位论文或书籍,
email = toquyi@163.com,
@@ -282,8 +282,8 @@ $\blacktriangleright$需要注意正确\textbf{编译索引}要增加 \code{-she
载入用户配置的文件名列表,文件列表以花括号包裹并以英文逗号分隔。文件名应包含如 \code{tex}、\code{def} 或 \code{cfg} 等扩展名。若配置文件不在当前文件夹则文件名需要包含路径,即 \code{path/file.cfg}。
\keychoice{floatpage}{true,\fbox{false}}
开启这个选项后浮动环境 \env{table} 和 \env{figure} 的比例参数会使用默认值。关闭它则尽可能避免出现浮动页,使图表环境与正文段落更加紧凑,减少多余的空白版面。
- \keychoice{theorem}{\fbox{true},false}
- 是否提供定理功能支持。选项开启时定理模块生效,此时会载入 \pkg*{amsthm} 和 \pkg*{thmtools} 宏包。
+ \keychoice{theorem}{\fbox{thmtools},keytheorems,false}\newtagv[Changed]{2024ea}%
+ 是否提供定理功能支持,定理模块的介绍可见\ref{subsec:theorem}。选项 \code{thmtools} 会载入 \pkg*{amsthm} 和 \pkg*{thmtools} 宏包,选项 \code{keytheorems} 会载入 \pkg*{keytheorems} 宏包,选项 \code{false} 不载入定理功能宏包。
\end{cnltxlist}
\subsection{配置字体}
@@ -395,7 +395,7 @@ $\blacktriangleright$需要注意正确\textbf{编译索引}要增加 \code{-she
\keychoice{withpart}{true,\fbox{false}}
使章标题跟随部分计数器编号,仅在导言区有效。当开启新的部分标题时章编号从1开始。
\keychoice{fntnumwith}{part,\fbox{chapter},page}
- 设置脚注跟随编号的计数器,仅在导言区有效。默认跟随章计数器,即开启新的章标题时脚注编号从1开始。
+ 设置脚注重置编号的方式,仅在导言区有效。默认跟随章计数器,即开启新的章标题时脚注编号从1开始。选项 \code{page} 代表的是换页而不是页计数器,这是由于在一些排版情况下换页后页计数器仍为上页的值。
\keychoice{uppercase}{\fbox{all},first,none,none*}
使用 \cs{rightmark} 和 \cs{leftmark} 等标题标记命令获取标题内容用于页眉页脚时其中英文的大小写类型。\code{all} 为标题标记中的英文字母全部大写。\code{first} 为标记以英文起始时仅第一个字母大写。\code{none} 不改变标记中英文字母的大小写形式,变体 \code{none*} 则强制标记的字母均为小写形式。
\kvsplit{tagform}{左括号,右括号}\Default{\Marg{(,)}}
@@ -446,10 +446,6 @@ $\blacktriangleright$需要注意正确\textbf{编译索引}要增加 \code{-she
\begin{cnltxlist}
\keyval{linespread}{数值}\Default{1.354}
正文行距因子。中文主题下行距因子初始值为 \code{1.354}(相当于 \textsf{Word} 的1.25倍行距),如果设置了文类或 \pkg*{ctex} 宏包的全局行距选项 \option{linespread} 则初始值设为它的值。
- \keyval{tabspread}{数值}\Default{1.354}
- 表格内容行距因子,对传统表格 \env{tabular} 和 \env{tabularx} 等环境生效。\pkg*{tabularray} 宏包的 \env{tblr} 环境自带 \option*{stretch} 和 \option*{rowsep} 等行间距选项,这里不做调整。
- \keyval{mathspread}{数值}\Default{1.2}
- 数学环境的行距因子,包含了 \pkg*{amsmath} 和 \pkg*{mathtools} 宏包提供的公式环境。
\keyval{capfig-spread}{数值}\Default{1.2}
图片题注的行距因子。
\keyval{captab-spread}{数值}\Default{1.2}
@@ -462,7 +458,7 @@ $\blacktriangleright$需要注意正确\textbf{编译索引}要增加 \code{-she
脚注内容整体的行距因子。可以使用 \module*{hdr} 模块 \option{fnpara-format} 选项的代码单独覆盖每个脚注的行距,从而使脚注间和内容文本自身的行距不同。
\begin{ctexexam}
\ebspaceset{fntspread = 1.3}
- \ebhdrset{fnpara-format = \linespread{1.2}\selectfont}
+ \ebhdrset{fnpara-format = \usestretch{1.2}}
\end{ctexexam}
\keyval{everyspread}{数值}
统一设置上述所有的行距因子。
@@ -470,6 +466,21 @@ $\blacktriangleright$需要注意正确\textbf{编译索引}要增加 \code{-she
行间公式与上面正文间的额外距离。
\keyval{belowdisplayskip}{弹性长度}\Default{0.5ex plus .1ex minus .1ex}
行间公式与下面正文间的额外距离。
+ \begin{cnltxlist}
+ \command{usestretch}[\marg{数值}]\newtagv{2024dt}%
+ 设置之后文本的行距。可在任意地方使用,作用范围为局部。
+ \environment{usespace}[\marg{数值}]\newtagv{2024dt}%
+ 设置环境内文本的行距。可包含行间公式和表格等环境。
+ \begin{ctexexam}
+ \begin{usespace}{1.5}\nointerlineskip
+ \ebspaceset{belowdisplayskip = 6pt}
+ \begin{align}
+ \cos 2x &= \cos^2 x - \sin^2 x \\
+ &= 2\cos^2 x - 1
+ \end{align}
+ \end{usespace}
+ \end{ctexexam}
+ \end{cnltxlist}
\end{cnltxlist}
\subsection[部件字体]{部件字体\smodule{font}}
@@ -491,7 +502,7 @@ $\blacktriangleright$需要注意正确\textbf{编译索引}要增加 \code{-she
\command{ebaddtofont}[\marg{字体类型}\marg{字体命令}]
用于在上述各种字体原有的格式上附加代码。其中 \meta{字体命令} 也可以包括行距命令且相对于 \module*{space} 模块具有优先性,不同题注的 \meta{字体类型} 则为相应选项的后缀名。
\begin{ctexexam}
- \ebaddtofont{every}{\linespread{1.5}\selectfont}
+ \ebaddtofont{every}{\usestretch{1.5}}
\ebaddtofont{footnote}{\sffamily}
\end{ctexexam}
\end{cnltxlist}
@@ -535,10 +546,10 @@ $\blacktriangleright$需要注意正确\textbf{编译索引}要增加 \code{-she
\subsection[定理]{定理\smodule{thmt}}
\label{subsec:theorem}
-定理模块 \module*{thmt} 由 \pkg*{thmtools} 宏包提供支持,主要提供了定理环境和样式声明两个命令。定理环境声明命令 \cs{declaretheorem} 使用的定理样式由样式声明命令 \cs{declaretheoremstyle} 提供。文档类未预声明任何定理环境,如果声明定理环境时不指定样式,则使用默认定理样式 \code{default},可以对它重新定义。
+定理模块 \module*{thmt} 根据全局选项 \option{theorem} 的设置可以由 \pkg*{thmtools} 或 \pkg*{keytheorems} 宏包提供支持。\pkg*{keytheorems} 宏包使用 \hologo{LaTeX3} 编写,它的定理功能更完善并且提供了 \pkg*{thmtools} 宏包大部分的功能,但发布日期较新(2024年9月)还未被广泛使用,下面主要介绍传统的 \pkg*{thmtools} 宏包的功能。\pkg*{thmtools} 提供了定理环境和样式声明两个命令,文档类未预声明任何定理环境,如果声明定理环境时不指定样式,则使用默认定理样式 \code{default},可以对它重新定义。
\begin{cnltxlist}
- \command{declaretheorem}[\oarg{键值列表1}\marg{环境名}\oarg{键值列表2}]
- 定理环境声明命令。可选参数的 \meta{键值列表1} 与 \meta{键值列表2} 等效,其中常用的选项如下:
+ \command{declaretheorem}[\oarg{键值列表1}\marg{环境名列表}\oarg{键值列表2}]
+ \pkg*{thmtools} 的定理环境声明命令。\pkg*{thmtools} 宏包中此命令实际相当于 \cs{newtheorem},无法强制创建定理环境,这里修复了这个问题。可选参数的 \meta{键值列表1} 与 \meta{键值列表2} 等效,常用的选项如下:
\keyval{name}{定理名}
定理环境的标题名称,默认为英文首字母大写的环境名。
\keychoice{numbered}{no,\fbox{yes},unless unique}
@@ -559,7 +570,7 @@ $\blacktriangleright$需要注意正确\textbf{编译索引}要增加 \code{-she
\tcolorboxenvironment{lemma}{tc-easyboxi}
\end{ctexexam}
\command{declaretheoremstyle}[\oarg{键值列表1}\marg{定理样式}\oarg{键值列表2}]
- 定理样式声明命令,键值列表支持自身以及定理声明命令 \cs{declaretheorem} 的所有选项。可选参数的 \meta{键值列表1} 与 \meta{键值列表2} 等效,其中支持的选项如下:
+ \pkg*{thmtools} 的定理样式声明命令,键值列表支持自身以及定理声明命令 \cs{declaretheorem} 的所有选项。为命令增加了可选参数 \meta{键值列表2},与 \meta{键值列表1} 等效,常用的选项如下:
\keyval{headfont}{字体命令}\Default{\cs*{sffamily}}
定理标题部分(包括题注)的字体,包括字体族、字体系列、字体尺寸和字体形状命令。
\keyval{notefont}{字体命令}\Default{\cs*{sffamily}}
@@ -579,9 +590,7 @@ $\blacktriangleright$需要注意正确\textbf{编译索引}要增加 \code{-she
\kvsplit-{notebraces}{\marg{左括号}\marg{右括号}}\Default{\Marg{(}\Marg{)}}
设置定理题注两边的括号,两个必选参数分别代表左括号和右括号。
\keyval{headformat}{标题排列}
- 定理标题各组成元素的位置排列和格式。定理标题由定理名、编号和题注组成,\meta{标题排列} 中命令 \cs*{NAME}、\cs*{NUMBER} 和 \cs*{NOTE} 分别代表定理名、编号和题注。
- \command{theoremstyle}[\marg{定理样式}]
- 设置其后由 \cs{declaretheorem} 命令声明的定理环境的样式。
+ 定理标题各组成元素的位置排列和格式。定理标题由定理名、编号和题注组成,\meta{标题排列} 中命令 \cs*{NAME}、\cs*{NUMBER} 和 \cs*{NOTE} 分别代表定理名、编号和题注。也可以设置值为 \code{margin} 或 \code{swapnumber},它们的编号均在定理名前方,其中 \code{margin} 的编号在左页边距中。
下面定义一个名为 \code{fancy} 的定理样式用于 \cs{declaretheorem} 的 \option*{style} 选项:
\begin{ctexexam}[labelref = exam:new theorem sty]
@@ -597,9 +606,9 @@ $\blacktriangleright$需要注意正确\textbf{编译索引}要增加 \code{-she
\end{ctexexam}
\begin{cnltxlist}[itemsep = 0ex]
\command{listoftheorems}[\sarg\oarg{键值列表}]\default{}
- \item\key{listoftheorems}{定理目录标题名}
+ \item\key{listtheoremname}{定理目录标题名}
\command{settheoremtocline}[\sarg\marg{环境名}\marg{标题定义}]\newtagv{2024bb}%
- 对 \pkg*{thmtools} 宏包的定理环境目录命令 \cs{listoftheorems} 进行了适配调整,\ref{subsec:directory command} 和\ref{subsec:contents} 中的选项机制均可用,但标题定义选项 \option{tocline} 较为特殊,需用 \cs{settheoremtocline} 命令单独设置。在 \meta{标题定义} 中有三个命令 \cs{thmtname}、\cs{thmtenvname} 和 \cs{thmtnote} 分别代表定理名、定理环境名和题注用于排版目录条目。
+ 对 \pkg*{thmtools} 宏包的定理环境目录命令 \cs{listoftheorems} 进行了适配调整\footnote{也对 \pkg*{keytheorems} 宏包作为兼容提供的这个命令进行了适配。},\ref{subsec:directory command} 和\ref{subsec:contents} 中的选项机制均可用,但标题定义选项 \option{tocline} 较为特殊,需用 \cs{settheoremtocline} 命令单独设置。在 \meta{标题定义} 中有三个命令 \cs{thmtname}、\cs{thmtenvname} 和 \cs{thmtnote} 分别代表定理名、定理环境名和题注用于排版目录条目。
\end{cnltxlist}
\optpath{thmt/}\key{loeskip}{弹性长度}\Default{10pt}
定理目录中每章第一个条目上方增加的垂直距离。与 \CTeX 的表格和图片目录中每章间的条目距离选项 \option*{lotskip} 和 \option*{lofskip} 类似,在 \cls*{article} 模式中此选项失效。
@@ -617,11 +626,21 @@ $\blacktriangleright$需要注意正确\textbf{编译索引}要增加 \code{-she
\thmtname\thmtifnote{[\thmtnote]}{}
}
\end{ctexexam}
+
+ 如果使用 \pkg*{keytheorems} 宏包创建定理环境,它的目录样式同样可以用 \module*{toc} 模块的命令注册后定制,其中 \option{tocline} 可用目录命令自带的 \option{format-code} 选项设置:
+ \begin{ctexexam}
+ \newkeytheorem{corollary}[name = 推论]
+ \contentsuse{corollary}{thlist}
+ \RegisterTocName{corollary}
+ \begin{document}
+ \keytheoremlistset{format-code = \numberline{#2}#1#3}
+ \listofkeytheorems % 在正文中输出定理目录
+ \end{ctexexam}
\end{cnltxlist}
\subsection[页面尺寸]{页面尺寸\smodule{geo}}
\label{subsec:page margins}
-页面尺寸模块 \module*{geo} 用于设置纸张大小和各种页面边距,它将选项交给页面尺寸宏包 \pkg*{geometry} 处理,并且支持它的键值列表,预置的页面尺寸与 \textsf{Word} 的默认值接近。下面列举几种 \pkg*{geometry} 的代表性选项,前面有\hface 符号的选项为额外附加,其它选项可查阅宏包帮助文档。当用此模块设置纸张规格时,会覆盖全局选项 \option{paper} 的设置。
+页面尺寸模块 \module*{geo} 用于设置纸张大小和各种页面边距,它将选项交给页面尺寸宏包 \pkg*{geometry} 处理,支持通用接口 \cs{geometry} 的键值列表,预置的页面尺寸与 \textsf{Word} 的默认值接近。下面列举几种 \pkg*{geometry} 不同键值输入方式的选项,前面有\hface 符号的选项为额外附加,其它选项可查阅宏包帮助文档。当用此模块设置纸张规格时,会覆盖全局选项 \option{paper} 的设置。模块 \module*{geo} 的通用接口命令只能在导言区中使用。
\begin{cnltxlist}[itemsep = 0ex]
\keyval{headruleskip}{页眉线间距}\dtag\Default*{0pt}
\keyval{footruleskip}{页脚线间距}\dtag\Default*{3.5pt}
@@ -638,6 +657,29 @@ $\blacktriangleright$需要注意正确\textbf{编译索引}要增加 \code{-she
vcentering
}
\end{ctexexam}
+
+ \pkg*{geometry} 宏包支持在文档中部改变页面尺寸,提供了新建和保存页面布局的命令。需要注意的是,\pkg*{fancyhdr} 宏包配置页面标记是以文档开始的页面尺寸为参考,若中途更改页面布局后需用标记偏移命令 \cs{fancyhfoffset} 重置参考的尺寸,以确保标记位置正确。
+ \command{newgeometry}[\marg{键值列表}]
+ 在正文中更改页面布局,\meta{键值列表} 为 \pkg*{geometry} 宏包通用接口的各种页面尺寸选项。
+ \command{restoregeometry}
+ 恢复正文开始时的页面布局。
+ \command{savegeometry}[\marg{布局名}]
+ 保存当前页面布局名为 \meta{布局名}。
+ \command{loadgeometry}[\marg{布局名}]
+ 载入保存的名为 \meta{布局名} 的页面布局。
+ \begin{ctexexam}
+ L1
+ \newgeometry{left = 3cm,right = 1cm,bottom = 0.1cm}
+ \savegeometry{L2}
+ L2 (new, saved)
+ \restoregeometry
+ L1 (restored)
+ \newgeometry{margin = 1cm,includefoot}
+ L3 (new)
+ \loadgeometry{L2}
+ \fancyhfoffset{0pt}
+ L2 (loaded)
+ \end{ctexexam}
\end{cnltxlist}
\subsection[图表题注]{图表题注\smodule{cap}}
@@ -710,6 +752,8 @@ $\blacktriangleright$需要注意正确\textbf{编译索引}要增加 \code{-she
\ebhdrset{headrule = {}}
}
\end{ctexexam}
+ \command{pagestyle}[\marg{风格名}]\Default{fancy}
+ 设置 \meta{风格名} 为当前及之后页的页面风格。
\command{fancyhead}[\oarg{位置}\marg{内容}]\default{}
\command{fancyfoot}[\oarg{位置}\marg{内容}]
为了确保页面显示正确,使用 \cs{fancyhead} 和 \cs{fancyfoot} 等命令设置页眉页脚时需要在页边距的命令之后。默认设置的是一个名为 \code{fancy} 的页面风格。\pkg*{fancyhdr} 将页眉页脚分成了左中右和奇数页(odd)、偶数页(even)共12个部分,可选参数中 \code{E} 和 \code{O} 代表偶数和奇数,\code{L}、\code{C} 和 \code{R} 代表左、中和右部分。单面打印时,含有偶数位置的命令无效。
@@ -860,11 +904,13 @@ $\blacktriangleright$需要注意正确\textbf{编译索引}要增加 \code{-she
\newcommand{\seqentry}[2]{#2-#1} % #2为标题内容
\ctexset{chapter/toclabel = \seqentry{#1}}
\end{ctexexam}
+ \command{hytoclink}[\marg{目录条目元素}]\newtagv{2024eb}%
+ 给目录条目元素增加超链接,主要用于 \option{toclabel} 选项中的标签。使用 \pkg*{titletoc} 宏包时条目标题的标签超链接会缺失,这个命令可修复此问题。
\keyval{tocafter}{距离命令}\dtag\Default{\cs*{hspace}\Marg{1em}}
目录条目标签与标题间的代码,默认为插入 \code{1em} 横向距离。
\keyval{tocbelow}{距离命令}\dtag
在目录条目下方执行的代码,可以插入垂直距离等命令。
- \keyval{tocline}{标题定义}\dtag[\textcolor{red}{\sface}]
+ \keyval{tocline}{标题定义}\dtag[\sface]
这个选项在章节标题基础上扩展了浮动环境的题注标题在目录文件中的定义。章节和题注标题选项中参数 \code{\#1} 代表标题编号 \cs*{the}\meta{计数器} 对应的计数器名称,参数 \code{\#2} 则代表相应标题内容。
\begin{ctexexam}
\ctexset
@@ -876,7 +922,7 @@ $\blacktriangleright$需要注意正确\textbf{编译索引}要增加 \code{-she
tocrule = \tocrule[0.6pc](1.1){.}[\zihao{5}],
tocline = \CTEXnumberline{#1}#2
},
- section/toclabel = \contentspush{#1\hspace{0.5em}},
+ section/toclabel = \contentspush{\hytoclink{#1}\hspace{0.5em}},
section/tocrule = \tocrule-{}\makebox[1cm]{\rlap{\thecontentspage}},
toc/pagenumwd = 0pt
}
@@ -892,7 +938,7 @@ $\blacktriangleright$需要注意正确\textbf{编译索引}要增加 \code{-she
\command{contentsuse}[\oarg{目录层次}\marg{条目名}\marg{扩展名}]\newtagv[Changed]{2024ce}%
激活条目类型为 \meta{条目名} 的目录定制功能,目录文件后缀为 \meta{扩展名},若 \meta{扩展名} 为 \code{toc} 则条目会自动激活。可选参数 \meta{目录层次} 为条目在目录中的层次深度,默认值为 \code{-1000},当它大于目录深度计数器 \code{tocdepth} 时不显示。图表等标题的目录条目无深度因此为默认值,章节标题 \module*{part}$\longrightarrow$\module*{subparagraph} 的深度则从 \code{-1} 到 \code{5} 依次递增。需要在激活条目后再使用命令 \cs{RegisterTocName} 注册选项。
\command{DeclareFloatList}[\marg{条目名}\marg{扩展名}]
- 声明一种条目类型的目录命令 \cs*{listof}\meta{条目名}\code{\textcolor{cs}{s}},并且支持\ref{subsec:directory command} 中图表目录命令的机制。使用这个命令要确保将条目加入目录的机制已经存在,例如搭配 \pkg*{newfloat} 宏包创建新的浮动环境。选项前有实心符号 \textcolor{red}{\sface}(仍包含空心符号\hface 选项的性质)表示在声明后可用。下面举一个声明算法环境和对应题注目录的例子:
+ 声明一种条目类型的目录命令 \cs*{listof}\meta{条目名}\code{\textcolor{cs}{s}},并且支持\ref{subsec:directory command} 中图表目录命令的机制。使用这个命令要确保将条目加入目录的机制已经存在,例如搭配 \pkg*{newfloat} 宏包创建新的浮动环境。选项前有实心符号\sface(仍包含空心符号\hface 选项的性质)表示在声明后可用。下面举一个声明算法环境和对应题注目录的例子:
\begin{ctexexam}
\usepackage{newfloat}
\DeclareFloatingEnvironment[
@@ -901,6 +947,7 @@ $\blacktriangleright$需要注意正确\textbf{编译索引}要增加 \code{-she
name = 算法
]{algorithm}
\DeclareFloatList{algorithm}{loa}
+ \begin{document}
\listofalgorithms[multoc] % 在正文中输出双栏算法目录
\end{ctexexam}
\command{AssignCaptionExt}[\marg{条目名}\marg{扩展名}]
@@ -941,7 +988,7 @@ $\blacktriangleright$需要注意正确\textbf{编译索引}要增加 \code{-she
悬挂缩进选项 \option{hang} 使目录条目为悬挂缩进形式。缩进距离为条目标签及其与标题内容间距的长度和。通常情况下会统一设置条目标题是否悬挂缩进,因此这个选项被设计为对所有类型条目生效。
\keyval{lolskip}{弹性长度}\Default{10pt}
代码目录中每章第一个条目上方增加的垂直距离。与 \CTeX 的表格和图片目录中每章间的条目距离选项 \option*{lotskip} 和 \option*{lofskip} 类似,在 \cls*{article} 模式中此选项失效。
- \keyval{between}{格式代码}\dtag[\textcolor{red}{\sface}]
+ \keyval{between}{格式代码}\dtag[\sface]
目录标题与条目内容间的局部钩子(作用于标题下方间距之后),如果是 \cls*{book} 模式则默认插入 \code{-10pt} 垂直距离抵消首行目录的额外垂直间距,这是由于图表和 由 \pkg*{newfloat} 宏包所创建环境的目录默认每使用一次章标题在题注目录中插入 \code{10pt} 距离。除了条目名的键路径外,此选项也可用于 \module*{toc} 路径中,表示章节标题目录标题代码钩子,如果是 \cls*{book} 模式则默认插入 \code{-1pc} 垂直距离。
\keyval{bibetween}{格式代码}
与选项 \option{between} 类似,是英文章节标题目录(如果启用)标题代码钩子。
@@ -949,8 +996,6 @@ $\blacktriangleright$需要注意正确\textbf{编译索引}要增加 \code{-she
将目录页码装进一个右对齐的水平盒子里。这样可以使目录引导线右端对齐并与页码保持一定间距,否则会与页码相连。
\keyval{pagenumwd}{刚性长度}\Default{1.55em}
设置开启 \option{dotalign} 选项时页码水平盒子的宽度。
- \keychoice{fileopen}{\fbox{once},odd}
- 编译文档时打开目录文件进行写入操作的方式,这个选项影响重复使用目录命令时的输出行为。默认只在第一次编译时打开文件,选择 \code{odd} 将仅在奇数次编译时打开文件。
\keyval{tocafter-every}{距离命令}\Default{\cs*{hspace}\Marg{1em}}
统一设置所有类型条目编号与标题间的代码。
\keyval{tocindent-every}{刚性长度}
@@ -976,7 +1021,7 @@ $\blacktriangleright$需要注意正确\textbf{编译索引}要增加 \code{-she
\command{DeclareInstance}[\Marg{easybook}\marg{位置}\Marg{cover}\marg{键值列表}]
封面模板可用 \pkg*{xtemplate} 提供的实例声明命令进行自由定制,\ref{exam:cover instance} 举例说明了定制页面中部的内容。模板由页面上、中和下三个位置的实例组成,它们的 \meta{位置} 名字分别为 \code{top}、\code{middle} 和 \code{bottom}。每个实例的属性可用 \meta{键值列表} 修改,包含的选项如下:
\keyval{content}{实例内容}
- 设置实例内容,可以包含任何记号列表。通常为格式和排版内容的命令,在局部生效。
+ 设置实例内容,可以包含任何记号列表。通常为格式和排版内容的命令,作用范围为局部。
\keyval{beforecode}{实例前代码}
设置实例内容前的代码,可以包含任何记号列表。通常为换页和垂直距离的命令。
\keyval{aftercode}{实例后代码}
@@ -1033,7 +1078,7 @@ $\blacktriangleright$需要注意正确\textbf{编译索引}要增加 \code{-she
\command{listoflstlistings}[\sarg\oarg{键值列表}]
输出代码目录命令。带有星号参数的命令不输出目录标题。
- 如果需要部分而不是全文的目录或其它类型的目录,可以查看 \pkg*{titletoc} 宏包的相关示例。如果需要双语图表目录,可以查看 \pkg*{bicaption} 宏包的相关示例。上面目录命令的可选参数改进了原本单一的功能,也提供了配置命令 \cs{SetTocOuter} 在目录命令外设置选项默认值。
+ 如果需要局部而不是全文范围的目录或其它类型的目录,可以查看\ref{subsec:contents} 和 \pkg*{titletoc} 宏包的相关示例。如果需要双语图表目录,可以查看 \pkg*{bicaption} 宏包的相关示例。上面目录命令的可选参数改进了原本单一的功能,也提供了配置命令 \cs{SetTocOuter} 在目录命令外设置选项默认值。
\command{SetTocOuter}[\marg{键值列表}]
统一设置上述所有目录可选参数的默认值\footnote{由于目录命令通常只在文中使用一次,因此不设计为可以分别指定不同目录的参数。},其中 \meta{键值列表} 的选项如下:
\keyval{level}{标题命令}
@@ -1086,7 +1131,7 @@ $\blacktriangleright$需要注意正确\textbf{编译索引}要增加 \code{-she
\end{cnltxlist}
\subsection{双语章节标题和新建标题}
-双语目录标题命令目前设置了常用的三个级别,它们将中文标题正常输出,并使中英文标题加入双语目录。类似于标准文档类,这三个标题命令分别具有独立的计数器\footnote{默认情况下与普通标题命令共享使用计数器。},并对应 \cs*{the}\meta{计数器} 的值,可以用于 \option{number} 选项更改英文目录中标题的编号格式。这个功能是为国内一些高校的学位论文模板的要求设计,在一般情况和英文模式下\textbf{不需要使用}。
+双语目录标题命令将中文标题正常输出,并使中英文标题加入双语目录。目前设置了常用的三个级别,这个功能是为国内一些高校的学位论文模板的要求设计。类似于标准文档类,这三个标题命令分别具有独立的计数器\footnote{默认情况下与普通标题命令共享使用计数器。},并对应 \cs*{the}\meta{计数器} 的值,可以用于 \option{number} 选项更改英文目录中标题的编号格式。
\begin{cnltxlist}
\command{bichapter}[\sarg\oarg{目录中文标题}\marg{中文标题}\marg{目录英文标题}]
\code{chapter} 章级别的双语目录标题命令,具有独立的 \code{bichapter} 计数器。
@@ -1095,7 +1140,7 @@ $\blacktriangleright$需要注意正确\textbf{编译索引}要增加 \code{-she
\command{bisubsection}[\sarg\oarg{目录中文标题}\marg{中文标题}\marg{目录英文标题}]
\code{subsection} 小节级别的双语目录标题命令,具有独立的 \code{bisubsection} 计数器。
- 它们的星号变体命令使文中标题不编号,但是仍然加入双语目录,若英文标题参数空置那么仅加入中文目录而不加入英文目录,这一特点与 \cs*{chapter}\sarg{} 等命令的行为不太一样,在一些情况下会用到。可选参数是目录中的中文条目,默认与中文标题一致,正文标题过长时可用它设置在目录中显示的标题。默认情况下双语目录条目的格式是一致的,共享使用 \module*{toc} 模块的设置。提供了两个选项 \option{biname} 和 \option{binumber} 修改英文目录章标题条目的名字及编号:
+ 命令的星号参数使正文中的标题不编号,但是仍然加入双语目录,若英文标题为空那么仅加入中文目录,这一特点与 \cs*{chapter}\sarg{} 等命令的行为不太一样,在一些情况下会用到。可选参数是目录中的中文条目,默认与中文标题一致,正文标题过长时可用它设置在目录中显示的标题。默认情况下双语目录条目的格式是一致的,共享使用 \module*{toc} 模块的设置。提供了两个选项 \option{biname} 和 \option{binumber} 修改英文目录章标题条目的名字及编号:
\optpath{chapter/}\kvsplit+{biname}{英文目录前名字,英文目录后名字}\Default{Chapter\cs*{space}}
更改英文目录 \code{chapter} 级别的标题条目编号前后名字,类似于 \CTeX 的 \option*{name} 选项。
\optpath{chapter/}\key{binumber}{英文目录编号输出命令}\Default{\cs*{arabic}\Marg{chapter}}
@@ -1203,9 +1248,10 @@ $\blacktriangleright$需要注意正确\textbf{编译索引}要增加 \code{-she
\end{cnltxlist}
\subsection{列表}
+列表宏包 \pkg*{enumitem} 为系统预置的三个列表环境提供了灵活的标签以及间距控制。
\begin{cnltxlist}
\command{setlist}[\sarg\splitoarg{列表类型,级别}\marg{键值列表}]
- 列表宏包 \pkg*{enumitem} 为系统预置的三个列表环境提供了灵活的标签以及间距控制,这是设置列表环境的通用接口命令。带有星号参数的命令在原有格式上补充。\meta{列表类型} 是排序列表 \code{enumerate}、常规列表 \code{itemize} 和主题列表 \code{description} 三个基本类型,也可以是 \cs{newlist} 新建的定理环境,若不指定则设置所有列表类型的格式。若不指定 \meta{级别} 则设置所有列表级别的格式。
+ 设置列表环境的通用接口命令。带有星号参数的命令在原有格式上补充。\meta{列表类型} 是排序列表 \code{enumerate}、常规列表 \code{itemize} 和主题列表 \code{description} 三个基本类型,也可以是 \cs{newlist} 新建的定理环境,若不指定则设置所有列表类型的格式。若不指定 \meta{级别} 则设置所有列表级别的格式。
\command{newlist}[\marg{列表名}\marg{列表类型}\marg{最大级别}]
克隆基本的 \meta{列表类型} 在其基础上新建一个名为 \meta{列表名} 的列表环境。不要将 \meta{最大级别} 设置过大以避免创建过多的计数器和相关宏。
\begin{ctexexam}
@@ -1247,9 +1293,10 @@ $\blacktriangleright$需要注意正确\textbf{编译索引}要增加 \code{-she
\end{cnltxlist}
\subsection{代码}
+代码抄录宏包 \pkg*{listings} 提供了完善的代码排版功能,并且不需要前端处理器。
\begin{cnltxlist}
\command{lstdefinestyle}[\marg{代码风格}\marg{键值列表}]
- 代码抄录宏包 \pkg*{listings} 提供了完善的排版功能,不需要前端处理器。这是它的代码风格定义命令,提供大量选项对代码样式进行高度定制。可以根据需要的代码语言定义多种风格,默认使用的 \meta{代码风格} 为适用于\TeX 语言的 \code{lst-latex}。
+ 代码风格定义命令,提供大量选项对代码样式进行高度定制。可以根据需要的代码语言定义多种风格,默认使用的 \meta{代码风格} 为适用于\TeX 语言的 \code{lst-latex}。
\command{lstinline}[\oarg{键值列表}\marg{行内代码}]
行内代码抄录命令。较原生的 \cs*{verb} 命令有较大改进,具有代码语言和样式支持。
\environment{lstlisting}[\oarg{键值列表}]
@@ -1349,11 +1396,15 @@ $\blacktriangleright$需要注意正确\textbf{编译索引}要增加 \code{-she
\end{cnltxlist}
\subsection{计数器}
-\begin{cnltxlist}[itemsep = 0ex]
- \command{newcounter}[\marg{计数器}\oarg{父计数器}]\default{}
- \command{setcounter}[\marg{计数器}\marg{整数}]\default{}
+\begin{cnltxlist}
+ \command{newcounter}[\marg{计数器}\oarg{父计数器}]
+ 创建一个初始值为0的计数器。若 \meta{计数器} 已经存在则报错,若指定 \meta{父计数器} 则将它加入 \meta{父计数器} 的递增归零清单。
+ \command{declarecounter}[\marg{计数器}\oarg{父计数器}]\newtagv{2024ed}%
+ 创建一个初始值为0的计数器,与 \cs{newcounter} 的区别是若 \meta{计数器} 已经存在仍会强制创建。
+ \command{setcounter}[\marg{计数器}\marg{整数}]
+ 将计数器的值设定为指定值。
\command{stepcounter}[\marg{计数器}]
- 常用的计数器设置命令。命令 \cs{newcounter} 创建一个初始值为0的新计数器。命令 \cs{setcounter} 将计数器的值设定为指定值。命令 \cs{stepcounter} 使计数器的值递增1。
+ 使计数器的值递增1,同时它的递增归零清单中的子计数器值归零。
\command{counterwithin}[\sarg\oarg{格式}\marg{计数器}\oarg{连字符}\marg{父计数器}]
对计数器进行绑定的命令。将 \meta{计数器} 绑定于 \meta{父计数器},即 \meta{父计数器} 的值递增时 \meta{计数器} 的值会归零。输出格式 \cs*{the}\meta{计数器} 被定义为 \cs*{the}\meta{父计数器}\meta{连字符}\meta{格式}\marg{计数器}。\meta{格式} 一般为更改计数器编号形式的命令,默认为 \cs*{arabic}。带有星号参数的命令仅进行绑定不更改输出格式。
\command{counterwithout}[\sarg\oarg{格式}\marg{计数器}\marg{父计数器}]
@@ -1378,9 +1429,10 @@ $\blacktriangleright$需要注意正确\textbf{编译索引}要增加 \code{-she
\end{cnltxlist}
\subsection{索引}
+\pkg*{imakeidx} 宏包增强了索引的功能,可使用户在制作和排版文档的同时制作一个或多个索引。
\begin{cnltxlist}
\command{indexsetup}[\marg{键值列表}]
- \pkg*{imakeidx} 宏包增强了索引的功能,可使用户在制作和排版文档的同时制作一个或多个索引。这是 \pkg*{imakeidx} 宏包的接口命令,用于设置索引表的整体格式,它的 \option{level} 和 \option{headers} 选项失效。
+ 设置索引表整体格式的通用接口命令,它的 \option{level} 和 \option{headers} 选项失效。
\command{index}[\oarg{索引名}\marg{标签}]
索引标签命令的可选参数可以用不同的 \meta{索引名} 给多个索引表设置标签。
\command{makeindex}[\oarg{键值列表}]
@@ -1522,6 +1574,9 @@ $\blacktriangleright$需要注意正确\textbf{编译索引}要增加 \code{-she
\item 使用 \pkg*{xtemplate} 宏包将封面标题命令 \cs{maketitle} 抽象为由实例组成的模板。
\item 新增图表题注模块 \module*{cap}。
\end{version}
+ \shortversion{v = 2024dq,date = 2024/09/16,changes = 修复脚注重置编号的方式为 \code{page} 时在一些换页情况下失败的问题。}
+ \shortversion{v = 2024dt,date = 2024/09/22,changes = 新增用于设置行距的命令 \cs{usestretch} 和环境 \env{usespace}。}
+ \shortversion{v = 2024ea,date = 2024/09/28,changes = 定理模块 \module*{thmt} 支持使用 \pkg*{keytheorems} 宏包。}
\end{changelog}
\nocite{*}
% \AddToHook{cmd/printindex/before}{\clearpage}
diff --git a/macros/latex/contrib/edmaths/README.md b/macros/latex/contrib/edmaths/README.md
index a850f29c6b..4647d361eb 100644
--- a/macros/latex/contrib/edmaths/README.md
+++ b/macros/latex/contrib/edmaths/README.md
@@ -1,5 +1,5 @@
# `edmaths` Report & Thesis Class
-A report and thesis stylesheet for easier compliance with the [university’s typesetting rules](https://www.ed.ac.uk/academic-services/students/thesis-submission). See also the [_documentation_](https://foggalong.github.io/edinburgh-math-latex/edmaths-docs.pdf) and a [_compiled example_](https://foggalong.github.io/edinburgh-math-latex/example-report.pdf). To use, place the files and store them either with your .tex file(s) or in any directory that's findable by LaTeX (e.g. `$TEXINPUTS`).
+A report and thesis stylesheet for easier compliance with the [university's typesetting rules](https://www.ed.ac.uk/academic-services/students/thesis-submission). See also the [_documentation_](https://foggalong.github.io/edinburgh-math-latex/edmaths-docs.pdf) and a [_compiled example_](https://foggalong.github.io/edinburgh-math-latex/example-report.pdf). To use, place the files and store them either with your .tex file(s) or in any directory that's findable by LaTeX (e.g. `$TEXINPUTS`).
For more information on the wider project, including the beamer theme, [see GitHub](https://github.com/Foggalong/edinburgh-math-latex). The stylesheet [edmaths.sty](edmaths.sty) is provided under the [LaTeX Project Public License v1.3c](https://choosealicense.com/licenses/lppl-1.3c/) (LPPL) while the example [example-report.tex](example-report.tex) is provided under the [BSD Zero Clause License](https://choosealicense.com/licenses/0bsd/) (0BSD).
diff --git a/macros/latex/contrib/edmaths/edmaths-docs.pdf b/macros/latex/contrib/edmaths/docs/edmaths-docs.pdf
index cd62935fcd..b0839ecd16 100644
--- a/macros/latex/contrib/edmaths/edmaths-docs.pdf
+++ b/macros/latex/contrib/edmaths/docs/edmaths-docs.pdf
Binary files differ
diff --git a/macros/latex/contrib/edmaths/docs/edmaths-docs.tex b/macros/latex/contrib/edmaths/docs/edmaths-docs.tex
new file mode 100644
index 0000000000..d4a86affb4
--- /dev/null
+++ b/macros/latex/contrib/edmaths/docs/edmaths-docs.tex
@@ -0,0 +1,282 @@
+\documentclass[12pt]{article}
+
+% This is documentation for the `edmaths` LaTeX package, maintained by
+% Josh Fogg for the University of Edinburgh. This file closely builds on
+% that provided Alan Munn for the MSU Thesis Class, `msu-thesis`. The
+% original documentation is licensed under LaTeX Project Public License
+% (LPPL) version 1.3 or later, and this documentation is licensed under
+% the LLP version 1.3c. For more information, see the GitHub repository:
+% https://github.com/Foggalong/edinburgh-math-latex
+
+\def\msuversion{0.99}
+\def\msudate{2024-08-30}
+\title{\textbf{Using the \pkg{edmaths} Report \& Thesis Class}}
+\author{\textbf{Josh Fogg}\\School of Mathematics\\The University of Edinburgh\\\texttt{\href{mailto:j.fogg@ed.ac.uk}{j.fogg@ed.ac.uk}}}
+\date{Version \msuversion\\\msudate}
+
+% basic formatting tweaks
+\usepackage[lmargin=2cm,rmargin=2cm,tmargin=3cm,bmargin=2cm]{geometry}
+\usepackage[colorlinks=true]{hyperref}
+\usepackage{enumitem}
+
+% use same fourier font available through edmaths
+\usepackage{cmap}
+\usepackage{fourier}
+\usepackage[T1]{fontenc}
+\usepackage{microtype}
+
+% setup syntax highlighting
+\usepackage{highlightlatex}
+\definecolor{whiteF0}{HTML}{F0F0F0}
+\lstset{
+ % external padding
+ aboveskip=.4em,
+ belowskip=-.2em,
+ xleftmargin=.03\textwidth,
+ xrightmargin=.03\textwidth,
+ % basic formatting
+ backgroundcolor=\color{whiteF0},
+ showstringspaces=false,
+ columns=fixed,
+ basewidth=.5em,
+ basicstyle={\fontfamily{zlmtt}\selectfont},
+ breaklines=true
+}
+
+
+% change new paragraph behaviour to no-indent and a linebreak
+\usepackage[parfill]{parskip}
+
+
+\newcommand\pkg[1]{\href{https://www.ctan.org/pkg/#1}{\color{teal}\lstinline{#1}}}
+\newcommand\key[1]{{\color{orange}\lstinline|#1|}}
+
+
+\begin{document}
+\maketitle
+\thispagestyle{empty}
+
+\section{Introduction}
+
+This is a package for use when writing reports or thesis for the \href{https://www.maths.ed.ac.uk/}{School of Mathematics} at the \href{https://www.ed.ac.uk/}{University of Edinburgh}. It provides an easy way to generate a document in \LaTeX{} which meets all the basic formatting requirements laid out by the \href{https://www.ed.ac.uk/academic-services/students/thesis-submission}{University's typesetting rules}. This means you can focus on your actual writing, rather than worrying about font spacing, margins sizes, {\it etc}.
+
+\section{Initial Setup}
+
+While this package can in theory work with many different document classes, it is designed to best work with the \pkg{report} class which should be available with any \TeX{} distribution. It can be used with any \LaTeX{} engine, including pdfLaTeX, XeTeX, or LuaTeX. While it should work with any reasonably up-to-date TeX distribution, it is tested with 2020 and later.
+
+The essential steps to setup are then:
+\begin{enumerate}
+ \item Choose a document class using \lstinline|\documentclass[<options>]{report}|, with \key{<options>}
+ \begin{enumerate}
+ \item for font size, one of \key{10pt} (default), \key{11pt}, and \key{12pt};
+ \item for sidedness, one of \key{oneside} (default) and \key{twoside}.
+ \end{enumerate}
+ \item Define information for the title page using \lstinline|\title{...}|, \lstinline|\author{...}|, and \lstinline|\date{...}|.
+ \item Load the \pkg{edmaths} package using \lstinline|\usepackage[<options>]{edmaths}|.
+\end{enumerate}
+These steps {\bf must} be done in exactly this order or the compiler will throw errors.
+
+The loading \pkg{edmaths} also loads the packages \pkg{amsmath}, \pkg{amsthm}, \pkg{amscd}, and \pkg{amssymb}, which are required by almost all mathematical publications. Through \pkg{setspace}, line spacing settings are available that only affect the body text and not footnotes and captions.
+
+The basic package has no other special requirements, but if you have certain additional packages installed then you can use some fancifying options (see below).
+
+\section{Package Options}
+
+When loading \pkg{edmaths} with
+\begin{lstlisting}
+\usepackage[<options>]{edmaths}
+\end{lstlisting}
+we can supply additional \key{<options>} as a comma-separated list of the following keywords.
+
+\subsection{Report Type}
+
+Exactly one of \key{firstyear}, \key{secondyear}, \key{thirdyear}, \key{fourthyear}, \key{phd}, \key{masterph}, or \key{mastersc} for postgrad projects, or exactly one of \key{mmath} or \key{y4project} for undergraduate projects.
+
+This prints the correct degree name or report type on the cover page. If you do not specify any of these, for example if your desired type is not listed, set \lstinline|\degreetext| manually before including this package. For example
+\begin{lstlisting}
+\newcommand{\degreetext}{Internal Report}
+\end{lstlisting}
+will produce a document labelled as an `Internal Report'.
+
+\subsection{Line Spacing}
+
+At most one of \key{single} (default), \key{onehalf}, or \key{double}. This sets the line spacing of the body text to single, one-half and double spaced, respectively. Check out \pkg{setspace} for custom spacing options.
+
+\subsection{Fonts}
+
+For better or worse, by default it uses \LaTeX's default font, \href{https://en.wikipedia.org/wiki/Computer_Modern}{Computer Modern}. However by specifying at most one of the font options it's to change this.
+
+Using \key{fourier} provides much improved typography by activating the \pkg{fourier} font package (based on Adobe's Utopia family) along with the \pkg{cmap} and \pkg{microtype} packages. All these dependencies must be met to use this option.
+
+Strictly speaking the thesis guidelines require a sans serif font, though it's not typically enforced for mathematics. However, if you do want to use one, \key{cmbright} sets the font to \href{https://tug.org/FontCatalogue/computermodernbright/}{Computer Modern Bright}. This requires the \pkg{cmbright}, \pkg{cmap}, \pkg{microtype}, and \pkg{fontenc} packages.
+
+\subsection{Links}
+
+Using \key{hyperref} creates a PDF output with clickable, all-black links. This depends on \pkg{hyperref} and \pkg{xcolor}. The packages are set up with sane default options, but to modify the behaviour, simply use the \lstinline|\hypersetup| command; see the \pkg{hyperref} documentation for details.
+
+If in addition \key{colour} is used, this sets clickable links to have a sane default colour (sepia for internal links, blue for external URLs).
+
+\subsection{Headers}
+
+If the \pkg{fancyhdr} package is installed, using \key{fancyhdr} creates nice page headers and footers (with sane default settings); to modify this behaviour, simply use the commands described in the \pkg{fancyhdr} documentation.
+
+\section{Usage}
+
+Once \pkg{edmaths} is set up, the following additional formatting commands and environments become available:
+
+\begin{itemize}
+ \item \lstinline|\maketitle| to create the cover page,
+ \item \lstinline|\declaration{...}| to create the declaration,
+ \item \lstinline|\dedication{...}| for a dedication page ({\it e.g.\/} `For Alex', not acknowledgements),
+ \item \lstinline|\begin{abstract}...\end{abstract}| for the abstract,
+ \item \lstinline|\begin{laysummary}...\end{laysummary}| for the \href{https://www.ed.ac.uk/sites/default/files/atoms/files/lay_summary_in_theses.pdf}{lay summary},
+ \item \lstinline|\begin{acknowledgements}...\end{acknowledgements}| for any acknowledgements,
+ \item \lstinline|\tableofcontents| for the table of contents.
+\end{itemize}
+
+\subsection{Declarations}
+
+While using \lstinline|\declaration{}| will give you a stock declaration page, in most cases this will need tailoring to the specific of your thesis \href{https://www.ed.ac.uk/sites/default/files/atoms/files/thesis_signed_declaration.pdf}{per university requirements}. For example, if your thesis includes previously-published work, it should be declared on this page.
+
+This can be done by for example,
+\begin{lstlisting}
+\declaration{
+ I declare that this thesis has been composed solely by myself
+ and that it has not been submitted, in whole or in part, in any
+ previous application for a degree. Except where stated otherwise
+ by reference or acknowledgement, the work presented is entirely
+ my own.
+}
+\end{lstlisting}
+
+\subsection{Abstracts}
+
+If you wish to redefine the title of the abstract, this can be done by including
+\begin{lstlisting}
+\renewcommand{\abstractname}{My New Title}
+\end{lstlisting}
+anywhere before \lstinline|\begin{document}|.
+
+\subsection{Long Titles}
+
+If your \lstinline|\title| is quite long and you're using \pkg{fancyhdr}, you may also wish to define a \lstinline|\shorttitle{...}| to prevent wrapping within the header. This {\bf must} be done after loading \pkg{edmaths} else the compiler will throw an error.
+
+\subsection{Year 4 Projects}
+
+When using the \key{y4project} option, the command \lstinline|\yfourdeclaration{...}| can be used right after the abstract to print a declaration at the bottom of that page; the argument of this command is the name of the particular degree.
+
+\subsection{Basic Example}
+
+Below is a simple example of how this might be put together in a year one PhD report.
+
+\begin{lstlisting}
+\documentclass[10pt]{report}
+
+\title{The title of my first year report}
+\author{My name}
+\date{YYYY}
+
+\usepackage[firstyear]{edmaths}
+
+
+\begin{document}
+
+\maketitle
+
+\begin{abstract}
+ My abstract.
+\end{abstract}
+
+\tableofcontents
+
+\chapter{First Chapter}
+
+\section{Section Name}
+
+\chapter{Second Chapter}
+
+\appendix
+
+\chapter{First Appendix}
+
+\end{document}
+\end{lstlisting}
+
+A more complicated example for a PhD thesis is packaged with \pkg{edmaths} and \href{https://github.com/Foggalong/edinburgh-math-latex/blob/main/example-report.tex}{available here}. What this looks like compiled can be \href{https://foggalong.github.io/edinburgh-math-latex/example-report.pdf}{viewed here}.
+
+\section{Additional Tips}
+
+Below is an assortment of additional advice that may be useful when formatting a thesis or report. If you've got additional tips which you think would be useful to share, do share on the \href{https://github.com/Foggalong/edinburgh-math-latex}{GitHub}.
+
+\subsection{Spacing}
+
+When using larger line spacing than single spaced, you might want to single-space your table of contents, {\it etc}. For details, see the documentation for \pkg{setspace}, but to achieve this you could use \lstinline|{\singlespacing\tableofcontents}| and similar for \lstinline|\listoffigures| and \lstinline|\listoftables|.
+
+If you like custom line spacing, place \lstinline|\newcommand{\stretchfactor}{<x>}| before calling this package, where \key{<x>} is the line spacing factor (\key{1} gives single spacing).
+
+Put \lstinline|\flushbottom| right after \lstinline|\begin{document}| to obtain vertically justified pages.
+
+The very ``brave'' can also add \lstinline|\setlength{\parskip}{0pt}| in the preamble to remove any vertical rubber space between paragraphs, thus enforcing a strict grid layout. If you encounter underful boxes, add \lstinline|\vfill| as needed, most likely after headings ({\it e.g.\/} use \lstinline|\chapter{Introduction}\vfill|.).
+
+\subsection{Front Matter}
+
+Use \lstinline|\listoftables| and \lstinline|\listoffigures| to create a reference of all table and figure environments. Some may tell you that this is actually a requirement for a PhD thesis.
+
+Use \lstinline|\pagenumbering{roman}| and \lstinline|\pagenumbering{arabic}| to get different styles of page numbers for the front matter and make it all fancy like.
+
+If desired, use \lstinline|\addcontentsline| to add otherwise unreferenced chapters ({\it e.g.\/} the table of contents itself, the list of figures, the list of tables or the index) to the table of contents.
+
+\subsection{Fonts}
+
+If you don't want to use any of the fonts available by default simply do not specify \key{fourier} or \key{cmbright} option, and instead load \pkg{fontenc}, \pkg{cmap}, \pkg{microtype} and your font package as described in the font package's documentation.
+
+Use the \pkg{ccaption} package to customise the way that captions under figures and tables appear ({\it e.g.\/} if you prefer them to use a sans-serif font).
+
+\subsection{Subtitles}
+
+You may also wish to give your document a subtitle. Be aware that it is ambiguous whether this is allowable in the thesis guidelines, but it may be done by adding formatting commands within the title command, as below.
+
+\begin{lstlisting}
+\title{Underwater Basket Weaving \\
+ \large Analysing the optimal depth for willow rods}
+\author{Author Name}
+\date{YYYY}
+
+\usepackage[phd]{edmaths}
+\end{lstlisting}
+
+If also using \key{fancyhdr}, remember to also add \lstinline|\shorttitle{Underwater Basket Weaving}| after loading \pkg{edmaths} also for consistency with your headers.
+
+\subsection{Overleaf}
+
+As a student or staff member at the University of Edinburgh you have access to \href{https://www.ed.ac.uk/information-services/computing/desktop-personal/software/main-software-deals/other-software/overleaf}{Overleaf Professional}! Do make use of this, it alleviates many of the headaches which come with using \LaTeX{} across multiple computers, which you surely will..
+
+\subsection{Archiving your thesis for the future}
+
+The current version of \pkg{edmaths} class satisfies the typesetting requirements at any one time. Given these requirements change, you may find that if you need to recompile your thesis after you have graduated that the formatting changes. To avoid this, I'd recommend saving an archived version of the \href{https://github.com/Foggalong/edinburgh-math-latex/blob/main/edmaths.sty}{\lstinline|edmaths.sty|} file in the same folder as your thesis file. You only need to do this once you have completely finished your thesis however; there's no need to do it during the writing process.
+
+\section{Troubleshooting}
+
+I'm happy to \href{mailto:j.fogg@ed.ac.uk}{answer emails} or \href{https://github.com/Foggalong/edinburgh-math-latex/issues/new?assignees=&labels=report&projects=&template=report-issue.md&title=}{GitHub issues} about formatting issues with the class, {\bf especially} when you are in the final stages of formatting your dissertation or thesis. God knows that time is already stressful enough as it is. However, please keep in mind:
+
+\begin{itemize}
+ \item I do this as a volunteer on the side of all my other work. This is not something the university pay me for, just something I did because I identified the need.
+
+ \item If you have general \LaTeX{} questions that are not specifically related to \pkg{edmaths}, please try to find answers elsewhere. Both \href{https://tex.stackexchange.com/}{tex.stackexchange.com} and \href{https://www.overleaf.com/learn}{Overleaf} are excellent resources.
+
+ \item Please make sure you have the latest version of \pkg{edmaths}, it may be your issue has already been fixed. If in doubt, check the log file and compare it with \href{https://ctan.org/pkg/msu-thesis?lang=en}{CTAN} and \href{https://github.com/Foggalong/edinburgh-math-latex}{GitHub}.
+
+ \item If you are using \href{https://www.overleaf.com}{Overleaf} , {\bf please} check the log file for errors, and fix them {\it before} you send me a sample document. By default Overleaf produces an output even when the document has lots of errors, so it could be that other errors you haven't noticed are obscuring the problem you're actually trying to fix.
+\end{itemize}
+
+
+
+If you are using the class, please take a moment to fill out my \href{https://forms.gle/bm2AUzthFxW2naK36}{anonymous usage survey}. Thanks! You should be signed into your MSU Google account to access the form, but the form itself is anonymous.
+
+\section{Acknowledgements}
+
+The original \pkg{edmaths} was written by \href{https://github.com/tkoeppe}{Thomas K\"oppe} in 2007 and freely provided under the terms of the \href{https://choosealicense.com/licenses/lppl-1.3c/}{\LaTeX{} Project Public License v1.3c}. From 2020 onwards it has been maintained by \href{https://www.maths.ed.ac.uk/~jfogg/}{Josh Fogg} (me). Thanks also to \href{https://www.linkedin.com/in/adkbeckett}{Andrew Beckett} for his contribution in improving compliance, particularly around declarations which I'd missed entirely.
+
+Thanks to you too for using \pkg{edmaths}! I'd love to hear how you got on working with it, even if there weren't any specific issues. Just \href{mailto:j.fogg@ed.ac.uk}{shoot me an email}, it always makes my day!
+
+\end{document}
diff --git a/macros/latex/contrib/edmaths/edmaths.sty b/macros/latex/contrib/edmaths/edmaths.sty
index e11c515344..cbfd89a5be 100644
--- a/macros/latex/contrib/edmaths/edmaths.sty
+++ b/macros/latex/contrib/edmaths/edmaths.sty
@@ -1,4 +1,4 @@
-%% Package `edmaths' v0.98
+%% Package `edmaths' v0.99
%% File edmaths.sty
%% Copyright 2024 Josh Fogg
%%
@@ -22,7 +22,7 @@
%% This work consists of the file edmaths.sty.
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{edmaths}[2024-08-09 Edinburgh maths thesis/report style v0.98]
+\ProvidesPackage{edmaths}[2024-08-30 Edinburgh maths thesis/report style v0.99]
\RequirePackage{calc,ifthen,setspace,amsmath,amsthm,amscd,amssymb}
@@ -98,7 +98,7 @@
% If with-cmbright selected, use the (sans-serif) Computer Modern Bright font.
\ifthenelse{\boolean{with-cmbright}}{
- % NOTE must be compiled with xelatex or luatex
+ % NOTE if it doesn't compile, make sure you have CM Bright installed!
\RequirePackage{cmap}
\RequirePackage{cmbright}
\RequirePackage[T1]{fontenc}
@@ -255,4 +255,4 @@
\begin{center}
\Large\it #1
\end{center}
-}
+} \ No newline at end of file
diff --git a/macros/latex/contrib/enverb/README.md b/macros/latex/contrib/enverb/README.md
new file mode 100644
index 0000000000..2c035b8eb6
--- /dev/null
+++ b/macros/latex/contrib/enverb/README.md
@@ -0,0 +1,34 @@
+-------------------------------------------------------------------------------
+# `enverb` -- read an environment verbatim
+
+Version 2024-08-28 v1.0
+
+Released under the LaTeX Project Public License v1.3c or later
+See http://www.latex-project.org/lppl.txt
+
+Hosted on the Island of TeX at https://gitlab.com/islandoftex/texmf/enverb
+
+-------------------------------------------------------------------------------
+
+Copyright (C) 2023-2024 Jonathan P. Spratte
+
+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
+ Jonathan P. Spratte
+
+-------------------------------------------------------------------------------
+
+## Summary of Contents
+
+`enverb` provides means to read the contents of a user-defined environment
+verbatim. It also provides facilities to then typeset them inside a
+listing-environment provided by LaTeX or another package or to evaluate them as
+normal LaTeX code. This gives one the full flexibility of LaTeX to customise the
+looks of documentation and examples without the need of any temporary files.
+Additionally you can define your own processing of the contents, either line
+oriented or processing the entire contents at once, however you see fit.
diff --git a/macros/latex/contrib/enverb/doc-enverb.tex b/macros/latex/contrib/enverb/doc-enverb.tex
new file mode 100644
index 0000000000..c0c578f0ef
--- /dev/null
+++ b/macros/latex/contrib/enverb/doc-enverb.tex
@@ -0,0 +1,47 @@
+\subsection{Grabbing an Environment Verbatim}
+\begin{function}{\enverb}
+ \begin{syntax}
+ \cs{enverb}\marg{key=value}\oarg{key=value}
+ \cs{enverb}\meta{*}\marg{key=value}
+ \end{syntax}
+ This function will store the contents of the enclosing environment verbatim
+ inside of \cs{enverbBody}. It should be the last thing you invoke inside the
+ |\begin| code of your environment and mustn't be enclosed in any nested
+ environment. Both the mandatory and the optional \meta{key=value} argument are
+ parsed by \cs{enverb} -- see \autoref{sec:keys} about the specifics of this.
+ The mandatory argument is meant for a package/code developer to assign the
+ sensible default values for the envisioned functionality and always parsed
+ inside the keyset of \cs{enverb}, while the optional one is meant to be used
+ by the user and as such should be the first thing inside the enclosing
+ environment (if the user wants to use an optional argument).\par
+ \cs{enverb} sets the special characters
+ \begingroup
+ \def\do#1%
+ {%
+ \ifx\ #1\else
+ , \texttt{\csname @gobble\expandafter\endcsname\string#1}%
+ \fi
+ }%
+ \csname @secondoftwo\expandafter\endcsname\romannumeral`\^^@\dospecials
+ \endgroup
+ \ to the category code 12 (other), and makes both spaces and tabulators active
+ tokens. By default each line break will be a category code 12 carriage return
+ (character code 13), but see the |eol| option in \autoref{sec:keys}.\par
+ A line that contains only whitespace on input will be output as an empty
+ line.\par
+ The \cs{enverb} syntax of the optional argument has a few peculiarities. It is
+ scanned for the opening bracket either on the same line as the |\begin|
+ statement of the enclosing environment, or on any subsequent line until a
+ non-whitespace character is found. The optional argument is read using the
+ \enquote{normal} (so surrounding) category code regime, but it is scanned for
+ it in a way that the first token is still read verbatim if no optional
+ argument was given.\par
+ The first non-whitespace token that's not an opening bracket must not be found
+ on the same line as the |\begin| statement, and if there was an optional
+ argument there shouldn't be any non-whitespace token trailing it in that line.
+ Additionally there should be no non-whitespace material following the |\end|
+ statement (anything preceding it in the same line is for the most part
+ ignored; |\begin| and |\end| are not balanced, the first |\end| with the
+ correct environment as argument terminates scanning).\par
+ The starred version of \cs{enverb} doesn't search for an optional argument.
+\end{function}
diff --git a/macros/latex/contrib/enverb/doc-examples.tex b/macros/latex/contrib/enverb/doc-examples.tex
new file mode 100644
index 0000000000..043890dc10
--- /dev/null
+++ b/macros/latex/contrib/enverb/doc-examples.tex
@@ -0,0 +1,178 @@
+\subsection{Examples}
+
+The following preamble should work for all of the examples in this section
+(except for the last one, which can be placed as is in the preamble since it
+loads all the packages it needs).
+\begin{ex}[no-tcb]
+ \documentclass{article}
+
+ \usepackage{enverb}
+ \usepackage{color}
+ \usepackage{multicol}
+ \usepackage{listings}
+\end{ex}
+
+\subsubsection{A Boxed Verbatim Display}
+Defining a boxed verbatim macro is pretty simple, we just need to set up the
+|bol| and |eol| hooks such that line breaks are respected, the rest of the setup
+already works with \LaTeX's default definition for active spaces (and tabs).
+\begin{ex}[store,no-tcb]
+ \newenvironment{myenv}
+ {\enverb{bol=\strut, eol=\strut\par}}
+ {%
+ \par
+ \medskip
+ \noindent
+ \fbox
+ {%
+ \parbox
+ {\dimexpr\linewidth-2\fboxsep-2\fboxrule\relax}
+ {%
+ \raggedright\frenchspacing\ttfamily
+ \enverbBody
+ }%
+ }%
+ \par
+ \medskip
+ }
+\end{ex}
+The probably most complicated part there is the calculation of the |\parbox|'s
+width, which is just a line width compensated by the space taken up by |\fbox|.
+
+If we now use this environment we get a nice display of our verbatim contents
+(you might want to play with this and see what happens if your input lines are
+longer than a |\linewidth|; also note that the spaces after |\begin| and |\end|
+are optional just like within the normal category code regime, \envlogo\ will
+still find the end of its scope).
+\begin{ex}[restore]
+ \begin {myenv}
+ \This is a%
+ \begin{environment}
+ that looks \good
+ \end {myenv}
+\end{ex}
+
+\subsubsection{A Page-Breakable Boxed Verbatim Display}
+The previous example was boxed, lets put that to the next level. We can also
+achieve page- (and column-)breakable boxed verbatim environments. The simple
+minded trick here is to draw only line segments at the start and end of each
+line using the |\vrule| primitive. As a result this will look horribly wrong for
+lines longer than a single output line, but that would require too much hassle
+(we just pay attention on our input formatting).
+
+As an added bonus this should have line counters at the start of each line. For
+that we first define a little helper.
+\begin{ex}[store,no-tcb]
+ \newcount\myline
+ \newcommand\linecounting
+ {%
+ \advance\myline1
+ \textcolor[gray]{.7}{\footnotesize\the\myline}%
+ \quad
+ }
+\end{ex}
+Next we can define our environment. The |bol| and |eol| hooks look similar to
+the previous example, but this time they got some added contents for the
+additional formatting. Also, we borrow some code from \LaTeX's starred
+\env{verbatim} to make spaces visible (since they are active in |\enverb| this
+is also pretty straight forward).
+\begin{ex}[store,no-tcb]
+ \newenvironment{myenv}
+ {%
+ \enverb
+ {
+ bol=\noindent\strut\vrule\hskip\fboxsep\linecounting
+ ,eol=\hfill\hskip\fboxsep\vrule\strut\par
+ }%
+ }
+ {%
+ \medskip
+ \hrule
+ \ttfamily\frenchspacing
+ \UseName{@setupverbvisiblespace}\UseName{@vobeyspaces}%
+ \enverbBody
+ \hrule
+ \medskip
+ }
+\end{ex}
+The entire result can then be used with ease.
+\begin{ex}[restore,same-line=.38]
+ \begin{multicols}{2}
+ Text above
+ \begin{myenv}
+ This \is
+ {an} $example$
+ ^of verbatim_
+ input\, being
+ displayed boxed.
+ \end{myenv}
+ Text below
+ \end{multicols}
+\end{ex}
+
+\subsubsection{The Real Deal -- Using the Body Twice}
+All of the above is just pretty playthings that are easily possible with
+\envlogo\ (and with relative few lines of code) though most likely better done
+by more full fledged packages like \pkg{listings} or similar. The original
+reason for all this was to gain control over both the listing and typeset result
+for code documentation. A simple example could be the following:
+\begin{ex}[store,no-tcb]
+ \newenvironment{myenv}
+ {\enverb{}}
+ {%
+ \par\noindent
+ \begin{minipage}{0.48\linewidth}
+ \enverbListing{lstlisting}{}
+ \end{minipage}%
+ \hfill
+ \colorbox{yellow}
+ {%
+ \begin{minipage}{\dimexpr0.48\linewidth-2\fboxsep\relax}
+ \enverbExecute
+ \end{minipage}%
+ }%
+ \par
+ }
+\end{ex}
+Which if used looks like the following (admittedly not that pretty):
+\begin{ex}[restore]
+ \begin{myenv}
+ This%
+ is%
+ great.%
+ \end{myenv}
+\end{ex}
+
+\subsubsection{\envlogo's Style}
+And if you wondered, you guessed it, all examples in this documentation are
+typeset using an \envlogo\ derived environment with a few bells and whistles
+more (for instance collecting material, typesetting the verbatim listing, but
+executing it together with a later code block).
+
+The following is a complete listing of everything that sets up the looks of this
+documentation's example blocks. Note that the macros starting with |\enverb@ex@|
+are not internals of \envlogo\ but exclusive to the code formatting the
+examples.
+\begin{exwrap}{breakable}
+ \footnotesize
+ \lstinputlisting{preamble-examples.tex}
+\end{exwrap}
+
+And if we use that we can do all sorts of interesting things:
+\begingroup
+ \NewEnvironmentCopy{ex2}{ex}
+ \begin{ex2}[same-line=.4]
+ We define a helper:
+ \begin{ex}[store,no-tcb]
+ \newcommand\foo{bar}
+ \end{ex}
+ And then can use it:
+ \begin{ex}[restore]
+ This is \foo
+ \end{ex}
+ A wider example:
+ \begin{ex}[below]
+ This is a wider example.
+ \end{ex}
+ \end{ex2}
+\endgroup
diff --git a/macros/latex/contrib/enverb/doc-keys.tex b/macros/latex/contrib/enverb/doc-keys.tex
new file mode 100644
index 0000000000..6d36075d26
--- /dev/null
+++ b/macros/latex/contrib/enverb/doc-keys.tex
@@ -0,0 +1,111 @@
+\subsection{Available Keys\label{sec:keys}}
+\begin{function}{\enverbsetup}
+ \begin{syntax}
+ \cs{enverbsetup} \marg{key=value}
+ \end{syntax}
+ This macro can be used to (locally) change the settings of \envlogo\ outside
+ of the |\enverb| macro.
+\end{function}
+
+The available keys are:
+\begin{function}{ignore}
+ \begin{syntax}
+ ignore = \meta{int}\keydefault{\emph{unused}}
+ \end{syntax}
+ Set up the number of tokens to ignore at the start of each line. This is only
+ applied after the matching |\end| was found, hence doesn't affect the
+ |\end|-line. A line containing any non-whitespace tokens but in total
+ fewer tokens (counting whitespace) than \meta{int} will lead to undefined
+ behaviour.\par
+ |ignore| and |auto-ignore| are mutually exclusive.
+\end{function}
+
+\begin{function}{auto-ignore}
+ \begin{syntax}
+ auto-ignore\keydefault{true}
+ auto-ignore = \meta{bool}
+ \end{syntax}
+ If this is true (or no value is given) the number of leading tokens is
+ determined by the number of leading tokens found in the line with the matching
+ |\end|. This allows for nice nesting of indentation levels in your \LaTeX\
+ sources without affecting functionality. A line containing any non-whitespace
+ tokens but in total fewer tokens (counting whitespace) than the leading tokens
+ in the |\end|-line will lead to undefined behaviour.\par
+ |ignore| and |auto-ignore| are mutually exclusive.
+\end{function}
+
+\begin{function}{more-ignore}
+ \begin{syntax}
+ more-ignore = \meta{int}\keydefault{2}
+ \end{syntax}
+ If |auto-ignore| is true this specifies how many tokens in addition to the
+ number of leading tokens shall be ignored at the start of each line. This
+ allows for even the contents of the |\enverb|-environment to be further
+ indented than the |\begin| and |\end| statement.
+\end{function}
+
+\begin{function}{bol}
+ \begin{syntax}
+ bol = \meta{tokens}\keydefault{\emph{empty}}
+ bol+ = \meta{tokens}
+ +bol = \meta{tokens}
+ \end{syntax}
+ Defines which \meta{tokens} are placed at the \textbf{b}egin \textbf{o}f
+ \textbf{l}ines. Your \meta{tokens} can be arbitrary contents and are placed as
+ is (so can contain macros which work as you intend when using
+ \cs{enverbBody}). Keep in mind that if you want to use this with
+ \cs{enverbExecute} or \cs{enverbListing} your tokens should be rescanned to
+ the same code after they got |\detokenize|d.\par
+ The |bol+| variant adds your \meta{tokens} after the current contents of
+ |bol|, while |+bol| adds them in front of the contents.
+\end{function}
+
+\begin{function}{eol}
+ \begin{syntax}
+ eol = \meta{tokens}\keydefault{\emph{\string^\string^M\textsubscript{12}}}
+ eol+ = \meta{tokens}
+ +eol = \meta{tokens}
+ \end{syntax}
+ Defines which \meta{tokens} are placed at the \textbf{e}nd \textbf{o}f
+ \textbf{l}ines. Your \meta{tokens} can be arbitrary contents and are placed as
+ is (so can contain macros which work as you intend when using
+ \cs{enverbBody}). Keep in mind that if you want to use this with
+ \cs{enverbExecute} or \cs{enverbListing} your tokens should be rescanned to
+ the same code after they got |\detokenize|d.\par
+ The |eol+| variant adds your \meta{tokens} after the current contents of
+ |eol|, while |+eol| adds them in front of the contents.
+\end{function}
+
+\begin{function}{key-handler}
+ \begin{syntax}
+ key-handler = \meta{code}\keydefault{\emph{throw an error}}
+ \end{syntax}
+ If used any undefined keys encountered while parsing the mandatory and
+ optional arguments of \cs{enverb} is parsed via \meta{code}. Inside your
+ \meta{code} use |#1| to specify where to input the list of unknown keys. This
+ can be used to specify additional keys to provide an interface to control your
+ wrapping code. This includes the handling of any unknown keys encountered
+ while parsing the mandatory \meta{key=value} argument of \cs{enverb}.
+\end{function}
+
+\begin{function}{key-set}
+ \begin{syntax}
+ key-set = \meta{set}
+ \end{syntax}
+ \envlogo\ uses \pkg{expkv} for its key-parsing. This key is a special form of
+ |key-handler| defining a handler that parses the unknown keys as part of
+ \meta{set} in \pkg{expkv} (so basically a shorthand for
+ |key-handler = \ekvset{|\meta{set}|}{#1}|).
+\end{function}
+
+\begin{function}{oarg-not-enverb}
+ \begin{syntax}
+ oarg-not-enverb\keydefault{false}
+ oarg-not-enverb = \meta{bool}
+ \end{syntax}
+ If this is true (or no value is given) the \meta{key=value} list in the
+ optional argument to \cs{enverb} is not parsed as keys of \envlogo\ but only
+ inside your defined |key-handler|. Obviously this key doesn't have any effect
+ if only used as part of the optional argument of \cs{enverb}.
+\end{function}
+
diff --git a/macros/latex/contrib/enverb/doc-using-contents.tex b/macros/latex/contrib/enverb/doc-using-contents.tex
new file mode 100644
index 0000000000..c3a147ab97
--- /dev/null
+++ b/macros/latex/contrib/enverb/doc-using-contents.tex
@@ -0,0 +1,40 @@
+\subsection{Using Verbatim Environment Contents}
+\begin{function}{\enverbBody}
+ \begin{syntax}
+ \cs{enverbBody}
+ \end{syntax}
+ This macro holds the contents of the last scanned \cs{enverb}-body,
+ assignments to it by the package are all local.
+\end{function}
+
+\begin{function}{\enverbExecute}
+ \begin{syntax}
+ \cs{enverbExecute}
+ \end{syntax}
+ This function executes the current contents of \cs{enverbBody} as though they
+ would be part of your input at this place (using |\scantokens|, it is tried as
+ good as possible to tackle |\scantokens|'s shortcomings; also it is assumed
+ that you didn't change the |eol| key, or else the newlines aren't carried over
+ but whatever your |eol| value set is used). The entire contents are
+ |\detokenize|d once before |\scantokens| does its magic (shouldn't affect the
+ verbatimly read material, but is deemed a sensible safety measure if something
+ unexpected happens; this also assumes that anything you placed inside |bol| or
+ |eol| is rescanned into the same stuff once |\detokenize|d).\par
+ The function isn't fully expandable, the contents are executed at the current
+ group level.
+\end{function}
+
+\begin{function}{\enverbListing}
+ \begin{syntax}
+ \cs{enverbListing} \marg{env} \marg{args}
+ \end{syntax}
+ This function is meant to reuse the current contents of \cs{enverbBody} inside
+ another verbatim environment. The used mechanism is tested to work with
+ \env{verbatim}, and environments defined by \pkg{fancyvrb}, \pkg{listings} and
+ \pkg{minted} (provided you use the default |eol| setting). \meta{env} is the
+ environment name in which the contents should be nested, and \meta{args} is
+ material to be placed after the |\begin| statement (just as you input them,
+ with the outer braces from this argument removed).\par
+ Just like |\enverbExecute| this |\detokenize|s the current content of
+ \cs{enverbBody} as well as your \meta{args} and uses |\scantokens|.
+\end{function}
diff --git a/macros/latex/contrib/enverb/enverb-doc.pdf b/macros/latex/contrib/enverb/enverb-doc.pdf
new file mode 100644
index 0000000000..fc5c35311e
--- /dev/null
+++ b/macros/latex/contrib/enverb/enverb-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/enverb/enverb-doc.tex b/macros/latex/contrib/enverb/enverb-doc.tex
new file mode 100644
index 0000000000..985e9e03b8
--- /dev/null
+++ b/macros/latex/contrib/enverb/enverb-doc.tex
@@ -0,0 +1,87 @@
+\IfFileExists{enverb.sty}{\RequirePackage{enverb}}{}
+
+\PassOptionsToPackage{full}{textcomp}
+\documentclass{l3doc}
+
+\usepackage[oldstylenums,nott]{kpfonts}
+\usepackage{randtext,xcolor,array}
+\usepackage{xistercian}
+\usepackage{accsupp}
+\usepackage{csquotes}
+\usepackage{multicol}
+%\usepackage{microtype}
+
+\input{preamble-logo}
+\input{preamble-examples}
+
+\newcommand\keydefault[1]{\hfill\textcolor{enverbgrey}{default: #1}}
+
+\let\metaORIG\meta
+\protected\def\meta #1{\texttt{\metaORIG{#1}}}
+\renewcommand*\thefootnote{\cistercian{footnote}}
+\hypersetup{linkcolor=red!80!black,urlcolor=purple!80!black}
+\makeatletter
+\@ifdefinable\gobbledocstriptag{\def\gobbledocstriptag#1>{}}
+\protected\def\savefootnotestuff
+ {%
+ \let\mysavethefootnote\thefootnote
+ \let\mysave@makefnmark\@makefnmark
+ \let\mysave@makefntext\@makefntext
+ }
+\def\restorefootnotestuff{\texorpdfstring\restorefootnotestuff@{}}
+\def\restorefootnotestuff@
+ {%
+ \global\let\thefootnote\mysavethefootnote
+ \global\let\@makefnmark\mysave@makefnmark
+ \global\let\@makefntext\mysave@makefntext
+ }
+\makeatother
+
+\begin{document}
+\savefootnotestuff
+\title
+ {%
+ \restorefootnotestuff
+ The \envlogo\ package\\[\medskipamount]
+ \Large read an environment verbatim%
+ }
+\GetFileInfo{enverb.sty}
+\date{\filedate\space\fileversion}
+\author{Jonathan P. Spratte\thanks{\protect\randomize{jspratte@yahoo.de}}}
+
+\maketitle
+
+\begin{abstract}
+ \noindent\parfillskip=0pt
+ The \envlogo\ package provides a simple yet effective way to collect the
+ verbatim contents of an environment into a macro, which the user can then pick
+ up to implement additional functionality, for instance a simple output routine
+ or rescanning the contents into code listings or for typesetting alike.
+ Arbitrary contents can be placed on either end of each line allowing flexible
+ line-oriented processing.
+\end{abstract}
+
+\tableofcontents
+
+\begin{documentation}
+\section{Documentation}
+Originally I was unsatisfied by the degree of freedom and customisation present
+in the available verbatim-environment providing packages like \pkg{listings},
+\pkg{minted}, \emph{etc.}, when one wants to document \TeX\ code and show the
+results next to it (or I didn't bother to dig through their manuals). Also I
+didn't like them producing temporary files so long as that's not necessary. As a
+result I implemented what was basically the first version of \envlogo\ for one
+of my other packages.
+
+\input{doc-enverb}
+\input{doc-using-contents}
+\input{doc-keys}
+\input{doc-examples}
+\end{documentation}
+
+\clearpage
+\begin{implementation}
+ \section{Implementation}
+ \DocInput{enverb.dtx}
+\end{implementation}
+\end{document}
diff --git a/macros/latex/contrib/enverb/enverb.dtx b/macros/latex/contrib/enverb/enverb.dtx
new file mode 100644
index 0000000000..a33dc713d7
--- /dev/null
+++ b/macros/latex/contrib/enverb/enverb.dtx
@@ -0,0 +1,720 @@
+% \iffalse meta-comment
+%
+% File: enverb.dtx Copyright (C) 2023-2024 Jonathan P. Spratte
+%
+% 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
+%
+% ------------------------------------------------------------------------------
+%
+%<*driver>^^A>>=
+\def\nameofplainTeX{plain}
+\ifx\fmtname\nameofplainTeX\else
+ \expandafter\begingroup
+\fi
+\input l3docstrip.tex
+\askforoverwritefalse
+\preamble
+
+--------------------------------------------------------------
+enverb -- read an environment verbatim
+E-mail: jspratte@yahoo.de
+Released under the LaTeX Project Public License v1.3c or later
+See http://www.latex-project.org/lppl.txt
+--------------------------------------------------------------
+
+Copyright (C) 2023-2024 Jonathan P. Spratte
+
+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
+ Jonathan P. Spratte.
+
+This work consists of the files enverb.dtx
+ enverb-doc.tex
+and the derived files enverb-doc.pdf
+ enverb.sty
+
+\endpreamble
+\postamble
+\endpostamble
+\generate{\file{enverb.sty}{\from{enverb.dtx}{pkg}}}
+\ifx\fmtname\nameofplainTeX
+ \expandafter\endbatchfile
+\else
+ \expandafter\endgroup
+\fi
+%</driver>^^A=<<
+% \fi
+%
+% \gobbledocstriptag
+%<*pkg>
+%
+% \subsection{Who we are}
+%
+% \begin{macro}[internal]{\enverb@date,\enverb@version}
+% We store the package version and date inside macros.
+% \begin{macrocode}
+\newcommand*\enverb@date{2024-08-28}
+\newcommand*\enverb@version{1.0}
+% \end{macrocode}
+% \end{macro}
+%
+% And the package identification:
+% \begin{macrocode}
+\ProvidesPackage{enverb}
+ [\enverb@date\space v\enverb@version\space read an environment verbatim]
+% \end{macrocode}
+%
+% \subsection{Some required \LaTeXe\ style argument grabbers}
+% \begin{macro}[internal]{\@thirdofthree,\@firstofnine}
+% This here are just two argument grabbers that aren't defined in all versions
+% of \LaTeXe.
+% \begin{macrocode}
+\providecommand\@thirdofthree[3]{#3}
+\providecommand\@firstofnine[9]{#1}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Borrow some code}
+% \begin{macro}[internal]
+% {\enverb@count,\enverb@ifxTF,\enverb@chargen,\enverb@othercr}
+% We'll make use of the following two \pkg{expl3} functions, but since the
+% remainder of this package is coded in \LaTeXe\ style we stick to that.
+% \begin{macrocode}
+\ExplSyntaxOn
+\cs_new_eq:NN \enverb@count \tl_count:n
+\cs_new_eq:NN \enverb@ifxTF \token_if_eq_meaning:NNTF
+\cs_new_eq:NN \enverb@chargen \char_generate:nn
+\cs_set:Npx \enverb@othercr { \char_generate:nn {13} {12} }
+\ExplSyntaxOff
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Key-value Setup}
+% First we need to load a package to allow us defining our keys, then we define
+% a bunch of keys:
+% \begin{macrocode}
+\RequirePackage{expkv-def}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\ekvdefinekeys{enverb}
+ {
+ protect code ignore = \let\enverb@ifautoignore\@secondoftwo
+ ,also eint ignore = \enverb@ignore
+ ,boolTF auto-ignore = \enverb@ifautoignore
+ ,initial auto-ignore
+ ,eint more-ignore = \enverb@moreignore
+ ,initial more-ignore = 2
+ ,long store bol = \enverb@bol@content
+ ,long code bol+ = \enverb@add\enverb@bol@content{#1}
+ ,long code +bol = \enverb@pre\enverb@bol@content{#1}
+ ,long store eol = \enverb@eol@content
+ ,einitial eol = \enverb@othercr
+ ,long code eol+ = \enverb@add\enverb@eol@content{#1}
+ ,long code +eol = \enverb@pre\enverb@eol@content{#1}
+ ,protect code key-handler = \protected\long\def\enverb@keyhandler##1{#1}
+ ,protect code key-set = \protected\long\ekvsetdef\enverb@keyhandler{#1}
+ ,unknown code = \enverb@add\enverb@unknown@kv{, {#3} = {#2} }
+ ,unknown noval = \enverb@add\enverb@unknown@kv{, {#2} }
+ ,boolTF oarg-not-enverb = \enverb@ifoargtokeyhandler
+ }
+% \end{macrocode}
+% \begin{macro}{\enverbsetup}
+% We need a user facing macro to set our keys.
+% \begin{macrocode}
+\protected\long\ekvsetdef\enverbsetup{enverb}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[internal]{\enverb@unknown@kv}
+% This is a storage for all unknown keys encountered.
+% \begin{macrocode}
+\let\enverb@unknown@kv\@empty
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Miscellaneous Auxiliary Functions}
+%
+% \begin{macro}[internal]{\enverb@stop}
+% A very simple minded stop-macro, just gobble up to the eponymous mark.
+% \begin{macrocode}
+\long\def\enverb@stop#1\enverb@stop{}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[internal]{\enverb@error}
+% \begin{macrocode}
+\protected\def\enverb@error{\PackageError{enverb}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[internal]{\enverb@misused}
+% This is an error message that'd be used inside a |\lowercase| environment if
+% put where it originally should've been. Hence we define it now to get
+% correct formatting.
+% \begin{macrocode}
+\protected\def\enverb@misused
+ {%
+ \enverb@error
+ {Misused \string\enverb. Input already tokenised}%
+ {%
+ It seems you used the \string\enverb\space based environment
+ {\@currenvir} inside another\MessageBreak
+ macro's or a primitive's argument; that doesn't work.%
+ }%
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[internal]{\enverb@keyhandler, \enverb@keyhandler@}
+% This is the initial definition of the handler for unknown keys, namely throw
+% an error containing the list of unknown keys.
+% \begin{macrocode}
+\protected\long\def\enverb@keyhandler#1%
+ {%
+ \if\relax\detokenize{#1}\relax
+ \expandafter\@gobbletwo
+ \fi
+ \@firstofone
+ {%
+ \enverb@error
+ {%
+ Unknown keys encountered:
+ \expanded
+ {%
+ \ekvparse
+ {\MessageBreak\@spaces\unexpanded}%
+ {\MessageBreak\@spaces\enverb@keyhandler@}%
+ {#1}%
+ }%
+ \@gobble
+ }%
+ {%
+ Perhaps you misspelled some key names? Or you forgot to set up
+ custom key\MessageBreak
+ parsing.%
+ }%
+ }%
+ }
+\long\def\enverb@keyhandler@#1{\unexpanded{#1} = \unexpanded}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Collector}
+%
+% Much of the code in this package works under a weird category code regime,
+% which the following sets up. After this |~| will be an active newline
+% character, |:| will be an active space, and |;| will be an active tab.
+% \begin{macrocode}
+\begingroup
+\lccode`\~=`\^^M
+\catcode`\:=13
+\lccode`\:=`\ % <- space
+\catcode`\;=13
+\lccode`\;=`\^^I % <- tab
+\lowercase{\endgroup
+% \end{macrocode}
+%
+% \begin{macro}[internal]
+% {\enverb@body@space,\enverb@body@tab,\enverb@body@newline,\enverb@collect}
+% To quickly check whether a line contains only spaces or tabs we define them
+% as empty, that way we can remove them simply by one step of |\romannumeral|
+% expansion. The newlines on the other hand grab the entire next line, check
+% whether the matching |\end| is encountered, and if not leave the contents
+% in |\unexpanded|. This grabbing is not done by the newline characters
+% directly, but instead via |\enverb@collect| so that low level errors are
+% easier to understand.
+% \begin{macrocode}
+\def\enverb@body@space{}
+\def\enverb@body@tab{}
+\def\enverb@body@newline{\enverb@collect}
+\def\enverb@collect#1~%
+ {\enverb@ifnotend{#1}{\enverb@bol\unexpanded{#1}\enverb@eol\enverb@collect}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\enverbBody}
+% \begin{macro}[internal]{\enverb@body@setup}
+% This function sets up the entire category code regime and initial
+% assignments of special tokens.
+% \begin{macrocode}
+\protected\def\enverb@body@setup
+ {%
+ \let\enverbBody\@empty
+ \let\do\@makeother\dospecials
+ \endlinechar=`\^^M
+ \catcode`\^^M=13 \let~\enverb@body@newline
+ \catcode`\ =13 \let:\enverb@body@space
+ \catcode`\^^I=13 \let;\enverb@body@tab
+ \let\enverb@bol\relax
+ \let\enverb@eol\relax
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}[internal]
+% {
+% \enverb@ifxanyTF, \enverb@ifxanyTF@, \enverb@ifxanyTF@ifdone,
+% \enverb@ifxanyTF@F, \enverb@ifxanyTF@T
+% }
+% This function provides a loop to check a list of symbols whether any of them
+% matches the meaning of the first argument.
+% \begin{macrocode}
+\long\def\enverb@ifxanyTF#1#2%
+ {\enverb@ifxanyTF@#1#2\enverb@ifxanyTF@}
+\long\def\enverb@ifxanyTF@#1#2%
+ {%
+ \enverb@ifxanyTF@ifdone#2\enverb@ifxanyTF@F\enverb@ifxanyTF@
+ \enverb@ifxTF#1#2\enverb@ifxanyTF@T{\enverb@ifxanyTF@#1}%
+ }
+\long\def\enverb@ifxanyTF@ifdone#1\enverb@ifxanyTF@{}
+\long\def\enverb@ifxanyTF@F
+ \enverb@ifxanyTF@\enverb@ifxTF#1\enverb@ifxanyTF@T#2#3#4%
+ {#4}
+\long\def\enverb@ifxanyTF@T#1\enverb@ifxanyTF@#2#3{#2}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[internal]{\enverb@search@oarg@a, \enverb@search@oarg@ifx}
+% This function shall search for the optional argument. The first case is
+% rather easy, namely we check for a space (remember that |:| is an active
+% space character in the current context). If this isn't the first line (so
+% the line containing the |\begin| statement) that space is added to the body
+% and searching continues.\par
+% Next repeat the same logic but for an active tab (|;|). Afterwards we check
+% for an active newline (|~|) which if found sets the conditional for the
+% first line to false, still applying the same logic otherwise.\par
+% Lastly we check for the open bracket. If it's found we collect our optional
+% argument, otherwise the body starts, which is either an illegal character
+% immediately following the |\begin| line, or we normally collect the body.
+%
+% \begin{macrocode}
+\def\enverb@search@oarg@ifx#1#2%
+ {%
+ \enverb@ifxTF#1\@let@token
+ {%
+ \ifenverb@firsteol#2\else\enverb@body@add{#1}\fi
+ \enverb@search@oarg@b
+ }%
+ }
+\protected\def\enverb@search@oarg@a
+ {%
+ \enverb@search@oarg@ifx:{}%
+ {%
+ \enverb@search@oarg@ifx;{}%
+ {%
+ \enverb@search@oarg@ifx~\enverb@firsteolfalse
+ {%
+ \enverb@ifxTF{[}\@let@token
+ {\enverb@oarg}%
+ {%
+ \enverb@ifxanyTF\@let@token
+ {%
+ \@sptoken\par\bgroup\egroup$&##^_% $
+ }
+ {%
+ \enverb@misused
+ \endgroup
+ }%
+ {%
+ \ifenverb@firsteol
+ \expandafter\enverb@body@after@begin
+ \else
+ \expandafter\enverb@body
+ \fi
+ }%
+ }%
+ }%
+ }%
+ }%
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[internal]
+% {\enverb@body, \enverb@body@after@oarg, \enverb@body@after@begin}
+% The body collection works by collecting everything inside a macro in one
+% sweep, and a second pass over the collected material to strip leading spaces
+% if the |ignore| or |auto-ignore| feature is used. This macro starts the
+% first sweep. Since during the collection of the optional argument we might
+% already have collected a few tokens we place those at the start by expanding
+% the current definition of |\enverbBody| once.
+% \begin{macrocode}
+\protected\def\enverb@body
+ {\edef\enverbBody{\iffalse}\fi\expandafter\enverb@collect\enverbBody}
+% \end{macrocode}
+% The other two macros also start collecting the body, but are only called
+% after either an optional argument was found, or if the first non-ignored
+% character of the optional argument search was encountered before the first
+% newline. In both cases we check whether the remainder of that line can be
+% considered blank, and if so collect the body.
+% \begin{macrocode}
+\def\enverb@body@after@oarg#1~%
+ {\enverb@ensure@blank{#1}{closing bracket}\enverb@body}
+\def\enverb@body@after@begin#1~%
+ {\enverb@ensure@blank{#1}{\string\begin}\enverb@body}
+% \end{macrocode}
+% This is also the last place we need the strange category setup in, so we
+% close the delimiting brace of the |\lowercase| above here.
+% \begin{macrocode}
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[internal]{\enverb@ensure@blank}
+% We actually need to define the check for an empty line. This check here
+% works for our specifically set up regime of spaces and tabs (which both
+% expand to nothing, the same trick is basically used twice, though we once
+% fully expand and once use romannumeral-expansion).
+% \begin{macrocode}
+\newcommand\enverb@ensure@blank[2]
+ {%
+ \expandafter\enverb@ifempty\expanded{{#1}}{}%
+ {%
+ \expanded
+ {%
+ \noexpand\enverb@error
+ {%
+ Line after #2 not empty.\noexpand\MessageBreak
+ Contains: \detokenize\expandafter{\romannumeral`\^^@#1}%
+ }%
+ {%
+ \noexpand\enverb will try to ignore this. You should clean up
+ your input.%
+ }%
+ }%
+ }%
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[internal]
+% {\enverb@ifempty,\enverb@ifempty@,\enverb@ifempty@true}
+% This is just a quick argument-grabbing based test for an empty argument.
+% \begin{macrocode}
+\newcommand\enverb@ifempty[1]
+ {%
+ \enverb@ifempty@\enverb@ifempty@A#1\enverb@ifempty@B.\enverb@ifempty@true
+ \enverb@ifempty@A\enverb@ifempty@B
+ }
+\def\enverb@ifempty@#1\enverb@ifempty@A\enverb@ifempty@B#2#3{#3}
+\def\enverb@ifempty@true\enverb@ifempty@A\enverb@ifempty@B#1#2{#1}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[internal]{\enverb@add,\enverb@pre,\enverb@body@add}
+% These are just two functions to add things to a token list storing macro,
+% one is available for arbitrary contents, the other is used for the |body|.
+% \begin{macrocode}
+\protected\long\def\enverb@add#1#2{\edef#1{\unexpanded\expandafter{#1#2}}}
+\protected\long\def\enverb@pre#1#2%
+ {\edef#1{\unexpanded{#2}\unexpanded\expandafter{#1}}}
+\protected\def\enverb@body@add{\enverb@add\enverbBody}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\enverb}
+% This macro is the front facing command that starts the entire grabbing
+% logic. The first thing we need to do is define the auxiliary we use to check
+% whether we're done collecting the body, which is dependent on the current
+% environment's name. Next we store the mandatory argument in |marg| and
+% initialise the |oarg|-storage, category regime, and |firsteol|-boolean.
+% Finally we start searching for the optional argument.
+% \begin{macrocode}
+\NewDocumentCommand \enverb { s +m }
+ {%
+ \expandafter\enverb@ifnotend@setup@perhaps\expanded
+ {{\string{\@currenvir\string}}}%
+ \let\enverb@collected@oarg\@empty
+ \edef\enverb@collected@marg{\unexpanded{#2}}%
+ \begingroup
+ \enverb@body@setup
+ \IfBooleanTF{#1}%
+ {\enverb@body@after@begin}%
+ {%
+ \enverb@firsteoltrue
+ \enverb@search@oarg
+ }%
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[internal]
+% {\ifenverb@firsteol,\enverb@firsteoltrue,\enverb@firsteolfalse}
+% A simple \TeX-style boolean to keep track whether we're in front of the
+% first newline.
+% \begin{macrocode}
+\newif\ifenverb@firsteol
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[internal]{\enverb@search@oarg, \enverb@search@oarg@b}
+% The core function to search for an optional argument was already defined
+% above, these are the first and third step of that functionality (starting
+% and resuming to search).
+% \begin{macrocode}
+\protected\def\enverb@search@oarg{\futurelet\@let@token\enverb@search@oarg@a}
+\protected\def\enverb@search@oarg@b{\expandafter\enverb@search@oarg\@gobble}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[internal]{\enverb@oarg, \enverb@oarg@}
+% This is used once the opening brace of the optional argument is found. First
+% we close the group in which the body's category code regime is active, then
+% we actually collect the optional argument with the normal category codes,
+% restore the body's regime and collect it.
+% \begin{macrocode}
+\protected\def\enverb@oarg{\endgroup\enverb@oarg@}
+\NewDocumentCommand\enverb@oarg@{+O{}}
+ {%
+ \enverb@add\enverb@collected@oarg{#1}%
+ \begingroup
+ \enverb@body@setup
+ \enverb@body@after@oarg
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[internal]{\enverb@ifnotend, \enverb@ifnotend}
+% These functions check whether the input contains the string representation
+% |\end|. If it does they invoke \cs[no-index]{enverb@ifnotend@maybe} with the
+% tokens in front of |\end| and after it as two arguments. Otherwise the third
+% argument after \cs{enverb@ifnotend@}'s expansion is directly used, which is
+% the second (curried) argument to \cs{enverb@ifnotend}.
+% \begin{macrocode}
+\newcommand\enverb@ifnotend[1]%
+ {%
+ \def\enverb@ifnotend##1%
+ {%
+ \enverb@ifnotend@
+ ##1\enverb@mark\enverb@ifnotend@maybe
+ #1\enverb@mark\@thirdofthree
+ \enverb@stop
+ }%
+ \def\enverb@ifnotend@##1#1##2\enverb@mark##3##4\enverb@stop{##3{##1}{##2}}%
+ }
+\expandafter\enverb@ifnotend\expanded{{\expandafter\@gobble\string\\end}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[internal]{\enverb@ifnotend@maybe}
+% This function will be used if an |\end| was encountered and should check
+% whether that is indeed the end of our environment, it uses a second stage
+% \cs[no-index]{enverb@ifnotend@perhaps} for that check. The |\romannumeral|
+% expansion it employs will strip any leading spaces or tabs from |#2|.
+% \begin{macrocode}
+\newcommand\enverb@ifnotend@maybe[2]
+ {\expandafter\enverb@ifnotend@perhaps\expandafter{\romannumeral`\^^@#2}{#1}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[internal]
+% {
+% \enverb@ifnotend@setup@perhaps,
+% \enverb@ifnotend@perhaps, \enverb@ifnotend@perhaps@,
+% \@thirdofthree
+% }
+% We need an expandable and fast check to see whether some input really
+% contains the |\end| of our environment. Checking for |\end| itself is
+% already done above, we need to check for the correct argument to it. The
+% following does so by argument grabbing logic.
+% \begin{macrocode}
+\protected\def\enverb@ifnotend@setup@perhaps#1%
+ {%
+ \def\enverb@ifnotend@perhaps##1%
+ {%
+ \enverb@ifnotend@perhaps@\enverb@mark##1\enverb@mark\enverb@ifnotend@end
+ \enverb@mark#1\enverb@mark\@thirdofthree
+ \enverb@stop
+ }%
+ \def\enverb@ifnotend@perhaps@
+ ##1\enverb@mark#1##2\enverb@mark##3##4\enverb@stop
+ {##3{##2}}%
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[internal]{\enverb@ifnotend@end}
+% If the correct |\end| statement was found this function will be called by
+% \cs[no-index]{enverb@ifnotend@perhaps}. It's first argument will be anything
+% in that line following the |\end| statement, the second argument will be the
+% material in front of it. And |#3| will be whatever the argument to
+% \cs[no-index]{enverb@ifnotend} was.
+%
+% The first thing we need to do is end the body collection by placing the
+% matching closing brace. After that we throw an error on lost content after
+% the |\end| if it's non-blank. And finally we need to smuggle the collected
+% body outside the current group's scope.
+% \begin{macrocode}
+\def\enverb@ifnotend@end#1#2#3%
+ {%
+ \iffalse{\fi}%
+ \enverb@ensure@blank{#1}{\string\end}%
+ \expandafter\enverb@finalise\expandafter{\enverbBody}{#2}%
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[internal]{\enverb@finalise}
+% The finalising function closes the group containing the body's catcode
+% regime. The already tokenised body is |#1|, and |#2| is the contents found
+% in front of the |\end| statement, which we might use for the auto-ignore
+% feature.
+%
+% It then does the key=val parsing, sets up the aftertreatment and assigns the
+% final meaning to \cs{enverbBody}. Eventually it calls the end code of the
+% enclosing environment.
+% \begin{macrocode}
+\protected\def\enverb@finalise#1#2%
+ {%
+ \endgroup
+ \expandafter\enverbsetup\expandafter{\enverb@collected@marg}%
+ \enverb@ifoargtokeyhandler
+ {%
+ \expandafter\enverb@keyhandler\expanded
+ {{%
+ \unexpanded\expandafter{\enverb@unknown@kv},%
+ \unexpanded\expandafter{\enverb@collected@oarg}%
+ }}%
+ }%
+ {%
+ \expandafter\enverbsetup\expandafter{\enverb@collected@oarg}%
+ \expandafter\enverb@keyhandler\expandafter{\enverb@unknown@kv}%
+ }%
+ \enverb@ifautoignore
+ {\enverb@setup@ignore{\enverb@count{#2}+\enverb@moreignore}}%
+ {\enverb@setup@ignore\enverb@ignore}%
+ \edef\enverb@line##1\enverb@eol
+ {%
+ \noexpand\unexpanded{##1}%
+ %\noexpand\detokenize{##1}% % TODO
+ \noexpand\unexpanded{\unexpanded\expandafter{\enverb@eol@content}}%
+ }%
+ \edef\enverbBody{#1}%
+ \expandafter\end\expandafter{\@currenvir}%
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[internal]{\enverb@setup@ignore, \enverb@setup@ignore@}
+% \begin{macrocode}
+\protected\def\enverb@setup@ignore#1%
+ {\expandafter\enverb@setup@ignore@\the\numexpr#1\relax;\enverb@line}
+\protected\def\enverb@setup@ignore@#1;#2%
+ {%
+ \ifnum#1>9
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi
+ {\expandafter\enverb@setup@ignore@\the\numexpr#1-8;{\@firstofnine{#2}}}%
+% \end{macrocode}
+% Just to make sure that |\renewcommand| works correctly, we ensure the macro
+% exists.
+% \begin{macrocode}
+ {%
+ \let\enverb@bol@gobble\@empty
+ \expanded
+ {%
+ \unexpanded{\renewcommand\enverb@bol@gobble}\ifnum#1>\z@[#1]\fi
+ {\unexpanded{#2}}%
+ \unexpanded{\def\enverb@bol##1\enverb@eol}%
+ {%
+ \noexpand\unexpanded
+ {\unexpanded\expandafter{\enverb@bol@content}}%
+ \unexpanded{\expandafter\enverb@ifempty\expanded}{{##1}}%
+ {\noexpand\enverb@line}%
+ {\noexpand\enverb@bol@gobble}%
+ ##1\noexpand\enverb@eol
+ }%
+ }%
+ }%
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Output Oriented Macros}
+%
+% \begin{macro}[internal]{\enverb@rmeol, \enverb@rmeol@}
+% Many of our output routines require the |\scantokens| primitive. Since that
+% one places an additional end of line at the end of its argument we need a
+% way to remove it (this usually results in an additional space in the output
+% otherwise). For that we place a comment character at the end of the input
+% (if it's possible), if that's not available we hope that a stringified
+% |\relax| will do. The code here will use \pkg{expl3} for ease of coding.
+% \begin{macrocode}
+\def\enverb@rmeol
+ {%
+ \ifnum\catcode`\%=14
+ \enverb@chargen{`\%}{12}%
+ \expandafter\enverb@stop
+ \fi
+ \enverb@rmeol@0;%
+ \enverb@stop
+ }
+\def\enverb@rmeol@#1;%
+ {%
+ \ifnum#1=128
+ \string\relax
+ \expandafter\enverb@stop
+ \fi
+ \@firstofone
+ {%
+ \ifnum\catcode`\%=14
+ \enverb@chargen{#1}{12}%
+ \expandafter\enverb@stop
+ \fi
+ \expandafter\enverb@rmeol@\the\numexpr#1+1;%
+ }%
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\enverbExecute}
+% \begin{macrocode}
+\NewDocumentCommand\enverbExecute{}
+ {%
+ \begingroup
+ \newlinechar=`\^^M
+ \expandafter
+ \endgroup
+ \scantokens\expanded
+ {{%
+ \detokenize\expandafter{\enverbBody}%
+ \enverb@rmeol
+ }}%
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\enverbListing}
+% \begin{macro}[internal]{\enverbListing@}
+% \begin{macrocode}
+\NewDocumentCommand \enverbListing { m m }
+ {%
+ \scantokens\expanded
+ {{%
+ \string\begin{#1}\detokenize{#2}\enverb@othercr
+ \detokenize\expandafter{\enverbBody}%
+ \string\end{#1}\enverb@othercr
+ \enverb@rmeol
+ }}%
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \gobbledocstriptag
+%</pkg>
diff --git a/macros/latex/contrib/enverb/preamble-examples.tex b/macros/latex/contrib/enverb/preamble-examples.tex
new file mode 100644
index 0000000000..da18ed38a6
--- /dev/null
+++ b/macros/latex/contrib/enverb/preamble-examples.tex
@@ -0,0 +1,199 @@
+\makeatletter
+\RequirePackage{enverb}
+\global\let\enverb@ex@stored\@empty
+\ekvdefinekeys{enverb/ex}
+ {
+ boolTF store = \enverb@ex@ifstore
+ ,invboolTF no-store = \enverb@ex@ifstore
+ ,boolTF restore = \enverb@ex@ifrestore
+ ,boolTF no-lst = \enverb@ex@ifnolst
+ ,also nmeta no-lst = below
+ ,nmeta undo-no-lst = {no-lst=false, undo-below}
+ ,boolTF no-tcb = \enverb@ex@ifnotcb
+ ,also nmeta no-tcb = below
+ ,nmeta undo-no-tcb = {no-tcb=false, undo-below}
+ ,boolTF same-line = \enverb@ex@ifsameline
+ ,unknown-choice same-line =
+ \let\enverb@ex@ifsameline\@firstoftwo\def\enverb@ex@codeshare{#1}
+ ,initial same-line = 0.6
+ ,invboolTF other-line = \enverb@ex@ifsameline
+ ,nmeta below = {other-line}
+ ,nmeta undo-below = {same-line}
+ ,store inter = \enverb@ex@inter
+ ,code aboveskip = \def\enverb@ex@above{\vskip#1\relax}
+ ,code belowskip = \def\enverb@ex@below{\vskip#1\relax}
+ ,default aboveskip = \medskipamount
+ ,default belowskip = \medskipamount
+ ,initial aboveskip
+ ,initial belowskip
+ ,noval no-aboveskip = \let\enverb@ex@above\@empty
+ ,noval no-belowskip = \let\enverb@ex@below\@empty
+ % listings
+ ,store lst = \enverb@ex@options@lst
+ ,initial lst = {aboveskip=0pt, belowskip=0pt}
+ ,store same-line-lst = \enverb@ex@options@lst@same
+ ,meta slst = same-line-lst={#1}
+ ,store other-line-lst = \enverb@ex@options@lst@other
+ ,meta olst = other-line-lst={#1}
+ % tcolorbox
+ ,store tcb = \enverb@ex@options@tcb
+ ,initial tcb = {nobeforeafter}
+ ,store same-line-tcb = \enverb@ex@options@tcb@same
+ ,initial same-line-tcb = {box align=center}
+ ,meta stcb = same-line-tcb={#1}
+ ,store other-line-tcb = \enverb@ex@options@tcb@other
+ ,meta otcb = other-line-tcb={#1}
+ }
+\newenvironment{ex}
+ {\enverb{key-set=enverb/ex}}
+ {%
+ \par
+ \enverb@ex@above
+ \noindent
+ \expanded{\noexpand\begin{exwrap}{\enverb@ex@ifsameline{}{breakable}}}
+ \enverb@ex@ifnolst
+ {}%
+ {%
+ \enverb@ex@ifsameline
+ {\noindent\begin{minipage}[c]{\enverb@ex@codeshare\linewidth}}%
+ {}%
+ \ExpandArgs{ne}\enverbListing{lstlisting}%
+ {%
+ [{%
+ \unexpanded\expandafter{\enverb@ex@options@lst},%
+ \enverb@ex@ifsameline
+ {\unexpanded\expandafter{\enverb@ex@options@lst@same}}%
+ {\unexpanded\expandafter{\enverb@ex@options@lst@other}}%
+ }]%
+ }%
+ \enverb@ex@ifsameline
+ {\end{minipage}}%
+ {}%
+ }%
+ \enverb@ex@ifstore
+ {%
+ \xdef\enverb@ex@stored
+ {%
+ \unexpanded\expandafter{\enverb@ex@stored}%
+ \unexpanded\expandafter{\enverbBody}%
+ }%
+ }%
+ {}%
+ \enverb@ex@ifrestore
+ {%
+ \edef\enverbBody
+ {%
+ \unexpanded\expandafter{\enverb@ex@stored}%
+ \unexpanded\expandafter{\enverbBody}%
+ }%
+ \global\let\enverb@ex@stored\@empty
+ }%
+ {}%
+ \enverb@ex@ifnotcb
+ {}%
+ {%
+ \enverb@ex@ifsameline{}{\medskip}%
+ \expanded{\noexpand\begin{exbox}%
+ {%
+ \unexpanded\expandafter{\enverb@ex@options@tcb},%
+ \enverb@ex@ifsameline
+ {\unexpanded\expandafter{\enverb@ex@options@tcb@same}}%
+ {\unexpanded\expandafter{\enverb@ex@options@tcb@other}}%
+ }}%
+ {\linewidth\enverb@ex@ifsameline{-\enverb@ex@codeshare\linewidth}{}}%
+ \enverbExecute
+ \end{exbox}%
+ }%
+ \end{exwrap}%
+ \par
+ \enverb@ex@below
+ \@endpetrue
+ }
+
+\RequirePackage{listings}% >>=
+\newcommand\extexcsstyle{\exbasestyle\color{green!50!black}\bfseries}
+\newcommand\exbasestyle{\ttfamily}
+\lstset
+ {
+ language=[LaTeX]TeX
+ ,flexiblecolumns=true
+ ,basicstyle=\exbasestyle
+ ,texcsstyle=*\extexcsstyle
+ ,moretexcs=%
+ {%
+ UseName,ExpandArgs,textcolor,color,colorbox,expanded,unexpanded,@empty,%
+ @firstoftwo,@endpetrue,RequirePackage,lstset,usetikzlibrary,%
+ pgfmathsetseed,newtcolorbox,tcbsubskin,tikzset,dimexpr%
+ }
+ ,moretexcs=[2]{enverb,enverbBody,enverbExecute,enverbListing}
+ ,texcsstyle=*[2]\exbasestyle\color{enverbred}\bfseries
+ ,literate={\{}{{\extexcsstyle\string{\iffalse}\fi}}{1}
+ {\}}{{\extexcsstyle\iffalse{\fi\string}}}{1}
+ }% =<<
+\RequirePackage[most]{tcolorbox}%>>=
+\RequirePackage{tikz}
+\usetikzlibrary{decorations.pathmorphing,calc}
+\pgfmathsetseed{1} % To have predictable results
+% Define paper style
+\tikzset{
+ % based on https://tex.stackexchange.com/questions/580671
+ ragged border/.style={%
+ decoration={random steps, segment length=2mm, amplitude=0.5mm},
+ decorate,
+ }
+}
+\tcbsubskin{exwrap}{standard}
+ {%
+ width=\linewidth
+ ,colframe=enverbgrey
+ ,colback=enverbred!15!white
+ ,title=Example
+ ,nobeforeafter
+ ,arc=5mm
+ ,sharp corners=northwest
+ ,toprule at break=-1sp
+ ,bottomrule at break=-1sp
+ }
+\tcbsubskin{exwrap-first}{exwrap}{sharp corners=south}
+\tcbsubskin{exwrap-mid}{exwrap}{sharp corners=all}
+\tcbsubskin{exwrap-last}{exwrap}{sharp corners=north}
+\newtcolorbox{exbox}[2]
+ {%
+ colback=white%
+ ,colframe=white%
+ ,geometry nodes=true
+ ,interior code=
+ {%
+ \fill[white]
+ decorate[ragged border]{
+ ($(frame.south east) - (0, 1mm)$) --
+ ($(frame.south west) - (0, 1mm)$)
+ }
+ -- (frame.south west) -- ++(0, 1pt) -| (frame.south east) -- cycle;
+ \fill[white]
+ decorate[ragged border]{
+ ($(frame.north east) + (0, 1mm)$) --
+ ($(frame.north west) + (0, 1mm)$)
+ }
+ -- (frame.north west) -- ++(0, -1pt) -| (frame.north east) -- cycle;
+ }
+ ,fontupper=\small
+ ,width={\dimexpr#2\relax}%
+ ,sharp corners=all
+ ,boxsep=0pt
+ ,top=\fboxsep
+ ,bottom=\fboxsep
+ ,left=\fboxsep
+ ,right=\fboxsep
+ ,#1%
+ }
+\newtcolorbox{exwrap}[1]
+ {%
+ skin=exwrap
+ ,skin first=exwrap-first
+ ,skin middle=exwrap-mid
+ ,skin last=exwrap-last
+ ,#1%
+ }
+%=<<
+\makeatother
diff --git a/macros/latex/contrib/enverb/preamble-logo.tex b/macros/latex/contrib/enverb/preamble-logo.tex
new file mode 100644
index 0000000000..177f8f3e26
--- /dev/null
+++ b/macros/latex/contrib/enverb/preamble-logo.tex
@@ -0,0 +1,25 @@
+\definecolor{enverbred}{HTML}{9F393D}
+\colorlet{enverbgrey}{black!75}
+\newcommand\envlogo% >>=
+ {%
+ \texorpdfstring
+ {\envLogo}%
+ {enverb}%
+ }% =<<
+\protected\def\envLogo% >>=
+ {%
+ \mbox
+ {%
+ \BeginAccSupp{ActualText=enverb}%
+ \href{https://gitlab.com/islandoftex/texmf/enverb}{\envLogoFormat}%
+ \EndAccSupp{}%
+ }%
+ }% =<<
+\protected\def\envLogoFormat% >>=
+ {%
+ \begingroup
+ \normalfont\rmfamily\bfseries
+ \textcolor{enverbgrey}{en\kern-0.045em v}\kern-.485em
+ \textcolor{enverbred}{v\kern-0.045em erb}%
+ \endgroup
+ }% =<<
diff --git a/macros/latex/contrib/euromoney/README.md b/macros/latex/contrib/euromoney/README.md
new file mode 100644
index 0000000000..601e822cc7
--- /dev/null
+++ b/macros/latex/contrib/euromoney/README.md
@@ -0,0 +1,6 @@
+euromoney is a package with euro coins and banknotes.
+-----------------------------------------------------
+Author..: Cédric Pierquet
+email...: cpierquet@outlook.fr
+Licence.: Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt
+........: pdf converted from domain public svg (user frankes in openclipart), see https://openclipart.org/artist/frankes \ No newline at end of file
diff --git a/macros/latex/contrib/euromoney/doc/euromoney-doc.pdf b/macros/latex/contrib/euromoney/doc/euromoney-doc.pdf
new file mode 100644
index 0000000000..93668899bf
--- /dev/null
+++ b/macros/latex/contrib/euromoney/doc/euromoney-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/euromoney/doc/euromoney-doc.tex b/macros/latex/contrib/euromoney/doc/euromoney-doc.tex
new file mode 100644
index 0000000000..f502604a0b
--- /dev/null
+++ b/macros/latex/contrib/euromoney/doc/euromoney-doc.tex
@@ -0,0 +1,461 @@
+% !TeX TXS-program:compile = txs:///arara
+% arara: pdflatex: {shell: yes, synctex: no, interaction: batchmode}
+% arara: pdflatex: {shell: yes, synctex: no, interaction: batchmode} if found('log', '(undefined references|Please rerun|Rerun to get)')
+
+\documentclass[11pt,a4paper]{ltxdoc}
+%\usepackage{crimson}
+\usepackage{bera}
+\usepackage{inconsolata}
+%\renewcommand*\ttdefault{cmvtt}
+\usepackage[T1]{fontenc}
+\usepackage[scale=0.875]{cabin}
+\usepackage{euromoney}
+\usepackage{fancyvrb}
+\usepackage{fancyhdr}
+\usepackage{tabularray}
+\usepackage{fontawesome5}
+\fancyhf{}
+\renewcommand{\headrulewidth}{0pt}
+\lfoot{\sffamily\small [euromoney]}
+\cfoot{\sffamily\small - \thepage{} -}
+\rfoot{\hyperlink{matoc}{\small\faArrowAltCircleUp[regular]}}
+\usepackage{hologo}
+\providecommand\tikzlogo{Ti\textit{k}Z}
+\providecommand\TeXLive{\TeX{}Live\xspace}
+\let\TikZ\tikzlogo
+
+\usepackage{hyperref}
+\urlstyle{same}
+\hypersetup{pdfborder=0 0 0}
+\usepackage[margin=2cm]{geometry}
+\setlength{\parindent}{0pt}
+\def\TPversion{0.1.1}
+\def\TPdate{07/09/2024}
+\usepackage{tcolorbox}
+\tcbuselibrary{skins,hooks,listingsutf8}
+%\usepackage{soul}
+%\sethlcolor{lightgray!25}
+
+\lstset{
+ language=[LaTeX]TeX,%
+ basicstyle=\ttfamily,%
+ keywordstyle={\color{blue}},%
+ classoffset=0,%
+ keywords={usepackage,\includegraphics,xstring,listofitems,tikz,calc,simplekv,graphicx},%
+ alsoletter={-},%
+ keywordstyle={\color{blue}},%
+ classoffset=1,%
+ alsoletter={-},%
+ morekeywords={euromoney},%
+ keywordstyle={\color{violet}},%
+ classoffset=2,%
+ alsoletter={-},%
+ morekeywords={\BilletsEuro,\PiecesEuro,\EuroBanknotes,\EuroCoins},%
+ keywordstyle={\color{green!50!black}},%
+ classoffset=3,%
+ morekeywords={RefHeight,Style,AutoHeight,OffsetH,OffsetV,Stack,Angle,HauteurRef,HauteurAuto,DecalH,DecalV,Empilage},%
+ keywordstyle={\color{orange}}
+}
+
+\newtcblisting{DemoCode}[1]{%
+ enhanced,width=\linewidth,%
+ bicolor,size=title,%
+ colback=cyan!10!white,%
+ colbacklower=cyan!5!white,%
+ colframe=cyan!75!black,%
+ listing options={%
+ breaklines=true,%
+ breakatwhitespace=true,%
+ style=tcblatex,basicstyle=\small\ttfamily,%
+ tabsize=4,%
+ commentstyle={\itshape\color{gray}},
+ keywordstyle={\color{blue}},%
+ classoffset=0,%
+ keywords={usepackage,\includegraphics,xstring,listofitems,tikz,calc,simplekv,graphicx},%
+ alsoletter={-},%
+ keywordstyle={\color{blue}},%
+ classoffset=1,%
+ alsoletter={-},%
+ morekeywords={euromoney},%
+ keywordstyle={\color{violet}},%
+ classoffset=2,%
+ alsoletter={-},%
+ morekeywords={\BilletsEuro,\PiecesEuro,\EuroBanknotes,\EuroCoins},%
+ keywordstyle={\color{green!50!black}},%
+ classoffset=3,%
+ morekeywords={RefHeight,Style,AutoHeight,OffsetH,OffsetV,Stack,Angle,HauteurRef,HauteurAuto,DecalH,DecalV,Empilage,height},%
+ keywordstyle={\color{orange}}
+ },%
+ #1
+}
+\NewDocumentCommand\MontreCode{ m }{%
+ \lstinline{#1}%
+}
+
+\begin{document}
+
+\thispagestyle{empty}
+
+\begin{center}
+ \begin{minipage}{0.88\linewidth}
+ \begin{tcolorbox}[colframe=yellow,colback=yellow!15]
+ \begin{center}
+ \begin{tabular}{c}
+ {\Huge \texttt{euromoney}}\\
+ \\
+ {\LARGE Insert 'vectorial' coins or} \\
+ {\LARGE banknotes in euro.} \\
+ \\
+ {\small \texttt{Version \TPversion{} -- \TPdate}}
+ \end{tabular}
+ \end{center}
+ \end{tcolorbox}
+ \end{minipage}
+\end{center}
+
+\begin{center}
+ \begin{tabular}{c}
+ \texttt{Cédric Pierquet}\\
+ {\ttfamily c pierquet -- at -- outlook . fr}\\
+ \texttt{\url{https://github.com/cpierquet/euromoney}} \\
+ \end{tabular}
+\end{center}
+
+\hrule
+
+\vfill
+
+\begin{tcolorbox}[colframe=lightgray,colback=lightgray!5]
+ \begin{center}
+ \PiecesEuro[HauteurRef=1cm,Style=full,HauteurAuto]{4*2+3*1+4*0.2+1*0.1+2*0.01}
+
+ \vspace*{2.5mm}
+
+ \PiecesEuro[Empilage=V,HauteurRef=3cm,HauteurAuto]{4*2+3*1+4*0.2+1*0.1+2*0.01}
+
+ \vspace*{2.5mm}
+
+ \BilletsEuro[Style=nb,HauteurRef=1.75cm,DecalV=0.5cm,HauteurAuto]{4*100+2*50+20+4*10+3*5}
+
+ \vspace*{2.5mm}
+
+ \BilletsEuro[Style=full,HauteurAuto]{100+50+20+5}
+ \end{center}
+\end{tcolorbox}
+
+\vfill~
+
+\hrule
+
+\medskip
+
+\emph{%
+ The pdf files were obtained by converting vector \texttt{svg} (public domain) files from the \href{https://openclipart.org/artist/frankes?p=3}{\texttt{openclipart}} database, and in particular from files supplied by \href{https://openclipart.org/artist/frankes?p=3}{\texttt{frankes}}.
+}
+
+\medskip
+
+\hrule
+
+\vspace*{5mm}
+
+\pagebreak
+
+\phantomsection
+
+\hypertarget{matoc}{}
+
+\tableofcontents
+
+\vspace*{5mm}
+
+%\hrule
+
+\pagebreak
+
+\section{Introduction}
+
+\subsection{Description, loading}
+
+The idea is to propose macros to insert coins and banknotes in euro.
+
+\begin{DemoCode}{listing only}
+\usepackage{euromoney}
+\end{DemoCode}
+
+The \MontreCode{euromoney} package loads :
+
+\begin{itemize}
+ \item \lstinline{xstring} ;
+ \item \lstinline{simplekv} ;
+ \item \lstinline{graphicx} ;
+ \item \lstinline{tikz} with \MontreCode{calc} library ;
+ \item \lstinline{listofitems}.
+\end{itemize}
+
+\subsection{Features}
+
+It's possible to present multiple coins or multiples banknotes :
+
+\begin{itemize}
+ \item with global height ;
+ \item with height automatically adjusted (compared to 2€ coin and 500€ banknote) ;
+ \item with stacking.
+\end{itemize}
+
+\section{Global names, samples}
+
+\subsection{Global names}
+
+Each coin or bill is a vectorial pdf, name \texttt{euromoney-<amount><suffix>} and there's three styles :
+
+\begin{itemize}
+ \item \MontreCode{full} colored version ;
+ \item \MontreCode{simple} colored version with \MontreCode{simple} suffix ;
+ \item \MontreCode{bw} version with \MontreCode{simplebw} suffix .
+\end{itemize}
+
+Available basenames are :
+
+\begin{itemize}
+ \item \texttt{500euro} ; \texttt{200euro} ; \texttt{100euro} ; \texttt{50euro} ; \texttt{20euro} ; \texttt{10euro} and \texttt{5euro} ;
+ \item \texttt{2euro} ; \texttt{1euro} ; \texttt{50cent} ; \texttt{20cent} ; \texttt{10cent} ; \texttt{5cent} ; \texttt{2cent} and \texttt{1cent}.
+\end{itemize}
+
+\begin{DemoCode}{}
+%manual insertion
+\includegraphics[height=25.75mm]{euromoney-2euro}% w/o suffix
+\includegraphics[height=25.75mm]{euromoney-2eurosimple}% with simple suffix
+\includegraphics[height=25.75mm]{euromoney-2eurosimplebw}% with simplebw suffix
+\end{DemoCode}
+
+\subsection{Size of graphics}
+
+Banknotes of \MontreCode{Style=full} are bigger than other styles, so the output doc can be bigger size.
+
+For example, 100€ banknote's size is 933~Ko.
+
+\section{Macro for coins}
+
+\subsection{Usage}
+
+The coins macro is :
+
+\begin{DemoCode}{listing only}
+\EuroCoins[keys]{list of coins}
+\end{DemoCode}
+
+Available keys are :
+
+\begin{itemize}
+ \item \MontreCode{RefHeight} := height (default \MontreCode{2cm}) for the coins (relative to 2€ if \MontreCode{AutoHeight=true}) ;
+ \item \MontreCode{Style} := style for coins (default \MontreCode{simple}), within \MontreCode{full/simple/bw} ;
+ \item \MontreCode{AutoHeight} := boolean (default \MontreCode{false}) for adjusting heights of coins ;
+ \item \MontreCode{OffsetH} := horizontal offset (default \MontreCode{0pt}) for multiple coins (side by side if \MontreCode{0pt}) ;
+ \item \MontreCode{OffsetV} := vertical offset (default \MontreCode{5mm}) for multiple coins vertically stacked ;
+ \item \MontreCode{Stack} := sens of stacking (default \MontreCode{H}) for mutiple coins.
+\end{itemize}
+
+List of coins can be given within \MontreCode{3*2+4*1+2*0.2+4*0.1} for example.
+
+\subsection{Examples}
+
+\begin{DemoCode}{}
+%sample with one coin
+\EuroCoins{2}\EuroCoins{1}\EuroCoins{0.5}\EuroCoins{0.2}%
+\EuroCoins{0.1}\EuroCoins{0.05}\EuroCoins{0.02}\EuroCoins{0.01}
+\end{DemoCode}
+
+\begin{DemoCode}{}
+%multiple coins, side by side, global height, simple style
+\EuroCoins{2+1+0.5+0.2+0.1+0.05+0.02+0.01}
+\end{DemoCode}
+
+\begin{DemoCode}{}
+%multiple coins, side by side, global height, full style
+\EuroCoins[Style=full]{2+1+0.5+0.2+0.1+0.05+0.02+0.01}
+\end{DemoCode}
+
+\begin{DemoCode}{}
+%multiple coins, side by side, global height, simplebw style
+\EuroCoins[Style=bw]{2+1+0.5+0.2+0.1+0.05+0.02+0.01}
+\end{DemoCode}
+
+\begin{DemoCode}{}
+%stacked coins (b&w), horizontally with correct scaling
+\EuroCoins[RefHeight=3cm,AutoHeight,OffsetH=7.5mm,Style=bw]{4*2+3*1+4*0.2+1*0.1+2*0.01}
+\end{DemoCode}
+
+\begin{DemoCode}{}
+%stacked coins (full resolution), vertically with correct scaling
+\EuroCoins[Stack=V,RefHeight=3cm,AutoHeight,Style=full]{4*2+3*1+4*0.2+1*0.1+2*0.01}
+\end{DemoCode}
+
+\section{Macro for banknotes}
+
+\subsection{Usage}
+
+The banknotes macro is :
+
+\begin{DemoCode}{listing only}
+\EuroBanknotes[keys]{list of banknotes}
+\end{DemoCode}
+
+Stacking is globally set, and available keys are :
+
+\begin{itemize}
+ \item \MontreCode{RefHeight} := height (default \MontreCode{2cm}) for the banknotes (relative to 500€ if \MontreCode{AutoHeight=true}) ;
+ \item \MontreCode{Style} := style for banknotes (default \MontreCode{simple}), within \MontreCode{full/simple/bw} ;
+ \item \MontreCode{AutoHeight} := boolean (default \MontreCode{false}) for adjusting heights of banknotes ;
+ \item \MontreCode{OffsetH} := horizontal offset (default \MontreCode{0pt}) for multiple banknotes (side by side if \MontreCode{0pt}) ;
+ \item \MontreCode{OffsetV} := vertical offset (default \MontreCode{5mm}) for multiple banknotes vertically stacked ;
+ \item \MontreCode{Stack} := type of stacking (default \MontreCode{H}) within \MontreCode{H/fan} ;
+ \item \MontreCode{Angle} := rotation (default \MontreCode{10}) for \texttt{fan} stacking.
+\end{itemize}
+
+List of banknotes, for \texttt{H} stacking, can be given within \MontreCode{2*100+3*50+10+5} for example.
+
+List of banknotes, for \texttt{fan} stacking, can be given within \MontreCode{5+5+10+10+20+50+100+200+200} for example.
+
+\subsection{Examples}
+
+\begin{DemoCode}{}
+%sample with one banknote
+\EuroBanknotes{500}\EuroBanknotes{200}\EuroBanknotes{100}\EuroBanknotes{50}\\
+\EuroBanknotes{20}\EuroBanknotes{10}\EuroBanknotes{5}
+\end{DemoCode}
+
+\begin{DemoCode}{}
+%multiple banknotes, side by side, global height
+\EuroBanknotes{50+20+5}
+\end{DemoCode}
+
+\begin{DemoCode}{}
+%multiple banknotes, side by side, with correct scaling
+\EuroBanknotes[RefHeight=3cm,Style=full,AutoHeight]{100+10+5}
+\end{DemoCode}
+
+\begin{DemoCode}{}
+%stacked banknotes (b&w), with correct scaling
+\EuroBanknotes[OffsetH=7.5mm,Style=bw,AutoHeight]{4*100+2*50+20+4*10+3*5}
+\end{DemoCode}
+
+\begin{DemoCode}{}
+%syde by side banknotes, with correct scaling
+\EuroBanknotes[RefHeight=1.75cm,AutoHeight]{4*100+2*50+20+4*10+3*5}
+\end{DemoCode}
+
+\begin{DemoCode}{}
+%fan stacking, with adjusted offsets
+\EuroBanknotes%
+ [Stack=fan,RefHeight=2.05cm,AutoHeight,Angle=17.5,%
+ OffsetH=0.1mm,OffsetV=0mm]%
+ {5+5+10+10+20+50+100+200+200}
+\end{DemoCode}
+
+\pagebreak
+
+\section{French version}
+
+Il est possible d'utiliser les commandes en version francisée :
+
+\begin{DemoCode}{listing only}
+\PiecesEuro[clés]{liste de pièces}
+\BilletsEuro[clés]{liste de billets}
+\end{DemoCode}
+
+Les clés disponibles sont :
+
+\begin{itemize}
+ \item \MontreCode{HauteurRef} := hauteur (défaut \MontreCode{2cm}) pour les pièces/billets (relativement à celle de 2€ et celui de 500€ si \MontreCode{HauteurAuto=true}) ;
+ \item \MontreCode{Style} := style pour les pièces/billets (défaut \MontreCode{simple}), parmi \MontreCode{full/simple/nb} ;
+ \item \MontreCode{HauteurAuto} := booléen (défaut \MontreCode{false}) pour adapter les hauteurs ;
+ \item \MontreCode{DecalH} := décalage horizontal (défaut \MontreCode{0pt}) pour des empilages (côte à côte si \MontreCode{0pt}) ;
+ \item \MontreCode{DecalV} := décalage vertical (défaut \MontreCode{5mm}) pour les empilages verticaux ;
+ \item \MontreCode{Empilage} := sens de l'empilage (défaut \MontreCode{H}) éventuel, parmi \MontreCode{H/eventail} suivant le type d'objets.
+\end{itemize}
+
+La liste peut être donnée sous la forme \MontreCode{3*2+4*1+2*0.2+4*0.1} pour des affichages \textit{classiques} par exemple.
+
+Pour le cas de billets en éventail, la liste pourra être donnée sous la forme \MontreCode{5+5+10+10+20+50+100+200+200} par exemple.
+
+\begin{DemoCode}{}
+%exemple avec une pièce
+\PiecesEuro{2}\PiecesEuro{1}\PiecesEuro{0.5}\PiecesEuro{0.2}%
+\PiecesEuro{0.1}\PiecesEuro{0.05}\PiecesEuro{0.02}\PiecesEuro{0.01}
+\end{DemoCode}
+
+\begin{DemoCode}{}
+%pièces multiples, côte à côte, taille uniforme, style simple
+\PiecesEuro{2+1+0.5+0.2+0.1+0.05+0.02+0.01}
+\end{DemoCode}
+
+\begin{DemoCode}{}
+%pièces multiples, côte à côte, taille uniforme, style full
+\PiecesEuro[Style=full]{2+1+0.5+0.2+0.1+0.05+0.02+0.01}
+\end{DemoCode}
+
+\begin{DemoCode}{}
+%pièces multiples, côte à côte, taille uniforme, style simplenb
+\PiecesEuro[Style=nb]{2+1+0.5+0.2+0.1+0.05+0.02+0.01}
+\end{DemoCode}
+
+\begin{DemoCode}{}
+%pièces empilées (n&b) horizontalement et tailles ajustées
+\PiecesEuro%
+ [HauteurRef=3cm,HauteurAuto,DecalH=7.5mm,Style=nb]{4*2+3*1+4*0.2+1*0.1+2*0.01}
+\end{DemoCode}
+
+\begin{DemoCode}{}
+%pièces empilées (full résolution) verticalement et tailles ajustées
+\PiecesEuro%
+ [Empilage=V,HauteurRef=3cm,HauteurAuto,Style=full]{4*2+3*1+4*0.2+1*0.1+2*0.01}
+\end{DemoCode}
+
+\begin{DemoCode}{}
+%exemple avec un billet
+\BilletsEuro{500}\BilletsEuro{200}\BilletsEuro{100}\BilletsEuro{50}\\
+\BilletsEuro{20}\BilletsEuro{10}\BilletsEuro{5}
+\end{DemoCode}
+
+\begin{DemoCode}{}
+%plusieurs billets, côte à côte, taille uniforme
+\BilletsEuro{50+20+5}
+\end{DemoCode}
+
+\begin{DemoCode}{}
+%plusieurs billets (full résolution), côte à côte, tailles adaptées
+\BilletsEuro[HauteurRef=3cm,Style=full,HauteurAuto]{100+10+5}
+\end{DemoCode}
+
+\begin{DemoCode}{}
+%billets empilés (n&b), tailles adaptées
+\BilletsEuro[DecalH=7.5mm,Style=nb]{4*100+2*50+20+4*10+3*5}
+\end{DemoCode}
+
+\begin{DemoCode}{}
+%billets côte à côte, tailles adaptées
+\BilletsEuro[HauteurRef=1.75cm,HauteurAuto]{4*100+2*50+20+4*10+3*5}
+\end{DemoCode}
+
+\begin{DemoCode}{}
+%billets en éventail, hauteur et décalages ajustés
+\BilletsEuro%
+ [Empilage=eventail,HauteurRef=2.05cm,HauteurAuto,Angle=17.5,%
+ DecalH=0.1mm,DecalV=0mm]%
+ {5+5+10+10+20+50+100+200+200}
+\end{DemoCode}
+
+\pagebreak
+
+
+\section{History}
+
+\begin{quote}
+\begin{verbatim}
+0.1.1 : New filenames, according to TL rules
+0.1.0 : Initial version
+\end{verbatim}
+\end{quote}
+
+\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/euromoney/tex/euromoney-100euro.pdf b/macros/latex/contrib/euromoney/tex/euromoney-100euro.pdf
new file mode 100644
index 0000000000..6899f2b2d3
--- /dev/null
+++ b/macros/latex/contrib/euromoney/tex/euromoney-100euro.pdf
Binary files differ
diff --git a/macros/latex/contrib/euromoney/tex/euromoney-100eurosimple.pdf b/macros/latex/contrib/euromoney/tex/euromoney-100eurosimple.pdf
new file mode 100644
index 0000000000..b021e90c2b
--- /dev/null
+++ b/macros/latex/contrib/euromoney/tex/euromoney-100eurosimple.pdf
Binary files differ
diff --git a/macros/latex/contrib/euromoney/tex/euromoney-100eurosimplebw.pdf b/macros/latex/contrib/euromoney/tex/euromoney-100eurosimplebw.pdf
new file mode 100644
index 0000000000..e3777a5c9d
--- /dev/null
+++ b/macros/latex/contrib/euromoney/tex/euromoney-100eurosimplebw.pdf
Binary files differ
diff --git a/macros/latex/contrib/euromoney/tex/euromoney-10cent.pdf b/macros/latex/contrib/euromoney/tex/euromoney-10cent.pdf
new file mode 100644
index 0000000000..ddeac2a07f
--- /dev/null
+++ b/macros/latex/contrib/euromoney/tex/euromoney-10cent.pdf
Binary files differ
diff --git a/macros/latex/contrib/euromoney/tex/euromoney-10centsimple.pdf b/macros/latex/contrib/euromoney/tex/euromoney-10centsimple.pdf
new file mode 100644
index 0000000000..8fad414db2
--- /dev/null
+++ b/macros/latex/contrib/euromoney/tex/euromoney-10centsimple.pdf
Binary files differ
diff --git a/macros/latex/contrib/euromoney/tex/euromoney-10centsimplebw.pdf b/macros/latex/contrib/euromoney/tex/euromoney-10centsimplebw.pdf
new file mode 100644
index 0000000000..46bfac9dbc
--- /dev/null
+++ b/macros/latex/contrib/euromoney/tex/euromoney-10centsimplebw.pdf
Binary files differ
diff --git a/macros/latex/contrib/euromoney/tex/euromoney-10euro.pdf b/macros/latex/contrib/euromoney/tex/euromoney-10euro.pdf
new file mode 100644
index 0000000000..0c67ef4982
--- /dev/null
+++ b/macros/latex/contrib/euromoney/tex/euromoney-10euro.pdf
Binary files differ
diff --git a/macros/latex/contrib/euromoney/tex/euromoney-10eurosimple.pdf b/macros/latex/contrib/euromoney/tex/euromoney-10eurosimple.pdf
new file mode 100644
index 0000000000..b07568d6fb
--- /dev/null
+++ b/macros/latex/contrib/euromoney/tex/euromoney-10eurosimple.pdf
Binary files differ
diff --git a/macros/latex/contrib/euromoney/tex/euromoney-10eurosimplebw.pdf b/macros/latex/contrib/euromoney/tex/euromoney-10eurosimplebw.pdf
new file mode 100644
index 0000000000..24928b831b
--- /dev/null
+++ b/macros/latex/contrib/euromoney/tex/euromoney-10eurosimplebw.pdf
Binary files differ
diff --git a/macros/latex/contrib/euromoney/tex/euromoney-1cent.pdf b/macros/latex/contrib/euromoney/tex/euromoney-1cent.pdf
new file mode 100644
index 0000000000..bb9d01c1d4
--- /dev/null
+++ b/macros/latex/contrib/euromoney/tex/euromoney-1cent.pdf
Binary files differ
diff --git a/macros/latex/contrib/euromoney/tex/euromoney-1centsimple.pdf b/macros/latex/contrib/euromoney/tex/euromoney-1centsimple.pdf
new file mode 100644
index 0000000000..1b32b89783
--- /dev/null
+++ b/macros/latex/contrib/euromoney/tex/euromoney-1centsimple.pdf
Binary files differ
diff --git a/macros/latex/contrib/euromoney/tex/euromoney-1centsimplebw.pdf b/macros/latex/contrib/euromoney/tex/euromoney-1centsimplebw.pdf
new file mode 100644
index 0000000000..5db25de626
--- /dev/null
+++ b/macros/latex/contrib/euromoney/tex/euromoney-1centsimplebw.pdf
Binary files differ
diff --git a/macros/latex/contrib/euromoney/tex/euromoney-1euro.pdf b/macros/latex/contrib/euromoney/tex/euromoney-1euro.pdf
new file mode 100644
index 0000000000..48f184fa19
--- /dev/null
+++ b/macros/latex/contrib/euromoney/tex/euromoney-1euro.pdf
Binary files differ
diff --git a/macros/latex/contrib/euromoney/tex/euromoney-1eurosimple.pdf b/macros/latex/contrib/euromoney/tex/euromoney-1eurosimple.pdf
new file mode 100644
index 0000000000..8c34a15535
--- /dev/null
+++ b/macros/latex/contrib/euromoney/tex/euromoney-1eurosimple.pdf
Binary files differ
diff --git a/macros/latex/contrib/euromoney/tex/euromoney-1eurosimplebw.pdf b/macros/latex/contrib/euromoney/tex/euromoney-1eurosimplebw.pdf
new file mode 100644
index 0000000000..d5346534b4
--- /dev/null
+++ b/macros/latex/contrib/euromoney/tex/euromoney-1eurosimplebw.pdf
Binary files differ
diff --git a/macros/latex/contrib/euromoney/tex/euromoney-200euro.pdf b/macros/latex/contrib/euromoney/tex/euromoney-200euro.pdf
new file mode 100644
index 0000000000..dc2c56bfb0
--- /dev/null
+++ b/macros/latex/contrib/euromoney/tex/euromoney-200euro.pdf
Binary files differ
diff --git a/macros/latex/contrib/euromoney/tex/euromoney-200eurosimple.pdf b/macros/latex/contrib/euromoney/tex/euromoney-200eurosimple.pdf
new file mode 100644
index 0000000000..dde3d6f2bb
--- /dev/null
+++ b/macros/latex/contrib/euromoney/tex/euromoney-200eurosimple.pdf
Binary files differ
diff --git a/macros/latex/contrib/euromoney/tex/euromoney-200eurosimplebw.pdf b/macros/latex/contrib/euromoney/tex/euromoney-200eurosimplebw.pdf
new file mode 100644
index 0000000000..78f052bd57
--- /dev/null
+++ b/macros/latex/contrib/euromoney/tex/euromoney-200eurosimplebw.pdf
Binary files differ
diff --git a/macros/latex/contrib/euromoney/tex/euromoney-20cent.pdf b/macros/latex/contrib/euromoney/tex/euromoney-20cent.pdf
new file mode 100644
index 0000000000..28f5f255a4
--- /dev/null
+++ b/macros/latex/contrib/euromoney/tex/euromoney-20cent.pdf
Binary files differ
diff --git a/macros/latex/contrib/euromoney/tex/euromoney-20centsimple.pdf b/macros/latex/contrib/euromoney/tex/euromoney-20centsimple.pdf
new file mode 100644
index 0000000000..c101540707
--- /dev/null
+++ b/macros/latex/contrib/euromoney/tex/euromoney-20centsimple.pdf
Binary files differ
diff --git a/macros/latex/contrib/euromoney/tex/euromoney-20centsimplebw.pdf b/macros/latex/contrib/euromoney/tex/euromoney-20centsimplebw.pdf
new file mode 100644
index 0000000000..38b77e3671
--- /dev/null
+++ b/macros/latex/contrib/euromoney/tex/euromoney-20centsimplebw.pdf
Binary files differ
diff --git a/macros/latex/contrib/euromoney/tex/euromoney-20euro.pdf b/macros/latex/contrib/euromoney/tex/euromoney-20euro.pdf
new file mode 100644
index 0000000000..2e3f409943
--- /dev/null
+++ b/macros/latex/contrib/euromoney/tex/euromoney-20euro.pdf
Binary files differ
diff --git a/macros/latex/contrib/euromoney/tex/euromoney-20eurosimple.pdf b/macros/latex/contrib/euromoney/tex/euromoney-20eurosimple.pdf
new file mode 100644
index 0000000000..4aadb8a293
--- /dev/null
+++ b/macros/latex/contrib/euromoney/tex/euromoney-20eurosimple.pdf
Binary files differ
diff --git a/macros/latex/contrib/euromoney/tex/euromoney-20eurosimplebw.pdf b/macros/latex/contrib/euromoney/tex/euromoney-20eurosimplebw.pdf
new file mode 100644
index 0000000000..a855a3128c
--- /dev/null
+++ b/macros/latex/contrib/euromoney/tex/euromoney-20eurosimplebw.pdf
Binary files differ
diff --git a/macros/latex/contrib/euromoney/tex/euromoney-2cent.pdf b/macros/latex/contrib/euromoney/tex/euromoney-2cent.pdf
new file mode 100644
index 0000000000..cee0ca1ffa
--- /dev/null
+++ b/macros/latex/contrib/euromoney/tex/euromoney-2cent.pdf
Binary files differ
diff --git a/macros/latex/contrib/euromoney/tex/euromoney-2centsimple.pdf b/macros/latex/contrib/euromoney/tex/euromoney-2centsimple.pdf
new file mode 100644
index 0000000000..e68cc46560
--- /dev/null
+++ b/macros/latex/contrib/euromoney/tex/euromoney-2centsimple.pdf
Binary files differ
diff --git a/macros/latex/contrib/euromoney/tex/euromoney-2centsimplebw.pdf b/macros/latex/contrib/euromoney/tex/euromoney-2centsimplebw.pdf
new file mode 100644
index 0000000000..2857426e69
--- /dev/null
+++ b/macros/latex/contrib/euromoney/tex/euromoney-2centsimplebw.pdf
Binary files differ
diff --git a/macros/latex/contrib/euromoney/tex/euromoney-2euro.pdf b/macros/latex/contrib/euromoney/tex/euromoney-2euro.pdf
new file mode 100644
index 0000000000..02ad7cd0e5
--- /dev/null
+++ b/macros/latex/contrib/euromoney/tex/euromoney-2euro.pdf
Binary files differ
diff --git a/macros/latex/contrib/euromoney/tex/euromoney-2eurosimple.pdf b/macros/latex/contrib/euromoney/tex/euromoney-2eurosimple.pdf
new file mode 100644
index 0000000000..85ee0ccdba
--- /dev/null
+++ b/macros/latex/contrib/euromoney/tex/euromoney-2eurosimple.pdf
Binary files differ
diff --git a/macros/latex/contrib/euromoney/tex/euromoney-2eurosimplebw.pdf b/macros/latex/contrib/euromoney/tex/euromoney-2eurosimplebw.pdf
new file mode 100644
index 0000000000..bc3d2d8447
--- /dev/null
+++ b/macros/latex/contrib/euromoney/tex/euromoney-2eurosimplebw.pdf
Binary files differ
diff --git a/macros/latex/contrib/euromoney/tex/euromoney-500euro.pdf b/macros/latex/contrib/euromoney/tex/euromoney-500euro.pdf
new file mode 100644
index 0000000000..7c2c721a4e
--- /dev/null
+++ b/macros/latex/contrib/euromoney/tex/euromoney-500euro.pdf
Binary files differ
diff --git a/macros/latex/contrib/euromoney/tex/euromoney-500eurosimple.pdf b/macros/latex/contrib/euromoney/tex/euromoney-500eurosimple.pdf
new file mode 100644
index 0000000000..719d51c8e7
--- /dev/null
+++ b/macros/latex/contrib/euromoney/tex/euromoney-500eurosimple.pdf
Binary files differ
diff --git a/macros/latex/contrib/euromoney/tex/euromoney-500eurosimplebw.pdf b/macros/latex/contrib/euromoney/tex/euromoney-500eurosimplebw.pdf
new file mode 100644
index 0000000000..0d1bba9565
--- /dev/null
+++ b/macros/latex/contrib/euromoney/tex/euromoney-500eurosimplebw.pdf
Binary files differ
diff --git a/macros/latex/contrib/euromoney/tex/euromoney-50cent.pdf b/macros/latex/contrib/euromoney/tex/euromoney-50cent.pdf
new file mode 100644
index 0000000000..12d3a85bd9
--- /dev/null
+++ b/macros/latex/contrib/euromoney/tex/euromoney-50cent.pdf
Binary files differ
diff --git a/macros/latex/contrib/euromoney/tex/euromoney-50centsimple.pdf b/macros/latex/contrib/euromoney/tex/euromoney-50centsimple.pdf
new file mode 100644
index 0000000000..6fee6a828a
--- /dev/null
+++ b/macros/latex/contrib/euromoney/tex/euromoney-50centsimple.pdf
Binary files differ
diff --git a/macros/latex/contrib/euromoney/tex/euromoney-50centsimplebw.pdf b/macros/latex/contrib/euromoney/tex/euromoney-50centsimplebw.pdf
new file mode 100644
index 0000000000..65776d5d24
--- /dev/null
+++ b/macros/latex/contrib/euromoney/tex/euromoney-50centsimplebw.pdf
Binary files differ
diff --git a/macros/latex/contrib/euromoney/tex/euromoney-50euro.pdf b/macros/latex/contrib/euromoney/tex/euromoney-50euro.pdf
new file mode 100644
index 0000000000..9d26259287
--- /dev/null
+++ b/macros/latex/contrib/euromoney/tex/euromoney-50euro.pdf
Binary files differ
diff --git a/macros/latex/contrib/euromoney/tex/euromoney-50eurosimple.pdf b/macros/latex/contrib/euromoney/tex/euromoney-50eurosimple.pdf
new file mode 100644
index 0000000000..08b128d03f
--- /dev/null
+++ b/macros/latex/contrib/euromoney/tex/euromoney-50eurosimple.pdf
Binary files differ
diff --git a/macros/latex/contrib/euromoney/tex/euromoney-50eurosimplebw.pdf b/macros/latex/contrib/euromoney/tex/euromoney-50eurosimplebw.pdf
new file mode 100644
index 0000000000..dc2c5acbcf
--- /dev/null
+++ b/macros/latex/contrib/euromoney/tex/euromoney-50eurosimplebw.pdf
Binary files differ
diff --git a/macros/latex/contrib/euromoney/tex/euromoney-5cent.pdf b/macros/latex/contrib/euromoney/tex/euromoney-5cent.pdf
new file mode 100644
index 0000000000..dfd4c98914
--- /dev/null
+++ b/macros/latex/contrib/euromoney/tex/euromoney-5cent.pdf
Binary files differ
diff --git a/macros/latex/contrib/euromoney/tex/euromoney-5centsimple.pdf b/macros/latex/contrib/euromoney/tex/euromoney-5centsimple.pdf
new file mode 100644
index 0000000000..c8c4fa6daf
--- /dev/null
+++ b/macros/latex/contrib/euromoney/tex/euromoney-5centsimple.pdf
Binary files differ
diff --git a/macros/latex/contrib/euromoney/tex/euromoney-5centsimplebw.pdf b/macros/latex/contrib/euromoney/tex/euromoney-5centsimplebw.pdf
new file mode 100644
index 0000000000..f108cf065f
--- /dev/null
+++ b/macros/latex/contrib/euromoney/tex/euromoney-5centsimplebw.pdf
Binary files differ
diff --git a/macros/latex/contrib/euromoney/tex/euromoney-5euro.pdf b/macros/latex/contrib/euromoney/tex/euromoney-5euro.pdf
new file mode 100644
index 0000000000..9fdb0301b2
--- /dev/null
+++ b/macros/latex/contrib/euromoney/tex/euromoney-5euro.pdf
Binary files differ
diff --git a/macros/latex/contrib/euromoney/tex/euromoney-5eurosimple.pdf b/macros/latex/contrib/euromoney/tex/euromoney-5eurosimple.pdf
new file mode 100644
index 0000000000..5608fd3085
--- /dev/null
+++ b/macros/latex/contrib/euromoney/tex/euromoney-5eurosimple.pdf
Binary files differ
diff --git a/macros/latex/contrib/euromoney/tex/euromoney-5eurosimplebw.pdf b/macros/latex/contrib/euromoney/tex/euromoney-5eurosimplebw.pdf
new file mode 100644
index 0000000000..a670f2ac2f
--- /dev/null
+++ b/macros/latex/contrib/euromoney/tex/euromoney-5eurosimplebw.pdf
Binary files differ
diff --git a/macros/latex/contrib/euromoney/tex/euromoney.sty b/macros/latex/contrib/euromoney/tex/euromoney.sty
new file mode 100644
index 0000000000..b49337f412
--- /dev/null
+++ b/macros/latex/contrib/euromoney/tex/euromoney.sty
@@ -0,0 +1,549 @@
+% Author : C. Pierquet
+% licence : Released under the LaTeX Project Public License v1.3c
+% or later, see http://www.latex-project.org/lppl.txtf
+% pdf from domain public svg (user frankes in openclipart), see https://openclipart.org/artist/frankes
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{euromoney}[2024/09/07 0.1.1 Insert Euro coins and banknotes]
+
+%------History
+% 0.1.1 New filenames, according to TL rules
+% 0.1.0 Initial version
+
+%------Packages
+\RequirePackage{xstring}
+\RequirePackage{simplekv}
+\RequirePackage{graphicx}
+\RequirePackage{tikz}
+\usetikzlibrary{calc}
+\RequirePackage{listofitems}
+
+%------Lengths
+\newlength{\tmphautmonnaies}
+\setlength{\tmphautmonnaies}{1em}
+\newlength{\tmpoffsethmonnaies}
+\setlength{\tmpoffsethmonnaies}{0pt}
+\newlength{\tmpoffsetvmonnaies}
+\setlength{\tmpoffsetvmonnaies}{5mm}
+
+%------Keys [fr]
+\defKV[Monnaies]{%
+ HauteurRef=\setlength{\tmphautmonnaies}{#1},%
+ Style=\def\piecebilletstyle{#1},%
+ DecalH=\setlength{\tmpoffsethmonnaies}{#1},%
+ DecalV=\setlength{\tmpoffsetvmonnaies}{#1},%
+ Empilage=\def\piecebilletempilage{#1},%
+ Angle=\def\piecebilletrotation{#1}
+}
+
+\setKVdefault[Monnaies]{%
+ HauteurRef=2cm,%
+ Style=simple,%
+ HauteurAuto=false,%
+ DecalH=0pt,%
+ DecalV=5mm,%
+ Empilage=H,%
+ Angle=10
+}
+
+%------Keys [en]
+\defKV[Moneys]{%
+ RefHeight=\setlength{\tmphautmonnaies}{#1},%
+ Style=\def\piecebilletstyle{#1},%
+ OffsetH=\setlength{\tmpoffsethmonnaies}{#1},%
+ OffsetV=\setlength{\tmpoffsetvmonnaies}{#1},%
+ Stack=\def\piecebilletempilage{#1},%
+ Angle=\def\piecebilletrotation{#1}
+}
+
+\setKVdefault[Moneys]{%
+ RefHeight=2cm,%
+ Style=simple,%
+ AutoHeight=false,%
+ OffsetH=0pt,%
+ OffsetV=5mm,%
+ Stack=H,%
+ Angle=10
+}
+
+%-----Macros billet(s) [fr]
+\NewDocumentCommand\BilletEuro{ D<>{} O{} m }{%
+ \restoreKV[Monnaies]%
+ \setKV[Monnaies]{#1}%
+ \IfStrEqCase{\piecebilletstyle}{%
+ {simple}{\def\monnaiessuffixe{simple}}%
+ {full}{\def\monnaiessuffixe{}}%
+ {nb}{\def\monnaiessuffixe{simplebw}}%
+ }%
+ \includegraphics[#2]{euromoney-#3euro\monnaiessuffixe}%
+}
+
+\NewDocumentCommand\BilletsEuro{ O{} m }{%
+ \restoreKV[Monnaies]%
+ \setKV[Monnaies]{#1}%
+ \IfStrEqCase{\piecebilletstyle}{%
+ {simple}{\def\monnaiessuffixe{simple}}%
+ {full}{\def\monnaiessuffixe{}}%
+ {nb}{\def\monnaiessuffixe{simplebw}}%
+ }%
+ %affichage
+ \IfStrEq{\piecebilletempilage}{H}%empilage vertical
+ {%
+ \setsepchar{+}%
+ \readlist*\listetmppieces{#2}%
+ \xdef\nbempilagespieces{\listetmppieceslen}%
+ \ifdim\tmpoffsethmonnaies=0pt\relax%
+ \foreach \i in {1,...,\listetmppieceslen}{%
+ %on découpe l'empilage
+ \itemtomacro\listetmppieces[\i]{\tmpempilpieces}%
+ \IfSubStr{\tmpempilpieces}{*}%
+ {%
+ \StrCut{\tmpempilpieces}{*}{\tmpnbpieces}{\tmptypepieces}%
+ }%
+ {%
+ \xdef\tmpnbpieces{1}%
+ \xdef\tmptypepieces{\tmpempilpieces}%
+ }%
+ \IfStrEqCase{\tmptypepieces}{%
+ {500}{\def\monnaiessomme{500euro}}%
+ {200}{\def\monnaiessomme{200euro}}%
+ {100}{\def\monnaiessomme{100euro}}%
+ {50}{\def\monnaiessomme{50euro}}%
+ {20}{\def\monnaiessomme{20euro}}%
+ {10}{\def\monnaiessomme{10euro}}%
+ {5}{\def\monnaiessomme{5euro}}%
+ }%
+ \ifboolKV[Monnaies]{HauteurAuto}%
+ {%
+ \IfStrEqCase{\tmptypepieces}{%
+ {500}{\def\monnaiesechellerelative{1}}%
+ {200}{\def\monnaiesechellerelative{1}}%
+ {100}{\def\monnaiesechellerelative{1}}%
+ {50}{\def\monnaiesechellerelative{0.9390}}%
+ {20}{\def\monnaiesechellerelative{0.8780}}%
+ {10}{\def\monnaiesechellerelative{0.8171}}%
+ {5}{\def\monnaiesechellerelative{0.7561}}%
+ }%
+ }%
+ {%
+ \def\monnaiesechellerelative{1}%
+ }%
+ \begin{tikzpicture}
+ \foreach \i in {1,...,\tmpnbpieces}{%
+ \draw (0,{(\i-1)*\tmpoffsetvmonnaies}) node[anchor=south west,inner sep=0pt] {\includegraphics[height=\dimexpr\monnaiesechellerelative\tmphautmonnaies\relax]{euromoney-\monnaiessomme\monnaiessuffixe}} ;%
+ }%
+ \end{tikzpicture}%
+ }%
+ \else%
+ \begin{tikzpicture}
+ \foreach \i in {1,...,\listetmppieceslen}{%
+ %on découpe l'empilage
+ \itemtomacro\listetmppieces[\i]{\tmpempilpieces}%
+ \IfSubStr{\tmpempilpieces}{*}%
+ {%
+ \StrCut{\tmpempilpieces}{*}{\tmpnbpieces}{\tmptypepieces}%
+ }%
+ {%
+ \xdef\tmpnbpieces{1}\xdef\tmptypepieces{\tmpempilpieces}%
+ }%
+ \IfStrEqCase{\tmptypepieces}{%
+ {500}{\def\monnaiessomme{500euro}}%
+ {200}{\def\monnaiessomme{200euro}}%
+ {100}{\def\monnaiessomme{100euro}}%
+ {50}{\def\monnaiessomme{50euro}}%
+ {20}{\def\monnaiessomme{20euro}}%
+ {10}{\def\monnaiessomme{10euro}}%
+ {5}{\def\monnaiessomme{5euro}}%
+ }%
+ \ifboolKV[Monnaies]{HauteurAuto}%
+ {%
+ \IfStrEqCase{\tmptypepieces}{%
+ {500}{\def\monnaiesechellerelative{1}}%
+ {200}{\def\monnaiesechellerelative{1}}%
+ {100}{\def\monnaiesechellerelative{1}}%
+ {50}{\def\monnaiesechellerelative{0.9390}}%
+ {20}{\def\monnaiesechellerelative{0.8780}}%
+ {10}{\def\monnaiesechellerelative{0.8171}}%
+ {5}{\def\monnaiesechellerelative{0.7561}}%
+ }%
+ }%
+ {%
+ \def\monnaiesechellerelative{1}%
+ }%
+ \foreach \ii in {1,...,\tmpnbpieces}{%
+ \draw ({(\i-1)*\tmpoffsethmonnaies},{(\ii-1)*\tmpoffsetvmonnaies}) node[anchor=south west,inner sep=0pt] {\includegraphics[height=\dimexpr\monnaiesechellerelative\tmphautmonnaies\relax]{euromoney-\monnaiessomme\monnaiessuffixe}} ;%
+ }%
+ }%
+ \end{tikzpicture}%
+ \fi%
+ }%
+ {}%
+ \IfStrEq{\piecebilletempilage}{eventail}%empilage eventail
+ {%
+ \setsepchar{+}%
+ \readlist*\listbilletseventail{#2}%
+ \xdef\nbeventailbillets{\listbilletseventaillen}%
+ \begin{tikzpicture}
+ \foreach \i in {1,...,\nbeventailbillets}{%
+ \itemtomacro\listbilletseventail[\i]{\tmpempilpieces}%
+ \IfStrEqCase{\tmpempilpieces}{%
+ {500}{\def\monnaiesechellerelative{1}}%
+ {200}{\def\monnaiesechellerelative{1}}%
+ {100}{\def\monnaiesechellerelative{1}}%
+ {50}{\def\monnaiesechellerelative{0.9390}}%
+ {20}{\def\monnaiesechellerelative{0.8780}}%
+ {10}{\def\monnaiesechellerelative{0.8171}}%
+ {5}{\def\monnaiesechellerelative{0.7561}}%
+ }%
+ \IfStrEqCase{\tmpempilpieces}{%
+ {500}{\def\monnaiessomme{500euro}}%
+ {200}{\def\monnaiessomme{200euro}}%
+ {100}{\def\monnaiessomme{100euro}}%
+ {50}{\def\monnaiessomme{50euro}}%
+ {20}{\def\monnaiessomme{20euro}}%
+ {10}{\def\monnaiessomme{10euro}}%
+ {5}{\def\monnaiessomme{5euro}}%
+ }%
+ \ifboolKV[Monnaies]{HauteurAuto}%
+ {%
+ \IfStrEqCase{\tmpempilpieces}{%
+ {500}{\def\monnaiesechellerelative{1}}%
+ {200}{\def\monnaiesechellerelative{1}}%
+ {100}{\def\monnaiesechellerelative{1}}%
+ {50}{\def\monnaiesechellerelative{0.9390}}%
+ {20}{\def\monnaiesechellerelative{0.8780}}%
+ {10}{\def\monnaiesechellerelative{0.8171}}%
+ {5}{\def\monnaiesechellerelative{0.7561}}%
+ }%
+ }%
+ {%
+ \def\monnaiesechellerelative{1}%
+ }%
+ \draw ({-\i*\tmpoffsethmonnaies},{-\i*\tmpoffsetvmonnaies}) node[above right=0pt,inner sep=0pt,outer sep=0pt,rotate={\fpeval{90-0.5*\piecebilletrotation*\nbeventailbillets+(\i-1)*\piecebilletrotation}}] {\includegraphics[height=\dimexpr\monnaiesechellerelative\tmphautmonnaies\relax]{euromoney-\monnaiessomme\monnaiessuffixe}} ;%
+ }%
+ \end{tikzpicture}%
+ }%
+ {}%
+}
+
+%-----Macros billet(s) [en]
+\NewDocumentCommand\EuroBanknote{ D<>{} O{} m }{%
+ \restoreKV[Moneys]%
+ \setKV[Moneys]{#1}%
+ \IfStrEqCase{\piecebilletstyle}{%
+ {simple}{\def\monnaiessuffixe{simple}}%
+ {full}{\def\monnaiessuffixe{}}%
+ {bw}{\def\monnaiessuffixe{simplebw}}%
+ }%
+ \includegraphics[#2]{#3euro\monnaiessuffixe}%
+}
+
+\NewDocumentCommand\EuroBanknotes{ O{} m }{%
+ \restoreKV[Moneys]%
+ \setKV[Moneys]{#1}%
+ \IfStrEqCase{\piecebilletstyle}{%
+ {simple}{\def\monnaiessuffixe{simple}}%
+ {full}{\def\monnaiessuffixe{}}%
+ {bw}{\def\monnaiessuffixe{simplebw}}%
+ }%
+ %affichage
+ \IfStrEq{\piecebilletempilage}{H}%empilage vertical
+ {%
+ \setsepchar{+}%
+ \readlist*\listetmppieces{#2}%
+ \xdef\nbempilagespieces{\listetmppieceslen}%
+ \ifdim\tmpoffsethmonnaies=0pt\relax%
+ \foreach \i in {1,...,\listetmppieceslen}{%
+ %on découpe l'empilage
+ \itemtomacro\listetmppieces[\i]{\tmpempilpieces}%
+ \IfSubStr{\tmpempilpieces}{*}%
+ {%
+ \StrCut{\tmpempilpieces}{*}{\tmpnbpieces}{\tmptypepieces}%
+ }%
+ {%
+ \xdef\tmpnbpieces{1}%
+ \xdef\tmptypepieces{\tmpempilpieces}%
+ }%
+ \IfStrEqCase{\tmptypepieces}{%
+ {500}{\def\monnaiessomme{500euro}}%
+ {200}{\def\monnaiessomme{200euro}}%
+ {100}{\def\monnaiessomme{100euro}}%
+ {50}{\def\monnaiessomme{50euro}}%
+ {20}{\def\monnaiessomme{20euro}}%
+ {10}{\def\monnaiessomme{10euro}}%
+ {5}{\def\monnaiessomme{5euro}}%
+ }%
+ \ifboolKV[Moneys]{AutoHeight}%
+ {%
+ \IfStrEqCase{\tmptypepieces}{%
+ {500}{\def\monnaiesechellerelative{1}}%
+ {200}{\def\monnaiesechellerelative{1}}%
+ {100}{\def\monnaiesechellerelative{1}}%
+ {50}{\def\monnaiesechellerelative{0.9390}}%
+ {20}{\def\monnaiesechellerelative{0.8780}}%
+ {10}{\def\monnaiesechellerelative{0.8171}}%
+ {5}{\def\monnaiesechellerelative{0.7561}}%
+ }%
+ }%
+ {%
+ \def\monnaiesechellerelative{1}%
+ }%
+ \begin{tikzpicture}
+ \foreach \i in {1,...,\tmpnbpieces}{%
+ \draw (0,{(\i-1)*\tmpoffsetvmonnaies}) node[anchor=south west,inner sep=0pt] {\includegraphics[height=\dimexpr\monnaiesechellerelative\tmphautmonnaies\relax]{euromoney-\monnaiessomme\monnaiessuffixe}} ;%
+ }%
+ \end{tikzpicture}%
+ }%
+ \else%
+ \begin{tikzpicture}
+ \foreach \i in {1,...,\listetmppieceslen}{%
+ %on découpe l'empilage
+ \itemtomacro\listetmppieces[\i]{\tmpempilpieces}%
+ \IfSubStr{\tmpempilpieces}{*}%
+ {%
+ \StrCut{\tmpempilpieces}{*}{\tmpnbpieces}{\tmptypepieces}%
+ }%
+ {%
+ \xdef\tmpnbpieces{1}\xdef\tmptypepieces{\tmpempilpieces}%
+ }%
+ \IfStrEqCase{\tmptypepieces}{%
+ {500}{\def\monnaiessomme{500euro}}%
+ {200}{\def\monnaiessomme{200euro}}%
+ {100}{\def\monnaiessomme{100euro}}%
+ {50}{\def\monnaiessomme{50euro}}%
+ {20}{\def\monnaiessomme{20euro}}%
+ {10}{\def\monnaiessomme{10euro}}%
+ {5}{\def\monnaiessomme{5euro}}%
+ }%
+ \ifboolKV[Moneys]{AutoHeight}%
+ {%
+ \IfStrEqCase{\tmptypepieces}{%
+ {500}{\def\monnaiesechellerelative{1}}%
+ {200}{\def\monnaiesechellerelative{1}}%
+ {100}{\def\monnaiesechellerelative{1}}%
+ {50}{\def\monnaiesechellerelative{0.9390}}%
+ {20}{\def\monnaiesechellerelative{0.8780}}%
+ {10}{\def\monnaiesechellerelative{0.8171}}%
+ {5}{\def\monnaiesechellerelative{0.7561}}%
+ }%
+ }%
+ {%
+ \def\monnaiesechellerelative{1}%
+ }%
+ \foreach \ii in {1,...,\tmpnbpieces}{%
+ \draw ({(\i-1)*\tmpoffsethmonnaies},{(\ii-1)*\tmpoffsetvmonnaies}) node[anchor=south west,inner sep=0pt] {\includegraphics[height=\dimexpr\monnaiesechellerelative\tmphautmonnaies\relax]{euromoney-\monnaiessomme\monnaiessuffixe}} ;%
+ }%
+ }%
+ \end{tikzpicture}%
+ \fi%
+ }%
+ {}%
+ \IfStrEq{\piecebilletempilage}{fan}%empilage eventail
+ {%
+ \setsepchar{+}%
+ \readlist*\listbilletseventail{#2}%
+ \xdef\nbeventailbillets{\listbilletseventaillen}%
+ \begin{tikzpicture}
+ \foreach \i in {1,...,\nbeventailbillets}{%
+ \itemtomacro\listbilletseventail[\i]{\tmpempilpieces}%
+ \IfStrEqCase{\tmpempilpieces}{%
+ {500}{\def\monnaiesechellerelative{1}}%
+ {200}{\def\monnaiesechellerelative{1}}%
+ {100}{\def\monnaiesechellerelative{1}}%
+ {50}{\def\monnaiesechellerelative{0.9390}}%
+ {20}{\def\monnaiesechellerelative{0.8780}}%
+ {10}{\def\monnaiesechellerelative{0.8171}}%
+ {5}{\def\monnaiesechellerelative{0.7561}}%
+ }%
+ \IfStrEqCase{\tmpempilpieces}{%
+ {500}{\def\monnaiessomme{500euro}}%
+ {200}{\def\monnaiessomme{200euro}}%
+ {100}{\def\monnaiessomme{100euro}}%
+ {50}{\def\monnaiessomme{50euro}}%
+ {20}{\def\monnaiessomme{20euro}}%
+ {10}{\def\monnaiessomme{10euro}}%
+ {5}{\def\monnaiessomme{5euro}}%
+ }%
+ \ifboolKV[Moneys]{AutoHeight}%
+ {%
+ \IfStrEqCase{\tmpempilpieces}{%
+ {500}{\def\monnaiesechellerelative{1}}%
+ {200}{\def\monnaiesechellerelative{1}}%
+ {100}{\def\monnaiesechellerelative{1}}%
+ {50}{\def\monnaiesechellerelative{0.9390}}%
+ {20}{\def\monnaiesechellerelative{0.8780}}%
+ {10}{\def\monnaiesechellerelative{0.8171}}%
+ {5}{\def\monnaiesechellerelative{0.7561}}%
+ }%
+ }%
+ {%
+ \def\monnaiesechellerelative{1}%
+ }%
+ \draw ({-\i*\tmpoffsethmonnaies},{-\i*\tmpoffsetvmonnaies}) node[above right=0pt,inner sep=0pt,outer sep=0pt,rotate={\fpeval{90-0.5*\piecebilletrotation*\nbeventailbillets+(\i-1)*\piecebilletrotation}}] {\includegraphics[height=\dimexpr\monnaiesechellerelative\tmphautmonnaies\relax]{euromoney-\monnaiessomme\monnaiessuffixe}} ;%
+ }%
+ \end{tikzpicture}%
+ }%
+ {}%
+}
+
+%-----Macro pièces [fr]
+\NewDocumentCommand\PiecesEuro{ O{} m }{%
+ \restoreKV[Monnaies]%
+ \setKV[Monnaies]{#1}%
+ \IfStrEqCase{\piecebilletstyle}{%
+ {simple}{\def\monnaiessuffixe{simple}}%
+ {full}{\def\monnaiessuffixe{}}%
+ {nb}{\def\monnaiessuffixe{simplebw}}%
+ }%
+ %boucle
+ \setsepchar{+}%
+ \readlist*\listetmppieces{#2}%
+ \xdef\nbempilagespieces{\listetmppieceslen}%
+ \foreach \i in {1,...,\listetmppieceslen}{%
+ %on découpe l'empilage
+ \itemtomacro\listetmppieces[\i]{\tmpempilpieces}%
+ \IfSubStr{\tmpempilpieces}{*}%
+ {%
+ \StrCut{\tmpempilpieces}{*}{\tmpnbpieces}{\tmptypepieces}%
+ }%
+ {%
+ \xdef\tmptypepieces{\tmpempilpieces}%
+ }%
+ \IfStrEqCase{\tmptypepieces}{%
+ {2}{\def\monnaiessomme{2euro}}%
+ {1}{\def\monnaiessomme{1euro}}%
+ {0.5}{\def\monnaiessomme{50cent}}%
+ {0.2}{\def\monnaiessomme{20cent}}%
+ {0.1}{\def\monnaiessomme{10cent}}%
+ {0.05}{\def\monnaiessomme{5cent}}%
+ {0.02}{\def\monnaiessomme{2cent}}%
+ {0.01}{\def\monnaiessomme{1cent}}%
+ }%
+ \ifboolKV[Monnaies]{HauteurAuto}%
+ {%
+ \IfStrEqCase{\tmptypepieces}{%
+ {2}{\def\monnaiesechellerelative{1}}%
+ {1}{\def\monnaiesechellerelative{0.9029}}%
+ {0.5}{\def\monnaiesechellerelative{0.9417}}%
+ {0.2}{\def\monnaiesechellerelative{0.8641}}%
+ {0.1}{\def\monnaiesechellerelative{0.7670}}%
+ {0.05}{\def\monnaiesechellerelative{0.8252}}%
+ {0.02}{\def\monnaiesechellerelative{0.7282}}%
+ {0.01}{\def\monnaiesechellerelative{0.6311}}%
+ }%
+ }%
+ {%
+ \def\monnaiesechellerelative{1}%
+ }%
+ %affichage
+ \IfStrEq{\piecebilletempilage}{H}%
+ {%
+ \IfSubStr{\tmpempilpieces}{*}%
+ {%
+ \includegraphics[height=\dimexpr\monnaiesechellerelative\tmphautmonnaies\relax]{euromoney-\monnaiessomme\monnaiessuffixe}%
+ \ifnum\tmpnbpieces=1\else%
+ \foreach \i in {1,...,\inteval{\tmpnbpieces-1}}{%
+ \ifdim\tmpoffsethmonnaies>0pt\relax\hspace*{\dimexpr\tmpoffsethmonnaies-\monnaiesechellerelative\tmphautmonnaies\relax}\fi%
+ \includegraphics[height=\dimexpr\monnaiesechellerelative\tmphautmonnaies\relax]{euromoney-\monnaiessomme\monnaiessuffixe}%
+ }%
+ \fi%
+ }%
+ {%
+ \includegraphics[height=\dimexpr\monnaiesechellerelative\tmphautmonnaies\relax]{euromoney-\monnaiessomme\monnaiessuffixe}%
+ }%
+ \ifnum\i<\listetmppieceslen%
+ \ifdim\tmpoffsethmonnaies>0pt\relax\hspace*{\dimexpr\tmpoffsethmonnaies-\monnaiesechellerelative\tmphautmonnaies\relax}%
+ \fi%
+ \fi%
+ }%
+ {%
+ \begin{tikzpicture}
+ \foreach \i in {1,...,\tmpnbpieces}{%
+ \draw (0,{(\i-1)*\tmpoffsetvmonnaies}) node[inner sep=0pt] {\includegraphics[height=\dimexpr\monnaiesechellerelative\tmphautmonnaies\relax]{euromoney-\monnaiessomme\monnaiessuffixe}} ;%
+ }%
+ \end{tikzpicture}%
+ }%
+ }%
+}
+
+%-----Macro pièces [en]
+\NewDocumentCommand\EuroCoins{ O{} m }{%
+ \restoreKV[Moneys]%
+ \setKV[Moneys]{#1}%
+ \IfStrEqCase{\piecebilletstyle}{%
+ {simple}{\def\monnaiessuffixe{simple}}%
+ {full}{\def\monnaiessuffixe{}}%
+ {bw}{\def\monnaiessuffixe{simplebw}}%
+ }%
+ %boucle
+ \setsepchar{+}%
+ \readlist*\listetmppieces{#2}%
+ \xdef\nbempilagespieces{\listetmppieceslen}%
+ \foreach \i in {1,...,\listetmppieceslen}{%
+ %on découpe l'empilage
+ \itemtomacro\listetmppieces[\i]{\tmpempilpieces}%
+ \IfSubStr{\tmpempilpieces}{*}%
+ {%
+ \StrCut{\tmpempilpieces}{*}{\tmpnbpieces}{\tmptypepieces}%
+ }%
+ {%
+ \xdef\tmptypepieces{\tmpempilpieces}%
+ }%
+ \IfStrEqCase{\tmptypepieces}{%
+ {2}{\def\monnaiessomme{2euro}}%
+ {1}{\def\monnaiessomme{1euro}}%
+ {0.5}{\def\monnaiessomme{50cent}}%
+ {0.2}{\def\monnaiessomme{20cent}}%
+ {0.1}{\def\monnaiessomme{10cent}}%
+ {0.05}{\def\monnaiessomme{5cent}}%
+ {0.02}{\def\monnaiessomme{2cent}}%
+ {0.01}{\def\monnaiessomme{1cent}}%
+ }%
+ \ifboolKV[Moneys]{AutoHeight}%
+ {%
+ \IfStrEqCase{\tmptypepieces}{%
+ {2}{\def\monnaiesechellerelative{1}}%
+ {1}{\def\monnaiesechellerelative{0.9029}}%
+ {0.5}{\def\monnaiesechellerelative{0.9417}}%
+ {0.2}{\def\monnaiesechellerelative{0.8641}}%
+ {0.1}{\def\monnaiesechellerelative{0.7670}}%
+ {0.05}{\def\monnaiesechellerelative{0.8252}}%
+ {0.02}{\def\monnaiesechellerelative{0.7282}}%
+ {0.01}{\def\monnaiesechellerelative{0.6311}}%
+ }%
+ }%
+ {%
+ \def\monnaiesechellerelative{1}%
+ }%
+ %affichage
+ \IfStrEq{\piecebilletempilage}{H}%
+ {%
+ \IfSubStr{\tmpempilpieces}{*}%
+ {%
+ \includegraphics[height=\dimexpr\monnaiesechellerelative\tmphautmonnaies\relax]{euromoney-\monnaiessomme\monnaiessuffixe}%
+ \ifnum\tmpnbpieces=1\else%
+ \foreach \i in {1,...,\inteval{\tmpnbpieces-1}}{%
+ \ifdim\tmpoffsethmonnaies>0pt\relax\hspace*{\dimexpr\tmpoffsethmonnaies-\monnaiesechellerelative\tmphautmonnaies\relax}\fi%
+ \includegraphics[height=\dimexpr\monnaiesechellerelative\tmphautmonnaies\relax]{euromoney-\monnaiessomme\monnaiessuffixe}%
+ }%
+ \fi%
+ }%
+ {%
+ \includegraphics[height=\dimexpr\monnaiesechellerelative\tmphautmonnaies\relax]{euromoney-\monnaiessomme\monnaiessuffixe}%
+ }%
+ \ifnum\i<\listetmppieceslen%
+ \ifdim\tmpoffsethmonnaies>0pt\relax\hspace*{\dimexpr\tmpoffsethmonnaies-\monnaiesechellerelative\tmphautmonnaies\relax}%
+ \fi%
+ \fi%
+ }%
+ {%
+ \begin{tikzpicture}
+ \foreach \i in {1,...,\tmpnbpieces}{%
+ \draw (0,{(\i-1)*\tmpoffsetvmonnaies}) node[inner sep=0pt] {\includegraphics[height=\dimexpr\monnaiesechellerelative\tmphautmonnaies\relax]{euromoney-\monnaiessomme\monnaiessuffixe}} ;%
+ }%
+ \end{tikzpicture}%
+ }%
+ }%
+}
+
+\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/ezedits/README.md b/macros/latex/contrib/ezedits/README.md
new file mode 100644
index 0000000000..49624cd593
--- /dev/null
+++ b/macros/latex/contrib/ezedits/README.md
@@ -0,0 +1,47 @@
+# Package `ezedits` by Joey Smiga
+
+Version 2024-09-12 v1.0
+
+Maintained by Joseph "Joey" A. Smiga \<joseph.smiga@rochester.edu\>
+
+`ezedits` is a package built for collaboratively editing LaTeX documents and tracking changes. Through highly customizable commands, the user can choose how their and their collaborators modifications appear in the document. Additional tools are provided to help keep track of where the edits are made within the pdf.
+
+Originally developed ca. 2018, this has been refined over the years.
+
+## Copyright (C)
+&copy;2024 Joseph A. Smiga
+
+## Usage tips
+
+All edits will raise a warning, making it easier to find where changes occured and clean up the document.
+
+### Package options
+
+- `arrows` add arrows $\Longleftarrow$ pointing to edits in margins (in captions, a pair of arrows are added, instead; $\Longrightarrow$ Like this $\Longleftarrow$). These arrows are styled based on the edit.
+- `accept` accept all edits (arrows still appear if `arrows` option is used).
+- `pdfcomment` write edits as pdf annotations (arrows still appear if `arrows` option is used).
+- `nosout` do not strikeout delete text (by default). If this option is set, the `ulem` package is not used.
+
+### Commands
+
+General comments can be added with `\draftnote{...}`. These comments will appear in-text as `[...]` with some default styling. When also using the `xcolor` package, the notes will be colored red. The command `\setnotestyle{<style>}` can be used to customize the note style.
+
+`\defineEdit{ABC}{<styleA>}{<styleB>}` will generate a set of commands with the prefix `ABC` for editing where `<styleA>` is used for omitted text and `<styleB>` is used for added text. The following commands are generated:
+- `\ABCEdit{del}{ins}` Used to replace `del` with `ins`.
+- `\ABCIns{ins}` Used to insert `ins`.
+- `\ABCDel{del}` Used to delete `del`.
+
+Running the above command for each collaborator (especially with different style arguments) can make it easy to keep track of who made what comment.
+
+`\makeeditreport` generates a `tabular` environment that summarizes where/how many edits were made.
+
+## Possible issues
+
+- Exact page numbers for `\makeeditreport` may be slightly off due to how LaTeX updates `\thepage`.
+- Problems can arise when editing across several paragraphs. It is recommended to use new commands between paragraphs.
+- `pdfcomment` option can be a bit rough at times, though it generally works.
+
+
+## License
+LaTeX Project Public License, version 1.3c or later.
+
diff --git a/macros/latex/contrib/ezedits/ezedits.sty b/macros/latex/contrib/ezedits/ezedits.sty
new file mode 100644
index 0000000000..94a7b3bd5c
--- /dev/null
+++ b/macros/latex/contrib/ezedits/ezedits.sty
@@ -0,0 +1,221 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% ezedits.sty
+%% Copyright 2024 J. A. Smiga
+%
+% 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 J. A. Smiga.
+%
+% This work consists of the file ezedits.sty
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%% This package was written by Joseph A. Smiga <joseph.smiga@rochester.edu>
+%% Originally developed ca. 2018, this has been refined over the years.
+%%
+%% Some useful commands: (not up to date, see documentation)
+%% Included are a set of commands to generate comments for a LaTeX file.
+%%
+%% This package requires the following standard packages:
+%% ulem: for \sout
+%% xcolor: for coloring text.
+%% pdfcomment: if pdfcomment option is used
+%%
+%% Options are:
+%% arrows: add arrows pointing to edits in margins (in captions, a pair of arrows are added, instead).
+%% accept: accept all edits (arrows still appear).
+%% pdfcomments: write edits as pdf annotations (arrows still appear).
+
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{ezedits}[2024/09/12]
+
+% \RequirePackage{xcolor}
+
+\newif\if@accept\@acceptfalse % accept all comments (does not suppress package warnings)
+\newif\if@pdfcomm\@pdfcommfalse % write pdf comments
+\newif\if@showarrows\@showarrowsfalse
+\newif\if@importulem\@importulemtrue
+
+\DeclareOption{accept}{
+ \@accepttrue
+}
+\DeclareOption{pdfcomment}{ % add pdf comments
+ \@pdfcommtrue
+ \AtEndOfPackage{\RequirePackage{pdfcomment}}
+}
+\DeclareOption{arrows}{ % point to edits with arrows in the margin
+ \@showarrowstrue
+ \AtEndOfPackage{\RequirePackage{marginnote}}
+}
+\DeclareOption{nosout}{ % do not crossout deleted text
+ \@importulemfalse
+}
+
+\ProcessOptions\relax
+
+\if@importulem
+ \RequirePackage[normalem]{ulem}% import ulem (for sout)
+ % update \sout to work better with \cite
+ \let\old@cite\cite% remember original
+ \def\new@cite#1{\mbox{\old@cite{#1}}}% put cite in mbox
+ \def\new@sout#1{\let\cite\new@cite\sout{#1}\let\cite\old@cite}% redefine sout
+\else
+ \def\new@sout{}% do nothing
+\fi
+
+%% edit record
+\newcounter{ez@editcount}
+\newcounter{ez@totalcount}
+\gdef\ez@editrecord{}
+\newcommand{\ez@addeditpage}{%
+ \ifx\ez@lastpage\undefined% first edit
+ \xdef\ez@lastpage{\thepage}% initialize "last page" variable
+ % counter starts at 0, so it does not need to be updated
+ \else% 2nd+ edit
+ \if\ez@lastpage\thepage% same page as last edit
+ \relax% handled after if
+ \else% new page
+ % add record
+ \xdef\ez@editrecord{\ez@editrecord \ez@lastpage & \arabic{ez@editcount} \\}%
+ % reset counter/page number
+ \setcounter{ez@editcount}{0}%
+ \xdef\ez@lastpage{\thepage}%
+ \fi%
+ \fi%
+ % Note stepping needs to be "protected" (counters do not always like being changed, since this can mess up, e.g., TOC)
+ \protect\stepcounter{ez@editcount}% update counter
+ \protect\stepcounter{ez@totalcount}%
+}
+%TODO there is an issue with \thepage not always being accurate
+% Possible solution: use \label{} (with generated unique labels) and \pageref{} instead of \thepage.
+% -> This solution may cause out-of-order problems with floating images.
+
+\newcommand{\makeeditreport}{%
+ \begin{tabular}{l|r}
+ %\hline\hline
+ Page & \# edits/notes \\
+ \hline
+ \ifx\ez@lastpage\undefined
+ \relax% no edits
+ \else%
+ \ez@editrecord
+ \ez@lastpage & \arabic{ez@editcount}% current state
+ \fi \\
+ \hline
+ Total & \arabic{ez@totalcount}
+ %\hline\hline
+ \end{tabular}
+}
+
+% Style of \draftnote (may be a better way to write this)
+\newcommand{\@draftstyle}[1]{
+ {\ttfamily%
+ \ifx\textcolor\undefined%
+ #1%
+ \else%
+ \textcolor{red}{#1}%
+ \fi}%
+}
+% let user change the style
+\newcommand{\setnotestyle}[1]{\let\@draftstyle#1}
+
+%% Editing commands
+\newcommand{\draftnote}[1]{%
+ \PackageWarning{ezedits}{Unresolved note: #1}%
+ \ez@addeditpage{}% update record
+ \if@showarrows%
+ \@ifundefined{@captype}%
+ {\marginnote{\@draftstyle{$\Longleftarrow$}}}%
+ {\@draftstyle{$\Longrightarrow$}}%
+ \fi%
+ \if@accept{}\relax\else%
+ \if@pdfcomm%
+ \pdfmargincomment{#1}%
+ \else%
+ \@draftstyle{[#1]}%
+ \fi%
+ \fi%
+ \if@showarrows% if in caption, draw end arrow
+ \@ifundefined{@captype}{}{\@draftstyle{$\Longleftarrow$}}%
+ \fi%
+}
+
+\newcommand{\defineEdit}[3]{%
+ % "\###Edit" for removing and adding text
+ \expandafter\newcommand\csname #1Edit\endcsname[2]{%
+ \PackageWarning{ezedits}{Unresolved modifications by #1: "##1" ---> "##2"}%
+ \ez@addeditpage{}% update record
+ \if@showarrows%
+ \@ifundefined{@captype}%
+ {\marginnote{{#3{$\Longleftarrow$}}}}%
+ {{#3{$\Longrightarrow$}}}%
+ \fi%
+ \if@accept% Display as if accepted
+ ##2%
+ \else%
+ \if@pdfcomm%
+ \pdfmarkupcomment[author=#1,markup=StrikeOut]{##1{$_\wedge$}}{##2}%
+ \else%
+ {#2{\new@sout{##1}}}{#3{##2}}%
+ \fi%
+ \fi%
+ \if@showarrows% if in caption, draw end arrow
+ \@ifundefined{@captype}{}{{#3{$\Longleftarrow$}}}%
+ \fi%
+ }%
+ % "\###Ins" for adding text
+ \expandafter\newcommand\csname #1Ins\endcsname[1]{%
+ \ez@addeditpage{}% update record
+ \PackageWarning{ezedits}{Unresolved modifications by #1: "##1" inserted.}%
+ \if@showarrows%
+ \@ifundefined{@captype}%
+ {\marginnote{{#3{$\Longleftarrow$}}}}%
+ {{#3{$\Longrightarrow$}}}%
+ \fi%
+ \if@accept% Display as if accepted
+ ##1%
+ \else%
+ \if@pdfcomm%
+ % \pdfcomment[author=#1,icon=Insert]{##1}%
+ \pdfmarkupcomment[author=#1,markup=Underline]{$_\wedge$}{##1}%
+ \else%
+ {#3{##1}}%
+ \fi%
+ \fi%
+ \if@showarrows% if in caption, draw end arrow
+ \@ifundefined{@captype}{}{{#3{$\Longleftarrow$}}}%
+ \fi%
+ }%
+ % "\###Del" for removing text
+ \expandafter\newcommand\csname #1Del\endcsname[1]{%
+ \PackageWarning{ezedits}{Unresolved modifications by #1: "##1" removed.}%
+ \ez@addeditpage{}% update record
+ \if@showarrows%
+ \@ifundefined{@captype}%
+ {\marginnote{{#3{$\Longleftarrow$}}}}%
+ {{#3{$\Longrightarrow$}}}%
+ \fi%
+ \if@accept% Display as if accepted
+ {}%
+ \else%
+ \if@pdfcomm%
+ \pdfmarkupcomment[author=#1,markup=StrikeOut,color=red]{##1}{}%
+ \else%
+ {#2{\new@sout{##1}}}%
+ \fi%
+ \fi%
+ \if@showarrows% if in caption, draw end arrow
+ \@ifundefined{@captype}{}{{#3{$\Longleftarrow$}}}%
+ \fi%
+ }%
+}
+
+\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/ezedits/ezedits_docs.pdf b/macros/latex/contrib/ezedits/ezedits_docs.pdf
new file mode 100644
index 0000000000..d4e759bfd7
--- /dev/null
+++ b/macros/latex/contrib/ezedits/ezedits_docs.pdf
Binary files differ
diff --git a/macros/latex/contrib/ezedits/ezedits_docs.tex b/macros/latex/contrib/ezedits/ezedits_docs.tex
new file mode 100644
index 0000000000..f7852ab880
--- /dev/null
+++ b/macros/latex/contrib/ezedits/ezedits_docs.tex
@@ -0,0 +1,171 @@
+\documentclass{article}
+
+\usepackage[arrows]{ezedits}
+
+\usepackage{xcolor}
+\usepackage{hyperref}
+
+\newcommand{\macroexample}[1]{\begin{center}
+ \fcolorbox{black}{black!6}{\parbox{.9\linewidth}{\ttfamily #1}}
+\end{center}}
+
+
+\title{\texttt{ezedits.sty} documentation}
+\author{Joseph A. Smiga $\langle$\href{mailto:joseph.smiga@rochester.edu?subject=[ezedits]\%20}{joseph.smiga@rochester.edu}$\rangle$}
+\date{Package: September 12, 2024 (v1.0)\\
+Documentation: September 12, 2024
+}
+
+\defineEdit{ABC}{\color{red}}{\color{blue}}
+\defineEdit{XYZ}{\color{gray}\textit}{\textbf}
+
+
+\begin{document}
+
+\maketitle
+
+\tableofcontents
+
+\section{Introduction}
+
+The \texttt{ezedits} package is designed to make it easier to edit \LaTeX{} documents with multiple people, while keeping track of what changed.
+
+Changes signified with this package with raise warnings. This makes it easier to keep track of changes and keep the document clean.
+
+Note that, in this document, the package is included as:
+\macroexample{\textbackslash{}usepackage[arrows]\{ezedits\}}
+with the \texttt{xcolor} package included.
+
+\section{Dependencies}
+The following packages may be required:
+\begin{itemize}
+ \item \href{https://ctan.org/pkg/ulem}{\texttt{ulem}}: used for strikethrough (\texttt{\textbackslash{sout}}). This is required by default, unless the \hyperlink{opt_nosout}{\texttt{nosout}} option is used.
+
+ \item \href{https://ctan.org/pkg/xcolor}{\texttt{xcolor}}: used for coloring text. If included (i.e., \texttt{\textbackslash{textcolor}} is defined), \hyperlink{cmd_draftnote}{\texttt{\textbackslash{draftnote}}} is colored red by default.
+
+ \item \href{https://ctan.org/pkg/pdfcomment}{\texttt{pdfcomment}}: needed when \hyperlink{opt_pdfcomment}{\texttt{pdfcomment}} option is used.
+\end{itemize}
+
+
+\section{Package options}
+The following options can be used with \verb+\usepackage[...]{ezedits}+:
+\begin{itemize}
+ \item \hypertarget{opt_arrows}{\texttt{arrows}} add arrows ``$\Longleftarrow$'' pointing to edits in margins (in captions, a pair of arrows are added, instead; $\Longrightarrow$Like this$\Longleftarrow$). These arrows are styled based on the edit.
+
+ \item \hypertarget{opt_accept}{\texttt{accept}} accept all edits (arrows still appear if \texttt{arrows} option is used).
+
+ \item \hypertarget{opt_pdfcomment}{\texttt{pdfcomment}} write edits as pdf annotations (arrows still appear if \texttt{arrows} option is used).
+
+ \item \hypertarget{opt_nosout}{\texttt{nosout}} do not strikeout delete text (by default). If this option is set, the \texttt{ulem} package is not required.
+\end{itemize}
+
+
+\section{Commands}
+
+\noindent\hypertarget{cmd_draftnote}{\texttt{\textbackslash{draftnote}\{...\}}}
+
+This will generate a note in the text. Text is placed in square brackets and stylized to make it distinct from the rest of the text.
+
+\draftnote{Here is an example note}
+
+\vspace{5mm}\hrule\vspace{2mm}
+
+\noindent\hypertarget{cmd_defineEdit}{\texttt{\textbackslash{defineEdit}\{ABC\}\{$\langle$styleA$\rangle$\}\{$\langle$styleB$\rangle$\}}}
+
+This will generate a set of commands with the prefix \texttt{ABC} for editing where \texttt{$\langle$styleA$\rangle$} is used for omitted text and \texttt{$\langle$styleB$\rangle$} is used for added text.
+
+The following commands are generated:
+\begin{itemize}
+ \item \verb+\ABCEdit{del}{ins}+ Used to replace \verb+del+ with \verb+ins+.
+
+ For example: \ABCEdit{old}{new}.
+
+ \item \verb+\ABCIns{ins}+ Used to insert \verb+ins+.
+
+ For example: \ABCIns{new}.
+
+ \item \verb+\ABCDel{del}+ Used to delete \verb+del+.
+
+ For example: \ABCDel{old}.
+\end{itemize}
+
+
+\vspace{5mm}\hrule\vspace{2mm}
+
+\noindent\hypertarget{cmd_setnotestyle}{\texttt{\textbackslash{setnotestyle}}\{$\langle$style$\rangle$\}}
+
+Redefine how \hyperlink{cmd_draftnote}{\texttt{\textbackslash{draftnote}}} appears. Here, $\langle$style$\rangle$ is a macro that takes one argument and returns a styled version of that text.
+
+
+\vspace{5mm}\hrule\vspace{2mm}
+
+\noindent\hypertarget{cmd_makeeditreport}{\texttt{\textbackslash{makeeditreport}}}
+
+Creates a summary of which page edits appear on (at the point that the command is called). The output is a \texttt{tabular} environment.
+
+
+\section{Examples}
+Here, we use the following command to define the edit commands:
+
+\macroexample{\textbackslash{}defineEdit\{ABC\}\{\textbackslash{}color\{red\}\}\{\textbackslash{}color\{blue\}\}}
+
+Here, the first argument \verb+{ABC}+ is the prefix for the edit commands. The second argument \verb+{\color{red}}+ describes how to style deleted text (the text is always crossed-out). Finally, the third argument \verb+{\color{blue}}+ describes what to do with added text. Note that, if the \hyperlink{opt_arrows}{\texttt{arrows}} option is used, it will be styled according to the latter argument.
+
+A simple example of editing a sentence:
+\macroexample{This \textbackslash{}ABCIns\{sentence\} contains some \textbackslash{}ABCDel\{major\} errors, but that is \textbackslash{}ABCEdit\{ok\}\{not a big deal\}. \textbackslash{}drafNote\{Remember to clean up the document\}}
+
+\begin{center}
+ \fbox{\parbox{.9\linewidth}{This \ABCIns{sentence} contains some \ABCDel{major} errors, but that is \ABCEdit{ok}{not a big deal}. \draftnote{Remember to clean up the document}}}
+\end{center}
+
+
+\vspace{5mm}\hrule\vspace{2mm}
+
+The styling options are fairly flexible. For example, one can define their own macro \verb+\style{...}+ that takes one argument and stylizes it.
+For example, an alternative styling:
+\macroexample{\textbackslash{}defineEdit\{XYZ\}\{\textbackslash{}color\{gray\}\textbackslash{}textit\}\}\{\textbackslash{}textbf\}}
+So deleted text \XYZDel{will look like this} while added text \XYZIns{will look like this}.
+
+
+\vspace{5mm}\hrule\vspace{2mm}
+
+One can also include edits in (floating) figures. However, if \hyperlink{opt_arrows}{\texttt{arrows}} package option is used, the arrows will appear around the edit, instead of in the margin.
+\begin{figure}[h]
+ \centering
+ {\rule{1cm}{1cm}}
+ \caption{This is just a \ABCIns{black} box.}
+ \label{fig:blackbox}
+\end{figure}
+
+
+\vspace{5mm}\hrule\vspace{2mm}
+
+After making edits, one can generate a summary of edits using \verb+\makeeditreport+ (only includes edits/notes from before this command is called):
+
+\macroexample{
+\textbackslash{}begin\{table\}[h]\par
+~~~~\textbackslash{}centering\par
+~~~~\textbackslash{}makeeditreport\par
+\textbackslash{}end\{table\}
+}
+
+\begin{table}[h]
+ \centering
+ \makeeditreport
+\end{table}
+
+Note that warnings will also be raised for each edit/note at their location.
+
+\section{Possible issues}
+There are times where the page number used in \hyperlink{cmd_makeeditreport}{\texttt{\textbackslash{makeeditreport}}} may not be exactly correct. This has to do with how \LaTeX{} updates \verb+\thepage+. Namely, it tends to wait until new paragraphs. Also, floating environments can be pushed to a different page.
+
+There are certain cases in which the ``strikeout'' styling does not play nicely. For example, there may be issues when crossing-out citations (c.f., \href{https://tex.stackexchange.com/q/98222}{this Stack Exchange}). To resolve this, \texttt{ezedits} modifies the \verb+\sout+ command to put \verb+\cite{...}+ within an \verb+\mbox+. This results in the minor inconvenience of not letting citations cross multiple lines.
+
+Also, issues can arise when command covers many paragraphs --- the simple resolution to this would be to repeat the command per paragraph.
+
+
+\section{Acknowledgements}
+JAS would like to thank Abhay Hegde for suggesting the \hyperlink{cmd_makeeditreport}{\texttt{\textbackslash{makeeditreport}}} macro.
+
+
+\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/fmtcount/CHANGES b/macros/latex/contrib/fmtcount/CHANGES
index ce54ab42c8..298337ad9a 100644
--- a/macros/latex/contrib/fmtcount/CHANGES
+++ b/macros/latex/contrib/fmtcount/CHANGES
@@ -1,5 +1,13 @@
fmtcount package versions:
+Version 3.08
+
+* Add Dutch language support
+
+* Update special characters for German and Spanish
+
+* Fix test suite
+
Version 3.07:
* Make french definition robust against cleveref 0.21.4 dirty handling
diff --git a/macros/latex/contrib/fmtcount/README b/macros/latex/contrib/fmtcount/README
index 8a4fa7e918..b752ab23bd 100644
--- a/macros/latex/contrib/fmtcount/README
+++ b/macros/latex/contrib/fmtcount/README
@@ -1,11 +1,6 @@
-LaTeX Package : fmtcount v3.07
+LaTeX Package : fmtcount v3.08
-
-(c) Copyright 2000-2013 Nicola LC Talbot
-(c) Copyright 2013-2020 Nicola LC Talbot and Vincent Bela\"iche
-
-
-Last Modified : 2020-02-24
+Last Modified : 2024-08-31
Author : Nicola Talbot and Vincent Belaïche
diff --git a/macros/latex/contrib/fmtcount/fmtcount.dtx b/macros/latex/contrib/fmtcount/fmtcount.dtx
index 0525133f83..4f1bdf8166 100644
--- a/macros/latex/contrib/fmtcount/fmtcount.dtx
+++ b/macros/latex/contrib/fmtcount/fmtcount.dtx
@@ -3,9 +3,9 @@
% Command line args:
% -src "(.+)\.(sty|def)$=>\1.\2"
% -doc "fmtcount-manual.tex"
-% -author "Nicola Talbot and Vincent Belache"
+% -author "Nicola Talbot and Vincent Belaïche"
% fmtcount
-% Created on 2020/2/24 20:03
+% Created on 2024/8/31 14:57
%\fi
%\iffalse
%<*package>
@@ -28,7 +28,7 @@
%\fi
% \iffalse
% Doc-Source file to use with LaTeX2e
-% Copyright (C) 2020 Nicola Talbot and Vincent Belache, all rights reserved.
+% Copyright (C) 2024 Nicola Talbot and Vincent Belaïche, all rights reserved.
% \fi
% \iffalse
%<*driver>
@@ -77,7 +77,7 @@
pdftitle={fmtcount.sty: Displaying the Values of LaTeX Counters},
pdfkeywords={LaTeX,counter}]{hyperref}
-\CheckSum{10315}
+\CheckSum{10834}
\doxitem{Option}{option}{options}
@@ -104,7 +104,7 @@
% \url{www.dickimaw-books.com}
% \and
% Vincent Bela\"iche}
-% \date{2020-02-24 (version 3.07)\relax
+% \date{2024-08-31 (version 3.08)\relax
%}
% \maketitle
% \tableofcontents
@@ -1184,6 +1184,414 @@
%\fi
%\iffalse
% \begin{macrocode}
+%<*fc-dutch.def>
+% \end{macrocode}
+%\fi
+% \subsubsection{fc-dutch.def}
+% Dutch definitions, initially added by Erik Nijenhuis.
+% \begin{macrocode}
+\ProvidesFCLanguage{dutch}[2024/01/27]%
+% \end{macrocode}
+% Define macro that converts a number or count register (first
+% argument) to an ordinal, and stores the result in the
+% second argument, which should be a control sequence.
+% \begin{macrocode}
+\newcommand{\@ordinalMdutch}[2]{\edef#2{\number#1\relax.}}%
+\global\let\@ordinalMdutch\@ordinalMdutch
+% \end{macrocode}
+% Like English, there is no gender difference in Dutch,
+% so make feminine and neuter the same as the masculine.
+% \begin{macrocode}
+\global\let\@ordinalFdutch\@ordinalMdutch
+\global\let\@ordinalNdutch\@ordinalMdutch
+% \end{macrocode}
+% Define the macro that prints the value of a \TeX\ count register
+% as text. To make it easier, break it up into units, teens and
+% tens. First, the units: the argument should be between 0 and 9
+% inclusive.
+% \begin{macrocode}
+\newcommand*\@@unitstringdutch[1]{%
+ \ifcase#1%
+ nul%
+ \or een% één and \'e\'en not working atm
+ \or twee%
+ \or drie%
+ \or vier%
+ \or vijf%
+ \or zes%
+ \or zeven%
+ \or acht%
+ \or negen%
+ \fi
+}%
+\global\let\@@unitstringdutch\@@unitstringdutch
+% \end{macrocode}
+% Next the tens, again the argument should be between 0 and 9
+% inclusive.
+% \begin{macrocode}
+\global\let\@@unitstringdutch\@@unitstringdutch
+\newcommand*\@@tenstringdutch[1]{%
+ \ifcase#1%
+ \or tien%
+ \or twintig%
+ \or dertig%
+ \or veertig%
+ \or vijftig%
+ \or zestig%
+ \or zeventig%
+ \or tachtig%
+ \or negentig%
+ \or honderd%
+ \fi
+}%
+\global\let\@@tenstringdutch\@@tenstringdutch
+% \end{macrocode}
+% Finally the teens, again the argument should be between 0 and 9
+% inclusive.
+% \begin{macrocode}
+\newcommand*\@@teenstringdutch[1]{%
+ \ifcase#1%
+ tien%
+ \or elf%
+ \or twaalf%
+ \or dertien%
+ \or veertien%
+ \or vijftien%
+ \or zestien%
+ \or zeventien%
+ \or achttien%
+ \or negentien%
+ \fi
+}%
+\global\let\@@teenstringdutch\@@teenstringdutch
+% \end{macrocode}
+% Hunderd and thousand:
+% \begin{macrocode}
+\providecommand*{\honderd}{honderd}%
+\providecommand*{\duizend}{duizend}%
+\global\let\honderd\honderd
+\global\let\duizend\duizend
+% \end{macrocode}
+% The numberstring implementation:
+% \begin{macrocode}
+\newcommand*\@@numberstringdutch[2]{%
+ \ifnum#1>99999\relax
+ \PackageError{fmtcount}{Out of range}%
+ {This macro only works for values less than 100000}%
+ \else
+ \ifnum#1<0\relax
+ \PackageError{fmtcount}{Negative numbers not permitted}%
+ {This macro does not work for negative numbers, however
+ you can try typing "minus" first, and then pass the modulus of
+ this number}%
+ \fi
+ \fi
+ \def#2{}%
+ \@strctr=#1\relax \divide\@strctr by 1000\relax
+ \ifnum\@strctr>1\relax
+ \@@numberunderhundreddutch{\@strctr}{#2}%
+ \appto#2{duizend}%
+ \else
+ \ifnum\@strctr=1\relax
+ \eappto#2{\duizend}%
+ \fi
+ \fi
+ \@strctr=#1\relax
+ \@FCmodulo{\@strctr}{1000}%
+ \divide\@strctr by 100\relax
+ \ifnum\@strctr>1\relax
+ \eappto#2{\@unitstring{\@strctr}honderd}%
+ \else
+ \ifnum\@strctr=1\relax
+ \ifnum#1>1000\relax
+ \appto#2{honderd}%
+ \else
+ \eappto#2{\honderd}%
+ \fi
+ \fi
+ \fi
+ \@strctr=#1\relax
+ \@FCmodulo{\@strctr}{100}%
+ \ifnum#1=0\relax
+ \def#2{null}%
+ \else
+ \ifnum\@strctr=1\relax
+ \appto#2{een}% één and \'e\'en not working atm
+ \else
+ \@@numberunderhundreddutch{\@strctr}{#2}%
+ \fi
+ \fi
+}%
+\global\let\@@numberstringdutch\@@numberstringdutch
+% \end{macrocode}
+% All lower case version, the second argument must be a control
+% sequence.
+% \begin{macrocode}
+\newcommand*{\@numberstringMdutch}[2]{%
+ \let\@unitstring=\@@unitstringdutch%
+ \let\@teenstring=\@@teenstringdutch%
+ \let\@tenstring=\@@tenstringdutch%
+ \def\@hundred{honderd}\def\@thousand{duizend}%
+ \@@numberstringdutch{#1}{#2}%
+}%
+\global\let\@numberstringMdutch\@numberstringMdutch
+% \end{macrocode}
+% There is no gender in Dutch, so make feminine and neuter the
+% same
+% as the masculine.
+% \begin{macrocode}
+\global\let\@numberstringFdutch=\@numberstringMdutch
+\global\let\@numberstringNdutch=\@numberstringMdutch
+% \end{macrocode}
+% This version makes the first letter of each word an uppercase
+% character (except ``and''). The second argument must be a control
+% sequence.
+% \begin{macrocode}
+\newcommand*{\@NumberstringMdutch}[2]{%
+ \@numberstringMdutch{#1}{\@@num@str}%
+ \edef#2{\noexpand\MakeUppercase\expandonce\@@num@str}%
+}%
+\global\let\@NumberstringMdutch\@NumberstringMdutch
+% \end{macrocode}
+% There is no gender in Dutch, so make feminine and neuter the
+% same
+% as the masculine.
+% \begin{macrocode}
+\global\let\@NumberstringFdutch=\@NumberstringMdutch
+\global\let\@NumberstringNdutch=\@NumberstringMdutch
+% \end{macrocode}
+% Define a macro that produces an ordinal as a string. Again, break
+% it up into units, teens and tens. First the units:
+% \begin{macrocode}
+\newcommand*\@@unitthstringdutch[1]{%
+ \ifcase#1%
+ nulde%
+ \or eerste% éérste and \'e\'erste not working atm
+ \or tweede%
+ \or derde%
+ \or vierde%
+ \or vijfde%
+ \or zesde%
+ \or zevende%
+ \or achtste%
+ \or negende%
+ \fi
+}%
+\global\let\@@unitthstringdutch\@@unitthstringdutch
+% \end{macrocode}
+% Next the tens:
+% \begin{macrocode}
+\newcommand*\@@tenthstringdutch[1]{%
+ \ifcase#1%
+ \or tiende%
+ \or twintigste%
+ \or dertigste%
+ \or veertigste%
+ \or vijftigste%
+ \or zestigste%
+ \or zeventigste%
+ \or tachtigste%
+ \or negentigste%
+ \fi
+}%
+\global\let\@@tenthstringdutch\@@tenthstringdutch
+% \end{macrocode}
+% The teens:
+% \begin{macrocode}
+\newcommand*\@@teenthstringdutch[1]{%
+ \ifcase#1%
+ tiende%
+ \or elfde%
+ \or twaalfde%
+ \or dertiende%
+ \or veertiende%
+ \or vijftiende%
+ \or zestiende%
+ \or zeventiende%
+ \or achttiende%
+ \or negentiende%
+ \fi
+}%
+\global\let\@@teenthstringdutch\@@teenthstringdutch
+% \end{macrocode}
+% The ordinalstring implementation:
+% \begin{macrocode}
+\newcommand*\@@ordinalstringdutch[2]{%
+ \@orgargctr=#1\relax
+ \ifnum\@orgargctr>99999\relax
+ \PackageError{fmtcount}{Out of range}%
+ {This macro only works for values less than 100000}%
+ \else
+ \ifnum\@orgargctr<0\relax
+ \PackageError{fmtcount}{Negative numbers not permitted}%
+ {This macro does not work for negative numbers, however
+ you can try typing "minus" first, and then pass the modulus of
+ this number}%
+ \fi
+ \fi
+ \def#2{}%
+ \@strctr=\@orgargctr\divide\@strctr by 1000\relax
+ \ifnum\@strctr>1\relax
+ \@@numberunderhundreddutch{\@strctr}{#2}%
+ \@tmpstrctr=\@orgargctr\@FCmodulo{\@tmpstrctr}{1000}%
+ \ifnum\@tmpstrctr=0\relax
+ \eappto#2{\@thousandth}%
+ \else
+ \appto#2{duizend}%
+ \fi
+ \else
+ \ifnum\@strctr=1\relax
+ \ifnum\@orgargctr=1000\relax
+ \eappto#2{\@thousandth}%
+ \else
+ \eappto#2{\duizend}%
+ \fi
+ \fi
+ \fi
+ \@strctr=\@orgargctr%
+ \@FCmodulo{\@strctr}{1000}%
+ \divide\@strctr by 100\relax
+ \ifnum\@strctr>1\relax
+ \@tmpstrctr=\@orgargctr \@FCmodulo{\@tmpstrctr}{100}%
+ \ifnum\@tmpstrctr=0\relax
+ \ifnum\@strctr=1\relax
+ \eappto#2{\@hundredth}%
+ \else
+ \eappto#2{\@unitstring{\@strctr}\@hundredth}%
+ \fi
+ \else
+ \eappto#2{\@unitstring{\@strctr}honderd}%
+ \fi
+ \else
+ \ifnum\@strctr=1\relax
+ \@tmpstrctr=\@orgargctr \@FCmodulo{\@tmpstrctr}{100}%
+ \ifnum\@tmpstrctr=0\relax
+ \eappto#2{\@hundredth}%
+ \else
+ \ifnum\@orgargctr>1000\relax
+ \appto#2{honderd}%
+ \else
+ \eappto#2{\honderd}%
+ \fi
+ \fi
+ \fi
+ \fi
+ \@strctr=\@orgargctr%
+ \@FCmodulo{\@strctr}{100}%
+ \ifthenelse{\@strctr=0 \and \@orgargctr>0 }{}{%
+ \@@numberunderhundredthdutch{\@strctr}{#2}%
+ }%
+}%
+\global\let\@@ordinalstringdutch\@@ordinalstringdutch
+% \end{macrocode}
+% All lower case version. Again, the second argument must be a
+% control sequence in which the resulting text is stored.
+% \begin{macrocode}
+\newcommand*{\@ordinalstringMdutch}[2]{%
+ \let\@unitthstring=\@@unitthstringdutch%
+ \let\@teenthstring=\@@teenthstringdutch%
+ \let\@tenthstring=\@@tenthstringdutch%
+ \let\@unitstring=\@@unitstringdutch%
+ \let\@teenstring=\@@teenstringdutch%
+ \let\@tenstring=\@@tenstringdutch%
+ \def\@thousandth{duizendste}%
+ \def\@hundredth{honderdste}%
+ \@@ordinalstringdutch{#1}{#2}%
+}%
+\global\let\@ordinalstringMdutch\@ordinalstringMdutch
+% \end{macrocode}
+% No gender in Dutch, so make feminine and neuter same as
+% masculine:
+% \begin{macrocode}
+\global\let\@ordinalstringFdutch=\@ordinalstringMdutch
+\global\let\@ordinalstringNdutch=\@ordinalstringMdutch
+% \end{macrocode}
+% First letter of each word in upper case:
+% \begin{macrocode}
+\newcommand*{\@OrdinalstringMdutch}[2]{%
+ \@ordinalstringMdutch{#1}{\@@num@str}%
+ \def\@hundred{Honderd}\def\@thousand{Duizend}%
+ \def\@hundredth{Honderdste}\def\@thousandth{Duizendste}%
+ \edef#2{\noexpand\MakeUppercase\expandonce\@@num@str}%
+}%
+\global\let\@OrdinalstringMdutch\@OrdinalstringMdutch
+% \end{macrocode}
+% No gender in Dutch, so make feminine and neuter same as
+% masculine:
+% \begin{macrocode}
+\global\let\@OrdinalstringFdutch=\@OrdinalstringMdutch
+\global\let\@OrdinalstringNdutch=\@OrdinalstringMdutch
+% \end{macrocode}
+% For numbers under hunderd:
+% \begin{macrocode}
+\newcommand*{\@@numberunderhundreddutch}[2]{%
+ \ifnum#1<10\relax
+ \ifnum#1>0\relax
+ \eappto#2{\@unitstring{#1}}%
+ \fi
+ \else
+ \@tmpstrctr=#1\relax
+ \@FCmodulo{\@tmpstrctr}{10}%
+ \ifnum#1<20\relax
+ \eappto#2{\@teenstring{\@tmpstrctr}}%
+ \else
+ \ifnum\@tmpstrctr=0\relax
+ \else
+% \end{macrocode}
+% For digits ending with an `e', a trema gets added for \cs{@andname}.
+% Take for example drieëntwintig or tweeënveertig.
+% \begin{macrocode}
+ \ifnum\@tmpstrctr=2\relax\def\@andname{ën}%
+ \else\ifnum\@tmpstrctr=3\relax\def\@andname{ën}%
+ \else\def\@andname{en}%
+ \fi\fi%
+ \eappto#2{\@unitstring{\@tmpstrctr}\@andname}%
+ \fi
+ \@tmpstrctr=#1\relax
+ \divide\@tmpstrctr by 10\relax
+ \eappto#2{\@tenstring{\@tmpstrctr}}%
+ \fi
+ \fi
+}%
+\global\let\@@numberunderhundreddutch\@@numberunderhundreddutch
+\newcommand*{\@@numberunderhundredthdutch}[2]{%
+ \ifnum#1<10\relax
+ \eappto#2{\@unitthstring{#1}}%
+ \else
+ \@tmpstrctr=#1\relax
+ \@FCmodulo{\@tmpstrctr}{10}%
+ \ifnum#1<20\relax
+ \eappto#2{\@teenthstring{\@tmpstrctr}}%
+ \else
+ \ifnum\@tmpstrctr=0\relax
+ \else
+% \end{macrocode}
+% Again, for digits ending with an `e', a trema gets added for \cs{@andname} (drieëntwintig or tweeënveertig).
+% \begin{macrocode}
+ \ifnum\@tmpstrctr=2\relax\def\@andname{ën}%
+ \else\ifnum\@tmpstrctr=3\relax\def\@andname{ën}%
+ \else\def\@andname{en}%
+ \fi\fi%
+ \eappto#2{\@unitstring{\@tmpstrctr}\@andname}%
+ \fi
+ \@tmpstrctr=#1\relax
+ \divide\@tmpstrctr by 10\relax
+ \eappto#2{\@tenthstring{\@tmpstrctr}}%
+ \fi
+ \fi
+}%
+\global\let\@@numberunderhundredthdutch\@@numberunderhundredthdutch
+% \end{macrocode}
+\iffalse Local variables: \fi
+\iffalse mode: docTeX \fi
+\iffalse End: \fi
+%\iffalse
+% \begin{macrocode}
+%</fc-dutch.def>
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
%<*fc-english.def>
% \end{macrocode}
%\fi
@@ -1804,7 +2212,7 @@ this number}%
% \subsubsection{fc-french.def}
% Definitions for French.
% \begin{macrocode}
-\ProvidesFCLanguage{french}[2020/02/24]%
+\ProvidesFCLanguage{french}[2017/06/15]%
% \end{macrocode}
% Package \styfmt{fcprefix} is needed to format the prefix \meta{$n$}
% in \meta{$n$}illion or \meta{$n$}illiard. Big numbers were
@@ -3659,7 +4067,7 @@ z\'ero%
\or zwei%
\or drei%
\or vier%
- \or f\"unf%
+ \or fünf%
\or sechs%
\or sieben%
\or acht%
@@ -3674,9 +4082,9 @@ z\'ero%
\ifcase#1%
\or zehn%
\or zwanzig%
- \or drei{\ss}ig%
+ \or dreißig%
\or vierzig%
- \or f\"unfzig%
+ \or fünfzig%
\or sechzig%
\or siebzig%
\or achtzig%
@@ -3686,9 +4094,9 @@ z\'ero%
}%
\global\let\@@tenstringgerman\@@tenstringgerman
% \end{macrocode}
-% |\einhundert| is set to |einhundert| by default, user can
+% \cs{einhundert} is set to |einhundert| by default, user can
% redefine this command to just |hundert| if required, similarly
-% for |\eintausend|.
+% for \cs{eintausend}.
% \begin{macrocode}
\providecommand*{\einhundert}{einhundert}%
\providecommand*{\eintausend}{eintausend}%
@@ -3701,10 +4109,10 @@ z\'ero%
\ifcase#1%
zehn%
\or elf%
- \or zw\"olf%
+ \or zwölf%
\or dreizehn%
\or vierzehn%
- \or f\"unfzehn%
+ \or fünfzehn%
\or sechzehn%
\or siebzehn%
\or achtzehn%
@@ -3822,7 +4230,7 @@ z\'ero%
% it is easier to split it into units, tens and teens.
% Units:
%\changes{2.0}{2012-09-25}{fixed spelling mistake (correction
-%provided by Dominik Wa\ss enhoven)}
+%provided by Dominik Waß enhoven)}
% \begin{macrocode}
\newcommand*\@@unitthstringMgerman[1]{%
\ifcase#1%
@@ -3831,7 +4239,7 @@ z\'ero%
\or zweiter%
\or dritter%
\or vierter%
- \or f\"unfter%
+ \or fünfter%
\or sechster%
\or siebter%
\or achter%
@@ -3846,9 +4254,9 @@ z\'ero%
\ifcase#1%
\or zehnter%
\or zwanzigster%
- \or drei{\ss}igster%
+ \or dreißigster%
\or vierzigster%
- \or f\"unfzigster%
+ \or fünfzigster%
\or sechzigster%
\or siebzigster%
\or achtzigster%
@@ -3863,10 +4271,10 @@ z\'ero%
\ifcase#1%
zehnter%
\or elfter%
- \or zw\"olfter%
+ \or zwölfter%
\or dreizehnter%
\or vierzehnter%
- \or f\"unfzehnter%
+ \or fünfzehnter%
\or sechzehnter%
\or siebzehnter%
\or achtzehnter%
@@ -3884,7 +4292,7 @@ z\'ero%
\or zweite%
\or dritte%
\or vierte%
- \or f\"unfte%
+ \or fünfte%
\or sechste%
\or siebte%
\or achte%
@@ -3899,9 +4307,9 @@ z\'ero%
\ifcase#1%
\or zehnte%
\or zwanzigste%
- \or drei{\ss}igste%
+ \or dreißigste%
\or vierzigste%
- \or f\"unfzigste%
+ \or fünfzigste%
\or sechzigste%
\or siebzigste%
\or achtzigste%
@@ -3916,10 +4324,10 @@ z\'ero%
\ifcase#1%
zehnte%
\or elfte%
- \or zw\"olfte%
+ \or zwölfte%
\or dreizehnte%
\or vierzehnte%
- \or f\"unfzehnte%
+ \or fünfzehnte%
\or sechzehnte%
\or siebzehnte%
\or achtzehnte%
@@ -3939,7 +4347,7 @@ z\'ero%
\or zweites%
\or drittes%
\or viertes%
- \or f\"unftes%
+ \or fünftes%
\or sechstes%
\or siebtes%
\or achtes%
@@ -3954,9 +4362,9 @@ z\'ero%
\ifcase#1%
\or zehntes%
\or zwanzigstes%
- \or drei{\ss}igstes%
+ \or dreißigstes%
\or vierzigstes%
- \or f\"unfzigstes%
+ \or fünfzigstes%
\or sechzigstes%
\or siebzigstes%
\or achtzigstes%
@@ -3971,10 +4379,10 @@ z\'ero%
\ifcase#1%
zehntes%
\or elftes%
- \or zw\"olftes%
+ \or zwölftes%
\or dreizehntes%
\or vierzehntes%
- \or f\"unfzehntes%
+ \or fünfzehntes%
\or sechzehntes%
\or siebzehntes%
\or achtzehntes%
@@ -4257,42 +4665,79 @@ z\'ero%
\RequirePackage{itnumpar}
\newcommand{\@numberstringMitalian}[2]{%
- \edef#2{\noexpand\printnumeroinparole{#1}}%
+ \begingroup
+ \def\np@oa{o}%
+ \count@=#1
+ \edef\@tempa{\def\noexpand#2{\@numeroinparole{\count@}}}%
+ \expandafter
+ \endgroup\@tempa
}
\global\let\@numberstringMitalian\@numberstringMitalian
\newcommand{\@numberstringFitalian}[2]{%
- \edef#2{\noexpand\printnumeroinparole{#1}}}
+ \begingroup
+ \def\np@oa{a}%
+ \count@=#1
+ \edef\@tempa{\def\noexpand#2{\@numeroinparole{\count@}}}%
+ \expandafter
+ \endgroup\@tempa
+}
\global\let\@numberstringFitalian\@numberstringFitalian
\newcommand{\@NumberstringMitalian}[2]{%
- \edef#2{\noexpand\printNumeroinparole{#1}}%
+ \begingroup
+ \def\np@oa{o}%
+ \count@=#1
+ \edef\@tempa{\def\noexpand#2{\@Numeroinparole{\count@}}}%
+ \expandafter
+ \endgroup\@tempa
}
\global\let\@NumberstringMitalian\@NumberstringMitalian
\newcommand{\@NumberstringFitalian}[2]{%
- \edef#2{\noexpand\printNumeroinparole{#1}}%
+ \begingroup
+ \def\np@oa{a}%
+ \count@=#1
+ \edef\@tempa{\def\noexpand#2{\@Numeroinparole{\count@}}}%
+ \expandafter
+ \endgroup\@tempa
}
\global\let\@NumberstringFitalian\@NumberstringFitalian
\newcommand{\@ordinalstringMitalian}[2]{%
- \edef#2{\noexpand\printordinalem{#1}}%
+ \begingroup
+ \count@=#1
+ \edef\@tempa{\def\noexpand#2{\@ordinalem{\count@}}}%
+ \expandafter
+ \endgroup\@tempa
}
\global\let\@ordinalstringMitalian\@ordinalstringMitalian
\newcommand{\@ordinalstringFitalian}[2]{%
- \edef#2{\noexpand\printordinalef{#1}}%
+ \begingroup
+ \count@=#1
+ \edef\@tempa{\def\noexpand#2{\@ordinalef{\count@}}}%
+ \expandafter
+ \endgroup\@tempa
}
\global\let\@ordinalstringFitalian\@ordinalstringFitalian
\newcommand{\@OrdinalstringMitalian}[2]{%
- \edef#2{\noexpand\printOrdinalem{#1}}%
+ \begingroup
+ \count@=#1
+ \edef\@tempa{\def\noexpand#2{\@Ordinalem{\count@}}}%
+ \expandafter
+ \endgroup\@tempa
}
\global\let\@OrdinalstringMitalian\@OrdinalstringMitalian
\newcommand{\@OrdinalstringFitalian}[2]{%
- \edef#2{\noexpand\printOrdinalef{#1}}%
+ \begingroup
+ \count@=#1
+ \edef\@tempa{\def\noexpand#2{\@Ordinalef{\count@}}}%
+ \expandafter
+ \endgroup\@tempa
}
\global\let\@OrdinalstringFitalian\@OrdinalstringFitalian
@@ -5348,7 +5793,7 @@ this number}%
\or trece%
\or catorce%
\or quince%
- \or diecis\'eis%
+ \or dieciséis%
\or diecisiete%
\or dieciocho%
\or diecinueve%
@@ -5362,11 +5807,11 @@ this number}%
\ifcase#1\relax
veinte%
\or veintiuno%
- \or veintid\'os%
- \or veintitr\'es%
+ \or veintidós%
+ \or veintitrés%
\or veinticuatro%
\or veinticinco%
- \or veintis\'eis%
+ \or veintiséis%
\or veintisiete%
\or veintiocho%
\or veintinueve%
@@ -5380,11 +5825,11 @@ this number}%
\ifcase#1\relax
veinte%
\or veintiuna%
- \or veintid\'os%
- \or veintitr\'es%
+ \or veintidós%
+ \or veintitrés%
\or veinticuatro%
\or veinticinco%
- \or veintis\'eis%
+ \or veintiséis%
\or veintisiete%
\or veintiocho%
\or veintinueve%
@@ -5492,7 +5937,7 @@ this number}%
\or Trece%
\or Catorce%
\or Quince%
- \or Diecis\'eis%
+ \or Dieciséis%
\or Diecisiete%
\or Dieciocho%
\or Diecinueve%
@@ -5506,11 +5951,11 @@ this number}%
\ifcase#1\relax
Veinte%
\or Veintiuno%
- \or Veintid\'os%
- \or Veintitr\'es%
+ \or Veintidós%
+ \or Veintitrés%
\or Veinticuatro%
\or Veinticinco%
- \or Veintis\'eis%
+ \or Veintiséis%
\or Veintisiete%
\or Veintiocho%
\or Veintinueve%
@@ -5524,11 +5969,11 @@ this number}%
\ifcase#1\relax
Veinte%
\or Veintiuna%
- \or Veintid\'os%
- \or Veintitr\'es%
+ \or Veintidós%
+ \or Veintitrés%
\or Veinticuatro%
\or Veinticinco%
- \or Veintis\'eis%
+ \or Veintiséis%
\or Veintisiete%
\or Veintiocho%
\or Veintinueve%
@@ -5657,7 +6102,7 @@ this number}%
\let\@teenthstring=\@@teenthstringspanish
\let\@tenthstring=\@@tenthstringspanish
\let\@hundredthstring=\@@hundredthstringspanish
- \def\@thousandth{mil\'esimo}%
+ \def\@thousandth{milésimo}%
\@@ordinalstringspanish{#1}{#2}%
}%
\global\let\@ordinalstringMspanish\@ordinalstringMspanish
@@ -5670,7 +6115,7 @@ this number}%
\let\@teenthstring=\@@teenthstringFspanish
\let\@tenthstring=\@@tenthstringFspanish
\let\@hundredthstring=\@@hundredthstringFspanish
- \def\@thousandth{mil\'esima}%
+ \def\@thousandth{milésima}%
\@@ordinalstringspanish{#1}{#2}%
}%
\global\let\@ordinalstringFspanish\@ordinalstringFspanish
@@ -5687,7 +6132,7 @@ this number}%
\let\@teenthstring=\@@Teenthstringspanish
\let\@tenthstring=\@@Tenthstringspanish
\let\@hundredthstring=\@@Hundredthstringspanish
- \def\@thousandth{Mil\'esimo}%
+ \def\@thousandth{Milésimo}%
\@@ordinalstringspanish{#1}{#2}%
}
\global\let\@OrdinalstringMspanish\@OrdinalstringMspanish
@@ -5700,7 +6145,7 @@ this number}%
\let\@teenthstring=\@@TeenthstringFspanish
\let\@tenthstring=\@@TenthstringFspanish
\let\@hundredthstring=\@@HundredthstringFspanish
- \def\@thousandth{Mil\'esima}%
+ \def\@thousandth{Milésima}%
\@@ordinalstringspanish{#1}{#2}%
}%
\global\let\@OrdinalstringFspanish\@OrdinalstringFspanish
@@ -5722,7 +6167,7 @@ this number}%
\or cuarto%
\or quinto%
\or sexto%
- \or s\'eptimo%
+ \or séptimo%
\or octavo%
\or noveno%
\fi
@@ -5733,15 +6178,15 @@ this number}%
% \begin{macrocode}
\newcommand*\@@tenthstringspanish[1]{%
\ifcase#1\relax
- \or d\'ecimo%
- \or vig\'esimo%
- \or trig\'esimo%
- \or cuadrag\'esimo%
- \or quincuag\'esimo%
- \or sexag\'esimo%
- \or septuag\'esimo%
- \or octog\'esimo%
- \or nonag\'esimo%
+ \or décimo%
+ \or vigésimo%
+ \or trigésimo%
+ \or cuadragésimo%
+ \or quincuagésimo%
+ \or sexagésimo%
+ \or septuagésimo%
+ \or octogésimo%
+ \or nonagésimo%
\fi
}%
\global\let\@@tenthstringspanish\@@tenthstringspanish
@@ -5750,14 +6195,14 @@ this number}%
% \begin{macrocode}
\newcommand*\@@teenthstringspanish[1]{%
\ifcase#1\relax
- d\'ecimo%
- \or und\'ecimo%
- \or duod\'ecimo%
+ décimo%
+ \or undécimo%
+ \or duodécimo%
\or decimotercero%
\or decimocuarto%
\or decimoquinto%
\or decimosexto%
- \or decimos\'eptimo%
+ \or decimoséptimo%
\or decimoctavo%
\or decimonoveno%
\fi
@@ -5768,15 +6213,15 @@ this number}%
% \begin{macrocode}
\newcommand*\@@hundredthstringspanish[1]{%
\ifcase#1\relax
- \or cent\'esimo%
- \or ducent\'esimo%
- \or tricent\'esimo%
- \or cuadringent\'esimo%
- \or quingent\'esimo%
- \or sexcent\'esimo%
- \or septing\'esimo%
- \or octingent\'esimo%
- \or noningent\'esimo%
+ \or centésimo%
+ \or ducentésimo%
+ \or tricentésimo%
+ \or cuadringentésimo%
+ \or quingentésimo%
+ \or sexcentésimo%
+ \or septingésimo%
+ \or octingentésimo%
+ \or noningentésimo%
\fi
}%
\global\let\@@hundredthstringspanish\@@hundredthstringspanish
@@ -5792,7 +6237,7 @@ this number}%
\or cuarta%
\or quinta%
\or sexta%
- \or s\'eptima%
+ \or séptima%
\or octava%
\or novena%
\fi
@@ -5803,15 +6248,15 @@ this number}%
% \begin{macrocode}
\newcommand*\@@tenthstringFspanish[1]{%
\ifcase#1\relax
- \or d\'ecima%
- \or vig\'esima%
- \or trig\'esima%
- \or cuadrag\'esima%
- \or quincuag\'esima%
- \or sexag\'esima%
- \or septuag\'esima%
- \or octog\'esima%
- \or nonag\'esima%
+ \or décima%
+ \or vigésima%
+ \or trigésima%
+ \or cuadragésima%
+ \or quincuagésima%
+ \or sexagésima%
+ \or septuagésima%
+ \or octogésima%
+ \or nonagésima%
\fi
}%
\global\let\@@tenthstringFspanish\@@tenthstringFspanish
@@ -5820,14 +6265,14 @@ this number}%
% \begin{macrocode}
\newcommand*\@@teenthstringFspanish[1]{%
\ifcase#1\relax
- d\'ecima%
- \or und\'ecima%
- \or duod\'ecima%
+ décima%
+ \or undécima%
+ \or duodécima%
\or decimotercera%
\or decimocuarta%
\or decimoquinta%
\or decimosexta%
- \or decimos\'eptima%
+ \or decimoséptima%
\or decimoctava%
\or decimonovena%
\fi
@@ -5838,15 +6283,15 @@ this number}%
% \begin{macrocode}
\newcommand*\@@hundredthstringFspanish[1]{%
\ifcase#1\relax
- \or cent\'esima%
- \or ducent\'esima%
- \or tricent\'esima%
- \or cuadringent\'esima%
- \or quingent\'esima%
- \or sexcent\'esima%
- \or septing\'esima%
- \or octingent\'esima%
- \or noningent\'esima%
+ \or centésima%
+ \or ducentésima%
+ \or tricentésima%
+ \or cuadringentésima%
+ \or quingentésima%
+ \or sexcentésima%
+ \or septingésima%
+ \or octingentésima%
+ \or noningentésima%
\fi
}%
\global\let\@@hundredthstringFspanish\@@hundredthstringFspanish
@@ -5862,7 +6307,7 @@ this number}%
\or Cuarto%
\or Quinto%
\or Sexto%
- \or S\'eptimo%
+ \or Séptimo%
\or Octavo%
\or Noveno%
\fi
@@ -5873,15 +6318,15 @@ this number}%
% \begin{macrocode}
\newcommand*\@@Tenthstringspanish[1]{%
\ifcase#1\relax
- \or D\'ecimo%
- \or Vig\'esimo%
- \or Trig\'esimo%
- \or Cuadrag\'esimo%
- \or Quincuag\'esimo%
- \or Sexag\'esimo%
- \or Septuag\'esimo%
- \or Octog\'esimo%
- \or Nonag\'esimo%
+ \or Décimo%
+ \or Vigésimo%
+ \or Trigésimo%
+ \or Cuadragésimo%
+ \or Quincuagésimo%
+ \or Sexagésimo%
+ \or Septuagésimo%
+ \or Octogésimo%
+ \or Nonagésimo%
\fi
}%
\global\let\@@Tenthstringspanish\@@Tenthstringspanish
@@ -5890,14 +6335,14 @@ this number}%
% \begin{macrocode}
\newcommand*\@@Teenthstringspanish[1]{%
\ifcase#1\relax
- D\'ecimo%
- \or Und\'ecimo%
- \or Duod\'ecimo%
+ Décimo%
+ \or Undécimo%
+ \or Duodécimo%
\or Decimotercero%
\or Decimocuarto%
\or Decimoquinto%
\or Decimosexto%
- \or Decimos\'eptimo%
+ \or Decimoséptimo%
\or Decimoctavo%
\or Decimonoveno%
\fi
@@ -5908,15 +6353,15 @@ this number}%
% \begin{macrocode}
\newcommand*\@@Hundredthstringspanish[1]{%
\ifcase#1\relax
- \or Cent\'esimo%
- \or Ducent\'esimo%
- \or Tricent\'esimo%
- \or Cuadringent\'esimo%
- \or Quingent\'esimo%
- \or Sexcent\'esimo%
- \or Septing\'esimo%
- \or Octingent\'esimo%
- \or Noningent\'esimo%
+ \or Centésimo%
+ \or Ducentésimo%
+ \or Tricentésimo%
+ \or Cuadringentésimo%
+ \or Quingentésimo%
+ \or Sexcentésimo%
+ \or Septingésimo%
+ \or Octingentésimo%
+ \or Noningentésimo%
\fi
}%
\global\let\@@Hundredthstringspanish\@@Hundredthstringspanish
@@ -5932,7 +6377,7 @@ this number}%
\or Cuarta%
\or Quinta%
\or Sexta%
- \or S\'eptima%
+ \or Séptima%
\or Octava%
\or Novena%
\fi
@@ -5943,15 +6388,15 @@ this number}%
% \begin{macrocode}
\newcommand*\@@TenthstringFspanish[1]{%
\ifcase#1\relax
- \or D\'ecima%
- \or Vig\'esima%
- \or Trig\'esima%
- \or Cuadrag\'esima%
- \or Quincuag\'esima%
- \or Sexag\'esima%
- \or Septuag\'esima%
- \or Octog\'esima%
- \or Nonag\'esima%
+ \or Décima%
+ \or Vigésima%
+ \or Trigésima%
+ \or Cuadragésima%
+ \or Quincuagésima%
+ \or Sexagésima%
+ \or Septuagésima%
+ \or Octogésima%
+ \or Nonagésima%
\fi
}%
\global\let\@@TenthstringFspanish\@@TenthstringFspanish
@@ -5960,14 +6405,14 @@ this number}%
% \begin{macrocode}
\newcommand*\@@TeenthstringFspanish[1]{%
\ifcase#1\relax
- D\'ecima%
- \or Und\'ecima%
- \or Duod\'ecima%
+ Décima%
+ \or Undécima%
+ \or Duodécima%
\or Decimotercera%
\or Decimocuarta%
\or Decimoquinta%
\or Decimosexta%
- \or Decimos\'eptima%
+ \or Decimoséptima%
\or Decimoctava%
\or Decimonovena%
\fi
@@ -5978,15 +6423,15 @@ this number}%
% \begin{macrocode}
\newcommand*\@@HundredthstringFspanish[1]{%
\ifcase#1\relax
- \or Cent\'esima%
- \or Ducent\'esima%
- \or Tricent\'esima%
- \or Cuadringent\'esima%
- \or Quingent\'esima%
- \or Sexcent\'esima%
- \or Septing\'esima%
- \or Octingent\'esima%
- \or Noningent\'esima%
+ \or Centésima%
+ \or Ducentésima%
+ \or Tricentésima%
+ \or Cuadringentésima%
+ \or Quingentésima%
+ \or Sexcentésima%
+ \or Septingésima%
+ \or Octingentésima%
+ \or Noningentésima%
\fi
}%
\global\let\@@HundredthstringFspanish\@@HundredthstringFspanish
@@ -7486,7 +7931,7 @@ this number}%
% This section deals with the code for |fmtcount.sty|
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{fmtcount}[2020/01/30 v3.07]
+\ProvidesPackage{fmtcount}[2024/08/31 v3.08]
\RequirePackage{ifthen}
% \end{macrocode}
% \changes{3.01}{2014/12/03}{Use \styfmt{xkeyval} instead of \styfmt{keyval}, so that we do not get in trouble
@@ -7660,7 +8105,8 @@ german,%
germanb,%
ngerman,%
ngermanb,%
-italian}
+italian,%
+dutch}
% \end{macrocode}
%\end{macro}
%\begin{macro}{\fc@iterate@on@languages}
@@ -9102,7 +9548,7 @@ italian}
\protect\@numberstringM{#1}{\@fc@numstr}%
}%
}%
- \MakeUppercase{\@fc@numstr}%
+ \protect\MakeUppercase{\@fc@numstr}%
}%
}
% \end{macrocode}
diff --git a/macros/latex/contrib/fmtcount/fmtcount.ins b/macros/latex/contrib/fmtcount/fmtcount.ins
index 1c31d8f0aa..f1e5ccdbdb 100644
--- a/macros/latex/contrib/fmtcount/fmtcount.ins
+++ b/macros/latex/contrib/fmtcount/fmtcount.ins
@@ -1,10 +1,10 @@
-% fmtcount.ins generated using makedtx version 1.2 2020/2/24 20:03
+% fmtcount.ins generated using makedtx version 1.2 2024/8/31 14:57
\input docstrip
\preamble
fmtcount.dtx
- Copyright 2020 Nicola Talbot and Vincent Belache
+ Copyright 2024 Nicola Talbot and Vincent Belaïche
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.3
@@ -16,9 +16,9 @@
This work has the LPPL maintenance status `maintained'.
- The Current Maintainer of this work is Nicola Talbot and Vincent Belache.
+ The Current Maintainer of this work is Nicola Talbot and Vincent Belaïche.
- This work consists of the files fmtcount.dtx and fmtcount.ins and the derived files fc-american.def, fc-brazilian.def, fc-british.def, fc-english.def, fc-francais.def, fc-french.def, fc-frenchb.def, fc-german.def, fc-germanb.def, fc-italian.def, fc-ngerman.def, fc-ngermanb.def, fc-portuges.def, fc-portuguese.def, fc-spanish.def, fc-UKenglish.def, fc-USenglish.def, fcnumparser.sty, fcprefix.sty, fmtcount.sty.
+ This work consists of the files fmtcount.dtx and fmtcount.ins and the derived files fc-american.def, fc-brazilian.def, fc-british.def, fc-dutch.def, fc-english.def, fc-francais.def, fc-french.def, fc-frenchb.def, fc-german.def, fc-germanb.def, fc-italian.def, fc-ngerman.def, fc-ngermanb.def, fc-portuges.def, fc-portuguese.def, fc-spanish.def, fc-UKenglish.def, fc-USenglish.def, fcnumparser.sty, fcprefix.sty, fmtcount.sty.
\endpreamble
@@ -30,6 +30,8 @@
\usepostamble\defaultpostamble\from{fmtcount.dtx}{fc-brazilian.def,package}}
\file{fc-british.def}{\usepreamble\defaultpreamble
\usepostamble\defaultpostamble\from{fmtcount.dtx}{fc-british.def,package}}
+\file{fc-dutch.def}{\usepreamble\defaultpreamble
+\usepostamble\defaultpostamble\from{fmtcount.dtx}{fc-dutch.def,package}}
\file{fc-english.def}{\usepreamble\defaultpreamble
\usepostamble\defaultpostamble\from{fmtcount.dtx}{fc-english.def,package}}
\file{fc-francais.def}{\usepreamble\defaultpreamble
diff --git a/macros/latex/contrib/fmtcount/fmtcount.pdf b/macros/latex/contrib/fmtcount/fmtcount.pdf
index 98673a2b81..2db224c27c 100644
--- a/macros/latex/contrib/fmtcount/fmtcount.pdf
+++ b/macros/latex/contrib/fmtcount/fmtcount.pdf
Binary files differ
diff --git a/macros/latex/contrib/fmtcount/fmtcount.perl b/macros/latex/contrib/fmtcount/fmtcount.perl
index b8a1fde0df..c7fdfe3303 100644
--- a/macros/latex/contrib/fmtcount/fmtcount.perl
+++ b/macros/latex/contrib/fmtcount/fmtcount.perl
@@ -355,6 +355,149 @@ sub get_numberstringenglish{
$name;
}
+@unitthstringdutch = ('nulste',
+ 'eerste',
+ 'tweede',
+ 'derde',
+ 'vierde',
+ 'vijfde',
+ 'zesde',
+ 'zevende',
+ 'achtste',
+ 'negende');
+
+@tenthstringdutch = ('',
+ 'tiende',
+ 'twintigste',
+ 'dertigste',
+ 'veertigste',
+ 'vijftigste',
+ 'zestigste',
+ 'zeventigste',
+ 'tachtigste',
+ 'negentigste');
+
+@teenthstringdutch = ('tiende',
+ 'elfde',
+ 'twaalfde',
+ 'dertien',
+ 'veertiende',
+ 'vijftiende',
+ 'zestiende',
+ 'zeventiende',
+ 'achttiende',
+ 'negentiende');
+
+@unitstringdutch = ('nul',
+ 'één',
+ 'twee',
+ 'drie',
+ 'vier',
+ 'vijf',
+ 'zes',
+ 'zeven',
+ 'acht',
+ 'negen');
+
+@teenstringdutch = ('tien',
+ 'elf',
+ 'twaalf',
+ 'dertien',
+ 'veertien',
+ 'vijftien',
+ 'zestien',
+ 'zeventien',
+ 'achttien',
+ 'negentien');
+
+@tenstringdutch = ('',
+ 'tien',
+ 'twintig',
+ 'dertig',
+ 'veertig',
+ 'vijftig',
+ 'zestig',
+ 'zeventig',
+ 'tachtig',
+ 'negentig');
+
+$hundrednamedutch = "honderd";
+$hundredthnamedutch = "honderdste";
+$thousandnamedutch = "duizend";
+$thousandthnamedutch = "duizendste";
+
+sub get_numberstringdutch {
+ local($num) = @_;
+ local($name) = "";
+
+ unless (($num >= 1000000) || ($num < 0)) {
+ if ($num >= 1000) {
+ local($thousandsdutch) = &get_numberstringdutch(int($num / 1000));
+ $name .= $thousandsdutch;
+
+ if ($num % 1000 > 0) {
+ $name .= " $thousandnamedutch";
+ } else {
+ $name .= " $thousandthnamedutch";
+ }
+
+ $num = $num % 1000;
+ }
+
+ if ($num >= 100) {
+ if ($_[0] >= 1000) { $name .= " "; }
+
+ local($hundredsdutch) = &get_numberstringdutch(int($num / 100));
+ $name .= $hundredsdutch;
+
+ if ($num % 100 > 0) {
+ $name .= " $hundrednamedutch";
+ } else {
+ $name .= " $hundredthnamedutch";
+ }
+
+ $num = $num % 100;
+ }
+
+ if (($_[0] > 100) && ($_[0] % 100 > 0)) { $name .= " en "; }
+
+ if ($num >= 20) {
+ local($tens) = int($num / 10);
+ local($units) = $num % 10;
+
+ # Handle special "ën" for 2 and 3 in numbers like 22, 23, etc.
+ if ($units == 2 || $units == 3) {
+ $name .= $unitstringdutch[$units] . "ën" . $tenstringdutch[$tens];
+ } else {
+ if ($units > 0) {
+ $name .= $tenstringdutch[$tens] . 'en' . $unitstringdutch[$units];
+ } else {
+ $name .= $tenthstringdutch[$tens];
+ }
+ }
+
+ # Handle "ste" or "de" suffix
+ if ($units > 0) {
+ $name .= ($units == 2 || $units == 3) ? 'ste' : 'e';
+ } else {
+ $name .= 'ste';
+ }
+ }
+
+ if (($num >= 10) && ($num < 20)) {
+ $name .= $teenthstringdutch[$num % 10] . 'de';
+ } elsif (($num % 10 > 0) || ($_[0] == 0)) {
+ if ($num > 20 && ($num % 10 == 2 || $num % 10 == 3)) {
+ $name .= $unitstringdutch[$num % 10] . 'e';
+ } else {
+ $name .= $unitthstringdutch[$num % 10];
+ }
+ }
+ }
+
+ $name;
+}
+
@unitthstringfrench = ('zeroi\`eme',
'uni\`eme',
'deuxi\`eme',
@@ -1092,7 +1235,11 @@ sub get_numberstringgerman{
sub get_numberstring{
local($val,$gender) = @_;
- if ($default_language eq 'french')
+ if ($default_language eq 'dutch')
+ {
+ &get_numberstringdutch($val,$gender);
+ }
+ elsif ($default_language eq 'french')
{
&get_numberstringfrench($val,$gender);
}
@@ -1424,6 +1571,78 @@ sub do_cmd_storeNUMBERstringnum{
$_;
}
+sub get_ordinalstringdutch {
+ local($num) = @_;
+ local($name) = "";
+
+ unless (($num >= 1000000) || ($num < 0)) {
+ if ($num >= 1000) {
+ local($thousandsdutch) = &get_numberstringdutch(int($num / 1000));
+ $name .= $thousandsdutch;
+
+ if ($num % 1000 > 0) {
+ $name .= " $thousandnamedutch";
+ } else {
+ $name .= " $thousandthnamedutch";
+ }
+
+ $num = $num % 1000;
+ }
+
+ if ($num >= 100) {
+ if ($_[0] >= 1000) { $name .= " "; }
+
+ local($hundredsdutch) = &get_numberstringdutch(int($num / 100));
+ $name .= $hundredsdutch;
+
+ if ($num % 100 > 0) {
+ $name .= " $hundrednamedutch";
+ } else {
+ $name .= " $hundredthnamedutch";
+ }
+
+ $num = $num % 100;
+ }
+
+ if (($_[0] > 100) && ($_[0] % 100 > 0)) { $name .= " en "; }
+
+ if ($num >= 20) {
+ local($tens) = int($num / 10);
+ local($units) = $num % 10;
+
+ # Handle special "ën" for 2 and 3 in numbers like 22, 23, etc.
+ if ($units == 2 || $units == 3) {
+ $name .= $unitstringdutch[$units] . "ën" . $tenstringdutch[$tens];
+ } else {
+ if ($units > 0) {
+ $name .= $tenstringdutch[$tens] . 'en' . $unitstringdutch[$units];
+ } else {
+ $name .= $tenthstringdutch[$tens];
+ }
+ }
+
+ # Handle "ste" or "de" suffix
+ if ($units > 0) {
+ $name .= ($units == 2 || $units == 3) ? 'ste' : 'e';
+ } else {
+ $name .= 'ste';
+ }
+ }
+
+ if (($num >= 10) && ($num < 20)) {
+ $name .= $teenthstringdutch[$num % 10] . 'de';
+ } elsif (($num % 10 > 0) || ($_[0] == 0)) {
+ if ($num > 20 && ($num % 10 == 2 || $num % 10 == 3)) {
+ $name .= $unitstringdutch[$num % 10] . 'e';
+ } else {
+ $name .= $unitthstringdutch[$num % 10];
+ }
+ }
+ }
+
+ $name;
+}
+
sub get_ordinalstringenglish{
local($num) = @_;
local($name)="";
@@ -1959,7 +2178,11 @@ sub get_ordinalstringgerman{
sub get_ordinalstring{
local($val,$gender) = @_;
- if ($default_language eq 'french')
+ if ($default_language eq 'dutch')
+ {
+ &get_ordinalstringdutch($val,$gender);
+ }
+ elsif ($default_language eq 'french')
{
&get_ordinalstringfrench($val,$gender);
}
diff --git a/macros/latex/contrib/fontscale/CHANGELOG.md b/macros/latex/contrib/fontscale/CHANGELOG.md
index 46a32e8fc9..cc467e7c19 100644
--- a/macros/latex/contrib/fontscale/CHANGELOG.md
+++ b/macros/latex/contrib/fontscale/CHANGELOG.md
@@ -7,6 +7,27 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
## [Unreleased]
+## [v2.4.0] - 2024-09-10
+
+### Changed
+- `\fontscalesetup` no longer issues a warning if the lengths of the font
+ baselineskips are not ordered from `\tiny` to `\Huge`.
+- Code improvements.
+
+## [v2.3.0] - 2024-09-06
+
+### Changed
+- The package commands no longer check if the font baselineskip is less than
+ the font size.
+
+## [v2.2.0] - 2024-08-29
+
+### Changed
+- Improved the messages issued by this package.
+
+### Added
+- `\SetFontBaselineskip`
+
## [v2.1.0] - 2024-08-12
### Changed
diff --git a/macros/latex/contrib/fontscale/beery.cls b/macros/latex/contrib/fontscale/beery.cls
index f2fd7fd2c5..d65738d9e9 100644
--- a/macros/latex/contrib/fontscale/beery.cls
+++ b/macros/latex/contrib/fontscale/beery.cls
@@ -4,7 +4,7 @@
\NeedsTeXFormat{LaTeX2e}[2023-11-01]
\ProvidesExplClass
{beery}
- {2024-08-12}
+ {2024-09-10}
{}
{}
diff --git a/macros/latex/contrib/fontscale/fontscale-table-classic.tex b/macros/latex/contrib/fontscale/fontscale-table-classic.tex
index 50ff413e36..903e7e3be7 100644
--- a/macros/latex/contrib/fontscale/fontscale-table-classic.tex
+++ b/macros/latex/contrib/fontscale/fontscale-table-classic.tex
@@ -1,6 +1,6 @@
\ProvidesFile
{fontscale-table-classic.tex}
- [2024-08-12]
+ [2024-09-10]
\begin{table}
\centering
diff --git a/macros/latex/contrib/fontscale/fontscale-table-font-steps.tex b/macros/latex/contrib/fontscale/fontscale-table-font-steps.tex
index 5b20f18681..50d5440c92 100644
--- a/macros/latex/contrib/fontscale/fontscale-table-font-steps.tex
+++ b/macros/latex/contrib/fontscale/fontscale-table-font-steps.tex
@@ -1,6 +1,6 @@
\ProvidesFile
{fontscale-table-font-steps.tex}
- [2024-08-12]
+ [2024-09-10]
\begin{table}
\centering
diff --git a/macros/latex/contrib/fontscale/fontscale-table-musical.tex b/macros/latex/contrib/fontscale/fontscale-table-musical.tex
index e6a6ca5ce0..c2f88c13fa 100644
--- a/macros/latex/contrib/fontscale/fontscale-table-musical.tex
+++ b/macros/latex/contrib/fontscale/fontscale-table-musical.tex
@@ -1,6 +1,6 @@
\ProvidesFile
{fontscale-table-musical.tex}
- [2024-08-12]
+ [2024-09-10]
\begin{table}
\centering
diff --git a/macros/latex/contrib/fontscale/fontscale.pdf b/macros/latex/contrib/fontscale/fontscale.pdf
index adcd809134..f859cb6a56 100644
--- a/macros/latex/contrib/fontscale/fontscale.pdf
+++ b/macros/latex/contrib/fontscale/fontscale.pdf
Binary files differ
diff --git a/macros/latex/contrib/fontscale/fontscale.sty b/macros/latex/contrib/fontscale/fontscale.sty
index 70bfae6026..01c9c8e8e4 100644
--- a/macros/latex/contrib/fontscale/fontscale.sty
+++ b/macros/latex/contrib/fontscale/fontscale.sty
@@ -8,8 +8,8 @@
\NeedsTeXFormat{LaTeX2e}[2023-11-01]
\ProvidesExplPackage
{fontscale}
- {2024-08-12}
- {2.1.0}
+ {2024-09-10}
+ {2.4.0}
{A flexible interface for setting font sizes}
% l3kernel version 2023-10-10 added many 'e'-variants.
@@ -116,40 +116,45 @@
\fp_new:N \l__fontscale_musical_notes_fp
% Scratch variables
-\tl_new:N \l__fontscale_tmp_tl
-\str_new:N \l__fontscale_tmp_str
-\dim_new:N \l__fontscale_tmp_dim
-\fp_new:N \l__fontscale_tmp_fp
+\tl_new:N \l__fontscale_tmp_tl
+\str_new:N \l__fontscale_tmp_str
+\dim_new:N \l__fontscale_tmp_dim
+\skip_new:N \l__fontscale_tmp_skip
+\fp_new:N \l__fontscale_tmp_fp
-% SOME HELPER FUNCTIONS
+% SOME FUNCTIONS
+% Variants of l3kernel functions
+\cs_generate_variant:Nn \msg_error:nnnn { nnv , nne }
% Sets a dimen/skip variable from a dimen/skip expression, appending a default
-% unit of pt.
+% unit of pt. This also removes extra tokens.
\cs_new_protected:Npn \__fontscale_dim_set_default_pt:Nn #1#2
- { \@defaultunits #1 = \dimexpr #2 pt \relax \relax \@nnil }
+ {
+ \afterassignment \use_none_delimit_by_q_stop:w
+ #1 = \dimexpr #2 pt \relax \relax
+ \q_stop
+ }
\cs_generate_variant:Nn \__fontscale_dim_set_default_pt:Nn { c }
\cs_new_protected:Npn \__fontscale_skip_set_default_pt:Nn #1#2
- { \@defaultunits #1 = \glueexpr #2 pt \relax \@nnil }
+ {
+ \afterassignment \use_none_delimit_by_q_stop:w
+ #1 = \glueexpr #2 pt \relax
+ \q_stop
+ }
\cs_generate_variant:Nn \__fontscale_skip_set_default_pt:Nn { c }
-% Similar to \@setfontsize. Used to define \tiny to \Huge. Need \dim_use:N for
-% compatibility with the microtype package.
+% Used to define \tiny to \Huge. Sets \@currsize only for compatibility. Need
+% \dim_use:N only for compatibility with the microtype package.
\cs_new_protected:Npn \__fontscale_fontsize:NNN #1#2#3
{
- \mode_if_math:TF
- {
- \msg_warning:nne { fontscale } { math-mode-warning }
- { \token_to_str:N #1 }
- }
- {
- \cs_set_eq:NN \@currsize #1
- \fontsize { \dim_use:N #2 } #3 \selectfont
- }
+ \cs_set_eq:NN \@currsize #1
+ \fontsize { \dim_use:N #2 } #3 \selectfont
}
% Similar to \fontsize + \selectfont, except that it:
% (1) Takes dimen and skip expressions as arguments.
% (2) Avoids the issue where \f@size is set to the new font size before the
% second argument is expanded.
-% (3) Provides error checking for the font size and font baselineskip.
+% (3) Issues a user-friendly error message if the font size is not a positive
+% length.
\dim_new:N \l__fontscale_fontsize_dim
\skip_new:N \l__fontscale_fontsize_skip
\cs_new_protected:Npn \__fontscale_fontsize:nn #1#2
@@ -158,15 +163,13 @@
\__fontscale_skip_set_default_pt:Nn \l__fontscale_fontsize_skip {#2}
\dim_compare:nNnTF \l__fontscale_fontsize_dim > \c_zero_dim
{
- \dim_compare:nNnTF \l__fontscale_fontsize_skip <
+ \fontsize \l__fontscale_fontsize_dim \l__fontscale_fontsize_skip
+ \selectfont
+ }
+ {
+ \msg_error:nnV { fontscale } { font-size-out-of-bounds }
\l__fontscale_fontsize_dim
- { \msg_error:nn { fontscale } { font-baselineskip-out-of-bounds } }
- {
- \fontsize \l__fontscale_fontsize_dim \l__fontscale_fontsize_skip
- \selectfont
- }
}
- { \msg_error:nn { fontscale } { font-size-out-of-bounds } }
}
% Similar to the above function, except that it sets the font baselineskip
% equal to the new font size times the baselineskip-size-ratio.
@@ -185,116 +188,72 @@
}
\selectfont
}
- { \msg_error:nn { fontscale } { font-size-out-of-bounds } }
+ {
+ \msg_error:nnV { fontscale } { font-size-out-of-bounds }
+ \l__fontscale_fontsize_dim
+ }
}
% MESSAGES
-\msg_new:nnn { fontscale } { key-baselineskip-size-ratio-out-of-bounds }
- {
- The~ value~ of~ the~ key~ 'baselineskip-size-ratio'~
- \msg_line_context: \c_space_tl
- must~ be~ at~ least~ 1.
- }
\msg_new:nnn { fontscale } { key-musical-base-out-of-bounds }
{
+ Invalid~ value~ '#1'~ \msg_line_context:. \\
The~ value~ of~ the~ key~ 'musical / base'~
- \msg_line_context: \c_space_tl
must~ be~ a~ positive~ length.
}
\msg_new:nnn { fontscale } { key-musical-ratio-out-of-bounds }
{
+ Invalid~ value~ '#1'~ \msg_line_context:. \\
The~ value~ of~ the~ key~ 'musical / ratio'~
- \msg_line_context: \c_space_tl
must~ be~ greater~ than~ 1.
}
\msg_new:nnn { fontscale } { key-musical-notes-out-of-bounds }
{
+ Invalid~ value~ '#1'~ \msg_line_context:. \\
The~ value~ of~ the~ key~ 'musical / notes'~
- \msg_line_context: \c_space_tl
must~ be~ a~ positive~ integer.
}
\msg_new:nnn { fontscale } { key-font-scale-out-of-bounds }
{
- The~ value~ of~ the~ key~ '#1 / scale'~
- \msg_line_context: \c_space_tl
+ Invalid~ value~ '#1'~ \msg_line_context:. \\
+ The~ value~ of~ the~ key~ '#2 / scale'~
must~ be~ positive.
}
\msg_new:nnn { fontscale } { key-font-size-out-of-bounds }
{
- The~ value~ of~ the~ key~ '#1 / size'~
- \msg_line_context: \c_space_tl
+ Invalid~ value~ '#1'~ \msg_line_context:. \\
+ The~ value~ of~ the~ key~ '#2 / size'~
must~ be~ a~ positive~ length.
}
\msg_new:nnn { fontscale } { key-font-scale-overwritten }
{
The~ font~ size~ set~ by~ the~ key~ '#1 / scale'~
- has~ been~ overwritten~ by~ the~ key~ '#1 / size'~
- \msg_line_context:.
- }
-\msg_new:nnn { fontscale } { key-font-baselineskip-out-of-bounds }
- {
- The~ value~ of~ the~ key~ '#1 / baselineskip'~
- \msg_line_context: \c_space_tl
- must~ be~ greater~ than~ or~ equal~ to~
- the~ font~ size~ of~ '\iow_char:N \\#1'.
+ has~ been~ overwritten~ by~ the~ key~ '#1 / size'~ \msg_line_context:.
}
\msg_new:nnn { fontscale } { font-sizes-out-of-order }
{
- The~ font~ sizes~
- \msg_line_context: \c_space_tl
- are~ not~ in~ the~ correct~ order.~
- The~ lengths~ of~ the~ font~ sizes~ should~ be~ ordered~ from~
- '\iow_char:N \\tiny'~ to~ '\iow_char:N \\Huge'.
- }
-\msg_new:nnn { fontscale } { font-baselineskips-out-of-order }
- {
- The~ font~ baselineskips~
- \msg_line_context: \c_space_tl
- are~ not~ in~ the~ correct~ order.~
- The~ lengths~ of~ the~ font~ baselineskips~ should~ be~ ordered~ from~
- '\iow_char:N \\tiny'~ to~ '\iow_char:N \\Huge'.
+ The~ font~ sizes~ are~ not~ in~ the~ correct~ order~ \msg_line_context:. \\
+ The~ lengths~ of~ the~ font~ sizes~
+ should~ be~ ordered~ from~ \iow_char:N \\tiny~ to~ \iow_char:N \\Huge.
}
\msg_new:nnn { fontscale } { math-mode-warning }
- {
- '#1'~
- \msg_line_context: \c_space_tl
- does~ nothing~ if~ used~ in~ math~ mode.
- }
+ { '#1'~ does~ nothing~ if~ used~ in~ math~ mode~ \msg_line_context:. }
\msg_new:nnn { fontscale } { math-mode-error }
- {
- '#1'~
- \msg_line_context: \c_space_tl
- cannot~ be~ used~ in~ math~ mode.
- }
+ { '#1'~ cannot~ be~ used~ in~ math~ mode~ \msg_line_context:. }
\msg_new:nnn { fontscale } { font-size-out-of-bounds }
- {
- The~ font~ size~
- \msg_line_context: \c_space_tl
- must~ be~ a~ positive~ length.
- }
-\msg_new:nnn { fontscale } { font-baselineskip-out-of-bounds }
- {
- The~ font~ baselineskip~
- \msg_line_context: \c_space_tl
- must~ be~ greater~ than~ or~ equal~ to~ the~ font~ size.
- }
+ { The~ font~ size~ '#1'~ must~ be~ a~ positive~ length~ \msg_line_context:. }
\msg_new:nnn { fontscale } { font-step-out-of-bounds }
{
- The~ font~ step~
- \msg_line_context: \c_space_tl
- must~ equal~ an~ integer~ from~ -4~ to~ 5,~
- unless~ the~ value~ of~ the~ key~ 'typographic-scale'~ is~ 'musical'.~
- \msg_see_documentation_text:n { fontscale }
+ Invalid~ font~ step~ '#1'~ \msg_line_context:. \\
+ The~ font~ step~ must~ equal~ an~ integer~ from~ -4~ to~ 5,~
+ unless~ the~ value~ of~ the~ key~ 'typographic-scale'~ is~ 'musical'.
}
\msg_new:nnn { fontscale } { current-font-step-out-of-bounds }
{
- '\iow_char:N \\SetFontStep*'~
- \msg_line_context: \c_space_tl
- could~ not~ calculate~ the~ new~ font~ step~ because~
- the~ current~ font~ step~ is~ undefined.~
- \msg_see_documentation_text:n { fontscale }
+ '\iow_char:N \\SetFontStep*'~ could~ not~ calculate~ the~ new~ font~ step~
+ because~ the~ current~ font~ step~ is~ undefined~ \msg_line_context:.
}
% DEFINE KEYS
@@ -349,6 +308,14 @@
, notes .int_set:N = \l__fontscale_musical_notes_int
, notes .value_required:n = true
}
+\keys_define:nn { fontscale / normalsize }
+ {
+ size .tl_set:N = \l__fontscale_normalsize_size_tl
+ , size .value_required:n = true
+
+ , baselineskip .tl_set:N = \l__fontscale_normalsize_baselineskip_tl
+ , baselineskip .value_required:n = true
+ }
\keys_define:nn { fontscale / tiny }
{
scale .tl_set:N = \l__fontscale_tiny_scale_tl
@@ -393,14 +360,6 @@
, baselineskip .tl_set:N = \l__fontscale_small_baselineskip_tl
, baselineskip .value_required:n = true
}
-\keys_define:nn { fontscale / normalsize }
- {
- size .tl_set:N = \l__fontscale_normalsize_size_tl
- , size .value_required:n = true
-
- , baselineskip .tl_set:N = \l__fontscale_normalsize_baselineskip_tl
- , baselineskip .value_required:n = true
- }
\keys_define:nn { fontscale / large }
{
scale .tl_set:N = \l__fontscale_large_scale_tl
@@ -492,7 +451,8 @@
% INITIALIZE AND PRE-COMPILE KEYS
% Pre-compiles the keys with their initial values and then sets the keys to
-% their initial values. This is done by hand for speed.
+% their initial values. This is significantly faster than using .initial:n and
+% \keys_precompile:nnN.
\cs_new_protected:Npn \__fontscale_keys_set_initial:
{
\fp_set:Nn \l__fontscale_baselineskip_size_ratio_fp { 1.2 }
@@ -501,37 +461,41 @@
\fp_set:Nn \l__fontscale_musical_ratio_fp { 2 }
\int_set:Nn \l__fontscale_musical_notes_int { 5 }
- \tl_set:Nn \l__fontscale_tiny_scale_tl { \q_no_value }
- \tl_set:Nn \l__fontscale_scriptsize_scale_tl { \q_no_value }
- \tl_set:Nn \l__fontscale_footnotesize_scale_tl { \q_no_value }
- \tl_set:Nn \l__fontscale_small_scale_tl { \q_no_value }
- \tl_set:Nn \l__fontscale_large_scale_tl { \q_no_value }
- \tl_set:Nn \l__fontscale_Large_scale_tl { \q_no_value }
- \tl_set:Nn \l__fontscale_LARGE_scale_tl { \q_no_value }
- \tl_set:Nn \l__fontscale_huge_scale_tl { \q_no_value }
- \tl_set:Nn \l__fontscale_Huge_scale_tl { \q_no_value }
-
- \tl_set:Nn \l__fontscale_tiny_size_tl { \q_no_value }
- \tl_set:Nn \l__fontscale_scriptsize_size_tl { \q_no_value }
- \tl_set:Nn \l__fontscale_footnotesize_size_tl { \q_no_value }
- \tl_set:Nn \l__fontscale_small_size_tl { \q_no_value }
- \tl_set:Nn \l__fontscale_normalsize_size_tl { \q_no_value }
- \tl_set:Nn \l__fontscale_large_size_tl { \q_no_value }
- \tl_set:Nn \l__fontscale_Large_size_tl { \q_no_value }
- \tl_set:Nn \l__fontscale_LARGE_size_tl { \q_no_value }
- \tl_set:Nn \l__fontscale_huge_size_tl { \q_no_value }
- \tl_set:Nn \l__fontscale_Huge_size_tl { \q_no_value }
-
- \tl_set:Nn \l__fontscale_tiny_baselineskip_tl { \q_no_value }
- \tl_set:Nn \l__fontscale_scriptsize_baselineskip_tl { \q_no_value }
- \tl_set:Nn \l__fontscale_footnotesize_baselineskip_tl { \q_no_value }
- \tl_set:Nn \l__fontscale_small_baselineskip_tl { \q_no_value }
- \tl_set:Nn \l__fontscale_normalsize_baselineskip_tl { \q_no_value }
- \tl_set:Nn \l__fontscale_large_baselineskip_tl { \q_no_value }
- \tl_set:Nn \l__fontscale_Large_baselineskip_tl { \q_no_value }
- \tl_set:Nn \l__fontscale_LARGE_baselineskip_tl { \q_no_value }
- \tl_set:Nn \l__fontscale_huge_baselineskip_tl { \q_no_value }
- \tl_set:Nn \l__fontscale_Huge_baselineskip_tl { \q_no_value }
+ \tl_map_inline:nn
+ {
+ \l__fontscale_tiny_scale_tl
+ \l__fontscale_scriptsize_scale_tl
+ \l__fontscale_footnotesize_scale_tl
+ \l__fontscale_small_scale_tl
+ \l__fontscale_large_scale_tl
+ \l__fontscale_Large_scale_tl
+ \l__fontscale_LARGE_scale_tl
+ \l__fontscale_huge_scale_tl
+ \l__fontscale_Huge_scale_tl
+
+ \l__fontscale_tiny_size_tl
+ \l__fontscale_scriptsize_size_tl
+ \l__fontscale_footnotesize_size_tl
+ \l__fontscale_small_size_tl
+ \l__fontscale_normalsize_size_tl
+ \l__fontscale_large_size_tl
+ \l__fontscale_Large_size_tl
+ \l__fontscale_LARGE_size_tl
+ \l__fontscale_huge_size_tl
+ \l__fontscale_Huge_size_tl
+
+ \l__fontscale_tiny_baselineskip_tl
+ \l__fontscale_scriptsize_baselineskip_tl
+ \l__fontscale_footnotesize_baselineskip_tl
+ \l__fontscale_small_baselineskip_tl
+ \l__fontscale_normalsize_baselineskip_tl
+ \l__fontscale_large_baselineskip_tl
+ \l__fontscale_Large_baselineskip_tl
+ \l__fontscale_LARGE_baselineskip_tl
+ \l__fontscale_huge_baselineskip_tl
+ \l__fontscale_Huge_baselineskip_tl
+ }
+ { \tl_set:Nn ##1 { \q_no_value } }
}
\__fontscale_keys_set_initial:
@@ -569,25 +533,22 @@
}
\cs_new_protected:Npn \__fontscale_keys_process_start:
{
- \fp_compare:nNnT \l__fontscale_baselineskip_size_ratio_fp < \c_one_fp
- {
- \msg_error:nn { fontscale }
- { key-baselineskip-size-ratio-out-of-bounds }
- \prg_break:
- }
\dim_compare:nNnF \l__fontscale_musical_base_dim > \c_zero_dim
{
- \msg_error:nn { fontscale } { key-musical-base-out-of-bounds }
+ \msg_error:nnV { fontscale } { key-musical-base-out-of-bounds }
+ \l__fontscale_musical_base_dim
\prg_break:
}
\fp_compare:nNnF \l__fontscale_musical_ratio_fp > \c_one_fp
{
- \msg_error:nn { fontscale } { key-musical-ratio-out-of-bounds }
+ \msg_error:nne { fontscale } { key-musical-ratio-out-of-bounds }
+ { \fp_use:N \l__fontscale_musical_ratio_fp }
\prg_break:
}
\int_compare:nNnF \l__fontscale_musical_notes_int > 0
{
- \msg_error:nn { fontscale } { key-musical-notes-out-of-bounds }
+ \msg_error:nnV { fontscale } { key-musical-notes-out-of-bounds }
+ \l__fontscale_musical_notes_int
\prg_break:
}
}
@@ -612,8 +573,8 @@
{ \l__fontscale_normalsize_size_tl }
\dim_compare:nNnF \l_fontscale_normalsize_size_dim > \c_zero_dim
{
- \msg_error:nnn { fontscale } { key-font-size-out-of-bounds }
- { normalsize }
+ \msg_error:nnVn { fontscale } { key-font-size-out-of-bounds }
+ \l_fontscale_normalsize_size_dim { normalsize }
\prg_break:
}
}
@@ -634,13 +595,6 @@
\__fontscale_skip_set_default_pt:Nn
\l_fontscale_normalsize_baselineskip_skip
{ \l__fontscale_normalsize_baselineskip_tl }
- \dim_compare:nNnT \l_fontscale_normalsize_baselineskip_skip <
- \l_fontscale_normalsize_size_dim
- {
- \msg_error:nnn { fontscale }
- { key-font-baselineskip-out-of-bounds } { normalsize }
- \prg_break:
- }
}
}
% Auxiliary functions that expand to the font size depending on the name of the
@@ -753,8 +707,8 @@
{
\tl_map_break:n
{
- \msg_error:nnn { fontscale } { key-font-scale-out-of-bounds }
- {#1}
+ \msg_error:nnen { fontscale } { key-font-scale-out-of-bounds }
+ { \fp_eval:n { \use:c { l__fontscale_#1_scale_tl } } } {#1}
\prg_break:
}
}
@@ -768,8 +722,8 @@
{
\tl_map_break:n
{
- \msg_error:nnn { fontscale } { key-font-size-out-of-bounds }
- {#1}
+ \msg_error:nnvn { fontscale } { key-font-size-out-of-bounds }
+ { l_fontscale_#1_size_dim } {#1}
\prg_break:
}
}
@@ -800,20 +754,9 @@
\__fontscale_skip_set_default_pt:cn
{ l_fontscale_#1_baselineskip_skip }
{ \use:c { l__fontscale_#1_baselineskip_tl } }
- \dim_compare:nNnT { \use:c { l_fontscale_#1_baselineskip_skip } } <
- { \use:c { l_fontscale_#1_size_dim } }
- {
- \tl_map_break:n
- {
- \msg_error:nnn { fontscale }
- { key-font-baselineskip-out-of-bounds } {#1}
- \prg_break:
- }
- }
}
}
-% Issues a warning if the font sizes or font baselineskips (ignoring the
-% stretch and shrink components) are not in the correct order.
+% Issues a warning if the font sizes are not in the correct order.
\cs_new_protected:Npn \__fontscale_keys_process_check_order:
{
\dim_compare:nF
@@ -830,73 +773,151 @@
< \l_fontscale_Huge_size_dim
}
{ \msg_warning:nn { fontscale } { font-sizes-out-of-order } }
- \dim_compare:nF
- {
- \l_fontscale_tiny_baselineskip_skip
- < \l_fontscale_scriptsize_baselineskip_skip
- < \l_fontscale_footnotesize_baselineskip_skip
- < \l_fontscale_small_baselineskip_skip
- < \l_fontscale_normalsize_baselineskip_skip
- < \l_fontscale_large_baselineskip_skip
- < \l_fontscale_Large_baselineskip_skip
- < \l_fontscale_LARGE_baselineskip_skip
- < \l_fontscale_huge_baselineskip_skip
- < \l_fontscale_Huge_baselineskip_skip
- }
- { \msg_warning:nn { fontscale } { font-baselineskips-out-of-order } }
}
% DOCUMENT COMMANDS
% Defines the standard LaTeX font size commands from \tiny to \Huge and
-% initializes to \normalsize.
+% initializes to \normalsize. The corresponding internal functions are not used
+% elsewhere in the code for compatibility with hooks such as
+% \AddToHook{cmd/<font size command>/after}{<code>}.
\DeclareDocumentCommand \tiny { }
{
+ \mode_if_math:TF
+ {
+ \msg_warning:nne { fontscale } { math-mode-warning }
+ { \token_to_str:N \tiny }
+ }
+ { \__fontscale_tiny: }
+ }
+\cs_new_protected:Npn \__fontscale_tiny:
+ {
\__fontscale_fontsize:NNN \tiny \l_fontscale_tiny_size_dim
\l_fontscale_tiny_baselineskip_skip
}
\DeclareDocumentCommand \scriptsize { }
{
+ \mode_if_math:TF
+ {
+ \msg_warning:nne { fontscale } { math-mode-warning }
+ { \token_to_str:N \scriptsize }
+ }
+ { \__fontscale_scriptsize: }
+ }
+\cs_new_protected:Npn \__fontscale_scriptsize:
+ {
\__fontscale_fontsize:NNN \scriptsize \l_fontscale_scriptsize_size_dim
\l_fontscale_scriptsize_baselineskip_skip
}
\DeclareDocumentCommand \footnotesize { }
{
+ \mode_if_math:TF
+ {
+ \msg_warning:nne { fontscale } { math-mode-warning }
+ { \token_to_str:N \footnotesize }
+ }
+ { \__fontscale_footnotesize: }
+ }
+\cs_new_protected:Npn \__fontscale_footnotesize:
+ {
\__fontscale_fontsize:NNN \footnotesize \l_fontscale_footnotesize_size_dim
\l_fontscale_footnotesize_baselineskip_skip
}
\DeclareDocumentCommand \small { }
{
+ \mode_if_math:TF
+ {
+ \msg_warning:nne { fontscale } { math-mode-warning }
+ { \token_to_str:N \small }
+ }
+ { \__fontscale_small: }
+ }
+\cs_new_protected:Npn \__fontscale_small:
+ {
\__fontscale_fontsize:NNN \small \l_fontscale_small_size_dim
\l_fontscale_small_baselineskip_skip
}
\DeclareDocumentCommand \normalsize { }
{
+ \mode_if_math:TF
+ {
+ \msg_warning:nne { fontscale } { math-mode-warning }
+ { \token_to_str:N \normalsize }
+ }
+ { \__fontscale_normalsize: }
+ }
+\cs_new_protected:Npn \__fontscale_normalsize:
+ {
\__fontscale_fontsize:NNN \normalsize \l_fontscale_normalsize_size_dim
\l_fontscale_normalsize_baselineskip_skip
}
\DeclareDocumentCommand \large { }
{
+ \mode_if_math:TF
+ {
+ \msg_warning:nne { fontscale } { math-mode-warning }
+ { \token_to_str:N \large }
+ }
+ { \__fontscale_large: }
+ }
+\cs_new_protected:Npn \__fontscale_large:
+ {
\__fontscale_fontsize:NNN \large \l_fontscale_large_size_dim
\l_fontscale_large_baselineskip_skip
}
\DeclareDocumentCommand \Large { }
{
+ \mode_if_math:TF
+ {
+ \msg_warning:nne { fontscale } { math-mode-warning }
+ { \token_to_str:N \Large }
+ }
+ { \__fontscale_Large: }
+ }
+\cs_new_protected:Npn \__fontscale_Large:
+ {
\__fontscale_fontsize:NNN \Large \l_fontscale_Large_size_dim
\l_fontscale_Large_baselineskip_skip
}
\DeclareDocumentCommand \LARGE { }
{
+ \mode_if_math:TF
+ {
+ \msg_warning:nne { fontscale } { math-mode-warning }
+ { \token_to_str:N \LARGE }
+ }
+ { \__fontscale_LARGE: }
+ }
+\cs_new_protected:Npn \__fontscale_LARGE:
+ {
\__fontscale_fontsize:NNN \LARGE \l_fontscale_LARGE_size_dim
\l_fontscale_LARGE_baselineskip_skip
}
\DeclareDocumentCommand \huge { }
{
+ \mode_if_math:TF
+ {
+ \msg_warning:nne { fontscale } { math-mode-warning }
+ { \token_to_str:N \huge }
+ }
+ { \__fontscale_huge: }
+ }
+\cs_new_protected:Npn \__fontscale_huge:
+ {
\__fontscale_fontsize:NNN \huge \l_fontscale_huge_size_dim
\l_fontscale_huge_baselineskip_skip
}
\DeclareDocumentCommand \Huge { }
{
+ \mode_if_math:TF
+ {
+ \msg_warning:nne { fontscale } { math-mode-warning }
+ { \token_to_str:N \Huge }
+ }
+ { \__fontscale_Huge: }
+ }
+\cs_new_protected:Npn \__fontscale_Huge:
+ {
\__fontscale_fontsize:NNN \Huge \l_fontscale_Huge_size_dim
\l_fontscale_Huge_baselineskip_skip
}
@@ -1044,7 +1065,10 @@
}
}
}
- { \msg_error:nn { fontscale } { font-step-out-of-bounds } }
+ {
+ \msg_error:nne { fontscale } { font-step-out-of-bounds }
+ { \fp_eval:n {#1} }
+ }
}
}
\cs_new_protected:Npn \__fontscale_add_font_step:n #1
@@ -1132,6 +1156,28 @@
\cs_new_eq:NN \__fontscale_set_font_size_baselineskip:nn
\__fontscale_fontsize:nn
+\NewDocumentCommand \SetFontBaselineskip { s m }
+ {
+ \mode_if_math:TF
+ {
+ \msg_warning:nne { fontscale } { math-mode-warning }
+ { \token_to_str:N \SetFontBaselineskip }
+ }
+ {
+ \IfBooleanTF #1
+ { \__fontscale_add_font_baselineskip:n {#2} }
+ { \__fontscale_set_font_baselineskip:n {#2} }
+ }
+ }
+\cs_new_protected:Npn \__fontscale_set_font_baselineskip:n
+ { \__fontscale_fontsize:nn { \f@size pt } }
+\cs_new_protected:Npn \__fontscale_add_font_baselineskip:n #1
+ {
+ \__fontscale_skip_set_default_pt:Nn \l__fontscale_tmp_skip {#1}
+ \__fontscale_fontsize:nn { \f@size pt }
+ { \l__fontscale_tmp_skip + \f@baselineskip }
+ }
+
\NewDocumentCommand \PrintFontSizeParameters { }
{ \__fontscale_print_font_size_parameters: }
\cs_new_protected:Npn \__fontscale_print_font_size_parameters:
@@ -1153,65 +1199,20 @@
}
\cs_new_protected:Npn \__fontscale_print_all_font_size_parameters:
{
- \token_to_str:N \tiny \c_colon_str \c_space_tl
- step ~=~ -4 ,~
- scale ~=~ \fp_use:N \l_fontscale_tiny_scale_fp ,~
- size ~=~ \dim_use:N \l_fontscale_tiny_size_dim ,~
- baselineskip ~=~ \skip_use:N \l_fontscale_tiny_baselineskip_skip
- \newline
- \token_to_str:N \scriptsize \c_colon_str \c_space_tl
- step ~=~ -3 ,~
- scale ~=~ \fp_use:N \l_fontscale_scriptsize_scale_fp ,~
- size ~=~ \dim_use:N \l_fontscale_scriptsize_size_dim ,~
- baselineskip ~=~ \skip_use:N \l_fontscale_scriptsize_baselineskip_skip
- \newline
- \token_to_str:N \footnotesize \c_colon_str \c_space_tl
- step ~=~ -2 ,~
- scale ~=~ \fp_use:N \l_fontscale_footnotesize_scale_fp ,~
- size ~=~ \dim_use:N \l_fontscale_footnotesize_size_dim ,~
- baselineskip ~=~ \skip_use:N \l_fontscale_footnotesize_baselineskip_skip
- \newline
- \token_to_str:N \small \c_colon_str \c_space_tl
- step ~=~ -1 ,~
- scale ~=~ \fp_use:N \l_fontscale_small_scale_fp ,~
- size ~=~ \dim_use:N \l_fontscale_small_size_dim ,~
- baselineskip ~=~ \skip_use:N \l_fontscale_small_baselineskip_skip
- \newline
- \token_to_str:N \normalsize \c_colon_str \c_space_tl
- step ~=~ 0 ,~
- scale ~=~ 1 ,~
- size ~=~ \dim_use:N \l_fontscale_normalsize_size_dim ,~
- baselineskip ~=~ \skip_use:N \l_fontscale_normalsize_baselineskip_skip
- \newline
- \token_to_str:N \large \c_colon_str \c_space_tl
- step ~=~ 1 ,~
- scale ~=~ \fp_use:N \l_fontscale_large_scale_fp ,~
- size ~=~ \dim_use:N \l_fontscale_large_size_dim ,~
- baselineskip ~=~ \skip_use:N \l_fontscale_large_baselineskip_skip
- \newline
- \token_to_str:N \Large \c_colon_str \c_space_tl
- step ~=~ 2 ,~
- scale ~=~ \fp_use:N \l_fontscale_Large_scale_fp ,~
- size ~=~ \dim_use:N \l_fontscale_Large_size_dim ,~
- baselineskip ~=~ \skip_use:N \l_fontscale_Large_baselineskip_skip
- \newline
- \token_to_str:N \LARGE \@ \c_colon_str \c_space_tl
- step ~=~ 3 ,~
- scale ~=~ \fp_use:N \l_fontscale_LARGE_scale_fp ,~
- size ~=~ \dim_use:N \l_fontscale_LARGE_size_dim ,~
- baselineskip ~=~ \skip_use:N \l_fontscale_LARGE_baselineskip_skip
- \newline
- \token_to_str:N \huge \c_colon_str \c_space_tl
- step ~=~ 4 ,~
- scale ~=~ \fp_use:N \l_fontscale_huge_scale_fp ,~
- size ~=~ \dim_use:N \l_fontscale_huge_size_dim ,~
- baselineskip ~=~ \skip_use:N \l_fontscale_huge_baselineskip_skip
- \newline
- \token_to_str:N \Huge \c_colon_str \c_space_tl
- step ~=~ 5 ,~
- scale ~=~ \fp_use:N \l_fontscale_Huge_scale_fp ,~
- size ~=~ \dim_use:N \l_fontscale_Huge_size_dim ,~
- baselineskip ~=~ \skip_use:N \l_fontscale_Huge_baselineskip_skip
+ \tl_map_inline:nn
+ {
+ {tiny} {scriptsize} {footnotesize} {small} {normalsize}
+ {large} {Large} {LARGE} {huge} {Huge}
+ }
+ {
+ \token_to_str:c {##1} \@ \c_colon_str \c_space_tl
+ step~ =~ \fp_use:c { c_fontscale_##1_step_fp } ,~
+ scale~ =~ \str_if_eq:nnTF {##1} { normalsize }
+ { 1 } { \fp_use:c { l_fontscale_##1_scale_fp } } ,~
+ size~ =~ \dim_use:c { l_fontscale_##1_size_dim } ,~
+ baselineskip~ =~ \skip_use:c { l_fontscale_##1_baselineskip_skip }
+ \str_if_eq:nnF {##1} { Huge } { \newline }
+ }
}
\NewDocumentCommand \PrintSampleText { s +m }
@@ -1222,36 +1223,30 @@
{ \token_to_str:N \PrintSampleText }
}
{
- \IfBooleanTF #1
- { \__fontscale_print_sample_text_descending_order:n {#2} }
- { \__fontscale_print_sample_text_ascending_order:n {#2} }
+ \group_begin:
+ \IfBooleanTF #1
+ { \__fontscale_print_sample_text_descending_order:n {#2} }
+ { \__fontscale_print_sample_text_ascending_order:n {#2} }
+ \group_end:
}
}
\cs_new_protected:Npn \__fontscale_print_sample_text_ascending_order:n #1
{
- { \tiny #1 \par }
- { \scriptsize #1 \par }
- { \footnotesize #1 \par }
- { \small #1 \par }
- { \normalsize #1 \par }
- { \large #1 \par }
- { \Large #1 \par }
- { \LARGE #1 \par }
- { \huge #1 \par }
- { \Huge #1 \par }
+ \tl_map_inline:nn
+ {
+ \tiny \scriptsize \footnotesize \small \normalsize
+ \large \Large \LARGE \huge \Huge
+ }
+ { ##1 #1 \par }
}
\cs_new_protected:Npn \__fontscale_print_sample_text_descending_order:n #1
{
- { \Huge #1 \par }
- { \huge #1 \par }
- { \LARGE #1 \par }
- { \Large #1 \par }
- { \large #1 \par }
- { \normalsize #1 \par }
- { \small #1 \par }
- { \footnotesize #1 \par }
- { \scriptsize #1 \par }
- { \tiny #1 \par }
+ \tl_map_inline:nn
+ {
+ \Huge \huge \LARGE \Large \large
+ \normalsize \small \footnotesize \scriptsize \tiny
+ }
+ { ##1 #1 \par }
}
\NewDocumentCommand \PrintFontSizeCommand { }
@@ -1273,23 +1268,12 @@
% TEXT PURIFY
-\cs_new:Npn \__fontscale_remove_arg_spec_sm:n #1
+\NewExpandableDocumentCommand \__fontscale_use_none_sm:w { s m } { }
+\tl_map_inline:nn
{
- \bool_lazy_all:nT
- {
- { \tl_if_single_p:n {#1} }
- { \tl_if_single_token_p:n #1 }
- { \token_if_eq_meaning_p:NN #1 * }
- }
- { \use_none:n }
- }
-\text_declare_purify_equivalent:Nn \fontscalesetup
- { \__fontscale_remove_arg_spec_sm:n }
-\text_declare_purify_equivalent:Nn \SetFontStep
- { \__fontscale_remove_arg_spec_sm:n }
-\text_declare_purify_equivalent:Nn \SetFontScale
- { \__fontscale_remove_arg_spec_sm:n }
-\text_declare_purify_equivalent:Nn \SetFontSize
- { \__fontscale_remove_arg_spec_sm:n }
+ \fontscalesetup \SetFontStep \SetFontScale \SetFontSize
+ \SetFontBaselineskip
+ }
+ { \text_declare_purify_equivalent:Nn #1 { \__fontscale_use_none_sm:w } }
\text_declare_purify_equivalent:Nn \ScaleFont { \use_none:n }
\text_declare_purify_equivalent:Nn \SetFontSizeBaselineskip { \use_none:nn } \ No newline at end of file
diff --git a/macros/latex/contrib/fontscale/fontscale.tex b/macros/latex/contrib/fontscale/fontscale.tex
index 3737afe5b6..8ccec27d8d 100644
--- a/macros/latex/contrib/fontscale/fontscale.tex
+++ b/macros/latex/contrib/fontscale/fontscale.tex
@@ -14,7 +14,7 @@ A flexible interface for setting font sizes
Oliver Beery
-Version 2.1.0\quad{}12 August 2024
+Version 2.4.0\quad{}10 September 2024
\section{Introduction}
@@ -101,7 +101,7 @@ This syntax has the same representation as the arguments to \cs{fpeval}, \cs{int
This section documents the keys provided by the \pkg{fontscale} package.
This package has no package options.
-Set the package keys using \cs{fontscalesetup}\marg{key-value list} (\S\ref{subsec:fontscalesetup}).
+Set the package keys using \cs{fontscalesetup}\marg{key\-/value list} (\S\ref{subsec:fontscalesetup}).
\subsection{The typographic scale}
\label{subsec:typographicscale}
@@ -131,8 +131,6 @@ Sets the font size of each font size command from \cs{tiny} to \cs{Huge} using a
These are common methods of choosing a set of document font sizes.
The keys \Key{classic\-/10pt}, \Key{classic\-/11pt}, \Key{classic\-/12pt}, and \Key{musical} set the key \Key{typographic\-/scale} to the corresponding value.
-\input{./fontscale-table-classic.tex}
-
The classic typographic scale consists of the traditional font sizes
\numlist{6;7;8;9;10;11;12;14;16;18;21;24;36;48;60;72}.%
\footnote{See \S3.1 of \textit{The Elements of Typographic Style} by Robert Bringhurst.}
@@ -142,6 +140,8 @@ The named point size\---\qtylist[list-final-separator={, or }]{10;11;12}{pt}\---
The font sizes of the other font size commands are the adjacent font sizes in the classic typographic scale.
Table~\ref{table:classic} displays the font size of each font size command when using a classic typographic scale.
+\input{./fontscale-table-classic.tex}
+
\Key{musical/base}[\meta{dimen expression}][10pt]%
\nopagebreak\newline
\Key{musical/ratio}[\meta{floating point expression}][2]%
@@ -181,17 +181,17 @@ The font baselineskips of the font size commands from \cs{tiny} to \cs{Huge} are
\KeepNextPar*
Sets the font baselineskip of each font size command from \cs{tiny} to \cs{Huge} equal to its font size \texttimes{} the result of computing the \meta{floating point expression}.
-Sets the font baselineskip set by \cs{SetFontStep}, \cs{SetFontScale}, and \cs{SetFontSize} (\S\ref{subsec:fontsize}) equal to the new font size \texttimes{} the result of computing the \meta{floating point expression}.
-The font baselineskip must be greater than or equal to the font size.
+Sets the font baselineskip set by \cs{SetFontStep}, \cs{SetFontScale}, and \cs{SetFontSize} equal to the new font size \texttimes{} the result of computing the \meta{floating point expression} (\S\ref{subsec:fontsize}).
\subsection{Overwriting the previous keys}
\label{subsec:overwriting}
This subsection documents keys for directly setting the font scales, font sizes, and font baselineskips of the font size commands from \cs{tiny} to \cs{Huge}.
-When doing so, the user should take care to ensure that the lengths of the font sizes and font baselineskips remain correctly ordered from \cs{tiny} to \cs{Huge}.
+
+The user should take care to ensure that the lengths of the font sizes remain correctly ordered from \cs{tiny} to \cs{Huge}.
This is important for typographic and syntactic consistency.
-If the font size commands are in the wrong order, this package will issue a warning and some package features may not work correctly.
+If the font sizes are in the wrong order, \cs{fontscalesetup} will issue a warning and some package features may not work correctly.
\Key{\meta{font size command}/scale}[\meta{floating point expression}][\meta{not set}]
\KeepNextPar*
@@ -210,16 +210,18 @@ Overwrites the font size set by the keys \Key{typographic\-/scale} and \Key{\met
\KeepNextPar*
Sets the font baselineskip of \meta{font size command} to the value of \meta{skip expression}, appending a default unit of \unit{pt}.
-The font baselineskip must be greater than or equal to the font size.
Overwrites the font baselineskip set by the key \Key{baselineskip\-/size\-/ratio}.
\Key{\meta{font size command}}[\meta{dimen expression}]
\nopagebreak\newline
\Key{\meta{font size command}}[\meta{dimen expression}/\meta{skip expression}]
-Sets the keys \Key{\meta{font size command}\slash{}size}[\meta{dimen expression}] or \Key{\meta{font size command}\slash{}baselineskip}[\meta{skip expression}] in a condensed format.
-The latter format resembles traditional typographic notation where the size and leading of a text can be expressed as, for example, \num{10}/\num{12} or \num{11}/\num{13}.
-The number before\slash{}after the slash is the size\slash{}leading in units of \unit{pt}.
+Sets the keys \Key{\meta{font size command}\slash{}size}[\meta{dimen expression}] or \Key{\meta{font size command}\slash{}baselineskip}[\meta{skip expression}] in a condensed format.%
+\footnote
+ {%
+ The latter format resembles traditional typographic notation where the size and leading of a text can be expressed as, for example, \num{10}/\num{12} or \num{11}/\num{13}.
+ The number before\slash{}after the slash is the size\slash{}leading in units of \unit{pt}.%
+ }
\section{Commands}
@@ -235,7 +237,6 @@ This section documents the commands provided by the \pkg{fontscale} package.
Sets and processes the \pkg{fontscale} package keys (\S\ref{sec:keys}) in \meta{key\-/value list} and then uses \cs{normalsize}.
Adding the optional star first resets all the \pkg{fontscale} package keys to their initial values.
-The order of the keys in \meta{key\-/value list} does not matter.
Can be used mid\-/document.
The effect is local to the current group.
Does nothing, except issue a warning, if used in math mode.
@@ -274,7 +275,7 @@ Tests if the current font size and current font baselineskip equal the font size
If so, expands to the name of that font size command.
This omits the backslash character and leaves only letters with catcode \num{11}.
If not, expands to nothing.
-This package also provides a similar command \cs{PrintFontSizeCommand} (\S\ref{subsec:debug}), which is not expandable and includes the backslash character.
+This package also provides a similar command \cs{PrintFontSizeCommand}, which is not expandable and includes the backslash character (\S\ref{subsec:debug}).
\subsection{More font size commands}
\label{subsec:fontsize}
@@ -328,10 +329,20 @@ Does nothing, except issue a warning, if used in math mode.
Sets the font size to the value of \meta{dimen expression}, appending a default unit of \unit{pt}.
Sets the font baselineskip to the value of \meta{skip expression}, appending a default unit of \unit{pt}.
-The font baselineskip must be greater than or equal to the font size.
Does nothing, except issue a warning, if used in math mode.
Can be used as an alternative to \cs{fontsize} + \cs{selectfont} as discussed in \S\ref{subsec:expandable}.
+\subsection{Setting only the font baselineskip}
+\label{subsec:setfontbaselineskip}
+
+\cs{SetFontBaselineskip} \sarg{} \marg{skip expression}
+\KeepNextPar*
+
+Sets the font baselineskip to the value of \meta{skip expression}, appending a default unit of \unit{pt}.
+Adding the optional star instead increases the current font baselineskip by the result of \meta{skip expression}, appending a default unit of \unit{pt}.
+Does not change the font size.
+Does nothing, except issue a warning, if used in math mode.
+
\subsection{Testing and debugging}
\label{subsec:debug}
@@ -355,7 +366,7 @@ Prints the font step, font scale, font size, and font baselineskip of each font
Prints \meta{text} in each font size ordered from \cs{tiny} to \cs{Huge} each followed by a paragraph break.
\meta{text} can contain \cs{par} tokens.
Adding the optional star reverses the order of the font sizes.
-One useful way of printing example text is \cs{PrintSampleText}\allowbreak\texttt{\{\cs{PrintFontSizeCommand}:\allowbreak\textvisiblespace\allowbreak\cs{PrintFontSizeParameters}\}}.
+One useful way of printing sample text is \cs{PrintSampleText}\allowbreak\texttt{\{\cs{PrintFontSizeCommand}:\allowbreak\textvisiblespace\allowbreak\cs{PrintFontSizeParameters}\}}.
\cs{PrintFontSizeCommand}
\KeepNextPar*
@@ -363,7 +374,7 @@ One useful way of printing example text is \cs{PrintSampleText}\allowbreak\textt
Tests if the current font size and current font baselineskip equal the font size and font baselineskip, respectively, of any font size command from \cs{tiny} to \cs{Huge}.
If so, prints the name of that font size command, including the backslash character.
If not, prints \enquote{\string\undefined}.
-This package also provides a similar command \cs{CurrentFontSizeCommand} (\S\ref{subsec:expandable}), which is expandable and omits the backslash character.
+This package also provides a similar command \cs{CurrentFontSizeCommand}, which is expandable and omits the backslash character (\S\ref{subsec:expandable}).
\section{Programming}
@@ -380,7 +391,7 @@ This section documents the \pkg{expl3} programming support provided by the \pkg{
}
\label{subsec:textpurify}
-\cs{text_purify:n} will correctly remove the formatting commands defined by this package, including \cs{fontscalesetup} and the commands documented in \S\ref{subsec:fontsize}.
+\cs{text_purify:n} will correctly remove the formatting commands defined by this package, including the commands documented in \S\ref{subsec:fontscalesetup}, \S\ref{subsec:fontsize}, and \S\ref{subsec:setfontbaselineskip}.
\subsection{Public functions and variables}
\label{subsec:publicexpl3}
diff --git a/macros/latex/contrib/framedsyntax/FramedSyntax.dtx b/macros/latex/contrib/framedsyntax/FramedSyntax.dtx
new file mode 100644
index 0000000000..7a7fba17b3
--- /dev/null
+++ b/macros/latex/contrib/framedsyntax/FramedSyntax.dtx
@@ -0,0 +1,930 @@
+% \iffalse
+% !TEX encoding = UTF-8 Unicode
+%<*internal>
+\begingroup
+\input docstrip.tex
+\keepsilent
+\preamble
+
+ Copyright (C) 2024 Claudio Beccari all rights reserved.
+
+ Distributable under the LaTeX Project Public License,
+ version 1.3c or higher (your choice). The latest version of
+ this license is at: http://www.latex-project.org/lppl.txt
+
+\endpreamble
+\postamble
+This Work has the status of `maintained'
+
+The Current Maintainer is Claudio Beccari
+
+This work consists of this file FramedSyntax.dtx,
+and the derived files FramedSyntax.sty and FramedSyntax.pdf.
+\endpostamble
+
+\askforoverwritefalse
+
+\generate{\file{FramedSyntax.sty}{\from{FramedSyntax.dtx}{package}}}
+
+\def\tmpa{plain}
+\ifx\tmpa\fmtname\endgroup\expandafter\bye\fi
+\endgroup
+%</internal>
+% \fi
+%
+% \iffalse
+%<*driver>
+\ProvidesFile{FramedSyntax.dtx}%
+%</driver>
+%<package>\NeedsTeXFormat{LaTeX2e}[2019/01/01]
+%<package>\ProvidesPackage{FramedSyntax}%
+ [2024-09-04 v.0.2.8 Typeset command syntax within a special frame]
+%<*driver>
+\documentclass{ltxdoc}\errorcontextlines=100
+\hfuzz 10pt
+\usepackage[utf8]{inputenc}% not really necessary
+\usepackage{lmodern}% scalable fonts
+\usepackage{mflogo}
+\usepackage{multicol, amsmath, fancyvrb, graphicx, verbatim}
+\usepackage{etoolbox, enumitem, xspace, xcolor, FramedSyntax
+}
+%
+\providecommand*\diff{\mathop{}\!\mathrm{d}}
+\providecommand\file{}
+\renewcommand*\file[1]{{\normalfont\texttt{#1}}}
+\providecommand\prog{}
+\renewcommand*\prog[1]{{\normalfont\texttt{#1}}}
+\providecommand\conta{}
+\renewcommand*\conta[1]{\texttt{\slshape#1}}
+\providecommand\cs{}
+\renewcommand\cs[1]{{\normalfont\texttt{\char92#1}}}
+\renewcommand\meta[1]{{\normalfont\textlangle\textit{#1}\textrangle}}
+\renewcommand\marg[1]{\texttt{\{\meta{#1}\}}}
+\providecommand\Marg{}
+\renewcommand*\Marg[1]{\texttt{\{#1\}}}
+\providecommand\oarg{}
+\renewcommand*\oarg[1]{\texttt{[\meta{#1}]}}
+\providecommand\Oarg{}
+\renewcommand*\Oarg[1]{\texttt{[#1]}}
+\providecommand\aarg{}
+\renewcommand*\aarg[1]{\texttt{<\meta{#1}>}}
+\providecommand\Aarg{}
+\renewcommand*\Aarg[1]{\texttt{<#1>}}
+\providecommand\parg{}
+\renewcommand*\parg[1]{\texttt{(\meta{#1})}}
+\providecommand\Parg{}
+\renewcommand*\Parg[1]{\texttt{(#1)}}
+\providecommand\pack{}
+\renewcommand*\pack[1]{{\textsf{#1}}}
+\let\class\pack
+\providecommand\opt{}
+\renewcommand*\opt[1]{{\normalfont\textsl{#1}}}\let\opz\opt
+\providecommand\env{}
+\renewcommand*\env[1]{{\normalfont\textit{\bfseries#1}}}\let\amb\env
+
+\providecommand\TB{\mbox{\normalfont\slshape TUGboat}\xspace}
+
+\definecolor{verdeguit}{rgb}{0, 0.40, 0}
+\def\GuIT{\mbox{\color{verdeguit}\def\I{\textcolor{black}{I}}%
+ \fontfamily{lmr}\fontseries{m}\fontshape{sc}\selectfont
+g\raisebox{-0.715ex}{\kern-0.26em u}\kern-0.13em\I\kern-0.14em t}\xspace}
+\RequirePackage{etoolbox}
+
+\makeatletter
+
+\AfterEndPreamble{%
+\DeclareRobustCommand{\TeX}{T\kern-.1667em
+ \lower.5ex\hbox{E}\kern-.125emX\@\xspace}% \TeX
+\DeclareRobustCommand{\LaTeX}{L\kern-.36em%
+ {\sbox\z@ T%
+ \vbox to\ht\z@{\hbox{\check@mathfonts
+ \fontsize\sf@size\z@
+ \math@fontsfalse\selectfont
+ A}%
+ \vss}%
+ }%
+ \kern-.15em\TeX
+ }%
+\DeclareRobustCommand{\LaTeXe}{L\kern-.36em%
+ {\sbox\z@ T%
+ \vbox to\ht\z@{\hbox{\check@mathfonts
+ \fontsize\sf@size\z@
+ \math@fontsfalse\selectfont
+ A}%
+ \vss}%
+ }%
+ \kern-.15em\TeX\kern-0.3em$_{\textstyle\mathrm{2e}}$
+ }%
+}
+\makeatother
+
+\DeclareRobustCommand*\TeXLive{\TeX\ Live\xspace}
+\DeclareRobustCommand*\MikTeX{Mik\TeX}
+\DeclareRobustCommand*\MacTeX{Mac\TeX}
+\DeclareRobustCommand*\pdfLaTeX{pdf\/\LaTeX}
+\DeclareRobustCommand*\LuaLaTeX{Lua\LaTeX}
+\DeclareRobustCommand*\XeLaTeX{X\ifdim\fontdimen1\font=0pt
+ \kern-0.15em\fi\lower.5ex\hbox{\rotatebox[origin=c]{180}{E}}%
+ \ifdim\fontdimen1\font=0pt\kern-0.15em\else\kern-0.275em\fi
+ \LaTeX}
+\DeclareRobustCommand*\TikZ{Ti\emph{k}Z\xspace}
+
+%\unless\ifcsname Gr@phGrid\endcsname
+%\let\originalGraphGrid\GraphGrid
+%\RenewDocumentCommand\GraphGrid{r() d()}{%
+%\IfValueTF{#1}{\put(#1){\originalGraphGrid(#2)}}%
+% {\put(0,0){\originalGraphGrid(#2)}}}\fi
+
+\begin{document}\errorcontextlines=100
+\GetFileInfo{FramedSyntax.dtx}
+\title{The \textsf{FramedSyntax} package}
+\author{Claudio Beccari\\[1ex]\texttt{claudio.beccari(at)gmail.com}}
+\date{Version \fileversion~--~Last revised \filedate.}
+\maketitle
+\columnseprule=0.4pt
+\begin{multicols}{2}
+ \tableofcontents
+ \end{multicols}
+ \DocInput{FramedSyntax.dtx}
+\end{document}
+%</driver>
+% \fi
+%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \section*{Preface}
+%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% The \pack{FramedSyntax} package contains the necessary code to
+% implement a framed block of text that is emphasised compared to
+% the normal text. I found this technique very handy for writing
+% the documented \TeX files that describe the new packages that
+% I create, and the user manuals of those packages. As a member
+% of the Italian Tug I also wrote a number of thematic guides for
+% the Italian users; they seem to appreciate that the syntax of
+% \LaTeX, classes and packages are written with these framed
+% emphasised blocks, clearly emerging form the surrounding text.
+%
+% This is why I would like to share my package with the other
+% \TeX users. May be they would like to use the same approach.
+% I perfectly know that there are other packages and classes to
+% write down documented \TeX files, such as those that
+% traditionally have a \file{.dtx} file extension. Some of them
+% are really powerful; I wonder why I keep using the
+% \pack{docstrip.tex} file and the \class{ltxdoc} class to write
+% down my documented \TeX files. The first simplest answer is
+% “Because I am used to it”. The second is “Because I don't like
+% to use too powerful packages, such as, for example,
+% \pack{tikz}”; this package is a beautiful one, extremely
+% powerful, but it is memory consuming, and computer blocking
+% due to exhausted \TeX working memory occurred to me more often
+% than I could stand.
+%
+% Dear User: if you do not like the name \pack{FramedSyntax}
+% downloaded with a full and updated TeX System installation,
+% copy this file to your local \texttt{texmf} directory, and
+% change the file name to another name that fits your
+% preferences. Never change the names of the \TeX System files
+% even if you have the administrator privileges. In any case,
+% since this work was inspired by a style file of mine written
+% in Italian, this package already contains an alias
+% \amb{Sintassi} environment with the Italian name.
+%
+%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%\section{What the \pack{FramedSyntax.sty} package can do}
+%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% The user can use this package and can specify the package
+% options; these include the colours
+% of the frame, the text, the background; the frame thickness and
+% colour; the frame-text gap; the text font family, series,
+% shape, and size. These settings can be global or local,
+% therefore you can select some of these settings for specific
+% syntax instances.
+%
+% Most often than not, you'll be using the default text fonts for
+% the whole document. Please do not use the old Computer Modern
+% fonts; they are not scalable, but may be chosen at a discrete
+% set of sizes. The Latin Modern ones are stepwise continuously
+% scalable, thanks to the scalable optical sizes they are built
+% with. Other fonts, such as the Times, the Palatino, the
+% Libertinus ones, and many others are continuously scalable
+% over wide ranges.
+%
+% While describing and commenting the code, you will read more
+% detailed comments on such font issues.
+%
+% In general the syntax frame fills up the whole \cs{textwidth};
+% in reality it should fill up the current \cs{linewidth};
+% within a list this frame will be shorter and indented as the
+% list text.
+%
+% This framed syntax box will not split across a page break;
+% matter of facts, the next section example height is too large
+% to fit in the page, and a large white vertical space filled
+% this page, in order to have the framed box completely in within
+% the next section. If you need long framed texts, you should
+% preferably use the \pack{tcolorbox} package (which relies on
+% the extremely powerful \pack{tikz} one) and performs much
+% better than my simple package, in particular it can split its
+% boxes across page breaks.
+%
+% Warning: This small package does similar things as the
+% \pack{wrapfig2} package, but such packages are not supposed
+% to interfere with each other.
+%
+% \begin{FramedSyntax}
+% \texttt{\% !TEX TS-program = } \meta{LaTeX based compiler}
+% \texttt{\% !TEX encoding = UTF-8 Unicode}
+% ~
+% \cs{documentclass}\oarg{options}\marg{class}
+% \dots\ \meta{Packages}
+% \cs{usepackage}\oarg{key=value options}\Marg{FramedSyntax}
+% \dots\ \meta{Other packages}
+% ~
+% \cs{begin}\Marg{document}
+% \dots\ \meta{A part of document body}
+% \cs{begin}\Marg{FramedSyntax}
+% \dots\ \meta{Some syntax lines}
+% \cs{end}\Marg{FramedSyntax}
+% \dots\ \meta{Further document body}
+% ~
+% \cs{end}\Marg{document}
+% \end{FramedSyntax}
+%
+%
+%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%\section{Usage example}
+%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% The above framed syntax box contains a sample for using
+% this package.\footnote{You may notice that the framed box width
+% is a little shorter than the \cs{linewidth}, exactly 10\,pt
+% shorter. This happens with this particular documentation class
+% \class{ltxdoc}: I was not able to find the cause, but
+% several tests with other classes proved to perform as
+% expected.}
+%
+% In order to use this package a user should use this syntax.
+% The above elementary example was done with the following
+% source code.
+%\begin{Verbatim}[gobble=1]
+% \begin{FramedSyntax}
+% \texttt{\% !TEX TS-program = } \meta{LaTeX based compiler}
+% \texttt{\% !TEX encoding = UTF-8 Unicode}
+% ~
+% \cs{documentclass}\oarg{options}\marg{class}
+% \dots\ \meta{Packages}
+% \cs{usepackage}\oarg{key=value options}\Marg{FramedSyntax}
+% \dots\ \meta{Other packages}
+% ~
+% \cs{begin}\Marg{document}
+% \dots\ \meta{A part of document body}
+% \cs{begin}\Marg{FramedSyntax}
+% \dots\ \meta{Some syntax lines}
+% \cs{end}\Marg{FramedSyntax}
+% \dots\ \meta{Further document body}
+% ~
+% \cs{end}\Marg{document}
+% \end{FramedSyntax}
+%\end{Verbatim}
+%
+%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%\section{Indexing}
+%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% The syntax macros can send their arguments to an \file{.idx}
+% file. If package \pack{imakeidx} is loaded in the preamble
+% and the \cs{makeindex} macro (with its own options) is used
+% to activate the indexing process, the index is created
+% without the need of manually running the necessary programs
+% to transform the information collected into the \file{.idx}
+% to the proper code into the \file{.ind} file.
+%
+% For example the following source code
+%\begin{Verbatim}[gobble=1]
+% % !TEX TS-program = pdflatex
+% % !TEX encoding = UTF-8 Unicode
+% \documentclass[12pt]{article}
+% \usepackage{imakeidx}\makeindex
+% \usepackage{FramedSyntax}
+% \usepackage{kantlipsum}
+%
+% \begin{document}
+% \kant[1]
+% \begin{FramedSyntax}
+% \cs{Large}
+% \end{FramedSyntax}
+%
+% \kant[2-3]
+% \begin{FramedSyntax}
+% \cs{small}
+% \end{FramedSyntax}
+%
+% \kant[4]
+%
+% \printindex
+%
+% \end{document}
+%\end{Verbatim}
+% produces a three page article containing dummy test,
+% with a framed syntax box in each page. Both framed commands,
+% introduced by means of the \cs{cs} command, are listed in the
+% third page, correctly pointung to page~1 end page~2.
+% Users are suggested to copy the above short code, save it in a
+% testing \file{.tex} file, and compile it with \prog{pdfLaTeX};
+% with just one run the file gets compiled together with its
+% index.
+%
+% \CheckSum{650}
+%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%\StopEventually{}
+%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%\section{The documented code}
+%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Here the package code is defined and commented.
+%
+%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%\subsection{The necessary packages}
+%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+%\pack{FramedSyntax} relies on a number of other packages;
+% they are the following:
+% \begin{macrocode}
+\IfPackageLoadedF{pict2e}{\RequirePackage{pict2e}}
+\IfPackageLoadedF{etoolbox}{\RequirePackage{etoolbox}}
+\IfPackageLoadedF{xkeyval}{\RequirePackage{xkeyval}}
+\IfPackageLoadedF{xcolor}{\RequirePackage{xcolor}}
+%
+% \end{macrocode}
+% The last three packages are loadeed for obvious reasons, since
+% they are connected to \LaTeX programming and the package
+% specific functionalities.
+% May be the most puzzling one is \pack{pict2e}; it is loaded in
+% order to use its low level commands used to draw the frame
+% with rounded corners, i.e. the lines and the corner arcs;
+% they can be coloured and their thickness may be specified;
+% they form closed paths that can be stroked in a specific
+% colour or filled with another specific colour.
+%
+%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%\subsection{The syntax macros}
+%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% These numerous commands are used to typeset in a specific
+% style the command arguments, the files, classes, packages,
+% options names; commands, and so on. If in any source file
+% indexing is active, each command sends the relevant information
+% to the \file{.idx} file.
+%
+% All package internal commands have names that are prefixed with
+% the string \texttt{FS}, so as to avoid conflicts with similar
+% named commands defined by other classes or packages. These are
+% not user commands, they are only for internal use. At the
+% beginning of the \amb{FramedSyntax} environment all user
+% commands (that users input without this prefix) will be let to
+% the internal commands, so that no interference exists and
+% no clash errors take place.
+%
+% Notice the non prefixed names: \cs{marg} and \cs{Marg} (and
+% its siblings): with the lower case initial letter the
+% syntax \emph{mandatory} argument is printed in italics
+% surrounded by angle brackets; with an uppercase initial letter
+% the syntax \emph{mandatory} argument is printed in teletype
+% and is not surrounded by angle brackets.
+% Similarly syntax \emph{optional} arguments are typeset within
+% square brackets but the initial letter case specifies the
+% difference between an argument to be entered by the user,
+% and an argument with a specific value.
+%
+% Since initially I wrote the package for myself, some unusual
+% object names are spelled in mixed languages: for example it is
+% evident that \texttt{marg} stands for \emph{mandatory
+% argument} without any language mixture; the Italian word
+% \texttt{stile} evidently stands for the English word
+% \emph{style}; similarly \texttt{allineamento} stands for
+% \emph{alignement}; \texttt{numeristyle} is in mixed languages
+% but obviously it stands for \emph{numbers style}; possibly the
+% only one, that may puzzle a non Italian user, is the word
+% \texttt{chiave} that stands for \emph{key}.
+%
+% Entries for a possible index are already created in such a way
+% as to use the correct language for the index in Italian or the
+% index in English. Should another user prefer to create the
+% index in a different language, such a user is free to redefine
+% in his/her document the indexing macros defined in this
+% package>
+% \begin{macrocode}
+\providecommand*\FSmeta[1]{\textnormal{$\langle$\textit{#1}$\rangle$}}
+\providecommand*\FSmarg[1]%
+ {\textnormal{\texttt{\char123}\FSmeta{#1}\texttt{\char125}}}
+\providecommand*\FSoarg[1]{\textnormal{\texttt{[}\FSmeta{#1}\texttt{]}}}
+\providecommand*\FSArg[1]{\textnormal{\texttt{\{#1\}}}}
+\let\FSMarg\FSArg
+\providecommand*\FSOarg[1]{\textnormal{\texttt{[#1]}}}
+\def\GT@splitargs#1,#2!{\def\@tempA{#1}\def\@tempB{#2}}
+\providecommand\FSgarg[1]{\textnormal{\GT@splitargs#1!\%
+ \texttt{(}\FSmeta{\@tempA}\texttt{,}\FSmeta{\@tempB}\texttt{)}}}
+\providecommand*\FScomando[1]{\textnormal{\texttt{\string#1}}}
+\providecommand*{\FScs}[1]%
+{\textnormal{\texttt{\char92#1}\index{#1@\texttt{\char92#1}|textsc}}}
+\let\FScsindex\FScs
+%
+\providecommand*\SFSambiente[2]{%
+\FScomando{\begin}\FSmarg{#1}\FSoarg{#2}\,\dots
+ \FScomando{\end}\FSmarg{#1}}
+\providecommand*\DFSambiente[3]{%
+ \FScomando{\begin}\FSmarg{#1}\FSoarg{#2}\FSoarg{#3}\,\dots
+ \FScomando{\end}\FSmarg{#1}}
+\providecommand*\BFSambiente[1]{\FScomando{\begin}\FSmarg{#1}}
+\providecommand*\EFSambiente[1]{\FScomando{\end}\FSmarg{#1}}
+\IfPackageLoadedF{cfr-lm}{\let\texttm\texttt \let\texttv\texttt}
+%
+\DeclareRobustCommand*\FSambstyle[1]{%
+ {\normalfont\textsf{\slshape#1}}}
+\DeclareRobustCommand*\FSclassstyle[1]{%
+ {\normalfont\texttv{\itshape#1}}}
+\DeclareRobustCommand*\FSfilestyle[1]{%
+ {\normalfont\texttm{\texttt{#1}}}}
+\DeclareRobustCommand*\FSpackstyle[1]{%
+ {\normalfont\texttm{\ifbool{PDFTeX}{\textit}{\itshape}{#1}}}}%
+\DeclareRobustCommand*\FSprogstyle[1]{{\normalfont\textsf{#1}}}
+\DeclareRobustCommand*\FSprog[1]{\FSprogstyle{#1}%
+\iflanguage{english}{\index{program!#1@\FSprogstyle{#1}|textsc}}%
+ {\index{programma!#1@\FSprogstyle{#1}|textsc}}}%
+\DeclareRobustCommand*\FSpack[1]{\FSpackstyle{#1}%
+\iflanguage{english}{\index{package!#1@\FSpackstyle{#1}|textsc}}%
+ {\index{pacchetto!#1@\FSpackstyle{#1}|textsc}}}
+\DeclareRobustCommand*\FSclass[1]{\FSclassstyle{#1}%
+ \iflanguage{english}{\index{class!#1@\FSclassstyle{#1}|textsc}}%
+ {\index{classe!#1@\FSclassstyle{#1}|textsc}}}%
+\DeclareRobustCommand*\file[1]{\FSfilestyle{#1}%
+ \index{file!#1@\FSfilestyle{#1}|textsc}}%
+\DeclareRobustCommand*\FSamb[1]{\FSambstyle{#1}%
+ \iflanguage{english}%
+ {\index{environment!#1@\FSambstyle{#1}|textsc}}%
+ {\index{ambiente!#1@\FSambstyle{#1}|textsc}}}%
+\DeclareRobustCommand*\FSopzstyle[1]{%
+ {\normalfont\textsf{\slshape{#1}}}}%
+\DeclareRobustCommand*\FScontastyle[1]{{\normalfont\texttm{#1}}}
+\DeclareRobustCommand*\FSstilestyle[1]{{\normalfont\texttm{#1}}}
+\DeclareRobustCommand*\FSnumeristyle[1]{{\normalfont\texttm{#1}}}
+\DeclareRobustCommand*\FSumisurastyle[1]{{\normalfont\texttm{#1}}}
+\DeclareRobustCommand*\FSchiavestyle[1]{{\normalfont\texttm{#1}}}
+\DeclareRobustCommand*\FSdescrittorestyle[1]{{\normalfont\texttm{#1}}}
+\DeclareRobustCommand*\FSposizionestyle[1]{{\normalfont\texttm{#1}}}
+\DeclareRobustCommand*\FSallineamentostyle[1]{{\normalfont\texttm{#1}}}
+%
+\DeclareRobustCommand*\FSopz[1]{\opzstyle{#1}%
+ \iflanguage{english}{\index{option!#1@\FSopzstyle{#1}|textsc}}%
+ {\index{opzione!#1@\opzstyle{#1}|textsc}}}%
+\DeclareRobustCommand*\FSconta[1]{\Fcontastyle{#1}%
+ \iflanguage{english}{\index{counter!#1@\FScontastyle{#1}|textsc}}%
+ {\index{contatore!#1@\FScontastyle{#1}|textsc}}}
+\DeclareRobustCommand*\FSstile[1]{\FSstilestyle{#1}%
+ \iflanguage{english}{\index{page style!#1@\FSstilestyle{#1}|textsc}}%
+ {\index{stile della pagina!#1@\FSstilestyle{#1}|textsc}}}
+\DeclareRobustCommand*\FSnumeri[1]{\FSnumeristyle{#1}%
+ \iflanguage{english}{\index{numbering!#1@\FSnumeristyle{#1}|textsc}}%
+ {\index{numerazione!#1@\FSnumeristyle{#1}|textsc}}}
+\DeclareRobustCommand*\FSumisura[1]{\FSumisurastyle{#1}%
+ \iflanguage{english}{measuring unit!#1@\FSumisurastyle{#1}|textsc}%
+ {\index{unità di misura!#1@\FSumisurastyle{#1}|textsc}}}
+\DeclareRobustCommand*\FSchiave[1]{\FSchiavestyle{#1}%
+ \iflanguage{english}{\index{key!#1@\FSchiavestyle{#1}|textsc}}%
+ {\index{chiave!#1@\chiavestyle{#1}|textsc}}}
+\DeclareRobustCommand*\FSdescrittore[1]{\FSdescrittorestyle{#1}%
+ \iflanguage{english}%
+ {\index{column descriptor!#1@\FSdescrittorestyle{#1}|textsc}}%
+ {\index{descrittore di colonna!#1@\FSdescrittorestyle{#1}|textsc}}}
+\DeclareRobustCommand*\FSposizione[1]{\FSposizionestyle{#1}%
+ \iflanguage{english}%
+ {\index{floating object position!#1@\FSposizionestyle{#1}|textsc}}%
+ {\index{posizione degli oggetti flottanti!#1@\FSposizionestyle{#1}|textsc}}}%
+\DeclareRobustCommand*\FSallineamento[1]{FS\allineamentostyle{#1}%
+ \iflanguage{english}%
+ {\index{allignment code!#1@\FSallineamentostyle{#1}|textsc}}%
+ {\index{codice di allineamento!#1@\FSallineamentostyle{#1}|textsc}}}
+%
+% \end{macrocode}
+%
+%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%\subsection{Register and colour definitions}
+%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Here we define some length and dimension registers.
+% They will be used by the local commands and environments.
+% Length \cs{insertwidth} might be already defined, therefore we
+% test this possibility.
+% \begin{macrocode}
+\newlength\SIfrthick
+\newlength\SIfrgap
+\newlength\SIfrwidth
+\newlength\SIfrheight
+\ifcsdef{insertwidth}{}{\newlength\insertwidth}
+\newlength\SIXR \newlength\SIYD
+\newlength\SIXL \newlength\SIYU
+\newdimen\radius
+\newdimen\framewidth
+
+\definecolor{SIbackground}{rgb}{0.95,0.95,0.95}
+\definecolor{SIframe}{rgb}{0.1,0.1,0.1}
+\definecolor{SItext}{rgb}{0,0,0}
+
+% \end{macrocode}
+% The default background color is a very light gray; the default
+% frame colour is a very dark gray; the default text colour is
+% just black. Such colours are deemed suitable for the
+% application of the framed syntax box, but when necessary users
+% can use the \cs{textcolor} command to emphasise specific
+% phrases.
+%
+% As it can be seen, these colours are defined by means of the
+% colour defining macros of the \pack{xcolor} package.
+% They define some default colours; but the next commands
+% redefine them at the user choice; actually the user shall
+% specify some \textit{key = value} options to the main syntax
+% environment.
+% \begin{macrocode}
+\def\SetSIbgd#1{\colorlet{SIbackground}{#1}}
+\def\SetSIfrm#1{\colorlet{SIframe}{#1}}
+\def\SetSItxt#1{\colorlet{SItext}{#1}}
+
+% \end{macrocode}
+%
+%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%\subsection{Option settings}
+%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% The next code is the strength of the package; the definition
+% of the option settings. They form an option family defined by
+% the angle brackets delimited string \texttt{sintassi}.
+% Therefore they cannot be redefined by any other class or
+% package unless the above family name is used.
+% \begin{macrocode}
+\DeclareOptionX<sintassi>{fboxrule}[1pt]{\fboxrule=#1}
+\DeclareOptionX<sintassi>{fboxsep}[1ex]{\fboxsep=#1}
+\DeclareOptionX<sintassi>{framecolor}[SIframe]{\SetSIfrm{#1}}
+\DeclareOptionX<sintassi>{backgroundcolor}[SIbackground]{\SetSIbgd{#1}}
+\DeclareOptionX<sintassi>{fontstyle}[\normalfont]{#1}
+\DeclareOptionX<sintassi>{radius}[\fboxsep]{\radius=#1}
+\DeclareOptionX<sintassi>{insertionwidth}[\linewidth]{\insertwidth=#1}
+
+\DeclareOptionX*{%
+ \packageWarning{FramedSyntax}{`\CurrentOption' ignored}%
+}
+
+% \end{macrocode}
+% Notice that the option defining macro \cs{DeclareOptionX}
+% is created by the \pack{keyvalue} package in a simplified way,
+% so as to imitate the \LaTeXe syntax.
+%
+%
+%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%\subsection{Activate all options}
+%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% With just two macros we activate all options of family
+% \texttt{sintassi}
+% \begin{macrocode}
+\ExecuteOptionsX<sintassi>{%
+ fboxrule,
+ fboxsep,
+ framecolor,
+ backgroundcolor,
+ fontstyle,
+ radius,
+ insertionwidth
+}
+\ProcessOptionsX*\relax
+
+% \end{macrocode}
+%
+%
+%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \subsection{A couple of useful local macros}
+%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% The following macros are generally useful for the end users;
+% the first one provides a simple means to scale the font size
+% to any specified integer or fractional value. It comes useful
+% when a line contained in a framed syntax box is too long and
+% gets broken at the end of the box measure. According where the
+% line is broken there are two ways to correct the source file:
+%\begin{itemize}
+%\item
+% the user choses the best point where to break the line,
+% inserts an explicit comment character (|\%|)
+% at the end of the broken line and inserts a horizontal space
+% at the beginning of the remaining part of the broken line.
+%\item
+% At the beginning of the environment body the user may insert a
+% \cs{setfontsize} selecting the specific font size at a smaller
+% integer or fractional value than the normal text size.
+%\end{itemize}
+% This \cs{setfontsize} macro accepts two different syntaxes in
+% order to reach the same result: For example:
+%
+%\verb|\setfontsize{9.5}[1.1]|\par
+%\verb|\setfontsize[1.1]{9.5}|
+%
+% In any case the base line skip value is optional and its
+% default value is 1.2 times the font size. Actually the
+% optional value is not the base line skip value, but it is
+% the \cs{linestretch} value, i.e. the ratio between the desired
+% base line skip and the font size.
+%
+% The second macro exploits the \pack{etoolbox} functionalities
+% to define a user macro that activates an internal native \TeX
+% macro protected by a |%| character.
+% \begin{macrocode}
+\providecommand\setfontsize{}
+\RenewDocumentCommand\setfontsize{O{1.2} m O{#1}}{%
+ \fontsize{#2}{\fpeval{#1*#2}}\selectfont}
+
+\providecommand\strippt{}
+\renewcommand\strippt[1]{\csuse{strip@pt}#1}
+
+% \end{macrocode}
+%
+%
+%
+%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \subsection{The framed box requires several settings}
+%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% The following macro \cs{framedbox} in a certain sense is the
+% heart of the whole construction of the \amb{FramedSyntax}
+% environment. It requires 5 arguments, four mandatory ones and
+% one optional. In order they are as follows
+% \begin{enumerate}
+% \item[\texttt{\#1}]
+% mandatory: the width of the box/
+%
+% \item[\texttt{\#2}]
+% mandatory: the thickness of the frame.
+%
+% \item[\texttt{\#3}]
+% mandatory: the gap width between the frame and the contents
+% of the box.
+%
+% \item[\texttt{\#4}]
+% optional: the radius of curvature of the box corners.
+%
+% \item[\texttt{\#5}]
+% mandatory: the text to be included within the framed box
+% \end{enumerate}
+% Although the corner radius may be chosen, it is suggested to
+% avoid specifying this optional parameter; its default value
+% equals the gap width; if the frame thickness is zero, macro
+% avoids tracing a frame with an invisible line.
+% \begin{macrocode}
+\providecommand\framedbox{}
+\RenewDocumentCommand\framedbox{m m m O{#3} m}{%
+\bgroup
+ \dimen2=#1\relax
+ \dimen0=\dimexpr#1-(#2+#3)*2\relax
+ \setbox0\hbox{\parbox{\dimen0}{#5}}%
+ \SIfrthick=#2\relax
+ \SIXR=\dimexpr\wd0/2\relax \SIXL=-\SIXR\relax
+ \SIYU=\dimexpr(\ht0+\dp0)/2\relax \SIYD=-\SIYU\relax
+ \dimen4=#1\relax % box total width
+ \dimen6=\dimexpr\ht0+\dp0+(#2+#3)*2\relax% box total height
+ \dimen8=#4\relax % corner arc radius
+ \edef\SIbase{\strippt{\dimen4}}
+ \edef\SIalt{\strippt{\dimen6}}
+ \edef\SIxoff{\strippt{\dimexpr0.5\dimen4}}
+ \edef\SIyoff{\strippt{\dimexpr0.5\dimen6}}
+ \unitlength=1pt
+ \begin{picture}(\SIbase,\SIalt)(-\SIxoff,-\SIyoff)
+ \Frame*{\dimen4}{\dimen6}{\dimen8}%
+ \ifdim\SIfrthick>0pt\Frame{\dimen4}{\dimen6}{\dimen8}\fi
+ \put(0,0){\makebox(0,0){\box0}}%
+ \end{picture}
+\egroup
+\ignorespaces}
+
+% \end{macrocode}
+%
+%
+%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \subsection{The frame}
+%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% The actual frame path may be filled with colour; the frame
+% border may be coloured with its own specified colour; such
+% colours are established by the FramedSyntax environment
+% options or by the global options.
+%
+% The \cs{Frame} command requires four parameters already
+% computed by the \cs{framedbox} command; in any case they are
+% the following:
+% \begin{enumerate}
+% \item[\texttt{\#1}]
+% optional: a boolean asterisk; if the asterisk is missing the
+% frame contour is drawn with its colour \texttt{SIframe}; if
+% the asterisk is present the contour is not drawn, but the
+% framed box is filled with the \texttt{SIbackground} colour.
+% \item[\texttt{\#2}]
+% mandatory: overall box width.
+% \item[\texttt{\#3}]
+% mandatory: total box height.
+% \item[\texttt{\#4}]
+% mandatory: the corner arc radius.
+% \end{enumerate}
+%
+% The following code contains the low level \pack{pict2e}
+% commands to draw lines to form a closed path to be stroked or
+% colour filled. They do not form a \pack{pict2e} \cs{oval},
+% although the contour is similar, because the default \cs{oval}
+% cannot be filled.
+% \begin{macrocode}
+ \providecommand\Frame{}
+ \RenewDocumentCommand\Frame{s m m m}{%
+ \bgroup
+ \SIXR=\dimexpr#2/2\relax \SIXL=-\SIXR%
+ \SIYU=\dimexpr#3/2\relax \SIYD=-\SIYU%
+ \IfBooleanTF{#1}{\linethickness{0pt}\color{SIbackground}}%
+ {\linethickness{\SIfrthick}\color{SIframe}}%
+ \moveto(\SIXR,\SIYD+#4)%
+ \circlearc{\SIXR-#4}{\SIYU-#4}{#4}{0}{90}%
+ \circlearc{\SIXL+#4}{\SIYU-#4}{#4}{90}{180}%
+ \circlearc{\SIXL+#4}{\SIYD+#4}{#4}{180}{270}%
+ \circlearc{\SIXR-#4}{\SIYD+#4}{#4}{270}{360}%
+ \closepath
+ \IfBooleanTF{#1}{\fillpath}{\strokepath}%
+ \egroup\ignorespaces}
+
+% \end{macrocode}
+
+%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \subsection{Filling the frame with the syntax text}
+%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% We are almost at the end. Here we define another macro to put
+% the syntax text inside the frame over the background
+% colour. The next command \cs{includeframedtext} provides the
+% necessary arguments to be passed to the lower level command
+% \cs{framedbox}; the arguments are the following:
+% \begin{enumerate}
+% \item[\texttt{\#1}]
+% optional: box width; default value \cs{insertwidth}, which is
+% the actual boxed text width; if it is larger than
+% \cs{linewidth} it is reduced to this value; in this case
+% users should revise they source code in order to fix this
+% little problem.
+% \item[\texttt{\#2}]
+% mandatory: the syntax text to be framed.
+% \item[\texttt{\#3}]
+% optional: the local \textit{key = value} options.
+% \end{enumerate}
+%
+% The code is the following.
+% \begin{macrocode}
+\providecommand\includeframedtext{}
+\RenewDocumentCommand\includeframedtext{O{\insertwidth} m O{}}%
+{\bgroup
+ \ExecuteOptionsX<sintassi>{#3}%
+ \ifdimgreater{\insertwidth}{\linewidth}{\insertwidth=\linewidth}{}%
+ \framedbox{\insertwidth}{\fboxrule}{\fboxsep}[\radius]{#2}%
+\egroup}
+
+% \end{macrocode}
+%
+%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \subsection{The user environment}
+%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Originally this environmente was named \amb{Sintassi}, but in
+% this package we name it \amb{FramedSintax}. The opening
+% statement is very long, because it must contain all the
+% \cs{let} commands that allow the user to use the command names
+% without the \texttt{FS} prefix; such \cs{let} equivalences are
+% local because the \texttt{FS} prefixes were introduced only to
+% avoid clashes with possible definitions of the same names with
+% other purposes.
+%
+% But besides these numerous equivalences, this environment
+% \amb{FramedSyntax} determines the necessary parameters to pass
+% to the service macros
+%
+% The environment requires just two optional arguments.
+% \begin{enumerate}
+% \item[\texttt{\#1}]
+% optional: the font size. The default value is the current
+% font size. This size should be specified only when the syntax
+% lines are marginally longer than the available measure and
+% they get broken close to their natural length. Please,
+% remember that in order to have this size specification work
+% properly, it is necessary to use continuously scalable fonts.
+% This command will not have any useful effect with the original
+% \TeX default Computer Modern fonts; Latin Modern fonts, on
+% the contrary, work very well.
+% \item[\texttt{\#2}]
+% optional: \textit{key = value} options that locally override
+% the global default ones or those that possibly were
+% specified by the user when loading this package.
+% \end{enumerate}
+% \begin{macrocode}
+\ProvideDocumentEnvironment{FramedSyntax}{}{}{}
+\RenewDocumentEnvironment{FramedSyntax}{o D(){}}
+{% environment opening commands
+\IfValueT{#1}{\setfontsize{#1}}% font size setting
+\ExecuteOptionsX<sintassi>{#2}% key = value options
+ \ifdimgreater{\insertwidth}{\linewidth}% width corrrection
+ {\insertwidth=\linewidth}{}%
+\framewidth=\insertwidth
+%
+\let\meta\FSmeta \let\marg\FSmarg \let\oarg\FSoarg
+\let\Arg\FSArg \let\Marg\FSMarg \let\Oarg\FSOarg
+\let\garg\FSgarg \let\comando\FScomando \let\cs\FScs
+\let\csindex\FScs \let\Sambiente\SFSambiente
+\let\Dambiente\DFSambiente
+\let\Bambiente\BFSambiente \let\Eambiente\EFSambiente
+\let\amb\FSamb \let\ambstyle\FSambstyle
+\let\class\FSclass \let\classstyle\FSclassstyle
+\let\file\FSfile \let\filestyle\FSfilestyle
+\let\pack\FSpack \let\packstyle\FSpackstyle
+\let\prog\FSprog \let\progstyle\FSprogstyle
+\let\opz\FSopz \let\opzstyle\FSopzstyle
+\let\conta\FSconta \let\contastyle\FScontastyle
+\let\stile\FSstile \let\stilestyle\FSstilestyle
+\let\numeri\FSnumeri \let\numerystyle\FSnumeristyle
+\let\umisura\FSumisura \let\umisurastyle\FSumisurastyle
+\let\chiave\FSchiave \let\chiavestyle\FSchiavestyle
+\let\descrittore\FSdescrittore
+ \let\descrittorestyle\FSDescrittorestyle
+\let\posizione\FSposizione \let\posizionestyle\FSposizionestyle
+\let\allineamento\FSallineamento
+ \let\allineamentostyle\FSallineamentostyle
+
+%
+\begin{lrbox}{2}% open the necessary boxes
+\begin{minipage}{%
+ \dimexpr\framewidth-2\fboxrule-2\fboxsep}\obeylines
+}{% environment closing commands
+\end{minipage}\end{lrbox}% close the above boxes
+\begin{flushleft}% set the syntax thext flush left
+\includeframedtext{\box2}[#2]
+\end{flushleft}}%
+
+% \end{macrocode}
+%
+%
+%
+%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \subsection%{Backwards compatibility environment \amb{Sintassi}}
+%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% As said in the Preface, this package was inspired by a
+% \file{.sty} file of mine written in Italian; I might conserve
+% my older file but, since it is not so safe against macro
+% definition clashes, in the several document source files I
+% wrote with the previous implementation. I am going to change
+% the name of the imported file, but I will conserve the
+% multitude of instances of the old environment name, by an
+% alias defined in this package.
+% \begin{macrocode}
+\NewDocumentEnvironment{Sintassi}{o D(){}}%
+ {\begin{FramedSyntax}[#1](#2)}{\end{FramedSyntax}}
+% \end{macrocode}
+%.
+%
+%\iffalse
+%<*package>
+%\fi
+%
+% \begin{center}\color{red}\fontsize{50}{50}\selectfont
+% Enjoy \LaTeX
+%\end{center}
+%\iffalse
+%</package>
+%\fi
+% \Finale
+
+\endinput
+
+%
+%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+%
+%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+%
+%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+%
+%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+%
+%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+%
+%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+%
+%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/macros/latex/contrib/framedsyntax/FramedSyntax.pdf b/macros/latex/contrib/framedsyntax/FramedSyntax.pdf
new file mode 100644
index 0000000000..ac6862130b
--- /dev/null
+++ b/macros/latex/contrib/framedsyntax/FramedSyntax.pdf
Binary files differ
diff --git a/macros/latex/contrib/framedsyntax/README.txt b/macros/latex/contrib/framedsyntax/README.txt
new file mode 100644
index 0000000000..29ed193569
--- /dev/null
+++ b/macros/latex/contrib/framedsyntax/README.txt
@@ -0,0 +1,12 @@
+ README.txt file for FramedSyntax.sty 2024-09-04 v.0.2.8
+
+
+ Distributable under the LaTeX Project Public License,
+ version 1.3c or higher (your choice). The latest version of
+ this license is at: http://www.latex-project.org/lppl.txt
+
+ This work is "maintained"
+
+ This work consists of this file FramedSyntax.dtx, a README.txt
+ file and the derived files: FramedSyntax.sty, FramedSyntax.pdf.
+
diff --git a/macros/latex/contrib/fvextra/CHANGELOG.md b/macros/latex/contrib/fvextra/CHANGELOG.md
index 7556c74a2d..1ed8da0390 100644
--- a/macros/latex/contrib/fvextra/CHANGELOG.md
+++ b/macros/latex/contrib/fvextra/CHANGELOG.md
@@ -1,6 +1,50 @@
# Changelog
+## v1.8.0 (2024/09/14)
+
+* Added new option `backgroundcolor` (alias `bgcolor`). This provides a
+ basic, `\colorbox`-based implementation of background colors for commands
+ and environments. Added new option `backgroundcolorvphantom` (alias
+ `bgcolorvphantom`) for customizing background height. Added new option
+ `backgroundcolorpadding` (alias `bgcolorpadding`) for customizing padding
+ between text and the edge of the region with background color.
+
+* Added option `insertenvname`. This customizes the verbatim environment
+ used by `\VerbatimInsertBuffer`.
+
+* When `numberblanklines=false`, `highlightlines` no longer highlights blank
+ lines at the end of a highlighted range (#25, gpoore/minted#226).
+
+* An unnecessary line break is no longer inserted before the last "word" of a
+ line when it is preceded by a long "word" that is broken internally as a
+ result of `breakbefore`, `breakafter`, or `breakanywhere` (#26).
+
+* Added option `breakpreferspaces` (default `true`). This determines whether
+ line breaks are preferentially inserted at normal spaces rather than at
+ other locations allowed by `breakbefore`, `breakafter`, or `breakanywhere`
+ (#26).
+
+* Added option `breakanywhereinlinestretch` (gpoore/minted#387).
+
+* `\FVExtraReadVArg` now takes a multi-line (but not multi-paragraph)
+ verbatim argument. The new `\FVExtraReadVArgSingleLine` provides the old
+ functionality of taking an argument restricted to a single line
+ (gpoore/minted#376).
+
+* By default, `\Verb` and `\SaveVerb` now take multi-line (but not
+ multi-paragraph) verbatim arguments. The old behavior of requiring
+ verbatim arguments to be on a single line can be restored by setting the
+ new option `vargsingleline` to `true`.
+
+* Added documentation for undocumented `fancyvrb` option `listparameters`
+ (gpoore/minted#256).
+
+* Expanded `breaklines` documentation with discussion of limitations and
+ alternatives (gpoore/minted#400).
+
+
+
## v1.7.0 (2024/05/16)
* Added new command `\VerbatimClearBuffer`.
@@ -209,7 +253,7 @@
* Added `highlightlines` option that takes a line number or range of line
numbers and highlights the corresponding lines. Added `highlightcolor`
- option that controls hightlighting color.
+ option that controls highlighting color.
* `obeytabs` no longer causes lines to vanish when tabs are inside macro
arguments. Tabs and spaces inside a macro argument but otherwise at the
diff --git a/macros/latex/contrib/fvextra/fvextra.dtx b/macros/latex/contrib/fvextra/fvextra.dtx
index e4182b6f88..ae05d4e6a9 100644
--- a/macros/latex/contrib/fvextra/fvextra.dtx
+++ b/macros/latex/contrib/fvextra/fvextra.dtx
@@ -26,7 +26,7 @@
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{fvextra}
%<*package>
- [2024/05/16 v1.7.0 fvextra - extensions and patches for fancyvrb]
+ [2024/09/14 v1.8.0 fvextra - extensions and patches for fancyvrb]
%</package>
%
%<*driver>
@@ -111,6 +111,10 @@
\AtBeginDocument{\let|\pipe@active@verbatim}
\endgroup
+\renewenvironment{verbatim}%
+ {\VerbatimEnvironment\begin{Verbatim}[gobble=1]}%
+ {\end{Verbatim}}
+
\newcommand{\todo}[1]{}
%\newcommand{\todo}[1]{\textcolor{red}{TO~DO: \scantokens{#1}}}
@@ -134,6 +138,48 @@
\def\theCodelineNo{\textcolor{DarkGreen}{\sffamily\scriptsize{\arabic{CodelineNo}}}}
+\renewenvironment{macro}{\macro@custom@arg}{}
+\def\macro@custom@arg{%
+ \begingroup\makeatletter\macro@custom@arg@i}
+\def\macro@custom@arg@i#1{%
+ \makeatother
+ \par\noindent
+ \ifstrempty{#1}%
+ {~\par}%
+ {\ttfamily\color{DarkGreen}\hspace*{-0.5in}%
+ \macro@custom@arg@split#1,\FV@Sentinel\par}%
+ \endgroup}
+\def\macro@custom@arg@spacegobble#1{#1}
+\def\macro@custom@arg@split#1,#2\FV@Sentinel{%
+ \expandafter\string\macro@custom@arg@spacegobble#1%
+ \if\relax\detokenize{#2}\relax
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi
+ {}{\\\hspace*{-0.5in}\macro@custom@arg@split#2\FV@Sentinel}}
+
+\renewenvironment{environment}{\env@custom@arg}{}
+\def\env@custom@arg{%
+ \begingroup\makeatletter\env@custom@arg@i}
+\def\env@custom@arg@i#1{%
+ \makeatother
+ \ifstrempty{#1}%
+ {~\par}%
+ {\ttfamily\color{DarkGreen}\hspace*{-0.5in}%
+ \env@custom@arg@split#1,\FV@Sentinel\par}%
+ \endgroup}
+\def\env@custom@arg@spacegobble#1{#1}
+\def\env@custom@arg@split#1,#2\FV@Sentinel{%
+ \env@custom@arg@spacegobble#1{\textrm{ \textit{(env.)}}}%
+ \if\relax\detokenize{#2}\relax
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi
+ {}{\\\hspace*{-0.5in}\env@custom@arg@split#2\FV@Sentinel}}
+
+
\let\orig@footnote\footnote
\renewcommand{\footnote}{%
\begingroup
@@ -147,25 +193,28 @@
\orig@footnote{\scantokens{#1}}}
-\def\fvextraprintopt#1(#2) (#3){%
+\def\fvextra@optionlist@printopt#1(#2) (#3){%
\vspace{0.1in}%
\leavevmode%
- \marginpar{\raggedleft\texttt{\small\textcolor{DarkGreen}{#1}}\ }%
+ \marginpar{\raggedleft\texttt{\textcolor{DarkGreen}{\small #1}}\ }%
\kern-\parindent\textsf{(#2)}\hfill(default: \texttt{#3})\\}
\newenvironment{optionlist}%
- {%
- ~\par\vspace{-14pt}%
+ {~\par\vspace{-14pt}%
\def\pipechar{|}
\let\|\pipechar
- \newcommand*\fvextranext{}%
+ \newcommand*\fvextra@optionlist@next{}%
+ \let\item@orig\item
\renewcommand*\item[1][]{%
- \fvextranext%
- \renewcommand*\fvextranext{\par}%
- \fvextraprintopt##1%
- \ignorespaces}}
- {%
- \par}
+ \ifdefstring{\@currenvir}{optionlist}%
+ {\fvextra@optionlist@next%
+ \renewcommand*\fvextra@optionlist@next{\par}%
+ \fvextra@optionlist@printopt##1%
+ \ignorespaces}%
+ {\ifstrempty{##1}%
+ {\vspace{-4pt}\item@orig}
+ {\vspace{-4pt}\item@orig[##1]}}}}
+ {\par}
\newenvironment{example}
@@ -290,7 +339,7 @@
%\hrule
%\vspace{2ex}
%\noindent\begin{minipage}{\linewidth}
-%\begin{Verbatim}[gobble=1]
+%\begin{verbatim}
%---
%header-includes:
% - |
@@ -301,7 +350,7 @@
% breaklines, breaknonspaceingroup, breakanywhere}
% ```
%---
-%\end{Verbatim}
+%\end{verbatim}
%\end{minipage}
%\vspace{2ex}
%\hrule
@@ -317,6 +366,50 @@
%
% \begin{optionlist}
%
+% \item[backgroundcolor (string) (none)]
+% Background color behind commands and environments. This is only a basic, lightweight implementation of background colors using |\colorbox|. For more control of background colors, consider \href{https://ctan.org/pkg/tcolorbox}{\pkg{tcolorbox}} or a similar package, or a custom background color implementation.
+%
+% Background colors are implemented with |\colorbox|, which prevents line breaking for |\Verb|, |\UseVerb|, and |\EscVerb|. Background colors are only compatible with \fvextra's reimplemented |\Verb| and |\UseVerb| (|extra=true|).
+%
+% See |backgroundcolorvphantom| to customize the height of the background for each line of text, especially for |\Verb|, |\EscVerb|, and |BVerbatim|.
+%
+% When |backgroundcolor| is used with |Verbatim| with a |frame|, it may be necessary to adjust |framesep| and |fillcolor| depending on the desired result. |backgroundcolorpadding| provides a shortcut for this.
+%
+%
+% \item[backgroundcolorpadding (length) (none)]
+% Padding when |backgroundcolor| is set. For |\Verb|, |\UseVerb|, |\EscVerb|, and |BVerbatim|, this sets |\fboxsep| for the |\colorbox| that is used to create the background color. For |Verbatim|, \fancyvrb's frame options are used instead, particularly |framesep| and |fillcolor|.
+%
+% For |Verbatim|, this amounts to a shortcut for a combination of frame-related settings that provide padding when there is a background color. This is only intended for cases with |frame=none| or |frame=single|. In other cases, it may be better to modify the \fancyvrb\ frame settings directly, and it may be necessary to modify the \fancyvrb\ internals to obtain padding on all sides.
+%
+% For |Verbatim|, if |frame=single|, then this is equivalent to the following settings:
+% \begin{itemize}
+% \item |framesep=|\meta{\texttt{backgroundcolorpadding}}
+% \item |fillcolor=\FancyVerbBackgroundColor|
+% \end{itemize}
+%
+% For |Verbatim|, if |frame| has any value other than |single|, then this is equivalent to the following settings:
+% \begin{itemize}
+% \item |frame=single|
+% \item |framerule=0pt|
+% \item |rulecolor=\FancyVerbBackgroundColor|
+% \item |framesep=|\meta{\texttt{backgroundcolorpadding}}
+% \item |fillcolor=\FancyVerbBackgroundColor|
+% \end{itemize}
+%
+%
+% \item[backgroundcolorvphantom (macro) (\Verb{\vphantom{\"Apgjy}})]
+% |\vphantom| or similar macro such as |\strut| that is inserted at the beginning of each line of text using |backgroundcolor|. This allows the height of the background for each line of text to be customized, especially for |\Verb|, |\EscVerb|, and |BVerbatim|. |backgroundcolorvphantom| will typically have no effect on |Verbatim|-based environments unless it is set to a size larger than |\strut|.
+%
+% \item[bgcolor (string) (none)]
+% Alias for |backgroundcolor|.
+%
+% \item[bgcolorpadding (length) (none)]
+% Alias for |backgroundcolorpadding|.
+%
+% \item[bgcolorvphantom (macro) (\Verb{\vphantom{\"Apgjy}})]
+% Alias for |backgroundcolorvphantom|.
+%
+%
% \item[beameroverlays (boolean) (false)]
% Give the |<| and |>| characters their normal text meanings, so that \pkg{beamer} overlays of the form |\only<1>{...}| will work. Note that something like |commandchars=\\\{\}| is required separately to enable macros. This is not incorporated in the |beameroverlays| option because essentially arbitrary command characters could be used; only the |<| and |>| characters are hard-coded for overlays.
%
@@ -522,6 +615,10 @@
% Set the color of visible tabs. By default (|none|), they take the color of their surroundings.
%
%
+% \item[vargsingleline (boolean) (false)]
+% This determines whether \fvextra's |\Verb| and |\SaveVerb| take multi-line (but not multi-paragraph) verbatim arguments, or if they instead require arguments to be on a single line like the original \fancyvrb\ commands.
+%
+%
% \end{optionlist}
%
%
@@ -585,6 +682,8 @@
%
% The new \cmd{\Verb} works as expected (with a few limitations) inside other commands. It even works in movable arguments (for example, in \cmd{\section}), and is compatible with \pkg{hyperref} for generating PDF strings (for example, PDF bookmarks). The \fancyvrb\ definition did work inside some other commands, but essentially functioned as \cmd{\texttt} in that context.
%
+% By default, \cmd{\Verb} takes a multi-line (but not multi-paragraph) verbatim argument. To restore the \fancyvrb\ behavior of requiring a single-line argument, set |vargsingleline=true|.
+%
% \cmd{\Verb} is compatible with |breaklines| and the relevant line-breaking options.
%
% Like the original \fancyvrb\ implementation, the new \cmd{\Verb} can be starred (|\Verb*|) and accepts optional arguments. While \fancyvrb's starred command |\Verb*| is a shortcut for |showspaces|, \fvextra's |\Verb*| is a shortcut for both |showspaces| and |showtabs|. This is more similar to the current behavior of \LaTeX's \Verb{\verb*}, except that \Verb{\verb*} converts tabs into visible spaces instead of displaying them as visible tabs.
@@ -611,6 +710,8 @@
%
% \cmd{\SaveVerb} is reimplemented so that it is equivalent to the reimplemented \cmd{\Verb}. Like the new \cmd{\Verb}, it accepts \meta{text} delimited by a pair of curly braces |{...}|. It supports \cmd{\fvinlineset}. It also adds support for the new |retokenize| option for \cmd{\UseVerb}.
%
+% By default, \cmd{\SaveVerb} takes a multi-line (but not multi-paragraph) verbatim argument. To restore the \fancyvrb\ behavior of requiring a single-line argument, set |vargsingleline=true|.
+%
%
% \subsection{\cmd{\UseVerb}}
%
@@ -814,12 +915,20 @@
% \subsection{\cmd{\VerbatimInsertBuffer}}
% \DescribeMacro{\VerbatimInsertBuffer\oarg{options}}
%
-% This inserts an existing buffer created by |VerbatimBuffer| as a |Verbatim| environment. It customizes |Verbatim| internals to function with a buffer in a command context. See the |VerbatimBuffer| documentation for an example of usage.
+% This inserts an existing buffer created by |VerbatimBuffer| as a verbatim environment. The |Verbatim| environment is used by default, but this can be customized by setting |insertenvname|. |\VerbatimInsertBuffer| modifies |Verbatim| and |BVerbatim| internals to function with a buffer in a command context. See the |VerbatimBuffer| documentation for an example of usage.
%
% Options related to catcodes cause the buffer to be retokenized during typesetting. That is, the \fancyvrb\ options used for |\VerbatimInsertBuffer| are not restricted by those that were in effect when |VerbatimBuffer| originally created the buffer, so long as the buffer contains a complete representation of the original |VerbatimBuffer| environment contents.
%
% |\VerbatimInsertBuffer| is not implemented using the typical \fancyvrb\ command and environment implementation styles, so it is not compatible with |\RecustomVerbatimCommand| or |\RecustomVerbatimEnvironment|.
%
+% ~\par
+% \noindent Options defined specifically for \cmd{\VerbatimInsertBuffer}:
+%
+% \begin{optionlist}
+% \item[insertenvname (string) (Verbatim)]
+% This is the name of the verbatim environment used for inserting the buffer. |insertenvname| can be any |Verbatim|- or |BVerbatim|-based environment. Environments defined with |\CustomVerbatimEnvironment| and |\RecustomVerbatimEnvironment| are supported. User-implemented environments that serve as wrappers around |Verbatim| or |BVerbatim| should typically be compatible so long as they accept \pkg{fancyvrb}/\pkg{fvextra} optional arguments in the same way as |Verbatim| and |BVerbatim|.
+% \end{optionlist}
+%
%
% \subsection{\cmd{\VerbatimClearBuffer}}
% \DescribeMacro{\VerbatimClearBuffer\oarg{options}}
@@ -885,6 +994,17 @@
% The symbol inserted pre-break for breaks inserted by |breakanywhere|. This does not apply to breaks inserted next to spaces; see |spacebreak|.
%
%
+% \item[breakanywhereinlinestretch (length) (\meta{none})]
+% Stretch glue to insert at potential |breakanywhere| break locations in inline contexts, to give better line widths and avoid overfull |\hbox|. This allows the spacing between adjacent non-space characters to stretch, so it should not be used when column alignment is important. For typical line lengths, values between |0.01em| and |0.02em| should be sufficient to provide a cumulative stretch per line that is equal to or greater than the width of one character.
+%
+% This is typically not needed in cases where an overfull |\hbox| only overflows by tiny amount, perhaps a fraction of a pt. In those cases, the overfull |\hbox| could be ignored, |\hfuzz| could be set to 1pt or 2pt to suppress tiny overfull |\hbox| warnings, or |breakanywheresymbolpre| might be redefined to adjust spacing.
+%
+% Implementation: Before each |breakanywhere| break location, this inserts the following sequence of macros:
+%\begin{verbatim}
+%\nobreak\hspace{0pt plus \FV@breaknonspaceinlinestretch}
+%\end{verbatim}
+%
+%
% \item[breakanywheresymbolpost (string) (\meta{none})]
% The symbol inserted post-break for breaks inserted by |breakanywhere|. This does not apply to breaks inserted next to spaces; see |spacebreak|.
%
@@ -931,7 +1051,11 @@
%
%
% \item[breaklines (boolean) (false)]
-% Automatically break long lines. When a line is broken, the result must fit on a single page. There is no support for breaking a line across multiple pages.\footnote{Following the implementation in \pkg{fancyvrb}, each line is typeset within an |\hbox|, so page breaks are not possible.}
+% Automatically break long lines.
+%
+% \textbf{Limitations for verbatim environments/block text}, such as |Verbatim|: When a line is broken, the result must fit on a single page. There is no support for breaking a line across multiple pages.\footnote{Following the implementation in \pkg{fancyvrb}, each line is typeset within an |\hbox|, so page breaks are not possible.}
+%
+% \textbf{Limitations for verbatim commands/inline text}, such as |\Verb|: When a line break is inserted, the text may still overflow into the margin or cause an overfull |\hbox|, depending on hyphenation settings and various penalties related to line breaks. It may be possible to avoid this by allowing additional break locations with |breakbefore|, |breakafter|, or |breakanywhere|. Small overfull |\hbox| warnings can be suppressed by setting |\hfuzz| to a larger value, for example setting it to |2pt| instead of the default |0.1pt|. It is also possible to combine |breakanywhere| with |breakanywhereinlinestretch| to allow flexible spacing between adjacent non-space characters. In cases where it is better to break before the margin rather than overflowing into the margin, consider setting |\emergencystretch|.
%
% By default, automatic breaks occur at spaces (even when |showspaces=true|). Use |breakanywhere| to enable breaking anywhere; use |breakbefore| and |breakafter| for more fine-tuned breaking.
%
@@ -980,6 +1104,12 @@
% |breaknonspaceingroup| allows non-space breaks to be inserted within groups. This option should only be used when |commandchars| is including \LaTeX\ commands that do not take optional arguments and only take mandatory arguments that are typeset. Something like |\textit{text}| is fine, but |\textcolor{red}{text}| is not because one of the mandatory arguments is not typeset but rather provides a setting. For more complex commands, it is typically better to redefine them to insert breaks in appropriate locations using |\FancyVerbBreakStart...\FancyVerbBreakStop|.
%
%
+% \item[breakpreferspaces (boolean) (true)]
+% This determines whether line breaks are preferentially inserted at normal spaces (|breakcollapsespaces=true|, |showspaces=false|) rather than at other locations allowed by |breakbefore|, |breakafter|, or |breakanywhere|.
+%
+% Using |breakpreferspaces=false| with |breakanywhere=true| will typically result in all broken segments of a line going all the way to the right margin.
+%
+%
% \item[breaksymbol (string) (breaksymbolleft)]
% Alias for |breaksymbolleft|.
%
@@ -1369,6 +1499,9 @@
% \item[formatcom* (macro) (\meta{empty})]
% \fancyvrb's |formatcom| is used to execute commands before verbatim text. It overwrites any existing |formatcom|. |formatcom*| appends changes to existing settings.
%
+% \item[listparameters (macro) (\meta{empty})]
+% Set list-related lengths to modify spacing around lines of code. For example, |listparameters=\setlength{\topsep}{0pt}| will remove space before and after a |Verbatim| environment.
+%
% \end{optionlist}
%
%
@@ -1506,7 +1639,7 @@
%
% There are two contexts in which sentinels may be needed. In delimited macro arguments, such as |\def\macro#1\sentinel{...}|, a sentinel is needed as the delimiter. Because the delimiting macro need not be defined, special delimiting macros need not be created for this case. The important thing is to ensure that the macro name is sufficiently unique to avoid collisions. Typically, using \cmd{\makeatletter} to allow something like \cmd{\@sentinel} will be sufficient. For added security, additional characters can be given catcode 11, to allow things like \cmd{\@sent!nel}.
%
-% The other context for sentinels is in scanning through a sequence of tokens that is delimited by a sentinel, and using \cmd{\ifx} comparisons to identify the sentinel and stop scanning. In this case, using an undefined macro is risky. Under normal conditions, the sequence of tokens could contain an undefined macro due to mistyping. In some \fvextra\ applications, the tokens will have been incorrectly tokenized under a normal catcode regime, and need to be retokenized as verbatim, in which case undefined macros must be expected. Thus, a sentinel macro whose expansion is resistent to collisions is needed.
+% The other context for sentinels is in scanning through a sequence of tokens that is delimited by a sentinel, and using \cmd{\ifx} comparisons to identify the sentinel and stop scanning. In this case, using an undefined macro is risky. Under normal conditions, the sequence of tokens could contain an undefined macro due to mistyping. In some \fvextra\ applications, the tokens will have been incorrectly tokenized under a normal catcode regime, and need to be retokenized as verbatim, in which case undefined macros must be expected. Thus, a sentinel macro whose expansion is resistant to collisions is needed.
%
% \begin{macro}{\FV@<Sentinel>}
% This is the standard default \fvextra\ delimited-macro sentinel. It is used with \cmd{\makeatletter} by changing |<| and |>| to catcode 11. The |<| and |>| add an extra level of collision resistance. Because it is undefined, it is \emph{only} appropriate for use in delimited macro arguments.
@@ -1820,12 +1953,14 @@
% \end{macro}
%
%
-% \begin{macro}{\FVExtraReadVArg}
-% Read a verbatim argument that is bounded by two identical characters or by paired curly braces. This uses the \cmd{\outer} |^^M| with \cmd{\FV@EOL} trick from \fancyvrb\ to prevent runaway arguments. An \cmd{\outer} |^^C| is used to prevent |^^C| from being part of arguments, so that it can be used later as a sentinel if retokenization is needed. |^^B| is handled in the same manner for symmetry with later usage, though technically it is not used as a sentinel so this is not strictly necessary. Alternate |UTF| macros, defined later, are invoked when under pdfTeX with \pkg{inputenc} using UTF-8.
+% \begin{macro}{\FVExtraReadVArg,\FVExtraReadVArgSingleLine}
+% Read a verbatim argument that is bounded by two identical characters or by paired curly braces. There are two variants: one reads a multi-line (but not multi-paragraph) argument, while the other restricts the argument to a single line via the \cmd{\outer} |^^M| trick from \fancyvrb. An \cmd{\outer} |^^C| is used to prevent |^^C| from being part of arguments, so that it can be used later as a sentinel if retokenization is needed. |^^B| is handled in the same manner for symmetry with later usage, though technically it is not used as a sentinel so this is not strictly necessary. Alternate |UTF| macros, defined later, are invoked when under pdfTeX with \pkg{inputenc} using UTF-8.
%
% The lookahead for the type of delimiting character is done under a verbatim catcode regime, except that the space catcode is preserved and curly braces are given their normal catcodes. This provides consistency with any \cmd{\FVExtra@ifnextcharVArg} or \cmd{\FVExtra@ifstarVArg} that may have been used previously, allows characters like |#| and |%| to be used as delimiters when the verbatim argument is read outside any other commands (untokenized), and allows paired curly braces to serve as delimiters. Any additional command-specific catcode modifications should only be applied to the argument after it has been read, since they do not apply to the delimiters.
%
% Once the delimiter lookahead is complete, catcodes revert to full verbatim, and are then modified appropriately given the type of delimiter. The space and tab must be \cmd{\active} to be preserved correctly when the verbatim argument is not inside any other commands (otherwise, they collapse into single spaces).
+%
+% Note that |\FVExtraReadVArg| will interpret a line break as a catcode 10 space, not as an |\active| space. Depending on usage, the argument may need to be processed with |\FVExtraDetokenizeVArg| and |\FVExtraRetokenizeVArg| to fix this.
% \begin{macrocode}
\def\FVExtraReadVArg#1{%
\begingroup
@@ -1840,6 +1975,34 @@
\FV@OuterDefSTXEmpty
\catcode`\^^C=\active
\FV@OuterDefETXEmpty
+ \begingroup
+ \catcode`\ =\FV@TmpSpaceCat\relax
+ \catcode`\{=1
+ \catcode`\}=2
+ \@ifnextchar\bgroup
+ {\endgroup
+ \catcode`\{=1
+ \catcode`\}=2
+ \catcode`\ =\active
+ \catcode`\^^I=\active
+ \FV@ReadVArg@Group{#1}}%
+ {\endgroup
+ \catcode`\ =\active
+ \catcode`\^^I=\active
+ \FV@ReadVArg@Char{#1}}}
+\def\FVExtraReadVArgSingleLine#1{%
+ \begingroup
+ \ifFV@pdfTeXinputenc
+ \ifdefstring{\inputencodingname}{utf8}%
+ {\let\FV@ReadVArg@Char\FV@ReadVArg@Char@UTF}%
+ {}%
+ \fi
+ \edef\FV@TmpSpaceCat{\the\catcode` }%
+ \let\do\@makeother\FVExtraDoSpecials
+ \catcode`\^^B=\active
+ \FV@OuterDefSTXEmpty
+ \catcode`\^^C=\active
+ \FV@OuterDefETXEmpty
\catcode`\^^M=\active
\FV@OuterDefEOLEmpty
\begingroup
@@ -1852,20 +2015,20 @@
\catcode`\}=2
\catcode`\ =\active
\catcode`\^^I=\active
- \FV@ReadVArg@Group{#1}\FV@EOL}%
+ \FV@ReadVArg@Group{#1}}%
{\endgroup
\catcode`\ =\active
\catcode`\^^I=\active
- \FV@ReadVArg@Char{#1}\FV@EOL}}
+ \FV@ReadVArg@Char{#1}}}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\FV@ReadVArg@Group}
% The argument is read under the verbatim catcode regime already in place from \cmd{\FVExtraReadVArg}. The \cmd{\endgroup} returns to prior catcodes. Any command-specific catcodes can be applied later via \cmd{\scantokens}. Using them here in reading the argument would have no effect as far as later processing with \cmd{\scantokens} is concerned, unless the argument were read outside any other commands and additional characters were given catcodes 1 or 2 (like the curly braces). That scenario is not allowed because it makes reading the argument overly dependent on the argument content. (Technically, reading the argument is already dependent on the argument content in the sense that the argument cannot contain unescaped unpaired curly braces, given that it is delimited by curly braces.)
% \begin{macrocode}
-\def\FV@ReadVArg@Group#1#2#3{%
+\def\FV@ReadVArg@Group#1#2{%
\endgroup
- #1{#3}}
+ #1{#2}}
% \end{macrocode}
% \end{macro}
%
@@ -1874,9 +2037,9 @@
%
% It would be possible to read the argument using any command-specific catcode settings, but that would result in different behavior depending on whether the argument is already tokenized, and would make reading the argument overly dependent on the argument content.
% \begin{macrocode}
-\def\FV@ReadVArg@Char#1#2#3{%
+\def\FV@ReadVArg@Char#1#2{%
\expandafter\expandafter\expandafter
- \if\expandafter\expandafter\expandafter\relax\expandafter\@gobble\detokenize{#3}\relax
+ \if\expandafter\expandafter\expandafter\relax\expandafter\@gobble\detokenize{#2}\relax
\expandafter\@gobble
\else
\expandafter\@firstofone
@@ -1884,10 +2047,10 @@
{\PackageError{fvextra}%
{Verbatim delimiters must be single characters, not commands}%
{Try a different delimiter}}%
- \def\FV@ReadVArg@Char@i##1##2##3#3{%
+ \def\FV@ReadVArg@Char@i##1##2#2{%
\endgroup
- ##1{##3}}%
- \FV@ReadVArg@Char@i{#1}\FV@EOL}%
+ ##1{##2}}%
+ \FV@ReadVArg@Char@i{#1}}%
% \end{macrocode}
% \end{macro}
%
@@ -1902,9 +2065,9 @@
% \begin{macro}{\FV@ReadVArg@Char@UTF}
% This is a variant of \cmd{\FV@ReadVArg@Char} that allows non-ASCII codepoints as delimiters under the pdfTeX engine with \pkg{inputenc} using UTF-8. Under pdfTeX, non-ASCII codepoints must be handled as a sequence of bytes rather than as a single entity. \cmd{\FV@ReadVArg@Char} is automatically \cmd{\let} to this version when appropriate. This uses the \cmd{\FV@U8:<byte>} macros for working with \pkg{inputenc}'s UTF-8.
% \begin{macrocode}
-\def\FV@ReadVArg@Char@UTF#1#2#3{%
+\def\FV@ReadVArg@Char@UTF#1#2{%
\expandafter\expandafter\expandafter
- \if\expandafter\expandafter\expandafter\relax\expandafter\@gobble\detokenize{#3}\relax
+ \if\expandafter\expandafter\expandafter\relax\expandafter\@gobble\detokenize{#2}\relax
\expandafter\@gobble
\else
\expandafter\@firstofone
@@ -1912,23 +2075,23 @@
{\PackageError{fvextra}%
{Verbatim delimiters must be single characters, not commands}%
{Try a different delimiter}}%
- \ifcsname FV@U8:\detokenize{#3}\endcsname
+ \ifcsname FV@U8:\detokenize{#2}\endcsname
\expandafter\@firstoftwo
\else
\expandafter\@secondoftwo
\fi
{\def\FV@UTF@octets@after##1{\FV@ReadVArg@Char@UTF@i{#1}{##1}}%
- \csname FV@U8:\detokenize{#3}\endcsname#3}%
- {\FV@ReadVArg@Char@UTF@i{#1}{#3}}}
+ \csname FV@U8:\detokenize{#2}\endcsname#2}%
+ {\FV@ReadVArg@Char@UTF@i{#1}{#2}}}
% \end{macrocode}
%
% \begin{macro}{\FV@ReadVArg@Char@UTF@i}
% \begin{macrocode}
\def\FV@ReadVArg@Char@UTF@i#1#2{%
- \def\FV@ReadVArg@Char@i##1##2##3#2{%
+ \def\FV@ReadVArg@Char@i##1##2#2{%
\endgroup
- ##1{##3}}%
- \FV@ReadVArg@Char@i{#1}\FV@EOL}%
+ ##1{##2}}%
+ \FV@ReadVArg@Char@i{#1}}%
% \end{macrocode}
% \end{macro}
%
@@ -1939,6 +2102,18 @@
% \end{macro}
%
%
+% \begin{macro}{vargsingleline}
+% This determines whether |\Verb| and |\SaveVerb| use |\FVExtraReadVArg| or |\FVExtraReadVArgSingleLine| to read their arguments. It has no effect on |\EscVerb|, since that does not use special tokenization.
+% \begin{macrocode}
+\newbool{FV@vargsingleline}
+\define@booleankey{FV}{vargsingleline}%
+ {\booltrue{FV@vargsingleline}}
+ {\boolfalse{FV@vargsingleline}}
+\fvset{vargsingleline=false}
+% \end{macrocode}
+% \end{macro}
+%
+%
%
%
% \subsubsection{Reading and protecting arguments in expansion-only contexts}
@@ -2926,7 +3101,7 @@
% \end{macro}
%
%
-% \paragraph{Detokenize as if the original source were tokenized verbatim, except for backslash escapes of non-catcode 11 characters, then convert to PDF string}
+% \paragraph{Detokenize as if the original source were tokenized verbatim, except for backslash escapes of non-catcode 11 characters, then convert to PDF string}\hfill\\
%
% \begin{macro}{\FVExtraPDFStringEscapedVerbatimDetokenize}
% This is identical to \cmd{\FVExtraEscapedVerbatimDetokenize}, except that the output is converted to a valid PDF string. All spaces are represented with the octal escape \cmd{\040} to prevent adjacent spaces from being merged. There is no alternate implementation for restricting escapes to ASCII symbols and punctuation. Typically, this would be used in an expansion-only context to create something like bookmarks, while \cmd{\FVExtraEscapedVerbatimDetokenize} (potentially with escape restrictions) would be used in parallel to generate whatever is actually typeset. Escape errors can be handled in generating what is typeset.
@@ -2962,7 +3137,7 @@
% \end{macro}
%
% \begin{macro}{\FV@PDFStrEscVDetok@ScanCont}
-% This is modified to use |\040| for the space. In the unescaped case, using a normal space here is fine, but in the escaped case, the preceeding or following token could be an escaped space.
+% This is modified to use |\040| for the space. In the unescaped case, using a normal space here is fine, but in the escaped case, the preceding or following token could be an escaped space.
% \begin{macrocode}
\begingroup
\catcode`\!=0\relax
@@ -3058,7 +3233,7 @@
% \end{macro}
%
% \begin{macro}{\FV@PDFStrEscVDetok@ScanTokenNoSpace}
-% This was modifed to add \cmd{\FVExtraPDFStringEscapeChar}
+% This was modified to add \cmd{\FVExtraPDFStringEscapeChar}
% \begin{macrocode}
\gdef\FV@PDFStrEscVDetok@ScanTokenNoSpace#1#2^^C{%
\if\relax\detokenize{#2}\relax
@@ -3250,8 +3425,7 @@
% \subsection{Hooks}
%
%
-% \begin{macro}{\FV@FormattingPrep@PreHook}
-% \begin{macro}{\FV@FormattingPrep@PostHook}
+% \begin{macro}{\FV@FormattingPrep@PreHook,\FV@FormattingPrep@PostHook}
% These are hooks for extending |\FV@FormattingPrep|. |\FV@FormattingPrep| is inside a group, before the beginning of processing, so it is a good place to add extension code. These hooks are used for such things as tweaking math mode behavior and preparing for |breakbefore| and |breakafter|. The |PreHook| should typically be used, unless \pkg{fancyvrb}'s font settings, whitespace setup, and active character definitions are needed for extension code.
% \begin{macrocode}
\let\FV@FormattingPrep@PreHook\@empty
@@ -3260,7 +3434,6 @@
\expandafter\FV@FormattingPrep@PreHook\FV@FormattingPrep\FV@FormattingPrep@PostHook}
% \end{macrocode}
% \end{macro}
-% \end{macro}
%
%
% \begin{macro}{\FV@PygmentsHook}
@@ -3326,7 +3499,8 @@
% \begin{macro}{\FV@UseInlineKeyValues}
% \begin{macrocode}
\def\FV@UseInlineKeyValues{%
- \expandafter\fvset\expandafter{\FV@InlineKeyValues}}
+ \expandafter\fvset\expandafter{\FV@InlineKeyValues}%
+ \FV@ApplyBreakAnywhereInlineStretch}
% \end{macrocode}
% \end{macro}
%
@@ -3432,7 +3606,10 @@
% \begin{macrocode}
\def\FVC@Verb@Extra@i{%
\begingroup
- \FVExtraReadVArg{%
+ \ifbool{FV@vargsingleline}%
+ {\let\FV@Reader\FVExtraReadVArgSingleLine}%
+ {\let\FV@Reader\FVExtraReadVArg}%
+ \FV@Reader{%
\FV@UseInlineKeyValues\FV@UseKeyValues\FV@FormattingPrep
\FVExtraDetokenizeVArg{%
\FVExtraRetokenizeVArg{\FVC@Verb@Extra@ii}{\FV@CatCodes}}}}
@@ -3440,15 +3617,26 @@
% \end{macro}
%
% \begin{macro}{\FVC@Verb@Extra@ii}
+% |breaklines| is only applied when there is no background color, since |\colorbox| prevents line breaks.
% \begin{macrocode}
\def\FVC@Verb@Extra@ii#1{%
- \ifFV@breaklines
+ \ifx\FancyVerbBackgroundColor\relax
\expandafter\@firstoftwo
\else
\expandafter\@secondoftwo
\fi
- {\FV@InsertBreaks{\FancyVerbFormatInline}{#1}}%
- {\mbox{#1}}%
+ {\ifbool{FV@breaklines}%
+ {\FV@InsertBreaks{\FancyVerbFormatInline}{#1}}%
+ {\mbox{\FancyVerbFormatInline{#1}}}}%
+ {\setlength{\FV@TmpLength}{\fboxsep}%
+ \ifx\FancyVerbBackgroundColorPadding\relax
+ \setlength{\fboxsep}{0pt}%
+ \else
+ \setlength{\fboxsep}{\FancyVerbBackgroundColorPadding}%
+ \fi
+ \colorbox{\FancyVerbBackgroundColor}{%
+ \setlength{\fboxsep}{\FV@TmpLength}%
+ \FancyVerbBackgroundColorVPhantom\FancyVerbFormatInline{#1}}}%
\endgroup}
% \end{macrocode}
% \end{macro}
@@ -3488,7 +3676,10 @@
\@namedef{FV@SV@#1}{}%
\@namedef{FV@SVRaw@#1}{}%
\begingroup
- \FVExtraReadVArg{%
+ \ifbool{FV@vargsingleline}%
+ {\let\FV@Reader\FVExtraReadVArgSingleLine}%
+ {\let\FV@Reader\FVExtraReadVArg}%
+ \FV@Reader{%
\FVC@SaveVerb@Extra@i{#1}}}
% \end{macrocode}
% \end{macro}
@@ -3591,15 +3782,7 @@
%
% \begin{macro}{\FV@UseVerb@Extra}
% \begin{macrocode}
-\def\FV@UseVerb@Extra#1{%
- \ifFV@breaklines
- \expandafter\@firstoftwo
- \else
- \expandafter\@secondoftwo
- \fi
- {\FV@InsertBreaks{\FancyVerbFormatInline}{#1}}%
- {\mbox{#1}}%
- \endgroup}
+\let\FV@UseVerb@Extra\FVC@Verb@Extra@ii
% \end{macrocode}
% \end{macro}
%
@@ -3654,15 +3837,7 @@
%
% \begin{macro}{\FVC@EscVerb@ii}
% \begin{macrocode}
-\def\FVC@EscVerb@ii#1{%
- \ifFV@breaklines
- \expandafter\@firstoftwo
- \else
- \expandafter\@secondoftwo
- \fi
- {\FV@InsertBreaks{\FancyVerbFormatInline}{#1}}%
- {\mbox{#1}}%
- \endgroup}
+\let\FVC@EscVerb@ii\FVC@Verb@Extra@ii
% \end{macrocode}
% \end{macro}
%
@@ -3805,7 +3980,7 @@
% \end{macro}
%
%
-% \begin{macro}{writer, \FV@Writer}
+% \begin{macro}{writer,\FV@Writer}
% Define writer macro that processes each line before writing.
% \begin{macrocode}
\define@key{FV}{writer}{%
@@ -3820,7 +3995,7 @@
% \begin{macro}{VerbatimWrite}
% The environment implementation follows standard \fancyvrb\ environment style.
%
-% A special write counter is used to track line numbers while avoiding incrementing the regular counter that is used for typeset code. Some macros do nothing with the default |writer|, but are needed to enable \fancyvrb\ options when a custom |writer| is used in conjuction with optional environment arguments. These include |\FancyVerbDefineActive|, |\FancyVerbFormatCom|, and |\FV@DefineTabOut|.
+% A special write counter is used to track line numbers while avoiding incrementing the regular counter that is used for typeset code. Some macros do nothing with the default |writer|, but are needed to enable \fancyvrb\ options when a custom |writer| is used in conjunction with optional environment arguments. These include |\FancyVerbDefineActive|, |\FancyVerbFormatCom|, and |\FV@DefineTabOut|.
% \begin{macrocode}
\newcounter{FancyVerbWriteLine}
\def\VerbatimWrite{%
@@ -3858,7 +4033,7 @@
%
% By default, all \fancyvrb\ options except for |VerbatimBuffer|-specific options are ignored. This can be customized on a per-environment basis via environment optional arguments.
%
-% \begin{macro}{afterbuffer, \FV@afterbuffer}
+% \begin{macro}{afterbuffer,\FV@afterbuffer}
% Macro that is inserted after the last line of the environment is buffered, immediately before the environment ends.
% \begin{macrocode}
\define@key{FV}{afterbuffer}{%
@@ -3874,7 +4049,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{bufferer, \FV@Bufferer, \FancyVerbDefaultBufferer}
+% \begin{macro}{bufferer,\FV@Bufferer,\FancyVerbDefaultBufferer}
% This is the macro that adds lines to the buffer. The default is designed to create a truly verbatim buffer via |\detokenize|.
% \begin{macrocode}
\define@key{FV}{bufferer}{%
@@ -3931,7 +4106,7 @@
% \begin{macro}{VerbatimBuffer}
% The environment implementation follows standard \fancyvrb\ environment style.
%
-% A special buffer counter is used to track line numbers while avoiding incrementing the regular counter that is used for typeset code. Some macros do nothing with the default |bufferer|, but are needed to enable \fancyvrb\ options when a custom |bufferer| is used in conjuction with optional environment arguments. These include |\FancyVerbDefineActive| and |\FancyVerbFormatCom|. Since counters are global, the exact location of the |\setcounter| commands at the end of the environment relative to |\begingroup...\endgroup| is not important.
+% A special buffer counter is used to track line numbers while avoiding incrementing the regular counter that is used for typeset code. Some macros do nothing with the default |bufferer|, but are needed to enable \fancyvrb\ options when a custom |bufferer| is used in conjunction with optional environment arguments. These include |\FancyVerbDefineActive| and |\FancyVerbFormatCom|. Since counters are global, the exact location of the |\setcounter| commands at the end of the environment relative to |\begingroup...\endgroup| is not important.
% \begin{macrocode}
\newcounter{FancyVerbBufferLine}
\newcounter{FV@oldbufferlength}
@@ -3997,53 +4172,77 @@
%
%
% \subsubsection{\cmd{\VerbatimInsertBuffer}}
-% \begin{macro}{\VerbatimInsertBuffer}
-% This inserts an existing buffer created by |VerbatimBuffer| as a |Verbatim| environment. It customizes |Verbatim| internals to function with a buffer in a command context.
+% \begin{macro}{\VerbatimInsertBuffer, insertenvname}
+% This inserts an existing buffer created with |VerbatimBuffer| as a verbatim environment. By default, the inserted environment is |Verbatim|; this can be modified with the option |insertenvname| to any |Verbatim|- or |BVerbatim|-based environment, or any environment with a compatible implementation. The |Verbatim| and |BVerbatim| internals are customized to function with a buffer in a command context.
+%
+% Notes on the implementation of |\VerbatimInsertBuffer@i|:
+% \begin{itemize}
+% \item The active |^^M| allows a verbatim environment to read optional arguments in the usual way, without requiring modifications to argument-reading macros.
+% \item The |\begingroup\fvset{#1}\global\let\FV@CurrentVerbatimInsertEnvName...| is used to extract any |insertenvname| setting from optional arguments. Most optional arguments apply to the verbatim environment or to the customized verbatim internals that are invoked within it. However, |insertenvname| is needed earlier to determine which verbatim environment is in use. It is not possible simply to use |\fvset{#1}| before the verbatim environment to apply all settings, because that would conflict with the precedence of option processing in |\FV@Environment|.
+% \end{itemize}
% \begin{macrocode}
-\newcommand{\VerbatimInsertBuffer}[1][]{%
- \begingroup
+\define@key{FV}{insertenvname}{%
+ \def\FV@VerbatimInsertEnvName{#1}}
+\fvset{insertenvname=Verbatim}
+\def\FV@Environment@InsertBuffer#1#2{%
\def\FV@KeyValues{#1}%
- \def\FV@Scan{%
- \FV@CatCodes
- \xdef\FV@EnvironName{Verbatim}%
- \ifnum\expandafter\value\expandafter{\FV@bufferlengthname}=\z@\relax
- \PackageError{fvextra}%
- {Buffer length counter \FV@bufferlengthname\space is invalid or zero}%
- {}%
- \let\FV@GetLine\relax
+ \FV@GetKeyValues{\@nameuse{FVB@#2}}}
+\def\FV@Scan@InsertBuffer{%
+ \FV@CatCodes
+ \xdef\FV@EnvironName{\FV@VerbatimInsertEnvName}%
+ \ifnum\expandafter\value\expandafter{\FV@bufferlengthname}=\z@\relax
+ \PackageError{fvextra}%
+ {Buffer length counter \FV@bufferlengthname\space is invalid or zero}%
+ {}%
+ \let\FV@GetLine\relax
+ \fi
+ \FV@BeginScanning}%
+\def\VerbatimInsertBuffer@def@FV@Line#1{%
+ \FVExtraRetokenizeVArg{\def\FV@Line}{}{#1}}
+\def\FancyVerbGetLine@VerbatimInsertBuffer{%
+ \ifnum\value{FancyVerbBufferIndex}>%
+ \expandafter\value\expandafter{\FV@bufferlengthname}\relax
+ \global\let\FV@EnvironName\relax
+ \let\next\relax
+ \else
+ \ifcsname\FancyVerbBufferLineName\arabic{FancyVerbBufferIndex}\endcsname
+ \expandafter\let\expandafter\FV@Line@Buffer
+ \csname\FancyVerbBufferLineName\arabic{FancyVerbBufferIndex}\endcsname
+ \expandafter\VerbatimInsertBuffer@def@FV@Line\expandafter{\FV@Line@Buffer}%
+ \def\next{\FV@PreProcessLine\FV@GetLine}%
+ \stepcounter{FancyVerbBufferIndex}%
+ \else
+ \def\next{%
+ \PackageError{fvextra}%
+ {Buffer with line macro named
+ "\FancyVerbBufferLineName\arabic{FancyVerbBufferIndex}" does not exist}%
+ {Check bufferlinename, bufferlengthname, and globalbuffer settings}%
+ }%
\fi
- \FV@GetLine}%
+ \fi
+ \next}
+\newcommand{\VerbatimInsertBuffer}[1][]{%
+ \begingroup
+ \let\FV@Scan\FV@Scan@InsertBuffer
\let\FV@CheckScan\relax
+ \let\FV@Environment\FV@Environment@InsertBuffer
+ \let\FancyVerbGetLine\FancyVerbGetLine@VerbatimInsertBuffer
\setcounter{FancyVerbBufferIndex}{1}%
- \def\VerbatimInsertBuffer@def@FV@Line##1{%
- \FVExtraRetokenizeVArg{\def\FV@Line}{}{##1}}
- \def\FancyVerbGetLine{%
- \ifnum\value{FancyVerbBufferIndex}>%
- \expandafter\value\expandafter{\FV@bufferlengthname}\relax
- \global\let\FV@EnvironName\relax
- \let\next\relax
- \else
- \ifcsname\FancyVerbBufferLineName\arabic{FancyVerbBufferIndex}\endcsname
- \expandafter\let\expandafter\FV@Line@Buffer
- \csname\FancyVerbBufferLineName\arabic{FancyVerbBufferIndex}\endcsname
- \expandafter\VerbatimInsertBuffer@def@FV@Line\expandafter{\FV@Line@Buffer}%
- \def\next{\FV@PreProcessLine\FV@GetLine}%
- \stepcounter{FancyVerbBufferIndex}%
- \else
- \def\next{%
- \PackageError{fvextra}%
- {Buffer with line macro named
- "\FancyVerbBufferLineName\arabic{FancyVerbBufferIndex}" does not exist}%
- {Check bufferlinename, bufferlengthname, and globalbuffer settings}%
- }%
- \fi
- \fi
- \next}%
- \FVB@Verbatim
- \FVE@Verbatim
+ \VerbatimInsertBuffer@i{#1}%
\setcounter{FancyVerbBufferIndex}{0}%
\endgroup
\@doendpe}
+\begingroup
+\catcode`\^^M=\active
+\gdef\VerbatimInsertBuffer@i#1{%
+ \begingroup%
+ \fvset{#1}%
+ \global\let\FV@CurrentVerbatimInsertEnvName\FV@VerbatimInsertEnvName%
+ \endgroup%
+ \csname \FV@CurrentVerbatimInsertEnvName\endcsname[#1]^^M%
+ \csname end\FV@CurrentVerbatimInsertEnvName\endcsname%
+ \global\let\FV@CurrentVerbatimInsertEnvName\FV@Undefined}%
+\endgroup
% \end{macrocode}
% \end{macro}
%
@@ -4714,7 +4913,7 @@
%
%
% \begin{macro}{\FV@ListProcessLine@NoBreak}
-% Redefined |\FV@ListProcessLine| in which |\FancyVerbFormatText| is added and tab handling is explicit. The |@NoBreak| suffix is added because |\FV@ListProcessLine| will be |\let| to either this macro or to |\FV@ListProcessLine@Break| depending on whether line breaking is enabled.
+% Redefined |\FV@ListProcessLine| in which |bgcolor| support is added, |\FancyVerbFormatText| is added, and tab handling is explicit. The |@NoBreak| suffix is added because |\FV@ListProcessLine| will be |\let| to either this macro or to |\FV@ListProcessLine@Break| depending on whether line breaking is enabled.
% \begin{macrocode}
\def\FV@ListProcessLine@NoBreak#1{%
\hbox to \hsize{%
@@ -4722,9 +4921,10 @@
\hbox to \linewidth{%
\FV@LeftListNumber
\FV@LeftListFrame
- \FancyVerbFormatLine{%
- \FancyVerbHighlightLine{%
- \FV@ObeyTabs{\FancyVerbFormatText{#1}}}}\hss
+ \FV@BGColor@List{%
+ \FancyVerbFormatLine{%
+ \FancyVerbHighlightLine{%
+ \FV@ObeyTabs{\FancyVerbFormatText{#1}}}}}\hss
\FV@RightListFrame
\FV@RightListNumber}%
\hss}}
@@ -4737,6 +4937,10 @@
% \begin{macrocode}
\def\FV@BProcessLine#1{%
\hbox{\FancyVerbFormatLine{%
+ \ifx\FancyVerbBackgroundColor\relax
+ \else
+ \expandafter\FancyVerbBackgroundColorVPhantom
+ \fi
\FancyVerbHighlightLine{%
\FV@ObeyTabs{\FancyVerbFormatText{#1}}}}}}
% \end{macrocode}
@@ -4964,6 +5168,194 @@
%
%
%
+% \subsubsection{Background color}
+% \label{sec:impl:extensions:bgcolor}
+%
+% Define an option |backgroundcolor| that provides a basic implementation of a background color behind commands and environments. \pkg{tcolorbox} or a similar package should be used for more sophisticated background colors.
+% \begin{macro}{backgroundcolor,bgcolor,\FancyVerbBackgroundColor}
+% \begin{macrocode}
+\define@key{FV}{backgroundcolor}{%
+ \def\FancyVerbBackgroundColor{#1}%
+ \ifx\FancyVerbBackgroundColor\FV@None
+ \let\FancyVerbBackgroundColor\relax
+ \else\ifx\FancyVerbBackgroundColor\@empty
+ \let\FancyVerbBackgroundColor\relax
+ \fi\fi}%
+\fvset{backgroundcolor=none}
+\define@key{FV}{bgcolor}{%
+ \fvset{backgroundcolor=#1}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{backgroundcolorvphantom,bgcolorvphantom,\FancyVerbBackgroundColorVPhantom}
+% \begin{macrocode}
+\define@key{FV}{backgroundcolorvphantom}{%
+ \def\FancyVerbBackgroundColorVPhantom{#1}%
+ \ifx\FancyVerbBackgroundColorVPhantom\FV@None
+ \let\FancyVerbBackgroundColorVPhantom\relax
+ \else\ifx\FancyVerbBackgroundColorVPhantom\@empty
+ \let\FancyVerbBackgroundColorVPhantom\relax
+ \fi\fi}
+\fvset{backgroundcolorvphantom=\vphantom{\"Apgjy}}
+\define@key{FV}{bgcolorvphantom}{%
+ \fvset{backgroundcolorvphantom=#1}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{backgroundcolorpadding, bgcolorpadding, \FancyVerbBackgroundColorPadding}
+% \begin{macrocode}
+\let\FancyVerbBackgroundColorPadding\relax
+\def\FV@backgroundcolorpadding@none@framenotsingle{%
+ \fvset{frame=none,framerule,rulecolor=none}}
+\def\FV@backgroundcolorpadding@dim@framenotsingle{%
+ \fvset{frame=single,framerule=0pt,rulecolor=\FancyVerbBackgroundColor}}
+\define@key{FV}{backgroundcolorpadding}{%
+ \def\FancyVerbBackgroundColorPadding{#1}%
+ \ifx\FancyVerbBackgroundColorPadding\FV@None
+ \let\FancyVerbBackgroundColorPadding\relax
+ \else\ifx\FancyVerbBackgroundColorPadding\@empty
+ \let\FancyVerbBackgroundColorPadding\relax
+ \fi\fi
+ \let\FV@Next\relax
+ \ifx\FancyVerbBackgroundColorPadding\relax
+ \ifx\FV@BeginListFrame\FV@BeginListFrame@Single
+ \else
+ \let\FV@Next\FV@backgroundcolorpadding@none@framenotsingle
+ \fi
+ \ifx\FV@LeftListFrame\FV@LeftListFrame@Single
+ \else
+ \let\FV@Next\FV@backgroundcolorpadding@none@framenotsingle
+ \fi
+ \ifx\FV@RightListFrame\FV@RightListFrame@Single
+ \else
+ \let\FV@Next\FV@backgroundcolorpadding@none@framenotsingle
+ \fi
+ \ifx\FV@EndListFrame\FV@EndListFrame@Single
+ \else
+ \let\FV@Next\FV@backgroundcolorpadding@none@framenotsingle
+ \fi
+ \FV@Next
+ \fvset{framesep,fillcolor=none}%
+ \else
+ \ifx\FV@BeginListFrame\FV@BeginListFrame@Single
+ \else
+ \let\FV@Next\FV@backgroundcolorpadding@dim@framenotsingle
+ \fi
+ \ifx\FV@LeftListFrame\FV@LeftListFrame@Single
+ \else
+ \let\FV@Next\FV@backgroundcolorpadding@dim@framenotsingle
+ \fi
+ \ifx\FV@RightListFrame\FV@RightListFrame@Single
+ \else
+ \let\FV@Next\FV@backgroundcolorpadding@dim@framenotsingle
+ \fi
+ \ifx\FV@EndListFrame\FV@EndListFrame@Single
+ \else
+ \let\FV@Next\FV@backgroundcolorpadding@dim@framenotsingle
+ \fi
+ \FV@Next
+ \fvset{framesep=#1,fillcolor=\FancyVerbBackgroundColor}%
+ \fi}
+\define@key{FV}{bgcolorpadding}{\fvset{backgroundcolorpadding=#1}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\FV@BGColor@List}
+% Background color for environments based on |Verbatim|. Puts each line in a colorbox. The |\FancyVerbBackgroundColorVPhantom| will not have any effect in this case, unless it is larger than |\strut|.
+% \begin{macrocode}
+\def\FV@BGColor@List#1{%
+ \ifx\FancyVerbBackgroundColor\relax
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi
+ {#1}%
+ {\setlength{\FV@TmpLength}{\fboxsep}%
+ \setlength{\fboxsep}{0pt}%
+ \colorbox{\FancyVerbBackgroundColor}{%
+ \setlength{\fboxsep}{\FV@TmpLength}%
+ \rlap{\FancyVerbBackgroundColorVPhantom\strut#1}%
+ \hspace{\linewidth}%
+ \ifx\FV@RightListFrame\relax\else
+ \hspace{-\FV@FrameSep}%
+ \hspace{-\FV@FrameRule}%
+ \fi
+ \ifx\FV@LeftListFrame\relax\else
+ \hspace{-\FV@FrameSep}%
+ \hspace{-\FV@FrameRule}%
+ \fi}%
+ \hss}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\FV@BVerbatimBegin,\FV@BVerbatimEnd}
+% Reimplementation of |BVerbatim| macros to support |bgcolor|. Much of this follows the implementation of |SaveVerbatim| and |\BUseVerbatim|.
+%
+% Key values, formatting, and tabs must be configured immediately in the |bgcolor| case, so that the background color and other settings are available. |\FV@UseKeyValues| can be invoked multiple times, but that doesn't cause any issues since |\FV@UseKeyValues| applies keys and then redefines |\FV@KeyValues| to empty.
+%
+% The definition of |\FV@BProcessLine| already accounts for |\FancyVerbBackgroundColorVPhantom|.
+% \begin{macrocode}
+\let\FV@BVerbatimBegin@NoBGColor\FV@BVerbatimBegin
+\let\FV@BVerbatimEnd@NoBGColor\FV@BVerbatimEnd
+\def\FV@BVerbatimBegin{%
+ \begingroup
+ \FV@UseKeyValues
+ \FV@FormattingPrep
+ \let\FV@FormattingPrep\relax
+ \FV@ObeyTabsInit
+ \let\FV@ObeyTabsInit\relax
+ \ifx\FancyVerbBackgroundColor\relax
+ \expandafter\FV@BVerbatimBegin@NoBGColor
+ \else
+ \expandafter\FV@BVerbatimBegin@BGColor
+ \fi}
+\def\FV@BVerbatimEnd{%
+ \ifx\FancyVerbBackgroundColor\relax
+ \expandafter\FV@BVerbatimEnd@NoBGColor
+ \else
+ \expandafter\FV@BVerbatimEnd@BGColor
+ \fi
+ \endgroup}
+\def\FV@BVerbatimBegin@BGColor{%
+ \gdef\FV@TheVerbatim{}%
+ \ifx\FV@boxwidth\relax
+ \gdef\FV@boxwidth@tmp{0pt}%
+ \def\FV@ProcessLine##1{%
+ \sbox{\FV@LineBox}{\FV@BProcessLine{##1}}%
+ \ifdim\wd\FV@LineBox>\FV@boxwidth@tmp\relax
+ \xdef\FV@boxwidth@tmp{\the\wd\FV@LineBox}%
+ \fi
+ \expandafter\gdef\expandafter\FV@TheVerbatim\expandafter{%
+ \FV@TheVerbatim\FV@ProcessLine{##1}}}%
+ \else
+ \def\FV@ProcessLine##1{%
+ \expandafter\gdef\expandafter\FV@TheVerbatim\expandafter{%
+ \FV@TheVerbatim\FV@ProcessLine{##1}}}%
+ \fi}
+\def\FV@BVerbatimEnd@BGColor{%
+ \ifx\FV@boxwidth\relax
+ \let\FV@boxwidth\FV@boxwidth@tmp
+ \global\let\FV@boxwidth@tmp\FV@Undefined
+ \fi
+ \setlength{\FV@TmpLength}{\fboxsep}%
+ \ifx\FancyVerbBackgroundColorPadding\relax
+ \setlength{\fboxsep}{0pt}%
+ \else
+ \setlength{\fboxsep}{\FancyVerbBackgroundColorPadding}%
+ \fi
+ \colorbox{\FancyVerbBackgroundColor}{%
+ \setlength{\fboxsep}{\FV@TmpLength}%
+ \FV@BVerbatimBegin@NoBGColor\FV@TheVerbatim\FV@BVerbatimEnd@NoBGColor}%
+ \gdef\FV@TheVerbatim{}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
% \subsubsection{Line highlighting or emphasis}
% \label{sec:impl:extensions:highlighting}
%
@@ -5139,6 +5531,32 @@
% \end{macro}
%
%
+% \begin{macro}{\FV@StepLineNo@Patch@HighlightLine}
+% Patch |\FV@StepLineNo| so that when |numberblanklines=false|, blank lines won't be highlighted. If the previous line is at the end of a highlighted range, then |\let| |\FV@HighlightLine:<n>| to |\FV@Undefined| to prevent further highlighting. Otherwise, leave everything as-is since the blank line(s) are within a highlighted range.
+% \begin{macrocode}
+\def\FV@StepLineNo@Patch@HighlightLine{%
+ \ifcsname FV@HighlightLine:\number\c@FancyVerbLine\endcsname
+ \@tempcnta=\c@FancyVerbLine
+ \advance\@tempcnta\@ne
+ \ifcsname FV@HighlightLine:\number\@tempcnta\endcsname
+ \else
+ \expandafter\let
+ \csname FV@HighlightLine:\number\c@FancyVerbLine\endcsname\FV@Undefined
+ \fi
+ \fi}
+\patchcmd{\FV@StepLineNo}%
+ {\ifx\FV@Line\empty}%
+ {\ifx\FV@Line\empty\FV@StepLineNo@Patch@HighlightLine}%
+ {}%
+ {\PackageError{fvextra}%
+ {Failed to patch \string\FV@StepLineNo\ to make highlightlines
+ compatible with numberblanklines}%
+ {Failed to patch \string\FV@StepLineNo\ to make highlightlines
+ compatible with numberblanklines}}
+% \end{macrocode}
+% \end{macro}
+%
+%
%
%
% \subsection{Line breaking}
@@ -5350,6 +5768,7 @@
%
%
% We need macros that contain the logic for typesetting the break symbols. By default, the symbol macros contain everything regarding the symbol and its typesetting, while these macros contain pure logic. The symbols should be wrapped in braces so that formatting commands (for example, |\tiny|) don't escape.
+%
% \begin{macro}{\FancyVerbBreakSymbolLeftLogic}
% The left break symbol should only appear with continuation lines. Note that |linenumber| here refers to local line numbering for the broken line, \emph{not} line numbering for all lines in the environment being typeset.
% \begin{macrocode}
@@ -5421,6 +5840,30 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{breakanywhereinlinestretch,\FV@breakanywhereinlinestretch,\FV@ApplyBreakAnywhereInlineStretch}
+% Stretch glue to insert at potential |breakanywhere| break locations in inline contexts, to give better line widths and avoid overfull |\hbox|.
+%
+% |\FV@UseInlineKeyValues| invokes |\FV@ApplyBreakAnywhereInlineStretch| to redefine |\FancyVerbBreakAnywhereBreak| locally.
+% \begin{macrocode}
+\define@key{FV}{breakanywhereinlinestretch}{%
+ \def\FV@breakanywhereinlinestretch{#1}%
+ \ifx\FV@breakanywhereinlinestretch\FV@None
+ \let\FV@breakanywhereinlinestretch\relax
+ \else\ifx\FV@breakanywhereinlinestretch\@empty
+ \let\FV@breakanywhereinlinestretch\relax
+ \fi\fi}
+\fvset{breakanywhereinlinestretch=none}
+\def\FV@ApplyBreakAnywhereInlineStretch{%
+ \ifx\FV@breakanywhereinlinestretch\relax
+ \else
+ \let\FancyVerbBreakAnywhereBreak@Orig\FancyVerbBreakAnywhereBreak
+ \def\FancyVerbBreakAnywhereBreak{%
+ \nobreak\hspace{0pt plus \FV@breakanywhereinlinestretch}%
+ \FancyVerbBreakAnywhereBreak@Orig}%
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
%
% \begin{macro}{\FV@BreakBefore}
% Allow line breaking (almost) anywhere, but only before specified characters.
@@ -5452,7 +5895,7 @@
% \end{macro}
%
% \begin{macro}{\FV@BreakBeforePrep}
-% We need a way to break before characters if and only if they have been specified as breaking characters. It would be possible to do that via a nested conditional, but that would be messy. It is much simpler to create an empty macro whose name contains the character, and test for the existence of this macro. This needs to be done inside a |\begingroup...\endgroup| so that the macros do not have to be cleaned up manually. A good place to do this is in |\FV@FormattingPrep|, which is inside a group and before processing starts. The macro is added to |\FV@FormattingPrep@PreHook|, which contains \fvextra\ exntensions to |\FV@FormattingPrep|, after |\FV@BreakAfterPrep| is defined below.
+% We need a way to break before characters if and only if they have been specified as breaking characters. It would be possible to do that via a nested conditional, but that would be messy. It is much simpler to create an empty macro whose name contains the character, and test for the existence of this macro. This needs to be done inside a |\begingroup...\endgroup| so that the macros do not have to be cleaned up manually. A good place to do this is in |\FV@FormattingPrep|, which is inside a group and before processing starts. The macro is added to |\FV@FormattingPrep@PreHook|, which contains \fvextra\ extensions to |\FV@FormattingPrep|, after |\FV@BreakAfterPrep| is defined below.
%
% The procedure here is a bit roundabout. We need to use |\FV@EscChars| to handle character escapes, but the character redefinitions need to be kept local, requiring that we work within a |\begingroup...\endgroup|. So we loop through the breaking tokens and assemble a macro that will itself define character macros. Only this defining macro is declared global, and it contains \emph{expanded} characters so that there is no longer any dependence on |\FV@EscChars|.
%
@@ -5683,9 +6126,29 @@
% \end{macro}
%
%
+% \begin{macro}{breakpreferspaces,\FV@BreakHyphenation}
+% Adjust hyphenation settings for |breaklines|.
+%
+% When |breakbefore|, |breakafter|, or |breakanywhere| are in use, |\finalhyphendemerits=0| prevents the final ``word'' on a line from being put into a line segment by itself after line breaking. Otherwise, \TeX\ tries to avoid a line break (hyphenation) within a ``word'' on the penultimate line segment, and may accomplish this by introducing an unnecessary line break at the space before the last ``word.''
+%
+% |breakpreferspaces| (|\linepenalty|) determines whether line breaks are preferentially inserted at normal spaces (|breakcollapsespaces=true|, |showspaces=false|) rather than at other locations allowed by |breakbefore|, |breakafter|, or |breakanywhere|.
+% \begin{macrocode}
+\newbool{FV@breakpreferspaces}
+\booltrue{FV@breakpreferspaces}
+\define@booleankey{FV}{breakpreferspaces}%
+ {\booltrue{FV@breakpreferspaces}}%
+ {\boolfalse{FV@breakpreferspaces}}
+\def\FV@BreakHyphenation{%
+ \finalhyphendemerits=0\relax
+ \ifbool{FV@breakpreferspaces}{}{\linepenalty=\@M\relax}}
+\g@addto@macro\FV@FormattingPrep@PreHook{\FV@BreakHyphenation}
+% \end{macrocode}
+% \end{macro}
+%
+%
% \subsubsection{Line breaking implementation}
%
-% \paragraph{Helper macros}
+% \paragraph{Helper macros}\hfill\\
%
% \begin{macro}{\FV@LineBox}
% A box for saving a line of text, so that its dimensions may be determined and thus we may figure out if it needs line breaking.
@@ -5791,7 +6254,7 @@
% \begin{macro}{\FV@BreakBufferStart}
% Create a new buffer, either at the beginning of scanning or during recursion. The single mandatory argument is the macro for handling tokens, which is |\let| to |\FV@Break@Token|. An intermediate |\FV@BreakBufferStart@i| is used to optimize |\ifx| comparisons for |\FV@BreakBufferStart| during scanning.
%
-% For recursion, |\FV@BreakBuffer<n>| and |\FV@Break@Token<n>| store the state (buffer and token handling macro) immediately prior to recusion with depth |<n>|.
+% For recursion, |\FV@BreakBuffer<n>| and |\FV@Break@Token<n>| store the state (buffer and token handling macro) immediately prior to recursion with depth |<n>|.
% \begin{macrocode}
\def\FV@BreakBufferStart{%
\FV@BreakBufferStart@i}
@@ -6461,7 +6924,7 @@
%
%
%
-% \paragraph{Line processing before scanning}
+% \paragraph{Line processing before scanning}\hfill\\
%
% \begin{macro}{\FV@makeLineNumber}
% The \pkg{lineno} package is used for formatting wrapped lines and inserting break symbols. We need a version of \pkg{lineno}'s |\makeLineNumber| that is adapted for our purposes. This is adapted directly from the example |\makeLineNumber| that is given in the \pkg{lineno} documentation under the discussion of internal line numbers. The |\FV@SetLineBreakLast| is needed to determine the internal line number of the last segment of the broken line, so that we can disable the right-hand break symbol on this segment. When a right-hand break symbol is in use, a line of code will be processed twice: once to determine the last internal line number, and once to use this information only to insert right-hand break symbols on the appropriate lines. During the second run, |\FV@SetLineBreakLast| is disabled by |\let|ting it to |\relax|.
@@ -6588,8 +7051,9 @@
\FV@SaveLineBox{#1}}%
\FV@LeftListNumber
\FV@LeftListFrame
- \FancyVerbFormatLine{%
- \FancyVerbHighlightLine{\usebox{\FV@LineBox}}}%
+ \FV@BGColor@List{%
+ \FancyVerbFormatLine{%
+ \FancyVerbHighlightLine{\usebox{\FV@LineBox}}}}%
\FV@RightListFrame
\FV@RightListNumber
\ifx\FV@Tab\FV@TrueTab@UseWidth
@@ -6600,10 +7064,11 @@
\let\FancyVerbBreakStop\relax
\FV@LeftListNumber
\FV@LeftListFrame
- \FancyVerbFormatLine{%
- \FancyVerbHighlightLine{%
- \parbox[t]{\FV@LineWidth}{%
- \noindent\strut\FV@ObeyTabs{\FancyVerbFormatText{#1}}\strut}}}%
+ \FV@BGColor@List{%
+ \FancyVerbFormatLine{%
+ \FancyVerbHighlightLine{%
+ \parbox[t]{\FV@LineWidth}{%
+ \noindent\strut\FV@ObeyTabs{\FancyVerbFormatText{#1}}\strut}}}}%
\FV@RightListFrame
\FV@RightListNumber
\fi}%
@@ -6791,7 +7256,7 @@
%
% In the |breakbytoken| cases, an |\hbox| is used to prevent breaks within the macro (breaks could occur at spaces even without |\FancyVerbBreakStart|). The |breakbytokenanywhere| case is similar but a little tricky. |\FV@BreakByTokenAnywhereHook|, which is inside |\FV@SaveLineBox| where line breaking occurs, is used to define |\FV@BreakByTokenAnywhereBreak| so that it will ``do nothing'' the first time it is used and on subsequent invocations become |\FancyVerbBreakByTokenAnywhereBreak|. Because the hook is within the |internallinenumbers*| environment, the redefinition doesn't escape, and the default global definition of |\FV@BreakByTokenAnywhereBreak| as |\relax| is not affected. We don't want the actual break to appear before the first Pygments macro in case it might cause a spurious break after leading whitespace. But we must have breaks \emph{before} Pygments macros because otherwise lookahead would be necessary.
%
-% An intermediate variable |\FV@PYG| is defined to avoid problems in case |#1|$=$|#2|. There is also a check for a non-existant |#2| (|\PYG|\meta{style\_name} may not be created until a later compile in the \pkg{pythontex} case); if |#2| does not exist, fall back to |#1|. For the existance check, |\ifx...\relax| must be used instead of |\ifcsname|, because |#2| will be a macro, and will typically be created with |\csname...\endcsname| which will |\let| the macro to |\relax| if it doesn't already exist.
+% An intermediate variable |\FV@PYG| is defined to avoid problems in case |#1|$=$|#2|. There is also a check for a non-existent |#2| (|\PYG|\meta{style\_name} may not be created until a later compile in the \pkg{pythontex} case); if |#2| does not exist, fall back to |#1|. For the existence check, |\ifx...\relax| must be used instead of |\ifcsname|, because |#2| will be a macro, and will typically be created with |\csname...\endcsname| which will |\let| the macro to |\relax| if it doesn't already exist.
%
% |\FV@PYG@Redefed| is |\let| to the Pygments macro that appears literally (after redefinition), so that it can be detected elsewhere to allow for special processing, such as in |breakautoindent|.
% \begin{macrocode}
diff --git a/macros/latex/contrib/fvextra/fvextra.pdf b/macros/latex/contrib/fvextra/fvextra.pdf
index b38e213561..4d1e204c52 100644
--- a/macros/latex/contrib/fvextra/fvextra.pdf
+++ b/macros/latex/contrib/fvextra/fvextra.pdf
Binary files differ
diff --git a/macros/latex/contrib/heria/heria-proposal.pdf b/macros/latex/contrib/heria/heria-proposal.pdf
index 79892c24d2..297edc7764 100644
--- a/macros/latex/contrib/heria/heria-proposal.pdf
+++ b/macros/latex/contrib/heria/heria-proposal.pdf
Binary files differ
diff --git a/macros/latex/contrib/heria/heria.dtx b/macros/latex/contrib/heria/heria.dtx
index 7da06a879d..a37fc04520 100644
--- a/macros/latex/contrib/heria/heria.dtx
+++ b/macros/latex/contrib/heria/heria.dtx
@@ -33,7 +33,7 @@
%<class>\NeedsTeXFormat{LaTeX2e}
%<class>\ProvidesClass{heria}
%<*class>
-[2024-08-14 v3.4.1.1 Class for Horizon Europe (R)IA proposals]
+[2024-09-03 v3.4.1.3 Class for Horizon Europe (R)IA proposals]
%</class>
%
%<*driver>
@@ -50,7 +50,7 @@
%</driver>
% \fi
%
-% \CheckSum{1520}
+% \CheckSum{1521}
%
% \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
@@ -526,6 +526,10 @@
% \subsection{Version history}
%
% \begin{description}
+% \item[v3.4.1.3 (2024-09-03)] Fixed a bug where the person-months in
+% Table 3.1a were doubled.
+% \item[v3.4.1.2 (2024-09-03)] Fixed a bug where the column totals in
+% Table 3.1f were doubled.
% \item[v3.4.1.1 (2024-08-14)] Update documentation with a reference
% to the \emph{TUGboat} paper on \textsf{heria}.
% \item[v3.4.1.0 (2024-07-14)] Add support for version 3.4 of the
@@ -728,7 +732,7 @@
& #2 & \getPnum{#3} & #3 & %
\@ifundefined{@wpTotalPersonMonths\arabic{@wp#1num}}%
{\textbf{??}}%
- {\disptoken{@wpTotalPersonMonths\arabic{@wp#1num}}}%
+ {\fpeval{\disptoken{@wpTotalPersonMonths\arabic{@wp#1num}}/2}}%
& #4 & #5}}%
\@esphack
\ifthenelse{\arabic{@wp#1num}=1}{}{\bigskip}
@@ -1108,7 +1112,7 @@
\whiledo{\value{@secolumn}<\value{@wpcount}}{%
\stepcounter{@secolumn}%
\edef\serowtemp{\serowtemp&\fpeval{round(\csname %
- @wpPersonMonths\arabic{@secolumn}\endcsname,0)}}%
+ @wpPersonMonths\arabic{@secolumn}\endcsname/2,0)}}%
\@bsphack
\protected@write\@auxout{}%
{\string\expandafter\string\expandafter\string\expandafter%
@@ -1117,7 +1121,7 @@
\arabic{@secolumn}},0)}}}%
\@esphack
}
- \serowtemp & \fpeval{round(\setotalpm,0)} \\
+ \serowtemp & \fpeval{round(\setotalpm/2,0)} \\
\hline
\end{xltabular}
\end{center}
diff --git a/macros/latex/contrib/heria/heria.pdf b/macros/latex/contrib/heria/heria.pdf
index 3295f000a9..8a70466fe0 100644
--- a/macros/latex/contrib/heria/heria.pdf
+++ b/macros/latex/contrib/heria/heria.pdf
Binary files differ
diff --git a/macros/latex/contrib/homework/README.md b/macros/latex/contrib/homework/README.md
index 4014e4ef49..ba58bb840f 100644
--- a/macros/latex/contrib/homework/README.md
+++ b/macros/latex/contrib/homework/README.md
@@ -13,6 +13,8 @@ The current document class is for writing homework or assignment. It has the fol
- Every statement and solution has its own Q.E.D. symbol, in hollow or solid shape, respectively.
- You may mark unfinished parts with `\DNF` or `\DNF<⟨remark⟩>` (meaning "did not finish") for reminding — this will give you a clickable report on the unfinished parts at the end of your document.
+> Package dependencies: [*`einfart`*](https://ctan.org/pkg/minimalist), [`lastpage`](https://ctan.org/pkg/lastpage), [`minimalist`](https://ctan.org/pkg/minimalist), [`projlib`](https://ctan.org/pkg/projlib), [`verbatim`](https://ctan.org/pkg/verbatim).
+
## Installation and preparation
### How to install this package
@@ -39,22 +41,24 @@ Also, without these fonts installed, the compilation speed might be much slower
> It is recommended that you start by looking at one of the [demo documents](https://github.com/Jinwen-XU/homework/tree/main/demo) that suits your need and edit the code there to get your own template.
-> If you don't find what you were expecting, or if you would like some elements to be changed or improved, feel free to post a feature request via [the GitHub issue](https://github.com/Jinwen-XU/homework/issues).
+> If you cannot find what you are expecting, or if you would like some elements to be changed or improved, feel free to post a feature request via [the GitHub issue](https://github.com/Jinwen-XU/homework/issues).
A typical homework document looks like this:
```latex
\documentclass[a4paper, 11pt,
- % twoside, % Use this option if you wish to use double-sided printing
+ % twoside, % Use this option if you wish to use double-sided printing.
logo = {image-of-university-logo}, % Remove this line if you don't want logo presented.
% logo height = 1cm, % In case you are not satisfied with the default logo size.
title in boldface,
title in sffamily,
- theorem in new line,
- % remove qed, % Remove the Q.E.D. symbol for problems/questions/lemmas/...
- colored solution, % Show solution/answer with color, default is blue
- % You may specify this as "colored solution = ⟨color⟩"
- % hide solution, % Use this option to hide the solutions/answers
+ theorem in new line, % Print the theorem title in a separate line.
+ % remove qed, % Remove the Q.E.D. symbols,
+ % or only remove part of the Q.E.D. symbols,
+ % via "remove problem qed" or "remove solution qed".
+ colored solution, % Show solution/answer with color, default is blue.
+ % You may specify this as "colored solution = ⟨color⟩".
+ % hide solution, % Use this option to hide the solutions/answers.
]{homework}
\UseLanguage{...} % If you wish to write your homework in languages other than English.
@@ -62,7 +66,7 @@ A typical homework document looks like this:
\title{The Subject, Week 1}
\author{Author NAME}
-\date{\TheDate{2023-12-25}, Location} % or: \date{\today[only-year-month], Location}
+\date{\TheDate{2024-01-01}, Location} % or: \date{\today[only-year-month], Location}
\begin{document}
@@ -173,7 +177,7 @@ Alternatively, if you are making an exercise sheet and prefer a more formal titl
\\
Course ID \& Course Name
\hfill
- Year 2023--24
+ Year 2024--25
}
\title{%
@@ -181,7 +185,7 @@ Alternatively, if you are making an exercise sheet and prefer a more formal titl
}
\author{}
\date{%
- % \TheDate{2023-12-25}
+ % \TheDate{2024-01-01}
}
@@ -197,7 +201,9 @@ Regarding some of the class options:
1) The logo image can be included via the class option `logo = {⟨image file name⟩}`, and if you are not satisfied with its default size, then you may manually specify the size via the option `logo height = {⟨height⟩}` or `logo width = {⟨width⟩}`. If you do not want to show any logo in the title bar, you may simply remove the option `logo = {⟨image file name⟩}`.
1) The options `title in boldface`, `title in sffamily` or even `title in scshape` are for configuring the text effect of the title line, the sectional titles and theorem names.
1) The option `theorem in new line` is for showing the problem / theorem name, numbering and description in a separate line, for the sake of clarity.
-1) The option `remove qed` is for removing the Q.E.D. symbol for theorem-type environment.
+1) The option `remove qed` is for removing all the Q.E.D. symbol.
+ - If you only wish to remove the Q.E.D. symbol for problems/questions/lemmas/..., use `remove problem qed` or `remove question qed` (they are the same).
+ - If you only wish to remove the Q.E.D. symbol for solutions/answers, use `remove solution qed` or `remove answer qed` (they are the same).
1) The option `formal title` is for enabling the formal title style. There would be no logo and no separation lines, and the title would be centered.
1) The option `colored solution` or `colored solution = ⟨color⟩` is for setting the text color of the solution/answer.
1) The option `hide solution` (or `hide answer`) is for hiding the `solution` and `answer` environments.
@@ -249,6 +255,8 @@ and then write this in your preamble:
The author would like to thank David García-Zelada for his valuable help with the Spanish language. He kindly demonstrated to me the difference between the "Tutoyer" and "Vouvoyer" version, patiently corrected many inaccuracies in the demo documents, and also pointed out a few improper translations in some of my other packages.
+The author would also like to thank his friend Junzhuo Zhao for his valuable help with the German language. Danke schön!
+
## License
diff --git a/macros/latex/contrib/homework/homework.cls b/macros/latex/contrib/homework/homework.cls
index 576cd35453..7bc5adcf85 100644
--- a/macros/latex/contrib/homework/homework.cls
+++ b/macros/latex/contrib/homework/homework.cls
@@ -12,7 +12,7 @@
\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplClass
{homework}
- {2024/02/21} {}
+ {2024/09/30} {}
{Document class for writing homework}
\keys_define:nn { homework }
@@ -58,6 +58,22 @@
, remove~qed .bool_set:N = \l__homework_no_qed_bool
, remove qed .bool_set:N = \l__homework_no_qed_bool
+ , remove-problem-qed .bool_set:N = \l__homework_no_qed_problem_bool
+ , remove-problem-qed .initial:n = { false }
+ , remove~problem~qed .bool_set:N = \l__homework_no_qed_problem_bool
+ , remove problem qed .bool_set:N = \l__homework_no_qed_problem_bool
+ , remove-question-qed .bool_set:N = \l__homework_no_qed_problem_bool
+ , remove~question~qed .bool_set:N = \l__homework_no_qed_problem_bool
+ , remove question qed .bool_set:N = \l__homework_no_qed_problem_bool
+
+ , remove-solution-qed .bool_set:N = \l__homework_no_qed_solution_bool
+ , remove-solution-qed .initial:n = { false }
+ , remove~solution~qed .bool_set:N = \l__homework_no_qed_solution_bool
+ , remove solution qed .bool_set:N = \l__homework_no_qed_solution_bool
+ , remove-answer-qed .bool_set:N = \l__homework_no_qed_solution_bool
+ , remove~answer~qed .bool_set:N = \l__homework_no_qed_solution_bool
+ , remove answer qed .bool_set:N = \l__homework_no_qed_solution_bool
+
, unknown .code:n = {
\PassOptionsToClass { \CurrentOption } { minimart }
\PassOptionsToClass { \CurrentOption } { einfart }
@@ -70,9 +86,15 @@
%% Load the base class
%%================================
+\bool_if:NT \l__homework_no_qed_bool
+ {
+ \bool_set_true:N \l__homework_no_qed_problem_bool
+ \bool_set_true:N \l__homework_no_qed_solution_bool
+ }
+
\sys_if_engine_pdftex:TF
{
- \bool_if:NF \l__homework_no_qed_bool
+ \bool_if:NF \l__homework_no_qed_problem_bool
{
\PassOptionsToClass { theorem with qed } { minimart }
}
@@ -80,7 +102,7 @@
\LoadClass { minimart }
}
{
- \bool_if:NF \l__homework_no_qed_bool
+ \bool_if:NF \l__homework_no_qed_problem_bool
{
\PassOptionsToClass { theorem with qed } { einfart }
}
@@ -271,8 +293,11 @@
\ignorespaces
}
{
- \pushQED{\qed}
- \popQED\endtrivlist\@endpefalse
+ \bool_if:NF \l__homework_no_qed_solution_bool
+ {
+ \pushQED{\qed}
+ \popQED\endtrivlist\@endpefalse
+ }
}
\NewDocumentEnvironment { answer } { O{ \l__homework_answer_tl } }
diff --git a/macros/latex/contrib/iaria-lite/README b/macros/latex/contrib/iaria-lite/README
index 018e09ba46..62decf0ef3 100644
--- a/macros/latex/contrib/iaria-lite/README
+++ b/macros/latex/contrib/iaria-lite/README
@@ -1,17 +1,21 @@
-----------------------------
- Version 0.2 of the iaria-lite class
+ Version 0.4 of the iaria-lite class
Christoph P. Neumann
-----------------------------
-This LaTeX provides a simple environment for
-technical reports as scholary publication.
+This package contains templates for the creation of documents for
+IARIA publications (International Academy, Research, and Industry Association)
+and implements the specifications for the IARIA citation style.
-NEU = Neumann
-TR = Technical Report
+This class does not contain evil low-level TeX magic
+but instead uses many other fancy LaTeX packages
+that we hope you have already installed.
-As this class is created mainly for ourselves it does not
-contain evil low-level TeX magic but instead uses many other
-fancy LaTeX packages that we hope you have already installed.
+It does not implement the specifications for the IARIA citation style,
+for which you have to use the iaria class.
+
+DISCLAIMER: If your are using pdflatex/biblatex/biber,
+it is recommended to use CTAN package iaria.
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.3c
diff --git a/macros/latex/contrib/iaria-lite/iaria-lite.dtx b/macros/latex/contrib/iaria-lite/iaria-lite.dtx
index 3bc6f34d28..c6d98a9f1e 100644
--- a/macros/latex/contrib/iaria-lite/iaria-lite.dtx
+++ b/macros/latex/contrib/iaria-lite/iaria-lite.dtx
@@ -1,16 +1,16 @@
%\iffalse
% iaria-lite.dtx generated using makedtx version 1.2 (c) Nicola Talbot
% Command line args:
-% -dir "src"
% -preamble "Copyright 2023-2024 Christoph P. Neumann This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3c of this license or any later version. The latest version of this license is in https://www.latex-project.org/lppl.txt and version 1.3c or later is part of all distributions of LaTeX version 2008 or later. This work has the LPPL maintenance status maintained. The Current Maintainer of this work is Christoph P. Neumann. "
% -macrocode ".*"
% -setambles ".*=>\nopreamble"
-% -doc "doc/iaria-lite.tex"
% -src "(_cpn_copyIntoExamplesFolder_cls.cmd|iaria-lite.cls)=>\1"
-% -author "Christoph P. Neumann "
% -date "2024-2024"
+% -dir "src"
+% -author "Christoph P. Neumann "
+% -doc "doc/iaria-lite.tex"
% iaria-lite
-% Created on 2024/4/10 18:20
+% Created on 2024/9/14 21:27
%\fi
%\iffalse
%<*package>
@@ -56,7 +56,7 @@
%\title{\textsf{iaria-lite}\\
% An Unofficial IARIA LaTeX Class (Lite Version)}
%\author{Christoph P.\ Neumann \texttt{$<$cyberpetaneuron@gmail.com$>$}}
-%\date{Version 0.2}
+%\date{Version 0.4}
%\maketitle
%\PrintChanges
%
@@ -122,14 +122,34 @@
%This package provides the documentclass \texttt{iaria-lite}. The documentclass
%supports the following options:
%
-%
%\begin{itemize}
%\item |conference| Passed to IEEEtran
%\item |a4paper| Passed to IEEEtran
-%\item |flushend| Activate flushend package
-%\item |pbalance| Activate pbalance package
+%\item |subfig| Loads subfig package with IARIA style settings
+%\item |subcaption| Loads subcaption package with IARIA style settings
+%\item |flushend| Activate flushend package (compatible with arXiv build process)
+%\item |pbalance| Activate pbalance package (incompatible with arXiv build process)
%\end{itemize}
%
+%A Remark about two-column document balancing on the last page:
+%The flushend package is recommended, because it works within the arXiv automated build process.
+%However, flushend has a major incampatibility with package lineno, which is, e.\,g., transitively loaded by package mindflow.
+%Thus, in case when flushend does not have any effect, check whether one of your packages loads lineno.
+%Usually you are stuck with your packages and, thus, will instead be forced to switch from flushend to pbalance.
+%Please be aware that pbalance works great and has high compatibility, but unfortunately it will not have any effect within the arXiv automated build process.
+%In case of both, a somehow needed lineno package and an intended arXiv upload, I recommend to do without two-column balancing on the last page and just to stay away from both flushend and pbalance, in order to ensure that your paper is layouted identically in IARIA submission and arXiv upload.
+%I hope this remark proves helpful, it took me some nerve to find out.
+%
+%There is also another important difference between flushend and pbalance: the handling of footnotes on the last page.
+%Flushend provides a decent result, but the result of pbalance is incomprehensible.
+%I strongly recommend avoiding footnotes on the last page.
+%If you absolutely need footnotes on the last page, consider staying away from two-column balancing on the last page.
+%
+%About subfigures:
+%Both well-known packages subfig and subcaption can be used.
+%However, they are not compatible with each other and we can either load one or the other.
+%Both require dedicated style settings to be compatible with IARIA formatting rules.
+%Thus, the document class provides options to load them for you with correct settings.
%
%\section{Requirements}
%
@@ -144,6 +164,8 @@
%\item hyperref
%\item orcidlink
%\item pbalance
+%\item subcaption
+%\item subfig
%\item times
%\item url
%\item xcolor
@@ -198,13 +220,25 @@ pause% \end{macrocode}
\NeedsTeXFormat{LaTeX2e}
% Provide the name of your document class, the date it was last updated, and a comment about what it's used for
-\ProvidesClass{iaria-lite}[2024/04/10 unofficial IARIA-lite conference template v0.2]
+\ProvidesClass{iaria-lite}[2024/09/16 unofficial IARIA-lite conference template v0.4]
% Define marker counter for options (counter are global in latex):
+\newcounter{iaria@subfigtracker}
+\newcounter{iaria@subcaptiontracker}
\newcounter{iaria@pbalancetracker}
\newcounter{iaria@flushendtracker}
% Declare options:
+
+\DeclareOption{subfig}{
+ \setcounter{iaria@subfigtracker}{1}
+ \typeout{iaria class: subfig option is set (use subfloat command).}
+}
+\DeclareOption{subcaption}{
+ \setcounter{iaria@subcaptiontracker}{1}
+ \typeout{iaria class: subcaption option is set (use subfigure command).}
+}
+
\DeclareOption{onecolumn}{\OptionNotUsed} % IEEE option onecolumn will be ignored
\DeclareOption{pbalance}{
@@ -274,9 +308,6 @@ pause% \end{macrocode}
\crcr}
\makeatother
-% IARIA subfigure captions require this:
-\RequirePackage[caption=false,font=footnotesize]{subfig}
-
% IARIA requires to bring the table caption in the same line of "Table I"
\usepackage{etoolbox}
\makeatletter
@@ -287,6 +318,17 @@ pause% \end{macrocode}
{}
\makeatother
+% IARIA subfigure captions require parentheses and footnotesize:
+\ifnum\value{iaria@subfigtracker}=1
+ \typeout{iaria class: load subfig package (use subfloat command).}
+ \RequirePackage[caption=false,font=footnotesize]{subfig}
+\fi
+\ifnum\value{iaria@subcaptiontracker}=1
+ \typeout{iaria class: load subcaption package (use subfigure command).}
+ \RequirePackage{subcaption}
+ \captionsetup[subfigure]{labelformat=parens,font=footnotesize}
+\fi
+
% Balance/level columns at the last page / in bibliography
% DISCLAIMER: No solution is a 100%/perfect one!
% Mainstream option: pbalance (see https://ctan.org/pkg/pbalance)
diff --git a/macros/latex/contrib/iaria-lite/iaria-lite.ins b/macros/latex/contrib/iaria-lite/iaria-lite.ins
index 5f61f6cac0..84f0e6507f 100644
--- a/macros/latex/contrib/iaria-lite/iaria-lite.ins
+++ b/macros/latex/contrib/iaria-lite/iaria-lite.ins
@@ -1,4 +1,4 @@
-% iaria-lite.ins generated using makedtx version 1.2 2024/4/10 18:20
+% iaria-lite.ins generated using makedtx version 1.2 2024/9/14 21:27
\input docstrip
\preamble
diff --git a/macros/latex/contrib/iaria-lite/iaria-lite.pdf b/macros/latex/contrib/iaria-lite/iaria-lite.pdf
index a004deb1be..a015125dbc 100644
--- a/macros/latex/contrib/iaria-lite/iaria-lite.pdf
+++ b/macros/latex/contrib/iaria-lite/iaria-lite.pdf
Binary files differ
diff --git a/macros/latex/contrib/iaria-lite/template/cpn_all_all.bib b/macros/latex/contrib/iaria-lite/template/cpn_all_all.bib
index cc7abaec4a..ba79c01832 100644
--- a/macros/latex/contrib/iaria-lite/template/cpn_all_all.bib
+++ b/macros/latex/contrib/iaria-lite/template/cpn_all_all.bib
@@ -1,3 +1,4 @@
+
@Thesis{neumann2004sa,
author = {Neumann, Christoph P.},
title = {{Conceptional Design and Realization of a `Component Test Stand' for Measurements on Enterprise JavaBeans}},
@@ -7,6 +8,7 @@
type = {Studienarbeit},
_url = {https://www.cyberlytics.eu/theses/all/Studienarbeit_ChristophPeterNeumann_revised/}
}
+
@Thesis{neumann2005da,
author = {Neumann, Christoph P.},
title = {{Design of an Open Framework for Optimizing the Distribution of Hardware and Software Components in Control Networks for Vehicles}},
@@ -16,6 +18,7 @@
type = {Diplomarbeit},
_url = {https://www.cyberlytics.eu/theses/all/Diplomarbeit_ChristophPeterNeumann_original/}
}
+
@INPROCEEDINGS{MeNe04testejb,
author = {Marcus Meyerh{\"o}fer and Christoph Neumann},
title = {{TestEJB} -- A Measurement Framework for {EJBs}},
@@ -35,21 +38,20 @@
@INPROCEEDINGS{NHSL09oxdbs,
author = {Christoph P. Neumann and Stefan Hanisch and Bernhard Schiemann and
- Richard Lenz},
+ Richard Lenz},
title = {{OXDBS -- Erweiterung einer nativen XML\-/Datenbank um die Validierung
- und Konsistenzpr{\"u}fung gegen eine OWL\-/Ontologie}},
+ und Konsistenzpr{\"u}fung gegen eine OWL\-/Ontologie}},
booktitle = {Tagungsband der 54.\,GMDS\-/Jahrestagung},
year = {2009},
_pages = {271:1--271:2},
address = {Essen, DE},
month = sep,
organization = {{Deutsche Gesellschaft f{\"u}r Medizinische Informatik, Biometrie
- und Epidemiologie} (GMDS)},
+ und Epidemiologie} (GMDS)},
doi = {10.3205/09GMDS271},
_url = {http://www.egms.de/en/meetings/gmds2009/09gmds271.shtml},
}
-
@INPROCEEDINGS{NeWL09xdsrig,
author = {Christoph P. Neumann and Florian Wagner and Richard Lenz},
title = {{XdsRig -- Eine Open\-/Source IHE XDS Testumgebung}},
@@ -59,15 +61,14 @@
address = {Essen, DE},
month = sep,
organization = {{Deutsche Gesellschaft f{\"u}r Medizinische Informatik, Biometrie
- und Epidemiologie} (GMDS)},
+ und Epidemiologie} (GMDS)},
doi = {10.3205/09GMDS276},
_url = {http://www.egms.de/en/meetings/gmds2009/09gmds276.shtml},
}
-
@INPROCEEDINGS{NRDL09deus,
- author = {Christoph P. Neumann and Florian Rampp and Michael Daum and Richard Lenz},
- title = {{A Mediated Publish\-/Subscribe System for Inter\-/Institutional Process Support in Healthcare}},
+ author = {Christoph P. Neumann and Florian Rampp and Michael Daum and Richard Lenz},
+ title = {{A Mediated Publish\-/Subscribe System for Inter\-/Institutional Process Support in Healthcare}},
booktitle = {Proc of the 3rd ACM Int'l Conf on Distributed Event\-/Based Systems (DEBS 2009)},
year = {2009},
_chapter = {14},
@@ -85,8 +86,8 @@
author = {Christoph P. Neumann and Richard Lenz},
title = {{alpha\-/Flow: A Document\-/based Approach to Inter\-/Institutional Process Support in Healthcare}},
booktitle = {Proc of the 3rd Int'l Workshop on Process\-/oriented Information Systems
- in Healthcare (ProHealth'09) in conjunction with the 7th Int'l Conf
- on Business Process Management (BPM'09)},
+ in Healthcare (ProHealth'09) in conjunction with the 7th Int'l Conf
+ on Business Process Management (BPM'09)},
year = {2009},
pages = {569--580},
address = {Ulm, DE},
@@ -100,10 +101,10 @@
@INPROCEEDINGS{NeLe09dmps,
author = {Christoph P. Neumann and Richard Lenz},
title = {{A Light\-/Weight System Extension Supporting Document\-/based Processes
- in Healthcare}},
+ in Healthcare}},
booktitle = {Proc of the 3rd Int'l Workshop on Process\-/oriented Information Systems
- in Healthcare (ProHealth'09) in conjunction with the 7th Int'l Conf
- on Business Process Management (BPM'09)},
+ in Healthcare (ProHealth'09) in conjunction with the 7th Int'l Conf
+ on Business Process Management (BPM'09)},
year = {2009},
pages = {557--568},
address = {Ulm, DE},
@@ -140,12 +141,13 @@
doi = {10.1145/1866480.1866502},
_isbn = {978\-/1\-/60558\-/900\-/8},
}
+
@INPROCEEDINGS{NSWL11alphaadaptive,
author = {Christoph P. Neumann and Peter K. Schwab and Andreas M. Wahl and Richard Lenz},
title = {{alpha\-/Adaptive: Evolutionary Workflow Metadata in Distributed Document\-/Oriented Process Management}},
booktitle = {Proc of the 4th Int'l Workshop on Process\-/oriented Information Systems
- in Healthcare (ProHealth'11) in conjunction with the 9th Int'l Conf
- on Business Process Management (BPM'11)},
+ in Healthcare (ProHealth'11) in conjunction with the 9th Int'l Conf
+ on Business Process Management (BPM'11)},
year = {2011},
pages = {225--236},
address = {Clermont\-/Ferrand, FR},
@@ -209,26 +211,26 @@
}
@MastersThesis{Neumann2012dissPreprint_OldBibTeX,
- author = {Christoph P. Neumann},
- title = {{Distributed Document\-/Oriented Process Management in Healthcare}},
- school = {Friedrich\-/Alexander\-/Universit{\"a}t Erlangen\-/N{\"u}rnberg},
- type = {Dissertation},
- _type = {`Dissertation' (PhD thesis)},
- _type = {PhD thesis (`Dissertation' in Germany)},
- month = nov,
- year = 2012,
- url = {https://nbn-resolving.org/urn:nbn:de:bvb:29-opus-39070}
+ author = {Christoph P. Neumann},
+ title = {{Distributed Document\-/Oriented Process Management in Healthcare}},
+ school = {Friedrich\-/Alexander\-/Universit{\"a}t Erlangen\-/N{\"u}rnberg},
+ type = {Dissertation},
+ _type = {`Dissertation' (PhD thesis)},
+ _type = {PhD thesis (`Dissertation' in Germany)},
+ month = nov,
+ year = 2012,
+ url = {https://nbn-resolving.org/urn:nbn:de:bvb:29-opus-39070}
}
@phdthesis{Neumann2012dissPreprint,
- author = {Christoph P. Neumann},
- title = {{Distributed Document\-/Oriented Process Management in Healthcare}},
- school = {Friedrich\-/Alexander\-/Universit{\"a}t Erlangen\-/N{\"u}rnberg},
- month = nov,
- year = 2012,
- address = {Erlangen},
- doi = {10.13140/RG.2.2.14719.79521},
- url = {https://nbn-resolving.org/urn:nbn:de:bvb:29-opus-39070}
+ author = {Christoph P. Neumann},
+ title = {{Distributed Document\-/Oriented Process Management in Healthcare}},
+ school = {Friedrich\-/Alexander\-/Universit{\"a}t Erlangen\-/N{\"u}rnberg},
+ month = nov,
+ year = 2012,
+ address = {Erlangen},
+ doi = {10.13140/RG.2.2.14719.79521},
+ url = {https://nbn-resolving.org/urn:nbn:de:bvb:29-opus-39070}
}
@INPROCEEDINGS{NeLe13adhocCoop,
@@ -244,7 +246,9 @@
_isbn = {978\-/3\-/642\-/36437\-/2},
doi = {10.1007/978-3-642-36438-9_8},
_url = {https://doi.org/10.1007/978-3-642-36438-9_8},
-}@incollection{Neumann2012lni,
+}
+
+@incollection{Neumann2012lni,
author={Christoph P. Neumann},
editor={Abraham Bernstein and Wolfgang Effelsberg and Steffen H{\"o}lldobler and Hans{-}Peter Lenhof and Klaus{-}Peter L{\"o}hr and Paul Molitor and Gustaf Neumann and R{\"u}diger Reischuk and Nicole Schweikardt and Myra Spiliopoulou and Harald St{\"o}rrle and Sabine S{\"u}sstrunk},
title={Verteiltes Dokumenten\-/orientiertes Prozessmanagement im Gesundheitswesen},
@@ -256,18 +260,19 @@
year={2012},
url={https://dl.gi.de/20.500.12116/33740}
}
+
@BOOK{Neumann2013dissBook,
- author = {Christoph P. Neumann},
- title = {{Distributed Case Handling}},
- year = 2013,
- publisher = {Verlag Dr.~Hut},
- address = {M{\"u}nchen},
- isbn = {9783843909198},
- _urn = {urn:nbn:de:bvb:29\-/opus\-/39070},
- _url = {https://d-nb.info/1033041637},
- _note = {\url{http://www.opus.ub.uni-erlangen.de/opus/volltexte/2012/3907/}(preprint version)},
- _note = {\url{https://d-nb.info/1033041637}(DNB)},
- _note = {\url{https://www.dr.hut-verlag.de/978-3-8439-0919-8.html}(URL)}
+ author = {Christoph P. Neumann},
+ title = {{Distributed Case Handling}},
+ year = 2013,
+ publisher = {Verlag Dr.~Hut},
+ address = {M{\"u}nchen},
+ isbn = {9783843909198},
+ _urn = {urn:nbn:de:bvb:29\-/opus\-/39070},
+ _url = {https://d-nb.info/1033041637},
+ _note = {\url{http://www.opus.ub.uni-erlangen.de/opus/volltexte/2012/3907/}(preprint version)},
+ _note = {\url{https://d-nb.info/1033041637}(DNB)},
+ _note = {\url{https://www.dr.hut-verlag.de/978-3-8439-0919-8.html}(URL)}
}
@INPROCEEDINGS{IND+09lzatav,
@@ -363,11 +368,10 @@
month=apr,
year={2024},
doi = {10.48550/arXiv.2404.02637},
- _url = {https://www.thinkmind.org/index.php?view=article&articleid=cloud_computing_2024_X_YY_ZZZZZ},
- _url = {https://doi.org/10.48550/arXiv.2404.02637},
+ _url = {https://www.thinkmind.org/index.php?view=article&articleid=cloud_computing_2024_2_10_28007},
+ _url2 = {https://doi.org/10.48550/arXiv.2404.02637},
_issn = {2308\-/4294},
- _pages = {AA--OO},
- note = {accepted for publication}
+ pages = {19--24}
}
@INPROCEEDINGS{ToNe11alphaprops,
@@ -425,6 +429,28 @@
_url2 = {https://www.oth-aw.de/files/oth-aw/Aktuelles/Veroeffentlichungen/Forschungsbericht/OTH_Forschungsbericht_2024.pdf},
_url3 = {https://www.researchgate.net/profile/Christoph-Neumann-8/publication/379109359_Analyse_von_Methoden_zur_Sicherung_der_Vertraulichkeit_in_Neuronalen_Netzen/links/65faff43a4857c7962654c5c/Analyse-von-Methoden-zur-Sicherung-der-Vertraulichkeit-in-Neuronalen-Netzen.pdf}
}
+
+@MISC{StNe24kosmosis,
+ title={The Kosmosis Use-Case of Crypto Rug Pull Detection and Prevention},
+ author={Philipp Stangl and Christoph P. Neumann},
+ year={2024},
+ eprint={2405.19762},
+ archivePrefix={arXiv},
+ primaryClass={cs.CR}
+}
+
+@TECHREPORT{StNe24kosmosis-TR,
+ author = {Philipp Stangl and Christoph P. Neumann},
+ title = {{The Kosmosis Use-Case of Crypto Rug Pull Detection and Prevention}},
+ institution = {Ostbayerische Technische Hochschule Amberg\-/Weiden, CyberLytics\-/Lab at the Department of Electrical Engineering, Media and Computer Science},
+ series = {Technischer Bericht},
+ number = {CL-2024-01},
+ year = 2024,
+ month = 2,
+ doi = {10.48550/arXiv.2405.19762},
+ _url = {https://doi.org/10.48550/arXiv.2405.19762},
+}
+
@TECHREPORT{ModA-TR-2021SS-WAE-TeamWeiss-CovidDashboard,
author = {Tobias Bauer and Albert Hahn and Lukas Kleinlein and Nicolas Proske and Leonard W{\"o}llmer and Andrei Trukhin and Christoph P. Neumann},
title = {{Covidash: Eine MEAN\-/Variation-basierte Webanwendung für Inzidenz\-/Zahlen und Impffortschritt in Deutschland}},
@@ -543,7 +569,6 @@
_url = {https://dx.doi.org/10.13140/RG.2.2.33933.31209},
}
-
@TECHREPORT{ModA-TR-2023SS-BDCC-TeamRot-CompVisPipeline,
author = {André Kestler and Antonio Vidos and Marcus Haberl and Tobias Dobmeier and Tobias Lettner and Tobias Weiß and Christoph P. Neumann},
title = {{Computer Vision Pipeline: Eine React- und Flask\-/basierte Webanwendung zur No\-/Code\-/Bildverarbeitung mit Cloud\-/Deployment}},
@@ -622,4 +647,107 @@
doi = {10.13140/RG.2.2.22177.79209},
_url = {https://dx.doi.org/10.13140/RG.2.2.22177.79209},
}
+@TECHREPORT{ModA-TR-2024SS-CCT-TeamGruen-CloudDice,
+ author = {Lukas Rupp and Franziska Rubenbauer and Christoph P. Neumann},
+ title = {{CloudDice: Ein React\-/basiertes Kniffel-Würfelspiel}},
+ institution = {Ostbayerische Technische Hochschule Amberg\-/Weiden, CyberLytics\-/Lab an der Fakult{\"a}t Elektrotechnik, Medien und Informatik},
+ series = {Technische Berichte},
+ number = {CL-2024-14},
+ year = 2024,
+ month = 7,
+ doi = {10.13140/RG.2.2.11229.83686},
+ _url = {https://dx.doi.org/10.13140/RG.2.2.11229.83686},
+}
+
+@TECHREPORT{ModA-TR-2024SS-BCN-TeamCyan-SkillIssue,
+ author = {Fabian Heindl and Paul Brand and Daniel Reichert and Christoph P. Neumann},
+ title = {{SkillIssue: A MERN\-/based Low\-/Latency Multi\-/User Game for Displaying True Skill With Your Friends}},
+ institution = {Ostbayerische Technische Hochschule Amberg\-/Weiden, CyberLytics\-/Lab an der Fakult{\"a}t Elektrotechnik, Medien und Informatik},
+ type = {Technical Reports},
+ number = {CL-2024-12},
+ year = 2024,
+ month = 7,
+ doi = {10.13140/RG.2.2.32201.35686},
+ _url = {https://dx.doi.org/10.13140/RG.2.2.32201.35686},
+}
+@TECHREPORT{ModA-TR-2024SS-BCN-TeamGelb-GoalGuru,
+ author = {Bernhard Gailer and Timo Gräf and Maria Lyoteva and Tsvetan Stanchev and Apporva Bhoir and Christoph P. Neumann},
+ title = {{GoalGuru: A React- and FastAPI\-/based Cloud Application for Predicting Soccer Games Outcome}},
+ institution = {Ostbayerische Technische Hochschule Amberg\-/Weiden, CyberLytics\-/Lab an der Fakult{\"a}t Elektrotechnik, Medien und Informatik},
+ type = {Technical Reports},
+ number = {CL-2024-11},
+ year = 2024,
+ month = 7,
+ doi = {10.13140/RG.2.2.18779.58407},
+ _url = {https://dx.doi.org/10.13140/RG.2.2.18779.58407},
+}
+@TECHREPORT{ModA-TR-2024SS-BCN-TeamWeiss-InfluenzaConnect,
+ author = {Sebastian Weidner and Jonas Hermann and Nils Bayerl and Dominik Schwagerl and \ Timon Spichtinger and Christoph P. Neumann},
+ title = {{InfluenzaConnect: Eine React- und Flask\-/basierte Webanwendung für Influencer\-/Marketing}},
+ institution = {Ostbayerische Technische Hochschule Amberg\-/Weiden, CyberLytics\-/Lab an der Fakult{\"a}t Elektrotechnik, Medien und Informatik},
+ type = {Technische Berichte},
+ number = {CL-2024-10},
+ year = 2024,
+ month = 7,
+ doi = {10.13140/RG.2.2.25490.47041},
+ _url = {https://dx.doi.org/10.13140/RG.2.2.25490.47041},
+}
+
+@TECHREPORT{ModA-TR-2024SS-BCN-TeamGruen-NanoVend,
+ author = {Lukas Hirsch and Johannes Küffner and Denis Tomazi and Christoph P. Neumann},
+ title = {{NanoVend: Ein Cloud\-/native E-Commerce\-/Backend als Baukasten für mittelständische Unternehmen}},
+ institution = {Ostbayerische Technische Hochschule Amberg\-/Weiden, CyberLytics\-/Lab an der Fakult{\"a}t Elektrotechnik, Medien und Informatik},
+ type = {Technische Berichte},
+ number = {CL-2024-08},
+ year = 2024,
+ month = 7,
+ doi = {10.13140/RG.2.2.12068.69761},
+ _url = {https://dx.doi.org/10.13140/RG.2.2.12068.69761},
+}
+@TECHREPORT{ModA-TR-2024SS-BCN-TeamRot-StockSentinel,
+ author = {Andreas Hecht and Linus Heise and Oliver Kneidl and Eva-Maria Maurer and Christoph P. Neumann},
+ title = {{StockSentinel: AI\-/Powered Web Tool for Analyzing the Markets Perception of Stocks}},
+ institution = {Ostbayerische Technische Hochschule Amberg\-/Weiden, CyberLytics\-/Lab an der Fakult{\"a}t Elektrotechnik, Medien und Informatik},
+ type = {Technical Reports},
+ number = {CL-2024-07},
+ year = 2024,
+ month = 7,
+ doi = {10.13140/RG.2.2.20457.30564},
+ _url = {https://dx.doi.org/10.13140/RG.2.2.20457.30564},
+}
+@TECHREPORT{ModA-TR-2024SS-WAE-TeamCyan-Connect4IfYouCan,
+ author = {Amos Asmerom and Daniel Reichert and Fabian Heindl and Christoph P. Neumann},
+ title = {{Connect4IfYouCan: A MERN\-/based Web Game for Competitive Two Player Matches}},
+ institution = {Ostbayerische Technische Hochschule Amberg\-/Weiden, CyberLytics\-/Lab an der Fakult{\"a}t Elektrotechnik, Medien und Informatik},
+ type = {Technical Reports},
+ number = {CL-2024-06},
+ year = 2024,
+ month = 7,
+ doi = {10.13140/RG.2.2.27168.19200},
+ _url = {https://dx.doi.org/10.13140/RG.2.2.27168.19200},
+}
+
+@TECHREPORT{ModA-TR-2024SS-WAE-TeamWeiss-Geodingens,
+ author = {Viktor Hense and Johannes Lindner and Lukas Mrosek and Christoph P. Neumann},
+ title = {{Geodingens: A Web Application for Intuitive and User\-/friendly Work with Geopandas}},
+ institution = {Ostbayerische Technische Hochschule Amberg\-/Weiden, CyberLytics\-/Lab an der Fakult{\"a}t Elektrotechnik, Medien und Informatik},
+ type = {Technical Reports},
+ number = {CL-2024-04},
+ year = 2024,
+ month = 7,
+ doi = {10.13140/RG.2.2.13746.41929},
+ _url = {https://dx.doi.org/10.13140/RG.2.2.13746.41929},
+}
+
+@TECHREPORT{ModA-TR-2024SS-WAE-TeamGruen-MunchMunch,
+ author = {Juliana Kühn and Nikolett Rácz and Raffael Friedl and Maximilian Lippmann and Christoph P. Neumann},
+ title = {{MunchMunch: Eine MERN\-/basierte kulinarische Web-Anwendung für verbessertes User Engagement beim Entdecken neuer Gerichte und Rezepte}},
+ institution = {Ostbayerische Technische Hochschule Amberg\-/Weiden, CyberLytics\-/Lab an der Fakult{\"a}t Elektrotechnik, Medien und Informatik},
+ type = {Technische Berichte},
+ number = {CL-2024-02},
+ year = 2024,
+ month = 7,
+ doi = {10.13140/RG.2.2.23812.74883},
+ _url = {https://dx.doi.org/10.13140/RG.2.2.23812.74883},
+}
diff --git a/macros/latex/contrib/iaria-lite/template/cpn_supervised_all.bib b/macros/latex/contrib/iaria-lite/template/cpn_supervised_all.bib
index d4341f790c..910906ac9a 100644
--- a/macros/latex/contrib/iaria-lite/template/cpn_supervised_all.bib
+++ b/macros/latex/contrib/iaria-lite/template/cpn_supervised_all.bib
@@ -1,3 +1,4 @@
+
@Thesis{kampf2012bt,
author = {Kampf, Marvin},
title = {{alpha\-/CDM: Konzeption und Implementierung eines Modells zur Inhaltsabh{\"a}ngigkeit als Baustein einer Prozessunterst{\"u}tzung auf Basis von aktiven Dokumenten}},
diff --git a/macros/latex/contrib/iaria-lite/template/iaria-lite-example-neumann.pdf b/macros/latex/contrib/iaria-lite/template/iaria-lite-example-neumann.pdf
index a7d0a9b52f..1fe382035d 100644
--- a/macros/latex/contrib/iaria-lite/template/iaria-lite-example-neumann.pdf
+++ b/macros/latex/contrib/iaria-lite/template/iaria-lite-example-neumann.pdf
Binary files differ
diff --git a/macros/latex/contrib/iaria-lite/template/iaria-lite-example-neumann.tex b/macros/latex/contrib/iaria-lite/template/iaria-lite-example-neumann.tex
index e4a4a45462..df31d68a92 100644
--- a/macros/latex/contrib/iaria-lite/template/iaria-lite-example-neumann.tex
+++ b/macros/latex/contrib/iaria-lite/template/iaria-lite-example-neumann.tex
@@ -25,7 +25,15 @@
% Diferring from IEEE, IARIA requires
% in bibliography: 6+ authors as first author et al.
% in \citeauthor: any case of et al. with just first author et al.
-\usepackage[style=ieee, backend=biber, url=false, hyperref, maxnames=5, minnames=1, maxcitenames=2, mincitenames=1]{biblatex}
+\usepackage[defernumbers=true,style=ieee, backend=biber, url=false, hyperref, maxnames=5, minnames=1, maxcitenames=2, mincitenames=1]{biblatex}
+
+% Due to applied option defernumbers=true:
+% Prevent citations in the references are being numbered as '0' in ArXiv
+% https://tex.stackexchange.com/questions/463556/all-the-citations-in-the-references-are-being-numbered-as-0-in-arxiv-while-upl
+\makeatletter
+\let\blx@rerun@biber\relax
+\makeatother
+
% Diferring fro IEEE, IARIA requires the bibliography in 9 point font
% (Command \bibfont depends on biblatex)
\renewcommand*{\bibfont}{\small}
@@ -68,7 +76,7 @@
% https://stackoverflow.com/questions/2193307/how-do-i-get-latex-to-hyphenate-a-word-that-contains-a-dash
\usepackage[shortcuts]{extdash} % Use \-/ for a breakable dash that does not prevent the remainer of the word to be hyphenated
-\usepackage{paralist}
+\usepackage[alwaysadjust]{paralist}
\usepackage[caption=false,font=footnotesize]{subfig}
\addbibresource{embedded.bib}
@@ -132,7 +140,8 @@
\hyphenation{block-chain block-chains Ethe-re-um}
% Capitalization: https://capitalizemytitle.com/style/Chicago/
-\title{The Unofficial \textsmaller{IARIA}-lite \LaTeX{} Class Paper Example (v2024-03)}
+%\title{The Unofficial \textsmaller{IARIA}-lite \LaTeX{} Class Paper Example (v2024-09)}
+\title{The \textsmaller{IARIA}-lite \LaTeX{} Class: Compatible With All \LaTeX{} Distributions,\\but without \textsmaller{IARIA} specifications for citation style (v2024-09)}
\author{
\IEEEauthorblockN{Christoph P.\ Neumann\,\orcidlink{0000-0002-5936-631X}}
@@ -152,7 +161,7 @@
\maketitle
\begin{abstract}
- \lipsum[1][3-12]
+ \lipsum[11]
\end{abstract}
% A list of IEEE Computer Society appoved keywords can be obtained at
@@ -169,65 +178,67 @@ The \textsmaller{IARIA} formatting rules \cite{iaria2014formattingrules} are ado
In addition, be aware of the supplementary \textsmaller{IARIA} editorial rules \cite{iaria2009editorialrules} \faWarning{} that provide a beginner-friendly set of further advices.
It is recommended to use a grammar tool, e.\,g., the LanguageTool \cite{languagetool} browser plugin in combination with Overleaf \cite{overleaf}.
-\lipsum[2]
+\lipsum[12]
\{\faWarning{} \textsmaller{IARIA} editorial rules: Introduction must end with a paragraph describing the structure of the paper!\}
The remainder of the paper is organized as follows: In Section~II, …
\section{Related work \textbar{} Methods}
-\lipsum[3]
+\lipsum[13]
\section{Results}
-\lipsum[4]
+\lipsum[14]
\section{Discussion \textbar{} Evalution}
-\lipsum[5]
+\lipsum[15]
\section{Conclusion and Future Work}
\{\faWarning{} \textsmaller{IARIA} editorial rules: Last section must be \textquote{Conclusion and Future Work}!\}
-\lipsum[6]
-
-
-
-%%% Advisor
-\nocite{StNe23foodfresh}
+\lipsum[16]
-%%% First-Author
+%%% CPN Peer-Rev'd
+\nocite{LeNe24vocattllm} % Co
+\nocite{PANP23seccloudfogai} % Co
+\nocite{StNe23foodfresh} % Advisor
\nocite{NeLe13adhocCoop}
\nocite{Neumann2012lni}
\nocite{NeLe12alphaFlow}
\nocite{NeHL12hydra}
\nocite{NeWL12offsync}
+\nocite{WaNe12alphaoffsync} % Co
\nocite{NSWL11alphaadaptive}
+\nocite{ToNe11alphaprops} % Co
+\nocite{JBN+10fcmdb} % Co
+\nocite{FDI+10esmmog} % Co
\nocite{NeFL10oxdbs}
\nocite{NeLe10alphaUC}
+\nocite{ILN+09semrttx} % Co
+\nocite{NHSL09oxdbs} % DE
\nocite{NeLe09alphaflow}
\nocite{NeLe09dmps}
-\nocite{NHSL09oxdbs} % DE
\nocite{NeWL09xdsrig} % DE
\nocite{NRDL09deus}
+\nocite{IND+09lzatav} % Co (DE)
+\nocite{MeNe04testejb} % Pseudo-Co
-%%% Co-Authorship
-\nocite{LeNe24vocattllm}
-\nocite{PANP23seccloudfogai}
-\nocite{WaNe12alphaoffsync}
-\nocite{ToNe11alphaprops}
-\nocite{FDI+10esmmog}
-\nocite{JBN+10fcmdb}
-\nocite{ILN+09semrttx}
-\nocite{IND+09lzatav} % DE
-\nocite{MeNe04testejb}
-
-%%% Monographic Work
+%%% CPN Monographic Work
\nocite{Neumann2013dissBook}
\nocite{Neumann2012dissPreprint}
\nocite{neumann2005da}
\nocite{neumann2004sa}
%%% TechRep / Non-Peer-Reviewed
-
+\nocite{ModA-TR-2024SS-CCT-TeamGruen-CloudDice}
+\nocite{ModA-TR-2024SS-BCN-TeamCyan-SkillIssue}
+\nocite{ModA-TR-2024SS-BCN-TeamGelb-GoalGuru}
+\nocite{ModA-TR-2024SS-BCN-TeamWeiss-InfluenzaConnect}
+\nocite{ModA-TR-2024SS-BCN-TeamGruen-NanoVend}
+\nocite{ModA-TR-2024SS-BCN-TeamRot-StockSentinel}
+\nocite{ModA-TR-2024SS-WAE-TeamCyan-Connect4IfYouCan}
+\nocite{ModA-TR-2024SS-WAE-TeamWeiss-Geodingens}
+\nocite{ModA-TR-2024SS-WAE-TeamGruen-MunchMunch}
\nocite{SaNe24othfb}
-
+\nocite{StNe24kosmosis-TR}
\nocite{ModA-TR-2023SS-WAE-TeamWeiss-Neunerln}
\nocite{ModA-TR-2023SS-BDCC-TeamRot-CompVisPipeline}
\nocite{ModA-TR-2023SS-BDCC-TeamBlau-NauticalNonsense}
@@ -245,7 +256,6 @@ The remainder of the paper is organized as follows: In Section~II, …
\nocite{ModA-TR-2021SS-WAE-TeamWeiss-CovidDashboard}
\nocite{ModA-TR-2021SS-WAE-TeamRot-FireForceDefense}
\nocite{ModA-TR-2021SS-WAE-TeamGruen-MedPlanner}
-
\nocite{NeRL12deus}
\nocite{LNR+11egr}
diff --git a/macros/latex/contrib/iaria/README b/macros/latex/contrib/iaria/README
index 73edb8b502..45ade57c51 100644
--- a/macros/latex/contrib/iaria/README
+++ b/macros/latex/contrib/iaria/README
@@ -1,17 +1,19 @@
-----------------------------
- Version 0.2 of the iaria class
+ Version 0.4 of the iaria class
Christoph P. Neumann
-----------------------------
-This LaTeX provides a simple environment for
-technical reports as scholary publication.
+This package contains templates for the creation of documents for
+IARIA publications (International Academy, Research, and Industry Association)
+and implements the specifications for the IARIA citation style.
-NEU = Neumann
-TR = Technical Report
+This class does not contain evil low-level TeX magic
+but instead uses many other fancy LaTeX packages
+that we hope you have already installed.
-As this class is created mainly for ourselves it does not
-contain evil low-level TeX magic but instead uses many other
-fancy LaTeX packages that we hope you have already installed.
+DISCLAIMER: This class is neither for XeLaTeX or LuaTeX
+nor for legacy bibtex or natbib. For these have a look
+at CTAN package iaria-lite.
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.3c
diff --git a/macros/latex/contrib/iaria/iaria.dtx b/macros/latex/contrib/iaria/iaria.dtx
index bc091c3b83..e9e8b44644 100644
--- a/macros/latex/contrib/iaria/iaria.dtx
+++ b/macros/latex/contrib/iaria/iaria.dtx
@@ -1,16 +1,16 @@
%\iffalse
% iaria.dtx generated using makedtx version 1.2 (c) Nicola Talbot
% Command line args:
-% -author "Christoph P. Neumann "
-% -dir "src"
+% -setambles ".*=>\nopreamble"
% -src "(_cpn_copyIntoExamplesFolder_cls.cmd|iaria.cls)=>\1"
% -preamble "Copyright 2023-2024 Christoph P. Neumann This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3c of this license or any later version. The latest version of this license is in https://www.latex-project.org/lppl.txt and version 1.3c or later is part of all distributions of LaTeX version 2008 or later. This work has the LPPL maintenance status maintained. The Current Maintainer of this work is Christoph P. Neumann. "
+% -author "Christoph P. Neumann "
+% -macrocode ".*"
% -date "2023-2024"
+% -dir "src"
% -doc "doc/iaria.tex"
-% -macrocode ".*"
-% -setambles ".*=>\nopreamble"
% iaria
-% Created on 2024/4/10 18:20
+% Created on 2024/9/14 21:35
%\fi
%\iffalse
%<*package>
@@ -56,7 +56,7 @@
%\title{\textsf{iaria}\\
%An Unofficial IARIA LaTeX Class}
%\author{Christoph P.\ Neumann \texttt{$<$cyberpetaneuron@gmail.com$>$}}
-%\date{Version 0.2}
+%\date{Version 0.4}
%\maketitle
%\PrintChanges
%
@@ -104,7 +104,7 @@
%
%\section{Templates}
%
-%For a quick start the \textsf{iaria-lite} distribution contains document
+%For a quick start the \textsf{iaria} distribution contains document
%templates.
%The templates can be found in the \texttt{iaria-example-neumann.zip} file.
%
@@ -114,14 +114,35 @@
%This package provides the documentclass \texttt{iaria}. The documentclass
%supports the following options:
%
-%
%\begin{itemize}
%\item |conference| Passed to IEEEtran
%\item |a4paper| Passed to IEEEtran
-%\item |flushend| Activate flushend package
-%\item |pbalance| Activate pbalance package
+%\item |subfig| Loads subfig package with IARIA style settings
+%\item |subcaption| Loads subcaption package with IARIA style settings
+%\item |flushend| Activate flushend package (compatible with arXiv build process)
+%\item |pbalance| Activate pbalance package (incompatible with arXiv build process)
%\end{itemize}
%
+%A Remark about two-column document balancing on the last page:
+%The flushend package is recommended, because it works within the arXiv automated build process.
+%However, flushend has a major incampatibility with package lineno, which is, e.\,g., transitively loaded by package mindflow.
+%Thus, in case when flushend does not have any effect, check whether one of your packages loads lineno.
+%Usually you are stuck with your packages and, thus, will instead be forced to switch from flushend to pbalance.
+%Please be aware that pbalance works great and has high compatibility, but unfortunately it will not have any effect within the arXiv automated build process.
+%In case of both, a somehow needed lineno package and an intended arXiv upload, I recommend to do without two-column balancing on the last page and just to stay away from both flushend and pbalance, in order to ensure that your paper is layouted identically in IARIA submission and arXiv upload.
+%I hope this remark proves helpful, it took me some nerve to find out.
+%
+%There is also another important difference between flushend and pbalance: the handling of footnotes on the last page.
+%Flushend provides a decent result, but the result of pbalance is incomprehensible.
+%I strongly recommend avoiding footnotes on the last page.
+%If you absolutely need footnotes on the last page, consider staying away from two-column balancing on the last page.
+%
+%About subfigures:
+%Both well-known packages subfig and subcaption can be used.
+%However, they are not compatible with each other and we can either load one or the other.
+%Both require dedicated style settings to be compatible with IARIA formatting rules.
+%Thus, the document class provides options to load them for you with correct settings.
+%
%\section{Requirements}
%
%We instrument several other \LaTeX\ packages for different purposes,
@@ -138,6 +159,8 @@
%\item inputenc
%\item orcidlink
%\item pbalance
+%\item subcaption
+%\item subfig
%\item times
%\item url
%\item xcolor
@@ -206,13 +229,25 @@ pause% \end{macrocode}
\NeedsTeXFormat{LaTeX2e}
% Provide the name of your document class, the date it was last updated, and a comment about what it's used for
-\ProvidesClass{iaria}[2024/04/10 unofficial IARIA conference template v0.2]
+\ProvidesClass{iaria}[2024/09/16 unofficial IARIA conference template v0.4]
% Define marker counter for options (counter are global in latex):
+\newcounter{iaria@subfigtracker}
+\newcounter{iaria@subcaptiontracker}
\newcounter{iaria@pbalancetracker}
\newcounter{iaria@flushendtracker}
% Declare options:
+
+\DeclareOption{subfig}{
+ \setcounter{iaria@subfigtracker}{1}
+ \typeout{iaria class: subfig option is set (use subfloat command).}
+}
+\DeclareOption{subcaption}{
+ \setcounter{iaria@subcaptiontracker}{1}
+ \typeout{iaria class: subcaption option is set (use subfigure command).}
+}
+
\DeclareOption{onecolumn}{\OptionNotUsed} % IEEE option onecolumn will be ignored
\DeclareOption{pbalance}{
@@ -259,7 +294,15 @@ pause% \end{macrocode}
% Diferring from IEEE, IARIA requires
% in bibliography: 6+ authors as first author et al.
% in \citeauthor: any case of et al. with just first author et al.
-\RequirePackage[style=ieee, backend=biber, url=false, hyperref, maxnames=5, minnames=1, maxcitenames=2, mincitenames=1]{biblatex}
+\RequirePackage[defernumbers=true,style=ieee, backend=biber, url=false, hyperref, maxnames=5, minnames=1, maxcitenames=2, mincitenames=1]{biblatex}
+
+% Due to applied option defernumbers=true:
+% Prevent citations in the references are being numbered as '0' in ArXiv
+% https://tex.stackexchange.com/questions/463556/all-the-citations-in-the-references-are-being-numbered-as-0-in-arxiv-while-upl
+\makeatletter
+\let\blx@rerun@biber\relax
+\makeatother
+
\renewcommand*{\bibfont}{\small}
% Diferring from IEEE, IARIA requires, for ONLINE entries, no point but a comma between author and title:
@@ -332,9 +375,6 @@ pause% \end{macrocode}
\crcr}
\makeatother
-% IARIA subfigure captions require this:
-\RequirePackage[caption=false,font=footnotesize]{subfig}
-
% IARIA requires to bring the table caption in the same line of "Table I"
\usepackage{etoolbox}
\makeatletter
@@ -345,9 +385,16 @@ pause% \end{macrocode}
{}
\makeatother
-% Allows to hyphenate a word that contains a dash:
-% https://stackoverflow.com/questions/2193307/how-do-i-get-latex-to-hyphenate-a-word-that-contains-a-dash
-\RequirePackage[shortcuts]{extdash} % Use \-/ for a breakable dash that does not prevent the remainer of the word to be hyphenated
+% IARIA subfigure captions require parentheses and footnotesize:
+\ifnum\value{iaria@subfigtracker}=1
+ \typeout{iaria class: load subfig package (use subfloat command).}
+ \RequirePackage[caption=false,font=footnotesize]{subfig}
+\fi
+\ifnum\value{iaria@subcaptiontracker}=1
+ \typeout{iaria class: load subcaption package (use subfigure command).}
+ \RequirePackage{subcaption}
+ \captionsetup[subfigure]{labelformat=parens,font=footnotesize}
+\fi
% Balance/level columns at the last page / in bibliography
% DISCLAIMER: No solution is a 100%/perfect one!
@@ -363,6 +410,14 @@ pause% \end{macrocode}
\RequirePackage{flushend}
\fi
+% ========================================================
+% Packages with recommendation to load them last:
+
+% Allows to hyphenate a word that contains a dash:
+% https://stackoverflow.com/questions/2193307/how-do-i-get-latex-to-hyphenate-a-word-that-contains-a-dash
+\RequirePackage[shortcuts]{extdash} % Use \-/ for a breakable dash that does not prevent the remainer of the word to be hyphenated
+% ========================================================
+
% Finally, we'll use \endinput to indicate that LaTeX can stop reading this file. LaTeX will ignore anything after this line.
\endinput
% \end{macrocode}
diff --git a/macros/latex/contrib/iaria/iaria.ins b/macros/latex/contrib/iaria/iaria.ins
index 846e42400d..4bc3d864b8 100644
--- a/macros/latex/contrib/iaria/iaria.ins
+++ b/macros/latex/contrib/iaria/iaria.ins
@@ -1,4 +1,4 @@
-% iaria.ins generated using makedtx version 1.2 2024/4/10 18:20
+% iaria.ins generated using makedtx version 1.2 2024/9/14 21:35
\input docstrip
\preamble
diff --git a/macros/latex/contrib/iaria/iaria.pdf b/macros/latex/contrib/iaria/iaria.pdf
index f7665d3d4b..7a3e0ddad7 100644
--- a/macros/latex/contrib/iaria/iaria.pdf
+++ b/macros/latex/contrib/iaria/iaria.pdf
Binary files differ
diff --git a/macros/latex/contrib/iaria/template/cpn_all_all.bib b/macros/latex/contrib/iaria/template/cpn_all_all.bib
index cc7abaec4a..ba79c01832 100644
--- a/macros/latex/contrib/iaria/template/cpn_all_all.bib
+++ b/macros/latex/contrib/iaria/template/cpn_all_all.bib
@@ -1,3 +1,4 @@
+
@Thesis{neumann2004sa,
author = {Neumann, Christoph P.},
title = {{Conceptional Design and Realization of a `Component Test Stand' for Measurements on Enterprise JavaBeans}},
@@ -7,6 +8,7 @@
type = {Studienarbeit},
_url = {https://www.cyberlytics.eu/theses/all/Studienarbeit_ChristophPeterNeumann_revised/}
}
+
@Thesis{neumann2005da,
author = {Neumann, Christoph P.},
title = {{Design of an Open Framework for Optimizing the Distribution of Hardware and Software Components in Control Networks for Vehicles}},
@@ -16,6 +18,7 @@
type = {Diplomarbeit},
_url = {https://www.cyberlytics.eu/theses/all/Diplomarbeit_ChristophPeterNeumann_original/}
}
+
@INPROCEEDINGS{MeNe04testejb,
author = {Marcus Meyerh{\"o}fer and Christoph Neumann},
title = {{TestEJB} -- A Measurement Framework for {EJBs}},
@@ -35,21 +38,20 @@
@INPROCEEDINGS{NHSL09oxdbs,
author = {Christoph P. Neumann and Stefan Hanisch and Bernhard Schiemann and
- Richard Lenz},
+ Richard Lenz},
title = {{OXDBS -- Erweiterung einer nativen XML\-/Datenbank um die Validierung
- und Konsistenzpr{\"u}fung gegen eine OWL\-/Ontologie}},
+ und Konsistenzpr{\"u}fung gegen eine OWL\-/Ontologie}},
booktitle = {Tagungsband der 54.\,GMDS\-/Jahrestagung},
year = {2009},
_pages = {271:1--271:2},
address = {Essen, DE},
month = sep,
organization = {{Deutsche Gesellschaft f{\"u}r Medizinische Informatik, Biometrie
- und Epidemiologie} (GMDS)},
+ und Epidemiologie} (GMDS)},
doi = {10.3205/09GMDS271},
_url = {http://www.egms.de/en/meetings/gmds2009/09gmds271.shtml},
}
-
@INPROCEEDINGS{NeWL09xdsrig,
author = {Christoph P. Neumann and Florian Wagner and Richard Lenz},
title = {{XdsRig -- Eine Open\-/Source IHE XDS Testumgebung}},
@@ -59,15 +61,14 @@
address = {Essen, DE},
month = sep,
organization = {{Deutsche Gesellschaft f{\"u}r Medizinische Informatik, Biometrie
- und Epidemiologie} (GMDS)},
+ und Epidemiologie} (GMDS)},
doi = {10.3205/09GMDS276},
_url = {http://www.egms.de/en/meetings/gmds2009/09gmds276.shtml},
}
-
@INPROCEEDINGS{NRDL09deus,
- author = {Christoph P. Neumann and Florian Rampp and Michael Daum and Richard Lenz},
- title = {{A Mediated Publish\-/Subscribe System for Inter\-/Institutional Process Support in Healthcare}},
+ author = {Christoph P. Neumann and Florian Rampp and Michael Daum and Richard Lenz},
+ title = {{A Mediated Publish\-/Subscribe System for Inter\-/Institutional Process Support in Healthcare}},
booktitle = {Proc of the 3rd ACM Int'l Conf on Distributed Event\-/Based Systems (DEBS 2009)},
year = {2009},
_chapter = {14},
@@ -85,8 +86,8 @@
author = {Christoph P. Neumann and Richard Lenz},
title = {{alpha\-/Flow: A Document\-/based Approach to Inter\-/Institutional Process Support in Healthcare}},
booktitle = {Proc of the 3rd Int'l Workshop on Process\-/oriented Information Systems
- in Healthcare (ProHealth'09) in conjunction with the 7th Int'l Conf
- on Business Process Management (BPM'09)},
+ in Healthcare (ProHealth'09) in conjunction with the 7th Int'l Conf
+ on Business Process Management (BPM'09)},
year = {2009},
pages = {569--580},
address = {Ulm, DE},
@@ -100,10 +101,10 @@
@INPROCEEDINGS{NeLe09dmps,
author = {Christoph P. Neumann and Richard Lenz},
title = {{A Light\-/Weight System Extension Supporting Document\-/based Processes
- in Healthcare}},
+ in Healthcare}},
booktitle = {Proc of the 3rd Int'l Workshop on Process\-/oriented Information Systems
- in Healthcare (ProHealth'09) in conjunction with the 7th Int'l Conf
- on Business Process Management (BPM'09)},
+ in Healthcare (ProHealth'09) in conjunction with the 7th Int'l Conf
+ on Business Process Management (BPM'09)},
year = {2009},
pages = {557--568},
address = {Ulm, DE},
@@ -140,12 +141,13 @@
doi = {10.1145/1866480.1866502},
_isbn = {978\-/1\-/60558\-/900\-/8},
}
+
@INPROCEEDINGS{NSWL11alphaadaptive,
author = {Christoph P. Neumann and Peter K. Schwab and Andreas M. Wahl and Richard Lenz},
title = {{alpha\-/Adaptive: Evolutionary Workflow Metadata in Distributed Document\-/Oriented Process Management}},
booktitle = {Proc of the 4th Int'l Workshop on Process\-/oriented Information Systems
- in Healthcare (ProHealth'11) in conjunction with the 9th Int'l Conf
- on Business Process Management (BPM'11)},
+ in Healthcare (ProHealth'11) in conjunction with the 9th Int'l Conf
+ on Business Process Management (BPM'11)},
year = {2011},
pages = {225--236},
address = {Clermont\-/Ferrand, FR},
@@ -209,26 +211,26 @@
}
@MastersThesis{Neumann2012dissPreprint_OldBibTeX,
- author = {Christoph P. Neumann},
- title = {{Distributed Document\-/Oriented Process Management in Healthcare}},
- school = {Friedrich\-/Alexander\-/Universit{\"a}t Erlangen\-/N{\"u}rnberg},
- type = {Dissertation},
- _type = {`Dissertation' (PhD thesis)},
- _type = {PhD thesis (`Dissertation' in Germany)},
- month = nov,
- year = 2012,
- url = {https://nbn-resolving.org/urn:nbn:de:bvb:29-opus-39070}
+ author = {Christoph P. Neumann},
+ title = {{Distributed Document\-/Oriented Process Management in Healthcare}},
+ school = {Friedrich\-/Alexander\-/Universit{\"a}t Erlangen\-/N{\"u}rnberg},
+ type = {Dissertation},
+ _type = {`Dissertation' (PhD thesis)},
+ _type = {PhD thesis (`Dissertation' in Germany)},
+ month = nov,
+ year = 2012,
+ url = {https://nbn-resolving.org/urn:nbn:de:bvb:29-opus-39070}
}
@phdthesis{Neumann2012dissPreprint,
- author = {Christoph P. Neumann},
- title = {{Distributed Document\-/Oriented Process Management in Healthcare}},
- school = {Friedrich\-/Alexander\-/Universit{\"a}t Erlangen\-/N{\"u}rnberg},
- month = nov,
- year = 2012,
- address = {Erlangen},
- doi = {10.13140/RG.2.2.14719.79521},
- url = {https://nbn-resolving.org/urn:nbn:de:bvb:29-opus-39070}
+ author = {Christoph P. Neumann},
+ title = {{Distributed Document\-/Oriented Process Management in Healthcare}},
+ school = {Friedrich\-/Alexander\-/Universit{\"a}t Erlangen\-/N{\"u}rnberg},
+ month = nov,
+ year = 2012,
+ address = {Erlangen},
+ doi = {10.13140/RG.2.2.14719.79521},
+ url = {https://nbn-resolving.org/urn:nbn:de:bvb:29-opus-39070}
}
@INPROCEEDINGS{NeLe13adhocCoop,
@@ -244,7 +246,9 @@
_isbn = {978\-/3\-/642\-/36437\-/2},
doi = {10.1007/978-3-642-36438-9_8},
_url = {https://doi.org/10.1007/978-3-642-36438-9_8},
-}@incollection{Neumann2012lni,
+}
+
+@incollection{Neumann2012lni,
author={Christoph P. Neumann},
editor={Abraham Bernstein and Wolfgang Effelsberg and Steffen H{\"o}lldobler and Hans{-}Peter Lenhof and Klaus{-}Peter L{\"o}hr and Paul Molitor and Gustaf Neumann and R{\"u}diger Reischuk and Nicole Schweikardt and Myra Spiliopoulou and Harald St{\"o}rrle and Sabine S{\"u}sstrunk},
title={Verteiltes Dokumenten\-/orientiertes Prozessmanagement im Gesundheitswesen},
@@ -256,18 +260,19 @@
year={2012},
url={https://dl.gi.de/20.500.12116/33740}
}
+
@BOOK{Neumann2013dissBook,
- author = {Christoph P. Neumann},
- title = {{Distributed Case Handling}},
- year = 2013,
- publisher = {Verlag Dr.~Hut},
- address = {M{\"u}nchen},
- isbn = {9783843909198},
- _urn = {urn:nbn:de:bvb:29\-/opus\-/39070},
- _url = {https://d-nb.info/1033041637},
- _note = {\url{http://www.opus.ub.uni-erlangen.de/opus/volltexte/2012/3907/}(preprint version)},
- _note = {\url{https://d-nb.info/1033041637}(DNB)},
- _note = {\url{https://www.dr.hut-verlag.de/978-3-8439-0919-8.html}(URL)}
+ author = {Christoph P. Neumann},
+ title = {{Distributed Case Handling}},
+ year = 2013,
+ publisher = {Verlag Dr.~Hut},
+ address = {M{\"u}nchen},
+ isbn = {9783843909198},
+ _urn = {urn:nbn:de:bvb:29\-/opus\-/39070},
+ _url = {https://d-nb.info/1033041637},
+ _note = {\url{http://www.opus.ub.uni-erlangen.de/opus/volltexte/2012/3907/}(preprint version)},
+ _note = {\url{https://d-nb.info/1033041637}(DNB)},
+ _note = {\url{https://www.dr.hut-verlag.de/978-3-8439-0919-8.html}(URL)}
}
@INPROCEEDINGS{IND+09lzatav,
@@ -363,11 +368,10 @@
month=apr,
year={2024},
doi = {10.48550/arXiv.2404.02637},
- _url = {https://www.thinkmind.org/index.php?view=article&articleid=cloud_computing_2024_X_YY_ZZZZZ},
- _url = {https://doi.org/10.48550/arXiv.2404.02637},
+ _url = {https://www.thinkmind.org/index.php?view=article&articleid=cloud_computing_2024_2_10_28007},
+ _url2 = {https://doi.org/10.48550/arXiv.2404.02637},
_issn = {2308\-/4294},
- _pages = {AA--OO},
- note = {accepted for publication}
+ pages = {19--24}
}
@INPROCEEDINGS{ToNe11alphaprops,
@@ -425,6 +429,28 @@
_url2 = {https://www.oth-aw.de/files/oth-aw/Aktuelles/Veroeffentlichungen/Forschungsbericht/OTH_Forschungsbericht_2024.pdf},
_url3 = {https://www.researchgate.net/profile/Christoph-Neumann-8/publication/379109359_Analyse_von_Methoden_zur_Sicherung_der_Vertraulichkeit_in_Neuronalen_Netzen/links/65faff43a4857c7962654c5c/Analyse-von-Methoden-zur-Sicherung-der-Vertraulichkeit-in-Neuronalen-Netzen.pdf}
}
+
+@MISC{StNe24kosmosis,
+ title={The Kosmosis Use-Case of Crypto Rug Pull Detection and Prevention},
+ author={Philipp Stangl and Christoph P. Neumann},
+ year={2024},
+ eprint={2405.19762},
+ archivePrefix={arXiv},
+ primaryClass={cs.CR}
+}
+
+@TECHREPORT{StNe24kosmosis-TR,
+ author = {Philipp Stangl and Christoph P. Neumann},
+ title = {{The Kosmosis Use-Case of Crypto Rug Pull Detection and Prevention}},
+ institution = {Ostbayerische Technische Hochschule Amberg\-/Weiden, CyberLytics\-/Lab at the Department of Electrical Engineering, Media and Computer Science},
+ series = {Technischer Bericht},
+ number = {CL-2024-01},
+ year = 2024,
+ month = 2,
+ doi = {10.48550/arXiv.2405.19762},
+ _url = {https://doi.org/10.48550/arXiv.2405.19762},
+}
+
@TECHREPORT{ModA-TR-2021SS-WAE-TeamWeiss-CovidDashboard,
author = {Tobias Bauer and Albert Hahn and Lukas Kleinlein and Nicolas Proske and Leonard W{\"o}llmer and Andrei Trukhin and Christoph P. Neumann},
title = {{Covidash: Eine MEAN\-/Variation-basierte Webanwendung für Inzidenz\-/Zahlen und Impffortschritt in Deutschland}},
@@ -543,7 +569,6 @@
_url = {https://dx.doi.org/10.13140/RG.2.2.33933.31209},
}
-
@TECHREPORT{ModA-TR-2023SS-BDCC-TeamRot-CompVisPipeline,
author = {André Kestler and Antonio Vidos and Marcus Haberl and Tobias Dobmeier and Tobias Lettner and Tobias Weiß and Christoph P. Neumann},
title = {{Computer Vision Pipeline: Eine React- und Flask\-/basierte Webanwendung zur No\-/Code\-/Bildverarbeitung mit Cloud\-/Deployment}},
@@ -622,4 +647,107 @@
doi = {10.13140/RG.2.2.22177.79209},
_url = {https://dx.doi.org/10.13140/RG.2.2.22177.79209},
}
+@TECHREPORT{ModA-TR-2024SS-CCT-TeamGruen-CloudDice,
+ author = {Lukas Rupp and Franziska Rubenbauer and Christoph P. Neumann},
+ title = {{CloudDice: Ein React\-/basiertes Kniffel-Würfelspiel}},
+ institution = {Ostbayerische Technische Hochschule Amberg\-/Weiden, CyberLytics\-/Lab an der Fakult{\"a}t Elektrotechnik, Medien und Informatik},
+ series = {Technische Berichte},
+ number = {CL-2024-14},
+ year = 2024,
+ month = 7,
+ doi = {10.13140/RG.2.2.11229.83686},
+ _url = {https://dx.doi.org/10.13140/RG.2.2.11229.83686},
+}
+
+@TECHREPORT{ModA-TR-2024SS-BCN-TeamCyan-SkillIssue,
+ author = {Fabian Heindl and Paul Brand and Daniel Reichert and Christoph P. Neumann},
+ title = {{SkillIssue: A MERN\-/based Low\-/Latency Multi\-/User Game for Displaying True Skill With Your Friends}},
+ institution = {Ostbayerische Technische Hochschule Amberg\-/Weiden, CyberLytics\-/Lab an der Fakult{\"a}t Elektrotechnik, Medien und Informatik},
+ type = {Technical Reports},
+ number = {CL-2024-12},
+ year = 2024,
+ month = 7,
+ doi = {10.13140/RG.2.2.32201.35686},
+ _url = {https://dx.doi.org/10.13140/RG.2.2.32201.35686},
+}
+@TECHREPORT{ModA-TR-2024SS-BCN-TeamGelb-GoalGuru,
+ author = {Bernhard Gailer and Timo Gräf and Maria Lyoteva and Tsvetan Stanchev and Apporva Bhoir and Christoph P. Neumann},
+ title = {{GoalGuru: A React- and FastAPI\-/based Cloud Application for Predicting Soccer Games Outcome}},
+ institution = {Ostbayerische Technische Hochschule Amberg\-/Weiden, CyberLytics\-/Lab an der Fakult{\"a}t Elektrotechnik, Medien und Informatik},
+ type = {Technical Reports},
+ number = {CL-2024-11},
+ year = 2024,
+ month = 7,
+ doi = {10.13140/RG.2.2.18779.58407},
+ _url = {https://dx.doi.org/10.13140/RG.2.2.18779.58407},
+}
+@TECHREPORT{ModA-TR-2024SS-BCN-TeamWeiss-InfluenzaConnect,
+ author = {Sebastian Weidner and Jonas Hermann and Nils Bayerl and Dominik Schwagerl and \ Timon Spichtinger and Christoph P. Neumann},
+ title = {{InfluenzaConnect: Eine React- und Flask\-/basierte Webanwendung für Influencer\-/Marketing}},
+ institution = {Ostbayerische Technische Hochschule Amberg\-/Weiden, CyberLytics\-/Lab an der Fakult{\"a}t Elektrotechnik, Medien und Informatik},
+ type = {Technische Berichte},
+ number = {CL-2024-10},
+ year = 2024,
+ month = 7,
+ doi = {10.13140/RG.2.2.25490.47041},
+ _url = {https://dx.doi.org/10.13140/RG.2.2.25490.47041},
+}
+
+@TECHREPORT{ModA-TR-2024SS-BCN-TeamGruen-NanoVend,
+ author = {Lukas Hirsch and Johannes Küffner and Denis Tomazi and Christoph P. Neumann},
+ title = {{NanoVend: Ein Cloud\-/native E-Commerce\-/Backend als Baukasten für mittelständische Unternehmen}},
+ institution = {Ostbayerische Technische Hochschule Amberg\-/Weiden, CyberLytics\-/Lab an der Fakult{\"a}t Elektrotechnik, Medien und Informatik},
+ type = {Technische Berichte},
+ number = {CL-2024-08},
+ year = 2024,
+ month = 7,
+ doi = {10.13140/RG.2.2.12068.69761},
+ _url = {https://dx.doi.org/10.13140/RG.2.2.12068.69761},
+}
+@TECHREPORT{ModA-TR-2024SS-BCN-TeamRot-StockSentinel,
+ author = {Andreas Hecht and Linus Heise and Oliver Kneidl and Eva-Maria Maurer and Christoph P. Neumann},
+ title = {{StockSentinel: AI\-/Powered Web Tool for Analyzing the Markets Perception of Stocks}},
+ institution = {Ostbayerische Technische Hochschule Amberg\-/Weiden, CyberLytics\-/Lab an der Fakult{\"a}t Elektrotechnik, Medien und Informatik},
+ type = {Technical Reports},
+ number = {CL-2024-07},
+ year = 2024,
+ month = 7,
+ doi = {10.13140/RG.2.2.20457.30564},
+ _url = {https://dx.doi.org/10.13140/RG.2.2.20457.30564},
+}
+@TECHREPORT{ModA-TR-2024SS-WAE-TeamCyan-Connect4IfYouCan,
+ author = {Amos Asmerom and Daniel Reichert and Fabian Heindl and Christoph P. Neumann},
+ title = {{Connect4IfYouCan: A MERN\-/based Web Game for Competitive Two Player Matches}},
+ institution = {Ostbayerische Technische Hochschule Amberg\-/Weiden, CyberLytics\-/Lab an der Fakult{\"a}t Elektrotechnik, Medien und Informatik},
+ type = {Technical Reports},
+ number = {CL-2024-06},
+ year = 2024,
+ month = 7,
+ doi = {10.13140/RG.2.2.27168.19200},
+ _url = {https://dx.doi.org/10.13140/RG.2.2.27168.19200},
+}
+
+@TECHREPORT{ModA-TR-2024SS-WAE-TeamWeiss-Geodingens,
+ author = {Viktor Hense and Johannes Lindner and Lukas Mrosek and Christoph P. Neumann},
+ title = {{Geodingens: A Web Application for Intuitive and User\-/friendly Work with Geopandas}},
+ institution = {Ostbayerische Technische Hochschule Amberg\-/Weiden, CyberLytics\-/Lab an der Fakult{\"a}t Elektrotechnik, Medien und Informatik},
+ type = {Technical Reports},
+ number = {CL-2024-04},
+ year = 2024,
+ month = 7,
+ doi = {10.13140/RG.2.2.13746.41929},
+ _url = {https://dx.doi.org/10.13140/RG.2.2.13746.41929},
+}
+
+@TECHREPORT{ModA-TR-2024SS-WAE-TeamGruen-MunchMunch,
+ author = {Juliana Kühn and Nikolett Rácz and Raffael Friedl and Maximilian Lippmann and Christoph P. Neumann},
+ title = {{MunchMunch: Eine MERN\-/basierte kulinarische Web-Anwendung für verbessertes User Engagement beim Entdecken neuer Gerichte und Rezepte}},
+ institution = {Ostbayerische Technische Hochschule Amberg\-/Weiden, CyberLytics\-/Lab an der Fakult{\"a}t Elektrotechnik, Medien und Informatik},
+ type = {Technische Berichte},
+ number = {CL-2024-02},
+ year = 2024,
+ month = 7,
+ doi = {10.13140/RG.2.2.23812.74883},
+ _url = {https://dx.doi.org/10.13140/RG.2.2.23812.74883},
+}
diff --git a/macros/latex/contrib/iaria/template/cpn_supervised_all.bib b/macros/latex/contrib/iaria/template/cpn_supervised_all.bib
index d4341f790c..910906ac9a 100644
--- a/macros/latex/contrib/iaria/template/cpn_supervised_all.bib
+++ b/macros/latex/contrib/iaria/template/cpn_supervised_all.bib
@@ -1,3 +1,4 @@
+
@Thesis{kampf2012bt,
author = {Kampf, Marvin},
title = {{alpha\-/CDM: Konzeption und Implementierung eines Modells zur Inhaltsabh{\"a}ngigkeit als Baustein einer Prozessunterst{\"u}tzung auf Basis von aktiven Dokumenten}},
diff --git a/macros/latex/contrib/iaria/template/iaria-example-neumann.pdf b/macros/latex/contrib/iaria/template/iaria-example-neumann.pdf
index 7c5d190398..a0d1d5b5e4 100644
--- a/macros/latex/contrib/iaria/template/iaria-example-neumann.pdf
+++ b/macros/latex/contrib/iaria/template/iaria-example-neumann.pdf
Binary files differ
diff --git a/macros/latex/contrib/iaria/template/iaria-example-neumann.tex b/macros/latex/contrib/iaria/template/iaria-example-neumann.tex
index eda28b0f0c..387d8e2cc4 100644
--- a/macros/latex/contrib/iaria/template/iaria-example-neumann.tex
+++ b/macros/latex/contrib/iaria/template/iaria-example-neumann.tex
@@ -17,7 +17,7 @@
% https://stackoverflow.com/questions/2193307/how-do-i-get-latex-to-hyphenate-a-word-that-contains-a-dash
\usepackage[shortcuts]{extdash} % Use \-/ for a breakable dash that does not prevent the remainer of the word to be hyphenated
-\usepackage{paralist}
+\usepackage[alwaysadjust]{paralist}
\usepackage[caption=false,font=footnotesize]{subfig}
% Class iaria.cls loads biblatex / biber with predefined options
@@ -83,7 +83,7 @@ final % Always enable microtype, even if in draft mode. This helps finding bad b
\hyphenation{block-chain block-chains Ethe-re-um}
% Capitalization: https://capitalizemytitle.com/style/Chicago/
-\title{The Unofficial \textsmaller{IARIA} \LaTeX{} Class Paper Example (v2024-03)}
+\title{The \textsmaller{IARIA} \LaTeX{} Class Paper Example (v2024-09)}
\author{
\IEEEauthorblockN{Christoph P.\ Neumann\,\orcidlink{0000-0002-5936-631X}}
@@ -103,7 +103,7 @@ final % Always enable microtype, even if in draft mode. This helps finding bad b
\maketitle
\begin{abstract}
- \lipsum[1][3-12]
+ \lipsum[21]%[3-12]
\end{abstract}
% A list of IEEE Computer Society appoved keywords can be obtained at
@@ -121,65 +121,67 @@ The \textsmaller{IARIA} formatting rules \cite{iaria2014formattingrules} are ado
In addition, be aware of the supplementary \textsmaller{IARIA} editorial rules \cite{iaria2009editorialrules} \faWarning{} that provide a beginner-friendly set of further advices.
It is recommended to use a grammar tool, e.\,g., the LanguageTool \cite{languagetool} browser plugin in combination with Overleaf \cite{overleaf}.
-\lipsum[2]
+\lipsum[22]
\{\faWarning{} \textsmaller{IARIA} editorial rules: Introduction must end with a paragraph describing the structure of the paper!\}
The remainder of the paper is organized as follows: In Section~II, …
\section{Related work \textbar{} Methods}
-\lipsum[3]
+\lipsum[23]
\section{Results}
-\lipsum[4]
+\lipsum[24]
\section{Discussion \textbar{} Evalution}
-\lipsum[5]
+\lipsum[25]
\section{Conclusion and Future Work}
\{\faWarning{} \textsmaller{IARIA} editorial rules: Last section must be \textquote{Conclusion and Future Work}!\}
-\lipsum[6]
+\lipsum[26]
-
-
-%%% Advisor
-\nocite{StNe23foodfresh}
-
-%%% First-Author
+%%% CPN Peer-Rev'd
+\nocite{LeNe24vocattllm} % Co
+\nocite{PANP23seccloudfogai} % Co
+\nocite{StNe23foodfresh} % Advisor
\nocite{NeLe13adhocCoop}
\nocite{Neumann2012lni}
\nocite{NeLe12alphaFlow}
\nocite{NeHL12hydra}
\nocite{NeWL12offsync}
+\nocite{WaNe12alphaoffsync} % Co
\nocite{NSWL11alphaadaptive}
+\nocite{ToNe11alphaprops} % Co
+\nocite{JBN+10fcmdb} % Co
+\nocite{FDI+10esmmog} % Co
\nocite{NeFL10oxdbs}
\nocite{NeLe10alphaUC}
+\nocite{ILN+09semrttx} % Co
+\nocite{NHSL09oxdbs} % DE
\nocite{NeLe09alphaflow}
\nocite{NeLe09dmps}
-\nocite{NHSL09oxdbs} % DE
\nocite{NeWL09xdsrig} % DE
\nocite{NRDL09deus}
+\nocite{IND+09lzatav} % Co (DE)
+\nocite{MeNe04testejb} % Pseudo-Co
-%%% Co-Authorship
-\nocite{LeNe24vocattllm}
-\nocite{PANP23seccloudfogai}
-\nocite{WaNe12alphaoffsync}
-\nocite{ToNe11alphaprops}
-\nocite{FDI+10esmmog}
-\nocite{JBN+10fcmdb}
-\nocite{ILN+09semrttx}
-\nocite{IND+09lzatav} % DE
-\nocite{MeNe04testejb}
-
-%%% Monographic Work
+%%% CPN Monographic Work
\nocite{Neumann2013dissBook}
\nocite{Neumann2012dissPreprint}
\nocite{neumann2005da}
\nocite{neumann2004sa}
%%% TechRep / Non-Peer-Reviewed
-
+\nocite{ModA-TR-2024SS-CCT-TeamGruen-CloudDice}
+\nocite{ModA-TR-2024SS-BCN-TeamCyan-SkillIssue}
+\nocite{ModA-TR-2024SS-BCN-TeamGelb-GoalGuru}
+\nocite{ModA-TR-2024SS-BCN-TeamWeiss-InfluenzaConnect}
+\nocite{ModA-TR-2024SS-BCN-TeamGruen-NanoVend}
+\nocite{ModA-TR-2024SS-BCN-TeamRot-StockSentinel}
+\nocite{ModA-TR-2024SS-WAE-TeamCyan-Connect4IfYouCan}
+\nocite{ModA-TR-2024SS-WAE-TeamWeiss-Geodingens}
+\nocite{ModA-TR-2024SS-WAE-TeamGruen-MunchMunch}
\nocite{SaNe24othfb}
-
+\nocite{StNe24kosmosis-TR}
\nocite{ModA-TR-2023SS-WAE-TeamWeiss-Neunerln}
\nocite{ModA-TR-2023SS-BDCC-TeamRot-CompVisPipeline}
\nocite{ModA-TR-2023SS-BDCC-TeamBlau-NauticalNonsense}
@@ -197,7 +199,6 @@ The remainder of the paper is organized as follows: In Section~II, …
\nocite{ModA-TR-2021SS-WAE-TeamWeiss-CovidDashboard}
\nocite{ModA-TR-2021SS-WAE-TeamRot-FireForceDefense}
\nocite{ModA-TR-2021SS-WAE-TeamGruen-MedPlanner}
-
\nocite{NeRL12deus}
\nocite{LNR+11egr}
diff --git a/macros/latex/contrib/isosafety/README.md b/macros/latex/contrib/isosafety/README.md
index d67f9940ca..575df1f210 100644
--- a/macros/latex/contrib/isosafety/README.md
+++ b/macros/latex/contrib/isosafety/README.md
@@ -4,7 +4,7 @@ isosafety is a LaTeX package that contains safety colors (ISO 3864) and safety s
Maintainer: BenSt099 (https://github.com/BenSt099/isosafety)
-Version 1.2
+Version 1.4
License: LPPL 1.3c
diff --git a/macros/latex/contrib/isosafety/doc/isosafety-docs.pdf b/macros/latex/contrib/isosafety/doc/isosafety-docs.pdf
index 70e1ecce63..0a5d219a95 100644
--- a/macros/latex/contrib/isosafety/doc/isosafety-docs.pdf
+++ b/macros/latex/contrib/isosafety/doc/isosafety-docs.pdf
Binary files differ
diff --git a/macros/latex/contrib/isosafety/doc/isosafety-docs.tex b/macros/latex/contrib/isosafety/doc/isosafety-docs.tex
index ff0e6918e6..ea2599aa3d 100644
--- a/macros/latex/contrib/isosafety/doc/isosafety-docs.tex
+++ b/macros/latex/contrib/isosafety/doc/isosafety-docs.tex
@@ -22,15 +22,16 @@
top=3cm,
bottom=3cm
}
+\usepackage{tcolorbox}
\begin{document}
\begin{center}
{\Huge isosafety} \vspace{5mm}
- {\Large Version 1.2}\vspace{5mm}
+ {\Large Version 1.4}\vspace{5mm}
- {\Large August 20, 2024}\vspace{5mm}
+ {\Large August 31, 2024}\vspace{5mm}
\href{https://github.com/BenSt099/isosafety}{github.com/BenSt099/isosafety}
\end{center}\vspace{5mm}
@@ -53,9 +54,9 @@ This package has the following dependencies: \texttt{graphicx}, \texttt{xcolor},
Seven colors are defined which are also used to create the signs: \vspace{5mm}
\renewcommand{\arraystretch}{1.2}
- \begin{tabular}{ll}
+ \begin{tabular}{|l|l|}
\hline
- Name & Colors \\
+ \textbf{Name} & \textbf{Colors} \\
\hline
Caution & \cellcolor{Caution} \\
Warning & \cellcolor{Warning} \\
@@ -69,7 +70,7 @@ Seven colors are defined which are also used to create the signs: \vspace{5mm}
\noindent How to use: \vspace{3mm}
-\verbatimfontfamily{\slshape\ttfamily}
+\verbatimfontfamily{\ttfamily}
\begin{verbatim}
{\color{Mandatory} \textbf{Text with Mandatory color.}}
@@ -88,7 +89,7 @@ Seven colors are defined which are also used to create the signs: \vspace{5mm}
\hline
Category & Letter(s) & Numbers \\
\hline
- Safe condition & E & (001 - 070) \\
+ Safe condition & E & (001 - 004, 007 - 070) \\
Crescent variant & CV & (003, 004, 009, 010, 011, 012, 013, 027, 028, 029, 064, 067) \\
Fire Protection & F & (001 - 019) \\
Mandatory & M & (001 - 060) \\
@@ -97,42 +98,81 @@ Seven colors are defined which are also used to create the signs: \vspace{5mm}
\hline
\end{tabular}\vspace{5mm}
-\noindent The command to access a sign is: \begin{verbatim}
+\noindent The command to access a sign is:
+
+\begin{tcolorbox}
+ \vspace{3mm}
+ \begin{verbatim}
\Isosign{<Letter><Number>}
-\end{verbatim}\vspace{5mm}
+ \end{verbatim}
+\end{tcolorbox}
+\vspace{5mm}
-\noindent This command constructs a path to a sign in your \TeX Live / Mik\TeX / \ldots $\;$ installation. That means to actually display the sign, resize it, edit it, etc., follow the given example:
+\noindent This command constructs a path to a sign in your \TeX Live / Mik\TeX / \ldots $\;$ installation.
+To display a sign, use the following code:
-\begin{verbatim}
+\begin{tcolorbox}
+ \vspace{3mm}
+ \begin{verbatim}
%%% Example file
\documentclass{article}
-
- % example path
- \usepackage[ fullpath = /texlive/2024/texmf-dist/tex/latex/isosafety ]{isosafety}
+
+ \usepackage{isosafety}
- \usepackage{graphicx}
+ \usepackage{graphicx}
\begin{document}
- \includegraphics{\Isosign{F001}}
- \includegraphics[scale=2]{\Isosign{P074}}
+ \includegraphics{\Isosign{F001}}
+
+ \includegraphics[scale=2]{\Isosign{P074}}
\end{document}
-\end{verbatim}\vspace{5mm}
+ \end{verbatim}
+\end{tcolorbox}
-\noindent As you can notice, when we import the package, we provide it with an option. The option is named \textbf{fullpath} and is \textbf{necessary}!
-Since you may have a different version of \TeX Live or maybe even a different \TeX-installation, you have to provide a path that leads to the installation directory
-of isosafety. The path that is given in the example is the typical path on most systems. The year \textit{2024} refers to the version of \TeX Live installed on your system \vspace{5mm}
+\newpage
-\noindent\textbf{NOTE}: On Windows, the path should also be given with foreslashes (just like in the example). \\
+\section{Known Issue}
-\noindent\textbf{NOTE}: The last directory in the path \textit{does not} end with a foreslash (just like in the example). \\
+\noindent On some systems (mostly Windows), \TeX \hspace{1mm} is not able to find the pdfs properly. Since this is an issue that seems to exist only on certain systems and not all, please use the following
+workaround by providing the fullpath that leads to the installation directory
+of isosafety. This can be done by supplying it through the \textbf{fullpath}-option:
-\noindent\textbf{NOTE}: For a complete overview of the available signs, take a look at \href{https://en.wikipedia.org/wiki/ISO_7010}{Wikipedia}.
+\begin{tcolorbox}
+ \vspace{3mm}
+ \begin{verbatim}
+ %%% Example file
+ \documentclass{article}
+
+ % example path
+ \usepackage[ fullpath = /texlive/2024/texmf-dist/tex/latex/isosafety ]{isosafety}
+
+ \usepackage{graphicx}
+ \begin{document}
+
+ \includegraphics{\Isosign{F001}}
+
+ \includegraphics[scale=2]{\Isosign{P074}}
+
+ \end{document}
+ \end{verbatim}
+\end{tcolorbox}
+\vspace{5mm}
+\noindent If you are unsure about the path, simply execute
+\begin{verbatim}
+ kpsewhich isosafety.sty
+\end{verbatim}\vspace{3mm}
+\noindent in a terminal and a path will be returned. The path that is given in the example is the typical path on most systems.
+\vspace{5mm}
+\noindent\textbf{NOTE}: On Windows, the path should also be given with foreslashes (just like in the example). \\
+\noindent\textbf{NOTE}: The last directory in the path \textit{does not} end with a foreslash (just like in the example). \\
+
+\noindent\textbf{NOTE}: For a complete overview of the available signs, take a look at \href{https://en.wikipedia.org/wiki/ISO_7010}{Wikipedia}.
\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/isosafety/tex/isosafety-pdfs/ISO_7010_E003.pdf b/macros/latex/contrib/isosafety/tex/isosafety-pdfs/ISO_7010_E003.pdf
index 21dfafc605..4863d6ec07 100644
--- a/macros/latex/contrib/isosafety/tex/isosafety-pdfs/ISO_7010_E003.pdf
+++ b/macros/latex/contrib/isosafety/tex/isosafety-pdfs/ISO_7010_E003.pdf
Binary files differ
diff --git a/macros/latex/contrib/isosafety/tex/isosafety-pdfs/ISO_7010_M005.pdf b/macros/latex/contrib/isosafety/tex/isosafety-pdfs/ISO_7010_M005.pdf
index 56aaa82124..d3f23bd662 100644
--- a/macros/latex/contrib/isosafety/tex/isosafety-pdfs/ISO_7010_M005.pdf
+++ b/macros/latex/contrib/isosafety/tex/isosafety-pdfs/ISO_7010_M005.pdf
Binary files differ
diff --git a/macros/latex/contrib/isosafety/tex/isosafety-pdfs/ISO_7010_W012.pdf b/macros/latex/contrib/isosafety/tex/isosafety-pdfs/ISO_7010_W012.pdf
index fed0023c08..6edd5cce7c 100644
--- a/macros/latex/contrib/isosafety/tex/isosafety-pdfs/ISO_7010_W012.pdf
+++ b/macros/latex/contrib/isosafety/tex/isosafety-pdfs/ISO_7010_W012.pdf
Binary files differ
diff --git a/macros/latex/contrib/isosafety/tex/isosafety.sty b/macros/latex/contrib/isosafety/tex/isosafety.sty
index 852aed35ea..40cf307628 100644
--- a/macros/latex/contrib/isosafety/tex/isosafety.sty
+++ b/macros/latex/contrib/isosafety/tex/isosafety.sty
@@ -12,7 +12,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[2005/12/01]
\ProvidesPackage{isosafety}
-[2024/08/20 v1.2 ISO Safety Colors And Safety Signs]
+[2024/08/31 v1.4 ISO Safety Colors And Safety Signs]
\RequirePackage{graphicx}
\RequirePackage{xcolor}
@@ -35,14 +35,12 @@
\DeclareOptionX{fullpath}{\renewcommand{\isosafetypath}{#1}}
\ProcessOptionsX\relax
-\ifthenelse{\equal{\isosafetypath}{false}}
-{\PackageError{isosafety}{Missing key-value option 'fullpath' in usepackage-statement, please see documentation.}{Please provide the full path to this package, usually /texlive/2024/texmf-dist/tex/latex/isosafety}}
-{}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\newcommand{\Isosign}[1]{\isosafetypath /isosafety-pdfs/ISO_7010_#1.pdf}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifthenelse{\equal{\isosafetypath}{false}}
+{\newcommand{\Isosign}[1]{/isosafety-pdfs/ISO_7010_#1.pdf}}
+{\newcommand{\Isosign}[1]{\isosafetypath /isosafety-pdfs/ISO_7010_#1.pdf}}
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\endinput
%%
diff --git a/macros/latex/contrib/joinbox/README.md b/macros/latex/contrib/joinbox/README.md
index 4b3b04cae9..e0bbb25ce0 100644
--- a/macros/latex/contrib/joinbox/README.md
+++ b/macros/latex/contrib/joinbox/README.md
@@ -35,7 +35,7 @@ joinbox 盒子拼接宏包
Copyright and Licence
---------------------
- Copyright (C) 2020-2023 by Nan Geng <nangeng@nwafu.edu.cn>
+ Copyright (C) 2020-2024 by Nan Geng <nangeng@nwafu.edu.cn>
----------------------------------------------------------------------
This work may be distributed and/or modified under the
diff --git a/macros/latex/contrib/joinbox/joinbox.pdf b/macros/latex/contrib/joinbox/joinbox.pdf
index 0e1fd27006..cbdbcacb81 100644
--- a/macros/latex/contrib/joinbox/joinbox.pdf
+++ b/macros/latex/contrib/joinbox/joinbox.pdf
Binary files differ
diff --git a/macros/latex/contrib/joinbox/joinbox.sty b/macros/latex/contrib/joinbox/joinbox.sty
index 06077c23f1..68e54c3a20 100644
--- a/macros/latex/contrib/joinbox/joinbox.sty
+++ b/macros/latex/contrib/joinbox/joinbox.sty
@@ -7,7 +7,7 @@
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
-\ProvidesExplPackage{joinbox}{2023-08-21}{v1.0.2}
+\ProvidesExplPackage{joinbox}{2024-09-09}{v1.0.3}
{Join figures to same height or width with LaTeX3}
\RequirePackage{xparse}
@@ -42,7 +42,6 @@
% 函数变体
\cs_generate_variant:Nn \hcoffin_set:Nn { Nx }
-
% 定义变量
\bool_new:N \l__joinbox_vertical_bool
\bool_new:N \l__joinbox_out_scale_bool
@@ -77,7 +76,8 @@
baseline .value_required:n = true,
baseline .choices:nn = { t, vc, H, b }
{
- \int_set_eq:NN \l__joinbox_baseline_int \l_keys_choice_int
+ \int_set_eq:NN \l__joinbox_baseline_int
+ \l_keys_choice_int
},
baseline .default:n = vc,
baseline .initial:n = b,
@@ -92,19 +92,19 @@
\bool_set_false:N \l__joinbox_out_scale_bool
}{
\bool_set_true:N \l__joinbox_out_scale_bool
- \dim_set:Nn \l__joinbox_out_length_dim { \dim_eval:n{ #1 } }
+ \dim_set:Nn \l__joinbox_out_length_dim
+ { \dim_eval:n{ #1 } }
}
}
},
outlen .default:n = 0pt,
outlen .initial:n = 0pt,
- % 拼音间距
+ % 拼接间距
sep .dim_set:N = \l__joinbox_sep_dim,
sep .default:n = 0pt,
sep .initial:n = 0pt,
- % unknown .code:n = { \__joinbox_error:n { unknown-option } }
unknown .code:n = \__joinbox_unknown_key:V \l_keys_key_str,
}
@@ -116,8 +116,7 @@
{ vc } { \int_set:Nn \l__joinbox_baseline_int { 2 } }
{ H } { \int_set:Nn \l__joinbox_baseline_int { 3 } }
{ b } { \int_set:Nn \l__joinbox_baseline_int { 4 } }
- }
- {
+ }{
% 转换为token
\tl_set_rescan:Nnn \l_tmpa_tl {} {#1}
% 计算尺寸
@@ -138,12 +137,9 @@
}
\cs_generate_variant:Nn \__joinbox_unknown_key:n { V }
-% \msg_new:nnn { joinbox } { unknown-option }
-% { package~ option~ "\l_keys_key_tl"~ is~ unknown. }
-
%% 参数设置用户接口
\NewDocumentCommand \joinset { m }
- { \keys_set:nn { joinset } {#1} }
+ { \keys_set:nn { joinbox } {#1} }
% 计算box盒子的总高度
% #1---盒子变量
@@ -208,7 +204,8 @@
\dim_set_eq:NN \l__joinbox_min_height_dim \l_tmpb_dim
}
- \bool_if:nT { !(\l__joinbox_only_first_bool) && !(\l__joinbox_only_second_bool) }
+ \bool_if:nT { !(\l__joinbox_only_first_bool) &&
+ !(\l__joinbox_only_second_bool) }
{
% 比较并记录最小宽度
\dim_set:Nn \l__joinbox_min_width_dim
@@ -274,10 +271,12 @@
{
\coffin_scale:Nnn \l__joinbox_out_coffin
{
- \dim_ratio:nn { \l__joinbox_min_width_dim }{ \coffin_wd:N \l__joinbox_out_coffin }
+ \dim_ratio:nn { \l__joinbox_min_width_dim }
+ { \coffin_wd:N \l__joinbox_out_coffin }
}
{
- \dim_ratio:nn { \l__joinbox_min_width_dim }{ \coffin_wd:N \l__joinbox_out_coffin }
+ \dim_ratio:nn { \l__joinbox_min_width_dim }
+ { \coffin_wd:N \l__joinbox_out_coffin }
}
}
@@ -286,10 +285,12 @@
{
\coffin_scale:Nnn \l__joinbox_tmpa_coffin
{
- \dim_ratio:nn { \l__joinbox_min_width_dim }{ \coffin_wd:N \l__joinbox_tmpa_coffin }
+ \dim_ratio:nn { \l__joinbox_min_width_dim }
+ { \coffin_wd:N \l__joinbox_tmpa_coffin }
}
{
- \dim_ratio:nn { \l__joinbox_min_width_dim }{ \coffin_wd:N \l__joinbox_tmpa_coffin }
+ \dim_ratio:nn { \l__joinbox_min_width_dim }
+ { \coffin_wd:N \l__joinbox_tmpa_coffin }
}
}
@@ -298,11 +299,13 @@
\coffin_set_eq:NN \l__joinbox_out_coffin \l__joinbox_tmpa_coffin
}
- \bool_if:nT { !(\l__joinbox_only_first_bool) && !(\l__joinbox_only_second_bool) }
+ \bool_if:nT { !(\l__joinbox_only_first_bool) &&
+ !(\l__joinbox_only_second_bool) }
{
% 将第2个盒子拼接到第一个盒子
\coffin_join:NnnNnnnn \l__joinbox_out_coffin
- { hc } { b } \l__joinbox_tmpa_coffin { hc } { t } { 0pt } { -\l__joinbox_sep_dim }
+ { hc } { b } \l__joinbox_tmpa_coffin { hc } { t }
+ { 0pt } { -\l__joinbox_sep_dim }
}
% 按指定输出宽度缩放输出盒子
@@ -310,10 +313,12 @@
{
\coffin_scale:Nnn \l__joinbox_out_coffin
{
- \dim_ratio:nn { \l__joinbox_out_length_dim }{ \l__joinbox_min_width_dim }
+ \dim_ratio:nn { \l__joinbox_out_length_dim }
+ { \l__joinbox_min_width_dim }
}
{
- \dim_ratio:nn { \l__joinbox_out_length_dim }{ \l__joinbox_min_width_dim }
+ \dim_ratio:nn { \l__joinbox_out_length_dim }
+ { \l__joinbox_min_width_dim }
}
}
@@ -329,10 +334,12 @@
% 按最小高度缩放第1个盒子
\coffin_scale:Nnn \l__joinbox_out_coffin
{
- \dim_ratio:nn { \l__joinbox_min_height_dim }{ \__joinbox_coffin_ht_plus_dp:N \l__joinbox_out_coffin }
+ \dim_ratio:nn { \l__joinbox_min_height_dim }
+ { \__joinbox_coffin_ht_plus_dp:N \l__joinbox_out_coffin }
}
{
- \dim_ratio:nn { \l__joinbox_min_height_dim }{ \__joinbox_coffin_ht_plus_dp:N \l__joinbox_out_coffin }
+ \dim_ratio:nn { \l__joinbox_min_height_dim }
+ { \__joinbox_coffin_ht_plus_dp:N \l__joinbox_out_coffin }
}
% 处理第2个盒子
@@ -344,25 +351,30 @@
% 按最小高度缩放第2个盒子
\coffin_scale:Nnn \l__joinbox_tmpa_coffin
{
- \dim_ratio:nn { \l__joinbox_min_height_dim }{ \__joinbox_coffin_ht_plus_dp:N \l__joinbox_tmpa_coffin }
+ \dim_ratio:nn { \l__joinbox_min_height_dim }
+ { \__joinbox_coffin_ht_plus_dp:N \l__joinbox_tmpa_coffin }
}
{
- \dim_ratio:nn { \l__joinbox_min_height_dim }{ \__joinbox_coffin_ht_plus_dp:N \l__joinbox_tmpa_coffin }
+ \dim_ratio:nn { \l__joinbox_min_height_dim }
+ { \__joinbox_coffin_ht_plus_dp:N \l__joinbox_tmpa_coffin }
}
% 将第2个盒子拼接到第1个盒子
\coffin_join:NnnNnnnn \l__joinbox_out_coffin
- { vc } { r } \l__joinbox_tmpa_coffin { vc } { l } { \l__joinbox_sep_dim } { 0pt }
+ { vc } { r } \l__joinbox_tmpa_coffin { vc } { l }
+ { \l__joinbox_sep_dim } { 0pt }
% 按指定输出高度缩放输出盒子
\bool_if:NT \l__joinbox_out_scale_bool
{
\coffin_scale:Nnn \l__joinbox_out_coffin
{
- \dim_ratio:nn { \l__joinbox_out_length_dim }{ \l__joinbox_min_height_dim }
+ \dim_ratio:nn { \l__joinbox_out_length_dim }
+ { \l__joinbox_min_height_dim }
}
{
- \dim_ratio:nn { \l__joinbox_out_length_dim }{ \l__joinbox_min_height_dim }
+ \dim_ratio:nn { \l__joinbox_out_length_dim }
+ { \l__joinbox_min_height_dim }
}
}
@@ -425,19 +437,23 @@
{
\coffin_scale:Nnn \l__joinbox_tmpa_coffin
{
- \dim_ratio:nn { \l__joinbox_out_length_dim }{ \coffin_wd:N \l__joinbox_tmpa_coffin }
+ \dim_ratio:nn { \l__joinbox_out_length_dim }
+ { \coffin_wd:N \l__joinbox_tmpa_coffin }
}
{
- \dim_ratio:nn { \l__joinbox_out_length_dim }{ \coffin_wd:N \l__joinbox_tmpa_coffin }
+ \dim_ratio:nn { \l__joinbox_out_length_dim }
+ { \coffin_wd:N \l__joinbox_tmpa_coffin }
}
}
{
\coffin_scale:Nnn \l__joinbox_tmpa_coffin
{
- \dim_ratio:nn { \l__joinbox_out_length_dim }{ \__joinbox_coffin_ht_plus_dp:N \l__joinbox_tmpa_coffin }
+ \dim_ratio:nn { \l__joinbox_out_length_dim }
+ { \__joinbox_coffin_ht_plus_dp:N \l__joinbox_tmpa_coffin }
}
{
- \dim_ratio:nn { \l__joinbox_out_length_dim }{ \__joinbox_coffin_ht_plus_dp:N \l__joinbox_tmpa_coffin }
+ \dim_ratio:nn { \l__joinbox_out_length_dim }
+ { \__joinbox_coffin_ht_plus_dp:N \l__joinbox_tmpa_coffin }
}
}
}
@@ -491,19 +507,23 @@
{
\coffin_scale:Nnn \l__joinbox_tmpa_coffin
{
- \dim_ratio:nn { \l__joinbox_out_length_dim }{ \coffin_wd:N \l__joinbox_tmpa_coffin }
+ \dim_ratio:nn { \l__joinbox_out_length_dim }
+ { \coffin_wd:N \l__joinbox_tmpa_coffin }
}
{
- \dim_ratio:nn { \l__joinbox_out_length_dim }{ \coffin_wd:N \l__joinbox_tmpa_coffin }
+ \dim_ratio:nn { \l__joinbox_out_length_dim }
+ { \coffin_wd:N \l__joinbox_tmpa_coffin }
}
}
{
\coffin_scale:Nnn \l__joinbox_tmpa_coffin
{
- \dim_ratio:nn { \l__joinbox_out_length_dim }{ \__joinbox_coffin_ht_plus_dp:N \l__joinbox_tmpa_coffin }
+ \dim_ratio:nn { \l__joinbox_out_length_dim }
+ { \__joinbox_coffin_ht_plus_dp:N \l__joinbox_tmpa_coffin }
}
{
- \dim_ratio:nn { \l__joinbox_out_length_dim }{ \__joinbox_coffin_ht_plus_dp:N \l__joinbox_tmpa_coffin }
+ \dim_ratio:nn { \l__joinbox_out_length_dim }
+ { \__joinbox_coffin_ht_plus_dp:N \l__joinbox_tmpa_coffin }
}
}
}
@@ -595,7 +615,7 @@
% 被拼接对象同时为空,无需拼接
\msg_new:nnn { joinbox } { empty-objs }
- { The~two~objects~which~was~joined~are~empty. }
+ { The~two~objects~which~were~joined~are~empty. }
% 图像拼接用户接口
% 将指定文件名列表中的图像拼接成一个盒子
diff --git a/macros/latex/contrib/joinbox/joinbox.tex b/macros/latex/contrib/joinbox/joinbox.tex
index 3c021e196d..3f6b64d4bc 100644
--- a/macros/latex/contrib/joinbox/joinbox.tex
+++ b/macros/latex/contrib/joinbox/joinbox.tex
@@ -119,7 +119,7 @@
{ \__codedoc_cmd:no {#1} { #2 } }
\ExplSyntaxOff
-\def\vers{\texttt{v1.0.2}
+\def\vers{\texttt{v1.0.3}
\thanks{\url{https://gitee.com/nwafu_nan/joinbox}}
}
diff --git a/macros/latex/contrib/jsonparse/README.md b/macros/latex/contrib/jsonparse/README.md
index c4df9ad419..38d102d4b9 100644
--- a/macros/latex/contrib/jsonparse/README.md
+++ b/macros/latex/contrib/jsonparse/README.md
@@ -1,4 +1,4 @@
-![Version 0.8.7](https://img.shields.io/badge/version-0.8.7-blue)
+![Version 0.9.1](https://img.shields.io/badge/version-0.9.1-blue)
![Jason, the JSON parsing horse](https://github.com/jasperhabicht/jsonparse/assets/6378801/ddfddc70-bf5f-4121-ba45-4b9128875d85)
@@ -47,4 +47,3 @@ We can store it in the token variable `\myJSONdata` using the command `\JSONPars
This package including all files is subject to the LPPL 1.3c license. Copyright 2024 Jasper Habicht (mail(at)jasperhabicht.de).
Jason, the JSON parsing horse: Copyright 2024 Hannah Klöber.
-
diff --git a/macros/latex/contrib/jsonparse/jason/jason.pdf b/macros/latex/contrib/jsonparse/jason/jason.pdf
index 44ff3db133..2f9a8bfc7f 100644
--- a/macros/latex/contrib/jsonparse/jason/jason.pdf
+++ b/macros/latex/contrib/jsonparse/jason/jason.pdf
Binary files differ
diff --git a/macros/latex/contrib/jsonparse/jsonparse-doc.pdf b/macros/latex/contrib/jsonparse/jsonparse-doc.pdf
index e52f8631a0..f80b04d0cc 100644
--- a/macros/latex/contrib/jsonparse/jsonparse-doc.pdf
+++ b/macros/latex/contrib/jsonparse/jsonparse-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/jsonparse/jsonparse-doc.tex b/macros/latex/contrib/jsonparse/jsonparse-doc.tex
index 7e775f7499..5b643a7af4 100644
--- a/macros/latex/contrib/jsonparse/jsonparse-doc.tex
+++ b/macros/latex/contrib/jsonparse/jsonparse-doc.tex
@@ -11,8 +11,8 @@
% This work has the LPPL maintenance status `maintained'.
%
\documentclass[a4paper]{article}
-\def\jsonparsefileversion{0.8.7}
-\def\jsonparsefiledate{8 August 2024}
+\def\jsonparsefileversion{0.9.1}
+\def\jsonparsefiledate{21 September 2024}
\usepackage[T1]{fontenc}
\usepackage{Alegreya}
@@ -200,6 +200,8 @@
\changes{v0.8.5}{2024/05/05}{Enhanced key management.}
\changes{v0.8.6}{2024/05/09}{Bug fix in nesting function.}
\changes{v0.8.7}{2024/08/08}{Corrections in documentation, error messages.}
+\changes{v0.9.0}{2024/08/27}{Adaption to updated verbatim tokenization.}
+\changes{v0.9.1}{2024/09/21}{Added functions to test for valid JSON numbers.}
\begin{document}
\vspace*{-1cm}
@@ -232,13 +234,13 @@ This key can be set either as package option or using \macro{\JSONParseSet}. It
\section{Escaping and special treatment of the input}\label{sec:escaping}
-In general, the package reads the JSON source as string, which means that all characters have category code 12 (other), except for spaces which have category code 10 (space). The \macro{\endlinechar} value is set to $-1$. Furthermore, if PDFLaTeX is used, the upper-half of the 8-bit range is set to ``active''. JSON, however, defines a small set of escape sequences and in order to be able to process these, the category code of the backslash is set to 0 (escpape).
+In general, the package reads the JSON source as string, which means that all characters have category code 12 (other), except for spaces which have category code 10 (space). The \macro{\endlinechar} value is set to $-1$. Furthermore, if PDFLaTeX is used, the upper-half of the 8-bit range is set to ``active''. JSON, however, defines a small set of escape sequences and in order to be able to process these, the category code of the backslash is set to 0 (escape).
-JSON strings cannot contain the two characters \macro{"} and \macro{\}. These two characters need to be escaped with a preceding backslash (\macro{\}). This package therefore redefines locally the TeX control symbols \macro{\"}, \macro{\/}, \macro{\\}, \macro{\b}, \macro{\f}, \macro{\n}, \macro{\r}, \macro{\t} and \macro{\u}. These control symbols are prevented from expanding during parsing. For example, \macro{\"} is first defined as \macro{\exp_not:N \"} and only hen typeset, \macro{\"} is expanded to \macro{"}, which ensures that strings are parsed properly.
+JSON strings cannot contain the two characters \macro{"} and \macro{\}. These two characters need to be escaped with a preceding backslash (\macro{\}). This package therefore redefines locally the TeX control symbols \macro{\"}, \macro{\/}, \macro{\\}, \macro{\b}, \macro{\f}, \macro{\n}, \macro{\r}, \macro{\t} and \macro{\u}. These control symbols are prevented from expanding during parsing. For example, \macro{\"} is first defined as \macro{\exp_not:N \"} and only when typeset, \macro{\"} is expanded to \macro{"}, which ensures that strings are parsed properly.
-Similarly, the control symbol \macro{\/} expands eventually to \macro{/} and \macro{\\} to \macro{\c_backslash_str} (i.\,e. a backslash with category code 12). The escape sequence \macro{\u} followed by a hex value consisting of four digits eventually eventually expands to \macro{\char"} followed by the relevant four hex digits. The JSON escape sequences \macro{\b}, \macro{\f}, \macro{\n}, \macro{\r}, \macro{\t} or \macro{\u} (followed by a hex value) eventually expand to token variables of which the contents can be set using the relevant \macro{replacement} key. See more on setting options below in section \ref{sec:options}.
+Similarly, the control symbol \macro{\/} expands eventually to \macro{/} and \macro{\\} to \macro{\c_backslash_str} (i.\,e. a backslash with category code 12). The escape sequence \macro{\u} followed by a hex value consisting of four digits eventually expands to \macro{\char"} followed by the relevant four hex digits. The JSON escape sequences \macro{\b}, \macro{\f}, \macro{\n}, \macro{\r} and \macro{\t} eventually expand to token variables of which the contents can be set using the relevant \macro{replacement} key. See more on setting options below in section \ref{sec:options}.
-It is possible to insert TeX macros to the JSON source that will eventually be parsed when typesetting. Backslashes of TeX macros need to be escaped by another backslash. The TeX macros \macro{\"} and \macro{\\} must be escaped twice in the JSON source, so that they become \macro{\\\"} and \macro{\\\\} respectively.
+It is possible to insert TeX macros to the JSON source that will eventually be parsed when typesetting. Backslashes of TeX macros need to be escaped by another backslash. The TeX macros \macro{\"} and \macro{\\} must be escaped twice in the JSON source so that they become \macro{\\\"} and \macro{\\\\} respectively.
\begin{macrodef}
|\x|{<token variable name>}{<key>}
@@ -460,7 +462,14 @@ replace/|horizontal tab|={<string>}
These keys can be used to set the replacement text for the JSON escape sequences \macro{\b} (backspace), \macro{\f} (formfeed), \macro{\n} (linefeed), \macro{\r} (carriage return) and \macro{\t} (horizontal tab). The default replacement string is a space. Only strings can be used as replacement. These replacements take place only during typesetting.
These keys can be set using \macro{\JSONParseSet}. They can also be set locally as option to the commands \macro{\JSONParseValue}, \macro{\JSONParseArrayValues} and \macro{\JSONParseArrayValuesMap}.
+\begin{macrodef}
+|check num|
+|check num|={<boolean>}
+\end{macrodef}
+If set to \macro{false}, the key \macro{check num} omits an internal check of numerical expressions against the JSON specification for numbers. Turning off this feature can increase the parsing speed.
+This key can be set using \macro{\JSONParseSet}. It can also be set locally as option to the commands \macro{\JSONParse} and \macro{\JSONParseFromFile}.
+
\subsection{L3 commands}
\begin{macrodef}
@@ -478,6 +487,14 @@ The command \macro{\jsonparse_parse_to_prop:Nn} creates the token variable given
\end{macrodef}
The command \macro{\jsonparse_parse_to_prop:Nn} processes the token variable given as the first arguments as property list and filters it according to the key given as second argument. Filtering means that for every entry in the property list, the key of this entry is compared against the key given to the command. If the key in the property list starts with the given key, the matching part is removed from the key in the property list. If the keys do not match, the entry is completely removed from the property list.
+\begin{macrodef}
+|\jsonparse_if_num:nTF| {<string>} {<true code>} {<false code>}
+|\jsonparse_if_num:nT| {<string>} {<true code>}
+|\jsonparse_if_num:nF| {<string>} {<false code>}
+|\jsonparse_if_num_p:n| {<string>}
+\end{macrodef}
+The command \macro{\jsonparse_if_num:nTF} checks whether a string is a valid JSON number according the relevant specification. It executes the true code if the string is a valid JSON number and the false code if not. The variants \macro{\jsonparse_if_num:nT} and \macro{\jsonparse_if_num:nF} work accordingly. The command \macro{\jsonparse_if_num_p:n} returns a boolean true or false.
+
% =====
\printchanges
diff --git a/macros/latex/contrib/jsonparse/jsonparse.sty b/macros/latex/contrib/jsonparse/jsonparse.sty
index 514064d92a..2dd3696e88 100644
--- a/macros/latex/contrib/jsonparse/jsonparse.sty
+++ b/macros/latex/contrib/jsonparse/jsonparse.sty
@@ -10,7 +10,7 @@
%
% This work has the LPPL maintenance status `maintained'.
%
-\ProvidesExplPackage {jsonparse} {2024-08-08} {0.8.7}
+\ProvidesExplPackage {jsonparse} {2024-09-21} {0.9.1}
{JSON Parse}
\bool_new:N \l__jsonparse_debug_mode_bool
@@ -64,7 +64,7 @@
\msg_new:nnn { jsonparse } { saving-external } {
\msg_info_text:n { jsonparse } \iow_newline:
- Saving ~ external ~ file: ~ #1.
+ Saving ~ to ~ external ~ file: ~ #1.
}
\msg_new:nnn { jsonparse } { loading-external } {
@@ -86,6 +86,7 @@
\str_new:N \l__jsonparse_false_str
\str_new:N \l__jsonparse_null_str
\bool_new:N \l__jsonparse_zero_based_bool
+\bool_new:N \l__jsonparse_check_num_bool
\bool_new:N \l__jsonparse_rescan_bool
\bool_new:N \l__jsonparse_externalize_bool
@@ -97,8 +98,7 @@
\clist_new:N \l__jsonparse_unused_keys_clist
-\clist_new:N \l__jsonparse_escape_tex_chars_clist
-\clist_set:Nn \l__jsonparse_escape_tex_chars_clist {
+\clist_const:Nn \c__jsonparse_escape_tex_chars_clist {
number_sign ,
dollar_sign ,
percent_sign ,
@@ -109,7 +109,7 @@
}
\str_new:N \l__jsonparse_escape_temp_str
-\clist_map_inline:Nn \l__jsonparse_escape_tex_chars_clist {
+\clist_map_inline:Nn \c__jsonparse_escape_tex_chars_clist {
\bool_new:c { l__jsonparse_escape_ #1 _bool }
}
@@ -133,6 +133,9 @@
zero-based .bool_set:N = \l__jsonparse_zero_based_bool ,
zero-based .default:n = { true } ,
zero-based .initial:n = { true } ,
+ check ~ num .bool_set:N = \l__jsonparse_check_num_bool ,
+ check ~ num .default:n = { true } ,
+ check ~ num .initial:n = { true } ,
replace .code:n = { \keys_set:nn { jsonparse / parse / replace } {#1} } ,
replace / true .str_set:N = \l__jsonparse_true_str ,
replace / true .initial:n = { true } ,
@@ -157,12 +160,12 @@
escape .code:n = {
\str_case:nnF {#1} {
{ all } {
- \clist_map_inline:Nn \l__jsonparse_escape_tex_chars_clist {
+ \clist_map_inline:Nn \c__jsonparse_escape_tex_chars_clist {
\bool_set_true:c { l__jsonparse_escape_ ##1 _bool }
}
}
{ none } {
- \clist_map_inline:Nn \l__jsonparse_escape_tex_chars_clist {
+ \clist_map_inline:Nn \c__jsonparse_escape_tex_chars_clist {
\bool_set_false:c { l__jsonparse_escape_ ##1 _bool }
}
}
@@ -292,6 +295,326 @@
% ===
+\tl_new:N \l__jsonparse_num_input_tl
+\tl_new:N \l__jsonparse_num_remainder_tl
+\tl_new:N \l__jsonparse_num_input_last_tl
+\bool_new:N \l__jsonparse_num_bool
+\bool_new:N \l__jsonparse_num_zero_seen_bool
+\bool_new:N \l__jsonparse_num_plus_minus_seen_bool
+\bool_new:N \l__jsonparse_num_fraction_seen_bool
+\bool_new:N \l__jsonparse_num_exponent_seen_bool
+\tl_new:N \l__jsonparse_num_input_tl
+\tl_new:N \l__jsonparse_num_remainder_tl
+\tl_new:N \l__jsonparse_num_input_last_tl
+\bool_new:N \l__jsonparse_num_bool
+\bool_new:N \l__jsonparse_num_zero_seen_bool
+\bool_new:N \l__jsonparse_num_plus_minus_seen_bool
+\bool_new:N \l__jsonparse_num_fraction_seen_bool
+\bool_new:N \l__jsonparse_num_exponent_seen_bool
+
+\clist_const:Nn \c__jsonparse_num_digits_clist {
+\clist_const:Nn \c__jsonparse_num_digits_clist {
+ 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9
+}
+
+\prg_new_conditional:Npnn \jsonparse_if_num:n #1 { p , T , F , TF } {
+ \bool_set_true:N \l__jsonparse_num_bool
+ \bool_set_false:N \l__jsonparse_num_zero_seen_bool
+ \bool_set_false:N \l__jsonparse_num_plus_minus_seen_bool
+ \bool_set_false:N \l__jsonparse_num_fraction_seen_bool
+ \bool_set_false:N \l__jsonparse_num_exponent_seen_bool
+ \tl_set:Nn \l__jsonparse_num_remainder_tl { #1 }
+ \tl_if_empty:NTF \l__jsonparse_num_remainder_tl {
+ \bool_set_false:N \l__jsonparse_num_bool
+\prg_new_conditional:Npnn \jsonparse_if_num:n #1 { p , T , F , TF } {
+ \bool_set_true:N \l__jsonparse_num_bool
+ \bool_set_false:N \l__jsonparse_num_zero_seen_bool
+ \bool_set_false:N \l__jsonparse_num_plus_minus_seen_bool
+ \bool_set_false:N \l__jsonparse_num_fraction_seen_bool
+ \bool_set_false:N \l__jsonparse_num_exponent_seen_bool
+ \tl_set:Nn \l__jsonparse_num_remainder_tl { #1 }
+ \tl_if_empty:NTF \l__jsonparse_num_remainder_tl {
+ \bool_set_false:N \l__jsonparse_num_bool
+ } {
+ \__jsonparse_parse_num:n {#1}
+ \__jsonparse_parse_num:n {#1}
+ }
+ \bool_lazy_any:nT {
+ { \str_if_eq_p:Vn \l__jsonparse_num_input_last_tl { + } }
+ { \str_if_eq_p:Vn \l__jsonparse_num_input_last_tl { - } }
+ { \str_if_eq_p:Vn \l__jsonparse_num_input_last_tl { . } }
+ { \str_if_eq_p:Vn \l__jsonparse_num_input_last_tl { e } }
+ { \str_if_eq_p:Vn \l__jsonparse_num_input_last_tl { E } }
+ { \str_if_eq_p:Vn \l__jsonparse_num_input_last_tl { + } }
+ { \str_if_eq_p:Vn \l__jsonparse_num_input_last_tl { - } }
+ { \str_if_eq_p:Vn \l__jsonparse_num_input_last_tl { . } }
+ { \str_if_eq_p:Vn \l__jsonparse_num_input_last_tl { e } }
+ { \str_if_eq_p:Vn \l__jsonparse_num_input_last_tl { E } }
+ } {
+ \bool_set_false:N \l__jsonparse_num_bool
+ \bool_set_false:N \l__jsonparse_num_bool
+ }
+ \bool_if:NTF \l__jsonparse_num_bool {
+ \bool_if:NTF \l__jsonparse_num_bool {
+ \prg_return_true:
+ } {
+ \prg_return_false:
+ }
+}
+
+\cs_new:Npn \__jsonparse_parse_num:n #1 {
+ \tl_set:Ne \l__jsonparse_num_input_tl { \tl_trim_spaces:e {#1} }
+ \tl_if_empty:NF \l__jsonparse_num_input_tl {
+ \cs_if_exist_use:cTF { __jsonparse_parse_num_ \str_head_ignore_spaces:o { \l__jsonparse_num_input_tl } :w } {
+ \l__jsonparse_num_input_tl \q_stop
+\cs_new:Npn \__jsonparse_parse_num:n #1 {
+ \tl_set:Ne \l__jsonparse_num_input_tl { \tl_trim_spaces:e {#1} }
+ \tl_if_empty:NF \l__jsonparse_num_input_tl {
+ \cs_if_exist_use:cTF { __jsonparse_parse_num_ \str_head_ignore_spaces:o { \l__jsonparse_num_input_tl } :w } {
+ \l__jsonparse_num_input_tl \q_stop
+ } {
+ \exp_last_unbraced:No
+ \__jsonparse_parse_num_other:w \l__jsonparse_num_input_tl \q_stop
+ \__jsonparse_parse_num_other:w \l__jsonparse_num_input_tl \q_stop
+ }
+ }
+}
+
+\cs_new:cpn { __jsonparse_parse_num_ + :w } #1 \q_stop {
+\cs_new:cpn { __jsonparse_parse_num_ + :w } #1 \q_stop {
+ \exp_last_unbraced:No
+ \__jsonparse_parse_num_plus_minus:w #1 \q_stop
+ \__jsonparse_parse_num_plus_minus:w #1 \q_stop
+}
+
+\cs_new:cpn { __jsonparse_parse_num_ - :w } #1 \q_stop {
+\cs_new:cpn { __jsonparse_parse_num_ - :w } #1 \q_stop {
+ \exp_last_unbraced:No
+ \__jsonparse_parse_num_plus_minus:w #1 \q_stop
+ \__jsonparse_parse_num_plus_minus:w #1 \q_stop
+}
+
+\cs_new:cpn { __jsonparse_parse_num_ . :w } #1 \q_stop {
+\cs_new:cpn { __jsonparse_parse_num_ . :w } #1 \q_stop {
+ \exp_last_unbraced:No
+ \__jsonparse_parse_num_fraction:w #1 \q_stop
+ \__jsonparse_parse_num_fraction:w #1 \q_stop
+}
+
+\cs_new:cpn { __jsonparse_parse_num_ e :w } #1 \q_stop {
+\cs_new:cpn { __jsonparse_parse_num_ e :w } #1 \q_stop {
+ \exp_last_unbraced:No
+ \__jsonparse_parse_num_exponent:w #1 \q_stop
+ \__jsonparse_parse_num_exponent:w #1 \q_stop
+}
+
+\cs_new:cpn { __jsonparse_parse_num_ E :w } #1 \q_stop {
+\cs_new:cpn { __jsonparse_parse_num_ E :w } #1 \q_stop {
+ \exp_last_unbraced:No
+ \__jsonparse_parse_num_exponent:w #1 \q_stop
+ \__jsonparse_parse_num_exponent:w #1 \q_stop
+}
+
+\clist_map_inline:Nn \c__jsonparse_num_digits_clist {
+ \cs_new:cpn { __jsonparse_parse_num_ #1 :w } ##1 \q_stop {
+\clist_map_inline:Nn \c__jsonparse_num_digits_clist {
+ \cs_new:cpn { __jsonparse_parse_num_ #1 :w } ##1 \q_stop {
+ \exp_last_unbraced:No
+ \__jsonparse_parse_num_digit:w ##1 \q_stop
+ \__jsonparse_parse_num_digit:w ##1 \q_stop
+ }
+}
+
+\cs_new:Npn \__jsonparse_parse_num_plus_minus:w #1 \q_stop {
+ \bool_if:NTF \l__jsonparse_num_plus_minus_seen_bool {
+ \tl_set:Nn \l__jsonparse_num_remainder_tl { }
+ \bool_set_false:N \l__jsonparse_num_bool
+\cs_new:Npn \__jsonparse_parse_num_plus_minus:w #1 \q_stop {
+ \bool_if:NTF \l__jsonparse_num_plus_minus_seen_bool {
+ \tl_set:Nn \l__jsonparse_num_remainder_tl { }
+ \bool_set_false:N \l__jsonparse_num_bool
+ } {
+ \tl_if_empty:NTF \l__jsonparse_num_input_last_tl {
+ \tl_if_empty:NTF \l__jsonparse_num_input_last_tl {
+ \str_if_eq:enT { \tl_head:n {#1} } { + } {
+ \tl_set:Nn \l__jsonparse_num_remainder_tl { }
+ \bool_set_false:N \l__jsonparse_num_bool
+ \tl_set:Nn \l__jsonparse_num_remainder_tl { }
+ \bool_set_false:N \l__jsonparse_num_bool
+ }
+ } {
+ \bool_lazy_any:nT {
+ { \str_if_eq_p:Vn \l__jsonparse_num_input_last_tl { + } }
+ { \str_if_eq_p:Vn \l__jsonparse_num_input_last_tl { - } }
+ { \str_if_eq_p:Vn \l__jsonparse_num_input_last_tl { . } }
+ { \str_if_eq_p:Vn \l__jsonparse_num_input_last_tl { e } }
+ { \str_if_eq_p:Vn \l__jsonparse_num_input_last_tl { E } }
+ { \str_if_eq_p:Vn \l__jsonparse_num_input_last_tl { + } }
+ { \str_if_eq_p:Vn \l__jsonparse_num_input_last_tl { - } }
+ { \str_if_eq_p:Vn \l__jsonparse_num_input_last_tl { . } }
+ { \str_if_eq_p:Vn \l__jsonparse_num_input_last_tl { e } }
+ { \str_if_eq_p:Vn \l__jsonparse_num_input_last_tl { E } }
+ } {
+ \tl_set:Nn \l__jsonparse_num_remainder_tl { }
+ \bool_set_false:N \l__jsonparse_num_bool
+ \tl_set:Nn \l__jsonparse_num_remainder_tl { }
+ \bool_set_false:N \l__jsonparse_num_bool
+ }
+ }
+ }
+ \bool_set_true:N \l__jsonparse_num_plus_minus_seen_bool
+ \tl_set:Ne \l__jsonparse_num_input_last_tl { \tl_head:n {#1} }
+ \tl_set:Ne \l__jsonparse_num_remainder_tl { \tl_tail:n {#1} }
+ \__jsonparse_parse_num:n { \l__jsonparse_num_remainder_tl }
+ \bool_set_true:N \l__jsonparse_num_plus_minus_seen_bool
+ \tl_set:Ne \l__jsonparse_num_input_last_tl { \tl_head:n {#1} }
+ \tl_set:Ne \l__jsonparse_num_remainder_tl { \tl_tail:n {#1} }
+ \__jsonparse_parse_num:n { \l__jsonparse_num_remainder_tl }
+}
+
+\cs_new:Npn \__jsonparse_parse_num_fraction:w #1 \q_stop {
+ \bool_if:NTF \l__jsonparse_num_fraction_seen_bool {
+ \tl_set:Nn \l__jsonparse_num_remainder_tl { }
+ \bool_set_false:N \l__jsonparse_num_bool
+\cs_new:Npn \__jsonparse_parse_num_fraction:w #1 \q_stop {
+ \bool_if:NTF \l__jsonparse_num_fraction_seen_bool {
+ \tl_set:Nn \l__jsonparse_num_remainder_tl { }
+ \bool_set_false:N \l__jsonparse_num_bool
+ } {
+ \tl_if_empty:NTF \l__jsonparse_num_input_last_tl {
+ \tl_set:Nn \l__jsonparse_num_remainder_tl { }
+ \bool_set_false:N \l__jsonparse_num_bool
+ \tl_if_empty:NTF \l__jsonparse_num_input_last_tl {
+ \tl_set:Nn \l__jsonparse_num_remainder_tl { }
+ \bool_set_false:N \l__jsonparse_num_bool
+ } {
+ \bool_lazy_any:nT {
+ { \str_if_eq_p:Vn \l__jsonparse_num_input_last_tl { + } }
+ { \str_if_eq_p:Vn \l__jsonparse_num_input_last_tl { - } }
+ { \str_if_eq_p:Vn \l__jsonparse_num_input_last_tl { . } }
+ { \str_if_eq_p:Vn \l__jsonparse_num_input_last_tl { e } }
+ { \str_if_eq_p:Vn \l__jsonparse_num_input_last_tl { E } }
+ { \str_if_eq_p:Vn \l__jsonparse_num_input_last_tl { + } }
+ { \str_if_eq_p:Vn \l__jsonparse_num_input_last_tl { - } }
+ { \str_if_eq_p:Vn \l__jsonparse_num_input_last_tl { . } }
+ { \str_if_eq_p:Vn \l__jsonparse_num_input_last_tl { e } }
+ { \str_if_eq_p:Vn \l__jsonparse_num_input_last_tl { E } }
+ } {
+ \tl_set:Nn \l__jsonparse_num_remainder_tl { }
+ \bool_set_false:N \l__jsonparse_num_bool
+ \tl_set:Nn \l__jsonparse_num_remainder_tl { }
+ \bool_set_false:N \l__jsonparse_num_bool
+ }
+ }
+ }
+ \bool_set_false:N \l__jsonparse_num_zero_seen_bool
+ \bool_set_true:N \l__jsonparse_num_plus_minus_seen_bool
+ \bool_set_true:N \l__jsonparse_num_fraction_seen_bool
+ \tl_set:Ne \l__jsonparse_num_input_last_tl { \tl_head:n {#1} }
+ \tl_set:Ne \l__jsonparse_num_remainder_tl { \tl_tail:n {#1} }
+ \__jsonparse_parse_num:n { \l__jsonparse_num_remainder_tl }
+ \bool_set_false:N \l__jsonparse_num_zero_seen_bool
+ \bool_set_true:N \l__jsonparse_num_plus_minus_seen_bool
+ \bool_set_true:N \l__jsonparse_num_fraction_seen_bool
+ \tl_set:Ne \l__jsonparse_num_input_last_tl { \tl_head:n {#1} }
+ \tl_set:Ne \l__jsonparse_num_remainder_tl { \tl_tail:n {#1} }
+ \__jsonparse_parse_num:n { \l__jsonparse_num_remainder_tl }
+}
+
+\cs_new:Npn \__jsonparse_parse_num_exponent:w #1 \q_stop {
+ \bool_if:NTF \l__jsonparse_num_exponent_seen_bool {
+ \tl_set:Nn \l__jsonparse_num_remainder_tl { }
+ \bool_set_false:N \l__jsonparse_num_bool
+\cs_new:Npn \__jsonparse_parse_num_exponent:w #1 \q_stop {
+ \bool_if:NTF \l__jsonparse_num_exponent_seen_bool {
+ \tl_set:Nn \l__jsonparse_num_remainder_tl { }
+ \bool_set_false:N \l__jsonparse_num_bool
+ } {
+ \tl_if_empty:NTF \l__jsonparse_num_input_last_tl {
+ \tl_set:Nn \l__jsonparse_num_remainder_tl { }
+ \bool_set_false:N \l__jsonparse_num_bool
+ \tl_if_empty:NTF \l__jsonparse_num_input_last_tl {
+ \tl_set:Nn \l__jsonparse_num_remainder_tl { }
+ \bool_set_false:N \l__jsonparse_num_bool
+ } {
+ \bool_lazy_any:nT {
+ { \str_if_eq_p:Vn \l__jsonparse_num_input_last_tl { + } }
+ { \str_if_eq_p:Vn \l__jsonparse_num_input_last_tl { - } }
+ { \str_if_eq_p:Vn \l__jsonparse_num_input_last_tl { . } }
+ { \str_if_eq_p:Vn \l__jsonparse_num_input_last_tl { e } }
+ { \str_if_eq_p:Vn \l__jsonparse_num_input_last_tl { E } }
+ { \str_if_eq_p:Vn \l__jsonparse_num_input_last_tl { + } }
+ { \str_if_eq_p:Vn \l__jsonparse_num_input_last_tl { - } }
+ { \str_if_eq_p:Vn \l__jsonparse_num_input_last_tl { . } }
+ { \str_if_eq_p:Vn \l__jsonparse_num_input_last_tl { e } }
+ { \str_if_eq_p:Vn \l__jsonparse_num_input_last_tl { E } }
+ } {
+ \tl_set:Nn \l__jsonparse_num_remainder_tl { }
+ \bool_set_false:N \l__jsonparse_num_bool
+ \tl_set:Nn \l__jsonparse_num_remainder_tl { }
+ \bool_set_false:N \l__jsonparse_num_bool
+ }
+ }
+ }
+ \bool_set_false:N \l__jsonparse_num_zero_seen_bool
+ \bool_set_false:N \l__jsonparse_num_plus_minus_seen_bool
+ \bool_set_true:N \l__jsonparse_num_fraction_seen_bool
+ \bool_set_true:N \l__jsonparse_num_exponent_seen_bool
+ \tl_set:Ne \l__jsonparse_num_input_last_tl { \tl_head:n {#1} }
+ \tl_set:Ne \l__jsonparse_num_remainder_tl { \tl_tail:n {#1} }
+ \__jsonparse_parse_num:n { \l__jsonparse_num_remainder_tl }
+ \bool_set_false:N \l__jsonparse_num_zero_seen_bool
+ \bool_set_false:N \l__jsonparse_num_plus_minus_seen_bool
+ \bool_set_true:N \l__jsonparse_num_fraction_seen_bool
+ \bool_set_true:N \l__jsonparse_num_exponent_seen_bool
+ \tl_set:Ne \l__jsonparse_num_input_last_tl { \tl_head:n {#1} }
+ \tl_set:Ne \l__jsonparse_num_remainder_tl { \tl_tail:n {#1} }
+ \__jsonparse_parse_num:n { \l__jsonparse_num_remainder_tl }
+}
+
+\cs_new:Npn \__jsonparse_parse_num_digit:w #1 \q_stop {
+\cs_new:Npn \__jsonparse_parse_num_digit:w #1 \q_stop {
+ \bool_lazy_any:nTF {
+ { \tl_if_empty_p:N \l__jsonparse_num_input_last_tl }
+ { \tl_if_empty_p:N \l__jsonparse_num_input_last_tl }
+ { \bool_lazy_and_p:nn
+ { \str_if_eq_p:Vn \l__jsonparse_num_input_last_tl { - } }
+ { \bool_not_p:n { \l__jsonparse_num_exponent_seen_bool } }
+ { \str_if_eq_p:Vn \l__jsonparse_num_input_last_tl { - } }
+ { \bool_not_p:n { \l__jsonparse_num_exponent_seen_bool } }
+ }
+ } {
+ \str_if_eq:enT { \tl_head:n {#1} } { 0 } {
+ \bool_set_true:N \l__jsonparse_num_zero_seen_bool
+ \bool_set_true:N \l__jsonparse_num_zero_seen_bool
+ }
+ } {
+ \bool_if:NT \l__jsonparse_num_zero_seen_bool {
+ \tl_set:Nn \l__jsonparse_num_remainder_tl { }
+ \bool_set_false:N \l__jsonparse_num_bool
+ \bool_if:NT \l__jsonparse_num_zero_seen_bool {
+ \tl_set:Nn \l__jsonparse_num_remainder_tl { }
+ \bool_set_false:N \l__jsonparse_num_bool
+ }
+ }
+ \tl_set:Ne \l__jsonparse_num_input_last_tl { \tl_head:n {#1} }
+ \tl_set:Ne \l__jsonparse_num_remainder_tl { \tl_tail:n {#1} }
+ \__jsonparse_parse_num:n { \l__jsonparse_num_remainder_tl }
+ \tl_set:Ne \l__jsonparse_num_input_last_tl { \tl_head:n {#1} }
+ \tl_set:Ne \l__jsonparse_num_remainder_tl { \tl_tail:n {#1} }
+ \__jsonparse_parse_num:n { \l__jsonparse_num_remainder_tl }
+}
+
+\cs_new:Npn \__jsonparse_parse_num_other:w #1 \q_stop {
+ \tl_set:Nn \l__jsonparse_num_remainder_tl { }
+ \bool_set_false:N \l__jsonparse_num_bool
+\cs_new:Npn \__jsonparse_parse_num_other:w #1 \q_stop {
+ \tl_set:Nn \l__jsonparse_num_remainder_tl { }
+ \bool_set_false:N \l__jsonparse_num_bool
+}
+
+% ===
+
\cs_new_protected:Npn \jsonparse_parse_to_prop:Nn #1#2 {
\bool_if:NT \l__jsonparse_debug_mode_bool {
\msg_log:nne { jsonparse } { debug-info } {
@@ -491,11 +814,24 @@
\cs_new:Npn \__jsonparse_parse_other_aux:w #1 , #2 \q_stop {
\tl_set:Ne \l__jsonparse_temp_tl { \tl_trim_spaces:n {#1} }
\cs_if_exist_use:cF { __jsonparse_parse_ \str_casefold:o { \l__jsonparse_temp_tl } : } {
- \fp_if_nan:nTF {#1} {
- % nan
- \msg_error:nnoo { jsonparse } { parsing-error }
- { \l__jsonparse_key_tl } {#1}
- } {
+ \bool_if:NTF \l__jsonparse_check_num_bool {
+ \jsonparse_if_num:nTF {#1} {
+ \tl_set:Nn \l__jsonparse_val_tl {#1}
+ \prop_gput:Nee \g_jsonparse_entries_prop
+ { \l__jsonparse_key_tl } { \l__jsonparse_val_tl }
+ % number
+ \bool_if:NT \l__jsonparse_debug_mode_bool {
+ \msg_log:nne { jsonparse } { debug-info } {
+ (key) ~ \str_use:N \l__jsonparse_key_tl : \iow_newline:
+ \iow_char:N \ \iow_char:N \ (num) ~ \str_use:N \l__jsonparse_val_tl
+ }
+ }
+ } {
+ % not a valid JSON fp
+ \msg_error:nnoo { jsonparse } { parsing-error }
+ { \l__jsonparse_key_tl } {#1}
+ }
+ } {
\tl_set:Nn \l__jsonparse_val_tl {#1}
\prop_gput:Nee \g_jsonparse_entries_prop
{ \l__jsonparse_key_tl } { \l__jsonparse_val_tl }
@@ -652,6 +988,7 @@
\cs_set:Npn \t { \exp_not:N \t }
\cs_set:Npn \u { \exp_not:N \u }
\__json_nested_construct_cs:Noo \x \c_left_brace_str \c_right_brace_str
+ \tl_set:Nn \obeyedline { ~ }
\tl_gset_rescan:Nne \g__jsonparse_json_tl { \cctab_select:N \c__jsonparse_json_escape_cctab } {#3}
\exp_args:NNe \jsonparse_parse_to_prop:Nn #2 { \g__jsonparse_json_tl }
\group_end:
diff --git a/macros/latex/contrib/jupynotex/README.md b/macros/latex/contrib/jupynotex/README.md
index d19b75542c..1a26ad22e4 100644
--- a/macros/latex/contrib/jupynotex/README.md
+++ b/macros/latex/contrib/jupynotex/README.md
@@ -13,15 +13,15 @@ It will convert the Jupyter Notebook format to proper LaTeX so it gets included
All you need to do is include the `jupynotex.py` and `jupynotex.sty` files in your LaTeX project, and use the package from your any of your `.tex` files:
- \usepackage{jupynotex}
+ `\usepackage{jupynotex}`
After that, you can include a whole Jupyter Notebook in your file just specifying it's file name:
- \jupynotex{file_name_for_your_notebook.ipynb}
+ `\jupynotex{file_name_for_your_notebook.ipynb}`
If you do not want to include it completely, you can optionally specify which cells:
- \jupynotex[<which cells>]{sample.ipynb}
+ `\jupynotex[<which cells>]{sample.ipynb}`
The cells specification can be numbers separated by comma, or ranges using dashes (defaulting to first and last if any side is not included).
@@ -48,18 +48,69 @@ Examples:
`\jupynotex[3,12-]{somenote.ipynb}`
+## Configurations available
+
+The whole package can be configured when included in your project:
+
+ \usepackage[OPTIONS]{jupynotex}
+
+Global options available:
+
+- `output-text-limit=N` where N is a number; it will wrap all outputs that exceed that quantity of columns
+
+Also, each cell(s) can be configured when included in your .tex files:
+
+ `\jupynotex[3, OPTIONS]{yournotebook.ipynb}`
+
+Cell options available:
+
+- `output-image-size=SIZE` where SIZE is a valid .tex size (a number with an unit, e.g. `70mm`); it will set any image in the output of those cells to the indicated size
+
+
## Full Example
Check the `example` directory in this project.
-There you will find an example `notebook.ipynb`, an `example.tex` file that includes cells from that notebook in different ways, and a `build` script.
+There you will find different notebook examples and `.tex` files using them. Also there's a build script to easily run on any of the examples, like:
+
+ ./build cell_ranges.tex
Play with it. Enjoy.
+# Supported cell types
+
+Jupyter has several types of cells, `jupynotex` supports most of those. If you find one that is not supported, please open an issue with an example.
+
+In any case, only the "code" cells are included when processing a notebook (no markdown titles, for example, to make it easy for the developer to find the numbers of cells to include).
+
+Supported cell types in the output:
+
+- `execute_result`: this may have multiple types of information inside; if an image is present, it will be included, otherwise if a latex output is present it will included (directly, so the latex is really parsed later by the LaTeX system, else the plain text will be included (verbatim).
+
+- `stream`: the different text lines will be included (verbatim)
+ result.extend(_verbatimize(x.rstrip() for x in item["text"]))
+
+- `display_data`: the image will be included
+
+- `error`: in this case the Traceback will be parsed, sanitized and included in the output keeping its structure (verbatim)
+
+Two type of images are currently supported (for the case in `execute_result` or `display_data` cell type:
+
+- PNG: used directly
+
+- SVG: converted to PDF (need to have `inkscape` present in the system) and included that
+
+
# Dependencies
-You need Python 3 in your system, and the [tcolorbox](https://ctan.org/pkg/tcolorbox) module in your LaTeX toolbox.
+You need Python 3 in your system, and the following modules in your LaTeX toolbox:
+
+- [tcolorbox](https://ctan.org/pkg/tcolorbox)
+
+- [minted](https://www.ctan.org/pkg/minted)
+
+To support SVG images in the notebook, [inkscape](https://inkscape.org/) needs to be installed and in the system's PATH.
# Feedback & Development
diff --git a/macros/latex/contrib/jupynotex/example/build b/macros/latex/contrib/jupynotex/example/build
deleted file mode 100755
index 51598c0450..0000000000
--- a/macros/latex/contrib/jupynotex/example/build
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-
-ln -s ../jupynotex.py .
-ln -s ../jupynotex.sty .
-xelatex -shell-escape example.tex
diff --git a/macros/latex/contrib/jupynotex/example/example.tex b/macros/latex/contrib/jupynotex/example/example.tex
deleted file mode 100644
index 5251586b63..0000000000
--- a/macros/latex/contrib/jupynotex/example/example.tex
+++ /dev/null
@@ -1,27 +0,0 @@
-\documentclass{article}
-
-\usepackage{jupynotex}
-
-\begin{document}
-
-One cell:
-
-\jupynotex[1]{notebook.ipynb}
-
-
-A range of cells:
-
-\jupynotex[4-6]{notebook.ipynb}
-
-
-Some specific cells:
-
-\jupynotex[12,17]{notebook.ipynb}
-
-
-The whole notebook:
-
-\jupynotex{notebook.ipynb}
-
-
-\end{document}
diff --git a/macros/latex/contrib/jupynotex/example/notebook.ipynb b/macros/latex/contrib/jupynotex/example/notebook.ipynb
deleted file mode 100644
index a423e9a11f..0000000000
--- a/macros/latex/contrib/jupynotex/example/notebook.ipynb
+++ /dev/null
@@ -1,593 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "code",
- "execution_count": 1,
- "metadata": {
- "scrolled": true
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Non alphanums {'>', '\\t', '[', '\\r', '\\x13', '\\x1d', '<', '^', '\\x04', '\\x08', '\\x17', '\\x1b', '\\\\', '\\x19', '`', '\\x1f', '$', '\\x0b', '\\x14', '\\x12', '\\x18', ')', '=', '?', ' ', \"'\", '\\x1c', '|', ';', '/', '\\x1e', '\\n', '\\x07', '\\x10', '\\x03', '\\x02', '#', '\\x0c', '@', '\\x16', '_', '}', '.', '-', '(', '!', '+', '\\x06', ']', '{', ':', '\\x01', '\\x11', '\\x0f', '\\x05', ',', '~', '\\x15', '\\x00', '\"', '%', '\\x0e', '*', '&', '\\x1a'}\n",
- "Separators b'([\\\\>\\\\\\t\\\\[\\\\\\r\\\\\\x13\\\\\\x1d\\\\<\\\\^\\\\\\x04\\\\\\x08\\\\\\x17\\\\\\x1b\\\\\\\\\\\\\\x19\\\\`\\\\\\x1f\\\\$\\\\\\x0b\\\\\\x14\\\\\\x12\\\\\\x18\\\\)\\\\=\\\\?\\\\ \\\\\\'\\\\\\x1c\\\\|\\\\;\\\\/\\\\\\x1e\\\\\\n\\\\\\x07\\\\\\x10\\\\\\x03\\\\\\x02\\\\#\\\\\\x0c\\\\@\\\\\\x16\\\\_\\\\}\\\\.\\\\-\\\\(\\\\!\\\\+\\\\\\x06\\\\]\\\\{\\\\:\\\\\\x01\\\\\\x11\\\\\\x0f\\\\\\x05\\\\,\\\\~\\\\\\x15\\\\\\x00\\\\\"\\\\%\\\\\\x0e\\\\*\\\\&\\\\\\x1a])'\n"
- ]
- }
- ],
- "source": [
- "import string\n",
- "\n",
- "non_alphanums = set(chr(x) for x in range(127)) - set(string.ascii_letters) - set(string.digits)\n",
- "print(\"Non alphanums\", non_alphanums)\n",
- "separators = '([' + ''.join('\\\\' + x for x in non_alphanums) + '])'\n",
- "separators = separators.encode('ascii')\n",
- "print(\"Separators\", separators)\n"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 2,
- "metadata": {},
- "outputs": [
- {
- "data": {
- "text/plain": [
- "[b'dlg',\n",
- " b'=',\n",
- " b'Resource',\n",
- " b'.',\n",
- " b'loadfromresfile',\n",
- " b'(',\n",
- " b'filename',\n",
- " b',',\n",
- " b'win',\n",
- " b',',\n",
- " b'QuoteDialog',\n",
- " b'.',\n",
- " b'MyQuoteDialog',\n",
- " b',',\n",
- " b\"'\",\n",
- " b'QuoteDialog',\n",
- " b\"'\",\n",
- " b',',\n",
- " b'win',\n",
- " b')']"
- ]
- },
- "execution_count": 2,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
- "source": [
- "import re\n",
- "program_line = b\"\"\"dlg = Resource.loadfromresfile(filename, win, QuoteDialog.MyQuoteDialog, 'QuoteDialog', win)\"\"\"\n",
- "tokens = [t for x in re.split(separators, program_line) if (t := x.strip())]\n",
- "tokens"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 3,
- "metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Checking base dir: HTML document\n",
- "Checking base dir: C source\n",
- "Checking base dir: C++ source\n",
- "Checking base dir: PHP script\n",
- "Checking base dir: ReStructuredText file\n",
- "Checking base dir: Python script\n",
- "Checking base dir: Ruby script\n",
- "Checking base dir: Java source\n",
- "Checking base dir: Objective-C source\n",
- "Checking base dir: Perl5 module source\n",
- "Checking base dir: XML 1.0 document\n"
- ]
- }
- ],
- "source": [
- "import os\n",
- "from collections import Counter\n",
- "\n",
- "DUMP_BASE = '/home/facundo/devel/ml/dump'\n",
- "\n",
- "# directories with 1000 files of each code type, excluding \"just text\" (ascii, utf8, etc)\n",
- "CODE_TYPES = [\n",
- " 'HTML document',\n",
- " 'C source',\n",
- " 'C++ source',\n",
- " 'PHP script',\n",
- " 'ReStructuredText file',\n",
- " 'Python script',\n",
- " 'Ruby script',\n",
- " 'Java source',\n",
- " 'Objective-C source',\n",
- " 'Perl5 module source',\n",
- " 'XML 1.0 document',\n",
- "]\n",
- "\n",
- "# let's collect ALL tokens present in all the program files\n",
- "tokens = Counter()\n",
- "for basedir in CODE_TYPES:\n",
- " print(\"Checking base dir:\", basedir)\n",
- " for dirpath, dirnames, filenames in os.walk(os.path.join(DUMP_BASE, basedir)):\n",
- " for fname in filenames:\n",
- " fpath = os.path.join(dirpath, fname)\n",
- " with open(fpath, 'rb') as fh:\n",
- " tokens.update(t for x in re.split(separators, fh.read()) if (t := x.strip()))"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 4,
- "metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Total different tokens 213400\n",
- " 870525 b'.'\n",
- " 756849 b'_'\n",
- " 730609 b'('\n",
- " 717433 b'='\n",
- " 699725 b')'\n",
- " 688556 b'/'\n",
- " 661461 b'\"'\n",
- " 640989 b','\n",
- " 625121 b'-'\n",
- " 594091 b'>'\n"
- ]
- }
- ],
- "source": [
- "different_tokens = len(tokens)\n",
- "print(\"Total different tokens\", different_tokens)\n",
- "for name, quant in tokens.most_common(10):\n",
- " print(\"{:8d} {}\".format(quant, name))"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 5,
- "metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Total tokens found: 20101050\n",
- "Total representative: 3324\n",
- "Last ten...\n",
- " 289 b'enables'\n",
- " 289 b'smaller'\n",
- " 289 b'Creates'\n",
- " 289 b'cross'\n",
- " 289 b'GLFW'\n",
- " 289 b'Os'\n",
- " 289 b'usb'\n",
- " 288 b'stylesheets'\n",
- " 288 b'ad'\n",
- " 288 b'WIDTH'\n"
- ]
- }
- ],
- "source": [
- "import numpy as np\n",
- "\n",
- "total_tokens = sum(tokens.values())\n",
- "print(\"Total tokens found:\", total_tokens)\n",
- "\n",
- "most = total_tokens * 0.9\n",
- "tot = 0\n",
- "representative_data = []\n",
- "for name, quant in tokens.most_common():\n",
- " representative_data.append((name, quant))\n",
- " tot += quant\n",
- " if tot > most:\n",
- " break\n",
- "\n",
- "print(\"Total representative:\", len(representative_data))\n",
- "print(\"Last ten...\")\n",
- "for name, quant in representative_data[-10:]:\n",
- " print(\"{:8d} {}\".format(quant, name))"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 6,
- "metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Collecting data from base dir HTML document\n",
- "Collecting data from base dir C source\n",
- "Collecting data from base dir C++ source\n",
- "Collecting data from base dir PHP script\n",
- "Collecting data from base dir ReStructuredText file\n",
- "Collecting data from base dir Python script\n",
- "Collecting data from base dir Ruby script\n",
- "Collecting data from base dir Java source\n",
- "Collecting data from base dir Objective-C source\n",
- "Collecting data from base dir Perl5 module source\n",
- "Collecting data from base dir XML 1.0 document\n",
- "Src data samples: 11000\n"
- ]
- }
- ],
- "source": [
- "import random\n",
- "\n",
- "# real \"ML data\": a list of (code_type, features) (one pair for each file)\n",
- "# code_type: the *position* of the code type corresponding to the file (needs to be an int)\n",
- "# features: a list of values, each value corresponds to how many of the tokens of that position the file has\n",
- "\n",
- "representative_tokens = [name for name, _ in representative_data]\n",
- "\n",
- "all_src_data = []\n",
- "for idx, basedir in enumerate(CODE_TYPES):\n",
- " print(\"Collecting data from base dir\", basedir)\n",
- " for dirpath, dirnames, filenames in os.walk(os.path.join(DUMP_BASE, basedir)):\n",
- " for fname in filenames:\n",
- " fpath = os.path.join(dirpath, fname)\n",
- " with open(fpath, 'rb') as fh:\n",
- " fcontent = fh.read()\n",
- " \n",
- " file_tokens = Counter(t for x in re.split(separators, fcontent) if (t := x.strip()))\n",
- " token_quantities = [file_tokens.get(t, 0) for t in representative_tokens]\n",
- "\n",
- " all_src_data.append((idx, token_quantities))\n",
- "\n",
- "print(\"Src data samples:\", len(all_src_data))\n",
- "\n",
- "# shuffle, as currently is too much \"per directory\"\n",
- "random.shuffle(all_src_data)"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 7,
- "metadata": {},
- "outputs": [],
- "source": [
- "import tensorflow as tf\n",
- "from tensorflow.keras import Model, layers\n",
- "import numpy as np\n",
- "\n",
- "# representation of our model\n",
- "num_classes = len(CODE_TYPES)\n",
- "num_features = len(representative_tokens)\n",
- "\n",
- "# 1st and 2nd layer number of neurons (these numbers are just chamuyo)\n",
- "n_hidden_1 = 128 \n",
- "n_hidden_2 = 256\n",
- "\n",
- "# training parameters (more chamuyo)\n",
- "learning_rate = 0.1\n",
- "\n",
- "batch_size = 256\n"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 8,
- "metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example code types: (2, 0, 4, 4, 5)\n",
- "Example token quants: [246, 786, 246, 61, 246] [32, 32, 5, 22, 5]\n",
- "Token quants shape: (11000, 3324)\n",
- "Example normalized quants: [0.3129771 1. 0.3129771 0.07760815 0.3129771 ] [0.9411765 0.9411765 0.14705883 0.64705884 0.14705883]\n"
- ]
- }
- ],
- "source": [
- "# separate the source data and into two pairing lists\n",
- "code_types, token_quantities = zip(*all_src_data)\n",
- "print(\"Example code types:\", code_types[:5])\n",
- "print(\"Example token quants:\", token_quantities[0][:5], token_quantities[117][:5])\n",
- "\n",
- "# convert features to float\n",
- "float_quantities = np.array(token_quantities, np.float32)\n",
- "print(\"Token quants shape:\", float_quantities.shape)\n",
- "\n",
- "# normalize EACH ONE to [0, 1]\n",
- "for quants in float_quantities:\n",
- " quants /= max(quants)\n",
- "print(\"Example normalized quants:\", float_quantities[0][:5], float_quantities[117][:5])"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 9,
- "metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Real training set: 89.70%\n"
- ]
- }
- ],
- "source": [
- "# let's prepare the teching sets, input and output for training first (90% of cases) and\n",
- "# then testing what's learned (the remaining 10%); \n",
- "input_training = []\n",
- "output_training = []\n",
- "input_testing = []\n",
- "output_testing = []\n",
- "for token_distribution, code_type in zip(float_quantities, code_types):\n",
- " if random.random() < .1:\n",
- " input_testing.append(token_distribution)\n",
- " output_testing.append(code_type)\n",
- " else:\n",
- " input_training.append(token_distribution)\n",
- " output_training.append(code_type)\n",
- "print(\"Real training set: {:.2f}%\".format(100 * len(input_training) / len(float_quantities))) "
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 10,
- "metadata": {},
- "outputs": [],
- "source": [
- "import tensorflow as tf\n",
- "from tensorflow.keras import Model\n",
- "\n",
- "class NeuralNet(Model):\n",
- " \"\"\"Chamuyo al cuadrado.\"\"\"\n",
- " \n",
- " def __init__(self):\n",
- " super(NeuralNet, self).__init__()\n",
- " self.fc1 = layers.Dense(n_hidden_1, activation=tf.nn.sigmoid) # se puede cambiar a relu\n",
- " self.fc2 = layers.Dense(n_hidden_2, activation=tf.nn.sigmoid) # se puede cambiar a relu\n",
- " self.out = layers.Dense(num_classes)\n",
- "\n",
- " def call(self, x, is_training=False):\n",
- " x = self.fc1(x)\n",
- " x = self.fc2(x)\n",
- " x = self.out(x)\n",
- " if not is_training:\n",
- " # tf cross entropy expect logits without softmax, so only\n",
- " # apply softmax when not training.\n",
- " x = tf.nn.softmax(x)\n",
- " return x\n",
- "\n",
- "neural_net = NeuralNet()"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 11,
- "metadata": {},
- "outputs": [],
- "source": [
- "# Note that this will apply 'softmax' to the logits.\n",
- "def cross_entropy_loss(x, y):\n",
- " # Convert labels to int 64 for tf cross-entropy function.\n",
- " y = tf.cast(y, tf.int64)\n",
- " # Apply softmax to logits and compute cross-entropy.\n",
- " loss = tf.nn.sparse_softmax_cross_entropy_with_logits(labels=y, logits=x)\n",
- " # Average loss across the batch.\n",
- " return tf.reduce_mean(loss)"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 12,
- "metadata": {},
- "outputs": [],
- "source": [
- "# Stochastic gradient descent optimizer.\n",
- "optimizer = tf.optimizers.SGD(learning_rate)\n",
- "\n",
- "# Optimización. \n",
- "def run_optimization(x, y):\n",
- " # Funciones para calcular el gradiente\n",
- " with tf.GradientTape() as g:\n",
- " # Algoritmo de forward\n",
- " pred = neural_net(x, is_training=True)\n",
- " # Computa la función de costo o pérdida utilizando entropía cruzada\n",
- " loss = cross_entropy_loss(pred, y)\n",
- " \n",
- " # Actualiza las variables de entrenamiento.\n",
- " trainable_variables = neural_net.trainable_variables\n",
- "\n",
- " # Computa los gradientes\n",
- " gradients = g.gradient(loss, trainable_variables)\n",
- " \n",
- " # Actualiza los nuevos parámetros W (pesos) y b (bias).\n",
- " optimizer.apply_gradients(zip(gradients, trainable_variables))"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 13,
- "metadata": {},
- "outputs": [],
- "source": [
- "# Accuracy metric.\n",
- "def accuracy(y_pred, y_true):\n",
- " # Predicted class is the index of highest score in prediction vector (i.e. argmax).\n",
- " correct_prediction = tf.equal(tf.argmax(y_pred, 1), tf.cast(y_true, tf.int64))\n",
- " return tf.reduce_mean(tf.cast(correct_prediction, tf.float32), axis=-1)"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 14,
- "metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Step 100: loss=2.379924, accuracy=0.125000\n",
- "Step 200: loss=2.372284, accuracy=0.128906\n",
- "Step 300: loss=2.366430, accuracy=0.140625\n",
- "Step 400: loss=2.360768, accuracy=0.121094\n",
- "Step 500: loss=2.347394, accuracy=0.109375\n",
- "Step 600: loss=2.349795, accuracy=0.199219\n",
- "Step 700: loss=2.312950, accuracy=0.218750\n",
- "Step 800: loss=2.284508, accuracy=0.289062\n",
- "Step 900: loss=2.173395, accuracy=0.335938\n",
- "Step 1000: loss=2.115966, accuracy=0.300781\n",
- "Step 1100: loss=1.977837, accuracy=0.441406\n",
- "Step 1200: loss=1.860783, accuracy=0.425781\n",
- "Step 1300: loss=1.866206, accuracy=0.425781\n",
- "Step 1400: loss=1.773057, accuracy=0.402344\n",
- "Step 1500: loss=1.736271, accuracy=0.546875\n",
- "Step 1600: loss=1.626320, accuracy=0.578125\n",
- "Step 1700: loss=1.537970, accuracy=0.539062\n",
- "Step 1800: loss=1.369012, accuracy=0.609375\n",
- "Step 1900: loss=1.286771, accuracy=0.625000\n",
- "Step 2000: loss=1.270916, accuracy=0.640625\n"
- ]
- }
- ],
- "source": [
- "train_data = tf.data.Dataset.from_tensor_slices((input_training, output_training))\n",
- "\n",
- "# NOTE: this doesn't only selectes, it completely transform the structures\n",
- "# from <TensorSliceDataset shapes: ((3324,), ()), types: (tf.float32, tf.int32)>\n",
- "# to <PrefetchDataset shapes: ((None, 3324), (None,)), types: (tf.float32, tf.int32)>\n",
- "train_data = train_data.repeat().shuffle(5000).batch(batch_size).prefetch(1)\n",
- "\n",
- "display_step = 100\n",
- "training_steps = 2000\n",
- "\n",
- "# Run training for the given number of steps.\n",
- "for step, (input_batch, output_batch) in enumerate(train_data.take(training_steps), 1):\n",
- " # Run the optimization to update W and b values.\n",
- " run_optimization(input_batch, output_batch)\n",
- " \n",
- " if step % display_step == 0:\n",
- " pred = neural_net(input_batch, is_training=True)\n",
- " loss = cross_entropy_loss(pred, output_batch)\n",
- " acc = accuracy(pred, output_batch)\n",
- " print(\"Step {}: loss={:f}, accuracy={:f}\".format(step, loss, acc))"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 15,
- "metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Test Accuracy: 0.578994\n"
- ]
- }
- ],
- "source": [
- "# Test model on validation set\n",
- "input_testing = np.array(input_testing)\n",
- "pred = neural_net(input_testing, is_training=False)\n",
- "print(\"Test Accuracy: {:f}\".format(accuracy(pred, output_testing)))"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 18,
- "metadata": {},
- "outputs": [],
- "source": [
- "# If we consider the \"more probable\" prediction on each item, how well it goes?\n",
- "all_guesses = neural_net(input_testing, is_training=False)\n",
- "guesses_ok = [0] * len(CODE_TYPES)\n",
- "guesses_bad = [0] * len(CODE_TYPES)\n",
- "\n",
- "for guess, real in zip(all_guesses, output_testing):\n",
- " # guess is an array of len(CODE_TYPES) with a float in each position showing\n",
- " # which one is the most probable to be real, so we need to get position \n",
- " # for the max one and check if it matches with the real real :)\n",
- " position_for_max = np.where(guess == np.amax(guess))[0][0]\n",
- " if position_for_max == real:\n",
- " guesses_ok[real] += 1\n",
- " else:\n",
- " guesses_bad[real] += 1"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 19,
- "metadata": {},
- "outputs": [
- {
- "data": {
- "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAFmCAYAAACC84ZkAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/d3fzzAAAACXBIWXMAAAsTAAALEwEAmpwYAABBB0lEQVR4nO3debyc4/3/8dc7mwSJWPJNEZHUEiUbkqC2iLWqltb6pYKiliLftrZuWt+26LdVxY9GLaGUoLbqYkkT+5KECEFsDUIQscUSJD6/P65r5txnMnPOnGSue87yeT4e8zhz3/fM/bnuOTNzzbXLzHDOOecAOtU7Ac4551oPzxScc84VeabgnHOuyDMF55xzRZ4pOOecK/JMwTnnXJFnCq4RSQdLurPe6XCBpG0lzc4p1hxJOyU6dw9JD0jarYnHjJY0N7M9S9LoFOlxlXmm0M5JmiLpXUkrVPN4M7vGzHZZjngTJP1yWZ/f0UkySesXts3sPjMbVM801ch44Hdm9q9qn2Bmm5jZlHRJcuV4ptCOSRoAbAsYsGcO8TqnjtFeSOpS7zTkycwONbOb6p0O1zzPFNq3Q4GHgQnA2OwBSetIuknSfEkLJF0Y9x8m6f7M4zaSdJekdyTNlrR/5tgESRdL+oekj4DvAAcDp0j6UNLf4uO+Ekss78UqgT0z59hd0tOSFkp6TdIPy12IpE6SfiLpZUlvSbpK0ioVHjta0lxJP4iPnSfp8MzxVeLz58fz/URSVZ+FeB1nSXpU0geSbpW0Wub4nvEa34uP/Urm2BxJp0qaCXxUmjFIujfefSK+fgeUqVKZI+n0+Jq9K+kKSd0zx4+S9EL8f90maa0mruXb8foXSPpxybFOkk6T9GI8fn32Osucay9JM+Jr8mKhmkjSWjEd78R0HZV5To/4HnpX0tPAyJJzFquz4mOvjI99RtIpJa9LxfeYayEz81s7vQEvAMcBmwOfA33j/s7AE8DvgZWA7sA28dhhwP3x/krAq8DhQBdgU+BtYON4fALwPrA14QdG97jvl5k0dI3p+BHQDRgDLAQGxePzgG3j/VWBzSpcyxHxPF8GVgZuAv5c4bGjgcXAmTH+7sDHwKrx+FXArUBPYADwHPCdKl/TKcBrwOD4+vwVuDoe2xD4CNg5xj0lprlbPD4HmAGsA/SocH4D1i+5lrmZ7TnAU/EcqwEPFF7v+Nq+DWwGrABcANxbIc7GwIfAdvGx58bXbKd4/CTCD4p+8fh44NoK5xoV3wc7x/fB2sBG8di9wEXxvTEcmA+MicfOBu6L17FOvK7Sa90p89h74nukHzCz8FiaeY/5rYXfG/VOgN8S/WNhG0JGsEbcfhb4n3h/q/jh7FLmeYfRkCkcANxXcnw8cEa8PwG4quT4BBpnCtsCbwCdMvuuBX4e778CfBfo1cz1TAKOy2wPitdX7hpGA59kjwFvAVsSMsTPiBlbPPZdYEqVr+sU4OzM9sbxfJ2BnwLXZ451ImQgo+P2HOCIZs5fTaZwTGZ7d+DFeP8y4DeZYyvH12hAmTg/A67LbK8Ur6PwJfwMsGPm+JpNvN7jgd+X2b8OsATomdl3FjAh3n8J2C1z7Ogy17pT5rG7Zo4dSUOm0OR7zG8tu3n1Ufs1FrjTzN6O23+hoQppHeBlM1vczDnWBbaIRfL3JL1HqB76UuYxrzZzjrWAV83si8y+lwm/JgG+Rfhie1nSPZK2auI8L5ecowvQt8LjF5Rc38eEL8k1CL8sS8+1NtXLXvPL8XxrlKYxXvOrJedu7vValviFKqLS+B8CCyh/bWtlz2NmH8XHFqwL3Jz5vz9D+IIv93qvA7xYIcY7ZrawJL1rZ46XXkslpY99tfRYE+8x1wIdqrGro5DUA9gf6Czpjbh7BaC3pGGED1R/SV2ayRheBe4xs52beEzpNLul268D60jqlPnQ9idU2WBmU4G9JHUFvgdcT/iSKfU64YuqoD+huuPNJtJWztuEX7zrAk9nzvVaC86RTV//eL63YxqHFA5IUnxs9ty1mJa4NP7r8X6j10jSSsDqlL+2eUC2vWPF+NiCVwmlmgeqSM+rwHpl9r8OrCapZyZjyL7W8+K1zMocq2Qeodqo8D/LvgZNvsdcy3hJoX3am/CrbmNCPe5wwhfAfYTG50cJH7KzJa0kqbukrcuc53Zgw9gg2TXeRmYbT8t4k1DvX/AI4Vf6KfH5o4FvANdJ6qYwLmIVM/sc+AD4ovSE0bXA/0gaKGll4NfAxCpKO42Y2RJCxvMrST0lrQt8H7gaQo8thW6hA5o4zSGSNo5fpGcCN2bO+3VJO8ZM7gfAp8CDLUhi6etXzvGS+sWG3x8DE+P+a4HDJQ1X6IL8a+ARM5tT5hw3AntI2kZSt3gd2e+DPxJeo3UBJPWRtFeF9FwW4+4YG6jXlrSRmb1KuPaz4ntsKKEzwtXxedcDp0taVVI/4IQmrjn72LUJPyAKKr7Hmjifq6Te9Vd+q/0N+BehT3jp/v0Jda9dCL+kbiFUGbwNnB8fcxixTSFuDwL+TmiDWAD8Gxgej00g034Q921AaEx9D7gl7tuE0Ej4PuGX3j5xf7eY1ncJGcJUYoN3mbR3ItSDvxrTcjWx4bjMY0eTqZuO++bQUD+9anz+/Hi+nxHrown103OArhXOPYVQL/5oTPPfiO028fg+8Rrfj9e8Sbk0NPG/O4aQYb8X/1+NriWe4/QY4z3gSmDFkue/CLxDyNT7NRFrLKFNZwEhc8m+Rp0ImeVsQqPti8CvmzjXPoTG34WERt9d4/5+MR3vxHNk20NWJDT6vxev5+Qy11pIz0rAn+NjnwF+QmxLaeo95reW3xRfUOccIOknwHwzG1/h+BRCb6NLc01YQ/w5wJFmdnc94rcWko4FDjSz7eudlvbG2xScyzAzH43dCklak1Ct9hChNPoD4MK6Jqqd8kzBOdcWdCN0fR1IqEK6jjD+wdWYVx8555wr8t5Hzjnnitp89dEaa6xhAwYMqHcynHOuTZk+ffrbZtandH+bzxQGDBjAtGnT6p0M55xrUySVHUHu1UfOOeeKPFNwzjlX5JmCc865ojbfpuA6ls8//5y5c+eyaNGieiel3ejevTv9+vWja9eu9U6KawU8U3Btyty5c+nZsycDBgwgTELqloeZsWDBAubOncvAgQPrnRzXCnj1kWtTFi1axOqrr+4ZQo1IYvXVV/eSlytKmilIulxhjdynMvv+T9KzkmZKullS78yx0+M6rrMl7Zoyba7t8gyhtvz1dFmpSwoTgN1K9t0FDDazoYRFME4HkLQxcCBhCtzdgIskdU6cPueccxlJ2xTM7N7SxUrM7M7M5sPAvvH+XoQ1Yz8F/iPpBcKC4A+lTKNr2wac9veanm/O2V+v6nFvvPEG48aNY+rUqfTu3Zu+ffty3nnnseGGG9Y0PeVMmDCBXXbZhbXWWqv5BzvXQvVuaD6ChlWj1iZkEgVzqbDGqqSjCYt8079/Uyv4OVd7ZsY+++zD2LFjue66sLjXE088wZtvvtlsprB48WK6dOlScbsaEyZMYPDgwe0jU/j5KgnP/X66c7djdWtolvRjwhq717T0uWZ2iZmNMLMRffosNXWHc0lNnjyZrl27cswxxxT3DRs2jG222YaTTz6ZwYMHM2TIECZODL93pkyZwrbbbsuee+7JxhtvvNT2kiVLOPnkkxk5ciRDhw5l/PiG9X3OOecchgwZwrBhwzjttNO48cYbmTZtGgcffDDDhw/nk08+YdKkSWy66aYMGTKEI444gk8//TT318S1H3UpKUg6DNgD2NEa5u5+jcaLcfejZYupO5eLp556is0333yp/TfddBMzZszgiSee4O2332bkyJFst912ADz22GM89dRTDBw4kClTpjTavuSSS1hllVWYOnUqn376KVtvvTW77LILzz77LLfeeiuPPPIIK664Iu+88w6rrbYaF154Ib/97W8ZMWIEixYt4rDDDmPSpElsuOGGHHrooVx88cWMGzcu51fFtRe5lxQk7QacAuxpZh9nDt0GHChpBUkDCasrPZp3+pxbVvfffz8HHXQQnTt3pm/fvmy//fZMnToVgFGjRjUaB5DdvvPOO7nqqqsYPnw4W2yxBQsWLOD555/n7rvv5vDDD2fFFVcEYLXVVlsq5uzZsxk4cGCx2mrs2LHce++9qS/VtWNJSwqSriUsPL6GpLnAGYTeRisAd8WucA+b2TFmNkvS9YRFtxcDx5vZkpTpc25ZbLLJJtx4440tes5KK61UcdvMuOCCC9h118a9sO+4445lT6RzyyhpScHMDjKzNc2sq5n1M7PLzGx9M1vHzIbH2zGZx//KzNYzs0Fm9s+UaXNuWY0ZM4ZPP/2USy65pLhv5syZ9O7dm4kTJ7JkyRLmz5/Pvffey6hRo5o936677srFF1/M559/DsBzzz3HRx99xM4778wVV1zBxx+HAvU777wDQM+ePVm4cCEAgwYNYs6cObzwwgsA/PnPf2b77X0te7fs6t37yLnlUm0X0lqSxM0338y4ceM455xz6N69OwMGDOC8887jww8/ZNiwYUjiN7/5DV/60pd49tlnmzzfkUceyZw5c9hss80wM/r06cMtt9zCbrvtxowZMxgxYgTdunVj991359e//jWHHXYYxxxzDD169OChhx7iiiuuYL/99mPx4sWMHDmyUQO4cy3V5tdoHjFihPkiOx3HM888w1e+8pV6J6Pdqdvr6l1S60bSdDMbUbq/Y5cUUr0h/c3onGujfEI855xzRZ4pOOecK/JMwTnnXJFnCs4554o8U3DOOVfUsXsfubav1j3Iqug5tvLKK/Phhx/WNm4NnXfeeRx99NHF6TGcawkvKTjXiixevLjJ7Wqcd955xVHQzrWUZwrOLaMpU6YwevRo9t13XzbaaCMOPvhgCoNBp06dyle/+lWGDRvGqFGjWLhwIYsWLeLwww9nyJAhbLrppkyePBkI6yPsueeejBkzhh133HGp7Y8++ogjjjiCUaNGsemmm3LrrbcCsGTJEn74wx8yePBghg4dygUXXMD555/P66+/zg477MAOO+wAwLXXXsuQIUMYPHgwp556an1eLNdmePWRc8vh8ccfZ9asWay11lpsvfXWPPDAA4waNYoDDjiAiRMnMnLkSD744AN69OjBH/7wByTx5JNP8uyzz7LLLrvw3HPPAWFq7ZkzZ7LaaqsxYcKERts/+tGPGDNmDJdffjnvvfceo0aNYqedduKqq65izpw5zJgxgy5duhSn1j733HOZPHkya6yxBq+//jqnnnoq06dPZ9VVV2WXXXbhlltuYe+9967vC+daLS8pOLccRo0aRb9+/ejUqRPDhw9nzpw5zJ49mzXXXJORI0cC0KtXL7p06cL999/PIYccAsBGG23EuuuuW8wUdt5550ZTY2e377zzTs4++2yGDx/O6NGjWbRoEa+88gp333033/3ud4srt5WbWnvq1KmMHj2aPn360KVLFw4++GCfWts1yUsKzi2HFVZYoXi/c+fOy9QGAM1Prf3Xv/6VQYMGLVsinWsBLyk4V2ODBg1i3rx5xQV2Fi5cyOLFi9l222255pqw+uxzzz3HK6+8UtUX/a677soFF1xQbK94/PHHgVCaGD9+fDEjKje19qhRo7jnnnt4++23WbJkCddee61Pre2a5CUF17a1wskHu3XrxsSJEznhhBP45JNP6NGjB3fffTfHHXccxx57LEOGDKFLly5MmDChUUmjkp/+9KeMGzeOoUOH8sUXXzBw4EBuv/12jjzySJ577jmGDh1K165dOeqoo/je977H0UcfzW677cZaa63F5MmTOfvss9lhhx0wM77+9a+z11575fAquLaqY0+d7bOktjk+dXYaPnV2x1Np6myvPnLOOVfk1UeudvxXn3NtnpcUXJvT1qs8Wxt/PV2WZwquTenevTsLFizwL7IaMTMWLFhA9+7d650U10p49ZFrU/r168fcuXOZP39+vZPSbnTv3p1+/frVOxntVxvr0OKZgmtTunbtysCBA+udDOfaLa8+cs45V+SZgnPOuaKk1UeSLgf2AN4ys8Fx32rARGAAMAfY38zelSTgD8DuwMfAYWb2WMr05c67bLrWzt+jHV7qksIEYLeSfacBk8xsA2BS3Ab4GrBBvB0NXJw4bc4550okzRTM7F7gnZLdewFXxvtXAntn9l9lwcNAb0lrpkyfc865xurR+6ivmc2L998A+sb7awOvZh43N+6bRwlJRxNKE/Tv3z9dSl3r18a6+znX2tW1odnCCKQWj0Iys0vMbISZjejTp0+ClDnnXMdUj5LCm5LWNLN5sXrorbj/NWCdzOP6xX3OdVze8Ft7XrpsUj1KCrcBY+P9scCtmf2HKtgSeD9TzeSccy4HqbukXguMBtaQNBc4AzgbuF7Sd4CXgf3jw/9B6I76AqFL6uEp0+acc25pSTMFMzuowqEdyzzWgONTpsc551zTfESzc865Is8UnHPOFXmm4Jxzrsinzm7PvDujc66FvKTgnHOuyDMF55xzRZ4pOOecK/JMwTnnXJE3NDvnXEIDFv0lyXnnJDmrlxScc85leEnBuZbwGTZdO+clBeecc0WeKTjnnCvy6iNXM6ka1CBdo5pzrjEvKTjnnCvykoJzrshLe85LCs4554o8U3DOOVfkmYJzzrkizxScc84VeabgnHOuyDMF55xzRZ4pOOecK6p6nIKkbsCGcXO2mX2eJknOOefqpapMQdJo4ErC+BMB60gaa2b3JkuZc8653FVbUvgdsIuZzQaQtCFwLbB5qoQ555zLX7VtCl0LGQKAmT0HdF2ewJL+R9IsSU9JulZSd0kDJT0i6QVJE2OVlXPOuZxUmylMk3SppNHx9idg2rIGlbQ2cCIwwswGA52BA4FzgN+b2frAu8B3ljWGc865lqs2UzgWeJrwRX5ivH/scsbuAvSQ1AVYEZgHjAFujMevBPZezhjOOedaoKo2BTP7FDg33pabmb0m6bfAK8AnwJ3AdOA9M1scHzYXWLvc8yUdDRwN0L9//1okyTnXQaSaCXZOkrPmr9reR08CVrL7fUIV0i/NbEFLgkpaFdgLGAi8B9wA7Fbt883sEuASgBEjRpSmyznn3DKqtvfRP4ElQCGLPZBQ5fMGMAH4Rgvj7gT8x8zmA0i6Cdga6C2pSywt9ANea+F5nXPOLYdqM4WdzGyzzPaTkh4zs80kHbIMcV8BtpS0IqH6aEdCqWMysC9wHTAWuHUZzu2cc24ZVdvQ3FnSqMKGpJGEHkMAi8s/pTIze4TQoPwY8GRMxyXAqcD3Jb0ArA5c1tJzO+ecW3bVlhSOBC6XtDJhRPMHwJGSVgLOWpbAZnYGcEbJ7peAUWUe7pxzLgfV9j6aCgyRtErcfj9z+PoUCXPOOZe/JjMFSYeY2dWSvl+yHwAzq0kXVeecc61DcyWFleLfnqkT4pxzrv6azBTMbHz8+4t8kuOcc66emqs+Or+p42Z2Ym2T41zr5qNhXXvXXJfU6fHWHdgMeD7ehgM+g6lzzrUzzVUfXQkg6Vhgm8K8RJL+CNyXPnnOOefyVO3gtVWBXpntleM+55xz7Ui1g9fOBh6XNJkweG074OepEuWcc64+qh28doWkfwJbEGZLPdXM3kiaMuecc7mrtqQAYfqJbeN9A/5W++Q455yrp4qZgqTtgIfM7HNJZwMjgWvi4RMlbWVmP8ojkc5V4l1EnautphqaFwF/jPd3B3Y2s8vN7HLCgjh7pE6cc865fFUsKZjZo5I+yuzqDbwT76+SMlHOOefqo7lxCrPi3bNYuvfRaYnT5pxzLmfV9j66VtIUQrsCeO8j55xrl6oavCZpH+BjM7vNzG4DFknaO2nKnHPO5a7aEc1nZBfWMbP3WHrVNOecc21cteMUymUeLRnj4JxzS0nVpRi8W/GyqrakME3SuZLWi7dzCbOnOueca0eqzRROAD4DJgLXEcYwHJ8qUc455+qj2t5HH+FdUJ1zrt2rtqTgnHOuA/BMwTnnXJFnCs4554qqHby2oaRJkp6K20Ml/WR5AkvqLelGSc9KekbSVpJWk3SXpOfjX1/dzTnnclRtSeFPwOnA5wBmNhM4cDlj/wH4l5ltBAwDniE0Zk8ysw2ASXjjtnPO5araTGFFM3u0ZN/iZQ0qaRXCpHqXAZjZZ3GU9F7AlfFhVwJ7L2sM55xzLVdtpvC2pPUIK64haV9g3nLEHQjMB66Q9LikSyWtBPQ1s8J53wD6lnuypKMlTZM0bf78+cuRDOecc1nVZgrHA+OBjSS9BowDjl2OuF2AzYCLzWxTYKlxEGZmxEyolJldYmYjzGxEnz59liMZzjnnsqodvPYSsFP8Nd/JzBYuZ9y5wFwzeyRu30jIFN6UtKaZzZO0JvDWcsZxzjnXAk1mCpK+X2E/AGZ27rIENbM3JL0qaZCZzQZ2BJ6Ot7HA2fHvrctyfuecc8umuZJCz/h3EGGBndvi9jeA0obnljoBuEZSN+Al4HBCddb1kr4DvAzsv5wxnHPOtUBzy3H+AkDSvcBmhWojST8H/r48gc1sBjCizKEdl+e8zjnnll21Dc19CbOkFnxGhZ5Bzjnn2q5qF8q5CnhU0s1xe29gQooEOeca+CI0Lm/V9j76laR/AtvGXYeb2ePpkuWcc64eql5S08weAx5LmBbnnHN15rOkOuecK/JMwTnnXFHV1UeS+hLGKgA8amY+2tg559qZatdT2J8wWG0/woCyR+KkeM4559qRaksKPwZGFkoHkvoAdxPmLHLOOddOVNum0KmkumhBC57rnHOujai2pPAvSXcA18btA4B/pEmSc865eql28NrJkr4JbBN3XWJmNzf1HOecc21P1b2PgAeBJcAXwNQ0yXHOOVdP1fY+OpLQ+2gfYF/gYUlHpEyYc865/FVbUjgZ2NTMFgBIWp1Qcrg8VcKcc87lr9oeRAuA7BKcC+M+55xz7Ui1JYUXCAPWbgUM2AuYWViuc1mX5XTOOde6VJspvBhvBYW1k3uWeaxzzrk2qtouqb9InRDnnHP112SmIOlCM/uepL8Rqo0aMbM9k6XMOedc7porKRwKfA/4bQ5pcc45V2fNZQovApjZPTmkxTnnXJ01lyn0KfQwKsd7HTnnXPvSXKbQGVgZUA5pcc45V2fNZQrzzOzMXFLinHOu7pob0ewlBOec60CayxR2TBlcUmdJj0u6PW4PlPSIpBckTZTULWV855xzjTWZKZjZO4njnwQ8k9k+B/i9ma0PvAt8J3F855xzGXVbUlNSP+DrwKVxW8AYGtZ9vhLYuy6Jc865Dqqe6yyfB5xCWLQHYHXgPTNbHLfnAmuXe6KkoyVNkzRt/vz5yRPqnHMdRV0yBUl7AG+Z2fRleb6ZXWJmI8xsRJ8+fWqcOuec67hashxnLW0N7Clpd6A70Av4A9BbUpdYWugHvFan9DnnXIdUl5KCmZ1uZv3MbABwIPBvMzsYmExY7hNgLA1TdDvnnMtBPdsUyjkV+L6kFwhtDJfVOT3OOdeh1Kv6qMjMpgBT4v2XgFH1TI9zznVkra2k4Jxzro48U3DOOVfkmYJzzrkizxScc84VeabgnHOuyDMF55xzRZ4pOOecK/JMwTnnXJFnCs4554o8U3DOOVfkmYJzzrkizxScc84VeabgnHOuyDMF55xzRZ4pOOecK/JMwTnnXJFnCs4554o8U3DOOVfkmYJzzrkizxScc84Vdal3AjqSAYv+kuzcc5Kd2TnXkXhJwTnnXJFnCs4554o8U3DOOVfkmYJzzrmiumQKktaRNFnS05JmSTop7l9N0l2Sno9/V61H+pxzrqOqV0lhMfADM9sY2BI4XtLGwGnAJDPbAJgUt51zzuWkLpmCmc0zs8fi/YXAM8DawF7AlfFhVwJ71yN9zjnXUdW9TUHSAGBT4BGgr5nNi4feAPpWeM7RkqZJmjZ//vx8Euqccx1AXTMFSSsDfwXGmdkH2WNmZoCVe56ZXWJmI8xsRJ8+fXJIqXPOdQx1yxQkdSVkCNeY2U1x95uS1ozH1wTeqlf6nHOuI6pX7yMBlwHPmNm5mUO3AWPj/bHArXmnzTnnOrJ6zX20NfBt4ElJM+K+HwFnA9dL+g7wMrB/fZLnnHMdU10yBTO7H1CFwzvmmRbnnHMN6t77yDnnXOvRoafOTjWV9ZwkZ3XOufS8pOCcc67IMwXnnHNFnik455wr8kzBOedckWcKzjnnijxTcM45V+SZgnPOuSLPFJxzzhV5puCcc67IMwXnnHNFnik455wr8kzBOedckWcKzjnnijxTcM45V+SZgnPOuSLPFJxzzhV5puCcc67IMwXnnHNFnik455wr8kzBOedckWcKzjnnijxTcM45V+SZgnPOuSLPFJxzzhW1ukxB0m6SZkt6QdJp9U6Pc851JK0qU5DUGfh/wNeAjYGDJG1c31Q551zH0aoyBWAU8IKZvWRmnwHXAXvVOU3OOddhyMzqnYYiSfsCu5nZkXH728AWZva9kscdDRwdNwcBs3NI3hrA2znEqVe8esT0eB6vtcdsz/HWNbM+pTu75BS8pszsEuCSPGNKmmZmI9prvHrE9Hger7XHbO/xymlt1UevAetktvvFfc4553LQ2jKFqcAGkgZK6gYcCNxW5zQ551yH0aqqj8xssaTvAXcAnYHLzWxWnZNVkGt1VR3i1SOmx/N4rT1me4+3lFbV0Oycc66+Wlv1kXPOuTryTME551yRZwouN5K2rmZfW9Xer8/VnqSB1ezLk2cKFUj6czX7ahhPkg6R9LO43V/SqFTxMnHXlbRTvN9DUs+E4S6ocl/NtOfrk3RONftqGG9FST+V9Ke4vYGkPVLFy8TdRtLh8X6f1F+aOb9n/lpm340J4zWrVfU+amU2yW7EeZk2TxjvIuALYAxwJrCQ8IYZmSqgpKMII8NXA9YjjAv5I7BjjeNsBXwV6CPp+5lDvQi9zJJo79cH7AycWrLva2X21coVwHRgq7j9GnADcHuieEg6AxhBmLngCqArcDWQpASW43tmI8J3zCqSvpk51AvoXstYLeWZQglJpwM/AnpI+qCwG/iMtN3FtjCzzSQ9DmBm78axGikdT5hv6pEY83lJ/5UgTjdgZcL7Lfur6wNg3wTxCtrl9Uk6FjgO+LKkmZlDPYEHah0vYz0zO0DSQQBm9rEkJYwHsA+wKfBYjPl64l/ueb1nBgF7AL2Bb2T2LwSOShCvap4plDCzs4CzJJ1lZqfnGPrzWBoxCMVkQskhpU/N7LPC51pSl0L8WjKze4B7JE0ws5cl9Qq7bWGtY5Vor9f3F+CfwFlAdnr5hWb2TqKYAJ9J6kHDe3Q94NOE8QA+MzOTVIi5UuJ4eb1nbgVulbSVmT1U6/MvD88UKjCz0yWtDaxL5nUys3sThTwfuBn4L0m/IvzC/EmiWAX3SCqUinYm/Pr8W8J4fSTdTvw1Lel94Agzm54oXru8PjN7H3ifMLX8ZsA2hC+uB4CUmcIZwL+AdSRdQ6jCOSxhPIDrJY0HeseqnSOAPyWMl/d75oUYbwCNv2eOSBizST54rQJJZxOm2XgaWBJ3m5ntmTDmRoS6SwGTzOyZVLFivE7Ad4BdYsw7gEst0ZsiVnUcb2b3xe1tgIvMbGiieO39+n4K7A/cFHftDdxgZr9MES/GXB3YkvB6PmxmyWf0jF/Oxf+hmd2VMFbe75kHgfsIbTWF7xnMrFwDdC48U6hA0mxgqJmlLh4X4m0JzCpUOcQqiK+Y2SMJY64ELDKzJXG7M7CCmX2cKN7jZrZpyb7HzGyzFPHylvf1xffoMDNbFLd7ADPMbFCiePsA/44lFST1Bkab2S0p4sUYA4F5JdfY18zmJIqX92dihpkNT3HuZeVdUit7idDTIS8XAx9mtj+M+1KaBPTIbPcA7k4Y7x5J4yWNlrS9pIuAKZI2i9UgNSHpSUkzK91qFaeMXK4v43Ua91RZgbSzCp9RyBAAzOw9QpVSSjfQuG1tSdyXSt6fidsl7Z7w/C3mbQqVfQzMkDSJTGOamZ2YKJ6yRVQz+yI2cqXU3cyKGZGZfShpxYTxhsW/pV8kmxLqxMfUKE7yvvMV5HV9Be8DsyTdFc+/M/CopPMhyXu13I/I1O/RLnEVRgBiI3DKXnl5fyZOAn4k6TNCD0eFsNYrYcwmeaZQ2W3kO233S5JOpKF0cByhtJLSR5I2M7PHACRtDnySKpiZ7ZDq3CVxXs4jTpm4uVxfxs3xVjAlcbxpks4lrKMOoftmqk4CBfMl7WlmtwFI2ou0K5Pl/ZlI2b12mXibQhNi/WV/M0u+3GfsC30+4dekEYqx48zsrYQxRwATCdUQAr4EHFDr3jKSDjGzq9V4YFeRmZ1b43j3m9k2khbSuDthkl9heV9fvcT69p8COxFe17uAX5nZRwljrgdcA6wVd80Fvm1mLyaKl8tnIhNPwMHAQDP7X0nrAGua2aMp4lXDSwoVSPoG8FvCwKSBkoYDZ6bofRQbs35vZgfW+tzNxNwW2IgwkAZgtpl9niBcoW95Xr+KDoVcf4Xlen2Srjez/SU9SZk+9Cl6O8X3y+15loZizGPNbEtJK0OozkkcL6/PREF2JoP/JbQl/j8SzmTQHC8pVCBpOuEfNaXQo0TSU2Y2OFG8+4Ex2frT1CQ9ambJ51eKsToDJ5rZ73OINd3MNpc0ycxqOj1BEzHzvL41zWyepHXLHU9VfRbb176ZbWxOTdLDZrZljvFy+0zEeI9ZnMkg8z3zhJkNa+65qXhJobLPzex9NR7Fn3KE8UvAA5JuA4rF8cRVDw9IupBQXM7GfKzWgcxsicL0CMm/NIFOcUDQhuWqdFK8pnleX8wQOgMTcm7H+BB4MjZsZ98vqTpfADwePxM3lMS8qfJTlktun4moHjMZNMkzhcpmSfpvoLOkDYATgQcTxnsx3jqRXzXL8Pj3zMy+FL1kCvL6wB1IGMhVOhdRanlnsl9IWiXHX+430TBQLi/dgQU0fk9awnQMj3/z+kzUYyaDJnn1UQWxG9qPaTyy8X8Lg2hcy0maXGa3mVmSD5ykr5nZP1Ocu0K8vK/vVkJ31zx/ubsaU84zGTSbHs8UWof4hVKu0TDVLxQU124oE/PMcvtd6yJpbLn9ZnZlonj/ofx79Msp4sWYV1SImWRuoHp8JiStCqxD47mPUlVXNcurjyqIXdPKTVSVZB4b4IeZ+92BbwGLE8UqyHYl7E4Y9JXsV4qkXwO/iSNhCx+GH5hZXYvLtVKH67uRMlMyJIoFYV2Dgu7AfoR1B1LKrtXQnTCV9usJ4+X9mfhfwqSCL9KQ+aWsrmo+TV5SKE9hXpmTgSfJNPzkOTCqDj0hViBMODY60fnznhtoBSuZu6rcvhrGy/v6HgZ2KnTTjN027zSzr6aIVyEN080s5eJTpfE6AffndY05fCZmA0Py7HXYHC8pVDa/MIoyD5Kyv7g6EVZ5WyWv+NGKhJWmUumc/VKOgwNT/rJ9CCj9Qi63r1byvr5cp2Qomb+pE6HkkPd3yAZAikVvKkn9mXiKsNBOskGqLeWZQmVnSLqUMLI4O/dRql4P0wnFRhGqjf5DmMI3mZLBT52BPjTudVFr1wCTYj0xwOFAzeu/JX0JWJswJ/6mhNcUwlKHKeexyeX6MnKdkgH4Xeb+YmAOYeruZDKj0hX/vkG65Ubr8Zk4i9Dt9ikaf88km6K/OV59VIGkqwkjG2fRUH1kqRq46qFk8NNi4E0zS9qOIWk3wjQJAHeZ2R0JYowl1NOOAKbSkCl8AFyZMGPP5foysUYC15HTlAwdQd6fCUmzgPEsXU19T6qYzabJM4XyJM22RPPSV4jXFTgW2C7umgKMTzzEHknDCEP7Ae41s2RTS8e5cz6xMAPsIMJUAv9MdY2SvmU5LlaS9/XFmF3JaUoGSasQZoAtvEfvIUz9knSchKQ9MzGnmNntTT2+BvHy/ExMNbO6TWlRjq+nUNmDkjbOMd7FhHaEi+JtcxKvpyDpJEKVx3/F2zWSTkgY8l6gu8Iyp/8Cvg1MSBhv7/hFBoRfgXGqhlRyvT5J+xHaFZ4iDNabqDTrNhRcTlhYfv94+wC4oslnLCeFFRBPIqyA+DRwUuzllSpe3p+J+ySdJWkrxXU3Ev8Pm2dmfitzI3RD+wyYDcwkFO9mJoz3RDX7ahxzJrBSZnulxNf4WPx7AnBKvD8jYbzvAs8CuwNHAc8B32hH1zcz/t0GmAx8HXgkYbylriXl9RWuEeiU2e6c+D2a92dicpnbv1O+ps3dvKG5st1yjrdE0noWpwSW9GUya7YmopIYS2iof08ST9JWhKmCC43onVMFM7Pxsc52MmEO/k3N7I1U8cj5+mj4330d+JOZ/V1SsvWZgU8kbWNm9wNI2pq0DdsFvYF34v3UPfJy/UxY/mtwNMszhcrybmw5GZgs6SXCm3BdQu+VlK4AHpF0c4y5F3BZwngnAacDN5vZrJjxlZsaoiYkfZsw//+hwFDgH5ION7MnEoXM9fqA1ySNJ6y4dk7sU5+ySvhY4MpYJSfCF/VhCeNBQ++cyTHmdsBpCePl+plojbMKeENzBZmuaSKMbBxIaMjbJGHMFWjcaJhkkFVJzM0I1Q8A95nZ46lj5kXSLcDRFhcqkjQKuMRa2ULpyyqOSdgNeNLMnpe0JmEg1J2J4/YCMLMPUsbJxFuThvUFHk1c2sv1MyHpB5nN4ghqq2MvR88UqhTfKMeZ2ZGJzr8f8C8zWyjpJ4QBVr+0hHOgKKxqNdfMPpW0AzAEuMriNA3thaQVzezjeL+btaLRo21JbIS9gtDY/CfCe/S0lJlQrKKaYWYfSTokxvyDpVszoq6fidQjqKvhvY+qFL+ct0gY4qcxQ9iGMGPiZSTufQT8ldCWsT7wR8KkXH9JHDM3sUfH04TG5kJXw/Pqmqi27YhYOtgFWJ3Qu+rsxDEvBj6O/7vvE+YIuiphvHp/JlKPoG6WtylUoMaLs3Qi/EJJORFX3o2GAF+Y2WJJ3wQuNLMLJKUsKq9hZikXXS91HrArcBuAmT0habsmn+GaUmhw3Z3w63mWpJQdEwAWm5lJ2gv4f2Z2maSUI/3z/kzkPYK6WZ4pVJZdnGUx8HfCr4hU8m40hLDq00GEhthvxH1dax1EYb3ry4HFkpYA+5tZygWLiszs1ZLvrWQ9uhRWzTqKpWfWTTXN8wnA1Wb2borzlzFd0p2E9rXTJfUk/SphCyWdDhwCbKcwIV7N36MZuXwmMvbI3M9lVoHmeKZQgZn9IueQ+xMaDX9rZu/FxrWTE8c8HDgG+JWZ/UfSQODPCeL8CtjWzJ6VtAXwG2D7BHEAkLSlmT0MvCrpq4DFkb8nkXAaZOBW4D7gbtJ3JwboC0yV9Bgh073D0jYSfoewMtlLZvaxpNVJ30PuAOC/ge+Y2RuS+gP/lzBeXp+JgjWBWWa2EEBST0kbm9kjCWM2yRuaK1BYh3Y/azw3/nVmtmtdE9YGqWT66NLtVPEkrQH8gTAXkYA7gZPMbEGiuDPy7tkUq292IXyZjQCuBy4rjHdxrVusmtqskJnHktC0lJ+P5nhJobI+2R4HZvaupDyn7G1P/qukjabRtpmdmyJobL84OMW5K7hd0u5m9o+8Asb69jcIs4cuBlYFbpR0l5mdklc63DJTtnRnYd6sun4ve6ZQ2RJJ/c3sFSjOnujFqmXzJxq30ZRu19qXJVVcC8PSTUt8EvAjSZ8BhYnpzMx6pQgWu4geShitfSlwspl9Hn9tPg94ptD6vSTpRBp6Gh4HvFTH9Him0IQfA/dLuodQ9bAtcHStg8Sub33N7IGS/VsDb7SHaoA6tM/Mp/Hc/7kws5QZXTmrAd8s7bMff23uUeE5yy2WmLtn4r2SIEYfQmn96ZL9GxMWwJpf65glcYpjWxI7BjgfKCzZejcJvmdawtsUmhDrpLeMmw+n6E4p6XbgdDN7smT/EODXZvaN8s+saRpON7OzEp7//KaOm9mJNY73uJUsi5kX5T/Nc2H0rQEPJB7suCchs12LsFLYuoTRtzUf5S/pOuAiM7u3ZP+2wLFm9t+1jhnP/1VCqWtlM+sfx0d818yOSxGvNfLBa037KjA63rZs8pHLrm9phgAQ9w1IFLPUfonPPz1z27NkO8WCMP9JcM5mqfw0zykz258SVnZbHVgDuCKOhk/lfwmfg+fMbCBhkOXDiWKtX5ohAJjZfYR5rFL5PWFsy4IY7wkaMvmak9RP0s2S3oq3v0qq6+A1LylUED/gIwlzqwMcBEw1sx/VOM7zZrZBhWMvmNn6tYxXIU7S3kAlsZL/ipf0LZpo/7FEK69JmgkMN7Mv4nZn4HEzS/IlprDo+zAzWxS3exCmhEiyOJSkaWY2QtIThBlnv5D0hJkNSxCr4iJXTR2rQdxHzGyL7Ps01TXGc99FGDFd6PZ6CHCwme2cIl41vE2hst1p/AG/EngcqGmmAEyTdJSZ/Sm7U9KRpPkVXTj/f2iY8G9NNczOamb25VRxyaexvlCf/l+E0t6/4/YOwINAsuU4yXea59cJdfuL4vYKwGsJ470naWXCYkLXSHoL+ChRrBfK9eSS9DXSNsTmPbalj5llFyqaIGlcwnjN8kyhab1J/wEfB9ws6WAaMoERQDdgn0QxicV/oL518CmY2eEAcfTtxmY2L26vSdqV3nKZ5lnSBYTM9X1gVvy1aYTR8I/WOl7GXoT1E/6H0NV3FdJNyTAO+Luk/Wn8udiKxqOAa+0YwtiWtQkZ7J3A8QnjLVCY6O/auH0QseqqXrz6qII41P1swnz4xQ+4mU1MFG8HYHDcnGVm/27q8TWOnTRTkLSQhlJJD6DQq6NQMknVZfMZM/tKZrsT4bX9ShNPW96Yyad5ljS2qeNmdmWtY8a43wcmmlnK0kg23gqE0czFzwXwl0J1WXsQu7pfQMjsjFCSPTFFj66q0+SZQmV5fMBbA0kXmtn36p2OWpN0IbABDb/CDgBeMLNka+4qrM+8Lo3nPlqqwbQtknQGYTqWd4CJwA1m9maO8fdI1ZsrU/oqq9Y95FozzxRKqJlFs1N2+WuvJHUnFMvXJ6yBe7nlNOmXpH1o6D1yr5ndnDDWOYSMZxYNE8VZqsFymXahRhK3CSFpKOE6v0VYe2CnlPEycZN1iMi79NWaMyFvU1haYdBTd0Id5hOEao6hwDRCMa9dkbSJmc1KGOJKwgjf+wgN+JsQGvDy8Biw0MzulrSipJ4WJx9LYG9gkOWwYl40InO/O6Fr8Wo5xH2LMK3GAkJjfl5SrpWcpMqtCdPi362BjQklLwj/w6fLPiMnXlKoQNJNwBmFMQSSBgM/N7N965uy2sthgronzWxIvN+FUBWXvAuspKMIo0NXM7P1JG0A/NHMdkwU75+ESRQ/THH+KtMw3cw2T3Tu4wjVR32AG4DrS0ccpyRplJmlbEgndhIoV/oakyjew8A2hZJz7PF0n5mlGhfVLC8pVDYoO6jMzJ6SlKyBss5SL5RSmAcICwuYJA5XdDwwCngkxn5eCSY1zFQFfAzMkDQJKJYWUlUFlFR1diKUHFJ+ptcBxpnZjIQxGlFYh/oHQH8zOypm7IMSjhT/YeZ+d0IVWcqqzlWBXjT0clw57qsbzxQqmynpUuDquH0woT68XYiNhoUeQX0l/axwzMxq3c1wmKTCIu8CesTtpL2PgE/N7LNCJhRLKSmKxoWqgOnEVd4yUhbFs/M7LQbmkHB0upmdDvnMfZRxBeF1LVTbvkYopSTJFMysdGzQA5JSlk7OZuluzD9PGK9ZnilUdjhwLA113/eSfs3kPM3J3P8cSLIQOoCZdU517mbcI+lHhExoZ8IMlH+rdZBCfbSkk8zsD9ljCjOZJmFmO5TE6gwcCDyXIp7CCnrnUjL3EaGNKJX1zOyA2EUcC4v7JCtqSsq2yXQCNifhIEQzuyJWOxbWfz+13r0cvU3B5TrNRZ7il8eRhEVoBNwBXGqJ3vTlXscUY0Ak9SJUja1NWO3t7rj9A2Cmme1Vy3iZuE8AY4C7zWzTOLbmEDNLtmaypAcJcyw9YGHhpPWAa81sVKJ42ZH+iwnzaJ1pZveniNcaeUnBQfo2hdzFX82zzGwjwvoNKWMdRBhkNVCN13HoSUNdcS39GXgXeIiwJvSPCf/DfRLX939uZgskdZLUycwmSzovYTwIVSn/AtaRdA2ht85hqYJlR/p3VJ4pOAi/xNoVM1siabYyCyUl9CAwjzBTabaefyFp2qG+nOnNdWmM3T+Hkb6FuY/uI/3cRwCY2Z2SphNmZxVhOdUUU9h/s5l0pJwvq1XxTKEFJP3WzH7Y/CNbN5Us7GNm78T97WZhn2hVwtxAj5L58qr1YDILi9y8LOlaQvXNu7U8fxnZ3lxLJM3NaeqHPQmT751EmM2zF5B0ASVJfyPMInqbmaXMgArrluQ2iWKs3hxFqAaE0Ij+aKrqzWp5m0ILSHrFzPrXOx3LS61gYZ88SNq+3H4zuydRvF8SGnofAy4H7kjxAZe0hIZMLjufVJLeXJm5qxrtjn8XAS8CPzazSbWMG2NvTxg9/XVgKnAdcHuqTDBOojjWSiZRNLNdaxxnF+AiwrKphbmk+hFG/R9nZnfWMl6L0uaZQvUkvWpm69Q7HctL0lQzG1nhWHGgmWu5+OtvF0LvtRHA9cBl7aj01UhsuxkMXGNmg5t7/HLGGUNoQ9ktVTfmvCZRlPQM8DUzm1OyfyDwj1rHawmvPipR0iWt0SHaT4Ns7yaO9cgrEamV/MLtBnQFPko4LgIzM0lvEKaBWEyowrpR0l1mdkqquPViZkuAJ+IAviQUFg/6BqHEsBlh2pRUJkm6g8aTKN6dIE4XYG6Z/a8R3qd145nC0qbT0CWt1Odl9rVFdVnYJ29m1rNwP/6C34t0y6oWxiQcCrxNWOf3ZDP7PP7afB5od5lCgZmNT3FeSdcT6t3/BVwI3GNx4asUzOx7JZMoXpJoEsXLgakKa1G/GvetQ6h+vCxBvKp59VEHJKkvcDPwGWUW9qn34JmUUowbyJz7F4QZYJcaCCjpK2aWcgWvdknSroRxEUtyjNmXkBEZoeH3rURxvkL4oZJtaL4tz/mkyvFMoYQ60NTZquPCPnko6WZYmBtoezOr6Uy3ajw1+JOENoRcpgZvrySNMbN/V+oqmqqLqMJKb/8HTCHUFmxLKPHdmCJea+SZQglJXwBPEaoAoHE1kqWaLdHVnqTs2reFuYH+VOtffpIm0jA1+NeAl80sr6nB2yVJvzCzM0r+hwVmZkckivsEsHPhPSKpD6GkMixFvApp+LmZ/TyveKW8TWFp3wf2JaxFex1ws9VxKmS3XC4tjMUoiGMxal0dsHFmMNllpF0nuUMwszPi3TPN7D/ZY7GHTiqdSn40LCCUMvNU13a9vC+21TOz88xsG+AEQsPPJEnXSxpe35S5ZVCuR0yKXjKNpgZPcP6O7K9l9qWsyvmXpDskHSbpMODvwD8TxluKmdV80saW8JJCBWb2kqRbCV00vw1sCMyoa6JcVSRtRRiV2kdhsfmCXkCKGVvrNTV4uyVpI8Lsq6uUtCv0IjNtd62Z2cmSvkWYYwnS9T6qSNLPrPbT11fNM4USkr5M6Ba2F6Gr2HWEUb6f1DVhriW6ERYr6UKYlK7gA0LVYE1Z/aYGb88GAXsQxtRkR9gvJAxgS8bM/irpLuL3o6TVClPB5ORIoG6Zgjc0l4gNzTMJUxJ/QMnwfjM7tx7pci0nad1y3UNd2yFpKzN7KMd43yXM57QI+IKG0t6Xaxzng0qHgB5mVrcf7N6msLRfEPrwf0H4tdmz5Obajksl9S5sSFo1jlZ1bccxZf6HlyeM90NgsJkNMLMvm9nAWmcI0XvABmbWq+TWkzDrbd149dHSFpjZhfVOhKuJNczsvcKGmb2rBGs0u6SGlvkfJhl8GL1ImFwwtasIK9e9WebYX3KIX5FnCks7gjCc3rV9X2TXU5C0LmnXTHa110nSqoXpyOPcZCm/t04HHpT0CPBpYaeZnVjLIGb2kyaOnVrLWC3lmYJrz34M3C/pHhpGpx5d3yS5Fvod8JCkG+L2fsCvEsYbT1hL4UlCFXKH4w3NJSQtpnzx0bsXtkGS1qBhEryHLcGqXS4tSRsTps0G+HfKuYFSzo3VVnimUMLfFO2HpO3K7Teze/NOi1t2krYhNMpeEaedWLl0lHMNY/2aMB3K32hcfZRnl9S68kyhhGcK7UdcyrGgO2Hmy+k+f1XbIekMwkSGg8xsQ0lrATeY2dbNPHVZ45XLbGreJbWZNNR1hUdvU1jaDc0/xLUFVrKsqKR1gPPqkxq3jPYBNiUscYqZvS4pWddwM0s5r1K16rqYl2cKS1tT0vmVDta6F4LL1VygbsscumXyWVzNzgAkrVTvBOWgrtU3niksbVrm/i+AMyo90LVucYnIwgesEzCc+IvTtRnXSxoP9JZ0FKHL+J+aeU6rVzInV6NDhEGzdeNtCk3w9oW2TdLYzOZiYE7pVNqu9ZO0M7AL4QvzDjO7q85JWm6xraQiM/tFXmkp5ZlCEyQ9ZmZNrsTmWidJnYGrzOzgeqfFtT2SVibMjPxSdkR1R+DVR65dMrMlktaV1M3MPqt3elzLSLrfzLaRtJDydewLgP8zs4tqFO8iMzsu3t+GMNXEi8D6kr5rZv+oRZxMvIrtllDftksvKZQoeROuSMNANh+81sZIuorQsHwb8FFhv8902/ZJWh140MwG1eh8xVoBSZOBH5jZY3Eq/evNbEQt4mTifUZY9vd64HVKehyZ2ZW1jNcSXlIoEWcpdO3Di/HWiYYZbv1XUBsjaTNgG8L/7n4ze9zMFkganShkLzMrdIF9SVKK2aTXJEzZcQChvWsicGNrqKrykoJrtyTtZ2Y3NLfPtV6Sfkb48rwp7tqbMHjtlzWO8zHwAuEX+wCgf5yRtRMw08wG1zJeSex+hIW9vg+camZ/ThWrqvR4puDaq3IdBbzzQNsiaTYwzMwWxe0ewIxaVRtl4qxbsmuemX0W587azsxuKve8GsTdDDgI2BmYDvwu5dxO1fDqI9fuSPoasDuwdkmDXi9CUd21Ha8TpihZFLdXAF6rdZBKK/TFCRRrniFIOhP4OvAMYcnf082sVbw3vaTg2h1JwwgD1c4EfpY5tBCYXJib37VemYGH/YGRwF1xe2fgUTP7Zo3jPUn59qZCB5OhNY73BfAfGjqyFGInidcSnim4dktSVzP7XFJXYDDwmpm9Ve90ueaVDDxcSq1755SpPiqNV9O1vvOO1xKeKbh2R9IfgQvMbJakVYCHgCXAasAPzezauibQVU1Sd2D9uPlCoW0hUazOwN1mtkOqGJlYxRUByxzb1szuS52GSlJ0tXKu3rY1s1nx/uHAc2Y2BNgcOKV+yXLVktRF0m8IkxheSVjT+FVJv4klv5ozsyWEJVxXSXH+ElMknRIzIgAk9ZV0NfD7HOJX5JmCa4+yI5h3Bm4BMLM36pIatyz+j1CyG2hmm8ceY+sBvYHfJoz7IfCkpMsknV+4JYizOeF6ZkgaI+kk4FFCqXZUgnhV8+oj1+7EEam/I/RSmQxsZGZvSOoCPGVmG9U1ga5Zkp4HNrSSL6j4y/pZM9sgUdyybRmpRhjHzOD3hF5WW5rZ3BRxWsK7pLr26LvA+cCXgHGZEsKOwN/rlirXElaaIcSdSwprKyQKemUcC9HfzGaniiOpN3AOsAWwG6EL9T8lnWRm/04Vt6q0eUnBOdfaSLoFuMnMrirZfwiwv5ntmSjuNwjVU93MbKCk4cCZtY4n6SXgIuC8wviEGOsi4GUzO6iW8VqUNs8UXHslaUPgYqCvmQ2WNBTYs9ZTJLjak7Q2YdDYJ4SRvhDWau4B7GNmNR/AFuNOB8YAUwprqUh6qtbTXEjqV6mqSNJRZla3hYQ8U3DtlqR7gJOB8Sk/4C4dSWOATeLm02Y2KXG8h81sy+wCW5Jm1nMwWd68TcG1Zyua2aNSo1mJW8VUAq46sX49zzr2WZL+G+gsaQPgRODBHOPXnXdJde3Z25LWI04hIGlfYF59k+RauRMIJZNPCQvtvA+Mq2eC8uYlBdeeHQ9cAmwk6TXCXDO+PKdbShw5fQxh9PSTwFatZYK6vHmbgmv3JK1EKBV/DBxoZtfUOUmulZE0EfgcuA/4GjDHzMbVNVF14pmCa3ck9SKUEtYGbgXujts/ICyYslcdk+daIUlPxqlQiIMcH+2o62549ZFrj/4MvEuYMuAo4MeEKYn3MbMZdUyXa70+L9wxs8UlnRM6FC8puHan5FdfZ0Ljcv+UM2y6tk3SEuCjwiZhPMTHNKxv0KteacublxRce5T91bdE0lzPEFxTzKxz84/qGLyk4Nod/9Xn3LLzTME551yRD15zzjlX5JmCc865Is8UnHPOFXmm4JxzrsgzBeecc0X/H9sRjZFUhN64AAAAAElFTkSuQmCC\n",
- "text/plain": [
- "<Figure size 432x288 with 1 Axes>"
- ]
- },
- "metadata": {
- "needs_background": "light"
- },
- "output_type": "display_data"
- }
- ],
- "source": [
- "import numpy as np\n",
- "import matplotlib.pyplot as plt\n",
- "\n",
- "values_ok = [guesses_ok[i] for i in range(len(CODE_TYPES))]\n",
- "values_bad = [guesses_bad[i] for i in range(len(CODE_TYPES))]\n",
- "x_positions = np.arange(len(CODE_TYPES))\n",
- "\n",
- "p1 = plt.bar(x_positions, guesses_ok)\n",
- "p2 = plt.bar(x_positions, guesses_bad, bottom=guesses_ok)\n",
- "\n",
- "plt.ylabel('Tipo de código')\n",
- "plt.title('Aciertos o no, por tipo de código')\n",
- "plt.xticks(x_positions, CODE_TYPES, rotation=90)\n",
- "#plt.yticks(np.arange(0, 81, 10))\n",
- "plt.legend((p1[0], p2[0]), ('Correcto', 'Incorrecto'))\n",
- "\n",
- "plt.show()"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {},
- "outputs": [],
- "source": []
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 3",
- "language": "python",
- "name": "python3"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 3
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython3",
- "version": "3.8.2"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 4
-}
diff --git a/macros/latex/contrib/jupynotex/jupynotex.py b/macros/latex/contrib/jupynotex/jupynotex.py
index 036be088ce..53f27dec91 100644
--- a/macros/latex/contrib/jupynotex/jupynotex.py
+++ b/macros/latex/contrib/jupynotex/jupynotex.py
@@ -1,64 +1,202 @@
-# Copyright 2020 Facundo Batista
+# Copyright 2020-2024 Facundo Batista
# All Rights Reserved
# Licensed under Apache 2.0
-"""USAGE: jupynote.py notebook.ipynb cells
-
- cells is a string with which cells to include, separate groups
- with comma, ranges with dash (with defaults to start and end.
-"""
+"""Convert a jupyter notebook into latex for inclusion in documents."""
+import argparse
import base64
import json
+import pathlib
+import re
+import subprocess
import sys
import tempfile
+import textwrap
import traceback
+# message to help people to report potential problems
+REPORT_MSG = """
+
+Please report the issue in
+https://github.com/facundobatista/jupynotex/issues/new
+including the latex log. Thanks!
+"""
+
+# basic verbatim start/end
+VERBATIM_BEGIN = [r"\begin{footnotesize}", r"\begin{verbatim}"]
+VERBATIM_END = [r"\end{verbatim}", r"\end{footnotesize}"]
+
+# highlighers for different languages (block beginning and ending)
+HIGHLIGHTERS = {
+ 'python': ([r'\begin{minted}[fontsize=\footnotesize]{python}'], [r'\end{minted}']),
+ None: (VERBATIM_BEGIN, VERBATIM_END),
+}
+
+# the different formats to be used when error or all ok
+FORMAT_ERROR = r"colback=red!5!white,colframe=red!75!"
+FORMAT_OK = (
+ r"coltitle=red!75!black, colbacktitle=black!10!white, "
+ r"halign title=right, fonttitle=\sffamily\mdseries\scshape\footnotesize")
+
+# a little mark to put in the continuation line(s) when text is wrapped
+WRAP_MARK = "↳"
+
+# the options available for command line
+CMDLINE_OPTION_NAMES = {
+ "output-text-limit": "The column limit for the output text of a cell",
+}
+
+
+def _validator_positive_int(value):
+ """Validate value is a positive integer."""
+ value = value.strip()
+ if not value:
+ return
-def _verbatimize(lines):
+ value = int(value)
+ if value <= 0:
+ raise ValueError("Value must be greater than zero.")
+ return value
+
+
+def _process_plain_text(lines, config_options=None):
"""Wrap a series of lines around a verbatim indication."""
- result = [r"\begin{verbatim}"]
+ if config_options is None:
+ config_options = {}
+
+ result = []
+ result.extend(VERBATIM_BEGIN)
for line in lines:
- result.append(line.rstrip())
- result.append(r"\end{verbatim}")
+ line = line.rstrip()
+
+ # clean color escape codes (\u001b plus \[Nm where N are one or more digits)
+ line = re.sub(r"\x1b\[[\d;]+m", "", line)
+
+ # split too long lines
+ limit = config_options.get("output-text-limit")
+ if limit and line:
+ firstline, *restlines = textwrap.wrap(line, limit)
+ lines = [firstline]
+ for line in restlines:
+ lines.append(f" {WRAP_MARK} {line}")
+ else:
+ lines = [line]
+
+ result.extend(lines)
+ result.extend(VERBATIM_END)
return result
-def _save_content(data):
- """Save the received b64encoded data to a temp file."""
- _, fname = tempfile.mkstemp(suffix='.png')
- with open(fname, 'wb') as fh:
- fh.write(base64.b64decode(data))
- return fname
+class ItemProcessor:
+ """Process each item according to its type with a (series of) function(s)."""
+
+ def __init__(self, cell_options, config_options):
+ self.cell_options = cell_options
+ self.config_options = config_options
+
+ def get_item_data(self, item):
+ """Extract item information using different processors."""
+
+ data = item['data']
+ for mimetype, *functions in self.PROCESSORS:
+ if mimetype in data:
+ content = data[mimetype]
+ break
+ else:
+ raise ValueError("Image type not supported: {}".format(data.keys()))
+
+ for func in functions:
+ content = func(self, content)
+
+ return content
+
+ def process_plain_text(self, lines):
+ """Process plain text."""
+ return _process_plain_text(lines, self.config_options)
+
+ def process_png(self, image_data):
+ """Process a PNG: just save the received b64encoded data to a temp file."""
+ _, fname = tempfile.mkstemp(suffix='.png')
+ with open(fname, 'wb') as fh:
+ fh.write(base64.b64decode(image_data))
+ return fname
+
+ def process_svg(self, image_data):
+ """Process a SVG: save the data, transform to PDF, and then use that."""
+ _, svg_fname = tempfile.mkstemp(suffix='.svg')
+ _, pdf_fname = tempfile.mkstemp(suffix='.pdf')
+ raw_svg = ''.join(image_data).encode('utf8')
+ with open(svg_fname, 'wb') as fh:
+ fh.write(raw_svg)
+
+ cmd = ['inkscape', '--export-text-to-path', '--export-pdf={}'.format(pdf_fname), svg_fname]
+ subprocess.run(cmd)
+
+ return pdf_fname
+
+ def include_graphics(self, fname):
+ """Wrap a filename in an includegraphics structure."""
+ fname_no_backslashes = fname.replace("\\", "/") # do not leave backslashes in Windows
+ width = self.cell_options.get("output-image-size", r"1\textwidth")
+ return r"\includegraphics[width={}]{{{}}}".format(width, fname_no_backslashes)
+
+ def listwrap(self, item):
+ """Wrap an item in a list for processors that return that single item."""
+ return [item]
+
+ # mimetype and list of functions to apply; order is important here as we want to
+ # prioritize getting some mimetypes over others when multiple are present
+ PROCESSORS = [
+ ('text/latex',),
+ ('image/svg+xml', process_svg, include_graphics, listwrap),
+ ('image/png', process_png, include_graphics, listwrap),
+ ('text/plain', process_plain_text),
+ ]
class Notebook:
"""The notebook converter to latex."""
- def __init__(self, path):
- with open(path, 'rt', encoding='utf8') as fh:
- nb_data = json.load(fh)
+ GLOBAL_CONFIGS = {
+ "output-text-limit": _validator_positive_int,
+ }
+
+ def __init__(self, notebook_path, config_options):
+ self.config_options = self._validate_config(config_options)
+ self.cell_options = {}
+ nb_data = json.loads(notebook_path.read_text())
- self._cells = nb_data['cells']
+ # get the languaje, to highlight
+ lang = nb_data['metadata']['language_info']['name']
+ self._highlight_delimiters = HIGHLIGHTERS.get(lang, HIGHLIGHTERS[None])
- def __len__(self):
- return len(self._cells)
+ # get all cells excluding markdown ones
+ self._cells = [x for x in nb_data['cells'] if x['cell_type'] != 'markdown']
+
+ def _validate_config(self, config):
+ """Validate received configuration."""
+ for key, value in list(config.items()):
+ validator = self.GLOBAL_CONFIGS[key]
+ new_value = validator(value)
+ config[key] = new_value
+ return config
def _proc_src(self, content):
"""Process the source of a cell."""
source = content['source']
result = []
if content['cell_type'] == 'code':
- result.extend(_verbatimize(source))
- elif content['cell_type'] == 'markdown':
- # XXX: maybe we could parse this?
- result.extend(_verbatimize(source))
+ begin, end = self._highlight_delimiters
+ result.extend(begin)
+ result.extend(line.rstrip() for line in source)
+ result.extend(end)
else:
raise ValueError(
"Cell type not supported when processing source: {!r}".format(
content['cell_type']))
- return '\n'.join(result) + '\n'
+ return '\n'.join(result)
def _proc_out(self, content):
"""Process the output of a cell."""
@@ -67,27 +205,30 @@ class Notebook:
return
result = []
+ processor = ItemProcessor(self.cell_options, self.config_options)
for item in outputs:
output_type = item['output_type']
- if output_type == 'execute_result':
- data = item['data']
- if 'image/png' in data:
- fname = _save_content(data['image/png'])
- result.append(r"\includegraphics{{{}}}".format(fname))
- elif 'text/latex' in data:
- result.extend(data["text/latex"])
- else:
- result.extend(_verbatimize(data["text/plain"]))
+ if output_type in ('execute_result', 'display_data'):
+ more_content = processor.get_item_data(item)
elif output_type == 'stream':
- result.extend(_verbatimize(x.rstrip() for x in item["text"]))
- elif output_type == 'display_data':
- data = item['data']
- fname = _save_content(data['image/png'])
- result.append(r"\includegraphics{{{}}}".format(fname))
+ more_content = processor.process_plain_text(item["text"])
+ elif output_type == 'error':
+ raw_traceback = item['traceback']
+ tback_lines = []
+ for raw_line in raw_traceback:
+ internal_lines = raw_line.split('\n')
+ for line in internal_lines:
+ line = re.sub(r"\x1b\[\d.*?m", "", line) # sanitize
+ if set(line) == {'-'}:
+ # ignore separator, as our graphical box already has one
+ continue
+ tback_lines.append(line)
+ more_content = processor.process_plain_text(tback_lines)
else:
raise ValueError("Output type not supported in item {!r}".format(item))
+ result.extend(more_content)
- return '\n'.join(result) + '\n'
+ return '\n'.join(result)
def get(self, cell_idx):
"""Return the content from a specific cell in the notebook.
@@ -99,58 +240,71 @@ class Notebook:
output = self._proc_out(content)
return source, output
+ def parse_cells(self, spec):
+ """Convert the cells spec to a range of ints."""
+ if not spec:
+ raise ValueError("Empty cells spec not allowed")
+
+ maxlen = len(self._cells)
+
+ cells = set()
+ options = {}
+ groups = [x.strip() for x in spec.split(',')]
+ valid_chars = set('0123456789-,')
+ for group in groups:
+ if '=' in group:
+ k, v = group.split("=", maxsplit=1)
+ options[k] = v
+ continue
-def _parse_cells(spec, maxlen):
- """Convert the cells spec to a range of ints."""
- if not spec:
- raise ValueError("Empty cells spec not allowed")
- if set(spec) - set('0123456789-,'):
- raise ValueError(
- "Found forbidden characters in cells definition (allowed digits, '-' and ',')")
-
- cells = set()
- groups = spec.split(',')
- for group in groups:
- if '-' in group:
- cfrom, cto = group.split('-')
- cfrom = 1 if cfrom == '' else int(cfrom)
- cto = maxlen if cto == '' else int(cto)
- if cfrom >= cto:
+ if set(group) - valid_chars:
raise ValueError(
- "Range 'from' need to be smaller than 'to' (got {!r})".format(group))
- cells.update(range(cfrom, cto + 1))
- else:
- cells.add(int(group))
- cells = sorted(cells)
+ "Found forbidden characters in cells definition (allowed digits, '-' and ',')")
+
+ if '-' in group:
+ cfrom, cto = group.split('-')
+ cfrom = 1 if cfrom == '' else int(cfrom)
+ cto = maxlen if cto == '' else int(cto)
+ if cfrom >= cto:
+ raise ValueError(
+ "Range 'from' need to be smaller than 'to' (got {!r})".format(group))
+ cells.update(range(cfrom, cto + 1))
+ else:
+ cells.add(int(group))
+ cells = sorted(cells)
- if any(x < 1 for x in cells):
- raise ValueError("Cells need to be >=1")
- if maxlen < cells[-1]:
- raise ValueError(
- "Notebook loaded of len {}, smaller than requested cells: {}".format(maxlen, cells))
+ if any(x < 1 for x in cells):
+ raise ValueError("Cells need to be >=1")
+ if maxlen < cells[-1]:
+ raise ValueError(
+ f"Notebook loaded of len {maxlen}, smaller than requested cells: {cells}")
- return cells
+ self.cell_options = options
+ return cells
-def main(notebook_path, cells_spec):
+def main(notebook_path, cells_spec, config_options):
"""Main entry point."""
- nb = Notebook(notebook_path)
- cells = _parse_cells(cells_spec, len(nb))
+ nb = Notebook(notebook_path, config_options)
+ cells = nb.parse_cells(cells_spec)
for cell in cells:
try:
src, out = nb.get(cell)
- except Exception:
+ except Exception as exc:
title = "ERROR when parsing cell {}".format(cell)
- print(
- r"\begin{{tcolorbox}}"
- r"[colback=red!5!white,colframe=red!75!,title={{{}}}]".format(title))
- tb = traceback.format_exc()
- print('\n'.join(_verbatimize(tb.split('\n'))))
+ print(r"\begin{{tcolorbox}}[{}, title={{{}}}]".format(FORMAT_ERROR, title))
+ print(exc)
+ _parts = _process_plain_text(REPORT_MSG.split('\n'))
+ print('\n'.join(_parts))
print(r"\end{tcolorbox}")
+
+ # send title and traceback to stderr, which will appear in compilation log
+ tb = traceback.format_exc()
+ print(tb, file=sys.stderr)
continue
- print(r"\begin{{tcolorbox}}[title=Cell {{{:02d}}}]".format(cell))
+ print(r"\begin{{tcolorbox}}[{}, title=Cell {{{:02d}}}]".format(FORMAT_OK, cell))
print(src)
if out:
print(r"\tcblower")
@@ -159,8 +313,19 @@ def main(notebook_path, cells_spec):
if __name__ == "__main__":
- if len(sys.argv) != 3:
- print(__doc__)
- exit()
+ parser = argparse.ArgumentParser()
+ parser.add_argument("notebook_path", type=pathlib.Path, help="The path to the notebook.")
+ parser.add_argument(
+ "cells_spec",
+ type=str,
+ help=(
+ "A string specifying which cells to include; use comma to separate groups, "
+ "dash for ranges (with defaults to start and end)"
+ )
+ )
+ for option, explanation in CMDLINE_OPTION_NAMES.items():
+ parser.add_argument(option, type=str, help=explanation)
+ args = parser.parse_args()
- main(*sys.argv[1:3])
+ config_options = {option: getattr(args, option) for option in CMDLINE_OPTION_NAMES}
+ main(args.notebook_path, args.cells_spec, config_options)
diff --git a/macros/latex/contrib/jupynotex/jupynotex.sty b/macros/latex/contrib/jupynotex/jupynotex.sty
index 205343d097..b79f622af6 100644
--- a/macros/latex/contrib/jupynotex/jupynotex.sty
+++ b/macros/latex/contrib/jupynotex/jupynotex.sty
@@ -1,7 +1,21 @@
-\ProvidesPackage{jupynotex}[0.1]
+\ProvidesPackage{jupynotex}[1.0]
\usepackage{tcolorbox}
+\usepackage{pgfopts}
+
+\newcommand*\jupynotex@outputtextlimit@value{}
+
+
+\pgfkeys{
+ /jupynotex/.cd ,
+ output-text-limit/.store in=\jupynotex@outputtextlimit@value
+}
+
+\ProcessPgfPackageOptions{/jupynotex}
\newcommand{\jupynotex}[2][-]{
- \input|"python3 jupynotex.py #2 #1"
+ \input|"python3 jupynotex.py '#2' '#1' '\jupynotex@outputtextlimit@value'"
}
+
+\endinput
+
diff --git a/macros/latex/contrib/jupynotex/tests/run b/macros/latex/contrib/jupynotex/tests/run
deleted file mode 100755
index a5fa69f44d..0000000000
--- a/macros/latex/contrib/jupynotex/tests/run
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-PYTHONPATH=. fades -d pytest -x pytest -sv "$@"
diff --git a/macros/latex/contrib/jupynotex/tests/test_cellparser.py b/macros/latex/contrib/jupynotex/tests/test_cellparser.py
deleted file mode 100644
index f9108f4bb8..0000000000
--- a/macros/latex/contrib/jupynotex/tests/test_cellparser.py
+++ /dev/null
@@ -1,79 +0,0 @@
-# Copyright 2020 Facundo Batista
-# All Rights Reserved
-# Licensed under Apache 2.0
-
-import pytest
-import re
-
-from jupynotex import _parse_cells
-
-
-def test_empty():
- msg = "Empty cells spec not allowed"
- with pytest.raises(ValueError, match=re.escape(msg)):
- _parse_cells('', 100)
-
-
-def test_simple():
- r = _parse_cells('1', 100)
- assert r == [1]
-
-
-def test_several_comma():
- r = _parse_cells('1,3,5,9,7', 100)
- assert r == [1, 3, 5, 7, 9]
-
-
-def test_several_range():
- r = _parse_cells('1-9', 100)
- assert r == [1, 2, 3, 4, 5, 6, 7, 8, 9]
-
-
-def test_several_limited():
- msg = "Notebook loaded of len 3, smaller than requested cells: [1, 2, 3, 4]"
- with pytest.raises(ValueError, match=re.escape(msg)):
- _parse_cells('1-4', 3)
-
-
-def test_range_default_start():
- r = _parse_cells('-3', 8)
- assert r == [1, 2, 3]
-
-
-def test_range_default_end():
- r = _parse_cells('5-', 8)
- assert r == [5, 6, 7, 8]
-
-
-def test_not_int():
- msg = "Found forbidden characters in cells definition (allowed digits, '-' and ',')"
- with pytest.raises(ValueError, match=re.escape(msg)):
- _parse_cells('1,a', 3)
-
-
-def test_not_positive():
- msg = "Cells need to be >=1"
- with pytest.raises(ValueError, match=re.escape(msg)):
- _parse_cells('3,0', 3)
-
-
-def test_several_mixed():
- r = _parse_cells('1,3,5-7,2,9,11-13', 80)
- assert r == [1, 2, 3, 5, 6, 7, 9, 11, 12, 13]
-
-
-def test_overlapped():
- r = _parse_cells('3,5-7,6-9,8', 80)
- assert r == [3, 5, 6, 7, 8, 9]
-
-
-def test_bad_range_equal():
- msg = "Range 'from' need to be smaller than 'to' (got '12-12')"
- with pytest.raises(ValueError, match=re.escape(msg)):
- _parse_cells('12-12', 80)
-
-
-def test_bad_range_smaller():
- msg = "Range 'from' need to be smaller than 'to' (got '3-2')"
- with pytest.raises(ValueError, match=re.escape(msg)):
- _parse_cells('3-2', 80)
diff --git a/macros/latex/contrib/jupynotex/tests/test_main.py b/macros/latex/contrib/jupynotex/tests/test_main.py
deleted file mode 100644
index fabfa4e01e..0000000000
--- a/macros/latex/contrib/jupynotex/tests/test_main.py
+++ /dev/null
@@ -1,111 +0,0 @@
-# Copyright 2020 Facundo Batista
-# All Rights Reserved
-# Licensed under Apache 2.0
-
-import textwrap
-
-import jupynotex
-from jupynotex import main
-
-
-class FakeNotebook:
- """Fake notebook.
-
- The instance supports calling (as it if were instantiated). The .get will return the
- value in a dict for received key; raise it if exception.
- """
-
- def __init__(self, side_effects):
- self.side_effects = side_effects
-
- def __call__(self, path):
- return self
-
- def __len__(self):
- return len(self.side_effects)
-
- def get(self, key):
- """Return or raise the stored side effect."""
- value = self.side_effects[key]
- if isinstance(value, Exception):
- raise value
- else:
- return value
-
-
-def test_simple_ok(monkeypatch, capsys):
- fake_notebook = FakeNotebook({
- 1: ("test cell content up", "test cell content down"),
- })
- monkeypatch.setattr(jupynotex, 'Notebook', fake_notebook)
-
- main('boguspath', '1')
- expected = textwrap.dedent("""\
- \\begin{tcolorbox}[title=Cell {01}]
- test cell content up
- \\tcblower
- test cell content down
- \\end{tcolorbox}
- """)
- assert expected == capsys.readouterr().out
-
-
-def test_simple_only_first(monkeypatch, capsys):
- fake_notebook = FakeNotebook({
- 1: ("test cell content up", ""),
- })
- monkeypatch.setattr(jupynotex, 'Notebook', fake_notebook)
-
- main('boguspath', '1')
- expected = textwrap.dedent("""\
- \\begin{tcolorbox}[title=Cell {01}]
- test cell content up
- \\end{tcolorbox}
- """)
- assert expected == capsys.readouterr().out
-
-
-def test_simple_error(monkeypatch, capsys):
- fake_notebook = FakeNotebook({
- 1: ValueError("test problem"),
- })
- monkeypatch.setattr(jupynotex, 'Notebook', fake_notebook)
-
- main('boguspath', '1')
-
- # verify the beginning and the end, as the middle part is specific to the environment
- # where the test runs
- expected_ini = [
- r"\begin{tcolorbox}[colback=red!5!white,colframe=red!75!,title={ERROR when parsing cell 1}]", # NOQA
- r"\begin{verbatim}",
- r"Traceback (most recent call last):",
- ]
- expected_end = [
- r"ValueError: test problem",
- r"\end{verbatim}",
- r"\end{tcolorbox}",
- ]
- out = [line for line in capsys.readouterr().out.split('\n') if line]
- assert expected_ini == out[:3]
- assert expected_end == out[-3:]
-
-
-def test_multiple(monkeypatch, capsys):
- fake_notebook = FakeNotebook({
- 1: ("test cell content up", "test cell content down"),
- 2: ("test cell content ONLY up", ""),
- })
- monkeypatch.setattr(jupynotex, 'Notebook', fake_notebook)
-
- main('boguspath', '1-2')
- expected = textwrap.dedent("""\
- \\begin{tcolorbox}[title=Cell {01}]
- test cell content up
- \\tcblower
- test cell content down
- \\end{tcolorbox}
- \\begin{tcolorbox}[title=Cell {02}]
- test cell content ONLY up
- \\end{tcolorbox}
- """)
- assert expected == capsys.readouterr().out
diff --git a/macros/latex/contrib/jupynotex/tests/test_notebook.py b/macros/latex/contrib/jupynotex/tests/test_notebook.py
deleted file mode 100644
index bf6511cbd3..0000000000
--- a/macros/latex/contrib/jupynotex/tests/test_notebook.py
+++ /dev/null
@@ -1,237 +0,0 @@
-# Copyright 2020 Facundo Batista
-# All Rights Reserved
-# Licensed under Apache 2.0
-
-import base64
-import json
-import os
-import pathlib
-import re
-import tempfile
-import textwrap
-
-import pytest
-
-from jupynotex import Notebook
-
-
-@pytest.fixture
-def notebook():
- _, name = tempfile.mkstemp()
-
- def _f(cells):
- with open(name, 'wt', encoding='utf8') as fh:
- json.dump({'cells': cells}, fh)
-
- return Notebook(name)
-
- yield _f
- os.unlink(name)
-
-
-def test_empty(notebook):
- nb = notebook([])
- assert len(nb) == 0
-
-
-def test_source_code(notebook):
- rawcell = {
- 'cell_type': 'code',
- 'source': ['line1\n', ' line2\n'],
- }
- nb = notebook([rawcell])
- assert len(nb) == 1
-
- src, _ = nb.get(1)
- expected = textwrap.dedent("""\
- \\begin{verbatim}
- line1
- line2
- \\end{verbatim}
- """)
- assert src == expected
-
-
-def test_source_markdown(notebook):
- rawcell = {
- 'cell_type': 'markdown',
- 'source': ['line1\n', ' line2\n'],
- }
- nb = notebook([rawcell])
- assert len(nb) == 1
-
- src, _ = nb.get(1)
- expected = textwrap.dedent("""\
- \\begin{verbatim}
- line1
- line2
- \\end{verbatim}
- """)
- assert src == expected
-
-
-def test_output_missing(notebook):
- rawcell = {
- 'cell_type': 'code',
- 'source': [],
- }
- nb = notebook([rawcell])
- assert len(nb) == 1
-
- _, out = nb.get(1)
- assert out is None
-
-
-def test_output_simple_executeresult_plain(notebook):
- rawcell = {
- 'cell_type': 'code',
- 'source': [],
- 'outputs': [
- {
- 'output_type': 'execute_result',
- 'data': {
- 'text/plain': ['default always present', 'line2'],
- },
- },
- ],
- }
- nb = notebook([rawcell])
- assert len(nb) == 1
-
- _, out = nb.get(1)
- expected = textwrap.dedent("""\
- \\begin{verbatim}
- default always present
- line2
- \\end{verbatim}
- """)
- assert out == expected
-
-
-def test_output_simple_executeresult_latex(notebook):
- rawcell = {
- 'cell_type': 'code',
- 'source': [],
- 'outputs': [
- {
- 'output_type': 'execute_result',
- 'data': {
- 'text/latex': ['some latex line', 'latex 2'],
- 'text/plain': ['default always present'],
- },
- },
- ],
- }
- nb = notebook([rawcell])
- assert len(nb) == 1
-
- _, out = nb.get(1)
- expected = textwrap.dedent("""\
- some latex line
- latex 2
- """)
- assert out == expected
-
-
-def test_output_simple_executeresult_image(notebook):
- raw_content = b"\x01\x02 asdlklda3wudghlaskgdlask"
- rawcell = {
- 'cell_type': 'code',
- 'source': [],
- 'outputs': [
- {
- 'output_type': 'execute_result',
- 'data': {
- 'image/png': base64.b64encode(raw_content).decode('ascii'),
- 'text/plain': ['default always present'],
- },
- },
- ],
- }
- nb = notebook([rawcell])
- assert len(nb) == 1
-
- _, out = nb.get(1)
- m = re.match(r'\\includegraphics\{(.+)\}\n', out)
- assert m
- (fpath,) = m.groups()
- assert pathlib.Path(fpath).read_bytes() == raw_content
-
-
-def test_output_simple_stream(notebook):
- rawcell = {
- 'cell_type': 'code',
- 'source': [],
- 'outputs': [
- {
- 'output_type': 'stream',
- 'text': ['some text line', 'text 2'],
- },
- ],
- }
- nb = notebook([rawcell])
- assert len(nb) == 1
-
- _, out = nb.get(1)
- expected = textwrap.dedent("""\
- \\begin{verbatim}
- some text line
- text 2
- \\end{verbatim}
- """)
- assert out == expected
-
-
-def test_output_simple_display_data(notebook):
- raw_content = b"\x01\x02 asdlklda3wudghlaskgdlask"
- rawcell = {
- 'cell_type': 'code',
- 'source': [],
- 'outputs': [
- {
- 'output_type': 'display_data',
- 'data': {
- 'image/png': base64.b64encode(raw_content).decode('ascii'),
- },
- },
- ],
- }
- nb = notebook([rawcell])
- assert len(nb) == 1
-
- _, out = nb.get(1)
- m = re.match(r'\\includegraphics\{(.+)\}\n', out)
- assert m
- (fpath,) = m.groups()
- assert pathlib.Path(fpath).read_bytes() == raw_content
-
-
-def test_output_multiple(notebook):
- rawcell = {
- 'cell_type': 'code',
- 'source': [],
- 'outputs': [
- {
- 'output_type': 'execute_result',
- 'data': {
- 'text/latex': ['some latex line', 'latex 2'],
- },
- }, {
- 'output_type': 'stream',
- 'text': ['some text line', 'text 2'],
- },
- ],
- }
- nb = notebook([rawcell])
- assert len(nb) == 1
-
- _, out = nb.get(1)
- expected = textwrap.dedent("""\
- some latex line
- latex 2
- \\begin{verbatim}
- some text line
- text 2
- \\end{verbatim}
- """)
- assert out == expected
diff --git a/macros/latex/contrib/jwjournal/README.md b/macros/latex/contrib/jwjournal/README.md
index 6185459348..f48c6a8745 100644
--- a/macros/latex/contrib/jwjournal/README.md
+++ b/macros/latex/contrib/jwjournal/README.md
@@ -1,7 +1,9 @@
-<!-- Copyright (C) 2023 by Jinwen XU -->
+<!-- Copyright (C) 2023-2024 by Jinwen XU -->
# `jwjournal`, a personal LaTeX class for writing journals
+> Package dependencies: [`enumitem`](https://ctan.org/pkg/enumitem), [*`einfart`*](https://ctan.org/pkg/minimalist), [`minimalist`](https://ctan.org/pkg/minimalist), [`needspace`](https://ctan.org/pkg/needspace), [`projlib`](https://ctan.org/pkg/projlib), [`tcolorbox`](https://ctan.org/pkg/tcolorbox).
+
## Introduction
A typical journal entry produced by `jwjournal` looks like this:
@@ -25,9 +27,9 @@ Codewise, it is as simple as below:
(( <0.45> {example-image-c}
```
-> It is also possible to write the date as `2023/01/01`.
+> It is also possible to write the date with other separators, such as `2023/01/01` or `2023.01.01`.
-> With the options `month-day-year` or `day-month-year`, you can also write date in the format `mm-dd-yyyy` or `dd-mm-yyyy`, respectively. You may refer to the English and French demo documents for examples.
+> With the options `month-day-year` or `day-month-year`, you can also write date in the format `mm-dd-yyyy` or `dd-mm-yyyy`, respectively. You may refer to the English, French and German demo documents for examples.
Every day of the week has its unique color, like this:
![image](https://github.com/Jinwen-XU/jwjournal/raw/main/screenshots/demo2.png)
@@ -44,7 +46,7 @@ By the way, the conversion from plain date string like `2023-01-01` to natural l
The structure of the document is very simple:
```latex
-\documentclass[11pt, paperstyle = light yellow, color entry]{jwjournal}
+\documentclass[11pt, paperstyle = light yellow, color entry, use indent = false]{jwjournal}
\UseLanguage{⟨language⟩} % For English this line can be omitted.
\begin{document}
@@ -62,6 +64,12 @@ The available class options include:
- `color entry` adds more color to the title of each entry;
- `scroll` turns the scroll mode on, which generates a single-page pdf similar to a long screenshot.
+> There are also some relevant options provided by the base class of `jwjournal`:
+> - `use indent = false`: disable the paragraph indentation and add some space between each paragraph instead.
+> - `use style = ⟨provided style⟩`: select the designing style of the current article; for our purpose here, it is recommended to use the style `classical` (with this the option `use indent = false` is added by default), together with the options `title in boldface` and `title in sffamily`, see the comment below regarding the usage of "Section".
+>
+> You may refer to the demo documents to see their actual usage.
+
Here are the major syntaxes for your main text:
1) Title
- Any line begins with date like `2023-01-01` or `2023/01/01` would be regard as the *Title* line.
@@ -70,7 +78,7 @@ Here are the major syntaxes for your main text:
```
2023-01-01 Sunny | Apartment
```
- > With the options `month-day-year` or `day-month-year`, you can also write date in the format `mm-dd-yyyy` or `dd-mm-yyyy`, respectively. You may refer to the English and French demo documents for examples.
+ > With the options `month-day-year` or `day-month-year`, you can also write date in the format `mm-dd-yyyy` or `dd-mm-yyyy`, respectively. You may refer to the English, French and German demo documents for examples.
1) Note
- Any line begins with something like `[Note]` would be regard as the *Note* line.
- Example:
@@ -241,6 +249,12 @@ Language and date format can both be set in two ways: as class option or with co
### Scroll mode
The scroll mode is achieved by directly accessing `\pdfpageheight` (pdfTeX and XeTeX) or `\pageheight` (LuaTeX). The minimal page height is set to be `10in`. It is worth noting that in order to calculate the height needed, the entire content are put into a single box, which puts a limitation on the length of your document (but this usually wouldn't be a problem).
-# License
+
+## Acknowledgement
+
+The author would like to thank his friend Junzhuo Zhao for his valuable help with the German language. Danke schön!
+
+
+## License
This work is released under the LaTeX Project Public License, v1.3c or later.
diff --git a/macros/latex/contrib/jwjournal/jwjournal-demo-cn.pdf b/macros/latex/contrib/jwjournal/jwjournal-demo-cn.pdf
index 010d83d024..ba83bdf73e 100644
--- a/macros/latex/contrib/jwjournal/jwjournal-demo-cn.pdf
+++ b/macros/latex/contrib/jwjournal/jwjournal-demo-cn.pdf
Binary files differ
diff --git a/macros/latex/contrib/jwjournal/jwjournal-demo-cn.tex b/macros/latex/contrib/jwjournal/jwjournal-demo-cn.tex
index 213bf34d51..639fabf903 100644
--- a/macros/latex/contrib/jwjournal/jwjournal-demo-cn.tex
+++ b/macros/latex/contrib/jwjournal/jwjournal-demo-cn.tex
@@ -14,9 +14,9 @@
在文中出现的日期和标注不会被识别: 2023-12-25、[标注]、【标注】,放心使用!
[文本]
- 你可以使用*斜体*、**粗体**或者***两者结合***。
+ 你可以使用*斜体*、**粗体**或者***两者结合***(具体效果取决于字体设置)。
\\
- 数学模式下的星号不会被识别:
+ 数学模式下的星号不会被识别:$a^* b^*$。
【说明】 % 【...】与 [...] 效果相同
在一些特殊情况需要把星号用 \texttt{\{\}} 隔开:**像**{}***这***{}*样*。
diff --git a/macros/latex/contrib/jwjournal/jwjournal-demo-de.pdf b/macros/latex/contrib/jwjournal/jwjournal-demo-de.pdf
new file mode 100644
index 0000000000..4f4efc58cc
--- /dev/null
+++ b/macros/latex/contrib/jwjournal/jwjournal-demo-de.pdf
Binary files differ
diff --git a/macros/latex/contrib/jwjournal/jwjournal-demo-de.tex b/macros/latex/contrib/jwjournal/jwjournal-demo-de.tex
new file mode 100644
index 0000000000..ac4ff8b96f
--- /dev/null
+++ b/macros/latex/contrib/jwjournal/jwjournal-demo-de.tex
@@ -0,0 +1,118 @@
+\documentclass[11pt, paperstyle=light yellow, color entry, day-month-year,
+ title in boldface, title in sffamily, use style = classical]{jwjournal}
+% "paperstyle = ..." passt die Papierfarbe an, Optionen sind: lightyellow、yellow、parchment、green、lightgray、gray、nord、dark
+% "color entry" fügt dem Titel jedes Eintrags mehr Farbe hinzu
+% "scroll" schaltet den Scroll-Modus ein und kann ein einseitiges PDF ähnlich einem langen Screenshot generieren
+
+\UseLanguage { German }
+
+\begin{document}
+
+
+01.01.2024 Sonnig | Ort
+
+ Im Text erscheinende Daten und Anmerkungen werden nicht erkannt: 25.12.2023, [Anmerkung], können Sie diese ruhig schreiben.
+
+ [Text]
+ Sie können Text in *kursiv*, **fett** oder ***beides*** schreiben.
+ \\
+ Sternchen im Mathematikmodus werden nicht erkannt: $a^* b^*$.
+
+ [Anmerkung] In einigen Sonderfällen kann es notwendig sein, die Sternchen mit~\texttt{\{\}} zu trennen: **genau**{}***wie***{}*dieses*.
+
+ >>> Sie können Text in einen farbigen Block wie diesen einfügen.
+
+ Bilder können eingefügt über:
+
+ || <.4> {example-image} % oder || {example-image} <.4>
+ >> (Anmerkung zum Bild)
+ >> (Weitere Bemerkung...)
+
+ +++
+ Sie können das Bild auch links oder rechts anzeigen:
+ (( <.4> {example-image-a} % oder (( {example-image-a} <.4>
+ -> <.3> % fügen Sie etwas vertikalen Abstand hinzu, hier ist „0.3\baselineskip“
+ )) <.4> {example-image-b} % oder )) {example-image-b} <.4>
+
+
+## {\textsc{Ein neuer Abschnitt}}
+
+02.01.2024
+Unbekannt (das Wetter kann je nach Wunsch auch in die zweite Zeile geschrieben werden)
+
+ Die Farbe der Beschriftungen ändert sich je nach Datum und langer Text wird automatisch umbrochen und eingerückt:
+
+ [Hinweis] Ich habe heute nicht gelernt, aber ich habe sehr, sehr, sehr, sehr, sehr, sehr, sehr, sehr, sehr, sehr, sehr viel Code geschrieben: `Inline-Code`.
+
+ [Achtung] Sonderzeichen im Inline-Code müssen maskiert werden. Beispielsweise sollte `\textbackslash` als `\textbackslash textbackslash` geschrieben werden, `\{` sollte als `\textbackslash\{` geschrieben werden, `\%` sollte als `\textbackslash\%` geschrieben werden usw.
+
+ -----
+
+ Drei oder mehr \textquote{\texttt{-}} in einem separaten Absatz ergeben eine Trennlinie ---
+
+ ---
+
+ --- aber die aktuelle Zeile wird nicht abgeglichen, da sich hinter \texttt{-}\texttt{-}\texttt{-} zusätzlicher Text befindet.
+
+ -----
+
+ Wenn auf die Beschriftung mehrere Absätze folgen, können Sie \texttt{\textbackslash\textbackslash} und \texttt{\slash\slash} verwenden, um sie zu verketten, sodass alle Texte richtig eingerückt werden:
+
+ [Beschriftung] Etwas Text.
+ //
+ Mehr Text (mit \texttt{\slash\slash}, also mit etwas vertikalem Abstand zum obigen Text).
+ //
+ Mehr Text (dasselbe, mit etwas vertikalem Abstand zum obigen Text).
+ //
+ (Einige Anmerkungen)
+ \\
+ (Eine weitere Anmerkung, die aufgrund der Verwendung von \texttt{\textbackslash\textbackslash} direkt neben der obigen Anmerkung)
+ \\
+ (Weitere Anmerkungen --- ähnlich, direkt neben der obigen Anmerkung)
+
+
+
+03.01.2024
+
+ [Anmerkung] Wenn nur das Datum geschrieben wird, dann gäbe es kein zweites Trennzeichen danach.
+
+
++++
+04.01.2024 Bewölkt
+
+ Drei Pluszeichen \texttt{+++} können die aktuelle Seite um etwa eine Zeile vergrößern. Manchmal fallen ein einzelner Satz oder ein paar Wörter auf die nächste Seite --- in solchen Fällen können Sie es verwenden, um den Anzeigeeffekt zu verbessern.
+
+
+
+05.01.2024 Bewölkt --- Arbeit zu Hause
+===============================================
+
+Sie können Ihren Code auch so organisieren.
+
+
+==========
+06.01.2024 Sonnig --- Arbeit zu Hause
+==========
+
+Oder so...
+
+
+
+07.01.2024 Bewölkt
+
+ ...
+
+
+
+08.01.2024 Bewölkt
+
+ Eine Woche später wird die Farbe wieder auf die vorherige zurückgesetzt.
+
+
+
+09.01.2024 Bewölkt
+
+ ...
+
+
+\end{document}
diff --git a/macros/latex/contrib/jwjournal/jwjournal.cls b/macros/latex/contrib/jwjournal/jwjournal.cls
index 3b968ce12e..3e84c935ba 100644
--- a/macros/latex/contrib/jwjournal/jwjournal.cls
+++ b/macros/latex/contrib/jwjournal/jwjournal.cls
@@ -1,6 +1,6 @@
%%
-%% Copyright (C) 2023 by Jinwen XU
-%% -------------------------------
+%% Copyright (C) 2023-2024 by Jinwen XU
+%% ------------------------------------
%%
%% This file may be distributed and/or modified under the conditions of
%% the LaTeX Project Public License, either version 1.3c of this license
@@ -12,7 +12,7 @@
\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplClass
{jwjournal}
- {2023/12/19} {}
+ {2024/09/01} {}
{JW's journal class}
\keys_define:nn { jwjournal }
@@ -33,11 +33,11 @@
\sys_if_engine_pdftex:TF
{
- \PassOptionsToClass { use indent = false } { minimart }
+ % \PassOptionsToClass { use indent = false } { minimart }
\LoadClass { minimart }
}
{
- \PassOptionsToClass { use indent = false } { einfart }
+ % \PassOptionsToClass { use indent = false } { einfart }
\LoadClass { einfart }
}
@@ -554,14 +554,14 @@
}
\regex_replace_once:nnN { ❄️ (.*) ❄️ } { ❄️ \1 } \l_jwjournal_tmp_tl
- \regex_replace_once:nnN
- { ❄️ (\ *)? (\d{4}-\d{1,2}-\d{1,2}) (\ *)? (.*) }
- { \c{JWJournalEntry} {\2} {\4} }
- \l_jwjournal_tmp_tl
- \regex_replace_once:nnN
- { ❄️ (\ *)? (\d{1,2}-\d{1,2}-\d{4}) (\ *)? (.*) }
- { \c{JWJournalEntry} {\2} {\4} }
- \l_jwjournal_tmp_tl
+ % \regex_replace_once:nnN
+ % { ❄️ (\ *)? (\d{4}-\d{1,2}-\d{1,2}) (\ *)? (.*) }
+ % { \c{JWJournalEntry} {\2} {\4} }
+ % \l_jwjournal_tmp_tl
+ % \regex_replace_once:nnN
+ % { ❄️ (\ *)? (\d{1,2}-\d{1,2}-\d{4}) (\ *)? (.*) }
+ % { \c{JWJournalEntry} {\2} {\4} }
+ % \l_jwjournal_tmp_tl
\regex_replace_once:nnN
{ ❄️ (\ *)? (\d{4} \D \d{1,2} \D \d{1,2}) (\ *)? (.*) }
{ \c{JWJournalEntry} {\2} {\4} }
diff --git a/macros/latex/contrib/keytheorems/CHANGELOG.md b/macros/latex/contrib/keytheorems/CHANGELOG.md
new file mode 100644
index 0000000000..effaaf9962
--- /dev/null
+++ b/macros/latex/contrib/keytheorems/CHANGELOG.md
@@ -0,0 +1,38 @@
+# Changelog for keytheorems package
+
+## [v0.1.5]
+- add `format-code` list key
+- can now use `\thmname`, `\thmnumber`, `\thmnote` in `headformat`
+
+## [v0.1.4]
+- add `store-sets-label` option
+- add `restatable*` environment for `thmtools-compat`
+- add `numberfont` style key
+- add `restate-keys` key
+- styles defined with `\newkeytheoremstyle` now work as expected with `\theoremstyle`
+
+## [v0.1.3]
+- add `noteseparator` key
+- add `\IfRestatingT`, `\IfRestatingF`
+- add `store*` key
+- add Portuguese translations
+
+## [v0.1.2]
+- Move support for memoir and AMS classes to dedicated files
+- document `headformat` key
+- add Italian translations
+- add `indent` list key
+- add `no-toc` list key
+- documentation improvements
+
+## [v0.1.1] - 2024-09-09
+- First CTAN release
+
+## 0.1.0 - 2024-09-04
+- First release
+
+[v0.1.5]: https://github.com/mbertucci47/keytheorems/compare/v0.1.4...v0.1.5
+[v0.1.4]: https://github.com/mbertucci47/keytheorems/compare/v0.1.3...v0.1.4
+[v0.1.3]: https://github.com/mbertucci47/keytheorems/compare/v0.1.2...v0.1.3
+[v0.1.2]: https://github.com/mbertucci47/keytheorems/compare/v0.1.1...v0.1.2
+[v0.1.1]: https://github.com/mbertucci47/keytheorems/compare/v0.1.0...v0.1.1 \ No newline at end of file
diff --git a/macros/latex/contrib/keytheorems/README.md b/macros/latex/contrib/keytheorems/README.md
new file mode 100644
index 0000000000..a16bfc2303
--- /dev/null
+++ b/macros/latex/contrib/keytheorems/README.md
@@ -0,0 +1,612 @@
+# keytheorems
+
+A LaTeX package to use [`amsthm`](https://www.ctan.org/pkg/amsthm)
+with a key-value interface. Meant to emulate most of the functionality of
+[`thmtools`](https://www.ctan.org/pkg/thmtools) but written in expl3. If you
+find a bug please open an issue or pull request.
+
+The package is maintained by Matthew Bertucci.
+
+## Sample document
+```tex
+\documentclass{article}
+\usepackage{amssymb,amsmath}
+\usepackage{keytheorems}
+\usepackage{hyperref}
+
+\newkeytheoremstyle{mystyle}{
+ % <insert options>
+ }
+\newkeytheorem{theorem}[
+ style=mystyle,
+ parent=section
+ ]
+\newkeytheorem{remark}[
+ style=remark,
+ numbered=no
+ ]
+
+\begin{document}
+
+\section{Some theorems}
+
+\begin{theorem}[
+ note=Strong Bertini over $\mathbb{C}$,
+ label=strongbertini
+ ]
+Let $X$ be a smooth complex variety and let $\mathfrak{D}$ be a positive
+dimensional linear system on $X$. Then the general element of $\mathfrak{D}$ is
+smooth away from the base locus $B_{\mathfrak{D}}$. That is, the set
+ \[\{H\in\mathfrak{D}\mid D_H \text{ is smooth away from } B_{\mathfrak{D}}\}\]
+is a Zariski dense open subset of $\mathfrak{D}$.
+\end{theorem}
+
+\begin{remark}
+In fact, \autoref{strongbertini} holds over any algebraically closed field of
+characteristic zero.
+\end{remark}
+
+\begin{theorem}[Bertini over any field]
+Let $X\subset\mathbb{P}_k^n$ be a smooth projective variety over a field $k$.
+Then the set of hyperplanes $H\subseteq\mathbb{P}_k^n$ such that $X\cap H$ is
+smooth is a Zariski dense open subset of $(\mathbb{P}_k^n)^*$.
+\end{theorem}
+
+\listofkeytheorems
+
+%%% compare with
+%\listofkeytheorems[ignoreall,show=theorem]
+%\listofkeytheorems[swapnumber]
+%\listofkeytheorems[title=BLUB]
+%\listofkeytheorems[print-body] % needs 'store-all' package option
+
+\end{document}
+```
+
+## Documentation
+There is a list of commands and keys offered by the package
+[here](https://github.com/mbertucci47/keytheorems/blob/main/doc/keytheorems-doc.pdf).
+More of a reference document than documentation.
+
+## Differences with thmtools
+
+Some of the code is a direct translation from thmtools but a few things are changed:
+- The only backend supported is amsthm, and it is loaded by the package. As I understand it,
+ [`ntheorem`](https://www.ctan.org/pkg/ntheorem) has quite a few bugs and no active development, and
+ if you're just using the kernel `\newtheorem` then you don't need a package like this.
+- Theorem hooks use the kernel hooks. Thus unlike the `prefoot` and `postfoot` hooks of
+ thmtools, all code chunks are added to hooks in the order declared (unless given a
+ distinct label; then the chunks are reversed). The order of generic/specific hooks
+ remains the same. Furthermore, the command for adding to theorem hooks is `\addtotheoremhook{<hook name>}{<theorem name>}`.
+- thmtools changes some style settings to be default that are different from
+ amsthm defaults, but only if a custom style is called. Example:
+ ```tex
+ \declaretheoremstyle[spaceabove=20pt]{mythmsty}
+ \declaretheorem[style=mythmsty]{mythm}
+ ```
+
+ is different from just
+
+ ```tex
+ \declaretheorem{mythm}
+ ```
+
+ as in the former, `bodyfont` is `\normalfont`, not the default `\itshape`.
+ This package keeps the defaults unless a key is specifically given.
+- There is no `restatable(*)` environment except with package option `thmtools-compat`. Use the
+ `store` (alias `restate`) key. For counters and labels pointing to the restated theorem,
+ use `store*` (alias `restate*`).
+- Rather than `restate=foo` defining a command `\foo*`, theorems are retrieved with `\getkeytheorem{foo}`.
+ For just the theorem body, use `\getkeytheorem[body]{foo}`. Also, this retrieval
+ can happen even before the theorem is stated since keytheorems writes the contents
+ to a file.
+- The `shaded` and `thmbox` keys are only available with the package option `thmtools-compat`,
+ and they are emulated with [`tcolorbox`](https://www.ctan.org/pkg/tcolorbox). Instead there's
+ an interface to tcolorbox with the `tcolorbox={<options>}` and `tcolorbox-no-titlebar={<options>}` key.
+ The `mdframed` key is not implemented.
+- You can reuse styles with the `inherit-style` key.
+- With thmtools, the command `\newtheorem{<envname>}{<heading>}` is changed to behave like
+ `\declaretheorem[name=<heading>]{<envname>}`. This is not the default here. Instead either
+ only use the new interface or load the package with option `overload`.
+- Adds several new keys (see doc for details).
+
+## thmtools issues resolved by keytheorems
+Issues from the thmtools [github page](https://github.com/muzimuzhi/thmtools),
+with corresponding keytheorems code that shows the issue resolved.
+### [\listoftheorems: filter out restated ones #7](https://github.com/muzimuzhi/thmtools/issues/7)
+keytheorems does not list restated theorems in the `\listofkeytheorems`.
+```tex
+\documentclass{article}
+\usepackage{keytheorems}
+
+\newkeytheorem{theorem}
+
+\begin{document}
+
+\begin{theorem}[store=foo]
+text
+\end{theorem}
+
+\getkeytheorem{foo}
+
+\listofkeytheorems
+
+\end{document}
+```
+
+### [\listoftheorems: hide title #8](https://github.com/muzimuzhi/thmtools/issues/8)
+keytheorems provides the `no-title` key.
+```tex
+\documentclass{article}
+\usepackage{keytheorems}
+
+\newkeytheorem{axiom}
+\newkeytheorem{theorem}
+
+\begin{document}
+
+\listofkeytheorems[ignoreall,show=axiom]
+\listofkeytheorems[ignoreall,show=theorem,no-title]
+
+\begin{axiom}
+some axiom
+\end{axiom}
+
+\begin{theorem}
+some theorem
+\end{theorem}
+
+\begin{axiom}
+another axiom
+\end{axiom}
+
+\begin{theorem}
+another theorem
+\end{theorem}
+
+\end{document}
+```
+
+### [Case in point: the tcolorbox key #9](https://github.com/muzimuzhi/thmtools/issues/9)
+keytheorems provides the `tcolorbox` and `tcolorbox-no-titlebar` keys.
+```tex
+\documentclass{article}
+\usepackage{keytheorems}
+
+\newkeytheorem{theorem}[
+ tcolorbox={
+ colback=blue!10,
+ colframe=blue!75
+ }
+ ]
+\newkeytheorem{corollary}[
+ tcolorbox-no-titlebar={colback=red!10}
+ ]
+
+\begin{document}
+
+\begin{theorem}
+some theorem
+\end{theorem}
+
+\begin{corollary}
+some corollary
+\end{corollary}
+
+\end{document}
+```
+
+### [thm-listof: document \thmtformatoptarg, new list option? #14](https://github.com/muzimuzhi/thmtools/issues/14)
+keytheorems provides the `note-code` key for `\listofkeytheorems` and
+`\keytheoremlistset`.
+```tex
+\documentclass{article}
+\usepackage{keytheorems}
+
+\newkeytheorem{theorem}
+
+\begin{document}
+
+\begin{theorem}[my heading]
+some theorem
+\end{theorem}
+
+\listofkeytheorems[note-code={ [\textit{#1}]}]
+
+\end{document}
+```
+
+### [Style inheritance in thmtools #15](https://github.com/muzimuzhi/thmtools/issues/15)
+keytheorems provides the `inherit-style` key.
+```tex
+\documentclass{article}
+\usepackage{keytheorems}
+
+\newkeytheoremstyle{mysty1}{notefont=\itshape}
+\newkeytheoremstyle{mysty2}{inherit-style=mysty1,bodyfont=\normalfont}
+\newkeytheorem{theorem}[style=mysty1]
+\newkeytheorem{corollary}[style=mysty2]
+
+\begin{document}
+
+\begin{theorem}[my heading]
+some theorem
+\end{theorem}
+
+\begin{corollary}[my heading]
+some corollary
+\end{corollary}
+
+\end{document}
+```
+
+### [Restate without theorem headings (head + note) #19](https://github.com/muzimuzhi/thmtools/issues/19)
+Use `\getkeytheorem[body]{foo}`.
+```tex
+\documentclass{article}
+\usepackage{keytheorems}
+
+\newkeytheorem{theorem}
+
+\begin{document}
+
+\begin{theorem}[store=hello]
+Hello!
+\end{theorem}
+
+\getkeytheorem{hello}
+
+\section{\getkeytheorem[body]{hello}}
+
+\end{document}
+```
+
+### [Option clash: numbered=no and thmbox #25](https://github.com/muzimuzhi/thmtools/issues/25)
+Fixed with keytheorem's implementation of the `thmbox` key with `thmtools-compat`.
+```tex
+\documentclass{article}
+\usepackage[thmtools-compat]{keytheorems}
+
+\declaretheorem[numbered=no, name=TheoremA, ]{mytheo1}
+\declaretheorem[ name=TheoremB, thmbox=M]{mytheo2}
+\declaretheorem[numbered=no, name=TheoremC, thmbox=M]{mytheo3}
+
+\begin{document}
+
+\begin{mytheo1}
+ test1
+\end{mytheo1}
+
+\begin{mytheo2}
+ test2
+\end{mytheo2}
+
+\begin{mytheo3}
+ test3
+\end{mytheo3}
+
+\end{document}
+```
+
+### [Skip the title of the theorem but leave the []. #30](https://github.com/muzimuzhi/thmtools/issues/30)
+Fixed in keytheorems.
+```tex
+\documentclass{article}
+\usepackage{keytheorems}
+
+\newkeytheorem{Teorema}[name=Theorem]
+
+\begin{document}
+
+\begin{Teorema}
+ body
+\end{Teorema}
+
+\begin{Teorema}[]
+ body
+\end{Teorema}
+
+\begin{Teorema}[title]
+ body
+\end{Teorema}
+
+\end{document}
+```
+
+### [too much space with restatable #40](https://github.com/muzimuzhi/thmtools/issues/40)
+Fixed in keytheorems.
+```tex
+\documentclass{article}
+\usepackage{keytheorems}
+\usepackage{kantlipsum}
+
+\newkeytheorem{theorem}
+
+\begin{document}
+
+\begin{theorem}
+\kant[2][1]
+\end{theorem}
+
+\begin{theorem}[store=foo]
+\kant[1][2]
+\end{theorem}
+
+\begin{theorem}
+\kant[2][1]
+\end{theorem}
+
+\getkeytheorem{foo}
+
+\end{document}
+```
+
+### [restate key with no name leads to (,) in restated title #41](https://github.com/muzimuzhi/thmtools/issues/41)
+Fixed in keytheorems.
+```tex
+\documentclass{article}
+\usepackage{keytheorems}
+\usepackage{kantlipsum}
+
+\newkeytheorem{theorem}
+
+\begin{document}
+
+\begin{theorem}[restate=foo]
+\kant[1][2]
+\end{theorem}
+
+\getkeytheorem{foo}
+
+\begin{theorem}[restate=foobar,name=Heading]
+\kant[2][1]
+\end{theorem}
+
+\getkeytheorem{foobar}
+
+\end{document}
+```
+### [[Help Wanted] Print all Theorems? #43](https://github.com/muzimuzhi/thmtools/issues/43)
+Use the `store-all` load-time option with `\listofkeytheorems[print-body]`.
+```tex
+\documentclass{article}
+\usepackage[store-all]{keytheorems}
+
+\newkeytheorem{theorem}
+\newkeytheorem{lemma}
+
+\begin{document}
+
+\begin{theorem}
+some theorem
+\end{theorem}
+
+\begin{lemma}
+some lemma
+\end{lemma}
+
+\listofkeytheorems[print-body]
+
+\end{document}
+```
+
+### [qed option without value fails in \declaretheoremstyle #47](https://github.com/muzimuzhi/thmtools/issues/47)
+Fixed in keytheorems.
+```tex
+\documentclass{article}
+\usepackage{keytheorems}
+
+\newkeytheoremstyle{mythmsty}{qed}
+\newkeytheorem{theorem}[style=mythmsty]
+
+\begin{document}
+
+\begin{theorem}
+Text
+\end{theorem}
+
+\end{document}
+```
+
+### [prefoot and postfoot hooks called twice with restate key #54](https://github.com/muzimuzhi/thmtools/issues/54)
+Fixed in keytheorems.
+```tex
+\documentclass{article}
+\usepackage{keytheorems}
+
+\newkeytheorem{theorem}
+
+\addtotheoremhook{prehead}{PREHEAD}
+\addtotheoremhook{posthead}{POSTHEAD}
+\addtotheoremhook{prefoot}{PREFOOT}
+\addtotheoremhook{postfoot}{POSTFOOT}
+
+\begin{document}
+
+\begin{theorem}
+body text
+\end{theorem}
+
+\begin{theorem}[store=foo]
+body text
+\end{theorem}
+
+\end{document}
+```
+
+### [restate key incompatible with beamer #58](https://github.com/muzimuzhi/thmtools/issues/58)
+```tex
+\documentclass{beamer}
+\setbeamertemplate{theorems}[numbered]
+\usepackage{keytheorems}
+
+\newkeytheorem{MyTheorem}
+
+\begin{document}
+
+\begin{frame}
+\begin{MyTheorem}[restate=foo]
+text
+\end{MyTheorem}
+
+\getkeytheorem{foo}
+\end{frame}
+
+\end{document}
+```
+
+## Things to do
+
+- Clean up the code. Things are out of order, poorly named, etc.
+- Add more error messages.
+- thmtools features not yet implemented
+ - real [`beamer`](https://ctan.org/pkg/beamer) support
+ - certainly more
+- For a complete list, see [`keytheorems-ideas.md`](https://github.com/mbertucci47/keytheorems/blob/main/keytheorems-ideas.md)
+
+## Notes/issues on thmtools, not on Github
+
+### continues with unless unique and restate
+Should this be numbered or not?
+```tex
+\documentclass{article}
+\usepackage{amsthm,thmtools}
+
+\declaretheorem[numbered=unless unique]{theorem}
+
+\begin{document}
+
+\begin{theorem}[label=foo]
+bla
+\end{theorem}
+
+\begin{theorem}[continues=foo]
+bla
+\end{theorem}
+
+\end{document}
+```
+It does the correct thing when a parent counter is given and is split across that counter.
+```tex
+\documentclass{article}
+\usepackage{amsthm,thmtools}
+
+\declaretheorem[numbered=unless unique,parent=section]{theorem}
+
+\begin{document}
+
+\begin{theorem}[label=foo]
+bla
+\end{theorem}
+
+\section{bla}
+
+\begin{theorem}[continues=foo]
+bla
+\end{theorem}
+
+\end{document}
+```
+Also adds a number if restated, which seems wrong.
+```tex
+\documentclass{article}
+\usepackage{amsthm,thmtools}
+
+\declaretheorem[numbered=unless unique]{theorem}
+
+\begin{document}
+
+\begin{restatable}{theorem}{foo}
+bla
+\end{restatable}
+
+\foo*
+
+\end{document}
+```
+
+### qed in both `\declaretheoremstyle` and `\declaretheorem`
+One would expect the one in `\declaretheorem` to overwrite, but because the code just adds to the hooks without checking,
+it's additive.
+```tex
+\documentclass{article}
+\usepackage{amsthm,thmtools}
+
+\declaretheoremstyle[qed=$\clubsuit$]{mysty}
+\declaretheorem[style=mysty,qed]{theorem}
+
+\begin{document}
+
+\begin{theorem}
+bla
+\end{theorem}
+
+\end{document}
+```
+
+### restate incompatible with thmbox
+```tex
+\documentclass{article}
+\usepackage{amsthm,thmtools}
+
+\declaretheorem[thmbox]{theorem}
+
+\begin{document}
+
+\begin{theorem}[restate=foo]
+bla
+\end{theorem}
+
+\foo*
+
+\end{document}
+```
+
+### adding to listoftheorems doesn't work as expected
+```tex
+\documentclass{article}
+\usepackage{amsthm,thmtools}
+
+\declaretheorem{theorem}
+
+\begin{document}
+
+\begin{theorem}
+bla
+\end{theorem}
+
+\addcontentsline{loe}{section}{some text}
+
+\begin{theorem}
+bla
+\end{theorem}
+
+\listoftheorems
+
+\end{document}
+```
+
+### new theorem styles do not preserve "plain" keys
+With keytheorems, this is handled only for the AMS classes and acmart.
+```tex
+\documentclass{amsbook}
+\usepackage{thmtools}
+
+\declaretheoremstyle[bodyfont=\upshape]{upsty}
+\declaretheorem{theorem}
+\declaretheorem[style=upsty]{lemma}
+
+\begin{document}
+
+\begin{theorem}
+blub
+\end{theorem}
+
+\begin{lemma}
+blub
+\end{lemma}
+
+\end{document}
+```
+## License
+Released under the LaTeX Project Public License v1.3c or later. See https://www.latex-project.org/lppl.txt. \ No newline at end of file
diff --git a/macros/latex/contrib/keytheorems/doc/keytheorems-doc.pdf b/macros/latex/contrib/keytheorems/doc/keytheorems-doc.pdf
new file mode 100644
index 0000000000..2b00e587c9
--- /dev/null
+++ b/macros/latex/contrib/keytheorems/doc/keytheorems-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/keytheorems/doc/keytheorems-doc.tex b/macros/latex/contrib/keytheorems/doc/keytheorems-doc.tex
new file mode 100644
index 0000000000..42c22187fd
--- /dev/null
+++ b/macros/latex/contrib/keytheorems/doc/keytheorems-doc.tex
@@ -0,0 +1,1122 @@
+% !TeX program = txs:///lualatex | txs:///makeindex | txs:///lualatex | txs:///view-pdf
+\PassOptionsToPackage{hyperindex}{hyperref}
+\PassOptionsToPackage{dvipsnames}{xcolor}
+\documentclass{ltxdoc}
+\usepackage{geometry}
+\geometry{margin=1in}
+\usepackage{tcolorbox}
+\PassOptionsToPackage{highlightmode=immediate}{minted}
+\tcbuselibrary{documentation,minted}
+\tcbset{
+ listing engine=minted,
+ minted language=latex,
+ }
+\ifTUTeX
+\usepackage{newcomputermodern}
+\else
+\usepackage{lmodern}
+\usepackage[T1]{fontenc}
+\usepackage{amssymb}
+\fi
+\usetikzlibrary{cd}
+\usepackage{booktabs}
+\usepackage{keytheorems}
+\usepackage{cleveref}
+
+\def\version{0.1.5}
+
+\title{%
+ \pkg{keytheorems} package \\[1ex]
+ \large version \version \\[1ex]
+ \href{https://github.com/mbertucci47/keytheorems}
+ {\texttt{github.com/mbertucci47/keytheorems}}
+ }
+\author{Matthew Bertucci}
+
+\newkeytheoremstyle{breaksty}{break}
+\newkeytheorem{theorem}
+\newkeytheorem{mythm}[name=Some Name]
+\newkeytheorem{theorem*}[name=Theorem,numbered=false]
+\newkeytheorem{conjecture}[parent=section]
+\newkeytheorem{lemma}[sibling=theorem]
+\newkeytheorem{test}[
+ preheadhook=PREHEAD,
+ postheadhook=POSTHEAD,
+ prefoothook=PREFOOT,
+ postfoothook=POSTFOOT
+]
+\newkeytheorem{prop}[
+ name=Proposition,
+ refname={proposition,propositions},
+ Refname={Proposition,Propositions}
+ ]
+\newkeytheorem{example}[qed]
+\newkeytheorem{solution}[qed=$\clubsuit$]
+\newkeytheorem{remark}[style=remark]
+\tcbset{
+ defstyle/.style={arc=0mm,colback=blue!5!white,colframe=blue!75!black},
+ thmstyle/.style={colback=green!5,colframe=green!35!black},
+ }
+\newkeytheoremstyle{tcb-standard}{
+ tcolorbox=thmstyle,
+ headpunct={},
+ notebraces={}{},
+ noteseparator={: },
+ notefont=\bfseries,
+ bodyfont=\normalfont,
+ }
+\newkeytheorem{mytheo}[name=My Theorem,style=tcb-standard]
+\newkeytheorem{corollary}[tcolorbox]
+\newkeytheorem{definition}[
+ style=definition,
+ tcolorbox={defstyle}
+ ]
+\newkeytheorem{boxcor}[
+ tcolorbox-no-titlebar={colback=red!10},
+ name=Corollary,
+ sibling=corollary,
+ ]
+\newkeytheorem{observation}[style=breaksty]
+
+\MakeShortVerb{\|}
+\newcommand{\env}{\texttt}
+\newcommand{\hook}{\texttt}
+\NewCommandCopy{\braces}{\brackets}
+\newcommand{\bracks}[1]{\texttt{[#1]}}
+\newcommand{\ttbraces}[1]{\braces{\texttt{#1}}}
+%\tcbset{index gather commands=false}
+\tcbset{
+ color command=BrickRed,
+ color key=Fuchsia,
+ color value=teal,
+ before doc body={%
+ \setlength{\parindent}{15pt}
+ \noindent
+ },
+ }
+\tcbset{
+ withpreamble/.style = {
+ before upper = {%
+ {\ttfamily\itshape \% preamble}%
+ \vspace{-0.7\baselineskip}%
+ \tcbusetemplisting%
+ {\ttfamily\itshape \% document}%
+ \vspace{-0.7\baselineskip}%
+ }
+ }
+ }
+
+\NewTCBListing{keythmscode}{ O{} }
+ {
+ colback=yellow!10!white,
+ colframe=blue!50!black,
+ boxrule=0.4pt,
+ listing side text,
+ #1
+ }
+
+\NewTCBListing{keycode}{ }
+ {
+ colback=yellow!10!white,
+ colframe=blue!50!black,
+ boxrule=0.4pt,
+ listing side text,
+ }
+\newtcolorbox{notebox}[1][]{enhanced,
+ before skip balanced=2mm,after skip balanced=4mm,
+ boxrule=0.4pt,left=5mm,right=2mm,top=1mm,bottom=1mm,
+ colback=red!20,
+ colframe=red!40!black,
+ sharp corners,rounded corners=southeast,arc is angular,arc=3mm,
+ underlay={%
+ \path[fill=tcbcolback!80!black] ([yshift=3mm]interior.south east)--++(-0.4,-0.1)--++(0.1,-0.2);
+ \path[draw=tcbcolframe,shorten <=-0.05mm,shorten >=-0.05mm] ([yshift=3mm]interior.south east)--++(-0.4,-0.1)--++(0.1,-0.2);
+ \path[fill=red!40!black,draw=none] (interior.south west) rectangle node[white]{\LARGE\bfseries !} ([xshift=4mm]interior.north west);
+ },
+ drop fuzzy shadow,#1}
+\makeatletter
+% allow for optional argument specifying printed text, mostly for starred keys
+\RenewDocumentCommand\tcb@ref@doc{msom}{%
+ \hyperref[{#1:#4}]{%
+ \IfValueTF{#3}{\texttt{#3}}{\texttt{\ref*{#1:#4}}}%
+ \IfBooleanTF{#2}{}{%
+ \ifnum\getpagerefnumber{#1:#4}=\thepage\relax%
+ \else%
+ \kvtcb@doc@format@page{{\fontfamily{pzd}\fontencoding{U}\fontseries{m}\fontshape{n}\selectfont\char213}%
+ \,\kvtcb@text@pageshort\,\pageref*{#1:#4}}%
+ \fi}}%
+}
+\makeatother
+\makeindex
+
+\begin{document}
+
+\maketitle
+
+\begin{abstract}
+An \pkg{expl3}-implementation of a key-value interface to \pkg{amsthm}, implementing most of the functionality provided by \pkg{thmtools}.
+Several issues encountered with \pkg{thmtools} are avoided (see the README for a list) and a few new features are added.
+\end{abstract}
+
+\tableofcontents
+
+\section{Dependencies}
+
+Without using the \refKey{tcolorbox} or \refKey{tcolorbox-no-titlebar} options, the package loads the \pkg{aliascnt}, \pkg{amsthm}, \pkg{refcount}, \pkg{translations}, and \pkg{unique} packages.
+A \LaTeX{} kernel no older than 2023-06-01 is required; if older than 2024-06-01, \pkg{nameref} is required.
+
+\section{Global options}
+
+\begin{docCommand}{keytheoremset}
+ {\marg{options}}
+Every key in this section can be given as a package option with \cs{usepackage}\bracks{\meta{options}}\ttbraces{keytheorems} or in \cs{keytheoremset}\marg{options}, with the exception that \refKey{continues-code} can only be used in the latter.
+\end{docCommand}
+
+\subsection{Compatibility options}
+
+\begin{docKey}{overload}
+ {}
+ {initially unset}
+Redefines \cs{newtheorem} to internally use the \pkg{keytheorems} machinery. The syntax remains the same.
+This is automatically set by \refKey{thmtools-compat}.
+\end{docKey}
+
+\begin{docKey}{thmtools-compat}
+ {}
+ {initially unset}
+For compatibility with \pkg{thmtools} syntax.
+For most documents, \cs{usepackage}\bracks{thmtools-compat}\ttbraces{keytheorems} should be a drop-in replacement for \cs{usepackage}\ttbraces{amsthm,thmtools}.
+The option defines the commands in the left column below.
+The right column lists the corresponding \pkg{keytheorems} replacement that should be used in new documents.
+\begin{center}
+\begin{tabular}{rcl}
+\multicolumn{1}{c}{\pkg{thmtools} command} & & \multicolumn{1}{c}{\pkg{keytheorems} replacement} \\
+\toprule
+\docAuxCommand*{declaretheorem} & $\rightarrow$ & \refCom{newkeytheorem} \\
+\docAuxCommand*{declaretheoremstyle} & $\rightarrow$ & \refCom{newkeytheoremstyle} \\
+\docAuxCommand*{listoftheorems} & $\rightarrow$ & \refCom{listofkeytheorems} \\
+\docAuxCommand*{listtheoremname} & $\rightarrow$ & \refKey{title} key \\
+\begin{tabular}{r@{}}
+\docAuxCommand*{addtotheorempreheadhook}\\
+\docAuxCommand*{addtotheorempostheadhook}\\
+\docAuxCommand*{addtotheoremprefoothook}\\
+\docAuxCommand*{addtotheorempostfoothook}\\
+\end{tabular} & $\rightarrow$ & \refCom{addtotheoremhook} \\
+\docAuxEnvironment*{restatable} environment & $\rightarrow$ & \refKey{store} key \\
+\docAuxEnvironment*{restatable*} environment & $\rightarrow$ & \refKey[store*]{store} key
+\end{tabular}
+\end{center}
+Also defined are the \docAuxKey*{shaded} and \docAuxKey*{thmbox} keys, implemented internally with \pkg{tcolorbox} rather than the \pkg{shadethm} and \pkg{thmbox} packages, respectively.
+\end{docKey}
+
+\subsection{Other global options}
+
+\begin{docKey}{auto-translate}
+ {\colOpt{=true\textbar false}}
+ {default |true|, initially |true|}
+If |false|, \pkg{keytheorems} does not automatically translate the title text for \refCom{listofkeytheorems} and the note produced by the \refKey{continues} key.
+These texts can be manually customized with the \refKey{title} and \refKey{continues-code} keys, respectively.
+\end{docKey}
+
+\begin{docKey}{continues-code}
+ {=\meta{code with \textup{\texttt{\#1}}}}
+ {initially \cs{GetTranslation}\ttbraces{keythms\string_continues}\cs{pageref}\ttbraces{\#1}}
+The code used to typeset the note produced by the \refKey{continues} key.
+If English or an unknown language is used, defaults to \texttt{continuing from p.}\cs{,}\cs{pageref}\ttbraces{\#1}.
+Currently (likely inaccurate!) translations exist for French, German, Italian, Portuguese, and Spanish.
+\end{docKey}
+
+\begin{docKey}{qed-symbol}
+ {=\meta{symbol}}
+ {initially \cs{openbox}}
+Redefines \cs{qedsymbol} to be \meta{symbol}.
+\end{docKey}
+
+\begin{docKey}{restate-counters}
+ {=\marg{comma-list of counters}}
+ {initially \ttbraces{equation}}
+Additional counters whose values are preserved when a theorem is restated.
+This key does not reset the list, so you don't need to include |equation| in \meta{comma-list}.
+\end{docKey}
+
+\begin{docKey}{store-all}
+ {}
+ {initially unset}
+Tells \pkg{keytheorems} to grab the body of each theorem so it can later be printed with the \refKey{print-body} option of \refCom{listofkeytheorems}.
+Note that this means a theorem body \emph{cannot} contain verbatim material.
+\end{docKey}
+
+\begin{docKey}{store-sets-label}
+ {}
+ {initially unset}
+Defines the \refKey{store} key to also set \refKey{label}, i.e. it makes |store=|\meta{tag} equivalent to |store=|\meta{tag}|,label=|\meta{tag}. Similarly for \refKey[store*]{store}.
+\end{docKey}
+
+\section{Defining theorems}
+
+\begin{docCommand}{newkeytheorem}
+ {\marg{env name}\oarg{options}}
+Defines a theorem environment \meta{env name} which itself takes a few options (see \autoref{in-doc-keys}).
+You can also declare multiple theorems at once by replacing \meta{env name} with a comma-list of names, e.g. \cs{newkeytheorem}\ttbraces{theorem,lemma,proposition}\bracks{\meta{options}}.
+
+By default, the theorem's printed name is a title-cased \meta{env name}.
+This can be changed with the \refKey{thm/name} key.
+All \meta{options} are described in subsections \ref{thm-thmtools-keys} and \ref{thm-added-keys}.
+\end{docCommand}
+
+\begin{tcbwritetemp}
+\newkeytheorem{theorem}
+\end{tcbwritetemp}
+
+\begin{keythmscode}[withpreamble]
+\begin{theorem}
+Some text
+\end{theorem}
+\end{keythmscode}
+
+\subsection{Keys available to theorem environments} \label{in-doc-keys}
+
+As in \pkg{amsthm}, theorems can take an optional argument that contains a note or heading.
+
+\begin{keythmscode}[]
+\begin{theorem}[some heading]
+Some text
+\end{theorem}
+\end{keythmscode}
+
+Alternatively, the optional argument may contain any of the following keys.
+
+\begin{docKey}{note}
+ {=\meta{text}}
+ {initially unset}
+Alias \docAuxKey[][doc label=thmuse/name]{name}.
+This is the key-value equivalent of the optional argument described above.
+This syntax, however, allows the argument to contain other keys.
+
+\begin{keythmscode}[]
+\begin{theorem}[some heading]
+Some text
+\end{theorem}
+\begin{theorem}[note=another heading]
+Some more text
+\end{theorem}
+\end{keythmscode}
+
+\end{docKey}
+
+\begin{docKey}{short-note}
+ {=\meta{text}}
+ {initially unset}
+Alias \docAuxKey{short-name}.
+This replaces the value of \refKey{note} when displayed in \refCom{listofkeytheorems}.
+\end{docKey}
+
+\begin{docKey}{label}
+ {=\meta{label name}}
+ {initially unset}
+This is the key-value equivalent of |\begin{theorem}| \cs{label}\marg{label name}.
+
+\begin{keythmscode}[]
+\begin{theorem}[label=foo]
+Some text
+\end{theorem}
+\ref{foo}
+\end{keythmscode}
+
+\end{docKey}
+
+\begin{docKey}{continues}
+ {\sarg=\meta{label name}}
+ {initially unset}
+Pick up a theorem where you left off.
+The theorem number remains the same.
+The printed text can be customized with the \refKey{continues-code} option.
+The starred version also copies the theorem note, if it exists.
+
+\begin{keythmscode}[]
+\begin{theorem}[continues=foo]
+\dots and some more text.
+\end{theorem}
+\end{keythmscode}
+
+\end{docKey}
+
+\begin{docKey}{store}
+ {\sarg=\meta{tag}}
+ {initially unset}
+Alias \docAuxKey{restate}\sarg.
+Stores the the theorem to be restated at any point in the document with \refCom{getkeytheorem}.
+With the starred version, counters and labels are taken from the copy called with \cs{getkeytheorem}, so in this case can only be restated once.
+This allows you, for example, to write all theorems and proofs in the appendix and call \cs{getkeytheorem} at the appropriate time mid-document.
+For the numbering to be correct, the unstarred key will need at most two runs and the starred key at most three runs.
+
+\begin{keythmscode}[]
+\begin{theorem}[store=blub]
+A theorem worth restating.
+\end{theorem}
+More brilliant mathematics.
+\getkeytheorem{blub}
+\end{keythmscode}
+
+A theorem given this key \emph{cannot} contain verbatim material or other unexpected catcodes, such as a \pkg{tikz-cd} diagram.
+The latter issue can be averted with the \texttt{ampersand-replacement} key.
+
+\begin{tcbwritetemp}
+\usepackage{tikz}
+\usetikzlibrary{cd}
+\end{tcbwritetemp}
+
+\begin{keythmscode}[withpreamble]
+\begin{lemma}[store=diagram]
+Some commutative diagram:
+\[\begin{tikzcd}[ampersand replacement=\&]
+X\times_S Y \ar[r] \ar[d] \& X \ar[d] \\
+Y \ar[r] \& S
+\end{tikzcd}\]
+\end{lemma}
+\dots
+\getkeytheorem{diagram}
+\end{keythmscode}
+
+\end{docKey}
+
+\begin{docKey}{restate-keys}
+ {=\marg{list of keys}}
+ {initially unset}
+Allows passing different keys to the restated theorem.
+At the moment this is only useful with the \refKey{note} key.
+
+\begin{keythmscode}[]
+\begin{theorem}[
+ store=rktest,
+ note=ORIGINAL,
+ restate-keys={note=RESTATED}]
+Wow, yet another theorem.
+\end{theorem}
+\getkeytheorem{rktest}
+\end{keythmscode}
+
+\end{docKey}
+
+\begin{docKey}{listhack}
+ {=\docValue*{true}\textbar\docValue*{false}}
+ {initially |false|}
+Meant only to be used with the \refKey{break} style key for a theorem starting with a list.
+Compare:
+
+\begin{tcbwritetemp}
+\newkeytheoremstyle{breaksty}{break}
+\newkeytheorem{observation}[style=breaksty]
+\end{tcbwritetemp}
+
+\begin{keythmscode}[withpreamble]
+\begin{observation}
+\begin{enumerate}
+\item First item
+\end{enumerate}
+\end{observation}
+
+\begin{observation}[listhack=true]
+\begin{enumerate}
+\item First item
+\end{enumerate}
+\end{observation}
+\end{keythmscode}
+
+Note that the value |true| must be explicitly set so that |listhack| is not interpreted as the note text.
+\end{docKey}
+
+\begin{docKey}[][doc label=thm/seq]{seq}
+ {=\meta{name}}
+ {initially unset}
+Adds the theorem to a custom sequence \meta{name} that can then be listed with \cs{listofkeytheorems}\bracks{seq=\meta{name}}.
+See \refKey{listof/seq} for more details.
+\end{docKey}
+
+\subsection{Keys also defined in \pkg{thmtools}} \label{thm-thmtools-keys}
+
+These are the \oarg{options} available to \cs{newkeytheorem}.
+Except for \refKey{thm/name} and \refKey{style}, each key below can also be used in \refCom{newkeytheoremstyle}.
+For more description, see the \href{https://ctan.org/pkg/thmtools}{\pkg{thmtools}} package.
+
+\begin{docKey}[][doc label=thm/name]{name}
+ {=\meta{display name}}
+ {initially title-cased \meta{env name}}
+Aliases \docAuxKey{heading} and \docAuxKey{title}.
+
+\begin{tcbwritetemp}
+\newkeytheorem{mythm}[name=Some Name]
+\end{tcbwritetemp}
+
+\begin{keythmscode}[withpreamble]
+\begin{mythm}
+Some text
+\end{mythm}
+\end{keythmscode}
+
+\end{docKey}
+
+\begin{docKey}{numbered}
+ {=\docValue*{true}\textbar\docValue*{false}\textbar \docValue{unless-unique}}
+ {default |true|, initially |true|}
+For compatibility with \pkg{thmtools}, also accepts the values \docValue*{yes}, \docValue*{no}, and \docValue*{unless unique}.
+
+\begin{tcbwritetemp}
+\newkeytheorem{theorem*}[
+ name=Theorem, numbered=false
+ ]
+\end{tcbwritetemp}
+
+\begin{keythmscode}[withpreamble]
+\begin{theorem*}
+An unnumbered theorem.
+\end{theorem*}
+\end{keythmscode}
+
+\end{docKey}
+
+\begin{docKey}{parent}
+ {=\meta{counter}}
+ {initially unset}
+Aliases \docAuxKey{numberwithin} and \docAuxKey{within}.
+
+\begin{tcbwritetemp}
+\newkeytheorem{conjecture}[parent=section]
+\end{tcbwritetemp}
+
+\begin{keythmscode}[withpreamble]
+\begin{conjecture}
+The first number is the section.
+\end{conjecture}
+\end{keythmscode}
+
+\end{docKey}
+
+\begin{docKey}{sibling}{=\meta{counter}}{initially unset}
+Aliases \docAuxKey{numberlike} and \docAuxKey{sharenumber}.
+
+\begin{tcbwritetemp}
+\newkeytheorem{lemma}[sibling=theorem]
+\end{tcbwritetemp}
+
+\begin{keythmscode}[withpreamble]
+\begin{lemma}
+This shares its counter with
+\texttt{theorem}.
+\end{lemma}
+\end{keythmscode}
+
+\end{docKey}
+
+\begin{docKey}{style}
+ {=\meta{style name}}
+ {initially unset}
+Accepts any \meta{style name} defined by \refCom{newkeytheoremstyle}, as well as any of the predefined \pkg{amsthm} styles: \docValue{plain}, \docValue{definition}, and \docValue{remark}.
+
+\begin{tcbwritetemp}
+\newkeytheorem{remark}[style=remark]
+\end{tcbwritetemp}
+
+\begin{keythmscode}[withpreamble]
+\begin{remark}
+Some text
+\end{remark}
+\end{keythmscode}
+
+\end{docKey}
+
+\begin{docKeys}[
+ doc parameter = {=\meta{code}},
+ doc description = initially unset,
+ ]
+ {
+ { doc name = preheadhook },
+ { doc name = postheadhook },
+ { doc name = prefoothook },
+ { doc name = postfoothook },
+ }
+Details in \autoref{keythms-hooks}.
+
+\begin{tcbwritetemp}
+\newkeytheorem{test}[
+ preheadhook=PREHEAD,
+ postheadhook=POSTHEAD,
+ prefoothook=PREFOOT,
+ postfoothook=POSTFOOT
+]
+\end{tcbwritetemp}
+
+\begin{keythmscode}[withpreamble]
+\begin{test}
+Some text
+\end{test}
+\end{keythmscode}
+
+\end{docKeys}
+
+\begin{docKey}{qed}
+ {\colOpt{=\meta{symbol}}}
+ {default \cs{openbox}, initially unset}
+Adds \colOpt{\meta{symbol}} to the end of the theorem body.
+If no value is given, the symbol \openbox\ is used.
+
+\begin{tcbwritetemp}
+\newkeytheorem{example}[qed]
+\newkeytheorem{solution}[qed=$\clubsuit$]
+\end{tcbwritetemp}
+
+\begin{keythmscode}[withpreamble]
+\begin{example}
+Some text
+\end{example}
+\begin{solution}
+Some more text
+\end{solution}
+\end{keythmscode}
+
+\end{docKey}
+
+\begin{docKey}{refname}
+ {=\meta{ref name} \textrm{or} \brackets{\meta{singular name},\meta{plural name}}}
+ {initially \meta{display name}}
+If a single string, then the name used by \pkg{hyperref}'s \cs{autoref} and \pkg{cleveref}'s \cs{cref}.
+If two strings separated by a comma, then the second string is the plural form used by \cs{cref}.
+\end{docKey}
+
+\begin{docKey}{Refname}
+ {=\meta{ref name} \textrm{or} \brackets{\meta{singular name},\meta{plural name}}}
+ {initially \meta{display name}}
+Same as \refKey{refname} but for \docAuxCommand{Autoref} and \cs{Cref}.
+Note that \cs{Autoref} is defined by \pkg{keytheorems}, but requires \pkg{hyperref} to work.
+As with \cs{autoref}, there is also a starred version \docAuxCommand{Autoref*} that suppresses the hyperlink.
+
+\begin{tcbwritetemp}
+\newkeytheorem{prop}[
+ name=Proposition,
+ refname={proposition,propositions},
+ Refname={Proposition,Propositions}
+ ]
+\end{tcbwritetemp}
+
+\begin{keythmscode}[withpreamble]
+\begin{prop}[label=abc]
+Some text
+\end{prop}
+\begin{prop}[label=def]
+Some more text
+\end{prop}
+\begin{theorem}
+Consider \cref{abc,def}.
+\Autoref{abc} \dots
+\end{theorem}
+\end{keythmscode}
+
+\end{docKey}
+
+\subsection{Keys added by \pkg{keytheorems}} \label{thm-added-keys}
+
+\begin{docKey}{tcolorbox}
+ {\colOpt{=\marg{tcolorbox options}}}
+ {initially unset}
+This key specifies that the theorem be placed inside a tcolorbox environment with \colOpt{\meta{options}}.
+The theorem head is typeset as a tcolorbox title; to avoid this see \refKey{tcolorbox-no-titlebar}.
+
+\begin{tcbwritetemp}
+\tcbset{
+ defstyle/.style={
+ arc=0mm,
+ colback=blue!5!white,
+ colframe=blue!75!black
+ },
+ }
+\newkeytheorem{corollary}[tcolorbox]
+\newkeytheorem{definition}[
+ style=definition,
+ tcolorbox={defstyle}
+ ]
+\end{tcbwritetemp}
+
+\begin{keythmscode}[withpreamble]
+\begin{corollary}
+Some text
+\end{corollary}
+\begin{definition}[A nice definition]
+Some more text
+\end{definition}
+\end{keythmscode}
+
+\end{docKey}
+
+\begin{docKey}{tcolorbox-no-titlebar}
+ {\colOpt{=\marg{tcolorbox options}}}
+ {initially unset}
+Same usage as \refKey{tcolorbox} but the theorem head is typeset as usual, not as a tcolorbox title.
+
+\begin{tcbwritetemp}
+\newkeytheorem{boxcor}[
+ tcolorbox-no-titlebar={
+ colback=red!10
+ },
+ name=Corollary,sibling=corollary
+ ]
+\end{tcbwritetemp}
+
+\begin{keythmscode}[withpreamble]
+\begin{boxcor}
+Some text
+\end{boxcor}
+\end{keythmscode}
+
+\end{docKey}
+
+\pkg{tcolorbox} offers its own comprehensive \texttt{theorems} library. If all of your theorems are to be tcolorboxes, I highly recommend using it instead of this package! However, if only some of your theorems will use a tcolorbox, you may want to replicate the styles of \cs{NewTcbTheorem}. Here is an example that emulates \pkg{tcolorbox}'s \texttt{standard} theorem style.
+
+\begin{tcbwritetemp}
+\tcbset{
+ thmstyle/.style={
+ colback=green!5,
+ colframe=green!35!black},
+ }
+\newkeytheoremstyle{tcb-standard}{
+ tcolorbox=thmstyle,
+ headpunct={},
+ notebraces={}{},
+ noteseparator={: },
+ notefont=\bfseries,
+ bodyfont=\normalfont,
+ }
+\newkeytheorem{mytheo}[
+ name=My Theorem,
+ style=tcb-standard]
+\end{tcbwritetemp}
+
+\begin{keythmscode}[withpreamble]
+\begin{mytheo}[This is my title]
+Some theorem text
+\end{mytheo}
+\end{keythmscode}
+
+\section{Theorem styles}
+
+\begin{docCommand}{newkeytheoremstyle}
+ {\marg{name}\marg{options}}
+This is \pkg{keytheorems}' version of \pkg{thmtools}' \cs{declaretheoremstyle}\bracks{\meta{options}}\marg{name}.
+Since it makes little sense to define a style with no keys, we've made the \meta{options} argument mandatory.
+Note that unlike \pkg{amsthm}'s \cs{newtheoremstyle}, this command will error if a style has already been defined.
+To overwrite an existing style, there is the analogous \docAuxCommand{renewkeytheoremstyle}.
+For completeness, there is also \docAuxCommand{declarekeytheoremstyle} and \docAuxCommand{providekeytheoremstyle}.
+
+The defined style can be used with either the \refKey{style} key or the traditional \cs{theoremstyle}.
+\end{docCommand}
+
+\begin{notebox}
+For the AMS classes \cls{amsart}, \cls{amsbook}, and \cls{amsproc}, as well as the \cls{amsart}-based \cls{acmart}, the initial key values are slightly different than what's below in order to match those class's defaults.
+\end{notebox}
+
+\subsection{Keys also defined in \pkg{thmtools}}
+
+The following keys have the same meaning and syntax as the corresponding \pkg{thmtools} keys.
+In addition to the list below, most of the keys available to \refCom{newkeytheorem} can be used in \cs{newkeytheoremstyle}.
+
+\begin{docKey}{bodyfont}
+ {=\meta{font declarations}}
+ {initially \cs{itshape}}
+
+\end{docKey}
+
+\begin{docKey}{break}
+ {}
+ {initially unset}
+Do not use this with the \refKey{postheadspace} key.
+\end{docKey}
+
+\begin{docKey}{headfont}
+ {=\meta{font declarations}}
+ {initially \cs{bfseries}}
+
+\end{docKey}
+
+\begin{docKey}{headformat}
+ {=\docValue{margin}\textbar\docValue{swapnumber}\textbar\meta{code using \cs{NAME}, \cs{NUMBER}, and \cs{NOTE}\,}}
+ {}
+Alias \docAuxKey{headstyle}. Within \meta{code}, the commands \docAuxCommand{NAME}, \docAuxCommand{NUMBER}, and \docAuxCommand{NOTE} correspond to the formatted parts of the theorem head.
+\end{docKey}
+
+\begin{notebox}
+In \refKey{headformat}, you may also use the traditional \pkg{amsthm} commands \cs{thmname}, \cs{thmnumber}, and \cs{thmnote}, where |#1| is the theorem name, |#2| the number, and |#3| the note. \pkg{keytheorems} expands the head spec inside |\text_expand:n| so for these commands to work properly, the package adds them to |\l_text_expand_exclude_tl|. Note also that if you use these lower-level commands, the style keys \refKey{notebraces}, \refKey{notefont}, \refKey{noteseparator}, and \refKey{numberfont} will have no effect (of course, you can manually control these things inside the commands' arguments).
+\end{notebox}
+
+\begin{docKey}{headindent}
+ {=\meta{length}}
+ {initially |0pt|}
+
+\end{docKey}
+
+\begin{docKey}{headpunct}
+ {=\meta{code}}
+ {initially \ttbraces{.}}
+
+\end{docKey}
+
+\begin{docKey}{notebraces}
+ {=\marg{left brace}\marg{right brace}}
+ {initially \ttbraces{(}\ttbraces{)}}
+
+\end{docKey}
+
+\begin{docKey}{notefont}
+ {=\meta{font declarations}}
+ {initially \cs{fontseries}\cs{mddefault}\cs{upshape}}
+
+\end{docKey}
+
+\begin{docKey}{postheadspace}
+ {=\meta{length}}
+ {initially |5pt plus 1pt minus 1pt|}
+Do not use this with the \refKey{break} key.
+\end{docKey}
+
+\begin{docKey}{spaceabove}
+ {=\meta{length}}
+ {initially \cs{topsep}}
+
+\end{docKey}
+
+\begin{docKey}{spacebelow}
+ {=\meta{length}}
+ {initially \cs{topsep}}
+
+\end{docKey}
+
+\subsection{Keys added by \pkg{keytheorems}}
+
+\begin{docKey}{inherit-style}
+ {=\meta{style name}}
+ {initially unset}
+Inherit the keys of any style declared with \refCom{newkeytheoremstyle}.
+Additionally, the three styles predefined by \pkg{amsthm} are possible values: \docValue{plain}, \docValue{definition}, and \docValue{remark}.
+\end{docKey}
+
+\begin{docKey}{noteseparator}
+ {=\meta{code}}
+ {initially \textvisiblespace}
+The code inserted before the note, and printed only if there is a note. This is executed \emph{before} the font commands set by \refKey{notefont} take effect.
+\end{docKey}
+
+\begin{docKey}{numberfont}
+ {=\meta{font declarations}}
+ {initially |\upshape|}
+For almost all theorem styles, it is recommended that you \emph{do not} change this setting.
+\end{docKey}
+
+\section{Restating theorems}
+
+When a theorem is given the \refKey{store} key, the contents of the theorem are saved and written to a |.thlist| file.
+At the start of the next run, this file is input at the beginning of the document and allows you to retrieve the stored theorems at any point, before or after the original theorem.
+
+\begin{docCommand}{getkeytheorem}
+ {\oarg{property}\marg{tag}}
+Retrieves the theorem given the key |store=|\meta{tag} or |store*=|\meta{tag}.
+An optional \meta{property} can be given to retrieve only the corresponding part of the theorem.
+Currently only the property |body| is implemented, which retrieves the (unformatted) body of the theorem.
+
+\begin{keythmscode}[]
+\getkeytheorem{mytag}
+
+\begin{example}[store=mytag]
+Fascinating example.
+\end{example}
+
+\getkeytheorem[body]{mytag}
+\end{keythmscode}
+
+\end{docCommand}
+
+\begin{docCommands}
+ {
+ {
+ doc name = IfRestatingTF,
+ doc parameter=\marg{true code}\marg{false code}
+ },
+ {
+ doc name = IfRestatingT,
+ doc parameter=\marg{true code}
+ },
+ {
+ doc name = IfRestatingF,
+ doc parameter=\marg{false code}
+ }
+ }
+Executes \meta{true code} if being retrieved with \refCom{getkeytheorem} and \meta{false code} if in the original theorem. This is reversed if \texttt{store*} is used.
+
+\begin{keythmscode}[]
+\begin{example}[store=hmm]
+I am the
+\IfRestatingTF{restated}{original}
+example!
+\end{example}
+
+\getkeytheorem{hmm}
+\end{keythmscode}
+
+\end{docCommands}
+
+\section{Listing theorems}
+
+\begin{docCommand}{listofkeytheorems}
+ {\oarg{options}}
+Similar to \cs{listoffigures} or \cs{listoftables} but for theorems.
+For \cls{memoir} and the AMS classes, \pkg{keytheorems} tries to copy the formatting of these commands as defined by the class.
+For other classes, manual adjustments to \refKey{numwidth} and \refKey{indent} may be necessary.
+\end{docCommand}
+
+\begin{docCommand}{keytheoremlistset}
+ {\marg{options}}
+
+\end{docCommand}
+
+\begin{keythmscode}[]
+\listofkeytheorems
+\end{keythmscode}
+
+\subsection{Keys inherited from \pkg{thmtools}}
+
+\begin{docKey}{ignore}
+ {=\marg{comma-list of env names}}
+ {initially unset}
+
+\end{docKey}
+
+\begin{docKey}{ignoreall}
+ {}
+ {initially unset}
+
+\begin{keythmscode}[]
+\listofkeytheorems[ignoreall,show=theorem]
+\listofkeytheorems[
+ ignoreall, show=conjecture,
+ title=List of Conjectures
+ ]
+\end{keythmscode}
+
+\end{docKey}
+
+\begin{docKey}{numwidth}
+ {=\meta{length}}
+ {initially |2.3em|}
+For the AMS classes, this is initially |1.5pc|.
+\end{docKey}
+
+\begin{docKey}{onlynamed}
+ {\colOpt{=\marg{comma-list of env names}}}
+ {initially unset}
+
+\end{docKey}
+
+\begin{docKey}{show}
+ {=\marg{comma-list of env names}}
+ {initially all theorems}
+
+\end{docKey}
+
+\begin{docKey}{showall}
+ {}
+ {initially set}
+
+\end{docKey}
+
+\begin{docKey}{swapnumber}
+ {\colOpt{=true\textbar false}}
+ {initially |false|}
+
+\end{docKey}
+
+\begin{docKey}{title}
+ {=\meta{text}}
+ {initially \cs{GetTranslation}\ttbraces{keythms\string_listof\string_title}}
+Defaults to ``List of Theorems'' if English or an unknown language is used.
+Currently French, German, Italian, Portuguese, and Spanish have (likely inaccurate!) translations.
+A translation can be added with a GitHub pull request or manually with \cs{DeclareTranslation}\marg{lang}\ttbraces{keythms\string_listof\string_title}\marg{text}.
+\end{docKey}
+
+\subsection{Keys added by \pkg{keytheorems}}
+
+\begin{docKey}{format-code}
+ {=\meta{code with \textup{\texttt{\#1}}, \textup{\texttt{\#2}}, and \textup{\texttt{\#3}}}}
+ {initially \cs{numberline}\texttt{\{\#2\}\#1\#3}}
+Allows full control over the format for list entries. The theorem name is |#1|, the number is |#2|, and the (formatted) note is |#3|. The note formatting is still controlled by \refKey{note-code}.
+\end{docKey}
+
+\begin{docKey}{indent}
+ {=\meta{length}}
+ {initially |1.5em|}
+Sets the left indent of items in the list of theorems.
+For \cls{memoir} and the AMS classes, the indent is initially |0pt|.
+It is not recommended to change this unless your class has different defaults not already covered.
+\end{docKey}
+
+\begin{docKey}{no-chapter-skip}
+ {\colOpt{=true\textbar false}}
+ {initially |false|}
+By default a small vertical space is inserted between each chapter's chunk of theorems.
+Setting this key to |true| removes this space.
+\end{docKey}
+
+\begin{docKey}{chapter-skip-length}
+ {=\meta{dimension}}
+ {initially |10pt|}
+Controls the amount of space inserted between chunks.
+\end{docKey}
+
+\begin{docKey}{no-continues}
+ {\colOpt{=true\textbar false}}
+ {initially |false|}
+Suppresses the printing of theorems given the \refKey{continues} key in the list of theorems.
+\end{docKey}
+
+\begin{docKey}{no-title}
+ {\colOpt{=true\textbar false}}
+ {initially |false|}
+Suppresses the title of the list of theorems.
+Useful for custom ordering of the list.
+
+\begin{keythmscode}[]
+\keytheoremlistset{ignoreall}
+\listofkeytheorems[show=example]
+\listofkeytheorems[show=solution,no-title]
+\end{keythmscode}
+
+\end{docKey}
+
+\begin{docKey}{no-toc}
+ {\colOpt{=true\textbar false}}
+ {initially false}
+With the standard classes, lists of figures/tables are not added to the table of contents by default. The same is true for \cs{listofkeytheorems}, and with those classes this key does nothing. However some classes, notably \cls{memoir} and the AMS classes, do add lists to the table of contents. With these classes, this key suppresses the addition of the list of theorems to the table of contents.
+\end{docKey}
+
+\begin{docKey}{note-code}
+ {=\meta{code with \textup{\texttt{\#1}}}}
+ {initially \ttbraces{ (\#1)}}
+Formats the optional note in the list of theorems.
+\end{docKey}
+
+\begin{docKey}{onlynumbered}
+ {\colOpt{=\marg{comma-list of env names}}}
+ {initially unset}
+Similar to \refKey{onlynamed}, but lists only those theorems which are numbered.
+This is useful if you'd like to exclude things like unnumbered definitions and remarks from the list of theorems.
+\end{docKey}
+
+\begin{docKey}{print-body}
+ {}
+ {initially unset}
+Instead of listing the theorem headings, the theorems are restated with their body text.
+Not very useful without the \refKey{store-all} load-time option.
+\end{docKey}
+
+\begin{docKey}[][doc label=listof/seq]{seq}
+ {=\meta{name}}
+ {initially unset}
+Used to list only the theorems added to the custom sequence \meta{name} with the \refKey{thm/seq} theorem key.
+This is the only way to fully customize which theorems appear in the list of theorems.
+Unlike with \refKey{show}, you do not need to use \refKey{ignoreall} to prevent theorems not in \meta{name} from being printed.
+\end{docKey}
+
+\begin{docKey}{title-code}
+ {=\meta{code with \textup{\texttt{\#1}}}}
+ {initially \cs{section*}\ttbraces{\#1}}
+If \cs{chapter} is defined, then initially this is instead \cs{chapter*}\ttbraces{\#1}. This key has no effect if used with an AMS class because these classes hard-code the section heading into \cs{@starttoc}.
+\end{docKey}
+
+\subsection{Adding code to list of theorems}
+
+There are analogous commands to \cs{addcontentsline} and \cs{addtocontents} for adding entries or arbitrary code to the list of theorems.
+
+\begin{notebox}
+You \emph{must} use these commands rather than the aforementioned because the |.thlist| file is also used to define restated theorems and cannot contain unexpected code.
+\end{notebox}
+
+\begin{docCommand}{addtheoremcontentsline}
+ {\marg{level}\marg{text}}
+
+\end{docCommand}
+
+\begin{docCommand}{addtotheoremcontents}
+ {\marg{code}}
+
+\end{docCommand}
+
+\section{Theorem hooks} \label{keythms-hooks}
+
+\begin{docCommand}{addtotheoremhook}
+ {\oarg{env name}\marg{hook name}\marg{code}}
+\meta{hook name} can be \hook{prehead}, \hook{posthead}, \hook{prefoot}, \hook{postfoot}, or \hook{restated}.
+If no \meta{env name} is given, the \meta{code} is added to the ``generic'' hook, i.e. applied to all theorems.
+As in \pkg{thmtools}, the order of hooks is as follows:
+
+\begin{center}
+ \tcbset{
+ nobeforeafter,
+ tikznode,
+ tcbox width=forced center,
+ width=2cm,
+ tcbox raise=-0.4cm,
+ size=fbox,
+ after=\;$\rightarrow$
+ }
+ \tcbox{\meta{env name}\\ \hook{prehead}}
+ \tcbox{generic\\ \hook{prehead}}
+ \tcbox[width=3.5cm,tcbox raise=-0.2cm]{\cs{begin}\brackets{\meta{env name}}}
+ \tcbox{\meta{env name}\\ \hook{posthead}}
+ \tcbox[after={}]{generic\\ \hook{posthead}}
+ \\[2ex]
+ \tcbset{before=$\rightarrow$\;}
+ \tcbox[width=2.5cm,tcbox raise=-0.2cm]{\meta{theorem body}}
+ \\[2ex]
+ \tcbset{after={}}
+ \tcbox[before={}]{generic\\ \hook{prefoot}}
+ \tcbox{\meta{env name}\\ \hook{prefoot}}
+ \tcbox[width=3.5cm,tcbox raise=-0.2cm]{\cs{end}\brackets{\meta{env name}}}
+ \tcbox{generic\\ \hook{postfoot}}
+ \tcbox{\meta{env name}\\ \hook{postfoot}}
+\end{center}
+The \hook{restated} hook is applied at the start of theorems retrieved with \cs{getkeytheorem}, before the \hook{prehead} hook.
+This can be useful for disabling commands such as \cs{footnote} in the restated theorems, e.g.
+\begin{dispListing}
+\addtotheoremhook{restated}{\renewcommand\footnote[2][]{}}
+\end{dispListing}
+By default, \pkg{keytheorems} disables the \cs{label} and \cs{RecordProperties} commands in restated theorems.
+
+In \pkg{thmtools}, the \hook{prefoot} and \hook{postfoot} hooks always prepend code, i.e. the code
+\begin{dispListing}
+\addtotheorempostfoothook{A}
+\addtotheorempostfoothook{B}
+\end{dispListing}
+results in |BA| after the theorem.
+With \pkg{keytheorems}, code is added in the order declared, meaning
+\begin{dispListing}
+\addtotheoremhook{postfoot}{A}
+\addtotheoremhook{postfoot}{B}
+\end{dispListing}
+results in |AB| after the theorem.
+This is the behavior of the \LaTeX{} kernel hooks that \pkg{keytheorems} uses under the hood.
+
+Right now, code added using the hook keys \refKey{preheadhook}, etc. is outermost, meaning executed first in \hook{prehead} and \hook{posthead} and last in \hook{prefoot} and \hook{postfoot}.
+This may change if I think of good reasons to do so\dots
+\end{docCommand}
+
+\section{Miscellaneous notes for the ambitious}
+
+Inside theorem environments, as well as in all of the theorem hooks, you have access to the theorem's environment and counter name in the token list variable |\l_keythms_thmuse_envname_tl|.
+
+\section{Further examples}
+
+More examples will be added soon -- rather, eventually\dots{}
+For now, you can find a \pkg{keytheorems} adaptation of \pkg{amsthm}'s classic file \href{https://mirrors.ctan.org/macros/latex/required/amscls/doc/thmtest.tex}{\texttt{thmtest.tex}} in the Github \texttt{tests} folder: \href{https://github.com/mbertucci47/keytheorems/blob/main/tests/keytheorems-amsthmtest.tex}{\texttt{keytheorems-amsthmtest.tex}}.
+
+%\section{Implementation}
+%\inputminted[linenos,style=bw]{latex}{../keytheorems.sty}
+
+\printindex
+
+\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/keytheorems/tex/class-support/keythms-amsart-support.tex b/macros/latex/contrib/keytheorems/tex/class-support/keythms-amsart-support.tex
new file mode 100644
index 0000000000..da648a6205
--- /dev/null
+++ b/macros/latex/contrib/keytheorems/tex/class-support/keythms-amsart-support.tex
@@ -0,0 +1,49 @@
+% Maintained by Matthew Bertucci, 2024-present
+% Please report all issues and feature requests at https://github.com/mbertucci47/keytheorems
+% This work is licensed under the LPPL version 1.3c or later: https://www.latex-project.org/lppl.txt
+\ProvidesExplFile{keythms-amsart-support}{2024-09-30}{0.1.5}
+ {keytheorems~support~for~the~amsart~class}
+
+\__keythms_support_AMSshared_code:
+
+\IfClassLoadedTF { acmart }
+ { % acmart loads amsart
+ \keytheoremset{overload} % since acmart predefines several theorems
+ \prop_gput_from_keyval:Nn \g__keythms_thmstyle_defaultkeys_prop
+ {
+ bodyfont = \@acmplainbodyfont,
+ headfont = \@acmplainheadfont,
+ headindent = \@acmplainindent,
+ notefont = \@acmplainnotefont,
+ postheadspace = .5em,
+ spaceabove = .5\baselineskip plus .2\baselineskip minus .2\baselineskip,
+ spacebelow = .5\baselineskip plus .2\baselineskip minus .2\baselineskip,
+ }
+ \keys_define:nn { keytheorems/thmstyle }
+ {
+ inherit-style / acmplain .meta:n = {},
+ inherit-style / acmdefinition .meta:n =
+ {
+ bodyfont = \@acmdefinitionbodyfont,
+ headindent = \@acmdefinitionindent,
+ headfont = \@acmdefinitionheadfont,
+ notefont = \@acmdefinitionnotefont,
+ },
+ }
+ }
+ {
+ \prop_gput_from_keyval:Nn \g__keythms_thmstyle_defaultkeys_prop
+ {
+ spaceabove = .5\baselineskip plus .2\baselineskip minus .2\baselineskip,
+ spacebelow = .5\baselineskip plus .2\baselineskip minus .2\baselineskip,
+ }
+ }
+
+\keys_define:nn { keytheorems/thmstyle }
+ {
+ inherit-style / remark .meta:n =
+ {
+ bodyfont = \normalfont,
+ headfont = \itshape,
+ }
+ } \ No newline at end of file
diff --git a/macros/latex/contrib/keytheorems/tex/class-support/keythms-amsbook-support.tex b/macros/latex/contrib/keytheorems/tex/class-support/keythms-amsbook-support.tex
new file mode 100644
index 0000000000..8937f2326e
--- /dev/null
+++ b/macros/latex/contrib/keytheorems/tex/class-support/keythms-amsbook-support.tex
@@ -0,0 +1,23 @@
+% Maintained by Matthew Bertucci, 2024-present
+% Please report all issues and feature requests at https://github.com/mbertucci47/keytheorems
+% This work is licensed under the LPPL version 1.3c or later: https://www.latex-project.org/lppl.txt
+\ProvidesExplFile{keythms-amsbook-support}{2024-09-30}{0.1.5}
+ {keytheorems~support~for~the~amsbook~class}
+
+\__keythms_support_AMSshared_code:
+
+\prop_gput_from_keyval:Nn \g__keythms_thmstyle_defaultkeys_prop
+ {
+ headfont = \scshape,
+ headindent = \parindent,
+ spaceabove = .5\baselineskip plus .2\baselineskip minus .2\baselineskip,
+ spacebelow = .5\baselineskip plus .2\baselineskip minus .2\baselineskip,
+ }
+
+\keys_define:nn { keytheorems/thmstyle }
+ {
+ inherit-style / remark .meta:n =
+ {
+ bodyfont = \normalfont,
+ },
+ } \ No newline at end of file
diff --git a/macros/latex/contrib/keytheorems/tex/class-support/keythms-amsproc-support.tex b/macros/latex/contrib/keytheorems/tex/class-support/keythms-amsproc-support.tex
new file mode 100644
index 0000000000..07b258282b
--- /dev/null
+++ b/macros/latex/contrib/keytheorems/tex/class-support/keythms-amsproc-support.tex
@@ -0,0 +1,23 @@
+% Maintained by Matthew Bertucci, 2024-present
+% Please report all issues and feature requests at https://github.com/mbertucci47/keytheorems
+% This work is licensed under the LPPL version 1.3c or later: https://www.latex-project.org/lppl.txt
+\ProvidesExplFile{keythms-amsproc-support}{2024-09-30}{0.1.5}
+ {keytheorems~support~for~the~amsproc~class}
+
+\__keythms_support_AMSshared_code:
+
+\prop_gput_from_keyval:Nn \g__keythms_thmstyle_defaultkeys_prop
+ {
+ headfont = \scshape,
+ headindent = \parindent,
+ spaceabove = .5\baselineskip plus .2\baselineskip minus .2\baselineskip,
+ spacebelow = .5\baselineskip plus .2\baselineskip minus .2\baselineskip,
+ }
+
+\keys_define:nn { keytheorems/thmstyle }
+ {
+ inherit-style / remark .meta:n =
+ {
+ bodyfont = \normalfont,
+ },
+ } \ No newline at end of file
diff --git a/macros/latex/contrib/keytheorems/tex/class-support/keythms-memoir-support.tex b/macros/latex/contrib/keytheorems/tex/class-support/keythms-memoir-support.tex
new file mode 100644
index 0000000000..9b84a3ba40
--- /dev/null
+++ b/macros/latex/contrib/keytheorems/tex/class-support/keythms-memoir-support.tex
@@ -0,0 +1,49 @@
+% Maintained by Matthew Bertucci, 2024-present
+% Please report all issues and feature requests at https://github.com/mbertucci47/keytheorems
+% This work is licensed under the LPPL version 1.3c or later: https://www.latex-project.org/lppl.txt
+\ProvidesExplFile{keythms-memoir-support}{2024-09-30}{0.1.5}
+ {keytheorems~support~for~the~memoir~class}
+
+\bool_new:N \l__keythms_support_titlecode_bool
+
+\keys_define:nn { keytheorems/listof }
+ {
+ indent .initial:n = 0pt,
+ title-code .code:n =
+ {
+ \bool_set_true:N \l__keythms_support_titlecode_bool
+ \cs_set:Npn \__keythms_listof_titlecmd:n ##1 { #1 }
+ },
+ }
+
+% use memoir's list function; not using \newlistentry, though
+\newlistof{ keythms_support_memoir_listof:w }{ thlist }
+ { \l__keythms_listof_title_tl }
+
+\RenewDocumentCommand \listofkeytheorems { O{} }
+ {
+ \bool_gset_true:N \g__keythms_listof_writefile_bool
+ \group_begin:
+ \keys_set:nn { keytheorems/listof } { #1 }
+ \cs_set_protected:Npn \KeyThmsContentsLine ##1 { ##1 }
+ \bool_if:NF \l__keythms_listof_nochapskip_bool
+ {
+ \cs_set_eq:NN \KeyThmsAddvspace \addvspace
+ }
+ \bool_if:NTF \l__keythms_listof_notitle_bool
+ {
+ \cs_set:Npn \@thlistmaketitle {}
+ \keythms_support_memoir_listof:w*
+ }
+ {
+ \bool_if:NT \l__keythms_support_titlecode_bool
+ {
+ \cs_set:Npn \@thlistmaketitle
+ { \__keythms_listof_titlecmd:n { \l__keythms_listof_title_tl } }
+ }
+ \bool_if:NTF \l__keythms_listof_notoc_bool
+ { \keythms_support_memoir_listof:w* }
+ { \keythms_support_memoir_listof:w }
+ }
+ \group_end:
+ } \ No newline at end of file
diff --git a/macros/latex/contrib/keytheorems/tex/keytheorems.sty b/macros/latex/contrib/keytheorems/tex/keytheorems.sty
new file mode 100644
index 0000000000..7059d951a0
--- /dev/null
+++ b/macros/latex/contrib/keytheorems/tex/keytheorems.sty
@@ -0,0 +1,2395 @@
+% Maintained by Matthew Bertucci, 2024-present
+% Please report all issues and feature requests at https://github.com/mbertucci47/keytheorems
+% This work is licensed under the LPPL version 1.3c or later: https://www.latex-project.org/lppl.txt
+\NeedsTeXFormat{LaTeX2e}[2023-06-01]
+\ProvidesExplPackage{keytheorems}{2024-09-30}{0.1.5}{l3keys interface to amsthm}
+
+\IfFormatAtLeastTF { 2024-06-01 } { }
+ {
+ \RequirePackage{nameref} % to avoid ltproperties in code below
+ \cs_generate_variant:Nn \cs_set:Npn { Npe }
+ \cs_generate_variant:Nn \iow_shipout:Nn { Ne }
+ \cs_generate_variant:Nn \keys_set:nn { ne }
+ \cs_generate_variant:Nn \msg_warning:nnn { nne }
+ \cs_generate_variant:Nn \tl_put_right:Nn { Ne }
+ \ProvideDocumentCommand \IfPackageLoadedT { m m }
+ { \IfPackageLoadedTF{#1}{#2}{ } }
+ \ProvideDocumentCommand \IfPackageLoadedF { m m }
+ { \IfPackageLoadedTF{#1}{ }{#2} }
+ \ProvideDocumentCommand \IfClassLoadedT { m m }
+ { \IfClassLoadedTF{#1}{#2}{ } }
+ }
+\RequirePackage{aliascnt}
+\RequirePackage{amsthm} % ams classes have way of ignoring this
+\RequirePackage{refcount}
+\RequirePackage{translations}
+
+%%%%%%%%%%%%%%%%%%%%%%
+%%% Error Messages %%%
+%%%%%%%%%%%%%%%%%%%%%%
+
+\msg_new:nnn { keytheorems } { thmtools-before }
+ {
+ keytheorems~is~not~compatible~with~thmtools.~
+ Try~replacing~\protect\usepackage{thmtools}~with~
+ \protect\usepackage[thmtools-compat]{keytheorems}.
+ }
+\msg_new:nnn { keytheorems } { thmtools-after }
+ {
+ keytheorems~is~not~compatible~with~thmtools.~
+ This~will~not~work~as~you~think!~
+ Try~replacing~\protect\usepackage{thmtools}~with~
+ \protect\usepackage[thmtools-compat]{keytheorems}.
+ }
+\msg_new:nnn { keytheorems } { no-stored-theorem }
+ {
+ No~stored~theorem~'#1'~found!~
+ Try~compiling~again.~If~that~doesn't~work,~
+ check~the~spelling~of~'#1'.
+ }
+\msg_new:nnn { keytheorems } { no-prop-for-stored-theorem }
+ {
+ No~property~'#1'~found~for~stored~theorem~'#2'.
+ }
+\msg_new:nnn { keytheorems } { store-reversed-not-got }
+ {
+ 'store*=#1'~only~makes~sense~if~you've~called~\protect\getkeytheorem{#1}.~
+ Check~that~\protect\getkeytheorem{#1}~is~called~and~compile~again.
+ }
+\msg_new:nnn { keytheorems } { restate-body-never-got }
+ {
+ With~'store*=#1',~\protect\getkeytheorem[body]{#1}~only~makes~sense~if~
+ \protect\getkeytheorem{#1}~has~been~called.~
+ Check~that~\protect\getkeytheorem{#1}~is~called~and~compile~again.
+ }
+\msg_new:nnn { keytheorems } { store-reversed-called-twice }
+ {
+ With~'store*=#1',~\protect\getkeytheorem{#1}~can~be~called~only~once.
+ }
+\msg_new:nnn { keytheorems } { undefined-thm-hook }
+ {
+ No~theorem~hook~'#1'.~Check~the~spelling.~
+ Should~be~one~of~'prehead',~'posthead',~'prefoot',~'postfoot',~or'restated'.
+ }
+\msg_new:nnn { keytheorems } { hyperref-Autoref }
+ {
+ You~have~not~loaded~hyperref.~The~\protect\Autoref\space command~needs~
+ hyperref~to~work.
+ }
+\msg_new:nnn { keytheorems } { no-Autorefname }
+ {
+ No~Autoref~name~for~'#1'.~
+ Please~define~\c_backslash_str #1Autorefname.
+ }
+\msg_new:nnn { keytheorems } { thmstyle-undefined }
+ {
+ Theorem~style~'#1'~undefined.~
+ Use~\protect\newkeytheoremstyle\space instead.
+ }
+\msg_new:nnn { keytheorems } { thmstyle-defined }
+ {
+ Theorem~style~'#1'~already~defined.~
+ Use~\protect\renewkeytheoremstyle\space instead.
+ }
+\msg_new:nnn { keytheorems } { title-code-with-AMS }
+ {
+ The~'title-code'~key~has~no~effect~with~an~AMS~class.
+ }
+
+% Error if thmtools loaded since compilation hangs.
+% If thmtools loaded after, produce warning.
+\IfPackageLoadedTF { thmtools }
+ {
+ \msg_fatal:nn { keytheorems } { thmtools-before }
+ }
+ {
+ \hook_gput_code:nnn { package/thmtools/before } { . }
+ {
+ \msg_warning:nn { keytheorems } { thmtools-after }
+ }
+ }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% Declare Variables %%%
+%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\tl_new:N \l__keythms_tmpa_tl
+
+\bool_new:N \g__keythms_listof_writefile_bool
+\bool_gset_false:N \g__keythms_listof_writefile_bool
+\bool_new:N \g__keythms_thmtoolscompat_bool
+\bool_gset_false:N \g__keythms_thmtoolscompat_bool
+\bool_new:N \l__keythms_listofheading_storereversed_bool
+\bool_new:N \l__keythms_thm_numbered_bool
+\bool_new:N \l__keythms_thm_unlessunique_bool
+\bool_new:N \l__keythms_thmuse_listhack_bool
+\bool_new:N \l__keythms_thmuse_restating_bool
+\clist_new:N \g__keythms_restatecounters_clist
+\clist_new:N \l__keythms_thmstyle_savedkeys_clist
+\iow_new:N \g__keythms_listof_stream
+\prop_new:N \g__keythms_thmnames_prop
+\prop_new:N \g__keythms_thmstyle_defaultkeys_prop
+\prop_new:N \g__keythms_thmuse_othercounters_prop
+\prop_new:N \l__keythms_restate_counters_prop
+\tl_new:N \l__keythms_thm_currentthmstyle_tl
+\tl_new:N \l__keythms_thm_defaultkeys_tl
+\tl_new:N \l__keythms_thm_envname_tl
+\tl_new:N \l__keythms_thmstyle_defaultkeys_tl
+\tl_new:N \l__keythms_thmstyle_lnotebrace_tl
+\tl_new:N \l__keythms_thmstyle_rnotebrace_tl
+\tl_new:N \l_keythms_thmuse_envname_tl
+\tl_new:N \g__keythms_thmuse_temprestatedata_tl
+\tl_new:N \g__keythms_thmuse_temprestatedatareversed_tl
+
+\newcounter{keythms_restate_dummyctr}
+\cs_gset:Npn \theHkeythms_restate_dummyctr
+ { restate.\arabic{keythms_restate_dummyctr} }
+\cs_gset:Npn \thekeythms_restate_dummyctr { }
+\newcounter{keythms_continues_dummyctr}
+\cs_gset:Npn \theHkeythms_continues_dummyctr
+ { continues.\arabic{keythms_continues_dummyctr} }
+\cs_gset:Npn \thekeythms_continues_dummyctr { }
+\newcounter{keythms_unnumbered_dummyctr}
+\cs_gset:Npn \theHkeythms_unnumbered_dummyctr
+ { unnumbered.\arabic{keythms_unnumbered_dummyctr} }
+\cs_gset:Npn \thekeythms_unnumbered_dummyctr { }
+
+\cs_generate_variant:Nn \hook_gput_code:nnn { nnV }
+\cs_generate_variant:Nn \keys_precompile:nnN { nv, nVc, nnc, ne }
+
+%%%%%%%%%%%%%%
+%%% Styles %%%
+%%%%%%%%%%%%%%
+
+\cs_new_protected:Npn \__keythms_thmstyle_setbraces:nn #1#2
+ { % #1 = left brace, #2 = right brace
+ \tl_set:Nn \l__keythms_thmstyle_lnotebrace_tl { #1 }
+ \tl_set:Nn \l__keythms_thmstyle_rnotebrace_tl { #2 }
+ }
+\cs_new_protected:Npn \keythms_thmstyle_savethmkey_reqval:n #1
+ { % #1 = key value
+ \clist_put_right:No \l__keythms_thmstyle_savedkeys_clist
+ { \l_keys_key_str = { #1 } }
+ }
+\cs_new_protected:Npn \keythms_thmstyle_savethmkey_optval:n #1
+ { % #1 = key value
+ \tl_if_empty:NTF \l_keys_value_tl
+ {
+ \clist_put_right:No \l__keythms_thmstyle_savedkeys_clist
+ { \l_keys_key_str }
+ }
+ {
+ \clist_put_right:No \l__keythms_thmstyle_savedkeys_clist
+ { \l_keys_key_str = { #1 } }
+ }
+ }
+
+\keys_define:nn { keytheorems/thmstyle }
+ {
+ bodyfont .tl_set:N = \l__keythms_thmstyle_bodyfont_tl,
+ break .meta:n = { postheadspace = \newline }, % add error if postheadspace set
+ break .value_forbidden:n = true,
+ headfont .tl_set:N = \l__keythms_thmstyle_headfont_tl,
+ headformat .meta:n = { headstyle = #1 },
+ headindent .tl_set:N = \l__keythms_thmstyle_headindent_tl,
+ headpunct .tl_set:N = \l__keythms_thmstyle_headpunct_tl,
+ headstyle .choice:,
+ headstyle / margin .code:n =
+ {
+ \cs_set:Nn \keythms_thmstyle_headcmd:nnn
+ { \makebox[0pt][r]{\NUMBER\ }\NAME\NOTE }
+ },
+ headstyle / swapnumber .code:n =
+ {
+ \cs_set:Nn \keythms_thmstyle_headcmd:nnn { \NUMBER\ \NAME\NOTE }
+ },
+ headstyle / unknown .cs_set:Np = \keythms_thmstyle_headcmd:nnn #1#2#3,
+ inherit-style .choice:,
+ inherit-style / plain .meta:n = {},
+ inherit-style / definition .meta:n = { bodyfont = \normalfont },
+ inherit-style / remark .meta:n =
+ {
+ bodyfont = \normalfont,
+ headfont = \itshape,
+ spaceabove = 0.5\topsep,
+ spacebelow = 0.5\topsep,
+ },
+ notebraces .code:n = \exp_after:wN \__keythms_thmstyle_setbraces:nn #1,
+ notefont .tl_set:N = \l__keythms_thmstyle_notefont_tl,
+ noteseparator .tl_set:N = \l__keythms_thmstyle_noteseparator_tl,
+ numberfont .tl_set:N = \l__keythms_thmstyle_numberfont_tl,
+ postheadspace .tl_set:N = \l__keythms_thmstyle_postheadspace_tl,
+ spaceabove .tl_set:N = \l__keythms_thmstyle_spaceabove_tl,
+ spacebelow .tl_set:N = \l__keythms_thmstyle_spacebelow_tl,
+ % thm keys that are saved for later
+ numbered .code:n = \keythms_thmstyle_savethmkey_optval:n { #1 },
+ numberlike .code:n = \keythms_thmstyle_savethmkey_reqval:n { #1 },
+ numberwithin .code:n = \keythms_thmstyle_savethmkey_reqval:n { #1 },
+ parent .code:n = \keythms_thmstyle_savethmkey_reqval:n { #1 },
+ postfoothook .code:n = \keythms_thmstyle_savethmkey_reqval:n { #1 },
+ postheadhook .code:n = \keythms_thmstyle_savethmkey_reqval:n { #1 },
+ prefoothook .code:n = \keythms_thmstyle_savethmkey_reqval:n { #1 },
+ preheadhook .code:n = \keythms_thmstyle_savethmkey_reqval:n { #1 },
+ qed .code:n = \keythms_thmstyle_savethmkey_optval:n { #1 },
+ sharenumber .code:n = \keythms_thmstyle_savethmkey_reqval:n { #1 },
+ sibling .code:n = \keythms_thmstyle_savethmkey_reqval:n { #1 },
+ tcolorbox .code:n = \keythms_thmstyle_savethmkey_optval:n { #1 },
+ tcolorbox-no-titlebar .code:n = \keythms_thmstyle_savethmkey_optval:n { #1 },
+ within .code:n = \keythms_thmstyle_savethmkey_reqval:n { #1 },
+ }
+
+\cs_new_protected:Nn \keythms_thmstyle_thmname:n { \thmname{#1} }
+\cs_new_protected:Nn \keythms_thmstyle_thmnumber:n { \thmnumber{#1} }
+\cs_new_protected:Nn \keythms_thmstyle_thmnote:n { \thmnote{#1} }
+
+\cs_new:Npn \keythms_thmstyle_headcmd_default:nnn #1#2#3
+ {
+ \keythms_thmstyle_thmname:n { #1 }
+ \keythms_thmstyle_thmnumber:n
+ { ~
+ \group_begin:
+ \exp_not:V \l__keythms_thmstyle_numberfont_tl
+ #2
+ \group_end:
+ }
+ \keythms_thmstyle_thmnote:n
+ { \exp_not:V \l__keythms_thmstyle_noteseparator_tl
+ \group_begin: % group so notefont doesn't affect headpunct
+ \exp_not:V \l__keythms_thmstyle_notefont_tl
+ \l__keythms_thmstyle_lnotebrace_tl #3 \l__keythms_thmstyle_rnotebrace_tl
+ \group_end:
+ }
+ }
+
+\prop_gset_from_keyval:Nn \g__keythms_thmstyle_defaultkeys_prop
+ { % support files may overwrite these defaults
+ bodyfont = \itshape,
+ headfont = \bfseries,
+ headindent = 0pt,
+ headpunct = {.},
+ headstyle = \keythms_thmstyle_headcmd_default:nnn{#1}{#2}{#3},
+ notebraces = {(}{)},
+ notefont = \fontseries\mddefault\upshape,
+ noteseparator = {~},
+ numberfont = \upshape,
+ postheadspace = 5pt plus 1pt minus 1pt,
+ spaceabove = \topsep,
+ spacebelow = \topsep,
+ }
+\hook_gput_code:nnn { package/keytheorems/after } { . }
+ { % need to defer to wait for support files
+ \keys_precompile:neN { keytheorems/thmstyle }
+ { \prop_to_keyval:N \g__keythms_thmstyle_defaultkeys_prop }
+ \l__keythms_thmstyle_defaultkeys_tl
+ }
+
+\NewDocumentCommand \newkeytheoremstyle { m m }
+ {
+ \cs_if_free:cTF { th@ #1 }
+ { \keythms_thmstyle_declarestyle:nn { #1 } { #2 } }
+ { \msg_error:nnn { keytheorems } { thmstyle-defined } { #1 } }
+ }
+\NewDocumentCommand \renewkeytheoremstyle { m m }
+ {
+ \cs_if_free:cTF { th@ #1 }
+ { \msg_error:nnn { keytheorems } { thmstyle-undefined } { #1 } }
+ { \keythms_thmstyle_declarestyle:nn { #1 } { #2 } }
+ }
+\NewDocumentCommand \providekeytheoremstyle { m m }
+ {
+ \cs_if_free:cT { th@ #1 }
+ { \keythms_thmstyle_declarestyle:nn { #1 } { #2 } }
+ }
+\NewDocumentCommand \declarekeytheoremstyle { m m }
+ {
+ \keythms_thmstyle_declarestyle:nn { #1 } { #2 }
+ }
+
+\@onlypreamble \newkeytheoremstyle
+\@onlypreamble \renewkeytheoremstyle
+\@onlypreamble \providekeytheoremstyle
+\@onlypreamble \declarekeytheoremstyle
+
+\cs_new_eq:NN \keythms_thmstyle_new:nnnnnnnnn \newtheoremstyle
+\cs_generate_variant:Nn \keythms_thmstyle_new:nnnnnnnnn { nVVVVVVVe }
+
+\tl_put_right:Nn \l_text_expand_exclude_tl { \thmnote \thmnumber \thmname }
+% ^ allows \thmnote, etc. to work in headstyle; hope no bad side effects!
+\cs_new_protected:Npn \keythms_thmstyle_declarestyle:nn #1#2
+ { % user is in charge of spacing with \NAME and \NUMBER (thmtools compat...)
+ \cs_set:Npn \NAME { \keythms_thmstyle_thmname:n { ####1 } }
+ \cs_set:Npn \NUMBER
+ {
+ \keythms_thmstyle_thmnumber:n
+ {
+ \group_begin:
+ \exp_not:V \l__keythms_thmstyle_numberfont_tl
+ ####2
+ \group_end:
+ }
+ }
+ \cs_set:Npn \NOTE
+ {
+ \keythms_thmstyle_thmnote:n
+ { \exp_not:V \l__keythms_thmstyle_noteseparator_tl
+ \group_begin: % group so notefont doesn't affect headpunct
+ \exp_not:V \l__keythms_thmstyle_notefont_tl
+ \l__keythms_thmstyle_lnotebrace_tl ####3 \l__keythms_thmstyle_rnotebrace_tl
+ \group_end:
+ }
+ }
+ \clist_clear:N \l__keythms_thmstyle_savedkeys_clist
+ \tl_use:N \l__keythms_thmstyle_defaultkeys_tl
+ \keys_set:nn { keytheorems/thmstyle } { #2 }
+ \keythms_thmstyle_new:nVVVVVVVe { #1 }
+ \l__keythms_thmstyle_spaceabove_tl
+ \l__keythms_thmstyle_spacebelow_tl
+ \l__keythms_thmstyle_bodyfont_tl
+ \l__keythms_thmstyle_headindent_tl
+ \l__keythms_thmstyle_headfont_tl
+ \l__keythms_thmstyle_headpunct_tl
+ \l__keythms_thmstyle_postheadspace_tl
+ { \text_expand:n { \keythms_thmstyle_headcmd:nnn{##1}{##2}{##3} } }
+ % Define inherit-style key
+ \tl_if_exist:cF { l__keythms_thmstyle_ #1 _metakeys_tl }
+ { \tl_new:c { l__keythms_thmstyle_ #1 _metakeys_tl } }
+ \keys_precompile:nnc { keytheorems/thmstyle } { #2 } % use precompile instead of meta key
+ { l__keythms_thmstyle_ #1 _metakeys_tl } % because that's sensitive to hashes
+ \keys_define:nn { keytheorems/thmstyle } % and we want to allow both # and ##
+ { inherit-style / #1 .code:n = \tl_use:c { l__keythms_thmstyle_ #1 _metakeys_tl } }
+ \tl_if_exist:cF { l__keythms_thmstyle_ #1 _savedthmkeys_tl }
+ { \tl_new:c { l__keythms_thmstyle_ #1 _savedthmkeys_tl } }
+ \keys_precompile:nVc { keytheorems/thm }
+ \l__keythms_thmstyle_savedkeys_clist
+ { l__keythms_thmstyle_ #1 _savedthmkeys_tl }
+ \cs_undefine:N \NAME % undefine to prevent conflicts
+ \cs_undefine:N \NUMBER
+ \cs_undefine:N \NOTE
+ }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% Defining Theorems %%%
+%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% FIX: reimplement these without \NewDocumentCommand and \SplitArgument
+\NewDocumentCommand \keythms_thm_setrefnames:nn
+ { m >{\SplitArgument{1}{,}} m } % #1 = envname, #2 = <refname> or <sing,plural>
+ { \__keythms_thm_setrefnames_aux:nnn{#1}#2 }
+\cs_new_protected:Npn \__keythms_thm_setrefnames_aux:nnn #1#2#3
+ {
+ \cs_set:cpn { #1 autorefname } { #2 }
+ \IfPackageLoadedT { cleveref }
+ {
+ \tl_if_novalue:nTF { #3 }
+ { \crefname{#1}{#2}{\textbf{??~(pl.~#2)}} }
+ { \crefname{#1}{#2}{#3} }
+ }
+ }
+\cs_generate_variant:Nn \keythms_thm_setrefnames:nn { nV }
+
+\NewDocumentCommand \keythms_thm_setRefnames:nn
+ { m >{\SplitArgument{1}{,}} m } % #1 = envname, #2 = <refname> or <sing,plural>
+ { \__keythms_thm_setRefnames_aux:nnn{#1}#2 }
+\cs_new_protected:Npn \__keythms_thm_setRefnames_aux:nnn #1#2#3
+ {
+ \cs_set:cpn { #1 Autorefname } { #2 }
+ \IfPackageLoadedT { cleveref }
+ {
+ \tl_if_novalue:nTF { #3 }
+ { \Crefname{#1}{#2}{\textbf{??~(pl.~#2)}} }
+ { \Crefname{#1}{#2}{#3} }
+ }
+ }
+\cs_generate_variant:Nn \keythms_thm_setRefnames:nn { nV }
+
+\keys_define:nn { keytheorems/thm }
+ {
+ heading .meta:n = { name = #1 },
+ name .tl_set:N = \l__keythms_thm_name_tl,
+ numbered .choice:,
+ numbered .default:n = true,
+ numbered / false .code:n = \bool_set_false:N \l__keythms_thm_numbered_bool,
+ numbered / no .meta:n = { numbered = false },
+ numbered / true .code:n = \bool_set_true:N \l__keythms_thm_numbered_bool,
+ numbered / unless-unique .code:n =
+ {
+ \bool_set_true:N \l__keythms_thm_unlessunique_bool
+ },
+ numbered / unless~unique .meta:n = { numbered = unless-unique },
+ numbered / yes .meta:n = { numbered = true },
+ numberlike .meta:n = { sibling = #1 },
+ numberwithin .meta:n = { parent = #1 },
+ parent .tl_set:N = \l__keythms_thm_parent_tl,
+ postfoothook .tl_set:N = \l__keythms_thm_postfoothook_tl,
+ postheadhook .tl_set:N = \l__keythms_thm_postheadhook_tl,
+ prefoothook .tl_set:N = \l__keythms_thm_prefoothook_tl,
+ preheadhook .tl_set:N = \l__keythms_thm_preheadhook_tl,
+ qed .tl_set:N = \l__keythms_thm_qed_tl,
+ qed .default:n = \c_novalue_tl,
+ % ^ distinguish between 'qed' and 'qed={}'
+ refname .tl_set:N = \l__keythms_thm_refname_tl,
+ Refname .tl_set:N = \l__keythms_thm_Refname_tl,
+ sharenumber .meta:n = { sibling = #1 },
+ sibling .tl_set:N = \l__keythms_thm_sibling_tl,
+ style .tl_set:N = \l__keythms_thm_style_tl,
+ style .groups:n = { style-comes-first },
+ tcolorbox .tl_set:N = \l__keythms_thm_tcbkeys_tl,
+ tcolorbox .default:n = {},
+ tcolorbox-no-titlebar .meta:n =
+ {
+ tcolorbox={
+ notitle,
+ before~upper={
+ \group_begin:
+ \__keythms_thm_tcboxtemphead:
+ \group_end:
+ },
+ #1
+ }
+ },
+ tcolorbox-no-titlebar .default:n = {},
+ title .meta:n = { name = #1 },
+ within .meta:n = { parent = #1 },
+ }
+
+% what below is unnecessary? I really don't understand this code.
+\cs_new_protected:Npn \__keythms_thm_storedeferredthmhead:n #1
+ {
+ \if@inlabel \indent \par \fi % eject a section head if one is pending
+ \if@nobreak
+ \adjust@parskip@nobreak
+ \else
+ \addpenalty\@beginparpenalty
+ \addvspace\@topsep
+ \addvspace{-\parskip}
+ \fi
+ % \global\@inlabeltrue % MY COMMENT: if this is uncommented then spacing after sections is wrong
+ \everypar\dth@everypar
+ \cs_set:Npn \__keythms_thm_tcboxtemphead: { \normalfont #1 }
+ \ignorespaces
+ }
+
+\keys_precompile:nnN { keytheorems/thm }
+ {
+ name = \q_no_value,
+ numbered = true,
+ parent = {},
+ postfoothook = {},
+ postheadhook = {},
+ prefoothook = {},
+ preheadhook = {},
+ qed = \q_no_value,
+ refname = \q_no_value,
+ Refname = \q_no_value,
+ sibling = {},
+ style = {},
+ tcolorbox = \q_no_value,
+ }
+ \l__keythms_thm_defaultkeys_tl
+
+\cs_new_protected:Npn \__keythms_thm_makethmhooks:n #1
+ {
+ \hook_new:n { keytheorems/#1/prehead }
+ \hook_new:n { keytheorems/#1/posthead }
+ \hook_new_reversed:n { keytheorems/#1/prefoot }
+ \hook_new_reversed:n { keytheorems/#1/postfoot }
+ \hook_new:n { keytheorems/#1/restated }
+ }
+
+% Make generic theorem hooks
+\__keythms_thm_makethmhooks:n { allthms }
+
+\NewDocumentCommand \newkeytheorem { m O{} }
+ { % #1 = name, #2 = keys
+ \clist_map_inline:nn { #1 } % define multiple theorems at once
+ { \keythms_thm_newkeythm:nn { ##1 } { #2 } }
+ }
+\@onlypreamble \newkeytheorem
+
+% to prevent error when plain, remark, or definition style used
+\tl_new:N \l__keythms_thmstyle_plain_savedthmkeys_tl
+\tl_new:N \l__keythms_thmstyle_remark_savedthmkeys_tl
+\tl_new:N \l__keythms_thmstyle_definition_savedthmkeys_tl
+
+\cs_new_protected:Npn \keythms_thm_newkeythm:nn #1#2
+ { % #1 = name, #2 = keys
+ % Store envname
+ \tl_set:Nn \l__keythms_thm_envname_tl { #1 }
+ % Make unless-unique false by default (can't precompile this)
+ \bool_set_false:N \l__keythms_thm_unlessunique_bool
+ % Set default keys
+ \tl_use:N \l__keythms_thm_defaultkeys_tl
+ % First set style so we can pick up additional thm keys, then overwrite if necessary
+ \keys_set_groups:nnn { keytheorems/thm } { style-comes-first } { #2 }
+ % Store theorem style
+ \tl_set:Ne \l__keythms_thm_currentthmstyle_tl { \the\thm@style }
+ \tl_if_empty:NTF \l__keythms_thm_style_tl
+ { % if \theoremstyle set, also use saved thm keys
+ \tl_if_exist:cT {l__keythms_thmstyle_ \l__keythms_thm_currentthmstyle_tl _savedthmkeys_tl}
+ { \tl_use:c {l__keythms_thmstyle_ \l__keythms_thm_currentthmstyle_tl _savedthmkeys_tl} }
+ }
+ {
+ % Temporarily set theorem style
+ \__keythms_theoremstyle:n { \l__keythms_thm_style_tl }
+ % If thm keys given in style, call now (possibly overwritten in next step)
+ % but don't error if user uses a style defined with just \newtheoremstyle
+ \tl_if_exist:cT { l__keythms_thmstyle_ \l__keythms_thm_style_tl _savedthmkeys_tl }
+ { \tl_use:c { l__keythms_thmstyle_ \l__keythms_thm_style_tl _savedthmkeys_tl } }
+ }
+ % Set env-specific keys
+ \keys_set:nn { keytheorems/thm } { #2 }
+ % Set up env-specific hooks
+ \__keythms_thm_makethmhooks:n { #1 }
+ % Add to env-specific hooks (use label so code given in keys is outermost)
+ % NOTE: faster to check if empty than add empty code to hook
+ \tl_if_empty:NF \l__keythms_thm_preheadhook_tl
+ {
+ \hook_gput_code:nnV { keytheorems/#1/prehead }
+ { keythms_hook_keys } \l__keythms_thm_preheadhook_tl
+ }
+ \tl_if_empty:NF \l__keythms_thm_postheadhook_tl
+ {
+ \hook_gput_code:nnV { keytheorems/#1/posthead }
+ { keythms_hook_keys } \l__keythms_thm_postheadhook_tl
+ }
+ \tl_if_empty:NF \l__keythms_thm_prefoothook_tl
+ {
+ \hook_gput_code:nnV { keytheorems/#1/prefoot }
+ { keythms_hook_keys } \l__keythms_thm_prefoothook_tl
+ }
+ \tl_if_empty:NF \l__keythms_thm_postfoothook_tl
+ {
+ \hook_gput_code:nnV { keytheorems/#1/postfoot }
+ { keythms_hook_keys } \l__keythms_thm_postfoothook_tl
+ }
+ % Set name if none given
+ \quark_if_no_value:NT \l__keythms_thm_name_tl % use quark so name={} is valid
+ {
+ % use e so \text_titlecase called only once per theorem definition,
+ % not each time the theorem is used
+ \tl_set:Ne \l__keythms_thm_name_tl
+ { \text_titlecase_first:n { #1 } }
+ }
+ % associate formatted name with envname in prop list
+ \prop_gput:NnV \g__keythms_thmnames_prop { #1 } \l__keythms_thm_name_tl
+ % Call correct \newtheorem variant
+ \bool_if:NTF \l__keythms_thm_unlessunique_bool
+ {
+ % [unq] is required since aux is read at begindocument
+ % (technically right before) which is after theorem is defined
+ \RequirePackage[unq]{unique}
+ \tl_if_empty:NTF \l__keythms_thm_parent_tl
+ {
+ \hook_gput_code:nnn { keytheorems/#1/prehead }
+ { keythms_hook_keys } { \setuniqmark { #1 } }
+ \ifuniq{ #1 }
+ { \bool_set_false:N \l__keythms_thm_numbered_bool }
+ { \bool_set_true:N \l__keythms_thm_numbered_bool }
+ \bool_if:NTF \l__keythms_thm_numbered_bool
+ {
+ \tl_if_empty:NTF \l__keythms_thm_sibling_tl
+ {
+ \__keythms_thm_new_numbered:nV { #1 } \l__keythms_thm_name_tl
+ }
+ {
+ \exp_args:NnV \newaliascnt { #1 } \l__keythms_thm_sibling_tl
+ \__keythms_thm_new_sibling:nVn { #1 }
+ \l__keythms_thm_name_tl { #1 }
+ \aliascntresetthe { #1 }
+ }
+ }
+ {
+ \__keythms_thm_new_unnumbered:nV { #1 } \l__keythms_thm_name_tl
+ \hook_gput_code:nnn { keytheorems/#1/prehead } { keythms_hook_keys }
+ {
+ \keythms_if_restating:F
+ { \refstepcounter{ keythms_unnumbered_dummyctr } }
+ }
+ }
+ }
+ {
+ \__keythms_thm_new_uuwithparent:nVV { #1 }
+ \l__keythms_thm_name_tl \l__keythms_thm_parent_tl
+ }
+ }
+ {
+ \bool_if:NTF \l__keythms_thm_numbered_bool
+ {
+ \tl_if_empty:NTF \l__keythms_thm_parent_tl
+ {
+ \tl_if_empty:NTF \l__keythms_thm_sibling_tl
+ {
+ \__keythms_thm_new_numbered:nV { #1 } \l__keythms_thm_name_tl
+ }
+ {
+ \exp_args:NnV \newaliascnt { #1 } \l__keythms_thm_sibling_tl
+ \__keythms_thm_new_sibling:nVn { #1 }
+ \l__keythms_thm_name_tl { #1 }
+ \aliascntresetthe { #1 }
+ }
+ }
+ {
+ \__keythms_thm_new_parent:nVV { #1 }
+ \l__keythms_thm_name_tl \l__keythms_thm_parent_tl
+ }
+ }
+ {
+ \__keythms_thm_new_unnumbered:nV { #1 } \l__keythms_thm_name_tl
+ \hook_gput_code:nnn { keytheorems/#1/prehead } { keythms_hook_keys }
+ {
+ \keythms_if_restating:F
+ { \refstepcounter{ keythms_unnumbered_dummyctr } }
+ }
+ }
+ }
+ % Store theorem def and redefine it with keys
+ \keythms_keyify_theorem:n { #1 }
+ % define \<env>autorefname and \<env>Autorefname, might be redefined next
+ \exp_args:NnV \cs_set:cpn { #1 autorefname } \l__keythms_thm_name_tl
+ \exp_args:NnV \cs_set:cpn { #1 Autorefname } \l__keythms_thm_name_tl
+ % Set ref names
+ \quark_if_no_value:NF \l__keythms_thm_refname_tl
+ { \keythms_thm_setrefnames:nV { #1 } \l__keythms_thm_refname_tl }
+ \quark_if_no_value:NF \l__keythms_thm_Refname_tl
+ { \keythms_thm_setRefnames:nV { #1 } \l__keythms_thm_Refname_tl }
+ % Set up qed if needed
+ \quark_if_no_value:NF \l__keythms_thm_qed_tl
+ {
+ \exp_args:Nno \__keythms_thm_qedcode:nn { #1 } { \l__keythms_thm_qed_tl }
+ }
+ % Set up tcolorbox if needed
+ \quark_if_no_value:NF \l__keythms_thm_tcbkeys_tl
+ {
+ \exp_args:Nno \__keythms_thm_tcboxcode:nn { #1 }
+ { \l__keythms_thm_tcbkeys_tl }
+ }
+ % Set up list-of definition
+ \cs_set_eq:cN { l@ #1 } \keythms_listof_tocline:
+ % Set default list-of display command
+ \__keythms_listof_show_aux:n { #1 }
+ % Set theorem style back to original state if needed
+ \tl_if_empty:NF \l__keythms_thm_style_tl
+ { \__keythms_theoremstyle:V \l__keythms_thm_currentthmstyle_tl }
+ }
+
+\cs_new_protected:Npn \__keythms_thm_tcboxcode:nn #1#2
+ {
+ \RequirePackage{tcolorbox}
+ \hook_gput_code:nnn { keytheorems/#1/prehead }
+ { keythms_tcbox }
+ {
+ \cs_set_eq:NN \deferred@thm@head \__keythms_thm_storedeferredthmhead:n
+ \cs_set_eq:NN \Hy@theorem@makelinktarget \use_none:n
+ % ^ don't like playing with hyperref internals... but don't see around
+ % it because hyperref tries to add to para hook which doesn't work
+ % when title set up the way we do it
+ \cs_set_protected:Npn \thm@space@setup { \thm@preskip=0pt \thm@postskip=0pt }
+ % ^ to match tcolorbox defaults; shouldn't interfere with user styles
+ }
+ \hook_gset_rule:nnnn { keytheorems/#1/posthead }
+ { keythms_tcbox } { before } { keythms_hook_keys }
+ \hook_gset_rule:nnnn { keytheorems/#1/prefoot }
+ { keythms_tcbox } { after } { keythms_hook_keys }
+ \hook_gset_rule:nnnn { keytheorems/#1/prefoot }
+ { keythms_tcbox } { after } { keythms_qed }
+ \tcbset
+ {
+ keythms_tcbox_#1/.style =
+ {
+ savedelimiter=#1,
+ title={ \__keythms_thm_tcboxtemphead: },
+ }
+ }
+ \bool_if:NT \l__keythms_thm_numbered_bool
+ {
+ \hook_gput_code:nnn { begindocument } { . }
+ {
+ \IfPackageLoadedF{cleveref}
+ { % hyperref doesn't patch \@thm if cleveref loaded
+ \tcbset
+ {
+ keythms_tcbox_#1/.append~style = % fix hyperlinking
+ { phantom={ \MakeLinkTarget*{\@currentHref} } }
+ }
+ }
+ }
+ }
+ \hook_gput_code:nnn { keytheorems/#1/posthead } { keythms_tcbox }
+ { \begin{tcolorbox}[keythms_tcbox_#1,#2] }
+ \hook_gput_code:nnn { keytheorems/#1/prefoot } { keythms_tcbox }
+ { \end{tcolorbox} }
+ }
+\cs_new_protected:Npn \__keythms_thm_qedcode:nn #1#2
+ {
+ \hook_gput_code:nnn { keytheorems/#1/posthead }
+ { keythms_qed }
+ {
+ \exp_args:No \tl_if_novalue:nF { #2 } { \protected@edef\qedsymbol{#2} }
+ \pushQED{\qed}
+ }
+ \hook_gput_code:nnn { keytheorems/#1/prefoot }
+ { keythms_qed }
+ {
+ \exp_args:No \tl_if_novalue:nF { #2 } { \protected@edef\qedsymbol{#2} }
+ \popQED
+ }
+ }
+
+\cs_new_eq:NN \__keythms_theoremstyle:n \theoremstyle
+\cs_generate_variant:Nn \__keythms_theoremstyle:n { V }
+
+\cs_new_eq:NN \__keythms_thm_new:w \newtheorem
+
+\cs_new_protected:Npn \__keythms_thm_new_numbered:nn #1#2
+ { \__keythms_thm_new:w { #1 } { #2 } }
+\cs_generate_variant:Nn \__keythms_thm_new_numbered:nn { nV }
+
+\cs_new_protected:Npn \__keythms_thm_new_unnumbered:nn #1#2
+ { \__keythms_thm_new:w* { #1 } { #2 } }
+\cs_generate_variant:Nn \__keythms_thm_new_unnumbered:nn { nV }
+
+\cs_new_protected:Npn \__keythms_thm_new_parent:nnn #1#2#3
+ { \__keythms_thm_new:w { #1 } { #2 } [ #3 ] }
+\cs_generate_variant:Nn \__keythms_thm_new_parent:nnn { nVV }
+
+\cs_new_protected:Npn \__keythms_thm_new_sibling:nnn #1#2#3
+ { \__keythms_thm_new:w { #1 } [ #3 ] { #2 } }
+\cs_generate_variant:Nn \__keythms_thm_new_sibling:nnn { nV }
+
+\cs_new_protected:Npn \__keythms_thm_new_uuwithparent:nnn #1#2#3
+ {
+ \cs_undefine:c { keythms_orig_nonumber_#1 } % for renew, declare
+ \__keythms_thm_new_unnumbered:nn { keythms_orig_nonumber_#1 } { #2 }
+ \__keythms_thm_new_parent:nnn { #1 } { #2 } { #3 }
+ \DeclareEnvironmentCopy { keythms_orig_withparent_#1 } { #1 }
+ \renewenvironment { #1 } % opt arg is implicit
+ {
+ \setuniqmark{ #1. \use:c {the #3} }
+ \ifuniq{ #1. \use:c {the #3} }
+ {
+ \keythms_if_restating:F
+ { \refstepcounter{ keythms_unnumbered_dummyctr } }
+ \begin{keythms_orig_nonumber_#1}
+ }
+ {
+ \begin{keythms_orig_withparent_#1}
+ }
+ }
+ {
+ \ifuniq{ #1. \use:c {the #3} }
+ { \end{keythms_orig_nonumber_#1} }
+ { \end{keythms_orig_withparent_#1} }
+ }
+ }
+\cs_generate_variant:Nn \__keythms_thm_new_uuwithparent:nnn { nVV }
+
+% for getting notes with continues*, use nameref if available, otherwise ltproperties
+\hook_gput_code:nnn { begindocument } { . }
+ {
+ \IfPackageLoadedTF { nameref }
+ {
+ \cs_new:Npn \__keythms_thmuse_recordnote: { } % nameref takes care of this
+ \cs_new:Npn \__keythms_getrecordednote:n #1
+ {
+ \getrefbykeydefault{ #1 }{ name }{ }
+ }
+ }
+ {
+ \property_new:nnnn { keytheorems/recordednote } { now } { }
+ { \l__keythms_thmuse_note_tl }
+ \cs_new:Npn \__keythms_getrecordednote:n #1
+ {
+ \property_ref:nn { keythms_recordednote_#1 }
+ { keytheorems/recordednote }
+ }
+ \cs_new:Npn \__keythms_thmuse_recordnote:
+ {
+ \tl_if_empty:NF \l__keythms_thmuse_note_tl
+ {
+ \RecordProperties
+ { keythms_recordednote_\l__keythms_thmuse_label_tl }
+ { keytheorems/recordednote }
+ }
+ }
+ }
+ }
+
+\keys_define:nn { keytheorems/thmuse }
+ {
+ continues .tl_set:N = \l__keythms_thmuse_contlabel_tl,
+ continues* .code:n =
+ {
+ \keys_set:nn { keytheorems/thmuse } { continues = #1 }
+ \protected@edef \l__keythms_tmpa_tl { \__keythms_getrecordednote:n{#1} }
+ \tl_if_empty:NF \l__keythms_tmpa_tl
+ {
+ \keys_set:nn { keytheorems/thmuse }
+ { note = \l__keythms_tmpa_tl }
+ }
+ },
+ label .tl_set:N = \l__keythms_thmuse_label_tl,
+ listhack .choice:, % needs equals sign
+ listhack / true .code:n = \bool_set_true:N \l__keythms_thmuse_listhack_bool,
+ listhack / false .code:n = \bool_set_false:N \l__keythms_thmuse_listhack_bool,
+ listhack .initial:n = false,
+ name .meta:n = { note = #1 },
+ % ^ for compatibility. "name" is ambiguous and doesn't match amsthm language
+ note .tl_set:N = \l__keythms_thmuse_note_tl,
+ note .initial:n = {},
+ restate .meta:n = { store = #1 }, % thmtools compatibility
+ restate* .meta:n = { store* = #1 },
+ restate-keys .clist_set:N = \l__keythms_thmuse_restatekeys_clist,
+ seq .code:n = {},
+ short-note .code:n = {}, % these do nothing at point of use
+ short-name .code:n = {},
+ store .tl_set:N = \l__keythms_thmuse_store_tl, % should this be .tl_set_e:N ?
+ store* .tl_set:N = \l__keythms_thmuse_storereversed_tl,
+ }
+
+\cs_new_protected:Npn \keythms_keyify_theorem:n #1
+ { % #1 = theorem name
+ \DeclareEnvironmentCopy { keythms_orig_#1 } { #1 }
+ \DeclareDocumentEnvironment { keythms_grab_#1 } { m m +b }
+ { % ##1 = keys, ##2 = note, ##3 = theorem body
+ \__keythms_thm_prehead_code:n { #1 }
+ \begin{keythms_orig_#1}[{##2}]
+ \clist_map_inline:Nn \g__keythms_restatecounters_clist
+ {
+ \prop_gput:Nne \g__keythms_thmuse_othercounters_prop { ####1 }
+ { \the\value{####1} }
+ }
+ \__keythms_thm_posthead_code:n { #1 }
+ % below needs to come after posthead so that correct \@currentHref
+ % is stored for tcolorbox theorems
+ \__keythms_thm_addcontentsdata:nnnn { #1 }
+ { \prop_to_keyval:N \g__keythms_thmuse_othercounters_prop }
+ { ##1 } { ##3 }
+ \__keythms_thm_tempstorerestatedata:nnn { #1 } { ##1 } { ##3 }
+ ##3
+ \__keythms_thm_prefoot_code:n { #1 }
+ \end{keythms_orig_#1}
+ \__keythms_thm_postfoot_code:n { #1 }
+ }
+ {}
+ \DeclareDocumentEnvironment { keythms_grabreversed_#1 } { m m +b }
+ { % ##1 = keys, ##2 = note, ##3 = theorem body
+ \tl_if_exist:cTF
+ { c__keythms_storeatbegin_ \l__keythms_thmuse_storereversed_tl _restatecounters_tl }
+ {
+ \bool_set_true:N \l__keythms_thmuse_restating_bool
+ \exp_args:NNe \prop_set_from_keyval:Nn \l__keythms_restate_counters_prop
+ { \tl_use:c { c__keythms_storeatbegin_ \l__keythms_thmuse_storereversed_tl _restatecounters_tl } }
+ \prop_map_inline:Nn \l__keythms_restate_counters_prop
+ {
+ \tl_set:ce { l_keythms_restate_current_####1_tl }
+ { \the\value{####1} }
+ \setcounter { ####1 } { ####2 }
+ % ^ FIX: what if eq's numbered by section, theorem, etc.? The
+ % thmtools code is opaque.... Or maybe should be up to the
+ % user to say "restate-counters={section,chapter,...}".
+ \cs_set:cpn { theH ####1 }
+ { \use:c { the ####1 } . \theHkeythms_restate_dummyctr }
+ }
+ \tl_if_empty:cTF
+ { c__keythms_storeatbegin_ \l__keythms_thmuse_storereversed_tl _label_tl }
+ { \refstepcounter{keythms_restate_dummyctr} } % for unnumbered theorems
+ {
+ \cs_set:cpn { the #1 }
+ { \tl_use:c { c__keythms_storeatbegin_ \l__keythms_thmuse_storereversed_tl _label_tl } }
+ \cs_set_eq:cN { c@ #1 } \c@keythms_restate_dummyctr
+ \cs_set_eq:cN { theH #1 } \theHkeythms_restate_dummyctr
+ % ^ why are the last two lines here? We shouldn't be referencing
+ % restated theorems. Think it's a remnant of thmtools
+ % WRONG: needed to make numbering correct after restated theorem.
+ % not sure about theH. <- this is needed to prevent duplicate anchors
+ }
+ }
+ {
+ \msg_warning:nne { keytheorems } { store-reversed-not-got }
+ { \l__keythms_thmuse_storereversed_tl }
+ }
+ \renewcommand\label[2][]{} % disable \label (opt arg in case cleveref loaded)
+ \cs_set_eq:NN \ltx@label \use_none:n % disable \ltx@label
+ \cs_set_eq:NN \property_record:nn \use_none:nn % disable \RecordProperties
+ \cs_set_eq:NN \setuniqmark \use_none:n % work with numbered=unless-unique
+ % QUESTION: also disable \hyper@@anchor? \MakeLinkTarget?
+ \hook_use:n { keytheorems/#1/restated }
+ \hook_use:n { keytheorems/allthms/restated }
+ \__keythms_thm_prehead_code:n { #1 }
+ \begin{keythms_orig_#1}[{##2}]
+ \__keythms_thm_posthead_code:n { #1 }
+ % below needs to come after posthead so that correct \@currentHref
+ % is stored for tcolorbox theorems
+ \__keythms_thm_addstoredreverseddata:nnn { #1 } { ##1 } { ##3 }
+ \__keythms_thm_tempstorerestatedatareversed:nnn { #1 } { ##1 } { ##3 }
+ ##3
+ \__keythms_thm_prefoot_code:n { #1 }
+ \end{keythms_orig_#1}
+ \__keythms_thm_postfoot_code:n { #1 }
+ \prop_map_inline:Nn \l__keythms_restate_counters_prop
+ {
+ \exp_args:Nnc \setcounter { ####1 }
+ { l_keythms_restate_current_####1_tl }
+ }
+ }
+ { }
+ % NOTE: have to do a lot of shenanigans to make sure the begin/end of grabbed
+ % theorem env captures only the body and no package code.
+ % This is the price of on-the-fly redefining the env to grab body
+ \RenewDocumentEnvironment { #1 } { ={note} O{} }
+ {
+ \keys_set:nn { keytheorems/thmuse } { ##1 }
+ \tl_if_empty:NF \l__keythms_thmuse_store_tl
+ {
+ \bool_gset_true:N \g__keythms_listof_writefile_bool
+ \cs_set_eq:NN \__keythms_withhooks_begin:nnn \__keythms_grab_begin:nnn
+ \cs_set_eq:NN \__keythms_withhooks_begin:nnV \__keythms_grab_begin:nnV
+ \cs_set_eq:NN \__keythms_withhooks_end:n \__keythms_grab_end:n
+ }
+ \tl_if_empty:NF \l__keythms_thmuse_storereversed_tl
+ {
+ \bool_gset_true:N \g__keythms_listof_writefile_bool
+ \cs_set_eq:NN \__keythms_withhooks_begin:nnn \__keythms_grabreversed_begin:nnn
+ \cs_set_eq:NN \__keythms_withhooks_begin:nnV \__keythms_grabreversed_begin:nnV
+ \cs_set_eq:NN \__keythms_withhooks_end:n \__keythms_grabreversed_end:n
+ }
+ \__keythms_thm_prehead_continues_code:n { #1 }
+ \__keythms_withhooks_begin:nnV { #1 } { ##1 } \l__keythms_thmuse_note_tl
+ }
+ {
+ \__keythms_withhooks_end:n { #1 }
+ \tl_if_empty:NF \l__keythms_thmuse_store_tl
+ {
+ \cs_if_exist:cF
+ { __keythms_getthm_ \l__keythms_thmuse_store_tl _theorem }
+ {
+ \cs_new:cpe
+ { __keythms_getthm_ \l__keythms_thmuse_store_tl _theorem }
+ {
+ \exp_not:N \__keythms_getthm_theorem:nnnnn
+ \exp_not:o { \g__keythms_thmuse_temprestatedata_tl }
+ }
+ \cs_new:cpe
+ { __keythms_getthm_ \l__keythms_thmuse_store_tl _body }
+ {
+ \exp_not:N \__keythms_getthm_body:nn
+ \exp_args:No \exp_not:o
+ {
+ \exp_after:wN \__keythms_use_iii_v_braced:nnnnn
+ \g__keythms_thmuse_temprestatedata_tl
+ }
+ }
+ }
+ }
+ \tl_if_empty:NF \l__keythms_thmuse_storereversed_tl
+ {
+ \cs_if_exist:cF
+ { __keythms_getthm_ \l__keythms_thmuse_storereversed_tl _theorem }
+ {
+ \cs_new:cpe
+ { __keythms_getthm_ \l__keythms_thmuse_storereversed_tl _theorem }
+ {
+ \exp_not:N \__keythms_getthmreversed_theorem:nnn
+ \exp_not:o { \g__keythms_thmuse_temprestatedatareversed_tl }
+ }
+ \cs_new:cpn
+ { __keythms_getthm_ \l__keythms_thmuse_storereversed_tl _body }
+ {
+ \textbf{??}
+ \msg_warning:nnn { keytheorems } { restate-body-never-got }
+ { #1 }
+ }
+ }
+ }
+ }
+ }
+\cs_new:Npn \__keythms_use_iii_v_braced:nnnnn #1#2#3#4#5 { {#3}{#5} }
+
+\cs_new_protected:Npn \__keythms_withhooks_begin:nnn #1#2#3
+ { % #1 = theorem name, #2 = keys, #3 = note
+ \__keythms_thm_prehead_code:n { #1 }
+ \begin{keythms_orig_#1}[{#3}]
+ \__keythms_thm_posthead_code:n { #1 }
+ \__keythms_thm_addcontentsdata:nnnn { #1 } { } { #2 } { }
+ \ignorespaces % I hope this is alright
+ }
+\cs_generate_variant:Nn \__keythms_withhooks_begin:nnn { nnV }
+\cs_new_protected:Npn \__keythms_withhooks_end:n #1
+ {
+ \__keythms_thm_prefoot_code:n { #1 }
+ \end{keythms_orig_#1}
+ \__keythms_thm_postfoot_code:n { #1 }
+ }
+\cs_new_protected:Npn \__keythms_grab_begin:nnn #1#2#3
+ { % #1 = theorem name, #2 = keys, #3 = note
+ \begin{keythms_grab_#1}{#2}{#3}
+ }
+\cs_generate_variant:Nn \__keythms_grab_begin:nnn { nnV }
+\cs_new_protected:Npn \__keythms_grab_end:n #1 { \end{keythms_grab_#1} }
+
+\cs_new_protected:Npn \__keythms_grabreversed_begin:nnn #1#2#3
+ { % #1 = theorem name, #2 = keys, #3 = note
+ \begin{keythms_grabreversed_#1}{#2}{#3}
+ }
+\cs_generate_variant:Nn \__keythms_grabreversed_begin:nnn { nnV }
+\cs_new_protected:Npn \__keythms_grabreversed_end:n #1
+ { \end{keythms_grabreversed_#1} }
+
+\cs_new_protected:Npn \__keythms_orig_begin:nn #1#2
+ { \begin{keythms_orig_#1}[{#2}] }
+\cs_generate_variant:Nn \__keythms_orig_begin:nn { nV }
+\cs_new_protected:Npn \__keythms_orig_end:n #1 { \end{keythms_orig_#1} }
+
+\cs_new_protected:Npn \__keythms_thm_prehead_code:n #1
+ { % #1 = theorem name
+ \tl_set:Nn \l_keythms_thmuse_envname_tl { #1 }
+ \hook_use:n { keytheorems/#1/prehead }
+ \hook_use:n { keytheorems/allthms/prehead }
+ }
+%% this below has to be separate from prehead_code above since we need to add
+%% continues-code to note before retrieving it in \__keythms_withhooks_begin:nnV
+\cs_new_protected:Npn \__keythms_thm_prehead_continues_code:n #1
+ { % #1 = theorem name
+ \tl_if_empty:NF \l__keythms_thmuse_contlabel_tl
+ {
+ \tl_if_empty:NF \l__keythms_thmuse_note_tl
+ { \tl_put_right:Nn \l__keythms_thmuse_note_tl { , ~ } }
+ \tl_put_right:Ne \l__keythms_thmuse_note_tl
+ { \__keythms_thmuse_continues:V \l__keythms_thmuse_contlabel_tl }
+ \cs_set:cpn { the #1 }
+ {
+ \getrefnumber { \l__keythms_thmuse_contlabel_tl }
+ }
+ \cs_set_eq:cN { c@ #1 } \c@keythms_continues_dummyctr
+ \cs_set_eq:cN { theH #1 } \theHkeythms_continues_dummyctr
+ %\cs_set_eq:NN \setuniqmark \use_none:n % not the right fix
+ }
+ }
+\cs_new_protected:Npn \__keythms_thm_posthead_code:n #1
+ { % #1 = theorem name
+ \hook_use:n { keytheorems/#1/posthead }
+ \hook_use:n { keytheorems/allthms/posthead }
+ \tl_if_empty:NF \l__keythms_thmuse_label_tl
+ {
+ \label{ \l__keythms_thmuse_label_tl }
+ \__keythms_thmuse_recordnote:
+ }
+ \bool_if:NT \l__keythms_thmuse_listhack_bool
+ { % straight from thm-amsthm.sty
+ \leavevmode
+ \vspace{-\baselineskip}%
+ \par
+ \everypar{\setbox\z@\lastbox\everypar{}}%
+ }
+ }
+\cs_new_protected:Npn \__keythms_thm_prefoot_code:n #1
+ { % #1 = theorem name
+ \hook_use:n { keytheorems/allthms/prefoot }
+ \hook_use:n { keytheorems/#1/prefoot }
+ }
+\cs_new_protected:Npn \__keythms_thm_postfoot_code:n #1
+ { % #1 = theorem name
+ \hook_use:n { keytheorems/allthms/postfoot }
+ \hook_use:n { keytheorems/#1/postfoot }
+ }
+\cs_new_protected:Npn \__keythms_thm_addcontentsdata:nnnn #1#2#3#4
+ { % #1 = theorem name, #2 = stored counters, #3 = keys, #4 = body
+ \keythms_listof_chaptervspacehack:
+ \iow_shipout:Ne \@auxout
+ {
+ \exp_not:N \@writefile { thlist }
+ {
+ \KeyThmsSavedTheorem{ #1 }
+ { \@currentlabel }
+ { \@currentHref }
+ { \thepage }
+ { #2 }
+ { \exp_not:n { #3 } } % do we want any expansion here, perhaps
+ { \exp_not:n { #4 } } % with \text_expand:n ?
+ }
+ }
+ }
+\cs_new_protected:Npn \__keythms_thm_addstoredreverseddata:nnn #1#2#3
+ {
+ \iow_shipout:Ne \@auxout
+ {
+ \exp_not:N \@writefile { thlist }
+ {
+ \KeyThmsSavedTheoremReversed { \l__keythms_thmuse_storereversed_tl }
+ { #1 }
+ { \exp_not:n { #2 } }
+ { \exp_not:n { #3 } }
+ }
+ }
+ }
+\cs_new_protected:Npn \__keythms_thm_tempstorerestatedata:nnn #1#2#3
+ { % #1 = theorem name, #2 = keys, #3 = body
+ \tl_gset:Ne \g__keythms_thmuse_temprestatedata_tl % needs to be global to get out of env
+ {
+ { #1 }
+ { \@currentlabel }
+ { \prop_to_keyval:N \g__keythms_thmuse_othercounters_prop }
+ { \exp_not:n { #2 } } % do we want any expansion here, perhaps
+ { \exp_not:n { #3 } } % with \text_expand:n ?
+ }
+ }
+\cs_new_protected:Npn \__keythms_thm_tempstorerestatedatareversed:nnn #1#2#3
+ {
+ \tl_gset:Ne \g__keythms_thmuse_temprestatedatareversed_tl % needs to be global to get out of env
+ {
+ { #1 }
+ { \exp_not:n { #2 } }
+ { \exp_not:n { #3 } }
+ }
+ }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% Retrieving Theorem Data %%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\cs_new_protected:Npn \KeyThmsSavedTheorem #1#2#3#4#5#6#7 % 7th arg is body
+ { \use:c { __keythms_thmitem_#1:nnnnnn } {#2}{#3}{#4}{#5}{#6}{#7} }
+\cs_new_protected:Npn \KeyThmsSavedTheoremReversed #1#2#3#4 { } % gobble by default
+
+\keys_define:nn { keytheorems/storeatbegin }
+ {
+ restate .meta:n = { store=#1 },
+ restate* .meta:n = { store*=#1 },
+ store .tl_set:N = \l__keythms_storeatbegin_store_tl,
+ store* .tl_set:N = \l__keythms_storeatbegin_storereversed_tl,
+ unknown .code:n = { } % do nothing with unknown keys
+ }
+
+\cs_new_protected:Npn \KeyThmsContentsLine #1 { }
+% ^ initially a no-op, redefined where needed; important it's protected!
+\NewDocumentCommand \addtheoremcontentsline { m m }
+ {
+ \addtocontents { thlist }
+ {
+ \KeyThmsContentsLine
+ { % copied from def of \addcontentsline
+ \protect\contentsline{#1}{#2}{\thepage}{}
+ \protected@file@percent
+ }
+ }
+ }
+\NewDocumentCommand \addtotheoremcontents { m }
+ {
+ \addtocontents { thlist }
+ {
+ \KeyThmsContentsLine { #1 }
+ }
+ }
+
+\hook_gput_code:nnn { begindocument } { . }
+ {
+ \group_begin:
+ \cs_set_protected:Npn \KeyThmsSavedTheorem #1#2#3#4#5#6#7
+ {
+ \group_begin:
+ \keys_set:nn { keytheorems/storeatbegin } { #6 }
+ \tl_if_empty:NF \l__keythms_storeatbegin_store_tl
+ {
+ \cs_new_protected:cpn
+ { __keythms_getthm_ \l__keythms_storeatbegin_store_tl _theorem }
+ {
+ \__keythms_getthm_theorem:nnnnn
+ {#1}{#2}{#5}{#6}{#7}
+ }
+ \cs_new_protected:cpn
+ { __keythms_getthm_ \l__keythms_storeatbegin_store_tl _body }
+ {
+ \__keythms_getthm_body:nn {#5}{#7}
+ }
+ }
+ \tl_if_empty:NF \l__keythms_storeatbegin_storereversed_tl
+ {
+ \tl_const:cn
+ { c__keythms_storeatbegin_ \l__keythms_storeatbegin_storereversed_tl _label_tl }
+ { #2 }
+ \tl_const:cn
+ { c__keythms_storeatbegin_ \l__keythms_storeatbegin_storereversed_tl _restatecounters_tl }
+ { #5 }
+ \cs_new_protected:cpn
+ { __keythms_getthm_ \l__keythms_storeatbegin_storereversed_tl _body }
+ {
+ \__keythms_getthm_body:nn {#5}{#7}
+ }
+ }
+ \group_end:
+ }
+ \cs_set_protected:Npn \KeyThmsSavedTheoremReversed #1#2#3#4
+ {
+ \bool_new:c { g__keythms_restate_#1_called_bool }
+ \cs_gset:cpn { __keythms_getthm_ #1 _theorem }
+ { \__keythms_getthmreversed_theorem:nnn { #2 } { #3 } { #4 } }
+ \hook_gput_code:nnn { begindocument/end } { . }
+ {
+ \cs_if_exist:cF { __keythms_getthm_ #1 _body }
+ {
+ \cs_new_protected:cpn { __keythms_getthm_ #1 _body }
+ {
+ \textbf{??}
+ \msg_warning:nnn { keytheorems } { restate-body-never-got } { #1 }
+ }
+ }
+ }
+ }
+ \file_if_exist_input:n { \c_sys_jobname_str.thlist }
+ \group_end:
+ }
+
+\prg_new_conditional:Npnn \keythms_if_restating: { T, F, TF }
+ {
+ \bool_if:NTF \l__keythms_thmuse_restating_bool
+ { \prg_return_true: }
+ { \prg_return_false: }
+ }
+\NewDocumentCommand \IfRestatingTF { } { \keythms_if_restating:TF }
+\NewDocumentCommand \IfRestatingT { } { \keythms_if_restating:T }
+\NewDocumentCommand \IfRestatingF { } { \keythms_if_restating:F }
+
+\cs_new_protected:Npn \__keythms_getthm_theorem:nnnnn #1#2#3#4#5
+ { % #1 = name, #2 = number, #3 = restate counters, #4 = keys, #5 = theorem body
+ \group_begin:
+ \bool_set_true:N \l__keythms_thmuse_restating_bool
+ \prop_set_from_keyval:Nn \l__keythms_restate_counters_prop { #3 }
+ \prop_map_inline:Nn \l__keythms_restate_counters_prop
+ {
+ \tl_set:ce { l_keythms_restate_current_##1_tl } { \the\value{##1} }
+ \setcounter { ##1 } { ##2 }
+ % ^ FIX: what if eq's numbered by section, theorem, etc.? The
+ % thmtools code is opaque.... Or maybe should be up to the
+ % user to say "restate-counters={section,chapter,...}".
+ \cs_set:cpn { theH ##1 }
+ { \use:c { the ##1 } . \theHkeythms_restate_dummyctr }
+ }
+ \tl_if_empty:nTF { #2 }
+ { \refstepcounter{keythms_restate_dummyctr} } % for unnumbered theorems
+ {
+ \cs_set:cpn { the #1 } { #2 }
+ \cs_set_eq:cN { c@ #1 } \c@keythms_restate_dummyctr
+ \cs_set_eq:cN { theH #1 } \theHkeythms_restate_dummyctr
+ % ^ why are the last two lines here? We shouldn't be referencing
+ % restated theorems. Think it's a remnant of thmtools
+ % WRONG: needed to make numbering correct after restated theorem.
+ % not sure about theH. <- this is needed to prevent duplicate anchors
+ }
+ \renewcommand\label[2][]{} % disable \label (opt arg in case cleveref loaded)
+ \cs_set_eq:NN \ltx@label \use_none:n % disable \ltx@label
+ \cs_set_eq:NN \property_record:nn \use_none:nn % disable \RecordProperties
+ \cs_set_eq:NN \setuniqmark \use_none:n % work with numbered=unless-unique
+ % QUESTION: also disable \hyper@@anchor? \MakeLinkTarget?
+ \keys_set:nn { keytheorems/thmuse } { #4 }
+ \keys_set:no { keytheorems/thmuse } { \l__keythms_thmuse_restatekeys_clist }
+ \hook_use:n { keytheorems/#1/restated }
+ \hook_use:n { keytheorems/allthms/restated }
+ \__keythms_thm_prehead_continues_code:n { #1 }
+ \__keythms_thm_prehead_code:n { #1 }
+ \__keythms_orig_begin:nV { #1 } \l__keythms_thmuse_note_tl
+ \__keythms_thm_posthead_code:n { #1 }
+ #5
+ \__keythms_thm_prefoot_code:n { #1 }
+ \__keythms_orig_end:n { #1 }
+ \__keythms_thm_postfoot_code:n { #1 }
+ \prop_map_inline:Nn \l__keythms_restate_counters_prop
+ {
+ \exp_args:Nnc \setcounter { ##1 }
+ { l_keythms_restate_current_##1_tl }
+ }
+ \group_end:
+ }
+
+\cs_new_protected:Npn \__keythms_getthm_body:nn #1#2
+ { % #1 = restate counters, #2 = theorem body
+ \group_begin:
+ \bool_set_true:N \l__keythms_thmuse_restating_bool
+ \prop_set_from_keyval:Nn \l__keythms_restate_counters_prop { #1 }
+ \prop_map_inline:Nn \l__keythms_restate_counters_prop
+ {
+ \tl_set:ce { l_keythms_restate_current_##1_tl } { \the\value{##1} }
+ \setcounter { ##1 } { ##2 }
+ % ^ FIX: what if eq's numbered by section, theorem, etc.? The
+ % thmtools code is opaque.... Or maybe should be up to the
+ % user to say "restate-counters={section,chapter,...}".
+ \cs_set:cpn { theH ##1 }
+ { \use:c { the ##1 } . \theHkeythms_restate_dummyctr }
+ }
+ \refstepcounter{keythms_restate_dummyctr}
+ \renewcommand\label[2][]{} % disable \label (opt arg in case cleveref loaded)
+ \cs_set_eq:NN \ltx@label \use_none:n % disable \ltx@label
+ \cs_set_eq:NN \property_record:nn \use_none:nn % disable \RecordProperties
+ \hook_use:n { keytheorems/#1/restated }
+ \hook_use:n { keytheorems/allthms/restated }
+ #2
+ \prop_map_inline:Nn \l__keythms_restate_counters_prop
+ {
+ \exp_args:Nnc \setcounter { ##1 }
+ { l_keythms_restate_current_##1_tl }
+ }
+ \group_end:
+ }
+
+\cs_new_protected:Npn \__keythms_getthmreversed_theorem:nnn #1#2#3
+ { % #1 = envname, #2 = keys, #3 = theorem body
+ \group_begin:
+ \bool_set_false:N \l__keythms_thmuse_restating_bool
+ \keys_set:nn { keytheorems/thmuse } { #2 }
+ \keys_set:no { keytheorems/thmuse } { \l__keythms_thmuse_restatekeys_clist }
+ \__keythms_thm_prehead_continues_code:n { #1 }
+ \__keythms_thm_prehead_code:n { #1 }
+ \__keythms_orig_begin:nV { #1 } \l__keythms_thmuse_note_tl
+ \clist_map_inline:Nn \g__keythms_restatecounters_clist
+ {
+ \prop_gput:Nne \g__keythms_thmuse_othercounters_prop { ##1 }
+ { \the\value{##1} }
+ }
+ \__keythms_thm_posthead_code:n { #1 }
+ \__keythms_thm_addcontentsdata:nnnn { #1 }
+ { \prop_to_keyval:N \g__keythms_thmuse_othercounters_prop }
+ { #2 } { #3 }
+ \__keythms_thm_tempstorerestatedata:nnn { #1 } { #2 } { #3 } % for defining getthm_body
+ #3
+ \__keythms_thm_prefoot_code:n { #1 }
+ \__keythms_orig_end:n { #1 }
+ \__keythms_thm_postfoot_code:n { #1 }
+ % While we're here, define getthm_body
+ \cs_if_exist:cF
+ { __keythms_getthm_ \l__keythms_thmuse_storereversed_tl _body }
+ {
+ \cs_new:cpe
+ { __keythms_getthm_ \l__keythms_thmuse_storereversed_tl _body }
+ {
+ \exp_not:N \__keythms_getthm_body:nn
+ \exp_args:No \exp_not:o
+ {
+ \exp_after:wN \__keythms_use_iii_v_braced:nnnnn
+ \g__keythms_thmuse_temprestatedata_tl
+ }
+ }
+ }
+ \bool_gset_true:c
+ { g__keythms_restate_ \l__keythms_thmuse_storereversed_tl _called_bool }
+ \group_end:
+ }
+
+\NewDocumentCommand \getkeytheorem { O{theorem} m }
+ { % #1 = property, #2 = tag
+ \cs_if_exist:cTF { __keythms_getthm_#2_#1 }
+ {
+ \bool_if_exist:cTF { g__keythms_restate_#2_called_bool }
+ {
+ \str_if_eq:nnTF { #1 } { theorem }
+ {
+ \bool_if:cTF
+ { g__keythms_restate_#2_called_bool }
+ {
+ \msg_error:nnn { keytheorems }
+ { store-reversed-called-twice } { #2 }
+ }
+ { \use:c { __keythms_getthm_#2_#1 } }
+ }
+ { \use:c { __keythms_getthm_#2_#1 } }
+ }
+ { \use:c { __keythms_getthm_#2_#1 } }
+ }
+ {
+ \textbf{??}
+ \cs_if_exist:cTF { __keythms_getthm_#2_theorem }
+ {
+ \msg_warning:nnnn { keytheorems } { no-prop-for-stored-theorem }
+ { #1 } { #2 } % should this be an error?
+ }
+ { \msg_warning:nnn { keytheorems } { no-stored-theorem } { #2 } }
+ }
+ }
+
+%%%%%%%%%%%%%%%%%%%%%
+%%% Theorem Hooks %%%
+%%%%%%%%%%%%%%%%%%%%%
+
+\NewDocumentCommand \addtotheoremhook { O{allthms} m +m }
+ { % #1 = envname, #2 = hook, #3 = code
+ \__hook_if_declared:nTF { keytheorems/allthms/#2 }
+ {
+ \hook_gput_code:nnn { keytheorems/#1/#2 } { . } { #3 }
+ }
+ {
+ \msg_error:nnn { keytheorems } { undefined-thm-hook } { #2 }
+ }
+ }
+% NOTE: I think it's OK we use the internal \__hook_if_declared:nTF above
+% since we don't need to worry about the user creating new theorem hooks
+% so, as we're only checking the existence of hooks created by us, it's OK.
+
+%%%%%%%%%%%%%%%%%%%%%%%%
+%%% List of Theorems %%%
+%%%%%%%%%%%%%%%%%%%%%%%%
+
+\keys_define:nn { keytheorems/listof }
+ {
+ chapter-skip-length .dim_set:N = \keythms@listof@chaptervspace@dim,
+ chapter-skip-length .initial:n = 10pt,
+ format-code .cs_set:Np = \__keythms_listof_misdirect:nnn #1#2#3,
+ format-code .initial:n = \numberline{#2}#1#3,
+ ignore .code:n =
+ {
+ \hook_gput_code:nnn { begindocument/before } { keytheorems }
+ { \keythms_listof_ignore:n { #1 } }
+ },
+ ignoreall .code:n =
+ { % in case called before theorem defined
+ \hook_gput_code:nnn { begindocument/before } { keytheorems }
+ {
+ \prop_map_inline:Nn \g__keythms_thmnames_prop
+ { \__keythms_listof_ignore_aux:n { ##1 } }
+ }
+ },
+ indent .dim_set:N = \l__keythms_listof_indent_dim,
+ indent .initial:n = 1.5em,
+ no-chapter-skip .bool_set:N = \l__keythms_listof_nochapskip_bool,
+ no-chapter-skip .initial:n = false,
+ no-continues .bool_set:N = \l__keythms_listof_nocont_bool,
+ no-continues .initial:n = false,
+ no-title .bool_set:N = \l__keythms_listof_notitle_bool,
+ no-title .initial:n = false,
+ no-toc .bool_set:N = \l__keythms_listof_notoc_bool,
+ no-toc .initial:n = false, % false does not mean "to-toc" for standard classes
+ note-code .cs_set:Np = \__keythms_listof_notecmd:n #1,
+ note-code .initial:n = { ~ (#1) },
+ numwidth .dim_set:N = \l__keythms_listof_numwidth_dim,
+ numwidth .initial:n = 2.3em,
+ onlynamed .code:n =
+ {
+ \hook_gput_code:nnn { begindocument/before } { keytheorems }
+ { \keythms_listof_onlynamed:n { #1 } }
+ },
+ onlynamed .default:n = \q_no_value,
+ onlynumbered .code:n =
+ {
+ \hook_gput_code:nnn { begindocument/before } { keytheorems }
+ { \keythms_listof_onlynumbered:n { #1 } }
+ },
+ onlynumbered .default:n = \q_no_value,
+ print-body .code:n =
+ {
+ \cs_set_protected:Nn \keythms_listof_listcmd:nnnnnnn
+ {
+ \tl_if_empty:nF { ##7 }
+ {
+ \__keythms_getthm_theorem:nnnnn
+ {##1}{##2}{##5}{##6}{##7}
+ }
+ }
+ },
+ seq .code:n =
+ {
+ \hook_gput_code:nnn { begindocument/before } { keytheorems }
+ { \keythms_listof_showseq:n { #1 } }
+ },
+ show .code:n =
+ {
+ \hook_gput_code:nnn { begindocument/before } { keytheorems }
+ { \keythms_listof_show:n { #1 } }
+ },
+ showall .code:n =
+ { % in case called before theorem defined
+ \hook_gput_code:nnn { begindocument/before } { keytheorems }
+ {
+ \prop_map_inline:Nn \g__keythms_thmnames_prop
+ { \__keythms_listof_show_aux:n { ##1 } }
+ }
+ },
+ swapnumber .bool_set:N = \l__keythms_listof_swapnumber_bool,
+ swapnumber .initial:n = false,
+ title .tl_set:N = \l__keythms_listof_title_tl,
+ title .initial:n = \GetTranslation{keythms_listof_title},
+ title-code .cs_set:Np = \__keythms_listof_titlecmd:n #1,
+ }
+
+\hook_gput_code:nnn { begindocument } { . }
+ { % redefine these keys at begindocument
+ \keys_define:nn { keytheorems/listof }
+ {
+ ignore .code:n = \keythms_listof_ignore:n { #1 },
+ ignoreall .code:n =
+ {
+ \prop_map_inline:Nn \g__keythms_thmnames_prop
+ { \__keythms_listof_ignore_aux:n { ##1 } }
+ },
+ onlynamed .code:n = \keythms_listof_onlynamed:n { #1 },
+ onlynamed .default:n = \q_no_value,
+ onlynumbered .code:n = \keythms_listof_onlynumbered:n { #1 },
+ onlynumbered .default:n = \q_no_value,
+ seq .code:n = \keythms_listof_showseq:n { #1 },
+ show .code:n = \keythms_listof_show:n { #1 },
+ showall .code:n =
+ {
+ \prop_map_inline:Nn \g__keythms_thmnames_prop
+ { \__keythms_listof_show_aux:n { ##1 } }
+ },
+ }
+ }
+
+\NewDocumentCommand \keytheoremlistset { m }
+ {
+ \keys_set:nn { keytheorems/listof } { #1 }
+ }
+
+\cs_new_protected:Npn \keythms_listof_ignore:n #1
+ {
+ \clist_map_inline:nn { #1 } { \__keythms_listof_ignore_aux:n { ##1 } }
+ }
+\cs_new_protected:Npn \__keythms_listof_ignore_aux:n #1
+ {
+ \cs_set_protected:cpn { __keythms_thmitem_#1:nnnnnn } ##1##2##3##4##5##6
+ { }
+ }
+
+\cs_new_protected:Npn \keythms_listof_show:n #1
+ {
+ \clist_map_inline:nn { #1 } { \__keythms_listof_show_aux:n { ##1 } }
+ }
+\cs_new_protected:Npn \__keythms_listof_show_aux:n #1
+ {
+ \cs_set_protected:cpn { __keythms_thmitem_#1:nnnnnn } ##1##2##3##4##5##6
+ {
+ \__keythms_listof_listcmd_setup:nn { ##5 }
+ {
+ \keythms_listof_listcmd:nnnnnnn
+ {#1}{##1}{##2}{##3}{##4}{##5}{##6}
+ }
+ }
+ }
+
+\cs_new_protected:Npn \keythms_listof_onlynamed:n #1
+ {
+ \quark_if_no_value:nTF { #1 }
+ {
+ \prop_map_inline:Nn \g__keythms_thmnames_prop
+ { \__keythms_listof_onlynamed_aux:n { ##1 } }
+ }
+ {
+ \clist_map_inline:nn { #1 }
+ { \__keythms_listof_onlynamed_aux:n { ##1 } }
+ }
+ }
+\cs_new_protected:Npn \__keythms_listof_onlynamed_aux:n #1
+ {
+ \cs_set_protected:cpn { __keythms_thmitem_#1:nnnnnn } ##1##2##3##4##5##6
+ {
+ \__keythms_listof_listcmd_setup:nn { ##5 }
+ {
+ \tl_if_empty:NF \l__keythms_listofheading_note_tl
+ {
+ \keythms_listof_listcmd:nnnnnnn
+ {#1}{##1}{##2}{##3}{##4}{##5}{##6}
+ }
+ }
+ }
+ }
+
+\cs_new_protected:Npn \keythms_listof_onlynumbered:n #1
+ {
+ \quark_if_no_value:nTF { #1 }
+ {
+ \prop_map_inline:Nn \g__keythms_thmnames_prop
+ { \__keythms_listof_onlynumbered_aux:n { ##1 } }
+ }
+ {
+ \clist_map_inline:nn { #1 }
+ { \__keythms_listof_onlynumbered_aux:n { ##1 } }
+ }
+ }
+\cs_new_protected:Npn \__keythms_listof_onlynumbered_aux:n #1
+ {
+ \cs_set_protected:cpn { __keythms_thmitem_#1:nnnnnn } ##1##2##3##4##5##6
+ {
+ \__keythms_listof_listcmd_setup:nn { ##5 }
+ {
+ \tl_if_empty:nF { ##1 }
+ {
+ \keythms_listof_listcmd:nnnnnnn
+ {#1}{##1}{##2}{##3}{##4}{##5}{##6}
+ }
+ }
+ }
+ }
+
+\cs_new_protected:Npn \keythms_listof_showseq:n #1
+ {
+ \prop_map_inline:Nn \g__keythms_thmnames_prop
+ { \__keythms_listof_showseq_aux:nn { #1 } { ##1 } }
+ }
+\cs_new_protected:Npn \__keythms_listof_showseq_aux:nn #1#2
+ { % #1 = seq name, #2 = theorem name
+ \cs_set_protected:cpn { __keythms_thmitem_#2:nnnnnn } ##1##2##3##4##5##6
+ {
+ \__keythms_listof_listcmd_setup:nn { ##5 }
+ {
+ \tl_if_eq:NnT \l__keythms_listofheading_seq_tl { #1 }
+ {
+ \keythms_listof_listcmd:nnnnnnn
+ {#2}{##1}{##2}{##3}{##4}{##5}{##6}
+ }
+ }
+ }
+ }
+
+% Seems unnecessary to repeat all this for reading the keyvals from file.
+% In thmtools they just hook the "thmitem" definition into the theorem declaration.
+%% NOTE ON ABOVE: this gives more flexibility to define different kinds of lists.
+%% See acro.sty for template idea.
+\keys_define:nn { keytheorems/listofheading }
+ {
+ continues .tl_set:N = \l__keythms_listofheading_contlabel_tl,
+ continues* .code:n =
+ {
+ \keys_set:nn { keytheorems/listofheading } { continues = #1 }
+ \protected@edef \l__keythms_tmpa_tl { \__keythms_getrecordednote:n{#1} }
+ \tl_if_empty:NF \l__keythms_tmpa_tl
+ {
+ \keys_set:nn { keytheorems/listofheading }
+ { note = \l__keythms_tmpa_tl }
+ }
+ },
+ name .meta:n = { note = #1 },
+ note .tl_set:N = \l__keythms_listofheading_note_tl,
+ restate* .meta:n = { store*=#1 },
+ restate-keys .clist_set:N = \l__keythms_listofheading_restatekeys_clist,
+ seq .tl_set:N = \l__keythms_listofheading_seq_tl,
+ short-note .tl_set:N = \l__keythms_listofheading_shortnote_tl,
+ short-name .meta:n = { short-note = #1 },
+ store* .code:n =
+ {
+ \bool_set_true:N \l__keythms_listofheading_storereversed_bool
+ },
+ unknown .code:n = { } % do nothing with unknown keys
+ }
+
+\cs_new:Npn \__keythms_listof_printnote:
+ {
+ \tl_if_empty:NTF \l__keythms_listofheading_shortnote_tl
+ {
+ \tl_if_empty:NF \l__keythms_listofheading_note_tl
+ { \__keythms_listof_notecmd:n { \l__keythms_listofheading_note_tl } }
+ }
+ {
+ \__keythms_listof_notecmd:n { \l__keythms_listofheading_shortnote_tl }
+ }
+ }
+
+\cs_new:Npn \keythms_listof_listcmd:nnnnnnn #1#2#3#4#5#6#7
+ { % #1=name, #2=number, #3=Href, #4=page, #5=restate counters, #6=keys, #7=body
+ \contentsline{ #1 }
+ {
+ \__keythms_listof_misdirect:nnn
+ { \prop_item:Nn \g__keythms_thmnames_prop { #1 } }
+ { #2 }
+ { \__keythms_listof_printnote: }
+ }
+ { #4 }{ #3 }
+ }
+
+% NOTE: We still need to do this setup for [print-body] so that onlynamed works
+\cs_new_protected:Npn \__keythms_listof_listcmd_setup:nn #1#2
+ { % #1 = keys, #2 = list command
+ \group_begin:
+ \keys_set:nn { keytheorems/listofheading } { #1 }
+ \bool_if:NT \l__keythms_listofheading_storereversed_bool
+ {
+ \keys_set:no { keytheorems/listofheading }
+ { \l__keythms_listofheading_restatekeys_clist }
+ }
+ \tl_if_empty:NTF \l__keythms_listofheading_contlabel_tl
+ { #2 }
+ {
+ \bool_if:NF \l__keythms_listof_nocont_bool
+ {
+ \tl_if_empty:NF \l__keythms_listofheading_note_tl
+ {
+ \tl_put_right:Nn \l__keythms_listofheading_note_tl { , ~ }
+ }
+ \tl_put_right:Nn \l__keythms_listofheading_note_tl
+ {
+ \__keythms_thmuse_continues:V \l__keythms_listofheading_contlabel_tl
+ }
+ #2
+ }
+ }
+ \group_end:
+ }
+
+\cs_if_exist:NTF \chapter
+ { \cs_set_protected:Npn \__keythms_listof_titlecmd:n #1 { \chapter*{#1} } }
+ { \cs_set_protected:Npn \__keythms_listof_titlecmd:n #1 { \section*{#1} } }
+
+\cs_new_protected:Npn \__keythms_listof_default_tocline:
+ {
+ \@dottedtocline{ 1 }{ \l__keythms_listof_indent_dim }
+ { \l__keythms_listof_numwidth_dim }
+ }
+\cs_new_eq:NN \keythms_listof_tocline: \__keythms_listof_default_tocline:
+
+\NewDocumentCommand \listofkeytheorems { O{} }
+ {
+ \bool_gset_true:N \g__keythms_listof_writefile_bool
+ \group_begin:
+ \keys_set:nn { keytheorems/listof } { #1 }
+ \cs_set_protected:Npn \KeyThmsContentsLine ##1 { ##1 }
+ \bool_if:NF \l__keythms_listof_nochapskip_bool
+ {
+ \cs_set_eq:NN \KeyThmsAddvspace \addvspace
+ }
+ \bool_if:NF \l__keythms_listof_notitle_bool
+ {
+ \__keythms_listof_titlecmd:n { \l__keythms_listof_title_tl }
+ \@mkboth % QUESTION: should this go in titlecmd ?
+ { \MakeUppercase \l__keythms_listof_title_tl }
+ { \MakeUppercase \l__keythms_listof_title_tl }
+ }
+ \bool_if:NT \l__keythms_listof_swapnumber_bool
+ {
+ \cs_set:Npn \__keythms_listof_misdirect:nnn ##1##2##3 { ##1 ~ ##2##3 }
+ }
+ \legacy_if_set_false:n { @filesw }
+ \@starttoc{ thlist }
+ \group_end:
+ }
+% ^ unlike thmtools we don't use the class's style of \listoffigures because
+% we want control over title-code, no-title, etc. But this means we have to guess
+% things like marks, sectioning command, etc.
+
+\hook_gput_code:nnn { enddocument } { . }
+ {
+ \bool_if:NTF \g__keythms_listof_writefile_bool
+ {
+ \legacy_if:nT { @filesw }
+ {
+ \iow_new:N \tf@thlist
+ \iow_open:Nn \tf@thlist { \c_sys_jobname_str.thlist }
+ }
+ }
+ { % if .thlist file left over from previous run but not needed, clear it
+ \file_if_exist:nT { \c_sys_jobname_str.thlist }
+ {
+ \iow_open:Nn \g_tmpa_iow { \c_sys_jobname_str.thlist }
+ \iow_close:N \g_tmpa_iow
+ }
+ }
+ }
+
+% chaptervspacehack (code translated from thmtools)
+\cs_new_protected:Npn \KeyThmsAddvspace #1 { } % initially no-op, redefined where needed
+\int_new:N \g_keythms_listof_prevchapter_int
+\int_gset:Nn \g_keythms_listof_prevchapter_int { 1 }
+% ^ if this is zero, bad things happen if title-code is changed; anyways don't
+% need addvspace at top
+\cs_new_protected:Npn \keythms_listof_chaptervspacehack: { }
+\cs_if_exist:cT { c@chapter }
+ {
+ \cs_if_eq:NNF \c@chapter \relax
+ {
+ \cs_set_protected:Npn \keythms_listof_chaptervspacehack:
+ {
+ \int_compare:nNnF
+ { \value{chapter} } = { \g_keythms_listof_prevchapter_int }
+ {
+ \addtocontents{ thlist }
+ {
+ \KeyThmsAddvspace
+ { \keythms@listof@chaptervspace@dim }
+ }
+ \int_gset:Nn \g_keythms_listof_prevchapter_int { \value{chapter} }
+ }
+ }
+ }
+ }
+
+%%%%%%%%%%%%%%%%
+%%% \Autoref %%%
+%%%%%%%%%%%%%%%%
+
+\ProvideDocumentCommand { \Autoref } { s m }
+ {
+ \IfPackageLoadedTF { hyperref }
+ {
+ \group_begin:
+ \cs_set_eq:NN \HyRef@testreftype \__keythms_Autoref_testreftype:w
+ \IfBooleanTF { #1 } { \autoref*{#2} } { \autoref{#2} }
+ \group_end:
+ }
+ { \msg_error:nn { keytheorems } { hyperref-Autoref } }
+ }
+
+\cs_new_protected:Npn \__keythms_Autoref_testreftype:w #1.#2\\
+ {
+ \cs_if_exist:cTF { #1 Autorefname }
+ {
+ \cs_set:Npe \HyRef@currentHtag
+ {
+ \exp_not:N \use:c { #1 Autorefname }
+ \exp_not:N \c_space_token
+ }
+ }
+ { \msg_warning:nnn { keytheorems } { no-Autorefname } { #1 } }
+ }
+
+%%%%%%%%%%%%%%%%%%%
+%%% Global Keys %%%
+%%%%%%%%%%%%%%%%%%%
+
+\keys_define:nn { keytheorems }
+ {
+ auto-translate .bool_gset:N = \g__keythms_autotranslate_bool,
+ auto-translate .initial:n = true,
+ continues-code .cs_set:Np = \__keythms_thmuse_continues:n #1,
+ continues-code .initial:n =
+ { % not sure how best to handle this translation
+ \GetTranslation{keythms_continues}\pageref{#1}
+ },
+ overload .code:n = \__keythms_overload_code:,
+ overload .value_forbidden:n = true,
+ overload .usage:n = preamble,
+ qed-symbol .cs_set_protected:Np = \qedsymbol,
+ restate-counters .code:n =
+ {
+ \clist_map_inline:nn { #1 }
+ { \tl_new:c { l_keythms_restate_current_##1_tl } }
+ \clist_gput_right:Nn \g__keythms_restatecounters_clist { #1 }
+ },
+ restate-counters .initial:n = equation,
+ store-all .code:n = \__keythms_storeall_code:,
+ store-all .value_forbidden:n = true,
+ store-all .usage:n = preamble,
+ store-sets-label .code:n =
+ {
+ \keys_define:nn { keytheorems/thmuse }
+ {
+ store .code:n =
+ {
+ \tl_set:Nn \l__keythms_thmuse_label_tl { ##1 }
+ \tl_set:Nn \l__keythms_thmuse_store_tl { ##1 }
+ },
+ store* .code:n =
+ {
+ \tl_set:Nn \l__keythms_thmuse_label_tl { ##1 }
+ \tl_set:Nn \l__keythms_thmuse_storereversed_tl { ##1 }
+ },
+ }
+ },
+ thmtools-compat .code:n =
+ { % prevent loading the code again if key called twice
+ \bool_if:NF \g__keythms_thmtoolscompat_bool
+ { \__keythms_thmtoolscompat_code: }
+ },
+ thmtools-compat .value_forbidden:n = true,
+ thmtools-compat .usage:n = preamble,
+ }
+
+\cs_generate_variant:Nn \__keythms_thmuse_continues:n { V }
+
+\NewDocumentCommand \keytheoremset { m }
+ { % #1 = keys
+ \keys_set:nn { keytheorems } { #1 }
+ }
+
+\cs_new_protected:Npn \__keythms_overload_code:
+ {
+ \RenewDocumentCommand { \newtheorem } { s m o m o }
+ {
+ \IfBooleanTF { ##1 }
+ { \keythms_thm_newkeythm:nn { ##2 } { name=##4, numbered=no } }
+ {
+ \IfNoValueTF { ##3 }
+ {
+ \IfNoValueTF { ##5 }
+ { \keythms_thm_newkeythm:nn { ##2 } { name=##4 } }
+ { \keythms_thm_newkeythm:nn { ##2 } { name=##4, parent=##5 } }
+ }
+ { \keythms_thm_newkeythm:nn { ##2 } { name=##4, sibling=##3 } }
+ }
+ }
+ }
+
+\cs_new_protected:Npn \__keythms_thmtoolscompat_code:
+ {
+ \bool_gset_true:N \g__keythms_thmtoolscompat_bool
+ \__keythms_overload_code: % since thmtools overwrites \newtheorem
+ \ProvideDocumentCommand { \declaretheoremstyle } { O{} m }
+ {
+ \declarekeytheoremstyle { ##2 } { ##1 }
+ }
+ \ProvideDocumentCommand { \declaretheorem } { O{} m }
+ {
+ \newkeytheorem { ##2 } [ ##1 ]
+ }
+ \ProvideDocumentEnvironment { restatable } { O{} m m }
+ { % need to redefine this to add store to thlist since we set it outside env
+ \cs_set_protected:Npn \__keythms_thm_addcontentsdata:nnnn ####1####2####3####4
+ { % #1 = theorem name, #2 = stored counters, #3 = keys, #4 = body
+ \keythms_listof_chaptervspacehack:
+ \iow_shipout:Ne \@auxout
+ {
+ \exp_not:N \@writefile { thlist }
+ {
+ \KeyThmsSavedTheorem{ ####1 }
+ { \@currentlabel }
+ { \@currentHref }
+ { \thepage }
+ { ####2 }
+ { store=\l__keythms_thmuse_store_tl,\exp_not:n { ####3 } } % this line is changed
+ { \exp_not:n { ####4 } }
+ }
+ }
+ }
+ % set store outside [] so keyless note is recognized
+ \keys_set:nn { keytheorems/thmuse } { store=##3 }
+ \begin{##2}[##1]
+ }
+ {
+ \end{##2}
+ \cs_new_protected:cpn { ##3 }
+ { % make \foo and \foo* identical
+ \peek_meaning_remove:NTF *
+ { \getkeytheorem{ ##3 } }
+ { \getkeytheorem{ ##3 } }
+ }
+ }
+ \ProvideDocumentEnvironment { restatable* } { O{} m m }
+ { % need to redefine this to add store* to thlist since we set it outside env
+ \cs_set_protected:Npn \__keythms_thm_addstoredreverseddata:nnn ####1####2####3
+ {
+ \iow_shipout:Ne \@auxout
+ {
+ \exp_not:N \@writefile { thlist }
+ {
+ \KeyThmsSavedTheoremReversed { \l__keythms_thmuse_storereversed_tl }
+ { ####1 }
+ { store*=\l__keythms_thmuse_storereversed_tl,\exp_not:n { ####2 } } % this line is changed
+ { \exp_not:n { ####3 } }
+ }
+ }
+ }
+ % set store* outside [] so keyless note is recognized
+ \keys_set:nn { keytheorems/thmuse } { store*=##3 }
+ \begin{##2}[##1]
+ }
+ {
+ \end{##2}
+ \cs_new_protected:cpn { ##3 }
+ { % make \foo and \foo* identical
+ \peek_meaning_remove:NTF *
+ { \getkeytheorem{ ##3 } }
+ { \getkeytheorem{ ##3 } }
+ }
+ }
+ \ProvideDocumentCommand { \listoftheorems } { } { \listofkeytheorems }
+ \ProvideDocumentCommand { \listtheoremname } { }
+ { \GetTranslation{keythms_listof_title} }
+ \keys_define:nn { keytheorems/listof }
+ { % redefine since thmtools way is \renewcommand\listtheoremname{...}
+ title .initial:n = \listtheoremname
+ }
+ \ProvideDocumentCommand { \addtotheorempreheadhook } { O{allthms} m }
+ {
+ \addtotheoremhook [ ##1 ] { prehead } { ##2 }
+ }
+ \ProvideDocumentCommand { \addtotheorempostheadhook } { O{allthms} m }
+ {
+ \addtotheoremhook [ ##1 ] { posthead } { ##2 }
+ }
+ \ProvideDocumentCommand { \addtotheoremprefoothook } { O{allthms} m }
+ {
+ \addtotheoremhook [ ##1 ] { prefoot } { ##2 }
+ }
+ \ProvideDocumentCommand { \addtotheorempostfoothook } { O{allthms} m }
+ {
+ \addtotheoremhook [ ##1 ] { postfoot } { ##2 }
+ }
+ \clist_new:N \l__keythms_tcbshaded_keys_clist
+ \clist_new:N \l__keythms_tcbthmbox_keys_clist
+ \keys_define:nn { keytheorems/thm/shaded }
+ {
+ textwidth .code:n =
+ \clist_put_right:Nn \l__keythms_tcbshaded_keys_clist { width=##1 },
+ bgcolor .code:n =
+ \clist_put_right:Nn \l__keythms_tcbshaded_keys_clist { colback=##1 },
+ rulewidth .code:n =
+ \clist_put_right:Nn \l__keythms_tcbshaded_keys_clist { boxrule=##1 },
+ rulecolor .code:n =
+ \clist_put_right:Nn \l__keythms_tcbshaded_keys_clist { colframe=##1 },
+ margin .code:n =
+ \clist_put_right:Nn \l__keythms_tcbshaded_keys_clist { boxsep=##1 },
+ padding .meta:n = { margin=##1 },
+ leftmargin .code:n =
+ \clist_put_right:Nn \l__keythms_tcbshaded_keys_clist { left~skip=##1 },
+ rightmargin .code:n =
+ \clist_put_right:Nn \l__keythms_tcbshaded_keys_clist { right~skip=##1 },
+ }
+ \keys_define:nn { keytheorems/thm/thmbox }
+ {
+ L .code:n =
+ {
+ \clist_put_right:Nn \l__keythms_tcbthmbox_keys_clist
+ { keythms_tcbthmbox_L }
+ },
+ M .code:n =
+ {
+ \clist_put_right:Nn \l__keythms_tcbthmbox_keys_clist
+ { keythms_tcbthmbox_M }
+ },
+ S .code:n =
+ {
+ \clist_put_right:Nn \l__keythms_tcbthmbox_keys_clist
+ { keythms_tcbthmbox_S }
+ },
+ underline .choice:,
+ underline / true .code:n = {},
+ underline / false .code:n =
+ {
+ \clist_put_right:Nn \l__keythms_tcbthmbox_keys_clist
+ { boxed~title~style={bottomrule=0pt} }
+ },
+ underline .default:n = true,
+ nounderline .meta:n = { underline=false },
+ cut .choice:,
+ cut / true .code:n = {},
+ cut / false .code:n =
+ {
+ \clist_put_right:Nn \l__keythms_tcbthmbox_keys_clist { unbreakable }
+ },
+ cut .default:n = true,
+ nocut .meta:n = { cut=false },
+ thickness .code:n =
+ { % could also add keys to clist with changed dimens; which is better?
+ \hook_gput_code:nnn { keytheorems/\l__keythms_thm_envname_tl/prehead }
+ { keythms_tcbox }
+ { \dim_set:Nn \l_keythms_tcbthmbox_thickness_dim { ##1 } }
+ },
+ leftmargin .code:n =
+ {
+ \hook_gput_code:nnn { keytheorems/\l__keythms_thm_envname_tl/prehead }
+ { keythms_tcbox }
+ { \dim_set:Nn \l_keythms_tcbthmbox_leftmargin_dim { ##1 } }
+ },
+ rightmargin .code:n =
+ {
+ \hook_gput_code:nnn { keytheorems/\l__keythms_thm_envname_tl/prehead }
+ { keythms_tcbox }
+ { \dim_set:Nn \l_keythms_tcbthmbox_rightmargin_dim { ##1 } }
+ },
+ hskip .code:n =
+ {
+ \hook_gput_code:nnn { keytheorems/\l__keythms_thm_envname_tl/prehead }
+ { keythms_tcbox }
+ { \dim_set:Nn \l_keythms_tcbthmbox_hskip_dim { ##1 } }
+ },
+ vskip .code:n =
+ {
+ \hook_gput_code:nnn { keytheorems/\l__keythms_thm_envname_tl/prehead }
+ { keythms_tcbox }
+ { \dim_set:Nn \l_keythms_tcbthmbox_vskip_dim { ##1 } }
+ },
+ }
+ \dim_new:N \l_keythms_tcbthmbox_thickness_dim
+ \dim_set:Nn \l_keythms_tcbthmbox_thickness_dim { 0.6pt }
+ \dim_new:N \l_keythms_tcbthmbox_leftmargin_dim
+ \dim_set:Nn \l_keythms_tcbthmbox_leftmargin_dim { 0.7\parindent } % use \parindent? thmbox does
+ \dim_new:N \l_keythms_tcbthmbox_rightmargin_dim
+ \dim_set:Nn \l_keythms_tcbthmbox_rightmargin_dim { 0pt }
+ \dim_new:N \l_keythms_tcbthmbox_hskip_dim
+ \dim_set:Nn \l_keythms_tcbthmbox_hskip_dim { 0.2em }
+ \dim_new:N \l_keythms_tcbthmbox_vskip_dim
+ \dim_set:Nn \l_keythms_tcbthmbox_vskip_dim { 0.2em }
+ \msg_new:nnn { keytheorems } { mdframed-undefined }
+ {
+ keytheorems~does~not~define~the~'mdframed'~key.~
+ Consider~using~the~'tcolorbox'~key~instead.
+ }
+ \keys_define:nn { keytheorems/thm }
+ {
+ shaded .code:n =
+ {
+ \clist_clear:N \l__keythms_tcbshaded_keys_clist
+ \keys_set:nn { keytheorems/thm/shaded } { ##1 }
+ % FIX: surely a better way to do this
+ \RequirePackage{tcolorbox}
+ \pgfkeysifdefined{/tcb/keythms_tcbshaded_default/.@cmd} % even worth it?
+ {}
+ {
+ \tcbset % wish I could do this outside of key but can't assume tcb loaded
+ {
+ keythms_tcbshaded_default/.style=
+ {
+ sharp~corners = all,
+ boxrule = 0pt,
+ left = 0pt, right = 0pt,
+ top = 0pt, bottom = 0pt,
+ parbox = false,
+ }
+ }
+ }
+ \keys_set:ne { keytheorems/thm }
+ {
+ tcolorbox-no-titlebar =
+ {
+ keythms_tcbshaded_default,
+ \l__keythms_tcbshaded_keys_clist
+ }
+ }
+ },
+ thmbox .code:n = % adapted from https://tex.stackexchange.com/a/236230/208544
+ {
+ \clist_clear:N \l__keythms_tcbthmbox_keys_clist
+ \keys_set:nn { keytheorems/thm/thmbox } { ##1 }
+ % FIX: surely a better way to do this
+ \RequirePackage{tcolorbox}
+ \tcbuselibrary{skins,breakable}
+ \pgfkeysifdefined{/tcb/keythms_tcbthmbox_default/.@cmd} % even worth it?
+ {}
+ {
+ \tcbset{
+ keythms_tcbthmbox_default/.style={
+ enhanced,
+ breakable,
+ sharp~corners=all,
+ right=\l_keythms_tcbthmbox_hskip_dim,
+ left=\l_keythms_tcbthmbox_hskip_dim,
+ top=\l_keythms_tcbthmbox_vskip_dim,
+ bottom=\l_keythms_tcbthmbox_vskip_dim,
+ coltitle=black,
+ frame~engine=empty,
+ interior~titled~engine=empty,
+ interior~engine=empty,
+ extras~broken={
+ frame~engine=empty,
+ interior~titled~engine=empty,
+ interior~engine=empty
+ },
+ parbox=false,
+ % even though frame isn't drawn, makes spacing correct
+ boxrule=0.5\l_keythms_tcbthmbox_thickness_dim,
+ attach~boxed~title~to~top~left={
+ xshift=-\l_keythms_tcbthmbox_leftmargin_dim,
+ },
+ boxed~title~style={
+ empty,
+ size=minimal,
+ bottom=0.3ex,
+ top=0ex,
+ % ditto
+ bottomrule=0.5\l_keythms_tcbthmbox_thickness_dim,
+ },
+ left~skip=\l_keythms_tcbthmbox_leftmargin_dim,
+ right~skip=\l_keythms_tcbthmbox_rightmargin_dim,
+ overlay~unbroken={
+ \draw[line~width=\l_keythms_tcbthmbox_thickness_dim]
+ (title.south~west)
+ --
+ (title.south~east);
+ \draw[line~width=\l_keythms_tcbthmbox_thickness_dim]
+ (frame.north~west)
+ |-
+ ([xshift=10mm]frame.south~west);
+ },
+ overlay~first={
+ \draw[line~width=\l_keythms_tcbthmbox_thickness_dim]
+ (title.south~west)
+ --
+ (title.south~east);
+ \draw[line~width=\l_keythms_tcbthmbox_thickness_dim]
+ (frame.north~west)
+ --
+ (frame.south~west);
+ },
+ overlay~middle={
+ \draw[line~width=\l_keythms_tcbthmbox_thickness_dim]
+ (frame.north~west)
+ --
+ (frame.south~west);
+ },
+ overlay~last={
+ \draw[line~width=\l_keythms_tcbthmbox_thickness_dim]
+ (frame.north~west)
+ |-
+ ([xshift=10mm]frame.south~west);
+ }
+ },
+ keythms_tcbthmbox_L/.style={
+ overlay~unbroken={
+ \draw[line~width=\l_keythms_tcbthmbox_thickness_dim]
+ (title.south~west)
+ --
+ (title.south~east);
+ \draw[line~width=\l_keythms_tcbthmbox_thickness_dim]
+ (frame.north~west)
+ |-
+ (frame.south~east)
+ -|
+ (frame.north~east);
+ },
+ overlay~first={
+ \draw[line~width=\l_keythms_tcbthmbox_thickness_dim]
+ (title.south~west)
+ --
+ (title.south~east);
+ \draw[line~width=\l_keythms_tcbthmbox_thickness_dim]
+ (frame.north~west)
+ --
+ (frame.south~west);
+ \draw[line~width=\l_keythms_tcbthmbox_thickness_dim]
+ (frame.north~east)
+ --
+ (frame.south~east);
+ },
+ overlay~middle={
+ \draw[line~width=\l_keythms_tcbthmbox_thickness_dim]
+ (frame.north~west)
+ --
+ (frame.south~west);
+ \draw[line~width=\l_keythms_tcbthmbox_thickness_dim]
+ (frame.north~east)
+ --
+ (frame.south~east);
+ },
+ overlay~last={
+ \draw[line~width=\l_keythms_tcbthmbox_thickness_dim]
+ (frame.north~west)
+ |-
+ (frame.south~east)
+ -|
+ (frame.north~east);
+ }
+ },
+ keythms_tcbthmbox_M/.style={},
+ keythms_tcbthmbox_S/.style={ % first and middle same as M
+ overlay~unbroken={
+ \draw[line~width=\l_keythms_tcbthmbox_thickness_dim]
+ (title.south~west)
+ --
+ (title.south~east);
+ \draw[line~width=\l_keythms_tcbthmbox_thickness_dim]
+ (frame.north~west)
+ --
+ (frame.south~west);
+ },
+ overlay~last={
+ \draw[line~width=\l_keythms_tcbthmbox_thickness_dim]
+ (frame.north~west)
+ --
+ (frame.south~west);
+ }
+ },
+ }
+ }
+ \keys_set:ne { keytheorems/thm }
+ {
+ tcolorbox =
+ {
+ keythms_tcbthmbox_default,
+ \l__keythms_tcbthmbox_keys_clist
+ }
+ }
+ },
+ thmbox .default:n = M,
+ mdframed .code:n = \msg_error:nn { keytheorems } { mdframed-undefined },
+ }
+ \keys_define:nn { keytheorems/thmstyle }
+ {
+ shaded .code:n = \keythms_thmstyle_savethmkey_optval:n { ##1 },
+ thmbox .code:n = \keythms_thmstyle_savethmkey_optval:n { ##1 },
+ }
+ }
+
+\cs_new_protected:Npn \__keythms_storeall_code:
+ {
+ \cs_set_eq:NN \__keythms_withhooks_begin:nnn \__keythms_grab_begin:nnn
+ \cs_set_eq:NN \__keythms_withhooks_begin:nnV \__keythms_grab_begin:nnV
+ \cs_set_eq:NN \__keythms_withhooks_end:n \__keythms_grab_end:n
+ }
+
+\hook_gput_code:nnn { begindocument/before } { . }
+ { % use 'provide' in case user defines their own translation in preamble
+ \ProvideTranslationFallback { keythms_listof_title } { List~of~Theorems }
+ \ProvideTranslationFallback { keythms_continues } { continuing~from~p.\, }
+ \bool_if:NT \g__keythms_autotranslate_bool
+ {
+ \ProvideTranslation { English } { keythms_listof_title } { List~of~Theorems }
+ \ProvideTranslation { English } { keythms_continues } { continuing~from~p.\, }
+ % from DeepL; I don't know these languages!
+ \ProvideTranslation { French } { keythms_listof_title } { Liste~des~théorèmes }
+ \ProvideTranslation { French } { keythms_continues } { suite~de~la~p.\, }
+ \ProvideTranslation { German } { keythms_listof_title } { Liste~der~Theoreme }
+ \ProvideTranslation { German } { keythms_continues } { weiter~von~Seite~ }
+ \ProvideTranslation { Italian } { keythms_listof_title } { Elenco~dei~teoremi }
+ \ProvideTranslation { Italian } { keythms_continues } { continua~da~p.\, }
+ \ProvideTranslation { Spanish } { keythms_listof_title } { Lista~de~teoremas }
+ \ProvideTranslation { Spanish } { keythms_continues } { continúa~de~la~p.\, }
+ \ProvideTranslation { Portuguese } { keythms_listof_title } { Lista~de~teoremas }
+ \ProvideTranslation { Portuguese } { keythms_continues } { continua~da~p.\, }
+ }
+ }
+
+\ProcessKeyOptions[keytheorems]
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% Support for non-default classes %%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\cs_new_protected:Npn \__keythms_support_AMSshared_code:
+ {
+ \keys_define:nn { keytheorems/listof } % adjust to AMS classes
+ {
+ indent .initial:n = 0pt,
+ numwidth .initial:n = 1.5pc,
+ title-code .code:n =
+ { % warn but set titlecmd just in case
+ \msg_warning:nn { keytheorems } { title-code-with-AMS }
+ \cs_set_protected:Npn \__keythms_listof_titlecmd:n ####1 { ##1 }
+ },
+ }
+ \RenewDocumentCommand \listofkeytheorems { O{} }
+ { % title command not customizable here
+ \bool_gset_true:N \g__keythms_listof_writefile_bool
+ \group_begin:
+ \keys_set:nn { keytheorems/listof } { ##1 }
+ \cs_set_protected:Npn \KeyThmsContentsLine ####1 { ####1 }
+ \bool_if:NF \l__keythms_listof_nochapskip_bool
+ {
+ \cs_set_eq:NN \KeyThmsAddvspace \addvspace
+ }
+ \legacy_if_set_false:n { @filesw }
+ \bool_if:NTF \l__keythms_listof_notitle_bool
+ { % hacky!
+ \cs_set_eq:NN \@startsection \use_none:nnnnnnn
+ \@starttoc{ thlist }{ }
+ }
+ { % ams classes don't expand title enough
+ \protected@edef \l__keythms_tmpa_tl { \l__keythms_listof_title_tl }
+ \bool_if:NT \l__keythms_listof_notoc_bool
+ { \cs_set_eq:NN \addcontentsline \use_none:nnn } % hacky!
+ \@starttoc{ thlist }{ \l__keythms_tmpa_tl }
+ }
+ \group_end:
+ }
+ \cs_new:Npn \__keythms_listof_ams_tocline:
+ {
+ \@tocline{ 0 }{ 3pt plus 2pt }{ \l__keythms_listof_indent_dim }
+ { \l__keythms_listof_numwidth_dim }{ }
+ }
+ \cs_set_eq:NN \keythms_listof_tocline: \__keythms_listof_ams_tocline:
+ }
+
+\cs_new_protected:Npn \keythms_support_check:n #1
+ {
+ \IfClassLoadedT { #1 } { \file_input:n { class-support/keythms-#1-support } }
+ }
+
+% acmart defaults also handled in amsart support file
+\keythms_support_check:n { amsart }
+\keythms_support_check:n { amsbook }
+\keythms_support_check:n { amsproc }
+\keythms_support_check:n { memoir }
+
+\file_input_stop: \ No newline at end of file
diff --git a/macros/latex/contrib/l3packages/CHANGELOG.md b/macros/latex/contrib/l3packages/CHANGELOG.md
index cd9143da08..a49c43396d 100644
--- a/macros/latex/contrib/l3packages/CHANGELOG.md
+++ b/macros/latex/contrib/l3packages/CHANGELOG.md
@@ -7,6 +7,13 @@ this project uses date-based 'snapshot' version identifiers.
## [Unreleased]
+## [2024-08-16]
+
+### Fixed
+- Support for optimised commands using `\GetDocumentCommandArgSpec` (issue
+ [\#1550](https://github.com/latex3/latex3/issues/1550))
+- Unmatched `macrocode` environment in `xtemplate`
+
## [2024-05-08]
### Changed
@@ -259,7 +266,8 @@ this project uses date-based 'snapshot' version identifiers.
- Switch to ISO date format
- Improve cross-module use of internal functions
-[Unreleased]: https://github.com/latex3/latex3/compare/2024-05-08...HEAD
+[Unreleased]: https://github.com/latex3/latex3/compare/2024-08-16...HEAD
+[2024-08-16]: https://github.com/latex3/latex3/compare/2024-05-08...2024-08-16
[2024-05-08]: https://github.com/latex3/latex3/compare/2024-03-14...2024-05-08
[2024-03-14]: https://github.com/latex3/latex3/compare/2024-02-18...2024-03-14
[2024-02-18]: https://github.com/latex3/latex3/compare/2024-02-13...2024-02-18
diff --git a/macros/latex/contrib/l3packages/README.md b/macros/latex/contrib/l3packages/README.md
index 10899672d6..dfdc1135ba 100644
--- a/macros/latex/contrib/l3packages/README.md
+++ b/macros/latex/contrib/l3packages/README.md
@@ -1,6 +1,6 @@
# `l3packages`: Higher-level LaTeX3 Concepts (Deprecated)
-Release 2024-05-08
+Release 2024-08-16
## Overview
diff --git a/macros/latex/contrib/l3packages/l3keys2e.dtx b/macros/latex/contrib/l3packages/l3keys2e.dtx
index 2e5c419165..e8f6416012 100644
--- a/macros/latex/contrib/l3packages/l3keys2e.dtx
+++ b/macros/latex/contrib/l3packages/l3keys2e.dtx
@@ -62,7 +62,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-08}
+% \date{Released 2024-08-16}
%
% \maketitle
%
@@ -154,7 +154,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplPackage{l3keys2e}{2024-05-08}{}
+\ProvidesExplPackage{l3keys2e}{2024-08-16}{}
{LaTeX2e option processing using LaTeX3 keys}
% \end{macrocode}
%
diff --git a/macros/latex/contrib/l3packages/l3keys2e.pdf b/macros/latex/contrib/l3packages/l3keys2e.pdf
index df3821afb8..90c356f225 100644
--- a/macros/latex/contrib/l3packages/l3keys2e.pdf
+++ b/macros/latex/contrib/l3packages/l3keys2e.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3packages/xfp.dtx b/macros/latex/contrib/l3packages/xfp.dtx
index fe8dcd51b1..6e95e42901 100644
--- a/macros/latex/contrib/l3packages/xfp.dtx
+++ b/macros/latex/contrib/l3packages/xfp.dtx
@@ -63,7 +63,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-08}
+% \date{Released 2024-08-16}
%
% \maketitle
%
@@ -171,7 +171,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplPackage{xfp}{2024-05-08}{}
+\ProvidesExplPackage{xfp}{2024-08-16}{}
{L3 Floating point unit}
% \end{macrocode}
%
diff --git a/macros/latex/contrib/l3packages/xfp.pdf b/macros/latex/contrib/l3packages/xfp.pdf
index 2097c2b079..8640b3600d 100644
--- a/macros/latex/contrib/l3packages/xfp.pdf
+++ b/macros/latex/contrib/l3packages/xfp.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3packages/xparse.dtx b/macros/latex/contrib/l3packages/xparse.dtx
index 62ac19ff25..ac0ee03d3f 100644
--- a/macros/latex/contrib/l3packages/xparse.dtx
+++ b/macros/latex/contrib/l3packages/xparse.dtx
@@ -67,7 +67,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-08}
+% \date{Released 2024-08-16}
%
% \maketitle
%
@@ -1079,7 +1079,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplPackage{xparse}{2024-05-08}{}
+\ProvidesExplPackage{xparse}{2024-08-16}{}
{L3 Experimental document command parser}
% \end{macrocode}
%
@@ -1436,13 +1436,30 @@
%
% \begin{macro}{\@@_get_arg_spec:NTF}
% If the command is not an \pkg{xparse} command, complain. If it is,
-% its second \enquote{item} is the argument specification.
+% its second \enquote{item} is the argument specification unless the
+% command is optimised: in the latter case, we can reconstruct the
+% spec.
% \begin{macrocode}
\cs_gset_protected:Npn \@@_get_arg_spec:NTF #1#2#3
{
\__kernel_cmd_if_xparse:NTF #1
{
- \tl_set:Ne \ArgumentSpecification { \tl_item:Nn #1 { 2 } }
+ \tl_set:Ne \ArgumentSpecification
+ {
+ \exp_args:No \tl_if_head_eq_meaning:nNTF {#1} \@@_start_optimized:
+ {
+ \prg_replicate:nn
+ {
+ \str_count:e
+ {
+ \exp_args:Nc \cs_parameter_spec:N
+ { \cs_to_str:N #1 \c_space_tl code }
+ } / 2
+ }
+ { m }
+ }
+ { \tl_item:Nn #1 { 2 } }
+ }
#2
}
{#3}
diff --git a/macros/latex/contrib/l3packages/xparse.pdf b/macros/latex/contrib/l3packages/xparse.pdf
index bb31c0a5e6..b9c39f43c3 100644
--- a/macros/latex/contrib/l3packages/xparse.pdf
+++ b/macros/latex/contrib/l3packages/xparse.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3packages/xtemplate.dtx b/macros/latex/contrib/l3packages/xtemplate.dtx
index 7d20c6142f..17715905ad 100644
--- a/macros/latex/contrib/l3packages/xtemplate.dtx
+++ b/macros/latex/contrib/l3packages/xtemplate.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-08}
+% \date{Released 2024-08-16}
%
% \maketitle
%
@@ -704,7 +704,7 @@
\endinput
}
{%
- \ProvidesExplPackage{xtemplate}{2024-05-08}{}
+ \ProvidesExplPackage{xtemplate}{2024-08-16}{}
{L3 Experimental prototype document functions}
\long\protected\def\DeclareRestrictedTemplate#1#2#3#4{%
\DeclareTemplateCopy{#1}{#3}{#2}%
@@ -722,6 +722,7 @@
% \end{macro}
% \end{macro}
%
+% \begin{macrocode}
%</package>
% \end{macrocode}
%
diff --git a/macros/latex/contrib/l3packages/xtemplate.pdf b/macros/latex/contrib/l3packages/xtemplate.pdf
index b70bd7c991..44e90a9163 100644
--- a/macros/latex/contrib/l3packages/xtemplate.pdf
+++ b/macros/latex/contrib/l3packages/xtemplate.pdf
Binary files differ
diff --git a/macros/latex/contrib/listings/listings-devel.pdf b/macros/latex/contrib/listings/listings-devel.pdf
index da1506f1df..a04038050f 100644
--- a/macros/latex/contrib/listings/listings-devel.pdf
+++ b/macros/latex/contrib/listings/listings-devel.pdf
Binary files differ
diff --git a/macros/latex/contrib/listings/listings.dtx b/macros/latex/contrib/listings/listings.dtx
index 525ba1a4ae..bd1e84342b 100644
--- a/macros/latex/contrib/listings/listings.dtx
+++ b/macros/latex/contrib/listings/listings.dtx
@@ -46,6 +46,7 @@
\usepackage{mdframed} % frames for external files
\usepackage{moreverb} % writing external files
\usepackage{xcolor} % because of coloring the background
+\usepackage{tablefootnote} % because of \tablefootnote
\makeindex
@@ -135,7 +136,7 @@
% Hoffmann became the maintainer of the \packagename{listings}
% package in 2013; see the Preface for details.}~ %
% \textless\lstemail\textgreater}
-% \date{2024/05/25\enspace\enspace Version 1.10b\ \box\abstractbox}
+% \date{2024/09/23\enspace\enspace Version 1.10c\ \box\abstractbox}
% \def\lstemail{\href{mailto:j.hoffmann@fh-aachen.de}{\texttt{j.hoffmann(at)fh-aachen.de}}}
% \ifhyper
% \hypersetup{pdftitle=The Listings Package,
@@ -2723,7 +2724,7 @@
% \texttt{last} continues the numbering of the most recent listing and
% \meta{number} sets it to the (logical) number.
%
-% \item[1.0] \rkeyname{name}|=|\meta{name}
+% \item[1.0,{{}}] \rkeyname{name}|=|\meta{name}
%
% names a listing. Displayed environment-listings with the same name
% share a line counter if |firstnumber=auto| is in effect.
@@ -4825,22 +4826,29 @@
% Usually you will use |#1| as \meta{value}.
%
% \item[1.0] \cs{lstKV@SwitchCases}\marg{value}\\
-% |{|\meta{string 1}|&|\meta{execute 1}|\\|\\
-% | |\meta{string 2}|&|\meta{execute 2}|\\|\\
+% |{|\meta{string 1}|:|\meta{execute 1}|\\|\\
+% | |\meta{string 2}|:|\meta{execute 2}|\\|\\
% \hbox to 3em{\hfill\vdots}\\
-% | |\meta{string $n$}|&|\meta{execute $n$}|}|\marg{else}
+% | |\meta{string $n$}|;|\meta{execute $n$}|}|\marg{else}
%
% Either execute \meta{else} or the \meta{value} matching part.
%
-% This implementation of C. Heinz has a problem\label{gAmpersand}, if
-% the listing is part of a tabular environment as found out by
-% \lsthelper{Nasser~M.~Abbasi}{2016/05/25}{possible bug in listings
-% package}. \lsthelper{David~Carlisle}{2016/05/25}{%
+% This implementation is based on a hint of \lsthelper{David~Carlisle}{2016/05/25}{%
% http://tex.stackexchange.com/questions/311383/^^A
% adding-frame-none-to-lstlisting-options-in-lstdefinestyle^^A
-% -gives-error-with-tabu}
-% gave a hint how to avoid this problem and so the separator |&| is
-% replaced by |:|.
+% -gives-error-with-tabu} to avoid the problem of the original
+% implementation of C. Heinz\label{gAmpersand}:
+% \begin{quote}
+% \cs{lstKV@SwitchCases}\marg{value}\\
+% |{|\meta{string 1}|&|\meta{execute 1}|\\|\\
+% | |\meta{string 2}|&|\meta{execute 2}|\\|\\
+% \hbox to 3em{\hfill\vdots}\\
+% | |\meta{string $n$}|&|\meta{execute $n$}|}|\marg{else}
+% \end{quote}
+% The problem arose when the listing was part of a tabular
+% environment, as found out by
+% \lsthelper{Nasser~M.~Abbasi}{2016/05/25}{possible bug in listings
+% package}.
%
% \item[0.20] |\lstKV@TwoArg|\marg{value}\marg{subdefinition}
% \item[0.20] |\lstKV@ThreeArg|\marg{value}\marg{subdefinition}
@@ -4967,8 +4975,13 @@
% \lsttabspace |\lst@KCSmode| &
% \ldots~a keyword comment which can be terminated by a semicolon only.
% \\
-% \aspectname{html}\lsttabspace |\lst@insidemode| &
+% \aspectname{html}\lsttabspace |\lst@htmlmode| &
% Active if we are between \texttt{<} and \texttt{>}.
+%
+% Previous documentations used the mode name |\lst@insidemode| at this
+% place, but the name |\lst@insidemode| isn't referenced in any documentation
+% and so it is now (from v1.10c on) assumed as an overseen
+% documentation error.
% \\
% \aspectname{make}\lsttabspace |\lst@makemode| &
% Used to indicate a keyword.
@@ -5986,7 +5999,7 @@
% \part{Implementation}
%
%
-% \CheckSum{12435}
+% \CheckSum{12443}
%^^A
%^^A Don't index TeX-primitives.
%^^A
@@ -6130,8 +6143,8 @@
% All files will have same date and version.
% \begin{macrocode}
%<*kernel|misc|doc>
-\def\filedate{2024/05/25}
-\def\fileversion{1.10b}
+\def\filedate{2024/09/23}
+\def\fileversion{1.10c}
%</kernel|misc|doc>
% \end{macrocode}
% What we need and who we are.
@@ -8918,9 +8931,16 @@
% \begin{macrocode}
\def\lst@UM#1{\csname\@lst @um#1@\endcsname}
% \end{macrocode}
-% And all remaining standard characters.
+% And all remaining standard characters. \lsthelper{Peter
+% Cock}{2024/09/18}{Upright double-quotes in LaTeX listings}
+% pointed to the discussion in
+% \url{https://tex.stackexchange.com/questions/166790/how-can-i-get-straight-double-quotes-in-listings}
+% about the lack of support for upright double quotes which are now
+% implemented by the lines below.
% \begin{macrocode}
\lst@CCPutMacro
+ \lst@ProcessOther {"22}{\lst@ifupquote \textquotedbl
+ \else \char34\relax \fi}
\lst@ProcessOther {"23}\#
\lst@ProcessLetter{"24}\textdollar
\lst@ProcessOther {"25}\%
@@ -12654,7 +12674,9 @@
% \subsection{Line numbers}
%
% \begin{aspect}{labels}
-% \lsthelper{Rolf~Niepraschk}{1997/04/24}{line numbers} asked for line numbers.
+% \lsthelper{Rolf~Niepraschk}{1997/04/24}{line numbers} asked for line
+% number, the relevant keys and `\textit{data}' commands are described in
+% section \ref{rLineNumbers}, here is their implementation.
% \begin{macrocode}
%<*misc>
\lst@BeginAspect{labels}
@@ -12673,26 +12695,31 @@
right:\def\lst@PlaceNumber{\rlap{\normalfont
\kern\linewidth \kern\lst@numbersep
\lst@numberstyle{\thelstnumber}}}%
- }{\PackageError{Listings}{Numbers #1 unknown}\@ehc}}
+ }{\PackageError{Listings}{value `#1' for keyword `numbers' not supported}\@ehc}}
% \end{macrocode}
% \end{lstkey}
%
+% \begin{lstkey}{stepnumber}
+% \begin{lstkey}{numberfirstline}
% \begin{lstkey}{numberstyle}
% \begin{lstkey}{numbersep}
-% \begin{lstkey}{stepnumber}
% \begin{lstkey}{numberblanklines}
-% \begin{lstkey}{numberfirstline}
% Definition of the keys.
% \begin{macrocode}
+\lst@Key{stepnumber}{1}{\def\lst@stepnumber{#1\relax}}
+\lst@Key{numberfirstline}{f}[t]{\lstKV@SetIf{#1}\lst@ifnumberfirstline}
\lst@Key{numberstyle}{}{\def\lst@numberstyle{#1}}
\lst@Key{numbersep}{10pt}{\def\lst@numbersep{#1}}
-\lst@Key{stepnumber}{1}{\def\lst@stepnumber{#1\relax}}
+\lst@Key{numberblanklines}{true}[t]
+ {\lstKV@SetIf{#1}\lst@ifnumberblanklines}
+% \end{macrocode}
+% If we use the `empty' style, the listing must start at line 1, so:
+% \begin{macrocode}
\lst@AddToHook{EmptyStyle}{\let\lst@stepnumber\@ne}
% \end{macrocode}
+% Later on we use this to prevent numbering of the first line for a second
+% time.
% \begin{macrocode}
-\lst@Key{numberblanklines}{true}[t]
- {\lstKV@SetIf{#1}\lst@ifnumberblanklines}
-\lst@Key{numberfirstline}{f}[t]{\lstKV@SetIf{#1}\lst@ifnumberfirstline}
\gdef\lst@numberfirstlinefalse{\let\lst@ifnumberfirstline\iffalse}
% \end{macrocode}
% \end{lstkey}
@@ -12721,6 +12748,9 @@
% \end{macrocode}
% \end{lstkey}
%
+% The key |name| is defined in section \ref{sec:list-listings}, the data
+% command |\thelstnumber| below on page \pageref{iTheLstNumber}.
+%
% \begin{macro}{\lst@SetFirstNumber}
% \begin{macro}{\lst@SaveFirstNumber}
% \lsthelper{Boris~Veytsman}{1998/03/25}{continue line numbering: a.c b.c a.c}
@@ -12749,7 +12779,9 @@
% \end{macro}
% \end{macro}
%
+% \begin{macro}{\thelstnumber}
% \begin{macro}{\c@lstnumber}
+% \label{iTheLstNumber}%
% This counter keeps the current label number. We use it as current label to
% make line numbers referenced by |\ref|. This was proposed by
% \lsthelper{Boris~Veytsman}{1998/03/25}{make line numbers referenced via
@@ -12805,6 +12837,7 @@
.\thelstnumber}}
% \end{macrocode}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\lst@skipnumbers}
% There are more things to do. We calculate how many lines must skip their
@@ -13879,12 +13912,21 @@
% \end{macrocode}
% Further parsing is done by |lst@GLI@|, the argument is |#1--\@nil| that
% is the first element of the list augmented by a sentinel. This
-% argument is parsed with the template |#1-#2-#3\@nil|. A linerange given
-% as e.\,g. `|12-21|' leads to the argument |12-21--\@nil|, so it is parsed
-% as \#1\(\leftarrow\) |12|, \#2\(\leftarrow\)|21|, and \#3\(\leftarrow\)|-|.
+% argument is parsed with the template |#1-#2-#3\@nil|.
+%
% \begin{macrocode}
\def\lst@GLI@#1-#2-#3\@nil{%
% \end{macrocode}
+% A linerange given as e.\,g. `|12-21|' leads to the argument
+% |12-21--\@nil|, so it is parsed as \#1\(\leftarrow\) |12|,
+% \#2\(\leftarrow\)|21|, and \#3\(\leftarrow\)|-|.
+%
+% Otherwise it is possible to define a range by arbitrary linerange markers
+% like `|start-end|' which leads to the argument
+% |12-21--\@nil|, so it is parsed as \#1\(\leftarrow\) |12|,
+% \#2\(\leftarrow\)|21|, and \#3\(\leftarrow\)|-|.
+
+
% First we test, if the linerange starts with a number (consisting of -, 1,
% 2, 3, \ldots) or an arbitrary linerange marker. If a linerange starts
% erroneously with a `|-|' character, the argument \#1 isn't set and so the
@@ -13897,23 +13939,23 @@
\ifx\@empty#1\@empty
\let\lst@firstline\@ne
\else
- \def\lst@firstline{#1\relax}%
+ \def\lst@firstline{#1\relax}
\fi
% \end{macrocode}
% Now we know the starting number of the linerange. \#3 isn't set with a
% linerange consisting of a single number, in all other cases \#2 defines
% the last line (explicitly or implicitly).
% \begin{macrocode}
- \ifx\@empty#3\@empty%
- \def\lst@lastline{9999999\relax}%
+ \ifx\@empty#3\@empty
+ \def\lst@lastline{9999999\relax}
\ifx\@empty#2\@empty
- \let\lst@lastline\lst@firstline%
+ \let\lst@lastline\lst@firstline
\fi
\else%
\ifx\@empty#2\@empty
\def\lst@lastline{9999999\relax}
\else % doesn't happen(?)
- \def\lst@lastline{#2\relax}%
+ \def\lst@lastline{#2\relax}
\fi
\fi
}%
@@ -13922,7 +13964,7 @@
% 9999999. This prevents (almost) anything from being printed for now.
% \begin{macrocode}
{%
- \def\lst@firstline{9999999\relax}%
+ \def\lst@firstline{9999999\relax}
\let\lst@lastline\lst@firstline
% \end{macrocode}
% We add the prefixes and suffixes to the markers.
@@ -14017,10 +14059,10 @@
\ifnum\@tempcnta=\z@ \else
\lst@nololtrue
\advance\@tempcnta\lst@advancenumber
- \edef\lst@firstnumber{\the\@tempcnta\relax}%
- \fi%
- \fi%
- }%
+ \edef\lst@firstnumber{\the\@tempcnta\relax}
+ \fi
+ \fi
+ }
}
\def\lst@InitLstNumber{%
\global\c@lstnumber\lst@firstnumber
@@ -14366,7 +14408,8 @@
% \begin{macro}{\lst@HRefStepCounter}
% This macro sets the listing number to a negative value since the user
% shouldn't refer to such a listing. If the \packagename{hyperref} package
-% is present, we use `lstlisting' (argument from above) to hyperref to.
+% is present, we use `lstlisting.' (argument from above) concatenated with
+% the current (negative) number to hyperref to.
% The groups have been added to prevent other packages (namely
% \packagename{tabularx}) from reading the locally changed counter
% and writing it back globally. Thanks to \lsthelper{Michael~Niedermair}
@@ -14374,14 +14417,17 @@
% this localization led to another bug, see |\theHlstnumber|.
% \begin{macrocode}
\def\lst@HRefStepCounter#1{%
- \begingroup
- \c@lstlisting\lst@neglisting
- \advance\c@lstlisting\m@ne \xdef\lst@neglisting{\the\c@lstlisting}%
- \ifx\hyper@refstepcounter\@undefined\else
- \hyper@refstepcounter{#1}%
- \fi
- \endgroup}
-\gdef\lst@neglisting{\z@}% init
+ \begingroup
+ \c@lstlisting\lst@neglisting
+ \advance\c@lstlisting\m@ne \xdef\lst@neglisting{\the\c@lstlisting}%
+ \ifx\hyper@refstepcounter\@undefined\else
+ \hyper@refstepcounter{#1}%
+ \fi
+ \endgroup
+}
+\gdef\lst@neglisting{\z@}% init, \z@ can be used both for 0pt and 0,
+ % remember: _neg_ative number, but no
+ % counter!
% \end{macrocode}
% \end{macro}
%
@@ -14776,7 +14822,8 @@
% \end{macro}
%
%
-% \subsection{List of listings}
+% \subsection{List of listings}%
+% \label{sec:list-listings}
%
% \begin{lstkey}{name}
% \begin{macro}{\lstname}
@@ -15781,7 +15828,7 @@
\ifalgorithmicpkg \RequirePackage{algorithmic}\fi
\iflgrind \RequirePackage{lgrind}\fi
\RequirePackage{nameref}
-\RequirePackage{url}
+\RequirePackage{xurl} % allow URL breaks
\renewcommand\ref{\protect\T@ref}
\renewcommand\pageref{\protect\T@pageref}
% \end{macrocode}
@@ -17336,6 +17383,10 @@
% \item[1.10] from 2024/02/15 on
% \item usage of |tocbasic| if loaded to improve compatibility with
% KOMA-Script and also enhance functionality.
+% \item differentiate between Python 2 and Python 3
+% \item add initial support for Scala 3.0
+% \item made |\lstinline{...}| work in tabular cells
+% \item implemented upright double-quotes
% \end{itemize}
% \endgroup
%
diff --git a/macros/latex/contrib/listings/listings.pdf b/macros/latex/contrib/listings/listings.pdf
index b4bfc0d79e..8e2038ce2d 100644
--- a/macros/latex/contrib/listings/listings.pdf
+++ b/macros/latex/contrib/listings/listings.pdf
Binary files differ
diff --git a/macros/latex/contrib/listings/lstdrvrs.dtx b/macros/latex/contrib/listings/lstdrvrs.dtx
index 8541b7a0b9..25c197c9d5 100644
--- a/macros/latex/contrib/listings/lstdrvrs.dtx
+++ b/macros/latex/contrib/listings/lstdrvrs.dtx
@@ -33,7 +33,7 @@
% \title{Language, Style and Format drivers\\ for \textsf{Listings}\\
% {\large by Carsten Heinz and individual authors:}}
% \author{\InputIfFileExists{lstdrvrs.tmp}{}{}}
-% \date{2024/05/25\enspace\enspace Version 1.10b\ \box\abstractbox}
+% \date{2024/09/23\enspace\enspace Version 1.10c\ \box\abstractbox}
%
% \ifhyper
% \hypersetup{pdftitle={Language, Style and Format drivers for the
@@ -138,7 +138,7 @@
% \endgroup
% We mainly define default dialects.
% \begin{macrocode}
-\ProvidesFile{listings.cfg}[2024/05/25 1.10b listings configuration]
+\ProvidesFile{listings.cfg}[2024/09/23 1.10c listings configuration]
\def\lstlanguagefiles
{lstlang0.sty,lstlang1.sty,lstlang2.sty,lstlang3.sty}
\lstset{defaultdialect=[R/3 6.10]ABAP,
@@ -187,7 +187,7 @@
%<+lua-prf>\ProvidesFile{listings-lua.prf}
%<+python-prf>\ProvidesFile{listings-python.prf}
%<+rexx-prf>\ProvidesFile{listings-rexx.prf}
-%<-config> [2024/05/25 1.10b listings language file]
+%<-config> [2024/09/23 1.10c listings language file]
% \end{macrocode}
%
%
diff --git a/macros/latex/contrib/listings/lstdrvrs.pdf b/macros/latex/contrib/listings/lstdrvrs.pdf
index 0315d2cad2..51d045113b 100644
--- a/macros/latex/contrib/listings/lstdrvrs.pdf
+++ b/macros/latex/contrib/listings/lstdrvrs.pdf
Binary files differ
diff --git a/macros/latex/contrib/litetable/README.md b/macros/latex/contrib/litetable/README.md
index 146ccaf19b..f09ce486fb 100644
--- a/macros/latex/contrib/litetable/README.md
+++ b/macros/latex/contrib/litetable/README.md
@@ -1,17 +1,13 @@
-# The `LiteTable` document
+# The `litetable` class
-This template provides a beautiful design of class schedule with colorful course blocks.
+This class provides a beautiful design of timetable with colorful course blocks.
-**Welcome to pull requests
-[here](https://github.com/xiamyphys/LiteTable).**
+**Welcome to pull requests [here](https://github.com/xiamyphys/litetable).**
## License
-This work may be distributed and/or modified under the conditions of the
-[LaTeX Project Public License](http://www.latex-project.org/lppl.txt),
-either version 1.3c of this license or (at your option) any later version.
+This work may be distributed and/or modified under the conditions of the [LaTeX Project Public License](http://www.latex-project.org/lppl.txt), either version 1.3c of this license or (at your option) any later version.
This work has the LPPL maintenance status `maintained`.
-The Current Maintainer of this work is
-[Mingyu Xia](https://www.ctan.org/author/xia-my). \ No newline at end of file
+The Current Maintainers of this work are [Mingyu Xia](https://www.ctan.org/author/xia-my) and [Lijun Guo](https://ctan.org/author/guo). \ No newline at end of file
diff --git a/macros/latex/contrib/litetable/doc/favicon.png b/macros/latex/contrib/litetable/doc/favicon.png
deleted file mode 100644
index 4e105b2ce0..0000000000
--- a/macros/latex/contrib/litetable/doc/favicon.png
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/litetable/doc/litetable-cn.pdf b/macros/latex/contrib/litetable/doc/litetable-cn.pdf
index 6e91dd6280..ef997cdccc 100644
--- a/macros/latex/contrib/litetable/doc/litetable-cn.pdf
+++ b/macros/latex/contrib/litetable/doc/litetable-cn.pdf
Binary files differ
diff --git a/macros/latex/contrib/litetable/doc/litetable-cn.tex b/macros/latex/contrib/litetable/doc/litetable-cn.tex
index cf2cc129ad..61bea4cb28 100644
--- a/macros/latex/contrib/litetable/doc/litetable-cn.tex
+++ b/macros/latex/contrib/litetable/doc/litetable-cn.tex
@@ -1,302 +1,143 @@
-%% ******************************************************
-%% * This work may be distributed and/or modified under *
-%% * the conditions of the LaTeX Project Public License *
-%% * http://www.latex-project.org/lppl.txt *
-%% * either version 1.3c of this license or any later *
-%% * version. *
-%% ******************************************************
-\PassOptionsToPackage{quiet}{xeCJK}
-\PassOptionsToPackage{quiet, no-math}{fontspec}
-\documentclass[11pt]{article}
-\usepackage{geometry,pdfpages,caption,indentfirst,setspace,xeCJK}
-\captionsetup[table]{name={\textsc{Table}},labelsep=period}
-\usepackage[level]{datetime}
-\usepackage{authblk,xltxtra,bigfoot,enumitem}
-\usepackage{booktabs,diagbox,ragged2e,tabularx}
-\renewcommand\tabularxcolumn[1]{>{\Centering}m{#1}}
-\usepackage[toc]{multitoc}
-\usepackage[mono=false]{libertine}
-\setstretch{1.15}
-\setCJKmainfont{Chiron Sung HK}
-[BoldFont=Chiron Sung HK Bold,
- ItalicFont=Kaiti SC]
-\usepackage{hyperref,xcolor,tikz}
-\hypersetup{colorlinks,urlcolor=H6,linkcolor=H2,filecolor=filecolor,pdfstartview=FitH,pdfview=FitH,pdfcreator=XeTeX output}
-\definecolor{pkgcolor}{Hsb}{103,.8,.5}
-\definecolor{moducolor}{Hsb}{290,.8,.5}
-\definecolor{cmdcolor}{Hsb}{188,.8,.5}
-\definecolor{filecolor}{Hsb}{207,.6,.7}
-\definecolor{H1}{Hsb}{349,.8,.8} % 海棠紅 (Hangzhou MTR L 1 )
-\definecolor{H2}{Hsb}{23, .8,.8} % 丹桂橙 (Hangzhou Metro 2 )
-\definecolor{H3}{Hsb}{48, .8,.8} % 柠檬黄 (Hangzhou Metro 3 )
-\definecolor{H4}{Hsb}{103,.8,.8} % 香樟绿 (Hangzhou Metro 4 )
-\definecolor{H5}{Hsb}{188,.8,.8} % 青藍色 (Hangzhou MTR L 5 )
-\definecolor{H6}{Hsb}{207,.8,.8} % 海洋蓝 (Hangzhou Metro 6 )
-\definecolor{H7}{Hsb}{290,.8,.8} % 浪漫紫 (Hangzhou Metro 7 )
-\definecolor{W1}{HTML}{CCAD52}
-\definecolor{W2}{HTML}{8FCC52}
-\definecolor{W3}{HTML}{52CC70}
-\definecolor{W4}{HTML}{52CCCC}
-\definecolor{W5}{HTML}{5270CC}
-\definecolor{W6}{HTML}{8F52CC}
-\definecolor{W7}{HTML}{CC52AD}
-\def\pkg#1{\texorpdfstring{\textcolor{pkgcolor}{\textsf{#1}}}{“#1”}}
-\def\mode#1{\texorpdfstring{\textcolor{moducolor}{\textsf{#1}}}{“#1”}}
-\def\cmd#1{\texorpdfstring{\textcolor{cmdcolor}{\textsf{#1}}}{“#1”}}
-\def\datechange#1#2{%
- \noindent{\makebox[\textwidth][r]{\color{H7}\rule{1.15\textwidth}{.4pt}}}
- \noindent\makebox[0pt][r]{\makebox[-3em][r]{\small\textbf{\textcolor{H7}{#1}}}\;\;}{\sffamily Update: \ignorespaces#2}}
-
-\title{\bfseries\pkg{LiteTable} -- 多彩的课程表\textsf{\LaTeX} 模板}
-\author{\href{https://www.hdu.edu.cn}{杭州电子科技大学}, 夏明宇}
-\yyyymmdddate
-\date{\today}
-\affil{\href{mailto:xiamyphys@gmail.com}{\texttt{xiamyphys@gmail.com}}}
-\date{\today\quad Version 2.4c\thanks{%
- \url{https://github.com/xiamyphys/litetable}}}
+\documentclass[letterpaper]{l3doc}
+
+\hypersetup{urlcolor = teal, filecolor = violet}
+\usepackage[mono = false]{libertine}
+\usepackage{pdfpages,hologo,framed}
+\hologoFontSetup{general = \sffamily}
+\FrameSep = 0pt
+\usepackage[fontset = none]{ctex}
+\setCJKmainfont[BoldFont = *-Bold]{LXGW WenKai}
+\setCJKsansfont[BoldFont = *-Bold]{LXGW WenKai}
+\setCJKmonofont[BoldFont = *-Bold]{LXGW WenKai}
+\usepackage[os = mac]{menukeys}
+\AddToHook{env/function/before}{\vspace{-.3\baselineskip}}
+\AddToHook{env/syntax/after}{\vspace{-.2\baselineskip}}
+
+\title
+{
+ \bfseries\cls{litetable} 文档类:多彩的课程表
+ \thanks{\url{https://github.com/xiamyphys/litetable}}
+}
+\author
+{
+ 夏明宇 \texttt{<\href{mailto:xiamyphys@gmail.com}{xiamyphys@gmail.com}>}
+ \thanks{\href{https://github.com/ljguo1020}{郭李军}开发了读取 \meta{left} -> \meta{right} 型数据结构模块和低版本 \hologo{TeX} Live 兼容模块.}
+}
+\date{Version 3.1B, \today}
+
\begin{document}
+
\maketitle
-\vspace{-2em}
-\begin{abstract}
-\pkg{LiteTable} 模板提供了一个多彩的课程表设计,本文档为 \pkg{LiteTable} 模板的说明文档.
-\end{abstract}
+\section{介绍}
-\tableofcontents
+\cls{litetable} 文档类提供了一个多彩的课程表设计,基于 \cls{article} 文档类,由 \pkg{expl3} 和 \pkg{tikz} 构建. 兼容发行版 \hologo{TeX} Live 2019 及更高版本,在 \hologo{pdfLaTeX} 和 \hologo{XeLaTeX} 编译器下均可正常运行. 本文档为 \cls{litetable} 文档类的中文用户手册,手册同时有\href{./litetable-en.pdf}{英文}和\href{./litetable-hk.pdf}{粤语}版本\footnote{\href{https://qm.qq.com/q/RyssAhG4qy}{QQ Group: 760570712}}.
-\clearpage
+\section{载入 \cls{litetable} 并生成课程表框架}
-\section{Introduction}
+同加载其他文档类一样,只需写下
-\subsection{本模板的目的}
-本模板提供了一个多彩的课程表设计. 如果在使用本模板时遇到问题或有更好的建议,或者你想参与本模板或本人其他模板的开发,欢迎通过邮件 \href{mailto:xiamyphys@gmail.com}{xiamyphys@gmail.com} 联络我.
-
-同样,你也可以加入我的\textsf\LaTeX{} 技術交流群 \href{https://qm.qq.com/q/OnHzbNvVAG}{QQ Group: 760570712} 与我交流,来获取模板的内测版本.
-
-\subsection{所需宏集}
-本模板基于 \pkg{standalone} 文档类开发. 其需要 \pkg{tikz} 宏集去绘制图形,\pkg{kvoptions} 和 \pkg{etoolbox} 宏集用于提供全局模式,\pkg{expl3}\footnote{请使用 2023/10/10 及以后版本的 \pkg{expl3} 宏集以支持 e-type 变量展开: \verb|\clist_count:e|} 宏集用于支持数组,\pkg{ctex}宏集用于支持中文语言,\pkg{fontawesome5} 宏集提供一系列精美的图标.
-
-\subsection{安装并载入 \pkg{LiteTable} 模板}
-免安装使用方法如下,从 \href{https://github.com/xiamyphys/LiteTable}{GitHub} 或 \href{https://ctan.org/pkg/litetable}{CTAN} 下载最新的 \verb|litetable.cls| 文件并将它保存至你的项目根目录. 这种安装方式是最便捷的,但是当模板更新后,你需要手动替换 \verb|.cls| 文件.
-
-然而我强烈建议您使用终端机去执行以下命令,以将所有宏集更新到最新版本,并安装此模板
-\begin{verbatim}
- sudo tlmgr update --self --all
-\end{verbatim}
-
-如果您所在的地区存在网路封锁(如 GFW 干扰),你可以选择合适的镜像网站或其他方法\footnote{请遵守当地的网路条例.}. 欲详细了解,请前往 \href{https://tex.stackexchange.com/questions/55437/how-do-i-update-my-tex-distribution}{How do I update my \textsf{\TeX} distribution?}
-
-本模板提供了两个选项:\mode{direction} 和 \mode{font}. 将你要使用的选项模式添加在 \verb|.tex| 文件中命令 \verb|\documentclass[ ]{litetable}| 的方括号中即可.
-
-\subsection{兼容性}
-所使用的测试环境为 macOS + MacTeX 2023 / Overleaf,都可在 \XeLaTeX{} 编译方式下顺利运行, Windows, Linux 和 Unix 平台兼容性未知.
-
-此模板在 macOS 平台开发,使用 ``Heiti SC'' 字体. 如果你未安装此字体,请在命令 \verb|\documentclass{litetable}| 后使用命令 \verb|\setCJKfamilyfont{zhhei}{ }| 将 ``Heiti SC'' 替换为电脑中存在的字体.
-
-\section{\pkg{LiteTable} 的全局选项}
-\begin{verbatim}
- \documentclass[options]{litetable}
-\end{verbatim}
-
-\subsection{\mode{direction} 选项}
-此选项有两个模式,\mode{portrait} 和 \mode{landscape}, 可使课程表纵向或横向显示,默认为纵向.
-
-\subsection{\mode{font} 选项}
-此选项有两个模式,\mode{times} 和 \mode{libertinus},可使字体为 ``Times New Roman'' 或 ``Libertinus'',默认为 ``Times New Roman''\footnote{使用 \mode{libertinus} 模式时请确保已安装该字体.}.
-
-\section{\pkg{LiteTable} 的命令}
-
-\subsection{\cmd{makeframe} 命令}
-\begin{verbatim}
- \makeframe[Sem 6]{Axia's Timetable}
-\end{verbatim}
-
-此命令有两个参数,用于建立空白课程表. 第二个参数用于设置标题,第一个可选参数用于在标题右侧添加可跳转至第二页的学期按钮.
-
-\subsection{\cmd{weeklist} 命令}
-\begin{verbatim}
- \weeklist{
- \textcolor{W1}{星期一}, \textcolor{W2}{星期二},
- \textcolor{W3}{星期三}, \textcolor{W4}{星期四},
- \textcolor{W5}{星期五}, \textcolor{W6}{星期六};
- 0,.175,.35,.525,.7,.875,1
- }
-\end{verbatim}
-
-\begin{figure}[!ht]
- \centering
- \tikz
- {
- \tikzset{every node/.style={font=\footnotesize}}
- \draw [thick,->,>=stealth] ({-1/16*5.1 in},0) -- (5.1 in,0);
- \draw ({-5.10 in/16},-.1) --++ (0,.2) node [above] {\verb|-1/15|};
- \draw ({0.00*5.1 in},-.1) --++ (0,.2) node [above] {\verb|0|};
- \draw ({.175*5.1 in},-.1) --++ (0,.2) node [above] {\verb|.175|};
- \draw ({.350*5.1 in},-.1) --++ (0,.2) node [above] {\verb|.35|};
- \draw ({.525*5.1 in},-.1) --++ (0,.2) node [above] {\verb|.525|};
- \draw ({.700*5.1 in},-.1) --++ (0,.2) node [above] {\verb|.7|};
- \draw ({.875*5.1 in},-.1) --++ (0,.2) node [above] {\verb|.875|};
- \draw ({1.00*5.1 in},-.1) --++ (0,.2) node [above] {\verb|1|};
- \node [above] at ({.0875*5.1 in},0) {\textcolor{W1}{星期一}};
- \node [above] at ({.2625*5.1 in},0) {\textcolor{W2}{星期二}};
- \node [above] at ({.4375*5.1 in},0) {\textcolor{W3}{星期三}};
- \node [above] at ({.6125*5.1 in},0) {\textcolor{W4}{星期四}};
- \node [above] at ({.7875*5.1 in},0) {\textcolor{W5}{星期五}};
- \node [above] at ({.9375*5.1 in},0) {\textcolor{W6}{星期六}};
- }
- \caption*{命令 \cmd{weeklist} 中的第二行数组与坐标相对应.}
-\end{figure}
-
-此命令可在课程表顶部添加工作日,你可以自由决定显示样式,甚至是前面的 logo. 你可以自定义课程表中每一列的宽度,如图所示. 课程表可根据你输入的时间组数自动生成相应的列数. 如上方代码共有 5 个工作日,就会生成 5 列的课程表.
-
-\subsection{\cmd{timelist} 命令}
-\begin{verbatim}
- \timelist [13] {%
- 8:05,8:55,10:00,10:50,11:40,13:30,14:20,15:15,16:05,18:30,19:20,20:10;
- 8:50,9:40,10:45,11:35,12:25,14:15,15:05,16:00,16:50,19:15,20:05,20:55
- }
- \timelist [13] {}
-\end{verbatim}
-
-命令 \cmd{timelist} 有两个参数,第二个参数 \cmd{\ttfamily\{\#2\}} 可将时间添加至课程表的左侧,内容的第一行是每节课程开始时间,第二行是每节课程的结束时间,时间之间用逗号(\verb|,|)分隔,行之间用分号(\verb|;|)分隔.
-
-课程表可根据你输入的时间组数自动生成相应的行数. 如上方代码共有 12 组时间,就会生成 12 行的课程表.
-
-第一个可选参数 \cmd{\ttfamily[\#1]} 可直接指定课程表上你想要生成的行数并不会在课程表左侧添加时间,左侧只会有一列\emph{在每行竖直居中}的序号.
-
-\begin{table}[!ht]
-\centering
-\caption{两个参数的使用情况.}
-
-\begin{tabularx}{\textwidth}{c >{\raggedright\arraybackslash}X >{\raggedright\arraybackslash}X}
- \toprule
- \diagbox{\cmd{\ttfamily[\#1]}}{\cmd{\ttfamily\{\#2\}}} & \multicolumn{1}{c}{使用} & \multicolumn{1}{c}{不使用}\\
- \midrule
- 使用 &
- 效果和 \cmd{\ttfamily\{\#2\}} 描述相同,但生成行数由 \cmd{\ttfamily[\#1]} 决定 &
- 效果和命令 \cmd{\ttfamily[\#1]} 描述相同\\
- \midrule
- 不使用 &
- 效果和命令 \cmd{\ttfamily\{\#2\}} 描述相同 &
- 效果和命令 \cmd{\ttfamily[\#1]} 描述相同\newline\emph{并默认生成 12 行}.\\
- \bottomrule
-\end{tabularx}
-\end{table}
-
-如果你要只使用第一个参数 \cmd{\ttfamily[\#1]},那么请不要在第二个参数 \cmd{\ttfamily\{\#2\}} 中添加任何东西.
-
-\begin{itemize}
- \item 若参数 \cmd{\ttfamily\{\#2\}} 中有 12 组时间,参数 \cmd{\ttfamily[\#1]} 传递的数值为 14,那么课程表的左侧会只有 1 -- 12 行有时间标注,最后两行没有时间标注但最后两行的标号仍然偏上方,并不会竖直对齐.
- \item 若命令 \cmd{\ttfamily\{\#2\}} 中有 14 组时间,参数 \cmd{\ttfamily[\#1]} 传递的数值为 12,那么只会生成 12 行的课程表并且左侧均有时间标注,也就是在参数 \cmd{\ttfamily\{\#2\}} 中输入的最后两组时间无效.
-\end{itemize}
-
-\subsection{\cmd{weeks} 命令}
-\begin{verbatim}
- \weeks{Week 1 -- 16}
-\end{verbatim}
-
-此命令可指定命令 \cmd{course} 第 7 个参数的默认值.
-
-\subsection{\cmd{course} 命令}
-\begin{verbatim}
- \course[H1]{8}{9}{群论}{第6教研楼 · 中211}{Li Ge}[Week 1 -- 16]
-\end{verbatim}
-
-此命令共有7个参数.
-\begin{itemize}
- \item 第 1 个为课程块的颜色,从 ``H1'' 到 ``H9'' 供选择,此参数是可选参数,默认为 ``H1''.
- \item 第 2 -- 6 个为课程的起始节数和结束节数、名称,地址和教师的名字.
- \item 第 7 个为课程的首末周,此参数是可选参数,默认值由命令 \cmd{weeks} 指定,若未指定则默认值为 ``Week 1 -- 12''.
-\end{itemize}
-
-\subsection{\cmd{corner} 命令}
-\begin{verbatim}
- \corner{6 pt}
-\end{verbatim}
-
-此命令可决定课程块的圆角半径.
-
-\subsection{\cmd{newday} 命令}
-此命令可切换当前日到第二天,此时课程块会右移一格.
-
-\subsection{\cmd{more} 命令}
-\begin{verbatim}
- \more{· School Start: 04 / 03 / 2024 · Summer Vacation: 05 / 07 / 2024}
-\end{verbatim}
-
-此命令可在课程表末尾添加备注信息.
-
-\subsection{\cmd{sticker} 命令}
-\begin{verbatim}
- \sticker{favicon}
-\end{verbatim}
-
-在使用此命令后页面的右下方会添加一张贴纸.
-
-\section{版本历史}
-
-课程表的设计源于\href{https://www.hdu.edu.cn}{杭州电子科技大学}杭电助手学生课表页面(仅本校师生可访问). 页面排版十分精美,于是本人使用 \textsf{\LaTeX{}} 复刻出了课程表样式,并制作成模板分享给大家.
-
-\textsf{\bfseries Version 1.0} 于01/09/2023完成开发,并发布在 \href{https://www.latexstudio.net/index/details/index/mid/3625.html}{\textsf{\LaTeX}工作室} (杭州萧山)上,赢得了许多人的喜爱.
-\clearpage
-\setlist[itemize]{noitemsep, topsep=0pt}
-\datechange{2023/11/01}{Version 2.0a}
-\begin{itemize}
- \item 支持课程块显示为圆角或直角.
- \item 支持一个 \verb|.tex| 文件中生成多张课表.
-\end{itemize}
-
-\datechange{2023/11/05}{Version 2.1a}
-\begin{itemize}
- \item 支持 libertinus 字体.
-\end{itemize}
-
-\datechange{2024/01/31}{Version 2.2a}
-\begin{itemize}
- \item 修复了分辨率超出的 bug.
- \item 更改纸张类型为美国信纸.
- \item 支持自定义课程起始和结束时间.
- \item 支持在页面右下角添加一个你喜欢的小贴纸.
- \item 提供简体中文说明文档.
-\end{itemize}
-\setstretch{1}
-\datechange{2024/02/02}{Version 2.3a}
-\begin{itemize}
- \item 支持根据所输入的时间组数自动生成相应的行数.
- \item 课程表可纵向或横向显示.
-\end{itemize}
-
-\datechange{2024/02/03}{Version 2.3b}
-\begin{itemize}
- \item 优化坐标计算,提升编译速度.
-\end{itemize}
-
-\datechange{2024/02/24}{Version 2.4a}
-\begin{itemize}
- \item 支持自定义工作日显示样式.
- \item 支持隐藏时间,仅显示竖直对齐课程序号.
- \item 支持设置默认首末周.
-\end{itemize}
-
-\datechange{2024/03/01}{Version 2.4b}
-\begin{itemize}
- \item 修复了在 \mode{landscape} 模式中添加超过 7 个工作日时 \emph{分辨率溢出}的错误.
- \item 支持自定义课程表中每一列的宽度.
- \item 优化圆角设计,支持自定义圆角半径.
- \item 感谢 @egreg 在 \TeX{} Exchange 上提供的 \href{https://tex.stackexchange.com/a/711657/299948}{输出数组中每一列元素个数} 的代码方案.
-\end{itemize}
-
-\datechange{\today}{Version 2.4c}
-\begin{itemize}
- \item 支持在标题右侧添加学期按钮.
-\end{itemize}
+\begin{framed}
+ \begin{verbatim}
+ \documentclass{litetable}
+ \end{verbatim}
+\end{framed}
+
+如需输入中文,可自行载入 \pkg{ctex} 宏包并设置字体.
+
+\begin{function}{\timelist,\weeklist}
+ \begin{syntax}
+ \cs{timelist}\oarg{rows}\marg{time list} \cs{timelist}\marg{time list}\oarg{rows}
+ \cs{weeklist}\oarg{default weeks}\marg{week list} \cs{weeklist}\marg{week list}\oarg{default weeks}
+ \end{syntax}
+
+ 命令 \cs{timelist} 的可选参数可强制设定课程表的行数,命令 \cs{weeklist} 的可选参数可设定默认的星期数目并会在每个课程盒子的右下角显示. 两个命令的强制参数均接收数组,可分别在课程表的左侧添加时间列表、在课程表的顶部添加对应宽度比例的工作日. 输入数组的用例见Appendix \ref{mwe}.
+
+ 若命令 \cs{timelist} 中时间数组数大于强制设定的行数,则多余的时间数组将被忽略,并返回一个警告. 如果只需在课程表左侧添加一列序号,使强制参数为空即可.
+\end{function}
+
+\begin{function}{\more}
+ \begin{syntax}
+ \cs{more}\marg{comment}
+ \end{syntax}
+
+ 此命令可在页面的右下角添加备注.
+\end{function}
+
+\begin{function}{\maketable}
+ \begin{syntax}
+ \cs{maketable}\oarg{keyvals}\marg{title}\oarg{keyvals}
+ \end{syntax}
+
+ 此命令可生成一个空白的课程表框架,需在命令 \cs{timelist},\cs{weeklist} 和 \cs{more} 后,并在带有 \cmd{[remember picture, overaly]} 选项的 \env{tikz} 环境中执行. 可选参数接收键 \keys{\cmdmac~color} \keys{\cmdmac~sem},可分别在设置课程表框架的背景色和在页面的右上角添加学期,键 \keys{\cmdmac~color} 的默认值为 \cmd{gray}. 强制参数可设定标题.
+\end{function}
+
+\section{添加课程盒子}
+
+\begin{function}{\course}
+ \begin{syntax}
+ \cs{course}\oarg{keyvals}\marg{start number}\oarg{keyvals}\marg{end number}\oarg{keyvals}
+ \end{syntax}
+ \cs{course} 命令可在当前工作日添加课程盒子,需在命令 \cs{maketable} 后,并在带有 \cmd{[remember picture, overaly]} 选项的 \env{tikz} 环境中执行.
+
+ 此命令的可选参数接收下列键:\keys{\cmdmac~color} \keys{\cmdmac~subject} \keys{\cmdmac~location} \keys{\cmdmac~teacher} \keys{\cmdmac~weeks}. 键 \keys{\cmdmac~color} 默认值为 \cmd{teal},键 \keys{\cmdmac~weeks} 默认值由命令 \cs{weeklist} 的可选参数设定. 第一个和第二个强制参数分别为课程的开始和结束序号. 命令的用例见Appendix \ref{mwe}.
+
+ \begin{itemize}
+ \item 若课程盒子的高度只有一格,即$\meta{start number} = \meta{end number}$,则键 \keys{\cmdmac~location} 和 \keys{\cmdmac~teacher} 的值将输出在同一行并以逗号 (,) 间隔,键 \keys{\cmdmac~weeks} 的值将会隐藏.
+ \item 若键 \keys{\cmdmac~location} 和 \keys{\cmdmac~teacher} 均未赋值,则键 \keys{\cmdmac~subject} 的值将输出在课程盒子中心.
+ \item 超出课程表工作日范围的课程盒子将不会显示,并返回一条警告.
+ \end{itemize}
+\end{function}
+
+\begin{function}{\newday}
+ \begin{syntax}
+ \cs{newday}\oarg{integral value}
+ \end{syntax}
+
+ 此命令可使其后面添加的课程盒子后移 \meta{intergal value} 个工作日. 可选参数的默认值为 \cmd{1},即后移 \cmd{1} 个工作日.
+\end{function}
+
+\clearpage
\appendix
-\includepdf[pages={1,3}]{litetable-demo.pdf}
-\includepdf[pages={2,4},nup=1x2,pagecommand={
- \tikz[remember picture, overlay]
- \node [rotate=90,below,yshift=-1em] at (current page.west) {\bfseries\LARGE Document Example: \texttt{litetable-demo.tex}};
- }
-]{litetable-demo.pdf}
-
-\end{document} \ No newline at end of file
+
+\section{最小工作示例}\label{mwe}
+
+此MWE生成的课程表有13行但是只有前12行标注时间,课程表顶部共有5个工作日,工作日之间的宽度比例为$4:5:4:6:5$,键 \keys{\cmdmac~weeks} 的默认值被赋为 \cmd{Weeks 1 - 16}. 添加了注释和两个课程盒子.
+
+\begin{framed}
+ \begin{verbatim}
+ \documentclass{litetable}
+
+ \begin{document}
+
+ \timelist[13]
+ {
+ 08:05 -> 08:50, 08:55 -> 09:40, 10:00 -> 10:45, 10:50 -> 11:35,
+ 11:40 -> 12:25, 13:30 -> 14:15, 14:20 -> 15:05, 15:15 -> 16:00,
+ 16:05 -> 16:50, 18:30 -> 19:15, 19:20 -> 20:05, 20:10 -> 20:55
+ }
+ \weeklist[Weeks 1 - 16]
+ {
+ Mon -> 4, Tue -> 5, Wed -> 4, Thu -> 6, Fri -> 5
+ }
+ \more{Author: Mingyu Xia \& Lijun Guo}
+
+ \begin{tikzpicture}[remember picture, overlay]
+ \maketable
+ \course [ subject = Keep on {\TeX}ing ] {10} {11}
+ \newday
+ \course [ color = DarkSlateGray, subject = litetable,
+ location = Hong Kong, teacher = M.Y. Xia
+ ] {8} {8}
+ \end{tikzpicture}
+
+ \end{document}
+ \end{verbatim}
+\end{framed}
+
+\includepdf[pages = 1]{litetable-demo.pdf}
+
+\end{document}
+
+% End of file litetable-cn.tex
diff --git a/macros/latex/contrib/litetable/doc/litetable-demo.pdf b/macros/latex/contrib/litetable/doc/litetable-demo.pdf
index 136369231a..30e84ee31e 100644
--- a/macros/latex/contrib/litetable/doc/litetable-demo.pdf
+++ b/macros/latex/contrib/litetable/doc/litetable-demo.pdf
Binary files differ
diff --git a/macros/latex/contrib/litetable/doc/litetable-demo.tex b/macros/latex/contrib/litetable/doc/litetable-demo.tex
index f2210298bf..32ab4d89e9 100644
--- a/macros/latex/contrib/litetable/doc/litetable-demo.tex
+++ b/macros/latex/contrib/litetable/doc/litetable-demo.tex
@@ -1,175 +1,70 @@
-\documentclass[times]{litetable}
+\documentclass[letterpaper, svgnames]{litetable}
-% \setCJKfamilyfont{zhhei}{Chiron Sung HK}
-
-\corner{6 pt}
-\sticker{favicon}
+\usepackage{twemojis,newtxtext}
+\usepackage[scaled = .9]{helvet}
+\renewcommand*\familydefault{\sfdefault}
\begin{document}
-\timelist[12]{%
- 8:05,8:55,10:00,10:50,11:40,13:30,14:20,15:15,16:05,18:30,19:20;
- 8:50,9:40,10:45,11:35,12:25,14:15,15:05,16:00,16:50,19:15,20:05
+\timelist [ 13 ]
+{
+ 08:05 -> 08:50, 08:55 -> 09:40, 10:00 -> 10:45,
+ 10:50 -> 11:35, 11:40 -> 12:25, 13:30 -> 14:15,
+ 14:20 -> 15:05, 15:15 -> 16:00, 16:05 -> 16:50,
+ 18:30 -> 19:15, 19:20 -> 20:05, 20:10 -> 20:55
}
-\weeklist{
- \heiti\bfseries\textcolor{W1}{\faIcon{moon}~星期一},
- \heiti\bfseries\textcolor{W2}{\faIcon{fire}~星期二},
- \heiti\bfseries\textcolor{W3}{\faIcon{water}~星期三},
- \heiti\bfseries\textcolor{W4}{\faIcon{tree}~星期四},
- \heiti\bfseries\textcolor{W5}{\faIcon{coins}~星期五};
- 0,.17,.34,.56,.78,1
+\weeklist [ Weeks 1 - 16 ]
+{
+ \scshape\texttwemoji{1f312} Mon -> 1,
+ \scshape\texttwemoji{1f525} Tue -> 1,
+ \scshape\texttwemoji{1f30a} Wed -> 1,
+ \scshape\texttwemoji{1f332} Thu -> 1,
+ \scshape\texttwemoji{1fa99} Fri -> 1
}
-\weeks{Week 1 -- 16}
-
-\begin{tikzpicture}
- \makeframe[SEM 6]{Axia\!\texttt{'}\!s Timetable}
-
- % Mon.
- \course[H5]{7}{8}{凝聚态物理}{第6教研楼 · 中225}{Mn Chen}
-
- \newday % Tue.
- \course[H1]{8}{9}{群论}{第6教研楼 · 中211}{Li Ge}
- \course[H5]{10}{11}{介观物理}{第6教研楼 · 中211}{Yuan Li \& Mn Chen}
-
- \newday % Wed.
- \course[H6]{1}{2}{工程制图}{第7教研楼 · 中3012}{Hc Wang}
- \course[H9]{8}{9}{形势与政策6}{第6教研楼 · 北302}{Xr Qi}[Double Week 10 -- 16]
- \course[H9]{10}{11}{高级创业运营仿真}{第4教研楼 · 411 -- 413}{Li Zhang}[Week 1 -- 8]
-
- \newday % Thu.
- \course[H4]{1}{2}{跨文化交际}{第3教研楼 · 422}{Cl Zuo}
- \course[H2]{3}{4}{无线电测向}{东边田径场}{Ys Yu}
- \course[H5]{6}{8}{固体物理}{第6教研楼 · 北408}{Kw Sun}
-
- \newday % Fri.
- \course[H8]{1}{2}{光电显示技术}{第7教研楼 · 中3012}{Wt Su}
- \course[H3]{6}{8}{研究生组会}{第6教研楼 · 中}{Yuan Li}
-
- \more{ · School Start: 04 / 03 / 2024 · Summer Vacation: 05 / 07 / 2024}
-\end{tikzpicture}
-
-\rotatepage
-
-\weeklist{
- \bfseries\sffamily\textcolor{W1}{\faIcon{moon}~Monday},
- \bfseries\sffamily\textcolor{W2}{\faIcon{fire}~Tuesday},
- \bfseries\sffamily\textcolor{W3}{\faIcon{water}~Wednesday},
- \bfseries\sffamily\textcolor{W4}{\faIcon{tree}~Thursday},
- \bfseries\sffamily\textcolor{W5}{\faIcon{coins}~Friday},
- \bfseries\sffamily\textcolor{W6}{\faIcon{mountain}~Saturday},
- \bfseries\sffamily\textcolor{W7}{\faIcon{sun}~Sunday};
- 0,.16,.32,.48,.64,.8,.9,1
+\more
+{
+ School Starts: 06 / 09 / 2024\quad Summer Vacation: 26 / 01 / 2025
}
-\begin{tikzpicture}
- \makeframe[SEM 6]{Axia\!\texttt{'}\!s Timetable}
-
- % Mon.
- \course[H5]{7}{8}{Introduction to Cond.}{Building 6 · Middle 225}{Mn Chen}
-
- \newday % Tue.
- \course[H1]{8}{9}{Group Theory}{Building 6 · Middle 211}{Li Ge}
- \course[H5]{10}{11}{Mesoscopic Physics}{Building 6 · Middle 211}{Yuan Li \& Mn Chen}
-
- \newday % Wed.
- \course[H6]{1}{2}{Engineering Drawing}{Building 7 · North 3012}{Hc Wang}
- \course[H9]{8}{9}{Situation \& Policy 6}{Building 6 · North 302}{Xr Qi}[Double Week 10 -- 16]
- \course[H9]{10}{11}{Operational Simu.}{Building 4 · 411 -- 413}{Li Zhang}[Week 1 -- 8]
-
- \newday % Thu.
- \course[H4]{1}{2}{Intercultural Comm.}{Building 3 · 422}{Cl Zuo}
- \course[H2]{3}{4}{Radio Direction}{Athletic Field}{Ys Yu}
- \course[H5]{6}{8}{Solid State Physics}{Building 6 · North 408}{Kw Sun}
-
- \newday % Fri.
- \course[H8]{1}{2}{OE. Display}{Building 7 · North 3012}{Wt Su}
- \course[H3]{6}{8}{Group Meeting}{Building 6 · Middle}{Yuan Li}
-
- \more{ · School Start: 04 / 03 / 2024 · Summer Vacation: 05 / 07 / 2024}
+\begin{tikzpicture}[remember picture, overlay]
+ \maketable [ color = MidnightBlue,
+ sem = SEM 6
+ ] { Skyrmion's Course Schedule }
+ \course [ color = DarkBlue, subject = interface3,
+ teacher = The {\LaTeX} Project
+ ] {4} {5}
+ \newday
+ \course [ color = Purple, subject = expl3,
+ teacher = The {\LaTeX} Project
+ ] {8} {8}
+ \course [ color = FireBrick, subject = usrguide,
+ teacher = {\LaTeX} Project Team, weeks = Weeks 7 - 14
+ ] {1} {2}
+ \newday
+ \course [ subject = Keep on {\TeX}ing ] {10} {11}
+ \newday
+ \course [ color = Crimson, subject = Ti\textit kZ,
+ teacher = The PGF/Ti\textit kZ Team
+ ] {3} {5}
+ \newday
+ \course [ color = DarkSlateGray, subject = litetable,
+ location = Hong Kong, teacher = M.Y. Xia
+ ] {8} {8}
\end{tikzpicture}
-\rerotatepage
+\clearpage
-\timelist{
- 8:05,8:55,10:00,10:50,11:40,13:30,14:20,15:15,16:05,18:30,19:20,20:10;
- 8:50,9:40,10:45,11:35,12:25,14:15,15:05,16:00,16:50,19:15,20:05,20:55
-}
-\weeklist
+\timelist [ 12 ] { }
+\weeklist [ Weeks 1 - 16 ]
{
- \heiti\bfseries\textcolor{W1}{\faIcon{moon}~星期一},
- \heiti\bfseries\textcolor{W2}{\faIcon{fire}~星期二},
- \heiti\bfseries\textcolor{W3}{\faIcon{water}~星期三},
- \heiti\bfseries\textcolor{W4}{\faIcon{tree}~星期四},
- \heiti\bfseries\textcolor{W5}{\faIcon{coins}~星期五},
- \heiti\bfseries\textcolor{W6}{\faIcon{mountain}~星期六};
- 0,.175,.35,.525,.7,.875,1
+ Mon -> 1, Tue -> 1, Wed -> 1, Thu -> 1, Fri -> 1
}
-\weeks{Week 1 -- 18}
-\begin{tikzpicture}
- \makeframe[SEM 5]{Axia\!\texttt{'}\!s Timetable} % make title & background
- % Mon.
- \course[H1]{1}{2}{羽毛球}{羽毛球场}{Ys Yu}
- \course[H7]{3}{5}{光学镜头设计实验}{第6教研楼 · 南402}{Hao Ying}[Week 5 -- 15]
- \newday % Tue.
- \course[H9]{3}{5}{马克思主义原理}{第6教研楼 · 北320}{Yang Wang}
- \course[H8]{6}{8}{光电检测技术}{第6教研楼 · 北320}{Xf Huang}
- \newday % Wed.
- \course[H7]{3}{4}{激光原理}{第6教研楼 · 中301}{Hd Mao}
- \course[H9]{6}{7}{就业3 | 形策5}{6教中301 | 6教北208}{MJH | QXR}[Week 5 -- 14]
- \course[H5]{8}{9}{计算物理}{第6教研楼 · 中215}{Wj Rao}
- \course[H1]{10}{11}{论文写作指导}{第6教研楼 · 北416}{Yq Shi}
- \newday % Thu.
- \course[H6]{1}{2}{智能传感系统}{第6教研楼 · 北110}{Bx Cai}
- \course[H5]{3}{5}{高等量子力学}{第6教研楼 · 中225}{Mn Chen \& Yuan Li}
- \course[H3]{6}{8}{近代物理实验2}{第6教研楼 · 南}{Xx Chen}[Week 5 -- 16]
- \course[H8]{10}{12}{光电信息技术实验}{第6教研楼 · 南302}{Yu Zhou}[Week 5 -- 15]
- \newday % Fri.
- \course[H7]{1}{2}{光学镜头设计}{第6教研楼 · 北422}{Hao Ying}
- \course[H5]{3}{5}{光电子学}{第6教研楼 · 北202}{Rx Li \& Yuan Li}
- \course[H8]{6}{7}{光电创新实践4}{第6教研楼 · 南302}{Ql Huang}[Week 5 -- 16]
- \course[H5]{8}{9}{研究生组会}{第6教研楼 · 中}{Yuan Li}
- \more{ · Hangzhou Asian Games: 23 / 09 / 2023 -- 08 / 10 / 2023 · School Starts: 11 / 09 / 2023
- · Winter Vacation: 26 / 01 / 2024}
+\begin{tikzpicture}[remember picture, overlay]
+ \maketable { Skyrmion's Course Schedule }
+ %
\end{tikzpicture}
-\rotatepage
-
-\weeklist{
- \bfseries\sffamily\textcolor{W1}{\faIcon{moon}~Monday},
- \bfseries\sffamily\textcolor{W2}{\faIcon{fire}~Tuesday},
- \bfseries\sffamily\textcolor{W3}{\faIcon{water}~Wednesday},
- \bfseries\sffamily\textcolor{W4}{\faIcon{tree}~Thursday},
- \bfseries\sffamily\textcolor{W5}{\faIcon{coins}~Friday},
- \bfseries\sffamily\textcolor{W6}{\faIcon{mountain}~Saturday};
- 0,.175,.35,.525,.7,.875,1
-}
-
-\begin{tikzpicture}
- \makeframe[SEM 5]{Axia\!\texttt{'}\!s Timetable} % make title
- % Mon.
- \course[H1]{1}{2}{Badminton}{Badminton Court}{Ys Yu}
- \course[H7]{3}{5}{Lens Design Expt.}{Building 6 · South 402}{Hao Ying}[Week 5 -- 15]
- \newday % Tue.
- \course[H9]{3}{5}{Marx's Principles}{Building 6 · North 320}{Yang Wang}
- \course[H8]{6}{8}{OE Detection Tech.}{Building 6 · North 320}{Xf Huang}
- \newday % Wed.
- \course[H7]{3}{4}{Laster Principle}{Building 6 Middle · 301}{Hd Mao}
- \course[H9]{6}{7}{Empl Guide | Situ Policy}{Build 6 · 301 | Build 6 · 208}{MJH | QXR}[Week 5 -- 14]
- \course[H5]{8}{9}{Computational Phys}{Building 6 · Middle 215}{Wj Rao}
- \course[H1]{10}{11}{Essay Writing}{Building 6 · North 416}{Yq Shi}
- \newday % Thu.
- \course[H6]{1}{2}{Sensing System}{Building 6 · North 110}{Bx Cai}
- \course[H5]{3}{5}{Quantum Mechanics$^\dagger$}{Building 6 · Middle 225}{Mn Chen \& Yuan Li}
- \course[H3]{6}{8}{Modern Phys Expt. 2}{Building 6 · South}{Xx Chen}[Week 5 -- 16]
- \course[H8]{10}{12}{OE Info Experiment}{Building 6 · South 302}{Yu Zhou}[Week 5 -- 15]
- \newday % Fri.
- \course[H7]{1}{2}{Optical Lens Design}{Building 6 · North 422}{Hao Ying}
- \course[H5]{3}{5}{Optoelectronics}{Building 6 · North 202}{Rx Li \& Yuan Li}
- \course[H8]{6}{7}{Innovative Practice 4}{Building 6 · South 302}{Ql Huang}[Week 5 -- 16]
- \course[H5]{8}{9}{Group Meeting}{Building 6 · Middle}{Yuan Li}
- \more{ · Hangzhou Asian Games: 23 / 09 / 2023 -- 08 / 10 / 2023
- · School Starts: 11 / 09 / 2023 · Winter Vacation: 26 / 01 / 2024 }
-\end{tikzpicture}
+\end{document}
-\end{document} \ No newline at end of file
+%% \ No newline at end of file
diff --git a/macros/latex/contrib/litetable/doc/litetable-en.pdf b/macros/latex/contrib/litetable/doc/litetable-en.pdf
index 33f8659677..f6c9a4cf2a 100644
--- a/macros/latex/contrib/litetable/doc/litetable-en.pdf
+++ b/macros/latex/contrib/litetable/doc/litetable-en.pdf
Binary files differ
diff --git a/macros/latex/contrib/litetable/doc/litetable-en.tex b/macros/latex/contrib/litetable/doc/litetable-en.tex
index 267f0f8346..17ab305070 100644
--- a/macros/latex/contrib/litetable/doc/litetable-en.tex
+++ b/macros/latex/contrib/litetable/doc/litetable-en.tex
@@ -1,304 +1,143 @@
-%% ******************************************************
-%% * This work may be distributed and/or modified under *
-%% * the conditions of the LaTeX Project Public License *
-%% * http://www.latex-project.org/lppl.txt *
-%% * either version 1.3c of this license or any later *
-%% * version. *
-%% ******************************************************
-% \PassOptionsToPackage{quiet}{xeCJK}
-% \PassOptionsToPackage{quiet, no-math}{fontspec}
-\documentclass[11pt]{article}
-\usepackage{geometry,pdfpages,caption,indentfirst,setspace}
-\captionsetup[table]{name={\textsc{Table}},labelsep=period}
-\usepackage[level]{datetime}
-\usepackage{authblk,xltxtra,bigfoot,enumitem}
-\usepackage{booktabs,diagbox,ragged2e,tabularx}
-\renewcommand\tabularxcolumn[1]{>{\Centering}m{#1}}
-\usepackage[toc]{multitoc}
-\usepackage[mono=false]{libertine}
-% \setstretch{1.15}
-% \setCJKmainfont{Chiron Sung HK}
-% [BoldFont=Chiron Sung HK Bold,
-% ItalicFont=Kaiti SC]
-\usepackage{hyperref,xcolor,tikz}
-\hypersetup{colorlinks,urlcolor=H6,linkcolor=H2,filecolor=filecolor,pdfstartview=FitH,pdfview=FitH,pdfcreator=XeTeX output}
-\definecolor{pkgcolor}{Hsb}{103,.8,.5}
-\definecolor{moducolor}{Hsb}{290,.8,.5}
-\definecolor{cmdcolor}{Hsb}{188,.8,.5}
-\definecolor{filecolor}{Hsb}{207,.6,.7}
-\definecolor{H1}{Hsb}{349,.8,.8} % 海棠紅 (Hangzhou MTR L 1 )
-\definecolor{H2}{Hsb}{23, .8,.8} % 丹桂橙 (Hangzhou Metro 2 )
-\definecolor{H3}{Hsb}{48, .8,.8} % 柠檬黄 (Hangzhou Metro 3 )
-\definecolor{H4}{Hsb}{103,.8,.8} % 香樟绿 (Hangzhou Metro 4 )
-\definecolor{H5}{Hsb}{188,.8,.8} % 青藍色 (Hangzhou MTR L 5 )
-\definecolor{H6}{Hsb}{207,.8,.8} % 海洋蓝 (Hangzhou Metro 6 )
-\definecolor{H7}{Hsb}{290,.8,.8} % 浪漫紫 (Hangzhou Metro 7 )
-\definecolor{W1}{HTML}{CCAD52}
-\definecolor{W2}{HTML}{8FCC52}
-\definecolor{W3}{HTML}{52CC70}
-\definecolor{W4}{HTML}{52CCCC}
-\definecolor{W5}{HTML}{5270CC}
-\definecolor{W6}{HTML}{8F52CC}
-\definecolor{W7}{HTML}{CC52AD}
-\def\pkg#1{\texorpdfstring{\textcolor{pkgcolor}{\textsf{#1}}}{“#1”}}
-\def\mode#1{\texorpdfstring{\textcolor{moducolor}{\textsf{#1}}}{“#1”}}
-\def\cmd#1{\texorpdfstring{\textcolor{cmdcolor}{\textsf{#1}}}{“#1”}}
-\def\datechange#1#2{%
- \noindent{\makebox[\textwidth][r]{\color{H7}\rule{1.15\textwidth}{.4pt}}}
- \noindent\makebox[0pt][r]{\makebox[-3em][r]{\small\textbf{\textcolor{H7}{#1}}}\;\;}{\sffamily Update: \ignorespaces#2}}
-
-\title{\bfseries The \pkg{LiteTable} Template: Colorful Timetable}
-\author{Xia Mingyu, \href{https://www.hdu.edu.cn}{Hangzhou Dianzi University}}
-\yyyymmdddate
-\date{\today}
-\affil{\href{mailto:xiamyphys@gmail.com}{\ttfamily xiamyphys@gmail.com}}
-\date{\today\quad Version 2.4c\thanks{%
- \url{https://github.com/xiamyphys/litetable}}}
+\documentclass[letterpaper]{l3doc}
+
+\hypersetup{urlcolor = teal, filecolor = violet}
+\usepackage[mono = false]{libertine}
+\usepackage{pdfpages,hologo,framed}
+\hologoFontSetup{general = \sffamily}
+\FrameSep = 0pt
+\linespread{1.12}
+\usepackage{indentfirst}
+\setlength{\parindent}{2em}
+\usepackage[os = mac]{menukeys}
+\AddToHook{env/function/before}{\vspace{-.3\baselineskip}}
+\AddToHook{env/syntax/after}{\vspace{-.2\baselineskip}}
+
+\title
+{
+ \bfseries
+ The \cls{litetable} Class: Colorful Timetable
+ \thanks{\url{https://github.com/xiamyphys/litetable}}
+}
+\author
+{
+ Mingyu Xia \texttt{<\href{mailto:xiamyphys@gmail.com}{xiamyphys@gmail.com}>}
+ \thanks{\href{https://github.com/ljguo1020}{Lijun Guo} developed modules for reading \meta{left} -> \meta{right} data structure and supporting low version \hologo {TeX} Live.}
+}
+\date{Version 3.1B, \today}
+
\begin{document}
+
\maketitle
-\vspace{-2em}
-\begin{abstract}
-This is the document for \pkg{LiteTable} template, which provides a beautiful design of class schedule with colorful course blocks.
-\end{abstract}
+\section{Introduction}
-\tableofcontents
+The \cls{litetable} class provides a design of timetable with colorful course boxes, which is based on the \cls{article} class, and conducted on \pkg{expl3} and \pkg{tikz}. It is compatible with \hologo{TeX}Live 2019 or later distributions, they all work fine for \hologo{pdfLaTeX} and \hologo{XeLaTeX} compilers. This is the Chinese manual for the \cls{litetable} class, manuals in \href{./litetable-cn.pdf}{Chinese} and \href{./litetable-hk.pdf}{Cantonese} versions are also provided\footnote{\href{https://qm.qq.com/q/RyssAhG4qy}{QQ Group: 760570712}}.
-\clearpage
+\section{Loading \cls{litetable} and generate the timetable frame}
-\section{Introduction}
+Just like loading any class, write
-\subsection{The purpose of this template}
-This template provides a beautiful design of class schedule with colorful course blocks.
+\begin{framed}
+ \begin{verbatim}
+ \documentclass{litetable}
+ \end{verbatim}
+\end{framed}
-If you meet bugs when using this template, or you have better suggestions or ideas, or you want to participate in the development of the template or other templates by me, welcome to contact via email \href{mailto:xiamyphys@gmail.com}{\ttfamily xiamyphys@gmail.com}.
+One can load the \pkg{ctex} package and set the font to input the CJK characters, if necessary.
-Also, you can join my \textsf\LaTeX{} Template Discussion \href{https://qm.qq.com/q/OnHzbNvVAG}{QQ Group: 760570712} to communicate with me and get the insider preview edition of the template.
+\begin{function}{\timelist,\weeklist}
+ \begin{syntax}
+ \cs{timelist}\oarg{rows}\marg{time list} \cs{timelist}\marg{time list}\oarg{rows}
+ \cs{weeklist}\oarg{default weeks}\marg{week list} \cs{weeklist}\marg{week list}\oarg{default weeks}
+ \end{syntax}
-\subsection{Packages required}
-This template is based on the template \pkg{standalone}. And it requires \pkg{tikz} package to plot some graphics, \pkg{kvoptions} and \pkg{etoolbox} packages to provide global options, \pkg{expl3}\footnote{Please use the \pkg{expl3} version after 2023/10/10 to support the e-type variants for expand: \verb|\clist_count:e|.} package to support \cmd{timelist} array, \pkg{xeCJK} package to support the \textbf{Chinese, Simplified} language and \pkg{fontawesome5} package to provide a set of beautiful icons.
+ The optional argument of the command \cs{timelist} can force the number of rows on the timetable, and that of the command \cs{weeklist} can set the default number of weeks and print it at every course box's southeast corner. Each mandatory argument of the two commands accepts an array that can add a time list to the left side of the timetable and add workdays with corresponding width ratios at the top of the timetable, respectively. The example for inputting the arrays is shown in Appendix \ref{mwe}
-\subsection{Installing \pkg{LiteTable} and loading it}
-For portable version, simply download latest \verb|litetable.cls| file from \href{https://github.com/xiamyphys/LiteTable}{GitHub} or \href{https://ctan.org/pkg/litetable}{CTAN} and save it under your working directory. This way of installation is simple and convenient, but you have to manually update \verb|.cls| now and then.
-
-However, I strongly suggest that you should use terminal/cmd to implement the commands to update all the packages (and install this package) to the latest version or switch to portable version instead
-\begin{verbatim}
- sudo tlmgr update --self --all
-\end{verbatim}
-
-If you are in some areas with awful Internet environment (such as GFW), you can choose proper mirror source or use other means\footnote{Please comply with local network regulations.}. To learn more, please refer to \href{https://tex.stackexchange.com/questions/55437/how-do-i-update-my-tex-distribution}{How do I update my \textsf{\TeX} distribution?}
-
-The template provides two options, \mode{direction} and \mode{font}. Add the modes of the options you want in the square bracket of the command \verb|\documentclass[ ]{litetable}| in \verb|.tex| file.
-
-\subsection{Compatibility}
-The test environments are macOS + Mac\TeX{} 2023 / Overleaf and they all work fine for \XeLaTeX{} compiler, Windows, Linux and Unix platforms compatibility unknown.
-
-This template is developed on macOS platform and using the font ``Heiti SC''. If this font is not installed on your computer, please use the command \verb|\setCJKfamilyfont{zhhei}{ }| after \verb|\documentclass{litetable}| to replace ``Heiti SC'' to the font exists in your computer.
-
-\section{Global Options of \pkg{LiteTable}}
-\begin{verbatim}
- \documentclass[options]{litetable}
-\end{verbatim}
-
-\subsection{The \mode{direction} option}
-This option has two modes, \mode{portrait} and \mode{landscape}, which can make the timetable displayed portrait or horizontally.
-
-\subsection{The \mode{font} option}
-This option has two modes, \mode{times} and \mode{libertinus}, which can make the font to be ``Times New Roman'' or ``Libertinus'', and the default mode is ``Times New Roman''\footnote{Please ensure that your computer has been already installed the font when using this option.}.
-
-\section{Commands of \pkg{LiteTable}}
-
-\subsection{The \cmd{makeframe} command}
-\begin{verbatim}
- \makeframe[Sem 6]{Timetable}
-\end{verbatim}
-
-This command has two variables can create an empty class schedule. The second variable can assign the title while the first optional one can add a button that forward to the next page on the right.
-
-\subsection{The \cmd{weeklist} command}
-\begin{verbatim}
- \weeklist{
- \textcolor{W1}{Monday}, \textcolor{W2}{Tuesday},
- \textcolor{W3}{Wednesday}, \textcolor{W4}{Thursday},
- \textcolor{W5}{Friday};
- 0,.17,.34,.56,.78,1
- }
-\end{verbatim}
-
-
-\begin{figure}[!ht]
- \centering
- \tikz
- {
- \tikzset{every node/.style={font=\small}}
- \draw [thick,->,>=stealth] ({-1/16*5.1 in},0) -- (5.1 in,0);
- \draw ({-5.1 in/16},-.1) --++ (0,.2) node [above] {\verb|-1/15|};
- \draw ({0.0*5.1 in},-.1) --++ (0,.2) node [above] {\verb|0|};
- \draw ({.17*5.1 in},-.1) --++ (0,.2) node [above] {\verb|.17|};
- \draw ({.34*5.1 in},-.1) --++ (0,.2) node [above] {\verb|.34|};
- \draw ({.56*5.1 in},-.1) --++ (0,.2) node [above] {\verb|.56|};
- \draw ({.78*5.1 in},-.1) --++ (0,.2) node [above] {\verb|.78|};
- \draw ({1.0*5.1 in},-.1) --++ (0,.2) node [above] {\verb|1|};
- \node [above] at ({.085*5.1 in},0) {\sffamily\textcolor{W1}{Monday}};
- \node [above] at ({.255*5.1 in},0) {\sffamily\textcolor{W2}{Tuesday}};
- \node [above] at ({.45*5.1 in},0) {\sffamily\textcolor{W3}{Wednesday}};
- \node [above] at ({.67*5.1 in},0) {\sffamily\textcolor{W4}{Thursday}};
- \node [above] at ({.89*5.1 in},0) {\sffamily\textcolor{W5}{Friday}};
- }
- \caption*{The second line of array in the \cmd{weeklist} command corresponds to the axis coordinates.}
-\end{figure}
-
-
-This command can add workdays to the top side of the timetable, you can adjust the format (the icon before it), every width of the columns in the timetable like the figure. The timetable can automatically generate the corresponding number of columns based on the number of workdays you enter. For example, the code above has 5 workdays, a 5-column timetable will be generated.
-
-\subsection{The \cmd{timelist} command}
-\begin{verbatim}
- \timelist [13] {%
- 8:05,8:55,10:00,10:50,11:40,13:30,14:20,15:15,16:05,18:30,19:20,20:10;
- 8:50,9:40,10:45,11:35,12:25,14:15,15:05,16:00,16:50,19:15,20:05,20:55
- }
- \timelist [13] {}
-\end{verbatim}
-
-The command \cmd{timelist} has two variables while the second one \cmd{\ttfamily\{\#2\}} can add time to the left side of the timetable, and the first line of the content is the start time of the classes while the second line of the content is the end time of the classes, each time separates with a comma (\verb|,|), the first line and the second line separates with a semicolon (\verb|;|).
-
-The timetable can automatically generate the corresponding number of rows based on the number of time groups you enter. For example, the code above has 12 groups of times, a 12-row timetable will be generated.
-
-The first optional variable \cmd{\ttfamily[\#1]} can directly assign the number of rows on the timetable you want without adding time to the left side of the timetable, and there will only be a series of numbers that \emph{aligned vertically to the center of every line}.
-
-\begin{table}[!ht]
-\centering
-\caption{Usage of the two variables.}
-
-\begin{tabularx}{\textwidth}{c >{\raggedright\arraybackslash}X >{\raggedright\arraybackslash}X}
- \toprule
- \diagbox{\cmd{\ttfamily[\#1]}}{\cmd{\ttfamily\{\#2\}}} & \multicolumn{1}{c}{To use} & \multicolumn{1}{c}{Not to use}\\
- \midrule
- To use &
- The effect is the description of \cmd{\ttfamily\{\#2\}}, but number of rows assign by \cmd{\ttfamily[\#1]} &
- The effect is the description of \cmd{\ttfamily[\#1]}\\
- \midrule
- Not to use &
- The effect is the description of \cmd{\ttfamily\{\#2\}} &
- The effect is the description of \cmd{\ttfamily[\#1]} before with \emph{default format of 12 lines}\\
- \bottomrule
-\end{tabularx}
-\end{table}
-
-If you want to use the first variable \cmd{\ttfamily[\#1]} only, not to add anything in the second variable.
+ If the number of time arrays received by the command \cs{timelist} is greater than the forced number of rows, then the extra time sets are ignored, and it will return a warning. If one wants to add a series of numbers to the left side of the timetable without time, just leave the mandatory argument blank.
+\end{function}
-\begin{itemize}
- \item Assume that \cmd{\ttfamily\{\#2\}} has 12 groups of times, and \cmd{\ttfamily[\#1]} passed a value of 14, then the left side of the timetable will have only 1 -- 12 rows with time while the last two rows without time the label of them is still upward, not vertically aligned in the center.
- \item Assume that \cmd{\ttfamily\{\#2\}} has 14 sets of times, and \cmd{\ttfamily[\#1]} passes a value of 12, then only 12 rows of timetables will be generated with time on the left side of each row, that is, the last two sets of data in \cmd{\ttfamily\{\#2\}} will be invalid.
-\end{itemize}
+\begin{function}{\more}
+ \begin{syntax}
+ \cs{more}\marg{comment}
+ \end{syntax}
-\subsection{The \cmd{weeks} command}
-\begin{verbatim}
- \weeks{Week 1 -- 16}
-\end{verbatim}
+ This command can add a comment at the southwest corner of the page.
+\end{function}
-This command can assign the default value of the 7th variable of the command \cmd{course}.
+\begin{function}{\maketable}
+ \begin{syntax}
+ \cs{maketable}\oarg{keyvals}\marg{title}\oarg{keyvals}
+ \end{syntax}
-\subsection{The \cmd{course} command}
-\begin{verbatim}
- \course[H1]{8}{9}{Group Theory}{Building 6 · 211}{Li Ge}[Week 1 -- 16]
-\end{verbatim}
+ This command can create a blank timetable frame, and it should execute after commands \cs{timelist} and \cs{weeklist} in the \env{tikzpicture} environment with the option of \cmd{[remember picture, overaly]}. The optional argument accepts keys, it can set the background color of the timetable, and add the semester at the northeast corner of the page, the default value of the key \keys{\cmdmac~color} is \cmd{gray}. The mandatory argument can set the title.
+\end{function}
-There are 7 variables in this command.
-\begin{itemize}
- \item The 1st one is the color of the class, from ``H1'' to ``H9'', it's optional and the default is ``H1''.
- \item The 2nd -- 6th ones is the starting number and ending number, name, address, teacher(s) of the class.
- \item The last one is the start week and end week of the timetable, it's optional and the default value is the value that you've adjusted in the command \cmd{weeks} or it will be ``Week 1 -- 12''.
-\end{itemize}
+\section{Add course boxes}
-\subsection{The \cmd{corner} command}
-\begin{verbatim}
- \corner{6 pt}
-\end{verbatim}
+\begin{function}{\course}
+ \begin{syntax}
+ \cs{course}\oarg{keyvals}\marg{start number}\oarg{keyvals}\marg{end number}\oarg{keyvals}
+ \end{syntax}
+\end{function}
-This command determines the corner radius of the course block.
+The \cs{course} command can add course boxes on the current workday, it should execute after command \cs{maketable} in the \env{tikzpicture} environment with the option of \cmd{[remember picture, overaly]}.
-\subsection{The \cmd{newday} command}
-This command can switch the current weekday to the next day, then the course will move right one grid.
+The optional argument accepts the following keys: \keys{\cmdmac~color} \keys{\cmdmac~subject} \keys{\cmdmac~location} \keys{\cmdmac~teacher} \keys{\cmdmac~weeks}. The default value of the key \keys{\cmdmac~color} is \cmd{teal}, and the default value of the key \keys{\cmdmac~weeks} is determined by the argument of the command \cs{weeklist}. The first and second mandatory arguments are the start and end numbers of the course, respectively. The example of this command is shown in Appendix \ref{mwe}
-\subsection{The \cmd{more} command}
-\begin{verbatim}
- \more{· School Start: 04 / 03 / 2024 · Summer Vacation: 05 / 07 / 2024}
-\end{verbatim}
+\begin{itemize}
+ \item If the course box's height is only one unit, that is $\meta{start number} = \meta{end number}$, the values of keys \keys{\cmdmac~location} and \keys{\cmdmac~teacher} will print on the same line with a comma (,) separated, and the value of the key \keys{\cmdmac~weeks} will be hidden.
+ \item If neither the key \keys{\cmdmac~location} nor the key \keys{\cmdmac~teacher} is assigned value, then the value of the key \keys{\cmdmac~subject} will print at the center of the course box.
+ \item course boxes that are out of the timetable will not display, and it will return a warning.
+\end{itemize}
-This command can add remark at the end of the class schedule.
+\begin{function}{\newday}
+ \begin{syntax}
+ \cs{newday}\oarg{intergal value}
+ \end{syntax}
-\subsection{The \cmd{sticker} command}
-\begin{verbatim}
- \sticker{favicon}
-\end{verbatim}
+ This command has an optional argument that can move the course boxes right \meta{intergal value} working days. The default value of the optional argument is \cmd{1} to move right \cmd{1} workday.
+\end{function}
-There will be a sticker on the southeast of the page after you add, otherwise it won't.
+\clearpage\linespread{1.375}
+\appendix
-\section{Version History}
+\section{Minimal Working Example}\label{mwe}
-The design of this course schedule originated from the student course schedule web page (only personnel of this school can access) of the \href{https://www.hduhelp.cn/}{HDUHelp} in \href{https://www.hdu.edu.cn}{Hangzhou Dianzi University}. The layout is very beautiful and I used \textsf{\LaTeX} to imitate that style and made a template to share with everyone.
+The following MWE could generate a timetable of 13 lines but only the top 12 lines have been marked with time, and there are 5 workdays at the top of the timetable, ratios between them are $4:5:4:6:5$. The default value of the key \keys{\cmdmac~weeks} will be set to \cmd{Weeks 1 - 16}. A comment and two course boxes are added.
-\textsf{\bfseries Version 1.0} was finished on 2023/09/01 and released on \href{https://www.latexstudio.net}{\textsf{\LaTeX} Studio} (Hsiaoshan, Hangzhou), where has won the favor of many people.
-\clearpage
-\setlist[itemize]{noitemsep, topsep=0pt}
-\datechange{2023/11/01}{Version 2.0a}
-\begin{itemize}
- \item Supports to set the course block's corners be round or sharp.
- \item Supports to add multiply class schedules in one \verb|.tex| file.
-\end{itemize}
+\begin{framed}
+ \begin{verbatim}
+ \documentclass{litetable}
-\datechange{2023/11/05}{Version 2.1a}
-\begin{itemize}
- \item Supports to use the libertinus font.
-\end{itemize}
+ \begin{document}
-\datechange{2024/01/31}{Version 2.2a}
-\begin{itemize}
- \item Fixed the bug of resolution exceeded.
- \item Changed paper type to US letter.
- \item Support to custom course start time and end time.
- \item Support to add sticker as you like at the southeast of the page.
- \item Provide simplified Chinese documentation.
-\end{itemize}
+ \timelist[13]
+ {
+ 08:05 -> 08:50, 08:55 -> 09:40, 10:00 -> 10:45, 10:50 -> 11:35,
+ 11:40 -> 12:25, 13:30 -> 14:15, 14:20 -> 15:05, 15:15 -> 16:00,
+ 16:05 -> 16:50, 18:30 -> 19:15, 19:20 -> 20:05, 20:10 -> 20:55
+ }
+ \weeklist[Weeks 1 - 16]
+ {
+ Mon -> 4, Tue -> 5, Wed -> 4, Thu -> 6, Fri -> 5
+ }
+ \more{Author: Mingyu Xia \& Lijun Guo}
-\datechange{2024/02/02}{Version 2.3a}
-\begin{itemize}
- \item Supports to generate the corresponding number of rows based on the number of time groups you enter automatically.
- \item Timetable can be displayed portrait or horizontally as you like.
-\end{itemize}
-
-\datechange{2024/02/03}{Version 2.3b}
-\begin{itemize}
- \item Optimized coordinate calculation and improved compilation speed.
-\end{itemize}
+ \begin{tikzpicture}[remember picture, overlay]
+ \maketable
+ \course [ subject = Keep on {\TeX}ing ] {10} {11}
+ \newday
+ \course [ color = DarkSlateGray, subject = litetable,
+ location = Hong Kong, teacher = M.Y. Xia
+ ] {8} {8}
+ \end{tikzpicture}
-\datechange{2024/02/24}{Version 2.4a}
-\begin{itemize}
- \item Supports to custom workday display style.
- \item Supports to hide time and only showing course program number vertically aligned.
- \item Supports to set default first and last week.
-\end{itemize}
+ \end{document}
+ \end{verbatim}
+\end{framed}
-\datechange{2024/03/01}{Version 2.4b}
-\begin{itemize}
- \item Fixed the error of \emph{resolution exceed} in the \mode{landscape} mode and added over 7 workdays.
- \item Supports to custom every width of the columns in the timetable.
- \item Optimized the design of round corners, supports custom the radius of corners.
- \item Thanks for @egreg's code solution on \TeX{} StackExchange for \href{https://tex.stackexchange.com/a/711657/299948}{Printing the number of each rows' elements in an array respectively}.
-\end{itemize}
+\includepdf[pages = 1]{litetable-demo.pdf}
-\datechange{\today}{Version 2.4c}
-\begin{itemize}
- \item Supports to add the `Semester' button on the right side of the title.
-\end{itemize}
+\end{document}
-\appendix
-\includepdf[pages={2,4},nup=1x2,pagecommand={
- \tikz[remember picture, overlay]
- \node [rotate=90,below,yshift=-1em] at (current page.west) {\bfseries\LARGE Document Example: \texttt{litetable-demo.tex}};
- }
-]{litetable-demo.pdf}
-\includepdf[pages={1,3}]{litetable-demo.pdf}
-
-\end{document} \ No newline at end of file
+% End of file litetable-en.tex
diff --git a/macros/latex/contrib/litetable/doc/litetable-hk.pdf b/macros/latex/contrib/litetable/doc/litetable-hk.pdf
new file mode 100644
index 0000000000..d2f1234e75
--- /dev/null
+++ b/macros/latex/contrib/litetable/doc/litetable-hk.pdf
Binary files differ
diff --git a/macros/latex/contrib/litetable/doc/litetable-hk.tex b/macros/latex/contrib/litetable/doc/litetable-hk.tex
new file mode 100644
index 0000000000..6f48cc6fd1
--- /dev/null
+++ b/macros/latex/contrib/litetable/doc/litetable-hk.tex
@@ -0,0 +1,143 @@
+\documentclass[letterpaper]{l3doc}
+
+\hypersetup{urlcolor = teal, filecolor = violet}
+\usepackage[mono = false]{libertine}
+\usepackage{pdfpages,hologo,framed}
+\hologoFontSetup{general = \sffamily}
+\FrameSep = 0pt
+\usepackage[fontset = none]{ctex}
+\setCJKmainfont[BoldFont = *-Bold]{LXGW WenKai}
+\setCJKsansfont[BoldFont = *-Bold]{LXGW WenKai}
+\setCJKmonofont[BoldFont = *-Bold]{LXGW WenKai}
+\usepackage[os = mac]{menukeys}
+\AddToHook{env/function/before}{\vspace{-.3\baselineskip}}
+\AddToHook{env/syntax/after}{\vspace{-.2\baselineskip}}
+
+\title
+{
+ \bfseries\cls{litetable} 文檔類:多彩嘅課程表
+ \footnote{\url{https://github.com/xiamyphys/litetable}}
+}
+\author
+{
+ 夏明宇 \texttt{<\href{mailto:xiamyphys@gmail.com}{xiamyphys@gmail.com}>}
+ \thanks{\href{https://github.com/ljguo1020}{郭李軍}開發咗讀取 \meta{left} -> \meta{right} 型資料結構糢塊同低版本 \hologo{TeX} Live 相容糢塊.}
+}
+\date{Version 3.1B, \today}
+
+\begin{document}
+
+\maketitle
+
+\section{介紹}
+
+\cls{litetable} 文檔類提供咗個多彩嘅課程表設計,基於 \cls{article} 文檔類,由 \pkg{expl3} 和 \pkg{tikz} 構建. 相容發行版 \hologo{TeX} Live 2019 同更高版本,喺 \hologo{pdfLaTeX} 同 \hologo{XeLaTeX} 編譯器下均可正常運行. 本文檔系 \cls{litetable} 文檔類嘅用户手冊放,手冊放同時有\href{./litetable-en.pdf}{英文}同\href{./litetable-cn.pdf}{官話}版本\footnote{\href{https://qm.qq.com/q/RyssAhG4qy}{QQ Group: 760570712}}.
+
+\section{載入 \cls{litetable} 並建置課程表框架}
+
+同載入其他文檔類一樣,只令寫下
+
+\begin{framed}
+ \begin{verbatim}
+ \documentclass{litetable}
+ \end{verbatim}
+\end{framed}
+
+如需輸入中文,可自行載入 \pkg{ctex} 宏包並設置字型.
+
+\begin{function}{\timelist,\weeklist}
+ \begin{syntax}
+ \cs{timelist}\oarg{rows}\marg{time list} \cs{timelist}\marg{time list}\oarg{rows}
+ \cs{weeklist}\oarg{default weeks}\marg{week list} \cs{weeklist}\marg{week list}\oarg{default weeks}
+ \end{syntax}
+
+ 命令 \cs{timelist} 嘅可選參數可強制設定課程表嘅行數,命令 \cs{weeklist} 嘅可選參數可設定預設嘅星期數目並會喺每個課程盒子嘅右下角顯示. 兩個命令嘅強制參數均接受數組,可分別就系課程表嘅左側添加時間表、喺課程表嘅頂部添加對應寬度比例嘅工作日. 輸入數組嘅用例見Appendix \ref{mwe}.
+
+ 若命令 \cs{timelist} 中時間數組數字大於可選參數接受值,就多餘嘅時間數組將畀忽略,並返回一個警告. 如果只系課程表左側添加一部序號,令強制參數為空即可.
+\end{function}
+
+\begin{function}{\more}
+ \begin{syntax}
+ \cs{more}\marg{comment}
+ \end{syntax}
+
+ 此命令可喺頁面嘅嘅右下角添加備注.
+\end{function}
+
+\begin{function}{\maketable}
+ \begin{syntax}
+ \cs{maketable}\oarg{keyvals}\marg{title}\oarg{keyvals}
+ \end{syntax}
+
+ 此命令可建置一個空白嘅課程表框架,使喺命令 \cs{timelist},\cs{weeklist} 同 \cs{more} 後,並喺帶有 \cmd{[remember picture, overaly]} 選項嘅 \env{tikz} 環境中執行. 可選引數接受鍵 \keys{\cmdmac~color} \keys{\cmdmac~sem},可分別就喺設置課程表框架嘅背景色同喺頁面嘅嘅右度角添加學期,鍵 \keys{\cmdmac~color} 嘅默認值為 \cmd{gray}. 強制參數可設定標題.
+\end{function}
+
+\section{添加課程盒子}
+
+\begin{function}{\course}
+ \begin{syntax}
+ \cs{course}\oarg{keyvals}\marg{start number}\oarg{keyvals}\marg{end number}\oarg{keyvals}
+ \end{syntax}
+
+ \cs{course} 命令可喺當前工作日添加課程盒子,要喺命令 \cs{maketable} 後,並喺帶有 \cmd{remember picture,overaly} 選項嘅 \env{tikzpicture} 環境中執行.
+
+ 此命令嘅可選參數接受下列鍵:\keys{\cmdmac~color} \keys{\cmdmac~subject} \keys{\cmdmac~location} \keys{\cmdmac~teacher} \keys{\cmdmac~weeks}. 鍵 \keys{\cmdmac~color} 默認值為 \cmd{teal},鍵 \keys{\cmdmac~weeks} 默認值由命令 \cs{weeklist} 嘅可選參數決定. 第一個同第二個強制參數勒分別為課程嘅開始同結束序號. 命令嘅用例見Appendix \ref{mwe}.
+
+ \begin{itemize}
+ \item 若課程盒子高度得一格,即$\marg{start number} = \marg{end number}$,就鍵 \keys{\cmdmac~location} 同 \keys{\cmdmac~teacher} 嘅值將輸出喺同一行並以逗號 (,) 隔,鍵 \keys{\cmdmac~weeks} 嘅值將會隱藏.
+ \item 若鍵 \keys{\cmdmac~location} 同 \keys{\cmdmac~teacher} 均未賦值,就鍵 \keys{\cmdmac~subject} 嘅值將輸出喺課程盒子中心.
+ \item 超出課程表工作日範圍嘅課程盒子將唔會顯示,只會返回一條警告.
+ \end{itemize}
+\end{function}
+
+\begin{function}{\newday}
+ \begin{syntax}
+ \cs{newday}\oarg{integral value}
+ \end{syntax}
+
+ 此命令有一個可選參數,可令其後面添加嘅課程盒子後移 \meta{intergal value} 個工作日. 可選參數嘅默認值為\cmd{1},即後移\cmd{1}個工作日.
+\end{function}
+
+\clearpage
+\appendix
+
+\section{最小工作範例}\label{mwe}
+
+此MWE建置嘅課程表有13行但系得前12行标注时间,課程表顶部共有五个工作日,工作日之间嘅宽度比例为$4:5:4:6:5$,键 \keys{\cmdmac~weeks} 嘅默认值畀赋为 \cmd{Weeks 1 - 16}. 添加咗註解同兩個課程盒子.
+
+\begin{framed}
+ \begin{verbatim}
+ \documentclass{litetable}
+
+ \begin{document}
+
+ \timelist[13]
+ {
+ 08:05 -> 08:50, 08:55 -> 09:40, 10:00 -> 10:45, 10:50 -> 11:35,
+ 11:40 -> 12:25, 13:30 -> 14:15, 14:20 -> 15:05, 15:15 -> 16:00,
+ 16:05 -> 16:50, 18:30 -> 19:15, 19:20 -> 20:05, 20:10 -> 20:55
+ }
+ \weeklist[Weeks 1 - 16]
+ {
+ Mon -> 4, Tue -> 5, Wed -> 4, Thu -> 6, Fri -> 5
+ }
+ \more{Author: Mingyu Xia \& Lijun Guo}
+
+ \begin{tikzpicture}[remember picture, overlay]
+ \maketable
+ \course [ subject = Keep on {\TeX}ing ] {10} {11}
+ \newday
+ \course [ color = DarkSlateGray, subject = litetable,
+ location = Hong Kong, teacher = M.Y. Xia
+ ] {8} {8}
+ \end{tikzpicture}
+
+ \end{document}
+ \end{verbatim}
+\end{framed}
+
+\includepdf[pages = 1]{litetable-demo.pdf}
+
+\end{document}
+
+% End of file litetable-hk.tex
diff --git a/macros/latex/contrib/litetable/tex/litetable.cls b/macros/latex/contrib/litetable/tex/litetable.cls
index a52c0d5abd..556b766c28 100644
--- a/macros/latex/contrib/litetable/tex/litetable.cls
+++ b/macros/latex/contrib/litetable/tex/litetable.cls
@@ -1,314 +1,450 @@
-%% ************************************************************************************************************
-%% ****************************************************** *
-%% * This work may be distributed and/or modified under * * ***** * * *
-%% * the conditions of the LaTeX Project Public License * * ** * * *** * * *
-%% * http://www.latex-project.org/lppl.txt * * * ** * ***** * *
-%% * either version 1.3c of this license or any later * * * ** * ***** * *
-%% * version. * * * ** * * * * *
-%% ****************************************************** ***** ** * * *** * * *
-%% start of file `litetable.cls'. *
-%% Copyright 2023-2024 LiteLaTeX (xiamyphys@gmail.com) *
-%% available at https://github.com/xiamyphys/LiteTable *
-% !Mode:: "TeX:UTF-8" *
-%% ************************************************************************************************************
-\NeedsTeXFormat{LaTeX2e}
-\PassOptionsToPackage{quiet}{xeCJK}
-\PassOptionsToPackage{no-math}{fontspec}
-\ProvidesClass{litetable}[2024/03/03/ v2.4c LiteTable document class]
+%% ***********************************************************
+%% Copyright 2024 by M.Y. XIA <xiamyphys@gmail.com> *
+%% *
+%% This work may be distributed and/or modified under *
+%% the conditions of the LaTeX Project Public License *
+%% *
+%% http://www.latex-project.org/lppl.txt *
+%% *
+%% either version 1.3c of this license or any later *
+%% version. *
+%% *
+%% This work has the LPPL maintenance status `maintained'. *
+%% *
+% The Current Maintainers of this work are M.Y. XIA & L.J. Guo
+%% *
+%% This work consists of the files litetable.cls, *
+%% and README.md. *
+%% available at https://github.com/xiamyphys/litetable *
+%% ***********************************************************
+\RequirePackage{xparse}% For TeX Live 2019 - 2020 Compatibility
+\ProvidesExplClass{litetable}{2024/10/01}{3.1B}{Course Schedule}
-% ---------- 全局选项 ---------- %
-\RequirePackage{kvoptions}
-\RequirePackage{etoolbox}
-\SetupKeyvalOptions{family=LITE, prefix=LITE@, setkeys=\kvsetkeys}
+\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
+\ProcessOptions\relax
+\LoadClass{article}
-\DeclareStringOption[portiait]{direction}
-\DeclareVoidOption{portiait}{\kvsetkeys{LITE}{direction=portiait}}
-\DeclareVoidOption{landscape}{\kvsetkeys{LITE}{direction=landscape}}
+\pagestyle{empty}
+\RequirePackage{tikz}
-\DeclareStringOption[times]{font}
-\DeclareVoidOption{times}{\kvsetkeys{LITE}{font=times}}
-\DeclareVoidOption{libertinus}{\kvsetkeys{LITE}{font=libertinus}}
-
-\DeclareDefaultOption{\PassOptionsToClass{\CurrentOption}{standalone}}
-\ProcessKeyvalOptions*\relax
-
-\LoadClass[tikz]{standalone}
-
-% ---- 文本中的数字 & 字母设置 ---- %
-\RequirePackage{xeCJK}
-\setCJKfamilyfont{zhhei}{Heiti SC}
-\newcommand*\heiti{\CJKfamily{zhhei}}
-\ifdefstring{\LITE@font}{libertinus}{
-\RequirePackage{libertine}
-}{\relax}
-\ifdefstring{\LITE@font}{times}{
-\ifXeTeX
- \RequirePackage[no-math]{fontspec}
- \setmainfont{texgyretermes}[
- UprightFont = *-regular ,
- BoldFont = *-bold ,
- ItalicFont = *-italic ,
- BoldItalicFont = *-bolditalic ,
- Extension = .otf ,
- Scale = 1.0]
- \setsansfont{texgyreheros}[
- UprightFont = *-regular ,
- BoldFont = *-bold ,
- ItalicFont = *-italic ,
- BoldItalicFont = *-bolditalic ,
- Extension = .otf ,
- Scale = 0.9]
-\else
- \RequirePackage{newtxtext}
- \RequirePackage[scaled=.90]{helvet}
-\fi
-}{\relax}
+% Module for texlive 2021 and later (by @ljguo)
+\cs_if_exist:NF \clist_put_right:Ne
+{ \cs_generate_variant:Nn \clist_put_right:Nn { Ne } }
+\cs_if_exist:NF \clist_set:Ne
+{ \cs_generate_variant:Nn \clist_set:Nn { Ne } }
+\cs_if_exist:NT \clist_count:e
+{ \cs_generate_variant:Nn \clist_count:n { e } }
+\cs_if_exist:NF \exp_args:NNNe
+{
+ \cs_new:Npn \exp_args:NNNe #1#2#3#4
+ {
+ \exp_after:wN #1
+ \exp_after:wN #2
+ \exp_after:wN #3
+ \tex_expanded:D { {#4} }
+ }
+}
-% ---------- 色彩组合 ---------- %
-\definecolor{darkgray}{HTML}{727477} % 时间颜色
-\definecolor{darkergray}{HTML}{F1F3F5} % 深色块
-\definecolor{lightergray}{HTML}{FCFDFE} % 浅色块
-\definecolor{blackgray}{HTML}{1A1D21} % 序号颜色
-\definecolor{SEM}{HTML}{DEEAF8} % 学期按钮
-\definecolor{SEM*}{HTML}{3085F3}
-\definecolor{SEM**}{HTML}{007DC3}
-\pagecolor{lightergray}
-\definecolor{H1}{HTML}{74A7A2} % 深绿
-\definecolor{H1*}{HTML}{E9EEED}
-\definecolor{H1**}{HTML}{009787}
-\definecolor{H2}{HTML}{50C9BD} % 浅绿
-\definecolor{H2*}{HTML}{E1F3F2}
-\definecolor{H2**}{HTML}{009D8F}
-\definecolor{H3}{HTML}{86AFFE} % 深蓝
-\definecolor{H3*}{HTML}{DBE7FF}
-\definecolor{H3**}{HTML}{1663F5}
-\definecolor{H4}{HTML}{6BC0EB} % 浅蓝
-\definecolor{H4*}{HTML}{D8EFFA}
-\definecolor{H4**}{HTML}{0072B1}
-\definecolor{H5}{HTML}{D58DFB} % 深紫
-\definecolor{H5*}{HTML}{F2E3FB}
-\definecolor{H5**}{HTML}{A83FDF}
-\definecolor{H6}{HTML}{FF9393} % 浅紫
-\definecolor{H6*}{HTML}{FFDEDE}
-\definecolor{H6**}{HTML}{E73030}
-\definecolor{H7}{HTML}{FFA17D} % 深橙
-\definecolor{H7*}{HTML}{F5E1DA}
-\definecolor{H7**}{HTML}{E2612F}
-\definecolor{H8}{HTML}{F3C06A} % 浅橙
-\definecolor{H8*}{HTML}{F3EADB}
-\definecolor{H8**}{HTML}{E09B14}
-\definecolor{H9}{HTML}{D09966} % 棕色
-\definecolor{H9*}{HTML}{F2E0D0}
-\definecolor{H9**}{HTML}{C96F1C}
-\definecolor{W1}{HTML}{CCAD52}
-\definecolor{W2}{HTML}{8FCC52}
-\definecolor{W3}{HTML}{52CC70}
-\definecolor{W4}{HTML}{52CCCC}
-\definecolor{W5}{HTML}{5270CC}
-\definecolor{W6}{HTML}{8F52CC}
-\definecolor{W7}{HTML}{CC52AD}
+% Module for left -> right data structure (by @ljguo)
+\cs_new_protected_nopar:Npn \__litetable_get_left:nN #1#2
+{
+ \group_begin:
+ \seq_set_split:Nnn \l__litetable_tmpa_seq { -> } { #1 }
+ \exp_args:NNNe \group_end: \tl_set:Nn #2
+ { \seq_item:Nn \l__litetable_tmpa_seq { 1 } }
+}
+\cs_new_protected_nopar:Npn \__litetable_get_right:nN #1#2
+{
+ \group_begin:
+ \seq_set_split:Nnn \l__litetable_tmpa_seq { -> } { #1 }
+ \exp_args:NNNe \group_end: \tl_set:Nn #2
+ { \seq_item:Nn \l__litetable_tmpa_seq { 2 } }
+}
+\cs_generate_variant:Nn \__litetable_get_left:nN { e }
+\cs_generate_variant:Nn \__litetable_get_right:nN { e }
-\usetikzlibrary{calc}
-\ifdefstring{\LITE@direction}{portiait}{
- \def\pagewidth{8.5 in}
- \def\pageheight{-11 in}
- \def\rotatepage{
- \def\pagewidth{11 in}
- \def\pageheight{-8.5 in}
+\int_new:N \l__time_num_int
+\dim_new:N \l__time_vunit_dim
+\cs_new_protected:Npn \litetable_msg_new:nn #1#2
+{ \msg_new:nnn { litetable} { #1 } { #2 } }
+\cs_new_protected:Npn \litetable_msg_warning:n #1
+{ \msg_warning:nn { litetable } { #1 } }
+\litetable_msg_new:nn { timelist }
+{ \exp_not:N \timelist~extra~time~group(s)~were~ignored }
+\cs_new_protected_nopar:Npn \litetable_timelist:nn #1#2
+{
+ \clist_set:Nn \l__litetable_timelist_clist { #2 }
+ \tl_if_empty:nTF { #1 }
+ {
+ \int_set:Nn \l__time_num_int
+ {
+ \clist_count:N \l__litetable_timelist_clist
+ }
+ }
+ {
+ \int_set:Nn \l__time_num_int { #1 }
+ \int_compare:nNnTF { #1 } <
+ { \clist_count:N \l__litetable_timelist_clist }
+ {
+ \int_set:Nn \l__time_num_int
+ {
+ \clist_count:N \l__litetable_timelist_clist
+ }
+ \litetable_msg_warning:n { timelist }
+ } { \int_set:Nn \l__time_num_int { #1 } }
}
- \def\rerotatepage{
- \def\pagewidth{8.5 in}
- \def\pageheight{-11 in}
+ \dim_set:Nn \l__time_vunit_dim
+ {
+ \fp_eval:n {1/(2\l__time_num_int+3.5)}\paperheight
}
-}{\relax}
+}
+\NewDocumentCommand \timelist { O{} m O{} }
+{ \litetable_timelist:nn { #1#3 } { #2 } }
-\ifdefstring{\LITE@direction}{landscape}{
- \def\pagewidth{11 in}
- \def\pageheight{-8.5 in}
- \def\rotatepage{
- \def\pagewidth{8.5 in}
- \def\pageheight{-11 in}
+\clist_new:N \l__week_ratio_clist
+\clist_new:N \l__week_accum_clist
+\int_new:N \l__week_num_int
+\dim_new:N \l__week_hunit_dim
+\cs_new_protected_nopar:Npn \litetable_weeklist:nn #1#2
+{
+ \tl_set:Nn \l__default_weeks_tl { #1 }
+ \clist_set:Nn \l__litetable_weeklist_clist { #2 }
+ \int_step_inline:nn
+ {
+ \clist_count:N \l__litetable_weeklist_clist
}
- \def\rerotatepage{
- \def\pagewidth{11 in}
- \def\pageheight{-8.5 in}
+ {
+ \__litetable_get_right:eN
+ {
+ \clist_item:Nn \l__litetable_weeklist_clist {##1}
+ } \l__litetable_tmpb_tl
+ \clist_put_right:Ne \l__week_ratio_clist
+ {
+ \l__litetable_tmpb_tl
+ }
}
-}{\relax}
-
-\ExplSyntaxOn % 数组
-% 1. Set up arrays
-\def\definearray#1#2
- {
- \seq_clear_new:c { l__litetable_array_#1_seq }
- \seq_set_split:cnn { l__litetable_array_#1_seq } { ; } { #2 }
- }
-
-\cs_generate_variant:Nn \seq_set_split:Nnn { c }
-
-% 2. Define commands to work with arrays
-\NewExpandableDocumentCommand{\arraycount}{ o m }
- {
- \IfNoValueTF { #1 }
- {
- \litetable_array_count_full:n { #2 }
- }
- {
- \litetable_array_count_item:nn { #2 } { #1 }
- }
- }
-
-\cs_new:Nn \litetable_array_count_item:nn
- {
- \clist_count:e { \seq_item:cn { l__litetable_array_#1_seq } { #2 } }
- }
+ \int_step_inline:nn
+ {
+ \clist_count:N \l__litetable_weeklist_clist
+ }
+ {
+ \clist_clear:N \l__week_accumtmp_clist
+ \int_step_inline:nn { ##1 }
+ {
+ \clist_put_right:Ne \l__week_accumtmp_clist
+ {
+ \clist_item:Nn \l__week_ratio_clist { ####1 }
+ }
+ }
+ \clist_put_right:Ne \l__week_accum_clist
+ {
+ \int_eval:n { \clist_use:Nn \l__week_accumtmp_clist { + } }
+ }
+ }
+ \int_set:Nn \l__week_num_int
+ {
+ \clist_item:Nn \l__week_accum_clist
+ {
+ \clist_count:N \l__litetable_weeklist_clist
+ }
+ }
+ \dim_set:Nn \l__week_hunit_dim
+ {
+ \fp_eval:n {1/\l__week_num_int*14/15}\paperwidth
+ }
+}
+\NewDocumentCommand \weeklist { O{} m O{} }
+{ \litetable_weeklist:nn { #1#3 } { #2 } }
-\NewExpandableDocumentCommand{\arrayitem}{ m m m }
- {
- \clist_item:en { \seq_item:cn { l__litetable_array_#1_seq } { #2 } } { #3 }
- }
+\NewDocumentCommand \more { m }
+{ \tl_set:Nn \l__litetable_comment_tl { #1 } }
-\ExplSyntaxOff
+\int_new:N \l__litetable_week_day_int
+\int_set:Nn \l__litetable_week_day_int {1}
+\NewDocumentCommand \newday { O {1} }
+{ \int_add:Nn \l__litetable_week_day_int { #1 } }
-\NewDocumentCommand{\timelist}{ o m }
+\keys_define:nn { litetable / frame }
{
- \gdef\@timelist{#2}
- \definearray{timelist}{#2}
- \IfNoValueTF{#1}{
- \ifnum \arraycount[2]{timelist}<\arraycount[1]{timelist}
- \def\@classnum{\arraycount[1]{timelist}}
- \else
- \def\@classnum{\arraycount[2]{timelist}}
- \fi
- }{\def\@classnum{#1}}
-}
-\ifcsname @timelist\endcsname
- \relax
- \else
- \def\@classnum{12}
-\fi
-\def\weeklist#1{
- \gdef\@weeklist{#1}
- \definearray{weeklist}{#1}
+ sem.tl_set:N = \l__bg_sem_tl,
+ color.tl_set:N = \l__bg_color_tl,
+ color.initial:n = gray,
}
-\gdef\@weeknum{\arraycount[1]{weeklist}}
-
-\RequirePackage{fontawesome5}
-\RequirePackage[hidelinks]{hyperref}
-\newcounter{number}
-\tikzset{
- hyperlink node/.style={
- alias=sourcenode,
- append after command={
- let \p1 = (sourcenode.north west),
- \p2 = (sourcenode.south east),
- \n1 = {\x2-\x1}, \n2 = {\y1-\y2} in
- node [inner sep=0pt, outer sep=auto, anchor=north west,at=(\p1)]
- {\Acrobatmenu{#1}{\XeTeXLinkBox{\phantom{\rule{\n1}{\n2}}}}}
- }
+\cs_new_protected_nopar:Npn \litetable_maketable:nn #1
+{
+ % Darker Block at top
+ \fill [ \l__bg_color_tl!5 ] (current~page.north~west)
+ rectangle + (\paperwidth,-1.5\l__time_vunit_dim)
+ node [ midway, black, font = \huge\bfseries ] {#1};
+ \tl_if_empty:NF { \l__bg_sem_tl }% Semester
+ {
+ \node [ shift = {(-.02\paperwidth,-.75\l__time_vunit_dim)},
+ left, rectangle, fill = DarkBlue!10,
+ text = DarkBlue!60, inner~sep = 2ex,
+ rounded~corners = 8pt, font = \large
+ ] at (current~page.north~east)
+ {\ensuremath\rightleftharpoons\ \l__bg_sem_tl};
}
-}
-\NewDocumentCommand{\makeframe}{ o m }{
- \draw [lightergray] (0,0) rectangle (\pagewidth,\pageheight);
- \fill [fill=darkergray] (0,0) rectangle (\pagewidth,{1.5*\pageheight/(2*\@classnum+3.5)});% 顶部深灰色块
- \node at (.5*\pagewidth,{.75*\pageheight/(2*\@classnum+3.5)}) {\huge\bfseries\sffamily #2}; % 标题
- \IfNoValueF{#1}{
- \node [outer sep=auto,hyperlink node=NextPage,left,rectangle,fill=SEM,text=SEM*,draw=none,inner sep=1.75ex,rounded corners=6pt] at (.98*\pagewidth,{.75*\pageheight/(2*\@classnum+3.5)}) {\large\sffamily\;$\rightleftharpoons$~#1\;}; % 学期
+ % Darker Blocks
+ \int_step_inline:nnnn {0} {2} {\l__time_num_int}
+ {
+ \filldraw [ fill = \l__bg_color_tl!5, draw = gray,
+ thick, densely~dashed, line~cap = round
+ ]
+ ([shift = {(-.4pt,\fp_eval:n {-2*##1-2.5}\l__time_vunit_dim)}]
+ current~page.north~west) rectangle +
+ ({\paperwidth+.8pt},-2\l__time_vunit_dim);
}
-
- \ifodd\@classnum
- \foreach \a in {2,4,...,\@classnum,\@classnum+2}
- \fill [fill=darkergray,yshift=(2*\a-1.5)*\pageheight/(2*\@classnum+3.5)] (0,0) rectangle (\pagewidth,{2*\pageheight/(2*\@classnum+3.5)}); % 中间深灰色块(循环)
- \else
- \foreach \a in {2,4,...,\@classnum}
- \fill [fill=darkergray,yshift=(2*\a-1.5)*\pageheight/(2*\@classnum+3.5)] (0,0) rectangle (\pagewidth,{2*\pageheight/(2*\@classnum+3.5)}); % 中间深灰色块(循环)
- \fill [fill=darkergray,yshift=(2.5+2*\@classnum)*\pageheight/(2*\@classnum+3.5)] (0,0) rectangle (\pagewidth,{\pageheight/(2*\@classnum+3.5)}); % 底部深灰色块
- \fi
- \foreach \a in {0,1,2,...,\@classnum}
- \draw [densely dashed,gray!75,yshift=(2.5+2*\a)*\pageheight/(2*\@classnum+3.5)] (0,0)--(\pagewidth,0); % 分割虚线
-
- % 时间标注
- \setcounter{number}{0}
- \ifcsempty{@timelist}{
- \foreach \a in {1,2,...,\@classnum}
+ % Classes numbering
+ \clist_if_empty:NTF {\l__litetable_timelist_clist}
+ {
+ \int_step_inline:nn {\l__time_num_int}
{
- \node [yshift=(1.5+2*\a)*\pageheight/(2*\@classnum+3.5)] at(\pagewidth/32,0)
- {\bfseries\large\color{blackgray}\texttt{\refstepcounter{number}\thenumber}};
+ \node [ shift = {(\paperwidth/30,{\fp_eval:n {
+ -2*##1-1.5}\l__time_vunit_dim})
+ }, darkgray!80, font = \large\ttfamily\bfseries
+ ] at (current~page.north~west) {##1};
}
- }{
- \foreach \x in {1,2,...,\@classnum}
+ }
+ {
+ \int_step_inline:nn {\l__time_num_int}
+ {
+ \node [ shift = {(\paperwidth/30,\fp_eval:n {
+ -2*##1-1}\l__time_vunit_dim)
+ }, darkgray!80, font = \large\ttfamily\bfseries
+ ] at (current~page.north~west) {##1};
+ }
+ % Classes time
+ \int_step_inline:nn
+ {
+ \clist_count:N \l__litetable_timelist_clist
+ }
+ {
+ \__litetable_get_left:eN
+ {
+ \clist_item:Nn \l__litetable_timelist_clist {##1}
+ } \l__litetable_tmpa_tl
+ \__litetable_get_right:eN
{
- \node [yshift=(2*\x+.9)*\pageheight/(2*\@classnum+3.5)] at (\pagewidth/32,0)
- {\bfseries\color{blackgray}\texttt{\refstepcounter{number}\thenumber}};
- \node[yshift=(2*\x+1.55)*\pageheight/(2*\@classnum+3.5)] at (\pagewidth/32,0)
- {\color{darkgray}\texttt{\arrayitem{timelist}{1}{\x}}};
- \node[yshift=(2*\x+2.1)*\pageheight/(2*\@classnum+3.5)] at (\pagewidth/32,0)
- {\color{darkgray}\texttt{\arrayitem{timelist}{2}{\x}}};
+ \clist_item:Nn \l__litetable_timelist_clist {##1}
+ } \l__litetable_tmpb_tl
+ \node [ shift = {(\paperwidth/30,\fp_eval:n {
+ -1.9-2*##1}\l__time_vunit_dim)
+ }, gray, font = \ttfamily ,align = center
+ ] at (current~page.north~west)
+ {\l__litetable_tmpa_tl\\\l__litetable_tmpb_tl};
}
}
-
- % 星期标注
- \foreach \a in {1,2,...,\@weeknum}
- \node [xshift=\pagewidth/16] at ({.5*(\arrayitem{weeklist}{2}{\a}+\arrayitem{weeklist}{2}{\a+1})*15*\pagewidth/16},{2*\pageheight/(2*\@classnum+3.5)})
- {\arrayitem{weeklist}{1}{\a}};
-
- \ifcsname @sticker\endcsname
- \node [opacity=.3,above left,yshift=(1.5+2*\@classnum)*\pageheight/(2*\@classnum+3.5),inner sep=0pt,outer sep=auto,scale=15] at (\pagewidth,{\pageheight/(2*\@classnum+3.5)}) {\includegraphics[width=\dimeval{\pagewidth/16/\@weeknum}]{\@sticker}};\fi
+ % Weekdays
+ \int_step_inline:nn
+ {
+ \clist_count:N \l__litetable_weeklist_clist
+ }
+ {
+ \__litetable_get_left:eN
+ {
+ \clist_item:Nn \l__litetable_weeklist_clist {##1}
+ } \l__litetable_tmpa_tl
+ \node [ font = \large\bfseries,
+ shift = {(\fp_eval:n {
+ (\clist_item:Nn \l__week_accum_clist {##1}
+ -\clist_item:Nn \l__week_ratio_clist {##1}/2)/
+ \l__week_num_int*14/15+1/15}\paperwidth,
+ -2\l__time_vunit_dim)}
+ ] at (current~page.north~west) { \l__litetable_tmpa_tl };
+ }
+ % Comment
+ \tl_if_empty:NF \l__litetable_comment_tl
+ {
+ \node [ yshift = .5\l__time_vunit_dim,
+ left = 1ex, darkgray, font = \small\bfseries
+ ] at (current~page.south~east)
+ { \l__litetable_comment_tl };
+ }
+ \tl_gclear:N \l__litetable_comment_tl
}
-
-\newcounter{weekday}
-\def\newday{\addtocounter{weekday}{1}}
-\AtEndEnvironment{tikzpicture}{\setcounter{weekday}{0}}
-\def\sticker#1{\gdef\@sticker{#1}}
-\def\corner#1{\gdef\@corner{#1}}
-\def\weeks#1{\gdef\@weeks{#1}}
-
-\NewDocumentCommand{\course}{O{H1} m m m m m O{\@weeks}}
+\NewDocumentCommand \maketable { O{} m O{} }
{
- \ifcsname @corner\endcsname
- \tikzset{corner/.style={rounded corners=\@corner}}
- \else
- \tikzset{corner/.style={}}
- \fi
- \fill [#1,corner,
- yshift=(2*(#2-1))*\pageheight/(2*\@classnum+3.5),
- xshift=\pagewidth/16]
- ({\arrayitem{weeklist}{2}{\theweekday+1}*15*\pagewidth/16},{2.5*\pageheight/(2*\@classnum+3.5)}) rectangle ++
- ({(\arrayitem{weeklist}{2}{\theweekday+2}-\arrayitem{weeklist}{2}{\theweekday+1})*15*\pagewidth/16},{(2+2*(#3-#2))*\pageheight/(2*\@classnum+3.5)}); % frame
-
- \fill [#1*,
- yshift=(2*(#2-1)+.5)*\pageheight/(2*\@classnum+3.5),
- xshift=\pagewidth/16]
- ({\arrayitem{weeklist}{2}{\theweekday+1}*15*\pagewidth/16},{2.5*\pageheight/(2*\@classnum+3.5)}) --++
- ({(\arrayitem{weeklist}{2}{\theweekday+2}-\arrayitem{weeklist}{2}{\theweekday+1})*15*\pagewidth/16},0)
- { [corner] --++ (0,{(1.5+2*(#3-#2))*\pageheight/(2*\@classnum+3.5)}) --++
- ({(-\arrayitem{weeklist}{2}{\theweekday+2}+\arrayitem{weeklist}{2}{\theweekday+1})*15*\pagewidth/16},0)} -- cycle; % content
-
- \node [#1**,yshift=(#2+#3-1.25)*\pageheight/(2*\@classnum+3.5),
- xshift=\pagewidth/16] at
- ({.5*(\arrayitem{weeklist}{2}{\theweekday+1}+\arrayitem{weeklist}{2}{\theweekday+2})*15*\pagewidth/16},{2.5*\pageheight/(2*\@classnum+3.5)})
- {\heiti\large\bfseries #4}; % course
-
- \node [#1**,above,
- yshift=(#2+#3-.2)*\pageheight/(2*\@classnum+3.5),
- xshift=\pagewidth/16] at
- ({.5*(\arrayitem{weeklist}{2}{\theweekday+1}+\arrayitem{weeklist}{2}{\theweekday+2})*15*\pagewidth/16},{2.5*\pageheight/(2*\@classnum+3.5)})
- {\heiti\bfseries\small #5}; % location
-
- \node [#1**,below,
- yshift=(#2+#3-.2)*\pageheight/(2*\@classnum+3.5),
- xshift=\pagewidth/16] at
- ({.5*(\arrayitem{weeklist}{2}{\theweekday+1}+\arrayitem{weeklist}{2}{\theweekday+2})*15*\pagewidth/16},{2.5*\pageheight/(2*\@classnum+3.5)})
- {\heiti\bfseries\small #6}; % teacher
+ \group_begin:
+ \keys_set:nn { litetable / frame } { #1#3 }
+ \litetable_maketable:nn { #2 }
+ \group_end:
+}
- \ifcsname @weeks\endcsname
- \node [#1**,above left,
- yshift=2*#3*\pageheight/(2*\@classnum+3.5),
- xshift=\pagewidth/16] at
- ({\arrayitem{weeklist}{2}{\theweekday+2}*15*\pagewidth/16},{2.5*\pageheight/(2*\@classnum+3.5)})
- {\heiti\footnotesize #7};
- \fi % weeks
+\keys_define:nn { litetable / course }
+{
+ color.tl_set:N = \l__course_color_tl,
+ color.initial:n = teal,
+ subject.tl_set:N = \l__course_subject_tl,
+ teacher.tl_set:N = \l__course_teacher_tl,
+ location.tl_set:N = \l__course_location_tl,
+ weeks.tl_set:N = \l__default_weeks_tl,
+ weeks.initial:n = \l__default_weeks_tl,
}
+\dim_new:N \l__course_infoshift_dim
+\cs_new_protected_nopar:Npn \__litetable_course_box_aux:nn #1#2
+{
+ % Course box fg
+ \begin{scope}
+ \clip [ preaction = {draw, ultra~thick, \l__course_color_tl!60},
+ preaction = {fill, \l__course_color_tl!10},
+ rounded~corners = 8pt ]
+ ([shift = {(
+ \fp_eval:n
+ {
+ \clist_item:Nn \l__week_accum_clist
+ {\l__litetable_week_day_int}-
+ \clist_item:Nn \l__week_ratio_clist
+ {\l__litetable_week_day_int}
+ }\l__week_hunit_dim+\paperwidth/15+1.2pt,
+ \fp_eval:n {-.5-2*#1}\l__time_vunit_dim-1.2pt)
+ }]current~page.north~west) rectangle + (
+ \clist_item:Nn \l__week_ratio_clist {\l__litetable_week_day_int}
+ \l__week_hunit_dim-2.4pt,
+ \fp_eval:n {2*(#1-#2-1)}\l__time_vunit_dim+2.4pt);
+ % Course box bg
+ \fill [ \l__course_color_tl!60 ]
+ ([shift = {(
+ \fp_eval:n {
+ \clist_item:Nn \l__week_accum_clist
+ {\l__litetable_week_day_int}-
+ \clist_item:Nn \l__week_ratio_clist
+ {\l__litetable_week_day_int}
+ }\l__week_hunit_dim+\paperwidth/15,
+ \fp_eval:n {-.5-2*#1}\l__time_vunit_dim)
+ }]current~page.north~west) rectangle + (
+ \clist_item:Nn \l__week_ratio_clist{\l__litetable_week_day_int}
+ \l__week_hunit_dim,-.5\l__time_vunit_dim);
+ \end{scope}
+ % Course info
+ \tl_if_eq:NNTF {#1} {#2}% Single-unit height course box
+ {
+ \bool_if:nTF
+ {
+ \tl_if_empty_p:N \l__course_location_tl &&
+ \tl_if_empty_p:N \l__course_teacher_tl
+ }
+ {\tl_set:Nn \l_shortcourse_anchor_tl { }}
+ {\tl_set:Nn \l_shortcourse_anchor_tl { above }}
+ \cs_if_exist:NT {\l__course_subject_tl }
+ {
+ \node [ shift = {(\fp_eval:n {
+ \clist_item:Nn \l__week_accum_clist
+ {\l__litetable_week_day_int}-
+ \clist_item:Nn \l__week_ratio_clist
+ {\l__litetable_week_day_int}/2
+ }\l__week_hunit_dim+\paperwidth/15,
+ \fp_eval:n {-1.75-#1-#2}\l__time_vunit_dim)},
+ \l_shortcourse_anchor_tl, \l__course_color_tl!60,
+ align = center, font = \large\bfseries
+ ] at (current~page.north~west)
+ { \l__course_subject_tl };
+ }
+ \bool_if:nTF
+ {
+ !\tl_if_empty_p:N \l__course_location_tl &&
+ !\tl_if_empty_p:N \l__course_teacher_tl
+ }
+ {\tl_set:Nn \l_shortcourse_sep_tl { ,~ }}
+ {\tl_set:Nn \l_shortcourse_sep_tl { }}
+ \node [ shift = {(\fp_eval:n {
+ \clist_item:Nn \l__week_accum_clist
+ {\l__litetable_week_day_int}-
+ \clist_item:Nn \l__week_ratio_clist
+ {\l__litetable_week_day_int}/2
+ }\l__week_hunit_dim+\paperwidth/15,
+ \fp_eval:n {-1.75-#1-#2}\l__time_vunit_dim)},
+ below, \l__course_color_tl!60, align = center
+ ] at (current~page.north~west)
+ {
+ \tl_if_exist:NT { \l__course_location_tl }
+ { \l__course_location_tl }
+ \l_shortcourse_sep_tl
+ \tl_if_exist:NT { \l__course_teacher_tl }
+ { \l__course_teacher_tl }
+ };
+ }
+ {
+ \bool_if:nTF% Multiply-unit height course box
+ {
+ \tl_if_empty_p:N \l__course_location_tl &&
+ \tl_if_empty_p:N \l__course_teacher_tl
+ }
+ {
+ \tl_set:Nn \l_course_anchor_tl {}
+ \dim_set:Nn \l__course_infoshift_dim { 0pt }
+ }
+ {
+ \tl_set:Nn \l_course_anchor_tl { above }
+ \dim_set:Nn \l__course_infoshift_dim { \l__time_vunit_dim/8 }
+ }
+ \cs_if_exist:NT { \l__course_subject_tl }
+ {
+ \node [ font = \large\bfseries, \l_course_anchor_tl,
+ shift = {(\fp_eval:n {
+ \clist_item:Nn \l__week_accum_clist
+ {\l__litetable_week_day_int}-
+ \clist_item:Nn \l__week_ratio_clist
+ {\l__litetable_week_day_int }/2
+ }\l__week_hunit_dim+\paperwidth/15,
+ \fp_eval:n {-1.5-#1-#2}\l__time_vunit_dim)},
+ yshift = \l__course_infoshift_dim,
+ \l__course_color_tl!60, align = center,
+ ] at (current~page.north~west)
+ { \l__course_subject_tl };
+ }
+ \bool_if:nTF
+ {
+ !\tl_if_empty_p:N \l__course_location_tl &&
+ !\tl_if_empty_p:N \l__course_teacher_tl
+ }
+ {
+ \tl_set:Nn \l_courseinfo_sep_tl { \\ }
+ }
+ {
+ \tl_set:Nn \l_courseinfo_sep_tl { }
+ }
+ \node [ below, \l__course_color_tl!60, align = center,
+ shift = {(\fp_eval:n {
+ \clist_item:Nn \l__week_accum_clist
+ {\l__litetable_week_day_int}-
+ \clist_item:Nn \l__week_ratio_clist
+ {\l__litetable_week_day_int}/2
+ }\l__week_hunit_dim+\paperwidth/15,
+ \fp_eval:n {-1.625-#1-#2}\l__time_vunit_dim
+ )}] at (current~page.north~west)
+ {
+ \tl_if_exist:NT { \l__course_location_tl }
+ { \l__course_location_tl }
+ \l_courseinfo_sep_tl
+ \tl_if_exist:NT { \l__course_teacher_tl }
+ { \l__course_teacher_tl }
+ };
+ \node [ above~left, \l__course_color_tl!60, outer~sep = .5ex,
+ shift = {(
+ \clist_item:Nn \l__week_accum_clist
+ {\l__litetable_week_day_int}
+ \l__week_hunit_dim+\paperwidth/15,
+ \fp_eval:n {-2.5-2*#2}\l__time_vunit_dim
+ )}] at (current~page.north~west) { \l__default_weeks_tl };
+ }
+}
+\litetable_msg_new:nn { course }
+{ \exp_not:N \course~box(s)~exceed~workdays~were~ignored }
+\NewDocumentCommand \course { O{} m O{} m O{} }
+{
+ \group_begin:
+ \int_compare:nNnTF {\l__litetable_week_day_int-1} <
+ {\clist_count:N \l__litetable_weeklist_clist}
+ {
+ \keys_set:nn { litetable / course } { #1#3#5 }
+ \__litetable_course_box_aux:nn { #2 } { #4 }
+ }{
+ \litetable_msg_warning:n { course }
+ }
+ \group_end:
+}
+
+\endinput
-\def\more#1{
- \node [xshift=-1em,yshift=(2.5+2*\@classnum)*\pageheight/(2*\@classnum+3.5),left] at (\pagewidth,{.5*\pageheight/(2*\@classnum+3.5)}){\small\bfseries\color{darkgray}#1};
-} \ No newline at end of file
+% End of file litetable.cls \ No newline at end of file
diff --git a/macros/latex/contrib/media9/ChangeLog b/macros/latex/contrib/media9/ChangeLog
index a0a11296e1..a6b0524789 100644
--- a/macros/latex/contrib/media9/ChangeLog
+++ b/macros/latex/contrib/media9/ChangeLog
@@ -1,3 +1,25 @@
+2024-09-16
+ * v1.29 : media9.sty
+ * v0.59 : pdfbase.sty
+ * fix : missing AS entry in widget annot
+
+2024-09-13
+ * v1.28 : media9.sty
+ * v0.58 : pdfbase.sty
+ * fix : xetex/dvipdfmx-related `Missing number' error, fixes #19
+
+2024-09-02
+ * v1.27 : media9.sty
+ * v0.57 : pdfbase.sty
+ * fix : internal page counter
+
+2024-08-28
+ * v1.26 : media9.sty
+ * v0.56 : pdfbase.sty
+ * fix : dvi magnification by \mag internal TeX command (pdfbase.sty);
+ PDF/A compliance (fixes agrahn/ocgx2#21)
+ * new: hooks for adding actions at begin and end of text column
+
2022-08-04
* v1.25 : media9.sty
* v0.55 : pdfbase.sty
diff --git a/macros/latex/contrib/media9/doc/media9.pdf b/macros/latex/contrib/media9/doc/media9.pdf
index 2b85529903..9ca4fb4d4f 100644
--- a/macros/latex/contrib/media9/doc/media9.pdf
+++ b/macros/latex/contrib/media9/doc/media9.pdf
Binary files differ
diff --git a/macros/latex/contrib/media9/media9.sty b/macros/latex/contrib/media9/media9.sty
index c1e00febb4..1ee3b2e3f3 100644
--- a/macros/latex/contrib/media9/media9.sty
+++ b/macros/latex/contrib/media9/media9.sty
@@ -4,7 +4,6 @@
\bool_if:nTF{
\bool_lazy_and_p:nn {\cs_if_exist_p:N \pdfmanagement_if_active_p:} { \pdfmanagement_if_active_p: }
}{\@mix@testphasetrue}{
-%\input{media9.old.tex}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% media9.sty
@@ -39,8 +38,8 @@
%
% The Current Maintainer of this work is A. Grahn.
-\def\g@mix@date@tl{2022/08/04}
-\def\g@mix@version@tl{1.25}
+\def\g@mix@date@tl{2024/09/16}
+\def\g@mix@version@tl{1.29}
\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplPackage{media9}{\g@mix@date@tl}{\g@mix@version@tl}
@@ -52,7 +51,7 @@
% package options
\msg_set:nnnn{media9}{unknown~package~option}{Unknown~package~option~`#1'.}{
- Package option~'#1'~is~unknown;\\
+ Package~option~'#1'~is~unknown;\\
perhaps~it~is~spelled~incorrectly.
}
@@ -2446,8 +2445,8 @@
%
% The Current Maintainer of this work is A. Grahn.
-\def\g@mix@date@tl{2022/08/04}
-\def\g@mix@version@tl{1.25}
+\def\g@mix@date@tl{2024/09/16}
+\def\g@mix@version@tl{1.29}
\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplPackage{media9}{\g@mix@date@tl}{\g@mix@version@tl}
@@ -2459,7 +2458,7 @@
% package options
\msg_set:nnnn{media9}{unknown~package~option}{Unknown~package~option~`#1'.}{
- Package option~'#1'~is~unknown;\\
+ Package~option~'#1'~is~unknown;\\
perhaps~it~is~spelled~incorrectly.
}
diff --git a/macros/latex/contrib/media9/pdfbase.sty b/macros/latex/contrib/media9/pdfbase.sty
index 67ff708ad5..31b5e23dee 100644
--- a/macros/latex/contrib/media9/pdfbase.sty
+++ b/macros/latex/contrib/media9/pdfbase.sty
@@ -156,8 +156,8 @@
%
% The Current Maintainer of this work is A. Grahn.
-\def\g@pbs@date@tl{2022/08/04}
-\def\g@pbs@version@tl{0.55}
+\def\g@pbs@date@tl{2024/09/16}
+\def\g@pbs@version@tl{0.59}
\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplPackage{pdfbase}{\g@pbs@date@tl}{\g@pbs@version@tl}
@@ -168,7 +168,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\msg_gset:nnnn{pdfbase}{unknown~package~option}{Unknown~package~option~`#1'.}{
- Package option~'#1'~is~unknown;\\
+ Package~option~'#1'~is~unknown;\\
perhaps~it~is~spelled~incorrectly.
}
@@ -220,11 +220,11 @@
{dvipdfmx}{
\bool_gset_true:N\g_pbs_dvipdfmx_bool
\bool_gset_false:N\g_pbs_dvisvgm_bool
- }
+ }
{dvisvgm}{
\bool_gset_false:N\g_pbs_dvipdfmx_bool
\bool_gset_true:N\g_pbs_dvisvgm_bool
- }
+ }
}{ % otherwise let the L3 backend code decide
\str_case_e:nn{\c_sys_backend_str}{
{dvisvgm}{
@@ -270,6 +270,12 @@
\seq_new:N\g_pbs_bop_seq
\seq_new:N\g_pbs_eop_seq
+% column (boc, eoc) hooks
+\cs_new_protected:Nn\pbs_boc_action:n{\seq_gput_right:Nn\g_pbs_boc_seq{#1}}
+\cs_new_protected:Nn\pbs_eoc_action:n{\seq_gput_right:Nn\g_pbs_eoc_seq{#1}}
+\seq_new:N\g_pbs_boc_seq
+\seq_new:N\g_pbs_eoc_seq
+
\bool_new:N\g_pbs_lscape_bool %if we are inside landscape env
\bool_new:N\g_pbs_ocgbase_loaded_bool
\AtBeginDocument{
@@ -1105,8 +1111,8 @@
\mode_leave_vertical: % resources are managed automatically
%rescale box to fit within the papersize while distilling
\tl_gset:cx{scale_{pbs@obj\int_use:N\g_pbs_obj_int}}{\fp_eval:n{min(1.0,
- \dim_ratio:nn{\paperwidth}{\box_wd:N#5},
- \dim_ratio:nn{\paperheight}{\box_ht:N#5+\box_dp:N#5}
+ \dim_ratio:nn{\paperwidth}{\box_wd:N#5}/\the\mag*1000,
+ \dim_ratio:nn{\paperheight}{\box_ht:N#5+\box_dp:N#5}/\the\mag*1000
)}}
\box_scale:Nnn#5{
\tl_use:c{scale_{pbs@obj\int_use:N\g_pbs_obj_int}}
@@ -1302,33 +1308,38 @@
\tl_gput_left:Nx\g_pbs_fields_tl{#1\space}
}
-%modify output routine for output box insertions
-\bool_new:N\l_pbs_is_vertical_bool
+% modify page output routine for inserting actions at begin and end
\cs_set_eq:NN\pbs_outputpage_orig:\@outputpage
\cs_set_protected_nopar:Npn\@outputpage{
\int_gincr:N\g_pbs_page_int
- \box_if_vertical:cTF{@outputbox}{
- \bool_set_true:N\l_pbs_is_vertical_bool
- }{
- \bool_set_false:N\l_pbs_is_vertical_bool
- }
- \hbox_set:Nn\@outputbox{
+ \vbox_set:Nn\@outputbox{
%begin of page
- \hbox_overlap_right:n{\seq_map_inline:Nn\g_pbs_bop_seq{##1}}
+ \seq_map_inline:Nn\g_pbs_bop_seq{##1}
\box_use_drop:N\@outputbox
%end of page
- \hbox_overlap_right:n{\seq_map_inline:Nn\g_pbs_eop_seq{##1}}
- }
- \bool_if:NT\l_pbs_is_vertical_bool{
- \vbox_set:Nn\@outputbox{\box_use_drop:N\@outputbox}
+ \seq_map_inline:Nn\g_pbs_eop_seq{##1}
}
\pbs_outputpage_orig:
}
+% modify column making routine for inserting actions at begin and end
+\cs_set_eq:NN\pbs_makecol_orig:\@makecol
+\cs_set_protected_nopar:Npn\@makecol{
+ \vbox_set:Nn\@cclv{
+ %begin of column
+ \seq_map_inline:Nn\g_pbs_boc_seq{##1}
+ \vbox_unpack_drop:N\@cclv
+ %end of column
+ \seq_map_inline:Nn\g_pbs_eoc_seq{##1}
+ }
+ \pbs_makecol_orig:
+}
+
\AddToHook{shipout/foreground}{
%insert /Properties into current page's resources
\put(0,0){\pbs_insert_properties_entry:}
}
+
\AddToHook{shipout/background}{
% workaround for curious AR bug (pdf annot or link placed on
% OCG remains active although OCG is hidden)
@@ -1336,8 +1347,15 @@
% somewhere on the page.
\bool_if:NT\g_pbs_ocgbase_loaded_bool{
\put(1,-1){
+ \tl_if_exist:NF\g_pbs_blank_xform_tl{
+ \hbox_set:Nn\l_tmpa_box{\phantom{\rule{1pt}{1pt}}}
+ \pbs_pdfxform:nnnnn{0}{1}{}{}{\l_tmpa_box}
+ \tl_const:Ne\g_pbs_blank_xform_tl{\pbs_pdflastxform:}
+ }
\pbs_pdfannot:nnnn{3bp}{\c_zero_dim}{3bp}{
- /Ff~65537/FT/Btn/Subtype/Widget
+ /Ff~65537/FT/Btn/Subtype/Widget/F~4
+ /A~<</S/ResetForm>>% to make pdf.js happy
+ /AP~<</N~<</On~\g_pbs_blank_xform_tl>>>>/AS/On
/T~(pbs@ARFix@\int_use:N\g_pbs_page_int)
}
}
@@ -1435,8 +1453,8 @@
% `fstream', then
% {stream attributes as PDF key-value dictionary}{file name}
%
-% if #3 && #1 are both empty, an object reference will be reserved for later
-% use as #1
+% if #3 && #1 are both empty, an object reference will be reserved for
+% later use as #1
%
% \pbs_pdflastobj:
% inserts object ID of PDF object created/processed during most recent call
@@ -1471,9 +1489,9 @@
% --------
%
% \pbs_pdfxform:nnnnn
-% #1: add pgf/tikz resources (transparency, shading)? (0|1) %dvipdfmx/xetex
+% #1: add pgf/tikz resources (transparency, shading)? (0|1); dvipdfmx/xetex
% #2: write immediately to PDF? (0|1); eg 1 for appearances; pdftex/luatex
-% #3: additional resources %all BUT dvips
+% #3: additional resources; all BUT dvips
% #4: additional dictionary entries
% #5: savebox number
% creates PDF Form XObject from savebox content
@@ -1539,8 +1557,8 @@
%
% The Current Maintainer of this work is A. Grahn.
-\def\g@pbs@date@tl{2022/08/04}
-\def\g@pbs@version@tl{0.55}
+\def\g@pbs@date@tl{2024/09/16}
+\def\g@pbs@version@tl{0.59}
\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplPackage{pdfbase}{\g@pbs@date@tl}{\g@pbs@version@tl}
@@ -1551,7 +1569,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\msg_gset:nnnn{pdfbase}{unknown~package~option}{Unknown~package~option~`#1'.}{
- Package option~'#1'~is~unknown;\\
+ Package~option~'#1'~is~unknown;\\
perhaps~it~is~spelled~incorrectly.
}
@@ -1603,11 +1621,11 @@
{dvipdfmx}{
\bool_gset_true:N\g_pbs_dvipdfmx_bool
\bool_gset_false:N\g_pbs_dvisvgm_bool
- }
+ }
{dvisvgm}{
\bool_gset_false:N\g_pbs_dvipdfmx_bool
\bool_gset_true:N\g_pbs_dvisvgm_bool
- }
+ }
}{ % otherwise let the L3 backend code decide
\str_case_e:nn{\c_sys_backend_str}{
{dvisvgm}{
@@ -1653,8 +1671,16 @@
\seq_new:N\g_pbs_bop_seq
\seq_new:N\g_pbs_eop_seq
-\bool_new:N\g_pbs_lscape_bool %if we are inside landscape env
+% column (boc, eoc) hooks
+\cs_new_protected:Nn\pbs_boc_action:n{\seq_gput_right:Nn\g_pbs_boc_seq{#1}}
+\cs_new_protected:Nn\pbs_eoc_action:n{\seq_gput_right:Nn\g_pbs_eoc_seq{#1}}
+\seq_new:N\g_pbs_boc_seq
+\seq_new:N\g_pbs_eoc_seq
+
\bool_new:N\g_pbs_ocgbase_loaded_bool
+\AddToHook{package/ocgbase/after}{\bool_gset_true:N\g_pbs_ocgbase_loaded_bool}
+
+\bool_new:N\g_pbs_lscape_bool %if we are inside landscape env
\AtBeginDocument{
\iow_now:Nx\@mainaux{
\token_to_str:N\providecommand\token_to_str:N\pbs@newkey[2]{}
@@ -1666,7 +1692,6 @@
\tl_put_right:Nn\landscape{\bool_gset_true:N\g_pbs_lscape_bool}
\tl_put_left:Nn\endlandscape{\bool_gset_false:N\g_pbs_lscape_bool}
}
- \@ifpackageloaded{ocgbase}{\bool_gset_true:N\g_pbs_ocgbase_loaded_bool}{}
}
% writing to core objects in the PDF, using the new pdfmanagement interface
@@ -1851,7 +1876,9 @@
\xsb_addto_props:n{/rm@oc\int_use:N\g_pbs_oc_int\space#2}
\int_gincr:N\g_pbs_oc_int
}{
- \pdf_bdcobject:nx{#1}{\tl_use:c{g_pbs_objname_#2_tl}}
+ \tl_if_exist:cT{g_pbs_objname_#2_tl}{
+ \exp_args:Nne\pdf_bdcobject:nn{#1}{\tl_use:c{g_pbs_objname_#2_tl}}
+ }
}
}
@@ -1868,9 +1895,7 @@
%pgf + transparency related settings
\bool_new:N\g_pbs_pgfloaded_bool
\bool_gset_false:N\g_pbs_pgfloaded_bool
- \AtBeginDocument{
- \@ifpackageloaded{pgf}{\bool_gset_true:N\g_pbs_pgfloaded_bool}{}
- }
+ \AddToHook{package/pgf/after}{\bool_gset_true:N\g_pbs_pgfloaded_bool}
\int_new:N\g_pbs_obj_int %object ID
\bool_if:NTF\g_pbs_dvipdfmx_bool{ %dvipdfmx/XeTeX
\AtBeginDocument{
@@ -2042,7 +2067,9 @@
}
\cs_new_protected_nopar:Nn\pbs_pdfbdc:nn{
- \pdf_bdcobject:nx{#1}{\tl_use:c{g_pbs_objname_#2_tl}}
+ \tl_if_exist:cT{g_pbs_objname_#2_tl}{
+ \exp_args:Nne\pdf_bdcobject:nn{#1}{\tl_use:c{g_pbs_objname_#2_tl}}
+ }
}
}{
\bool_if:NTF\g_pbs_dvisvgm_bool{
@@ -2436,8 +2463,8 @@
\mode_leave_vertical: % resources are managed automatically
%rescale box to fit within the papersize while distilling
\tl_gset:cx{scale_{pbs@obj\int_use:N\g_pbs_obj_int}}{\fp_eval:n{min(1.0,
- \dim_ratio:nn{\paperwidth}{\box_wd:N#5},
- \dim_ratio:nn{\paperheight}{\box_ht:N#5+\box_dp:N#5}
+ \dim_ratio:nn{\paperwidth}{\box_wd:N#5}/\the\mag*1000,
+ \dim_ratio:nn{\paperheight}{\box_ht:N#5+\box_dp:N#5}/\the\mag*1000
)}}
\box_scale:Nnn#5{
\tl_use:c{scale_{pbs@obj\int_use:N\g_pbs_obj_int}}
@@ -2602,7 +2629,6 @@
}
}
}
-\cs_generate_variant:Nn\pdf_bdcobject:nn{nx}
\cs_new_eq:NN\pbs_pdfemc:\pdf_emc:
\cs_new_nopar:Nn\pbs_pdflastobj:{\g_pbs_pdflastobj_tl}
@@ -2610,29 +2636,33 @@
\cs_new_nopar:Nn\pbs_pdflastxform:{\g_pbs_pdflastxform_tl}
\cs_new_nopar:Nn\pbs_pdflastximage:{\g_pbs_pdflastximage_tl}
-%modify output routine for output box insertions
-\bool_new:N\l_pbs_is_vertical_bool
+% modify page output routine for inserting actions at begin and end
\cs_set_eq:NN\pbs_outputpage_orig:\@outputpage
\cs_set_protected_nopar:Npn\@outputpage{
\int_gincr:N\g_pbs_page_int
- \box_if_vertical:cTF{@outputbox}{
- \bool_set_true:N\l_pbs_is_vertical_bool
- }{
- \bool_set_false:N\l_pbs_is_vertical_bool
- }
- \hbox_set:Nn\@outputbox{
+ \vbox_set:Nn\@outputbox{
%begin of page
- \hbox_overlap_right:n{\seq_map_inline:Nn\g_pbs_bop_seq{##1}}
+ \seq_map_inline:Nn\g_pbs_bop_seq{##1}
\box_use_drop:N\@outputbox
%end of page
- \hbox_overlap_right:n{\seq_map_inline:Nn\g_pbs_eop_seq{##1}}
- }
- \bool_if:NT\l_pbs_is_vertical_bool{
- \vbox_set:Nn\@outputbox{\box_use_drop:N\@outputbox}
+ \seq_map_inline:Nn\g_pbs_eop_seq{##1}
}
\pbs_outputpage_orig:
}
+% modify column making routine for inserting actions at begin and end
+\cs_set_eq:NN\pbs_makecol_orig:\@makecol
+\cs_set_protected_nopar:Npn\@makecol{
+ \vbox_set:Nn\@cclv{
+ %begin of column
+ \seq_map_inline:Nn\g_pbs_boc_seq{##1}
+ \vbox_unpack_drop:N\@cclv
+ %end of column
+ \seq_map_inline:Nn\g_pbs_eoc_seq{##1}
+ }
+ \pbs_makecol_orig:
+}
+
\AddToHook{shipout/background}{
% workaround for curious AR bug (pdf annot or link placed on
% OCG remains active although OCG is hidden)
@@ -2640,8 +2670,14 @@
% somewhere on the page.
\bool_if:NT\g_pbs_ocgbase_loaded_bool{
\put(1,-1){
+ \tl_if_exist:NF\g_pbs_blank_xform_tl{
+ \hbox_set:Nn\l_tmpa_box{\phantom{\rule{1pt}{1pt}}}
+ \pbs_pdfxform:nnnnn{0}{1}{}{}{\l_tmpa_box}
+ \tl_const:Ne\g_pbs_blank_xform_tl{\pbs_pdflastxform:}
+ }
\pbs_pdfannot:nnnn{3bp}{\c_zero_dim}{3bp}{
- /Ff~65537/FT/Btn/Subtype/Widget
+ /Ff~65537/FT/Btn/Subtype/Widget/F~4
+ /AP~<</N~<</On~\g_pbs_blank_xform_tl>>>>/AS/On
/T~(pbs@ARFix@\int_use:N\g_pbs_page_int)
}
}
diff --git a/macros/latex/contrib/minted/CHANGELOG_LATEXMINTED_PYTHON_PACKAGE.md b/macros/latex/contrib/minted/CHANGELOG_LATEXMINTED_PYTHON_PACKAGE.md
new file mode 100644
index 0000000000..1051bcdb83
--- /dev/null
+++ b/macros/latex/contrib/minted/CHANGELOG_LATEXMINTED_PYTHON_PACKAGE.md
@@ -0,0 +1,6 @@
+# Changelog: `latexminted` — Python library for LaTeX minted package
+
+
+## v0.1.0 (2024-09-22)
+
+* Initial release.
diff --git a/macros/latex/contrib/minted/CHANGELOG_MINTED_LATEX_PACKAGE.md b/macros/latex/contrib/minted/CHANGELOG_MINTED_LATEX_PACKAGE.md
new file mode 100644
index 0000000000..308c7adf10
--- /dev/null
+++ b/macros/latex/contrib/minted/CHANGELOG_MINTED_LATEX_PACKAGE.md
@@ -0,0 +1,918 @@
+# Changelog — minted LaTeX package
+
+
+## v3.0.0 (2024/09/22)
+
+* Backward compatibility: The new `minted2` package provides the features of
+ `minted` v2.9, the final release before v3. No additional v2 releases are
+ planned; no changes to the `minted2` package are expected.
+
+* `minted` v3 is a complete rewrite from v2.9. `minted` v3 includes
+ significant changes from `minted` v2 on the LaTeX side, and also uses a new
+ `minted`-specific Python executable called `latexminted` to perform syntax
+ highlighting. This executable is specifically designed to meet the
+ security requirements for restricted shell escape programs. Once it has
+ passed a security review and is accepted by TeX distributions, it will be
+ possible to highlight code without `-shell-escape` and its attendant
+ security vulnerabilities.
+
+ Syntax highlighting is still performed with Pygments, but the `pygmentize`
+ executable included with Pygments is no longer used.
+
+* Installing the `minted` package now also installs the `latexminted` Python
+ executable and all required Python libraries, including Pygments, within
+ your TeX distribution. These require Python >= 3.8. If the default Python
+ version on `PATH` is < 3.8, then the `latexminted` Python executable will
+ attempt to locate a more recent version and run itself with that version in
+ a subprocess.
+
+ Manually installing Python libraries is only necessary if you want to use
+ plugin packages for Pygments. In that case, install the `latexminted`
+ Python package in a Python installation. This automatically installs
+ `latex2pydata`, `latexrestricted`, and Pygments as dependencies.
+ `latexminted` is available from the
+ [Python Package Index (PyPI)](https://pypi.org/project/latexminted/). Then
+ install plugin packages for Pygments within the same Python installation.
+
+* The new `latexminted` Python executable is designed to be compatible with
+ the security requirements for restricted shell escape, so that in the
+ future TeX distributions can enable `latexminted` without requiring
+ `-shell-escape`. It is possible to benefit from these enhanced security
+ capabilities immediately and avoid the need for `-shell-escape`.
+
+ - TeX Live: Copy the variable `shell_escape_commands` from the
+ distribution `texmf.cnf` (typically something like
+ `<tex_distro>/texmf-dist/web2c/texmf.cnf`) into the user `texmf.cnf`
+ (typically something like `<tex_distro>/texmf.cnf`), and then add
+ `latexminted` to the end of the `shell_escape_commands` list. The
+ location of the `texmf.cnf` files can be determined by running
+ `kpsewhich -all texmf.cnf`.
+
+ - MiKTeX: Add a line `AllowedShellCommands[] = latexminted` to the
+ existing list of allowed commands in `miktex.ini`. You may want to
+ modify the user-scoped configuration instead of the system-wide
+ configuration. See the
+ [MiKTeX documentation](https://docs.miktex.org/manual/miktex.ini.html)
+ for more details, particularly `initexmf --edit-config-file <file>`.
+
+* Errors and warnings that occur within Python are now reported as `minted`
+ package errors and warnings within LaTeX in nearly all cases. It should no
+ longer be necessary to look through the compile log for Python errors and
+ warnings. A temp file `*.errlog.minted` containing Python traceback
+ information is created in some cases when errors cannot be fully reported
+ within LaTeX or more details may be needed.
+
+* [`latex2pydata`](https://github.com/gpoore/latex2pydata) is now required
+ for passing data from LaTeX to Python and then processing it within Python.
+ This consists of a LaTeX package, available from
+ [CTAN](https://ctan.org/pkg/latex2pydata), and a Python package, available
+ from [PyPI](https://pypi.org/project/latex2pydata/). The LaTeX package can
+ typically be installed with your TeX distribution's package manager. The
+ Python package is automatically installed within your TeX distribution when
+ `minted` is installed.
+
+* On the LaTeX side, all syntax highlighting settings are now serialized in
+ Python literal format using `latex2pydata` and then saved to a temp file,
+ which is loaded on the Python side. Settings are no longer passed to the
+ Python side using command-line arguments. Temp files for passing data to
+ Python are now named using MD5 hashes, instead of using a sanitized version
+ of document `\jobname`. This eliminates an entire class of security issues
+ and bugs related to escaping and quoting command-line arguments (#180,
+ #276, #298, #322, #338, #354). It also eliminates bugs related to
+ processing settings as a sequence of command-line options, since
+ `pygmentize` accumulates some options that are used multiple times rather
+ than overwriting earlier values with later values (#258, #337).
+
+* Options are now handled with `pgfkeys` and `pgfopts`, instead of
+ `keyval` and `kvoptions`.
+
+* Temporary files are no longer created unless the cache needs to be updated
+ (or caching is disabled). All MD5 hashing of code now takes place in
+ memory instead of using one temp file per command/environment.
+
+ All temporary files are cleaned up automatically when compiling completes
+ without interruption. All temporary files now have names of the form
+ `_<hash>.<role>.minted`. `<hash>` is an MD5 hash of `\jobname` (if
+ `\jobname` is wrapped in double or single quotation marks, these are
+ stripped before the MD5 is computed). `<role>` is the role of the temp
+ file: `data` (data passed to Python), `config` (detected system
+ configuration), `style` (highlighting style definition), `highlight`
+ (highlighted code), or `message` (message passed back to LaTeX by Python
+ executable). `<role>` can also be `errlog` when the Python executable
+ encounters an unexpected error that it is not designed to report to the
+ LaTeX side; this is not automatically cleaned up. There are no more
+ `<jobname>.pyg` and `<jobname>.out.pyg` files.
+
+* Several package options are no longer supported and result in errors or
+ warnings.
+
+ - `finalizecache`: No longer needed. The `frozencache` package option now
+ uses the regular cache, rather than requiring a new, special cache
+ containing files with sequentially numbered names (#342). When using
+ `frozencache` with `-output-directory`, the `cachedir` package option
+ should be used to specify a full relative path to the cache (for
+ example, `cachedir=./<output_directory>/_minted`).
+
+ - `outputdir`: No longer needed (#268). TeX Live 2024+ saves a custom
+ output directory from `-output-directory` in the environment variable
+ [`TEXMF_OUTPUT_DIRECTORY`](https://tug.org/texinfohtml/web2c.html#Output-file-location).
+ The environment variable `TEXMF_OUTPUT_DIRECTORY` can be set manually in
+ other cases.
+
+ - `kpsewhich`: No longer needed. `kpsewhich` is now automatically
+ invoked as necessary by the `latexminted` Python executable in locating
+ files.
+
+ - `draft` and `final`: These no longer have any effect and result in a
+ warning. They will soon be removed altogether. Improvements in caching
+ have largely eliminated the overhead that `draft` mode was designed to
+ avoid, while new features that are implemented purely within Python have
+ made it impossible in some cases to typeset code using only LaTeX. The
+ new package options `placeholder` and `verbatim` offer alternatives when
+ maximum compilation speed is needed or the `latexminted` Python
+ executable is unavailable.
+
+* New package options:
+
+ - `debug`: Keep temp files from highlighting to aid in debugging. Also
+ write current file name and line number to log before `\input` of
+ highlighted code (#348).
+
+ - `highlightmode`: Determines when code is highlighted. The default is
+ `fastfirst`. If a cache for the document exists, then code is
+ highlighted immediately. If a cache for the document does not exist,
+ then typeset a placeholder instead of code and highlight all code at the
+ end of the document. This will require a second compile before code is
+ typeset, but because all code is highlighted at once, there is less
+ overhead and the total time required can be significantly less for
+ documents that include many code snippets. The alternatives are `fast`
+ (always highlight at end of document, requiring a second compile) and
+ `immediate` (always highlight immediately, so no second compile is
+ needed). `immediate` should be used when typesetting code in external
+ temp files that are overwritten during compilation.
+
+ When code is highlighted at the end of the document with `fast` or
+ `fastfirst`, any error and warning messages will refer to a location at
+ the end of the document rather than the original code location, since
+ highlighting occurred at the end of the document. In this case, messages
+ are supplemented with original LaTeX source file names and line numbers
+ to aid in debugging.
+
+ - `placeholder`: Instead of typesetting code, insert a placeholder. This
+ is enabled automatically when working with PGF/TikZ externalization.
+
+ - `verbatim`: Instead of highlighting code, attempt to typeset it verbatim
+ without using the `latexminted` Python executable. This is not
+ guaranteed to be an accurate representation of the code, since some
+ features such as `autogobble` require Python.
+
+* `bgcolor` now uses the new `bgcolor` option from `fvextra` v1.8, rather
+ than `snugshade*` from `framed`. This resolves incompatibilities between
+ `bgcolor` and `xleftmargin`/`xrightmargin` (#214), eliminates unneeded
+ whitespace before/after the background (#220), prevents text from
+ overflowing the background (#278), and provides uniform background height
+ for `\mintinline` (#397). Because `bgcolor` now introduces no additional
+ whitespace or padding, existing documents may require some modification.
+
+ Added new option `bgcolorpadding` for modifying padding in background color
+ regions. Added new option `bgcolorvphantom` for setting height of
+ background color in inline contexts.
+
+* Renamed package options `langlinenos` to `lexerlinenos` and
+ `inputlanglinenos` to `inputlexerlinenos`. The old names are still
+ supported.
+
+* The default cache directory name is now `_minted`. All files within a
+ directory now share the same cache, instead of having separate per-document
+ caches. The new `latexminted` Python executable improves cache management
+ so that a shared cache functions correctly. A cache file that is shared by
+ multiple documents will not be deleted if one document ceases to use the
+ file.
+
+ Document-specific caching as in `minted` v2 can be restored using the
+ package option `cachedir`. For example, for files whose names do not
+ contain spaces, simply use `cachedir=\detokenize{_minted-}\jobname`. For
+ files with names that do contain spaces, use a copy of `\jobname` in which
+ the wrapping quotation marks have been removed or replaced with other
+ characters and the spaces have been replaced with placeholders such as `_`.
+
+* Cache file names now take the form `<hash>_highlight.minted` and
+ `<style>_style.minted`. `<hash>` is a single MD5 hash of code and options,
+ when serialized in Python literal format. Cache file names no longer use
+ two concatenated MD5 hashes, one of code and one of options. The cache
+ directory will also contain files `_<hash>.index.minted`. These list all
+ cache files used by a given document. In this case, `<hash>` is the MD5
+ hash of the document's `\jobname` (if `\jobname` is wrapped in double or
+ single quotation marks, these are stripped before the MD5 is computed).
+
+* Highlighting style names must now match the regular expression
+ `^[0-9A-Za-z_-]+$`. This is checked on the LaTeX side.
+
+* `\inputminted` is redefined as robust and is usable in movable arguments.
+
+* `\newminted` now creates an environment that takes an optional argument
+ consisting of options, instead of taking no argument. It still creates a
+ starred `*` environment variant that takes a mandatory argument consisting
+ of options, but this is only retained for backward-compatibility purposes.
+
+* Improved fallback behavior in the event of errors. If code cannot be
+ highlighted, it is automatically typeset with a verbatim approximation if
+ possible and otherwise replaced by a placeholder. If a highlighting style
+ definition cannot be generated, it is automatically replaced with the
+ default style if available, and otherwise a built-in style with no syntax
+ highlighting is used.
+
+* File encoding changes:
+
+ - The new `latexminted` executable assumes that LaTeX output files are
+ UTF-8, and saves highlighted code as UTF-8. That is, LaTeX should be
+ configured so that everything is UTF-8.
+
+ - The `encoding` option now defaults to UTF-8. It is only used in decoding
+ files for `\inputminted` and commands based on it.
+
+ - The `outencoding` option is no longer supported.
+
+* Added new options for including ranges of code based on literal string
+ delimiters or regular expressions. These work with all commands and
+ environments, including `\inputminted`.
+
+ - `rangestartstring`: Select code starting with this string.
+
+ - `rangestartafterstring`: Select code starting immediately after this
+ string.
+
+ - `rangestopstring`: Select code ending with this string.
+
+ - `rangestopbeforestring`: Select code ending immediately before this
+ string.
+
+ - `rangeregex`: Select code that matches this regular expression.
+
+ - `rangeregexmatchnumber` [default=`1`]: If there are multiple
+ non-overlapping matches for `rangeregex`, this determines which is
+ used.
+
+ - `rangeregexdotall` [default=`false`]: `.` matches any character
+ including the newline.
+
+ - `rangeregexmultiline` [default=`false`]: `^` and `$` match at
+ internal newlines, not just at the start/end of the string.
+
+ If line numbers are displayed, they are based on the range of code that is
+ selected; code that is discarded in selecting the range is not considered
+ in calculating line numbers.
+
+ String values and regular expressions can be set using text with backslash
+ escapes, in a manner analogous to regular (non-raw) Python strings. Any
+ ASCII symbols and punctuation, including those that have special LaTeX
+ meaning, can be backslash escaped. For example, `rangeregex=\\\\.` is
+ processed like the Python string `"\\\\."`, becoming the literal text
+ `\\.`, which is then interpreted as the regular expression for a literal
+ backslash followed by any character. Alternatively, string values and
+ regular expressions can be set using a single macro that, when fully
+ expanded (`\edef`), gives the desired literal text. For example,
+ `\def\pattern{\detokenize{\\.}}` and then `rangeregex=\pattern` would be
+ equivalent to `rangeregex=\\\\.`.
+
+* There is now official support for custom lexers. Custom lexers that are
+ installed as Pygments [plugins](https://pygments.org/docs/plugins/) have
+ always been supported, since Pygments can find them automatically.
+ However, custom lexers in the form of `*.py` files in the document
+ directory have not officially been supported.
+
+ Custom lexers can be specified in place of builtin lexers. For example,
+ `\inputminted{lexer.py}{<file>}` or
+ `\inputminted{./path/lexer.py:LexerClass}{<file>}`.
+
+ Custom lexers in the form of `*.py` files are not automatically enabled,
+ since they are equivalent to arbitrary code execution and are thus a
+ significant security risk. To enable custom lexers, create a file
+ `.latexminted_config`. This can be in your home directory (as found by
+ Python's `pathlib.Path.home()`) or in `TEXMFHOME`; if this file is found in
+ both locations, settings from the TeX location overwrite settings from the
+ home directory. It is also possible to enable a `.latexminted_config` file
+ in your document directory; see the documentation for
+ `.latexminted_config`. This file must contain data in Python literal,
+ JSON, or TOML format. TOML requires Python >= 3.11. The data must contain
+ an entry equivalent to this Python data:
+ ```
+ {
+ "custom_lexers": {
+ "<lexer file name>": "<SHA-256 hash of lexer file>"
+ }
+ }
+ ```
+ `<lexer file name>` is just the name of the file, with no path or class
+ included. For example, for `./path/lexer.py:LexerClass` it would be just
+ `lexer.py`. Any number of file names and hashes can be provided.
+
+* Enhancements of existing options:
+
+ - `codetagify` now supports comma-delimited lists of strings, not just
+ space-delimited lists (#126).
+
+* New options:
+
+ - `envname`: Name of the environment that wraps typeset code. By default,
+ it is `Verbatim` in block contexts and `VerbEnv` in inline contexts.
+ This is compatible with `fancyvrb`'s `BVerbatim` (#281).
+
+ Implementation note: Code is actually wrapped a `MintedVerbatim`
+ environment, and then this is redefined to be equivalent to `envname`
+ (see the new option `literalenvname`).
+
+ - `literalenvname`: This is the name of the environment that literally
+ appears in highlighted code output as a wrapper around the code. By
+ default it is `MintedVerbatim`. This environment is redefined to be
+ equivalent to the current value of `envname`. There should be few if any
+ situations where modifying `literalenvname` rather than `envname` is
+ actually necessary.
+
+ - `literatecomment`: This is for compatibility with literate programming
+ formats, such as the `.dtx` format commonly used for writing LaTeX
+ packages. If all lines of code begin with `<literatecomment>`, then
+ `<literatecomment>` is removed from the beginning of all lines. For
+ example, for `.dtx`, `literatecomment=\%`.
+
+ - `listparameters`: Previously unsupported `fancyvrb` option (#256).
+
+ - `breakanywhereinlinestretch`: New `fvextra` option.
+
+* `gobble` is now applied to code before syntax highlighting and no longer
+ uses the Pygments `gobble` filter, which operates on the token stream
+ generated by a lexer. This makes `gobble` and `autogobble` behave in the
+ same manner. The Pygments `gobble` filter is still accessible via the new
+ option `gobblefilter` (#379).
+
+* Standard catcodes are now enforced in reading the optional argument of
+ environments that wrap Pygments output. This prevents issues with
+ `babel`'s `magyar` (#382).
+
+
+## v2.9 (2023/12/18)
+
+* This is expected to be the last release of `minted` v2.x. If so, it will
+ then become the new package `minted2` for backward compatibility.
+
+* Added new option `ignorelexererrors`. When lexer errors are shown in
+ highlighted output (default), they are typically displayed as red boxes
+ that surround the relevant text. When lexer errors are ignored, the
+ literal text that caused lexer errors is shown but there is no indication
+ that it caused errors (#374).
+
+* There is now a warning if `fvextra` version is less than 1.5.
+
+
+
+## v2.8 (2023/09/12)
+
+* Under non-Windows operating systems, detect executables with `command -v`
+ rather than `which` to provide better cross-platform support (#345).
+
+* Added new package option `inputlanglinenos`. This extends the existing
+ `langlinenos` to cover `\inputminted` as well (#361).
+
+* Improved and updated Pygments documentation (#339).
+
+* Improved `\mintinline` documentation to address packages that redefine
+ `\section` (#368).
+
+* Added support for `fvextra` options `breakafterinrun` and
+ `breakbeforeinrun` (#358). In `fvextra` version 1.5, `breakaftergroup`
+ and `breakbeforegroup` were renamed to `breakafterinrun` and
+ `breakbeforeinrun` to avoid naming ambiguity with new options. The old
+ options `breakaftergroup` and `breakbeforegroup` are no longer supported.
+
+* Added `DEPENDS.txt` (#331).
+
+* Removed unnecessary dependency on `calc` package (#313).
+
+* Added documentation in FAQ about copy and paste limitations (#302).
+
+* Added note on `text` lexer to documentation (#274).
+
+
+
+## v2.7 (2022/12/12)
+
+* Reimplemented `\mintinline` to use `fvextra`'s argument reading and
+ processing macros, and to use `fvextra`'s `\Verb` internally.
+ `\mintinline` now works with all line breaking options supported by
+ `fvextra`'s `\Verb`, including `breakanywhere` (#329, #340). It now
+ gives better results when used inside other commands, since it uses
+ `fvextra`'s retokenization macros. It is now compatible with `hyperref`
+ for PDF strings such as bookmarks.
+
+* Reimplemented `\newmintinline` based on new `\mintinline`.
+
+* Reimplemented `\mint` to use `fvextra`'s argument reading and processing
+ macros. It now gives better results when used inside other commands,
+ since it uses `fvextra`'s retokenization macros. Fixed a bug that caused
+ a continued paragraph after `\mint` to be indented (#218).
+
+* Reimplemented `\newmint` based on new `\mint`. Commands created with
+ `\newmint` can now use curly braces as delimiters, just like `\mint`
+ (#254).
+
+* Settings passed to `pygmentize` as command-line options are now quoted.
+ This prevents `escapeinside` characters from being interpreted as special
+ shell characters (#179, #262).
+
+* Fixed bug with `autogobble` that produced incorrect dedent when using
+ `lastline` with the lines beyond `lastline` having less indentation than
+ the selected range (#326).
+
+* Fixed unintended line breaks after hyphens under LuaTeX (#263).
+
+* Added warning to documentation of `\inputminted` regarding filenames
+ and shell command execution (#338).
+
+
+
+## v2.6 (2021/12/24)
+
+* `autogobble` automatically uses `python` or `python3` executables,
+ depending on availability, instead of requiring `python`. A custom
+ executable can be specified by redefining `\MintedPython` (#277, #287).
+
+* Fixed `autogobble` compatibility with `fancyvrb` 4.0+ (#315, #316).
+
+* Pygments style names may now contain arbitrary non-whitespace characters.
+ Previously, style names containing digits and some punctuation characters
+ were incompatible (#210, #294, #299, #317). Pygments macros are now only
+ defined just before use locally within `minted` commands and environments,
+ rather than globally. Pygments macros now always use a `\PYG` prefix
+ regardless of style, rather than a prefix of the form `\PYG<style>` (for
+ example, what was previously `\PYGdefault` is now simply `\PYG`).
+
+* Removed Python-based MD5 hashing for XeTeX, which was necessary before
+ XeTeX added `\mdfivesum` in 2017.
+
+* The default for `stripnl` is now `false`, so that original code is
+ preserved exactly by default (#198).
+
+* Added support for `fontencoding` option from `fvextra` (#208).
+
+* Added note to FAQ about getting `texi2pdf` to work with `minted` given
+ `texi2pdf`'s assumptions about temp files (#186).
+
+* Reimplemented `bgcolor` option to be compatible with `color` package.
+
+
+
+## v2.5 (2017/07/19)
+
+* The default placement for the `listing` float is now `tbp` instead of `h`,
+ to parallel `figure` and `table` and also avoid warnings caused by `h`
+ (#165). The documentation now contains information about changing default
+ placement. The `float` package is no longer loaded when the `newfloat`
+ package option is used.
+
+* Added support for `*nchars` options from `fvextra` v1.3 that allow setting
+ `breaklines`-related indentation in terms of a number of characters, rather
+ than as a fixed dimension.
+
+* Fixed incompatibility with `babel magyar` (#158).
+
+* Added support for `beamer` overlays with `beameroverlays` option (#155).
+
+* Comments in the Pygments LaTeX style files no longer appear as literal
+ text when `minted` is used in `.dtx` files (#161).
+
+* `autogobble` now works with package option `kpsewhich` (#151). Under
+ Windows, the `kpsewhich` option no longer requires PowerShell.
+
+* Fixed a bug that prevented `finalizecache` from working with `outputdir`
+ (#149).
+
+* Fixed a bug with `firstline` and `lastline` that prevented them from
+ working with the `minted` environment (#145).
+
+* Added note on `breqn` conflicts to FAQ (#163).
+
+
+
+## v2.4.1 (2016/10/31)
+
+* Single quotation marks in `\jobname` are now replaced with underscores in
+ `\minted@jobname` to prevent quoting errors (#137).
+
+* The `autogobble` option now takes `firstline` and `lastline` into account
+ (#130).
+
+* Fixed `numberblanklines`, which had been lost in the transition to v2.0+
+ (#135).
+
+
+
+## v2.4 (2016/07/20)
+
+* Line breaking and all associated options are now completely delegated to
+ `fvextra`.
+
+* Fixed a bug from v2.2 that could cause the first command or environment to
+ vanish when `cache=false` (related to work on `\MintedPygmentize`).
+
+
+
+## v2.3 (2016/07/14)
+
+* The `fvextra` package is now required. `fvextra` extends and patches
+ `fancyvrb`, and includes improved versions of `fancyvrb` extensions that
+ were formerly in `minted`.
+
+* As part of `fvextra`, the `upquote` package is always loaded. `fvextra`
+ brings the new option `curlyquotes`, which allows curly single quotation
+ marks instead of the literal backtick and typewriter single quotation mark
+ produced by `upquote`. This allows the default `upquote` behavior to be
+ disabled when desired.
+
+* Thanks to `fvextra`, the options `breakbefore`, `breakafter`, and
+ `breakanywhere` are now compatible with non-ASCII characters under
+ pdfTeX (#123).
+
+* Thanks to `fvextra`, `obeytabs` no longer causes lines in multi-line
+ comments or strings to vanish (#88), and is now compatible with
+ `breaklines` (#99). `obeytabs` will now always give correct results with
+ tabs used for indentation. However, tab stops are not guaranteed to be
+ correct for tabs in the midst of text.
+
+* `fvextra` brings the new options `space`, `spacecolor`, `tab`, and
+ `tabcolor` that allow these characters and their colors to be redefined
+ (#98). The tab may now be redefined to a flexible-width character such
+ as `\rightarrowfill`. The visible tab will now always be black by default,
+ instead of changing colors depending on whether it is part of indentation
+ for a multiline string or comment.
+
+* `fvextra` brings the new options `highlightcolor` and `highlightlines`,
+ which allow single lines or ranges of lines to be highlighted based on line
+ number (#124).
+
+* `fvextra` brings the new options `numberfirstline`, `stepnumberfromfirst`,
+ and `stepnumberoffsetvalues` that provide better control over line
+ numbering when `stepnumber` is not 1.
+
+* Fixed a bug from v2.2.2 that prevented `upquote` from working.
+
+
+
+## v2.2.2 (2016/06/21)
+
+* Fixed a bug introduced in v2.2 that prevented setting the Pygments style in
+ the preamble. Style definitions are now more compatible with using
+ `\MintedPygmentize` to call a custom `pygmentize`.
+
+
+
+## v2.2.1 (2016/06/15)
+
+* The `shellesc` package is loaded before `ifplatform` and other packages
+ that might invoke `\write18` (#112).
+
+* When caching is enabled, XeTeX uses the new `\mdfivesum` macro from TeX
+ Live 2016 to hash cache content, rather than using `\ShellEscape` with
+ Python to perform hashing.
+
+
+
+## v2.2 (2016/06/08)
+
+* All uses of `\ShellEscape` (`\write18`) no longer wrap file names and paths
+ with double quotes. This allows a cache directory to be specified relative
+ to a user's home directory, for example, `~/minted_cache`. `cachedir` and
+ `outputdir` paths containing spaces will now require explicit quoting of
+ the parts of the paths that contain spaces, since `minted` no longer
+ supplies quoting. See the updated documentation for examples (#89).
+
+* Added `breakbefore`, `breakbeforegroup`, `breakbeforesymbolpre`, and
+ `breakbeforesymbolpost`. These parallel `breakafter*`. It is possible to
+ use `breakbefore` and `breakafter` for the same character, so long as
+ `breakbeforegroup` and `breakaftergroup` have the same setting (#117).
+
+* Added package options `finalizecache` and `frozencache`. These allow the
+ cache to be prepared for (`finalizecache`) and then used (`frozencache`) in
+ an environment in which `-shell-escape`, Python, and/or Pygments are not
+ available. Note that this only works if `minted` content does not need to
+ be modified, and if no settings that depend on Pygments or Python need to
+ be changed (#113).
+
+* Style names containing hyphens and underscores (`paraiso-light`,
+ `paraiso-dark`, `algol_nu`) now work (#111).
+
+* The `shellesc` package is now loaded, when available, for compatibility
+ with LuaTeX 0.87+ (TeX Live 2016+, etc.). `\ShellEscape` is now used
+ everywhere instead of `\immediate\write18`. If `shellesc` is not available,
+ then a `\ShellEscape` macro is created. When `shellesc` is loaded, there
+ is a check for versions before v0.01c to patch a bug in v0.01b (present in
+ TeX Live 2015) (#112).
+
+* The `bgcolor` option now uses the `snugshade*` environment from the `framed`
+ package, so `bgcolor` is now compatible with page breaks. When `bgcolor`
+ is in use, immediately preceding text will no longer push the `minted`
+ environment into the margin, and there is now adequate spacing from
+ surrounding text (#121).
+
+* Added missing support for `fancyvrb`'s `labelposition` (#102).
+
+* Improved fix for TikZ externalization, thanks to Patrick Vogt (#73).
+
+* Fixed `breakautoindent`; it was disabled in version 2.1 due to a bug in
+ `breakanywhere`.
+
+* Properly fixed handling of `\MintedPygmentize` (#62).
+
+* Added note on incompatibility of `breaklines` and `obeytabs` options.
+ Trying to use these together will now result in a package error (#99).
+ Added note on issues with `obeytabs` and multiline comments (#88). Due to
+ the various `obeytabs` issues, the docs now discourage using `obeytabs`.
+
+* Added note to FAQ on `fancybox` and `fancyvrb` conflict (#87).
+
+* Added note to docs on the need for `\VerbatimEnvironment` in environment
+ definitions based on `minted` environments.
+
+
+
+## v2.1 (2015/09/09)
+
+* Changing the highlighting style now no longer involves re-highlighing
+ code. Style may be changed with almost no overhead.
+
+* Improved control of automatic line breaks. New option `breakanywhere`
+ allows line breaks anywhere when `breaklines=true`. The pre-break and
+ post-break symbols for these types of breaks may be set with
+ `breakanywheresymbolpre` and `breakanywheresymbolpost` (#79). New option
+ `breakafter` allows specifying characters after which line breaks are
+ allowed. Breaks between adjacent, identical characters may be controlled
+ with `breakaftergroup`. The pre-break and post-break symbols for these
+ types of breaks may be set with `breakaftersymbolpre` and
+ `breakaftersymbolpost`.
+
+* `breakbytoken` now only breaks lines between tokens that are separated by
+ spaces, matching the documentation. The new option `breakbytokenanywhere`
+ allows for breaking between tokens that are immediately adjacent. Fixed a
+ bug in `\mintinline` that produced a following linebreak when
+ `\mintinline` was the first thing in a paragraph and `breakbytoken` was
+ true (#77).
+
+* Fixed a bug in draft mode option handling for `\inputminted` (#75).
+
+* Fixed a bug with `\MintedPygmentize` when a custom `pygmentize` was
+ specified and there was no `pygmentize` on the default path (#62).
+
+* Added note to docs on caching large numbers of code blocks under OS X (#78).
+
+* Added discussion of current limitations of `texcomments` (#66) and
+ `escapeinside` (#70).
+
+* PGF/Ti*k*Z externalization is automatically detected and supported
+ (#73).
+
+* The package is now compatible with LaTeX files whose names contain spaces (#85).
+
+
+
+## v2.0 (2015/01/31)
+
+* Added the compatibility package `minted1`, which provides the `minted` 1.7
+ code. This may be loaded when 1.7 compatibility is required. This package
+ works with other packages that `\RequirePackage{minted}`, so long as it is
+ loaded first.
+
+* Moved all old `\changes` into `changelog`.
+
+
+
+## Development releases for 2.0 (2014-January 2015)
+
+* Caching is now on by default.
+
+* Fixed a bug that prevented compiling under Windows when file names
+ contained commas.
+
+* Added `breaksymbolleft`, `breaksymbolsepleft`,
+ `breaksymbolindentleft`, `breaksymbolright`, `breaksymbolsepright`,
+ and `breaksymbolindentright` options. `breaksymbol`,
+ `breaksymbolsep`, and `breaksymbolindent` are now aliases for the
+ correspondent `*left` options.
+
+* Added `kpsewhich` package option. This uses `kpsewhich` to locate
+ the files that are to be highlighted. This provides compatibility
+ with build tools like `texi2pdf` that function by modifying
+ `TEXINPUTS` (#25).
+
+* Fixed a bug that prevented `\inputminted` from working with `outputdir`.
+
+* Added informative error messages when Pygments output is missing.
+
+* Added `final` package option (opposite of `draft`).
+
+* Renamed the default cache directory to `_minted-<jobname>` (replaced
+ leading period with underscore). The leading period caused the cache
+ directory to be hidden on many systems, which was a potential source
+ of confusion.
+
+* `breaklines` and `breakbytoken` now work with `\mintinline` (#31).
+
+* `bgcolor` may now be set through `\setminted` and `\setmintedinline`.
+
+* When math is enabled via `texcomments`, `mathescape`, or
+ `escapeinside`, space characters now behave as in normal math by
+ vanishing, instead of appearing as literal spaces. Math need no
+ longer be specially formatted to avoid undesired spaces.
+
+* In default value of `\listoflistingscaption`, capitalized “Listings” so that
+ capitalization is consistent with default values for other lists
+ (figures, tables, algorithms, etc.).
+
+* Added `newfloat` package option that creates the `listing`
+ environment using `newfloat` rather than `float`, thus providing
+ better compatibility with the `caption` package (#12).
+
+* Added support for Pygments option `stripall`.
+
+* Added `breakbytoken` option that prevents `breaklines` from breaking
+ lines within Pygments tokens.
+
+* `\mintinline` uses a `\colorbox` when `bgcolor` is set, to give more
+ reasonable behavior (#57).
+
+* For PHP, `\mintinline` automatically begins with `startinline=true` (#23).
+
+* Fixed a bug that threw off line numbering in `minted` when
+ `langlinenos=false` and `firstnumber=last`. Fixed a bug in `\mintinline` that
+ threw off subsequent line numbering when `langlinenos=false` and
+ `firstnumber=last`.
+
+* Improved behavior of `\mint` and `\mintinline` in `draft` mode.
+
+* The `\mint` command now has the additional capability to take code
+ delimited by paired curly braces `{}`.
+
+* It is now possible to set options only for `\mintinline` using the new
+ `\setmintedinline` command. Inline options override options specified via
+ `\setminted`.
+
+* Completely rewrote option handling. `fancyvrb` options are now handled on the
+ LaTeX side directly, rather than being passed to Pygments and then
+ returned. This makes caching more efficient, since code is no longer
+ rehighlighted just because options changed.
+
+* Fixed buffer size error caused by using `cache` with a very large
+ number of files (#61).
+
+* Fixed `autogobble` bug that caused failure under some operating
+ systems.
+
+* Added support for `escapeinside` (requires Pygments 2.0+; #38).
+
+* Fixed issues with XeTeX and caching (#40).
+
+* The `upquote` package now works correctly with single quotes when
+ using Pygments 1.6+ (#34).
+
+* Fixed caching incompatibility with Linux and OS X under xelatex
+ (#18 and #42).
+
+* Fixed `autogobble` incompatibility with Linux and OS X.
+
+* `\mintinline` and derived commands are now robust, via `\newrobustcmd`
+ from `etoolbox`.
+
+* Unused styles are now cleaned up when caching.
+
+* Fixed a bug that could interfere with caching (#24).
+
+* Added `draft` package option (#39). This typesets all code using
+ `fancyvrb`; Pygments is not used. This trades syntax highlighting
+ for maximum speed in compiling.
+
+* Added automatic line breaking with `breaklines` and related options
+ (#1).
+
+* Fixed a bug with boolean options that needed a False argument to
+ cooperate with `\setminted` (#48).
+
+
+
+## v2.0-alpha3 (2013/12/21)
+
+* Added `autogobble` option. This sends code through Python's
+ `textwrap.dedent()` to remove common leading whitespace.
+
+* Added package option `cachedir`. This allows the directory in which
+ cached content is saved to be specified.
+
+* Added package option `outputdir`. This allows an output directory for
+ temporary files to be specified, so that the package can work with
+ LaTeX's `-output-directory` command-line option.
+
+* The `kvoptions` package is now required. It is needed to process
+ key-value package options, such as the new `cachedir` option.
+
+* Many small improvements, including better handling of paths under
+ Windows and improved key system.
+
+
+
+## v2.0-alpha2 (2013/08/21)
+
+* `\DeleteFile` now only deletes files if they do indeed exist. This
+ eliminates warning messages due to missing files.
+
+* Fixed a bug in the definition of `\DeleteFile` for non-Windows systems.
+
+* Added support for Pygments option `stripnl`.
+
+* Settings macros that were previously defined globally are now defined
+ locally, so that `\setminted` may be confined by `\begingroup...\endgroup`
+ as expected.
+
+* Macro definitions for a given style are now loaded only once per document,
+ rather than once per command/environment. This works even without caching.
+
+* A custom script/executable may now be substituted for `pygmentize` by
+ redefining `\MintedPygmentize`.
+
+
+
+## v2.0alpha (2013/07/30)
+
+* Added the package option `cache`. This significantly increases
+ compilation speed by caching old output. For example, compiling the
+ documentation is around 5x faster.
+
+* New inline command `\mintinline`. Custom versions can be created via
+ `\newmintinline`. The command works inside other commands (for example,
+ footnotes) in most situations, so long as the percent and hash
+ characters are avoided.
+
+* The new `\setminted` command allows options to be specified at the
+ document and language levels.
+
+* All extended characters (Unicode, etc.) supported by `inputenc` now
+ work under the pdfTeX engine. This involved using `\detokenize` on
+ everything prior to saving.
+
+* New package option `langlinenos` allows line numbering to pick up
+ where it left off for a given language when `firstnumber=last`.
+
+* New options, including `style`, `encoding`, `outencoding`,
+ `codetagify`, `keywordcase`, `texcomments` (same as `texcl`),
+ `python3` (for the `PythonConsoleLexer`), and `numbers`.
+
+* `\usemintedstyle` now takes an optional argument to specify the style for a
+ particular language, and works anywhere in the document.
+
+* `xcolor` is only loaded if `color` isn’t, preventing potential
+ package clashes.
+
+
+
+## v1.7 (2011/09/17)
+
+* Options for float placement added [2011/09/12]
+
+* Fixed `tabsize` option [2011/08/30]
+
+* More robust detection of the `-shell-escape` option [2011/01/21]
+
+* Added the `label` option [2011/01/04]
+
+* Installation instructions added [2010/03/16]
+
+* Minimal working example added [2010/03/16]
+
+* Added PHP-specific options [2010/03/14]
+
+* Removed unportable flag from Unix shell command [2010/02/16]
+
+
+## v1.6 (2010/01/31)
+
+* Added font-related options [2010/01/27]
+
+* Windows support added [2010/01/27]
+
+* Added command shortcuts [2010/01/22]
+
+* Simpler versioning scheme [2010/01/22]
+
+
+
+## v0.1.5 (2010/01/13)
+
+* Added `fillcolor` option [2010/01/10]
+
+* Added float support [2010/01/10]
+
+* Fixed `firstnumber` option [2010/01/10]
+
+* Removed `caption` option [2010/01/10]
+
+
+
+## v0.0.4 (2010/01/08)
+
+* Initial version [2010/01/08]
diff --git a/macros/latex/contrib/minted/DEPENDS.txt b/macros/latex/contrib/minted/DEPENDS.txt
index 5c39ebf2e9..9f4eafc4e1 100644
--- a/macros/latex/contrib/minted/DEPENDS.txt
+++ b/macros/latex/contrib/minted/DEPENDS.txt
@@ -1,15 +1,11 @@
catchfile
etoolbox
float
-framed
fvextra
-ifplatform
-ifthen
-keyval
-kvoptions
-lineno
+latex2pydata
newfloat
pdftexcmds
+pgfkeys
+pgfopts
shellesc
xcolor
-xstring
diff --git a/macros/latex/contrib/minted/Makefile b/macros/latex/contrib/minted/Makefile
deleted file mode 100644
index ae199e79d5..0000000000
--- a/macros/latex/contrib/minted/Makefile
+++ /dev/null
@@ -1,38 +0,0 @@
-TEXFLAGS = -e '$$pdflatex=q/pdflatex %O -shell-escape %S/' -pdf
-LATEXMK = latexmk
-
-PACKAGE = minted.dtx \
- minted.ins \
- minted.pdf \
- README \
- Makefile
-
-.PHONY: minted all doc dist clean cleanall
-
-minted: minted.sty
-
-doc: minted.pdf
-
-all: minted doc
-
-minted.sty: minted.ins minted.dtx
- tex minted.ins
-
-minted.pdf: minted.sty minted.gls minted.dtx
- $(LATEXMK) $(TEXFLAGS) minted.dtx
-
-minted.gls: minted.glo
- makeindex -s gglo.ist -o minted.gls minted.glo
-
-minted.glo: minted.dtx minted.sty
- $(LATEXMK) $(TEXFLAGS) minted.dtx
-
-dist: $(PACKAGE)
- @$(RM) minted.zip
- @zip minted-$(shell grep '^\\ProvidesPackage' < minted.sty | grep -o '\<v[[:digit:]]*\.[[:digit:]]*\>').zip $(PACKAGE)
-
-clean:
- @$(RM) *.aux *.log *.out *.toc *.fdb_latexmk *.ilg *.glo *.gls *.lol
-
-cleanall: clean
- @$(RM) minted.sty minted.zip
diff --git a/macros/latex/contrib/minted/README b/macros/latex/contrib/minted/README
index b2a13a8aff..c6c1222114 100644
--- a/macros/latex/contrib/minted/README
+++ b/macros/latex/contrib/minted/README
@@ -8,9 +8,7 @@ See the documentation (minted.pdf) for examples and instructions for
installation and usage.
This work may be distributed and/or modified under the conditions of the
-LaTeX Project Public License (LPPL), version 1.3 or later. Additionally,
-the project may be distributed under the terms of the 3-Clause ("New") BSD
-license.
+LaTeX Project Public License (LPPL), version 1.3c or later.
For suggestions, feature requests, and bug reports, please use the project's
GitHub site: https://github.com/gpoore/minted.
diff --git a/macros/latex/contrib/minted/latex2pydata-0.4.0-py3-none-any.whl b/macros/latex/contrib/minted/latex2pydata-0.4.0-py3-none-any.whl
new file mode 100644
index 0000000000..616cda2ad5
--- /dev/null
+++ b/macros/latex/contrib/minted/latex2pydata-0.4.0-py3-none-any.whl
Binary files differ
diff --git a/macros/latex/contrib/minted/latexminted-0.1.0-py3-none-any.whl b/macros/latex/contrib/minted/latexminted-0.1.0-py3-none-any.whl
new file mode 100644
index 0000000000..6dd704a64f
--- /dev/null
+++ b/macros/latex/contrib/minted/latexminted-0.1.0-py3-none-any.whl
Binary files differ
diff --git a/macros/latex/contrib/minted/latexminted.py b/macros/latex/contrib/minted/latexminted.py
new file mode 100644
index 0000000000..3c1584ea32
--- /dev/null
+++ b/macros/latex/contrib/minted/latexminted.py
@@ -0,0 +1,359 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2024, Geoffrey M. Poore
+# All rights reserved.
+#
+# Licensed under the LaTeX Project Public License version 1.3c:
+# https://www.latex-project.org/lppl.txt
+#
+
+
+'''
+This Python executable is intended for installation within a TeX distribution,
+along with Python wheels for the following Python packages:
+
+ * latexminted: https://pypi.org/project/latexminted/
+
+ * latexrestricted: https://pypi.org/project/latexrestricted/
+
+ * latex2pydata: https://pypi.org/project/latex2pydata/
+
+ * Pygments: https://pypi.org/project/Pygments/
+
+The combined executable plus wheels provide everything that is needed for the
+Python side of the minted LaTeX package. No additional Python libraries are
+required.
+
+The wheels require Python >= 3.8. If this executable is launched with an
+earlier Python version, then it will attempt to locate a more recent Python
+installation and run itself with that Python version in a subprocess. The
+search for more recent Python versions looks for executables of the form
+`python3.x` on PATH.
+
+If the latexminted Python package is installed separately, outside TeX, then
+it will create a separate `latexminted` executable as part of the installation
+process. That makes it possible to install latexminted and dependencies
+separately and then customize Pygments with additional packages that provide
+plugins. However, running that separate `latexminted` executable is not
+straightforward under Windows. Under Windows, if this executable finds a
+suitable `latexminted` executable elsewhere, outside a TeX installation, then
+this executable will run that separate `latexminted` executable in a
+subprocess and exit. There are two reasons for this approach:
+
+ 1. Under Windows with TeX Live, the default restricted shell escape can only
+ run executables such as `latexminted` that are part of the TeX
+ installation; the executable that runs is not the first executable on
+ PATH. That is part of TeX Live's security measures to prevent running
+ executables in the current working directory, which is typically writable
+ by LaTeX and is the first place Windows checks when searching for
+ executables. This script and the latexrestricted Python package enforce
+ equivalent security, but do so in a less restrictive manner by expanding
+ executable names into executable paths with Python's `shutil.which()` and
+ then comparing the result with locations writable by LaTeX.
+
+ 2. Under non-Windows operating systems, it is possible to modify PATH so that
+ the desired `latexminted` executable is first. Under Windows, the system
+ PATH is prepended to the user PATH, so a system-wide TeX installation will
+ prevent a user-installed `latexminted` executable from being accessible.
+
+Requirements for locating and running a separate `latexminted` executable
+under Windows:
+
+ * The separate executable must be the first `latexminted.exe` found on PATH,
+ or it must be the first `latexminted.exe` on PATH that is located under
+ the user home directory.
+
+ * The separate executable must be outside a TeX installation. There is a
+ check for a `tex.exe` executable in the same directory as
+ `latexminted.exe`. There is a check for the case-insensitive strings
+ "texlive", "miktex", and "tinytex" in the path to the `latexminted`
+ executable. With TeX Live, the path to the `latexminted` executable is
+ also compared to the environment variable `SELFAUTOLOC`.
+
+ * The separate executable must be outside the current working directory,
+ TEXMFOUTPUT, and TEXMF_OUTPUT_DIRECTORY.
+
+ * The current directory, TEXMFOUTPUT, and TEXMF_OUTPUT_DIRECTORY cannot be
+ subdirectories of the directory in which the executable is located.
+'''
+
+
+__version__ = '0.1.0'
+
+
+import os
+import pathlib
+import platform
+import shutil
+import subprocess
+import sys
+
+
+
+
+# This is an abbreviated variant of `AnyPath` from latexrestricted:
+# https://github.com/gpoore/latexrestricted/blob/main/latexrestricted/_anypath.py
+class Path(type(pathlib.Path())):
+ __slots__ = (
+ '_cache_key',
+ )
+
+ if sys.version_info[:2] < (3, 9):
+ def is_relative_to(self, other):
+ try:
+ self.relative_to(other)
+ return True
+ except ValueError:
+ return False
+
+ @property
+ def cache_key(self):
+ try:
+ return self._cache_key
+ except AttributeError:
+ self._cache_key = (type(self), self)
+ return self._cache_key
+
+ _resolved_set = set()
+
+ def resolve(self):
+ resolved = super().resolve()
+ self._resolved_set.add(resolved.cache_key)
+ return resolved
+
+ def is_resolved(self) -> bool:
+ return self.cache_key in self._resolved_set
+
+
+
+
+# Define function that determines whether subprocess executable paths are
+# permitted.
+prohibited_path_roots = set()
+prohibited_path_roots.add(Path.cwd())
+env_TEXMFOUTPUT = os.getenv('TEXMFOUTPUT')
+env_TEXMF_OUTPUT_DIRECTORY = os.getenv('TEXMF_OUTPUT_DIRECTORY')
+for env_var in (env_TEXMFOUTPUT, env_TEXMF_OUTPUT_DIRECTORY):
+ if env_var:
+ env_var_path = Path(env_var)
+ prohibited_path_roots.add(env_var_path)
+ prohibited_path_roots.add(env_var_path.resolve())
+
+def is_permitted_executable_path(executable_path, executable_path_resolved):
+ if not executable_path_resolved.is_resolved():
+ raise Exception('Second argument must be resolved path')
+ if any(e.is_relative_to(p) or p.is_relative_to(e)
+ for e in set([executable_path.parent, executable_path_resolved.parent])
+ for p in prohibited_path_roots):
+ return False
+ return True
+
+# TeX Live allows setting `TEXMFOUTPUT` in LaTeX configuration.
+# Retrieving that value with kpsewhich follows the approach in latexrestricted:
+# https://github.com/gpoore/latexrestricted/blob/main/latexrestricted/_latex_config.py
+env_SELFAUTOLOC = os.getenv('SELFAUTOLOC')
+env_TEXSYSTEM = os.getenv('TEXSYSTEM')
+if not env_TEXMFOUTPUT and env_SELFAUTOLOC and (not env_TEXSYSTEM or env_TEXSYSTEM.lower() != 'miktex'):
+ if platform.system() == 'Windows':
+ # Under Windows, shell escape executables will often be launched with
+ # the TeX Live `runscript.exe` executable wrapper. This overwrites
+ # `SELFAUTOLOC` from TeX with the location of the wrapper, so
+ # `SELFAUTOLOC` may not be correct.
+ which_tlmgr = shutil.which('tlmgr') # No `.exe`; likely `.bat`
+ if not which_tlmgr:
+ sys.exit('Failed to find TeX Live "tlmgr" executable on PATH')
+ which_tlmgr_resolved = Path(which_tlmgr).resolve()
+ texlive_bin_path = which_tlmgr_resolved.parent
+ # Make sure executable is *.exe, not *.bat or *.cmd:
+ # https://docs.python.org/3/library/subprocess.html#security-considerations
+ which_kpsewhich = shutil.which('kpsewhich.exe', path=str(texlive_bin_path))
+ if not which_kpsewhich:
+ sys.exit('Failed to find a TeX Live "tlmgr" executable with accompanying "kpsewhich" executable on PATH')
+ which_kpsewhich_path = Path(which_kpsewhich)
+ which_kpsewhich_resolved = which_kpsewhich_path.resolve()
+ if not texlive_bin_path == which_kpsewhich_resolved.parent:
+ sys.exit(' '.join([
+ '"tlmgr" executable from PATH resolved to "{}" '.format(which_tlmgr_resolved.as_posix()),
+ 'while "kpsewhich" resolved to "{}";'.format(which_kpsewhich_resolved.as_posix()),
+ '"tlmgr" and "kpsewhich" should be in the same location',
+ ]))
+ if not which_kpsewhich_resolved.name.lower().endswith('.exe'):
+ sys.exit(' '.join([
+ 'Executable "kpsewhich" resolved to "{}",'.format(which_kpsewhich_resolved.as_posix()),
+ 'but *.exe is required',
+ ]))
+ else:
+ which_kpsewhich = shutil.which('kpsewhich', path=env_SELFAUTOLOC)
+ if not which_kpsewhich:
+ sys.exit(' '.join([
+ 'Environment variable SELFAUTOLOC has value "{}",'.format(env_SELFAUTOLOC),
+ 'but a "kpsewhich" executable was not found at that location',
+ ]))
+ which_kpsewhich_path = Path(which_kpsewhich)
+ which_kpsewhich_resolved = which_kpsewhich_path.resolve()
+ if not is_permitted_executable_path(which_kpsewhich_path, which_kpsewhich_resolved):
+ # As in the latexrestricted case, this doesn't initially check for the
+ # TeX Live scenario where `TEXMFOUTPUT` is set in a `texmf.cnf` config
+ # file to a location that includes the `kpsewhich` executable. There
+ # isn't a good way to get the value of `TEXMFOUTPUT` without running
+ # `kpsewhich` in that case.
+ sys.exit(
+ 'Executable "kpsewhich" is located under the current directory, TEXMFOUTPUT, or '
+ 'TEXMF_OUTPUT_DIRECTORY, or one of these locations is under the same directory as the executable'
+ )
+ kpsewhich_cmd = [which_kpsewhich_resolved.as_posix(), '--var-value', 'TEXMFOUTPUT']
+ try:
+ kpsewhich_proc = subprocess.run(kpsewhich_cmd, shell=False, capture_output=True)
+ except PermissionError:
+ sys.exit('Insufficient permission to run "{}"'.format(which_kpsewhich_resolved.as_posix()))
+ kpsewhich_TEXMFOUTPUT = kpsewhich_proc.stdout.decode(sys.stdout.encoding) or None
+ if kpsewhich_TEXMFOUTPUT:
+ kpsewhich_TEXMFOUTPUT_path = Path(kpsewhich_TEXMFOUTPUT)
+ prohibited_path_roots.add(kpsewhich_TEXMFOUTPUT_path)
+ prohibited_path_roots.add(kpsewhich_TEXMFOUTPUT_path.resolve())
+ if not is_permitted_executable_path(which_kpsewhich_path, which_kpsewhich_resolved):
+ # It is now possible to check for the TeX Live scenario where
+ # `TEXMFOUTPUT` is set in a `texmf.cnf` config file to a location that
+ # includes the `kpsewhich` executable. Giving an error message after
+ # already running `kpsewhich` isn't ideal, but there isn't a good
+ # alternative. As in the latexrestricted case, the impact on overall
+ # security is negligible because an unsafe value of `TEXMFOUTPUT`
+ # means that all TeX-related executables are potentially compromised.
+ sys.exit(
+ 'Executable "kpsewhich" is located under the current directory, TEXMFOUTPUT, or '
+ 'TEXMF_OUTPUT_DIRECTORY, or one of these locations is under the same directory as the executable'
+ )
+
+
+
+
+# If Python version is < 3.8, try to locate a more recent version and then
+# relaunch this script with that Python version in a subprocess.
+if sys.version_info[:2] < (3, 8):
+ for minor_version in range(13, 7, -1):
+ if platform.system() == 'Windows':
+ # Batch files must be prohibited:
+ # https://docs.python.org/3/library/subprocess.html#security-considerations
+ which_python = shutil.which('python3.{}.exe'.format(minor_version))
+ else:
+ which_python = shutil.which('python3.{}'.format(minor_version))
+ if which_python:
+ which_python_path = Path(which_python)
+ which_python_resolved = which_python_path.resolve()
+ if platform.system() == 'Windows' and not which_python_resolved.name.lower().endswith('.exe'):
+ continue
+ if is_permitted_executable_path(which_python_path, which_python_resolved):
+ python_cmd = [which_python_resolved.as_posix(), __file__] + sys.argv[1:]
+ python_proc = subprocess.run(python_cmd, shell=False, capture_output=True)
+ sys.stderr.buffer.write(python_proc.stderr)
+ sys.stdout.buffer.write(python_proc.stdout)
+ sys.exit(python_proc.returncode)
+ sys.exit('latexminted requires Python >= 3.8, but a compatible Python executable was not found on PATH')
+
+
+
+
+# Check for required wheel dependencies and add them to Python's `sys.path`.
+script_resolved = Path(__file__).resolve()
+required_wheel_packages = (
+ 'latexminted',
+ 'latexrestricted',
+ 'latex2pydata',
+ 'pygments',
+)
+wheel_paths = [p for p in script_resolved.parent.glob('*.whl') if p.name.startswith(required_wheel_packages)]
+if not wheel_paths:
+ sys.exit('latexminted failed to find bundled wheels *.whl')
+for pkg in required_wheel_packages:
+ if not any(whl.name.startswith(pkg) for whl in wheel_paths):
+ sys.exit('latexminted failed to find all required bundled wheels *.whl')
+for wheel_path in wheel_paths:
+ sys.path.insert(0, wheel_path.as_posix())
+
+
+
+
+# Under Windows, check PATH for a `latexminted` executable outside a TeX
+# installation. If a `latexminted` executable is found in a suitable location
+# with sufficient precedence, run it in a subprocess and exit.
+#
+# The environment variable `LATEXMINTED_SUBPROCESS` is used to prevent an
+# endless recursion of subprocesses in the event that a `latexminted`
+# executable *inside* a TeX installation somehow manages to pass the tests for
+# an executable *outside* a TeX installation.
+if platform.system() == 'Windows' and not os.getenv('LATEXMINTED_SUBPROCESS'):
+ os.environ['LATEXMINTED_SUBPROCESS'] = '1'
+ fallback_path_search = True
+ if env_SELFAUTOLOC:
+ env_SELFAUTOLOC_resolved = Path(env_SELFAUTOLOC).resolve()
+ else:
+ env_SELFAUTOLOC_resolved = None
+ which_latexminted = shutil.which('latexminted.exe')
+ if which_latexminted:
+ which_latexminted_path = Path(which_latexminted)
+ which_latexminted_resolved = which_latexminted_path.resolve()
+ if not which_latexminted_resolved.name.lower().endswith('.exe'):
+ sys.exit(' '.join([
+ 'Executable "latexminted" resolved to "{}",'.format(which_latexminted_resolved.as_posix()),
+ 'but *.exe is required',
+ ]))
+ if which_latexminted_resolved == script_resolved:
+ pass
+ elif (which_latexminted_resolved.parent / 'tex.exe').exists():
+ pass
+ elif any(x in which_latexminted_resolved.as_posix().lower() for x in ('texlive', 'miktex', 'tinytex')):
+ pass
+ elif env_SELFAUTOLOC_resolved and which_latexminted_resolved.is_relative_to(env_SELFAUTOLOC_resolved):
+ pass
+ elif is_permitted_executable_path(which_latexminted_path, which_latexminted_resolved):
+ latexminted_cmd = [which_latexminted_resolved.as_posix()] + sys.argv[1:]
+ latexminted_proc = subprocess.run(latexminted_cmd, shell=False, capture_output=True)
+ sys.stderr.buffer.write(latexminted_proc.stderr)
+ sys.stdout.buffer.write(latexminted_proc.stdout)
+ sys.exit(latexminted_proc.returncode)
+ else:
+ # If there was a `latexminted` executable on PATH outside a TeX
+ # installation, but it wasn't permitted due to its location, don't
+ # perform fallback search.
+ fallback_path_search = False
+ if fallback_path_search:
+ # Windows appends user PATH to system PATH, so the system PATH may
+ # prevent finding a user installation of `latexminted`. Search
+ # through PATH elements under user home directory to check for
+ # `latexminted.exe` outside a TeX installation.
+ home_path = Path.home()
+ env_PATH = os.environ.get('PATH', '')
+ for path_elem in env_PATH.split(os.pathsep):
+ if not path_elem or not Path(path_elem).is_relative_to(home_path):
+ continue
+ which_latexminted = shutil.which('latexminted.exe', path=path_elem)
+ if not which_latexminted:
+ continue
+ which_latexminted_path = Path(which_latexminted)
+ which_latexminted_resolved = which_latexminted_path.resolve()
+ if which_latexminted_resolved == script_resolved:
+ break
+ elif (which_latexminted_resolved.parent / 'tex.exe').exists():
+ break
+ elif any(x in which_latexminted_resolved.as_posix().lower() for x in ('texlive', 'miktex', 'tinytex')):
+ break
+ elif env_SELFAUTOLOC_resolved and which_latexminted_resolved.is_relative_to(env_SELFAUTOLOC_resolved):
+ break
+ elif is_permitted_executable_path(which_latexminted_path, which_latexminted_resolved):
+ latexminted_cmd = [which_latexminted_resolved.as_posix()] + sys.argv[1:]
+ try:
+ latexminted_proc = subprocess.run(latexminted_cmd, shell=False, capture_output=True)
+ except PermissionError:
+ break
+ sys.stderr.buffer.write(latexminted_proc.stderr)
+ sys.stdout.buffer.write(latexminted_proc.stdout)
+ sys.exit(latexminted_proc.returncode)
+ else:
+ break
+
+
+
+
+from latexminted.cmdline import main
+main()
diff --git a/macros/latex/contrib/minted/latexrestricted-0.4.0-py3-none-any.whl b/macros/latex/contrib/minted/latexrestricted-0.4.0-py3-none-any.whl
new file mode 100644
index 0000000000..79b09d23ee
--- /dev/null
+++ b/macros/latex/contrib/minted/latexrestricted-0.4.0-py3-none-any.whl
Binary files differ
diff --git a/macros/latex/contrib/minted/minted.dtx b/macros/latex/contrib/minted/minted.dtx
index d1a0d3c2d9..b0c75e1769 100644
--- a/macros/latex/contrib/minted/minted.dtx
+++ b/macros/latex/contrib/minted/minted.dtx
@@ -1,18 +1,15 @@
% \iffalse meta-comment
%
-% Copyright (C) 2013-2023 by Geoffrey M. Poore <gpoore@gmail.com>
+% Copyright (C) 2013-2024 by Geoffrey M. Poore <gpoore@gmail.com>
% Copyright (C) 2010-2011 by Konrad Rudolph <konrad_rudolph@madrat.net>
-% ---------------------------------------------------------------------------
+% --------------------------------------------------------------------------
% This work may be distributed and/or modified under the
-% conditions of the LaTeX Project Public License, either version 1.3
+% conditions of the LaTeX Project Public License, either version 1.3c
% 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.
-%
-% Additionally, the project may be distributed under the terms of the 3-Clause
-% ("New") BSD license: http://opensource.org/licenses/BSD-3-Clause.
+% https://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2008/05/04 or later.
%
% This work has the LPPL maintenance status `maintained'.
%
@@ -21,7 +18,6 @@
% This work consists of the files minted.dtx and minted.ins
% and the derived file minted.sty.
%
-%
% \fi
%
% \iffalse
@@ -31,30 +27,31 @@
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{minted}
%<*package>
- [2023/12/18 v2.9 Yet another Pygments shim for LaTeX]
+ [2024/09/22 v3.0.0 Yet another Pygments shim for LaTeX]
%</package>
%<*driver>
\documentclass{ltxdoc}
-\EnableCrossrefs
-%\CodelineIndex
-%\DisableCrossrefs
-%\RecordChanges
-%\OnlyDescription
+\DisableCrossrefs
+^^A\EnableCrossrefs
+^^A\CodelineIndex
+^^A\RecordChanges
+^^A\OnlyDescription
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
+\usepackage{fourier}
\usepackage{dingbat}
\usepackage{microtype}
\usepackage[svgnames]{xcolor}
-\usepackage{textcomp}
-\usepackage[cache, langlinenos]{minted}
+\usepackage{graphicx}
+\usepackage[lexerlinenos, highlightmode=immediate]{minted}
+\setminted{literatecomment=\%, autogobble}
\usepackage{calc}
-\usepackage{environ}
-\usepackage{graphicx}
\usepackage{multicol}
-\usepackage{hyperref}
+\usepackage[hyperindex]{hyperref}
+\usepackage{cleveref}
\newcommand{\env}[1]{\texttt{#1}}
@@ -95,28 +92,11 @@
\def\FV@SV@pipe@active@verbatim{%
\FV@Gobble
\expandafter\FV@ProcessLine\expandafter{#1}}%
- %\let\FV@BeginVBox\relax
- %\let\FV@EndVBox\relax
- %\def\FV@BProcessLine##1{\FancyVerbFormatLine{##1}}%
\BUseVerbatim{pipe@active@verbatim}%
\endgroup}
\AtBeginDocument{\let|\pipe@active@verbatim}
\endgroup
-\newcommand{\changestext}{}
-\NewEnviron{changelog}[2]{%
- \g@addto@macro\changestext{\item[#1] (#2) \begin{itemize}}%
- \expandafter\g@addto@macro\expandafter\changestext\expandafter{\BODY}%
- \g@addto@macro\changestext{\end{itemize}}%
-}
-\newcommand{\PrintChangelog}{%
- \section{Changelog}%
- \label{sec:changelog}
- \begin{description}%
- \changestext
- \end{description}%
-}
-
\def\MacroFont{%
\fontencoding\encodingdefault%
\fontfamily\ttdefault%
@@ -125,13 +105,55 @@
\small}
\definecolor{minted@mint}{HTML}{0B610B}
-\definecolor{minted@samplebg}{HTML}{F0F0E0}
\colorlet{minted@linkcolor}{minted@mint}
-%
+
\def\PrintDescribeMacro#1{\strut \MacroFont\textcolor{minted@linkcolor}{\string #1\ }}
\let\PrintDescribeEnv\PrintDescribeMacro
\let\PrintMacroName\PrintDescribeMacro
\let\PrintEnvName\PrintDescribeEnv
+
+\renewenvironment{macro}{\macro@custom@arg}{}
+\def\macro@custom@arg{%
+ \begingroup\makeatletter\macro@custom@arg@i}
+\def\macro@custom@arg@i#1{%
+ \makeatother
+ \par\noindent
+ \ifstrempty{#1}%
+ {~\par}%
+ {\ttfamily\color{minted@mint}\hspace*{-0.5in}%
+ \macro@custom@arg@split#1,\FV@Sentinel\par}%
+ \endgroup}
+\def\macro@custom@arg@spacegobble#1{#1}
+\def\macro@custom@arg@split#1,#2\FV@Sentinel{%
+ \expandafter\string\macro@custom@arg@spacegobble#1%
+ \if\relax\detokenize{#2}\relax
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi
+ {}{\\\hspace*{-0.5in}\macro@custom@arg@split#2\FV@Sentinel}}
+
+\renewenvironment{environment}{\env@custom@arg}{}
+\def\env@custom@arg{%
+ \begingroup\makeatletter\env@custom@arg@i}
+\def\env@custom@arg@i#1{%
+ \makeatother
+ \ifstrempty{#1}%
+ {~\par}%
+ {\ttfamily\color{minted@mint}\hspace*{-0.5in}%
+ \env@custom@arg@split#1,\FV@Sentinel\par}%
+ \endgroup}
+\def\env@custom@arg@spacegobble#1{#1}
+\def\env@custom@arg@split#1,#2\FV@Sentinel{%
+ \env@custom@arg@spacegobble#1{\textrm{ \textit{(env.)}}}%
+ \if\relax\detokenize{#2}\relax
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi
+ {}{\\\hspace*{-0.5in}\env@custom@arg@split#2\FV@Sentinel}}
+
+
\def\theCodelineNo{\textcolor{minted@linkcolor}{\sffamily\footnotesize\oldstylenums{\arabic{CodelineNo}}}}
%
\hypersetup{
@@ -141,35 +163,56 @@
colorlinks=true,
allcolors=minted@linkcolor,
}
-%
-% Shamelessly stolen from http://blog.karssen.org/2009/11/15/a-latex-example-environment/
+
+\newenvironment{mintedminted}%
+ {\VerbatimEnvironment
+ \begin{minted}}%
+ {\end{minted}}
+
+
\newenvironment{example}
{\VerbatimEnvironment
- \begin{VerbatimOut}[gobble=3]{example.out}}
+ \begin{VerbatimOut}[gobble=1]{example.out}}
{\end{VerbatimOut}%
- \vspace{1ex}%
\setlength{\parindent}{0pt}%
- \fbox{\begin{minipage}{0.5\linewidth}%
+ \vspace{1em}%
+ \fbox{%
+ \vspace{1ex}%
+ \begin{minipage}{0.5\linewidth-2em-\fboxsep}%
\inputminted[resetmargins]{latex}{example.out}%
- \end{minipage}%
- \hspace{0.05\linewidth}%
- \begin{minipage}{0.45\linewidth-2\fboxsep}%
+ \end{minipage}%
+ \hspace{2em}\vrule\hspace{2em}%
+ \begin{minipage}{0.5\linewidth-2em-\fboxsep}%
\input{example.out}%
- \end{minipage}%
- \vspace{1ex}}}
+ \end{minipage}%
+ \vspace{1ex}}%
+ \vspace{1em}}
+
+
+\begingroup
+\catcode`\^^M=\active%
+\gdef\longexample@i#1{%
+ \def\longexample@arg{#1}%
+ \begin{VerbatimOut}[gobble=1]{example.out}^^M}%
+\endgroup
\newenvironment{longexample}
- {\VerbatimEnvironment
- \begin{VerbatimOut}[gobble=3]{example.out}}
- {\end{VerbatimOut}%
- \vspace{1ex}%
- \setlength{\parindent}{0pt}%
- \fbox{\begin{minipage}{\linewidth-2\fboxsep}%
- \inputminted[resetmargins]{latex}{example.out}%
- ~\hrulefill~
- \input{example.out}%
- \end{minipage}%
- \vspace{1ex}}}
+ {\VerbatimEnvironment
+ \FVExtraReadOArgBeforeVEnv{\longexample@i}}
+ {\end{VerbatimOut}%
+ \vspace{1em}%
+ \setlength{\parindent}{0pt}%
+ \fbox{
+ \vspace{1ex}%
+ \begin{minipage}{\linewidth-2\fboxsep}%
+ \inputminted[resetmargins]{latex}{example.out}%
+ ~\hrulefill~
+ \expandafter\fvset\expandafter{\longexample@arg}%
+ \input{example.out}%
+ \end{minipage}%
+ \vspace{1ex}}%
+ \vspace{1em}}
+
\def\minted@printopt#1(#2) (#3){%
\vspace{0.1in}%
@@ -178,322 +221,80 @@
\kern-\parindent\textsf{(#2)}\hfill(default: \texttt{#3})\\}
\newenvironment{optionlist}%
- {%
- ~\par\vspace{-14pt}%
+ {~\par\vspace{-14pt}%
\def\pipechar{|}
\let\|\pipechar
\newcommand*\mintednext{}%
+ \let\item@orig\item
\renewcommand*\item[1][]{%
- \mintednext%
- \renewcommand*\mintednext{\par}%
- \minted@printopt##1%
- \ignorespaces}}
- {%
- \par}
+ \ifdefstring{\@currenvir}{optionlist}%
+ {\mintednext%
+ \renewcommand*\mintednext{\par}%
+ \minted@printopt##1%
+ \ignorespaces}%
+ {\ifstrempty{##1}%
+ {\vspace{-4pt}\item@orig}
+ {\vspace{-4pt}\item@orig[##1]}}}}
+ {\par}
\edef\hashchar{\string#}
+
+
+\renewcommand*\l@subsection{\@dottedtocline{2}{1.5em}{3em}}
+\renewcommand*\l@subsubsection{\@dottedtocline{3}{4.5em}{3.8em}}
+
+
\makeatother
-\newcommand{\hide}[1]{}
-\setlength{\parindent}{0pt}
-\addtolength{\parskip}{0.5\baselineskip}
-\def\warn{\textcolor{red}{\large\textbf{\textsf{WARNING}}}}
+
+\newenvironment{mintedexample}%
+ {\VerbatimEnvironment
+ \begin{minted}}%
+ {\end{minted}}
\begin{document}
\DocInput{minted.dtx}
-% \PrintIndex
+% ^^A\PrintIndex
\end{document}
%</driver>
% \fi
%
-% \CheckSum{2572}
-%
-% \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 \~}
-%
-%
-%
-%
-% \begin{changelog}{v2.9}{2023/12/18}
-% \item This is expected to be the last release of \pkg{minted} v2.x. If so, it will then become the new package \Verb{minted2} for backward compatibility.
-% \item Added new option \Verb{ignorelexererrors}. When lexer errors are shown in highlighted output (default), they are typically displayed as red boxes that surround the relevant text. When lexer errors are ignored, the literal text that caused lexer errors is shown but there is no indication that it caused errors (\#374).
-% \item There is now a warning if \pkg{fvextra} version is less than 1.5.
-% \end{changelog}
-%
-% \begin{changelog}{v2.8}{2023/09/12}
-% \item Under non-Windows operating systems, detect executables with \Verb{command -v} rather than \Verb{which} to provide better cross-platform support (\#345).
-% \item Added new package option \Verb{inputlanglinenos}. This extends the existing \Verb{langlinenos} to cover \Verb{\inputminted} as well (\#361).
-% \item Improved and updated Pygments documentation (\#339).
-% \item Improved \Verb{\mintinline} documentation to address packages that redefine \Verb{\section} (\#368).
-% \item Added support for \texpkg{fvextra} options \texttt{breakafterinrun} and \texttt{breakbeforeinrun} (\#358). In \texpkg{fvextra} version 1.5, \texttt{breakaftergroup} and \texttt{breakbeforegroup} were renamed to \texttt{breakafterinrun} and \texttt{breakbeforeinrun} to avoid naming ambiguity with new options. The old options \texttt{breakaftergroup} and \texttt{breakbeforegroup} are no longer supported.
-% \item Added \texttt{DEPENDS.txt} (\#331).
-% \item Removed unnecessary dependency on \texpkg{calc} package (\#313).
-% \item Added documentation in FAQ about copy and paste limitations (\#302).
-% \item Added note on \texttt{text} lexer to documentation (\#274).
-% \end{changelog}
-%
-%
-% \begin{changelog}{v2.7}{2022/12/12}
-% \item Reimplemented \texttt{\string\mintinline} to use \texttt{fvextra}'s argument reading and processing macros, and to use \texttt{fvextra}'s \texttt{\string\Verb} internally. \texttt{\string\mintinline} now works with all line breaking options supported by \texttt{fvextra}'s \texttt{\string\Verb}, including \texttt{breakanywhere} (\#329, \#340). It now gives better results when used inside other commands, since it uses \texttt{fvextra}'s retokenization macros. It is now compatible with \texttt{hyperref} for PDF strings such as bookmarks.
-% \item Reimplemented \texttt{\string\newmintinline} based on new \texttt{\string\mintinline}.
-% \item Reimplemented \texttt{\string\mint} to use \texttt{fvextra}'s argument reading and processing macros. It now gives better results when used inside other commands, since it uses \texttt{fvextra}'s retokenization macros. Fixed a bug that caused a continued paragraph after \texttt{\string\mint} to be indented (\#218).
-% \item Reimplemented \texttt{\string\newmint} based on new \texttt{\string\mint}. Commands created with \texttt{\string\newmint} can now use curly braces as delimiters, just like \texttt{\string\mint} (\#254).
-% \item Settings passed to \Verb{pygmentize} as command-line options are now quoted. This prevents \Verb{escapeinside} characters from being interpreted as special shell characters (\#179, \#262).
-% \item Fixed bug with \texttt{autogobble} that produced incorrect dedent when using \texttt{lastline} with the lines beyond \texttt{lastline} having less indentation than the selected range (\#326).
-% \item Fixed unintended line breaks after hyphens under LuaTeX (\#263).
-% \item Added warning to documentation of \Verb{\inputminted} regarding filenames and shell command execution (\#338).
-% \end{changelog}
-%
-%
-% \begin{changelog}{v2.6}{2021/12/24}
-% \item \texttt{autogobble} automatically uses \texttt{python} or \texttt{python3} executables, depending on availability, instead of requiring \texttt{python}. A custom executable can be specified by redefining \texttt{\string\MintedPython} (\#277, \#287).
-% \item Fixed \texttt{autogobble} compatibility with \texttt{fancyvrb} 4.0+ (\#315, \#316).
-% \item Pygments style names may now contain arbitrary non-whitespace characters. Previously, style names containing digits and some punctuation characters were incompatible (\#210, \#294, \#299, \#317). Pygments macros are now only defined just before use locally within \texttt{minted} commands and environments, rather than globally. Pygments macros now always use a \texttt{\string\PYG} prefix regardless of style, rather than a prefix of the form \texttt{\string\PYG<style>} (for example, what was previously \texttt{\string\PYGdefault} is now simply \texttt{\string\PYG}).
-% \item Removed Python-based MD5 hashing for XeTeX, which was necessary before XeTeX added \texttt{\string\mdfivesum} in 2017.
-% \item The default for \texttt{stripnl} is now \texttt{false}, so that original code is preserved exactly by default (\#198).
-% \item Added support for \texttt{fontencoding} option from \texttt{fvextra} (\#208).
-% \item Added note to FAQ about getting \texttt{texi2pdf} to work with \texttt{minted} given \texttt{texi2pdf}'s assumptions about temp files (\#186).
-% \item Reimplemented \texttt{bgcolor} option to be compatible with \texttt{color} package.
-% \end{changelog}
-%
-%
-% \begin{changelog}{v2.5}{2017/07/19}
-% \item The default placement for the \texttt{listing} float is now \texttt{tbp} instead of \texttt{h}, to parallel \texttt{figure} and \texttt{table} and also avoid warnings caused by \texttt{h} (\#165). The documentation now contains information about changing default placement. The \texttt{float} package is no longer loaded when the \texttt{newfloat} package option is used.
-% \item Added support for \texttt{*nchars} options from \texttt{fvextra} v1.3 that allow setting \texttt{breaklines}-related indentation in terms of a number of characters, rather than as a fixed dimension.
-% \item Fixed incompatibility with \texttt{babel magyar} (\#158).
-% \item Added support for \texttt{beamer} overlays with \texttt{beameroverlays} option (\#155).
-% \item Comments in the Pygments \LaTeX\ style files no longer appear as literal text when \texttt{minted} is used in \texttt{.dtx} files (\#161).
-% \item \texttt{autogobble} now works with package option \texttt{kpsewhich} (\#151). Under Windows, the \texttt{kpsewhich} option no longer requires PowerShell.
-% \item Fixed a bug that prevented \texttt{finalizecache} from working with \texttt{outputdir} (\#149).
-% \item Fixed a bug with \texttt{firstline} and \texttt{lastline} that prevented them from working with the \texttt{minted} environment (\#145).
-% \item Added note on \texttt{breqn} conflicts to FAQ (\#163).
-% \end{changelog}
-%
-%
-% \begin{changelog}{v2.4.1}{2016/10/31}
-% \item Single quotation marks in \texttt{\string\jobname} are now replaced with underscores in \texttt{\string\minted@jobname} to prevent quoting errors (\#137).
-% \item The \texttt{autogobble} option now takes \texttt{firstline} and \texttt{lastline} into account (\#130).
-% \item Fixed \texttt{numberblanklines}, which had been lost in the transition to v2.0+ (\#135).
-% \end{changelog}
-%
-%
-% \begin{changelog}{v2.4}{2016/07/20}
-% \item Line breaking and all associated options are now completely delegated to \texttt{fvextra}.
-% \item Fixed a bug from v2.2 that could cause the first command or environment to vanish when \texttt{cache=false} (related to work on \texttt{\string\MintedPygmentize}).
-% \end{changelog}
-%
-%
-% \begin{changelog}{v2.3}{2016/07/14}
-% \item The \texttt{fvextra} package is now required. \texttt{fvextra} extends and patches \texttt{fancyvrb}, and includes improved versions of \texttt{fancyvrb} extensions that were formerly in \texttt{minted}.
-% \item As part of \texttt{fvextra}, the \texttt{upquote} package is always loaded. \texttt{fvextra} brings the new option \texttt{curlyquotes}, which allows curly single quotation marks instead of the literal backtick and typewriter single quotation mark produced by \texttt{upquote}. This allows the default \texttt{upquote} behavior to be disabled when desired.
-% \item Thanks to \texttt{fvextra}, the options \texttt{breakbefore}, \texttt{breakafter}, and \texttt{breakanywhere} are now compatible with non-ASCII characters under pdfTeX (\#123).
-% \item Thanks to \texttt{fvextra}, \texttt{obeytabs} no longer causes lines in multi-line comments or strings to vanish (\#88), and is now compatible with \texttt{breaklines} (\#99). \texttt{obeytabs} will now always give correct results with tabs used for indentation. However, tab stops are not guaranteed to be correct for tabs in the midst of text.
-% \item \texttt{fvextra} brings the new options \texttt{space}, \texttt{spacecolor}, \texttt{tab}, and \texttt{tabcolor} that allow these characters and their colors to be redefined (\#98). The tab may now be redefined to a flexible-width character such as \texttt{\string\rightarrowfill}. The visible tab will now always be black by default, instead of changing colors depending on whether it is part of indentation for a multiline string or comment.
-% \item \texttt{fvextra} brings the new options \texttt{highlightcolor} and \texttt{highlightlines}, which allow single lines or ranges of lines to be highlighted based on line number (\#124).
-% \item \texttt{fvextra} brings the new options \texttt{numberfirstline}, \texttt{stepnumberfromfirst}, and \texttt{stepnumberoffsetvalues} that provide better control over line numbering when \texttt{stepnumber} is not 1.
-% \item Fixed a bug from v2.2.2 that prevented \texttt{upquote} from working.
-% \end{changelog}
-%
-%
-% \begin{changelog}{v2.2.2}{2016/06/21}
-% \item Fixed a bug introduced in v2.2 that prevented setting the Pygments style in the preamble. Style definitions are now more compatible with using \texttt{\string\MintedPygmentize} to call a custom \texttt{pygmentize}.
-% \end{changelog}
-%
-%
-% \begin{changelog}{v2.2.1}{2016/06/15}
-% \item The \texttt{shellesc} package is loaded before \texttt{ifplatform} and other packages that might invoke \texttt{\string\write18} (\#112).
-% \item When caching is enabled, XeTeX uses the new \texttt{\string\mdfivesum} macro from TeX Live 2016 to hash cache content, rather than using \texttt{\string\ShellEscape} with Python to perform hashing.
-% \end{changelog}
-%
-%
-% \begin{changelog}{v2.2}{2016/06/08}
-% \item All uses of \texttt{\string\ShellEscape} (\texttt{\string\write18}) no longer wrap file names and paths with double quotes. This allows a cache directory to be specified relative to a user's home directory, for example, \texttt{\string~/minted\_cache}. \texttt{cachedir} and \texttt{outputdir} paths containing spaces will now require explicit quoting of the parts of the paths that contain spaces, since \texttt{minted} no longer supplies quoting. See the updated documentation for examples (\#89).
-% \item Added \texttt{breakbefore}, \texttt{breakbeforegroup}, \texttt{breakbeforesymbolpre}, and \texttt{breakbeforesymbolpost}. These parallel \texttt{breakafter*}. It is possible to use \texttt{breakbefore} and \texttt{breakafter} for the same character, so long as \texttt{breakbeforegroup} and \texttt{breakaftergroup} have the same setting (\#117).
-% \item Added package options \texttt{finalizecache} and \texttt{frozencache}. These allow the cache to be prepared for (\texttt{finalizecache}) and then used (\texttt{frozencache}) in an environment in which \texttt{-shell-escape}, Python, and/or Pygments are not available. Note that this only works if \texttt{minted} content does not need to be modified, and if no settings that depend on Pygments or Python need to be changed (\#113).
-% \item Style names containing hyphens and underscores (\texttt{paraiso-light}, \texttt{paraiso-dark}, \texttt{algol\_nu}) now work (\#111).
-% \item The \texttt{shellesc} package is now loaded, when available, for compatibility with LuaTeX 0.87+ (TeX Live 2016+, etc.). \texttt{\string\ShellEscape} is now used everywhere instead of \texttt{\string\immediate\string\write18}. If \texttt{shellesc} is not available, then a \texttt{\string\ShellEscape} macro is created. When \texttt{shellesc} is loaded, there is a check for versions before v0.01c to patch a bug in v0.01b (present in TeX Live 2015) (\#112).
-% \item The \texttt{bgcolor} option now uses the \texttt{snugshade*} environment from the \texttt{framed} package, so \texttt{bgcolor} is now compatible with page breaks. When \texttt{bgcolor} is in use, immediately preceding text will no longer push the \texttt{minted} environment into the margin, and there is now adequate spacing from surrounding text (\#121).
-% \item Added missing support for \texttt{fancyvrb}'s \texttt{labelposition} (\#102).
-% \item Improved fix for TikZ externalization, thanks to Patrick Vogt (\#73).
-% \item Fixed \texttt{breakautoindent}; it was disabled in version 2.1 due to a bug in \texttt{breakanywhere}.
-% \item Properly fixed handling of \texttt{\string\MintedPygmentize} (\#62).
-% \item Added note on incompatibility of \texttt{breaklines} and \texttt{obeytabs} options. Trying to use these together will now result in a package error (\#99). Added note on issues with \texttt{obeytabs} and multiline comments (\#88). Due to the various \texttt{obeytabs} issues, the docs now discourage using \texttt{obeytabs}.
-% \item Added note to FAQ on \texttt{fancybox} and \texttt{fancyvrb} conflict (\#87).
-% \item Added note to docs on the need for \texttt{\string\VerbatimEnvironment} in environment definitions based on \texttt{minted} environments.
-% \end{changelog}
-%
-%
-% \begin{changelog}{v2.1}{2015/09/09}
-% \item Changing the highlighting style now no longer involves re-highlighing code. Style may be changed with almost no overhead.
-% \item Improved control of automatic line breaks. New option \texttt{breakanywhere} allows line breaks anywhere when \texttt{breaklines=true}. The pre-break and post-break symbols for these types of breaks may be set with \texttt{breakanywheresymbolpre} and \texttt{breakanywheresymbolpost} (\#79). New option \texttt{breakafter} allows specifying characters after which line breaks are allowed. Breaks between adjacent, identical characters may be controlled with \texttt{breakaftergroup}. The pre-break and post-break symbols for these types of breaks may be set with \texttt{breakaftersymbolpre} and \texttt{breakaftersymbolpost}.
-% \item \texttt{breakbytoken} now only breaks lines between tokens that are separated by spaces, matching the documentation. The new option \texttt{breakbytokenanywhere} allows for breaking between tokens that are immediately adjacent. Fixed a bug in \texttt{\string\mintinline} that produced a following linebreak when \texttt{\string\mintinline} was the first thing in a paragraph and \texttt{breakbytoken} was true (\#77).
-% \item Fixed a bug in draft mode option handling for \texttt{\string\inputminted} (\#75).
-% \item Fixed a bug with \texttt{\string\MintedPygmentize} when a custom \texttt{pygmentize} was specified and there was no \texttt{pygmentize} on the default path (\#62).
-% \item Added note to docs on caching large numbers of code blocks under OS~X (\#78).
-% \item Added discussion of current limitations of \texttt{texcomments} (\#66) and \texttt{escapeinside} (\#70).
-% \item PGF/Ti\textit{k}Z externalization is automatically detected and supported (\#73).
-% \item The package is now compatible with \LaTeX\ files whose names contain spaces (\#85).
-% \end{changelog}
-%
-%
-% \begin{changelog}{v2.0}{2015/01/31}
-% \item Added the compatibility package \texttt{minted1}, which provides the \texpkg{minted} 1.7 code. This may be loaded when 1.7 compatibility is required. This package works with other packages that \texttt{\string\RequirePackage\{minted\}}, so long as it is loaded first.
-% \item Moved all old \texttt{\string\changes} into \texttt{changelog}.
-% \end{changelog}
-%
-%
-% \begin{changelog}{Development releases for 2.0}{2014--January 2015}
-% \item Caching is now on by default.
-% \item Fixed a bug that prevented compiling under Windows when file names contained commas.
-% \item Added \texttt{breaksymbolleft}, \texttt{breaksymbolsepleft}, \texttt{breaksymbolindentleft}, \texttt{breaksymbolright}, \texttt{breaksymbolsepright}, and \texttt{breaksymbolindentright} options. \texttt{breaksymbol}, \texttt{breaksymbolsep}, and \texttt{breaksymbolindent} are now aliases for the correspondent \texttt{*left} options.
-% \item Added \texttt{kpsewhich} package option. This uses \texttt{kpsewhich} to locate the files that are to be highlighted. This provides compatibility with build tools like \texttt{texi2pdf} that function by modifying \texttt{TEXINPUTS} (\#25).
-% \item Fixed a bug that prevented \texttt{\string\inputminted} from working with \texttt{outputdir}.
-% \item Added informative error messages when Pygments output is missing.
-% \item Added \texttt{final} package option (opposite of \texttt{draft}).
-% \item Renamed the default cache directory to \texttt{\_minted-<jobname>} (replaced leading period with underscore). The leading period caused the cache directory to be hidden on many systems, which was a potential source of confusion.
-% \item \texttt{breaklines} and \texttt{breakbytoken} now work with \texttt{\string\mintinline} (\#31).
-% \item \texttt{bgcolor} may now be set through \texttt{\string\setminted} and \texttt{\string\setmintedinline}.
-% \item When math is enabled via \texttt{texcomments}, \texttt{mathescape}, or \texttt{escapeinside}, space characters now behave as in normal math by vanishing, instead of appearing as literal spaces. Math need no longer be specially formatted to avoid undesired spaces.
-% \item In default value of \texttt{\string\listoflistingscaption}, capitalized ``Listings'' so that capitalization is consistent with default values for other lists (figures, tables, algorithms, etc.).
-% \item Added \texttt{newfloat} package option that creates the \texttt{listing} environment using \texttt{newfloat} rather than \texttt{float}, thus providing better compatibility with the \texttt{caption} package (\#12).
-% \item Added support for Pygments option \texttt{stripall}.
-% \item Added \texttt{breakbytoken} option that prevents \texttt{breaklines} from breaking lines within Pygments tokens.
-% \item \texttt{\string\mintinline} uses a \texttt{\string\colorbox} when \texttt{bgcolor} is set, to give more reasonable behavior (\#57).
-% \item For PHP, \texttt{\string\mintinline} automatically begins with \texttt{startinline=true} (\#23).
-% \item Fixed a bug that threw off line numbering in \texttt{minted} when \texttt{langlinenos=false} and \texttt{firstnumber=last}. Fixed a bug in \texttt{\string\mintinline} that threw off subsequent line numbering when \texttt{langlinenos=false} and \texttt{firstnumber=last}.
-% \item Improved behavior of \texttt{\string\mint} and \texttt{\string\mintinline} in \texttt{draft} mode.
-% \item The \texttt{\string\mint} command now has the additional capability to take code delimited by paired curly braces \texttt{\{\}}.
-% \item It is now possible to set options only for \texttt{\string\mintinline} using the new \texttt{\string\setmintedinline} command. Inline options override options specified via \texttt{\string\setminted}.
-% \item Completely rewrote option handling. \texpkg{fancyvrb} options are now handled on the \LaTeX\ side directly, rather than being passed to Pygments and then returned. This makes caching more efficient, since code is no longer rehighlighted just because \texpkg{fancyvrb} options changed.
-% \item Fixed buffer size error caused by using \texttt{cache} with a very large number of files (\#61).
-% \item Fixed \texttt{autogobble} bug that caused failure under some operating systems.
-% \item Added support for \texttt{escapeinside} (requires Pygments 2.0+; \#38).
-% \item Fixed issues with XeTeX and caching (\#40).
-% \item The \texttt{upquote} package now works correctly with single quotes when using Pygments 1.6+ (\#34).
-% \item Fixed caching incompatibility with Linux and OS X under xelatex (\#18 and \#42).
-% \item Fixed \texttt{autogobble} incompatibility with Linux and OS X.
-% \item \texttt{\string\mintinline} and derived commands are now robust, via \texttt{\string\newrobustcmd} from \texttt{etoolbox}.
-% \item Unused styles are now cleaned up when caching.
-% \item Fixed a bug that could interfere with caching (\#24).
-% \item Added \texttt{draft} package option (\#39). This typesets all code using \texttt{fancyvrb}; Pygments is not used. This trades syntax highlighting for maximum speed in compiling.
-% \item Added automatic line breaking with \texttt{breaklines} and related options (\#1).
-% \item Fixed a bug with boolean options that needed a False argument to cooperate with \texttt{\string\setminted} (\#48).
-% \end{changelog}
-%
-% \begin{changelog}{v2.0-alpha3}{2013/12/21}
-% \item Added \texttt{autogobble} option. This sends code through Python's \texttt{textwrap.dedent()} to remove common leading whitespace.
-% \item Added package option \texttt{cachedir}. This allows the directory in which cached content is saved to be specified.
-% \item Added package option \texttt{outputdir}. This allows an output directory for temporary files to be specified, so that the package can work with LaTeX's \texttt{-output-directory} command-line option.
-% \item The \texttt{kvoptions} package is now required. It is needed to process key-value package options, such as the new \texttt{cachedir} option.
-% \item Many small improvements, including better handling of paths under Windows and improved key system.
-% \end{changelog}
-%
-% \begin{changelog}{v2.0-alpha2}{2013/08/21}
-% \item \texttt{\string\DeleteFile} now only deletes files if they do indeed exist. This eliminates warning messages due to missing files.
-% \item Fixed a bug in the definition of \texttt{\string\DeleteFile} for non-Windows systems.
-% \item Added support for Pygments option \texttt{stripnl}.
-% \item Settings macros that were previously defined globally are now defined locally, so that \texttt{\string\setminted} may be confined by \texttt{\string\begingroup...\string\endgroup} as expected.
-% \item Macro definitions for a given style are now loaded only once per document, rather than once per command/environment. This works even without caching.
-% \item A custom script/executable may now be substituted for \texttt{pygmentize} by redefining \texttt{\string\MintedPygmentize}.
-% \end{changelog}
-%
-%
-% \begin{changelog}{v2.0alpha}{2013/07/30}
-% \item Added the package option \texttt{cache}. This significantly increases compilation speed by caching old output. For example, compiling the documentation is around 5x faster.
-% \item New inline command \texttt{\string\mintinline}. Custom versions can be created via \texttt{\string\newmintinline}. The command works inside other commands (for example, footnotes) in most situations, so long as the percent and hash characters are avoided.
-% \item The new \texttt{\string\setminted} command allows options to be specified at the document and language levels.
-% \item All extended characters (Unicode, etc.) supported by \texttt{inputenc} now work under the pdfTeX engine. This involved using \texttt{\string\detokenize} on everything prior to saving.
-% \item New package option \texttt{langlinenos} allows line numbering to pick up where it left off for a given language when \texttt{firstnumber=last}.
-% \item New options, including \texttt{style}, \texttt{encoding}, \texttt{outencoding}, \texttt{codetagify}, \texttt{keywordcase}, \texttt{texcomments} (same as \texttt{texcl}), \texttt{python3} (for the \texttt{PythonConsoleLexer}), and \texttt{numbers}.
-% \item \texttt{\string\usemintedstyle} now takes an optional argument to specify the style for a particular language, and works anywhere in the document.
-% \item \texttt{xcolor} is only loaded if \texttt{color} isn't, preventing potential package clashes.
-% \end{changelog}
-%
-%
-% \begin{changelog}{1.7}{2011/09/17}
-% \item Options for float placement added [2011/09/12]
-% \item Fixed \texttt{tabsize} option [2011/08/30]
-% \item More robust detection of the \texttt{-shell-escape} option [2011/01/21]
-% \item Added the \texttt{label} option [2011/01/04]
-% \item Installation instructions added [2010/03/16]
-% \item Minimal working example added [2010/03/16]
-% \item Added PHP-specific options [2010/03/14]
-% \item Removed unportable flag from Unix shell command [2010/02/16]
-% \end{changelog}
-%
-%
-% \begin{changelog}{1.6}{2010/01/31}
-% \item Added font-related options [2010/01/27]
-% \item Windows support added [2010/01/27]
-% \item Added command shortcuts [2010/01/22]
-% \item Simpler versioning scheme [2010/01/22]
-% \end{changelog}
-%
-%
-% \begin{changelog}{0.1.5}{2010/01/13}
-% \item Added \texttt{fillcolor} option [2010/01/10]
-% \item Added float support [2010/01/10]
-% \item Fixed \texttt{firstnumber} option [2010/01/10]
-% \item Removed \texttt{caption} option [2010/01/10]
-% \end{changelog}
-%
-%
-% \begin{changelog}{0.0.4}{2010/01/08}
-% \item Initial version [2010/01/08]
-% \end{changelog}
-%
-%
-% %\DoNotIndex{\newcommand,\newenvironment}
-% %\DoNotIndex{\#,\$,\%,\&,\@,\\,\{,\},\^,\_,\~,\ }
-% %\DoNotIndex{\@ne}
-% %\DoNotIndex{\advance,\begingroup,\catcode,\closein}
-% %\DoNotIndex{\closeout,\day,\def,\edef,\else,\empty,\endgroup}
-% %\DoNotIndex{\begin,\end,\bgroup,\egroup}
-% %\DoNotIndex{\@namedef,\@nameuse,=,\csname,\endcsname}
+%
+% ^^A\DoNotIndex{\newcommand,\newenvironment}
+% ^^A\DoNotIndex{\#,\$,\%,\&,\@,\\,\{,\},\^,\_,\~,\ }
+% ^^A\DoNotIndex{\@ne}
+% ^^A\DoNotIndex{\advance,\begingroup,\catcode,\closein}
+% ^^A\DoNotIndex{\closeout,\day,\def,\edef,\else,\empty,\endgroup}
+% ^^A\DoNotIndex{\begin,\end,\bgroup,\egroup}
+% ^^A\DoNotIndex{\@namedef,\@nameuse,=,\csname,\endcsname}
%
%
% \GetFileInfo{minted.sty}
%
-% \newcommand{\texpkg}[1]{\textsf{#1}}
+% \newcommand{\texpkg}[1]{\textsf{\detokenize{#1}}}
+% \newcommand{\pypkg}[1]{\textsf{\detokenize{#1}}}
+% \newcommand{\mintedpkg}{\texpkg{minted}}
% \newcommand{\app}[1]{\textsf{#1}}
%
-% \title{The \textcolor{minted@mint}{\texpkg{minted}} package:\\Highlighted source code in \LaTeX}
+% \title{The \textcolor{minted@mint}{\mintedpkg} package:\\Highlighted source code in \LaTeX}
% \author{Geoffrey M.\ Poore \\ \url{gpoore@gmail.com} \\ \href{https://github.com/gpoore/minted}{\texttt{github.com/gpoore/minted}} \\ ~\\ Originally created and maintained (2009--2013) by \\ Konrad Rudolph}
% \date{\fileversion~from \filedate}
%
% \maketitle
%
% \begin{abstract}
-% \noindent\texpkg{minted} is a package that facilitates expressive syntax highlighting
-% using the powerful \app{Pygments} library. The package also provides options to
-% customize the highlighted source code output.
+% \noindent\mintedpkg\ provides syntax highlighting using the \href{https://pygments.org/}{Pygments} library. It also provides options for customizing the highlighted source code output, including features implemented in Python such as selecting snippets of code with regular expressions.
%
% \vspace{0.5in}
-% \noindent\textbf{Development status:} \pkg{minted} version 3.0 is now under development, thanks to a \href{https://tug.org/tc/devfund/grants.html}{\TeX\ Development Fund grant} from the \href{https://tug.org/}{\TeX\ Users Group}. This will bring a new Python executable that replaces |pygmentize|. The new executable will be compatible with restricted shell escape, so no more |-shell-escape| with associated security vulnerabilities. The new executable will also make it possible to extend \pkg{minted} using Python, not just \LaTeX\ macros. This will bring official support for custom lexers, allow including snippets of external files based on regular expressions, and make possible a number of other improvements and bugfixes. For compatibility purposes, the final version of \pkg{minted} v2.x will be released as the compatibility package \pkg{minted2}. Initial beta versions of minted v3.0 are expected by early 2024. A final minted v3.x release including all planned features is expected before the end of summer 2024.
+% \noindent The original development of \mintedpkg\ version 3 was funded by a \href{https://tug.org/tc/devfund/grants.html}{\TeX\ Development Fund grant} from the \href{https://tug.org/}{\TeX\ Users Group} in 2023.
% \end{abstract}
%
% \vspace{0.5in}
%
% \subsection*{License}
-% \href{http://www.latex-project.org/lppl.txt}{LaTeX Project Public License (LPPL)} version 1.3.
-%
-% Additionally, the project may be distributed under the terms of the 3-Clause
-% (``New'') BSD license: \url{http://opensource.org/licenses/BSD-3-Clause}.
+% \href{https://www.latex-project.org/lppl.txt}{LaTeX Project Public License (LPPL)} version 1.3c.
%
% \pagebreak
%
@@ -510,162 +311,186 @@
%
%
%
-% \texpkg{minted} is a package that allows formatting source code in \LaTeX.
-% For example:
-% \begin{VerbatimOut}[gobble=1]{minted.doc.out}
-% \begin{minted}{<language>}
-% <code>
-% \end{minted}
-% \end{VerbatimOut}
-% \inputminted[gobble=2,frame=lines]{latex}{minted.doc.out}
-%
-% will highlight a piece of code in a chosen language.
-% The appearance can be customized with a number of options and color schemes.
-%
-% Unlike some other packages, most notably \texpkg{listings}, \texpkg{minted} requires
-% the installation of additional software, \app{Pygments}.
-% This may seem like a disadvantage, but there are also significant advantages.
-%
-% \app{Pygments} provides superior syntax highlighting compared to conventional packages.
-% For example, \texpkg{listings} basically only highlights strings, comments and keywords.
-% \app{Pygments}, on the other hand, can be completely customized to highlight any kind of token the
-% source language might support.
-% This might include special formatting sequences inside strings, numbers, different kinds of
-% identifiers and exotic constructs such as HTML tags.
+% \mintedpkg\ provides syntax highlighting using the \href{https://pygments.org/}{Pygments} library. The general strategy is to wrap code in a command or environment that captures it verbatim, like this:
+%\begin{mintedexample}[frame=single]{latex}
+%\begin{minted}{<language>}
+%<code>
+%\end{minted}
+%\end{mintedexample}
%
-% Some languages make this especially desirable.
-% Consider the following Ruby code as an extreme, but at the same time typical, example:
+% Then the code is passed to Python, highlighted with Pygments, and passed back to \LaTeX\ for inclusion in the document. Here is an example with Ruby code, showing the \LaTeX\ source and then the highlighted output:
%
-% \begin{minted}[gobble=3]{ruby}
+% \begin{example}
+% \begin{minted}{ruby}
% class Foo
% def init
% pi = Math::PI
-% @var = "Pi is approx. #{pi}"
+% @var = "Pi = #{pi}..."
% end
% end
% \end{minted}
+% \end{example}
%
-% Here we have four different colors for identifiers (five, if you count keywords) and escapes from
-% inside strings, none of which pose a problem for \app{Pygments}.
-%
-% Additionally, installing \app{Pygments} is actually incredibly easy (see the next section).
+% Because \mintedpkg\ uses Pygments and other Python software, it can provide more highlighting features than are practical in syntax highlighting packages like \href{ https://ctan.org/pkg/listings}{\texpkg{listings}} that are implemented purely in \LaTeX. In the past, this reliance on external software brought several disadvantages, including a requirement for separately installing Pygments. As of \mintedpkg\ version 3, all Python software including Pygments is bundled with the \LaTeX\ package when it is installed with a \TeX\ package manager, and no dependencies must be installed separately.
%
%
% \section{Installation}
%
-% \subsection{Prerequisites}
+% \subsection{Package manager}
%
-% \app{Pygments} is written in Python, so make sure that you have Python 2.6 or later installed on your system. This may be easily checked from the command line:
+% Installation will typically be simpler and faster using your \TeX\ distribution's package manager. Start your package manager's graphical user interface, or use the relevant command below:
+% \begin{itemize}
+% \item TeX Live: |tlmgr install minted|
+% \item MiKTeX: |mpm --admin --install=minted|
+% \end{itemize}
+% When the \mintedpkg\ package is installed, it includes the |latexminted| Python executable and all required Python libraries including Pygments. For these to function correctly, Python 3.8+ must be installed and on |PATH| when the |latexminted| executable runs.
%
-% \begin{Verbatim}[gobble=3,commandchars=\\\{\}]
-% \$ python --version
-% Python 2.7.5
-% \end{Verbatim}
+% Note that if you plan to use Pygments plugin packages, you will need to install the \pypkg{latexminted} Python package and dependencies including Pygments within a Python installation. The Python libraries installed by a \TeX\ package manager within a \TeX\ installation are not compatible with plugin packages. After installing \pypkg{latexminted} within a Python installation, make sure that its |latexminted| executable has precedence on |PATH|.
%
-% If you don't have Python installed, you can download it from the \href{http://www.python.org/download/}{Python website} or
-% use your operating system's package manager.
+% The \mintedpkg\ package has the \LaTeX\ package dependencies listed below. Depending on your \TeX\ distribution and configuration, these may be installed automatically when \mintedpkg\ is installed.
+% \begin{multicols}{4}
+% \begin{itemize}
+% \setlength{\itemsep}{0pt}
+% \setlength{\parskip}{0pt}
+% \setlength{\parsep}{0pt}
+% \item \texpkg{catchfile}
+% \item \texpkg{etoolbox}
+% \item \texpkg{float}
+% \item \texpkg{fvextra}
+% \item \texpkg{latex2pydata}
+% \item \texpkg{newfloat}
+% \item \texpkg{pdftexcmds}
+% \item \texpkg{pgfkeys}
+% \item \texpkg{pgfopts}
+% \item \texpkg{shellesc}
+% \item \texpkg{xcolor}
+% \end{itemize}
+% \end{multicols}
%
-% Some Python distributions include \texpkg{Pygments} (see some of the options under ``Alternative Implementations'' on the Python site). Otherwise, you will need to install \texpkg{Pygments} manually. This may be done by installing \href{http://pypi.python.org/pypi/setuptools}{\app{setuptools}}, which facilitates the distribution of Python applications. You can then install \app{Pygments} using the following command:
-% \begin{Verbatim}[gobble=3,commandchars=\\\{\}]
-% \$ sudo easy_install Pygments
-% \end{Verbatim}
-% Under Windows, you will not need the |sudo|, but may need to run the command prompt as administrator. \texpkg{Pygments} may also be installed with |pip|:
-% \begin{Verbatim}[gobble=3,commandchars=\\\{\}]
-% \$ pip install Pygments
-% \end{Verbatim}
%
-% If you already have \app{Pygments} installed, be aware that the latest version is recommended (at least 1.4 or later). Some features, such as |escapeinside|, will only work with 2.0+. \texpkg{minted} may work with versions as early as 1.2, but there are no guarantees.
+% \subsection{Manual installation}
%
+% \mintedpkg\ source files are available at \href{https://github.com/gpoore/minted}{|github.com/gpoore/minted|}. There is also \href{https://ctan.org/pkg/minted}{|ctan.org/pkg/minted|}.
%
-% \subsection{Required packages}
+% Install |minted.sty| (and |minted2.sty| and |minted1.sty| if desired) within your \TeX\ installation. For TeX Live, it may be best to put style files under |TEXMFLOCAL|, which can be located by running |kpsewhich --var-value TEXMFLOCAL|. For example, you might put the files in |<texlive>/<year>/texmf-local/tex/latex/local/minted|. For further details, consult your \TeX\ distribution's documentation, or an online guide such as \href{https://en.wikibooks.org/wiki/LaTeX/Installing_Extra_Packages}{\Verb{en.wikibooks.org/wiki/LaTeX/Installing_Extra_Packages}} or \href{https://texfaq.org/}{\Verb|texfaq.org|}. After installing the |.sty| files, make \TeX\ aware of the new files by running |texhash| or |mktexlsr| (TeX Live), or |initexmf --update-fndb| (MiKTeX).
%
-% \texpkg{minted} requires that the following packages be available and reasonably up to date on your system. All of these ship with recent \TeX\ distributions.
+% Next, install the Python side of the package. Python 3.8+ is required. There are two options: Install the \pypkg{latexminted} package and dependencies within a Python installation (typically easier, and required for compatibility with Pygments plugin packages), or install them within your \TeX\ installation.
%
-% \begin{multicols}{3}
-% \begingroup
-% \setlength\parskip{0pt}
-% \setlength\topsep{0pt}
-% \begin{list}{\textrm{\labelitemi}}{\ttfamily}
-% \item keyval
-% \item kvoptions
-% \item fancyvrb
-% \item fvextra
-% \item upquote
-% \item float
-% \item ifthen
-% \item calc
-% \item ifplatform
-% \item pdftexcmds
-% \item etoolbox
-% \item xstring
-% \item xcolor
-% \item lineno
-% \item framed
-% \item shellesc (for luatex 0.87+)
-% \item catchfile
-%
-% ~
-% \end{list}
-% \endgroup
-% \end{multicols}
+% Note that if you are only using the \texpkg{minted2} package for backward compatibility with \mintedpkg\ version 2, you do not need \pypkg{latexminted}. \texpkg{minted2} only requires the Pygments package, which can be installed with something like |pip install pygments|, |conda install anaconda::pygments|, or |brew install pygments|, depending on your operating system and Python distribution. You may need to modify the command depending on system versus user installation and depending on virtual environments.
%
+% \subsubsection{Option 1 (recommended): Install \pypkg{latexminted} within Python installation}
%
-% \subsection{Installing \texpkg{minted}}
-% \label{sec:installing:installing}
+% If your Python distribution is compatible with \href{https://pypi.org/}{The Python Package Index (PyPI)}, this can be accomplished by running |pip install latexminted|. This will install \pypkg{latexminted} plus all dependencies including Pygments. You may need to modify the command depending on whether you want a system or user (|--user|) installation, depending on whether you are using virtual environments, and depending on whether something like |pip3| is needed instead of |pip|.
%
-% You can probably install \texpkg{minted} with your \TeX\ distribution's package manager. Otherwise, or if you want the absolute latest version, you can install it manually by following the directions below.
+% If you cannot or do not wish to use PyPI via |pip|, install the following packages manually or from other sources.
+% \begin{itemize}
+% \setlength{\itemsep}{0pt}
+% \setlength{\parskip}{0pt}
+% \setlength{\parsep}{0pt}
+% \item \pypkg{latexminted}: \url{https://pypi.org/project/latexminted/}
+% \item \pypkg{latexrestricted}: \url{https://pypi.org/project/latexrestricted/}
+% \item \pypkg{latex2pydata}: \url{https://pypi.org/project/latex2pydata/}
+% \item Pygments: \url{https://pypi.org/project/Pygments/}
+% \end{itemize}
%
-% You may download |minted.sty| from the
-% \href{https://github.com/gpoore/minted}{project's homepage}. We have to install the file so that \TeX\ is able to find it.
-% In order to do that, please refer to the
-% \href{http://www.tex.ac.uk/cgi-bin/texfaq2html?label=inst-wlcf}{\TeX{} FAQ}.
-% If you just want to experiment with the latest version, you could locate your current |minted.sty| in your \TeX\ installation and replace it with the latest version. Or you could just put the latest |minted.sty| in the same directory as the file you wish to use it with.
+% \subsubsection{Option 2: Install \pypkg{latexminted} within \TeX\ installation}
%
+% This approach is more involved and essentially replicates the process that is performed automatically when using a \TeX\ package manager.
%
-% \section{Basic usage}
+% Install the |latexminted.py| executable within your \TeX\ installation. (It is part of the \mintedpkg\ \LaTeX\ package, separate from the \pypkg{latexminted} Python package.) This should typically be within a |scripts| directory. When TeX Live installs \mintedpkg\ with its package manager, this is something like |<texlive>/<year>/texmf-dist/scripts/minted|.
%
-% \subsection{Preliminary}
-% \label{sec:basic:preliminary}
+% Download Python wheels (|*.whl|) for the following Python packages, and place them in the same location as |latexminted.py|.
+% \begin{itemize}
+% \setlength{\itemsep}{0pt}
+% \setlength{\parskip}{0pt}
+% \setlength{\parsep}{0pt}
+% \item \pypkg{latexminted}: \url{https://pypi.org/project/latexminted/}
+% \item \pypkg{latexrestricted}: \url{https://pypi.org/project/latexrestricted/}
+% \item \pypkg{latex2pydata}: \url{https://pypi.org/project/latex2pydata/}
+% \item Pygments: \url{https://pypi.org/project/Pygments/}
+% \end{itemize}
%
-% Since \texpkg{minted} makes calls to the outside world (that is, \app{Pygments}), you need to tell the
-% \LaTeX{} processor about this by passing it the |-shell-escape| option or it won't allow such calls.
-% In effect, instead of calling the processor like this:
-% \begin{Verbatim}[gobble=3,commandchars=\\\{\}]
-% \$ latex input
-% \end{Verbatim}
+% Under non-Windows operating systems, create a symlink called |latexminted| in the \TeX\ binary directory or another appropriate location that points to |latexminted.py|. When TeX Live installs \mintedpkg\ with its package manager, this is something like |<texlive>/<year>/bin/<architecture>|.
%
-% you need to call it like this:
+% Under Windows, a launcher executable for |latexminted.py| needs to be created. When TeX Live installs \mintedpkg\ with its package manager, it creates a copy of |runscript.exe| named |latexminted.exe| within the \TeX\ binary directory, which is something like |<texlive>/<year>/bin/windows|.
%
-% \begin{Verbatim}[gobble=3,commandchars=\\\{\}]
-% \$ latex -shell-escape input
-% \end{Verbatim}
%
-% The same holds for other processors, such as |pdflatex| or |xelatex|.
%
-% You should be aware that using |-shell-escape| allows \LaTeX\ to run potentially arbitrary commands on your system. It is probably best to use |-shell-escape| only when you need it, and to use it only with documents from trusted sources.
+% \section{Migrating from \mintedpkg\ version 2}
%
+% \mintedpkg\ version 3 is a complete rewrite from version 2.9. A brief summary of changes is provided below. For full details, see |CHANGELOG_MINTED_LATEX_PACKAGE.md|.
%
-% \subsubsection*{Working with OS X}
+% \subsubsection*{Backward compatibility}
%
-% If you are using \texpkg{minted} with some versions/configurations of OS X, and are using caching with a large number of code blocks ($>256$), you may receive an error like
-%\begin{Verbatim}
-%OSError: [Errno 24] Too many open files:
-%\end{Verbatim}
-% This is due to the way files are handled by the operating system, combined with the way that caching works. To resolve this, you may use the OS X commands |launchctl limit maxfiles| or |ulimit -n| to increase the number of files that may be used.
+% The new \texpkg{minted2} package provides the features of \texpkg{minted} version 2.9, the final release before version 3. No additional version 2 releases are planned; no changes to the \texpkg{minted2} package are expected.
+%
+%
+% \subsubsection*{New features and changes}
+%
+% \begin{itemize}
+% \item Version 3 uses a new \mintedpkg-specific Python executable called |latexminted| to perform syntax highlighting. This executable is specifically designed to meet the security requirements for restricted shell escape programs. Once it has passed a security review and is accepted by \TeX\ distributions, it will be possible to highlight code without |-shell-escape| and its attendant security vulnerabilities.
+%
+% Syntax highlighting is still performed with Pygments, but the |pygmentize| executable included with Pygments is no longer used.
+%
+% When \mintedpkg\ is installed with a \TeX\ package manager, the new |latexminted| executable and all Python libraries including Pygments are installed within the \TeX\ installation. A separate step to install Pygments is no longer necessary.
+%
+% \item Temporary files are no longer created unless code needs to be highlighted. There is a new naming scheme for temporary files and for cache files.
+%
+% \item New package options: |debug| (additional debug info during compilation), |highlightmode| (modify when code is highlighted for faster compilation), |placeholder| (insert a placeholder instead of code), and |verbatim| (insert verbatim approximation of code).
+%
+% \item Renamed package options |langlinenos| to |lexerlinenos| and |inputlanglinenos| to |inputlexerlinenos|. The old names are still supported.
+%
+% \item |bgcolor| now uses the new |bgcolor| option from \texpkg{fvextra} v1.8. Because |bgcolor| now introduces no additional whitespace or padding, existing documents may require some modification. Added new option |bgcolorpadding| for modifying padding in background color regions. Added new option |bgcolorvphantom| for setting height of background color in inline contexts. When more sophisticated background colors are needed, \texpkg{tcolorbox} or a similar package should be used.
+%
+% \item The default cache directory name is now |_minted|. All files within a directory now share the same cache, instead of having separate per-document caches. Document-specific caching as in |minted| version 2 can be restored using the package option |cachedir|.
+%
+% \item |\newminted| now creates an environment that takes an optional argument consisting of options, instead of taking no argument.
+%
+% \item File encoding changes: The new |latexminted| executable assumes that \LaTeX\ output files are UTF-8, and saves highlighted code as UTF-8. That is, LaTeX should be configured so that everything is UTF-8. The |encoding| option now defaults to UTF-8. It is only used in decoding files for |\inputminted| and commands based on it. The |outencoding| option is no longer supported.
+%
+% \item Added new options for including ranges of code based on literal string delimiters or regular expressions: |rangestartstring|, |rangestartafterstring|, |rangestopstring|, |rangestopbeforestring|, |rangeregex|.
+%
+% \item There is now support for custom lexers in standalone Python files. See the documentation for the new |.latexminted_config| configuration files for details.
+%
+% \item Several package options are no longer supported and result in errors or warnings. The package options |finalizecache|, |outputdir|, and |kpsewhich| are no longer needed given new \mintedpkg\ version 3 capabilities. The package options |draft| and |final| no longer have any effect and will soon be removed altogether. The new package options |placeholder| and |verbatim| are available in cases where using highlighted code should be completely avoided.
+% \end{itemize}
+%
+%
+%
+% \section{Basic usage}
+%
+% \subsection{The \Verb{latexminted} Python executable and shell escape}
+%
+% The \mintedpkg\ package operates by passing code to the |latexminted| Python executable, which performs syntax highlighting and then returns the highlighted code in \LaTeX\ format.
+%
+% Currently, |latexminted| requires special permission to run. \LaTeX\ must be called with the |-shell-escape| option (TeX Live) or the |-enable-write18| option (MiKTeX). Note that using |-shell-escape| or |-enable-write18| allows \LaTeX\ to run potentially arbitrary commands on your system. These should only be used when necessary, with documents from trusted sources.
%
+% |latexminted| is designed to be compatible with the security requirements for restricted shell escape. Once |latexminted| finishes the security review for restricted shell escape executables, it will function automatically without |-shell-escape| or |-enable-write18|, so long as the default restricted shell escape has not been disabled. It is possible to benefit from these enhanced security capabilities immediately and avoid the need for |-shell-escape| or |-enable-write18| by manually designating |latexminted| as a trusted executable.
+% \begin{itemize}
+% \item TeX Live: Copy the variable |shell_escape_commands| from the distribution |texmf.cnf| (something like |<texlive>/<yr>/texmf-dist/web2c/texmf.cnf|) into the user |texmf.cnf| (something like |<texlive>/<yr>/texmf.cnf|), and then add |latexminted| to the |shell_escape_commands| list. The location of the |texmf.cnf| files can be determined by running |kpsewhich -all texmf.cnf|. Note that under Windows, this only works when |latexminted| is installed within a TeX Live installation; it is not compatible with |latexminted| being installed in a Python installation.
+% \item MiKTeX: Add a line |AllowedShellCommands[] = latexminted| to the existing list of allowed commands in |miktex.ini|. You may want to modify the user-scoped configuration instead of the system-wide configuration. See the \href{https://docs.miktex.org/manual/miktex.ini.html}{MiKTeX documentation} for more details, particularly |initexmf --edit-config-file| and |initexmf --set-config-value|.
+% \end{itemize}
+%
+% For the |latexminted| Python executable to correctly inherit security settings from \LaTeX, there are requirements for system configuration when multiple \TeX\ installations are present.
+% \begin{itemize}
+% \item With MiKTeX on systems with multiple MiKTeX installations, the desired MiKTeX installation must be the first MiKTeX installation on |PATH|.
+% \item With TeX Live on Windows systems with multiple TeX Live installations, the desired TeX Live installation must be the first TeX Live installation on |PATH|.
+% \end{itemize}
+% See the \href{https://github.com/gpoore/latexrestricted}{\pypkg{latexrestricted}} documentation for details.
%
%
% \subsection{A minimal complete example}
%
-% The following file |minimal.tex| shows the basic usage of \texpkg{minted}.
+% The following file |minimal.tex| shows the basic usage of \mintedpkg.
%
% \begin{VerbatimOut}[gobble=1]{minted.doc.out}
% \documentclass{article}
%
% \usepackage{minted}
+% \usepackage[svgnames]{xcolor}
%
% \begin{document}
-% \begin{minted}{c}
+% \begin{minted}[bgcolor=Beige, bgcolorpadding=0.5em]{c}
% int main() {
% printf("hello, world");
% return 0;
@@ -673,55 +498,47 @@
% \end{minted}
% \end{document}
% \end{VerbatimOut}
-% \inputminted[gobble=2,frame=lines]{latex}{minted.doc.out}
-%
-% By compiling the source file like this:
+% \inputminted[frame=single]{latex}{minted.doc.out}
%
-% \begin{Verbatim}[gobble=3,commandchars=\\\{\}]
-% \$ pdflatex -shell-escape minimal
-% \end{Verbatim}
+% This document can be compiled by running ``|pdflatex -shell-escape minimal|''
+% to produce the following output in |minimal.pdf|:
%
-% we end up with the following output in |minimal.pdf|:
-%
-% \hfill
-% \colorbox{minted@samplebg}{\begin{minipage}{0.6\textwidth}
-% \inputminted[firstline=7,lastline=10]{c}{minted.doc.out}
-% \end{minipage}}
-% \hfill\hfill
+% \begin{center}
+% \begin{minipage}{0.6\textwidth}
+% \inputminted[rangeregex=\^\\s*int.+?\\\}, rangeregexdotall=true, rangeregexmultiline=true, bgcolor=Beige, bgcolorpadding=0.5em]{c}{minted.doc.out}
+% \end{minipage}
+% \end{center}
%
%
% \subsection{Formatting source code}
%
% \DescribeEnv{minted}
-% Using \texpkg{minted} is straightforward. For example, to highlight some Python source code we might use
-% the following code snippet (result on the right):
+% The |minted| environment highlights a block of code:
%
% \begin{example}
-% \begin{minted}{python}
-% def boring(args = None):
-% pass
-% \end{minted}
+% \begin{minted}{python}
+% def boring(args = None):
+% pass
+% \end{minted}
% \end{example}
%
-% Optionally, the environment accepts a number of options in |key=value| notation, which are described
-% in more detail below.
+% The environment accepts a number of optional arguments in |key=value| notation. These are described in \cref{sec:options:macro}.
%
-% To use \texpkg{minted} with a language that is not supported by Pygments, or simply to disable highlighting, set the language to |text|: |\begin{minted}{text}|.
+% To use \mintedpkg\ with a language that is not supported by Pygments, or simply to disable highlighting, set the language to |text|: |\begin{minted}{text}|.
%
%
% \DescribeMacro{\mint}
-% For a single line of source code, you can alternatively use a shorthand notation:
+% For a single line of source code, you can use |\mint| as a shorthand for |minted|:
%
% \begin{example}
-% \mint{python}|import this|
+% \mint{python}/import this/
% \end{example}
%
% This typesets a single line of code using a command rather than an environment, so it saves a little typing, but its output is equivalent to that of the |minted| environment.
%
% The code is delimited by a pair of identical characters, similar to how |\verb| works. The complete syntax is \cmd\mint\oarg{options}\marg{language}\meta{delim}\meta{code}\meta{delim},
% where the code delimiter can be almost any punctuation character.
-% The \meta{code} may also be delimited with matched curly braces |{}|, so long as \meta{code} itself does not contain unmatched curly braces.
-% Again, this command supports a number of options described below.
+% The \meta{code} may also be delimited with paired curly braces |{}|, so long as \meta{code} itself does not contain unpaired curly braces.
%
% Note that the |\mint| command \textbf{is not for inline use}. Rather, it is a shortcut for |minted| when only a single line of code is present. The |\mintinline| command is provided for inline use.
%
@@ -730,73 +547,61 @@
% Code can be typeset inline:
%
% \begin{example}
-% X\mintinline{python}{print(x**2)}X
+% \mintinline{py}{print("Hello!")}
% \end{example}
%
% The syntax is \cmd\mintinline\oarg{options}\marg{language}\meta{delim}\meta{code}\meta{delim}. The delimiters can be a single repeated character, just like for \cmd{\verb}. They can also be a pair of curly braces, |{}|. Curly braces are required when \cmd{\mintinline} is used in a movable argument, such as in a \cmd{\section}.
%
-% Unlike \cmd{\verb}, \cmd{\mintinline} can usually be used inside other commands. The main exception is when the code contains the percent \texttt{\%} or hash \texttt{\#} characters, or unmatched curly braces. For example, \cmd{\mintinline} typically works in \cmd{\footnote} and \cmd{\section}! Note that some document classes or packages, such as \texpkg{memoir}, redefine \cmd{\section} or have options that modify it in ways that are incompatible with \cmd{\mintinline}. If you use \cmd{\mintinline} inside \cmd{\section} or otherwise in a movable argument, you should experiment to make sure it is compatible with your document configuration. You may also want to consider \texpkg{fvextra}'s \cmd{\Verb} or \cmd{\EscVerb} as an alternative.
+% Unlike \cmd{\verb}, \cmd{\mintinline} can usually be used inside other commands. The main exception is when the code contains the percent \texttt{\%} or hash \texttt{\#} characters, or unpaired curly braces. For example, \cmd{\mintinline} typically works in \cmd{\footnote} and \cmd{\section}! Note that some document classes or packages, such as \texpkg{memoir}, redefine \cmd{\section} or have options that modify it in ways that are incompatible with \cmd{\mintinline}. If you use \cmd{\mintinline} inside \cmd{\section} or otherwise in a movable argument, you should experiment to make sure it is compatible with your document configuration. You may also want to consider \texpkg{fvextra}'s \cmd{\Verb} or \cmd{\EscVerb} as an alternative.
%
% The code typesetting for \cmd{\mintinline} is based on \texpkg{fvextra}'s \cmd{\Verb}. See the \href{https://github.com/gpoore/fvextra/}{\texpkg{fvextra} documentation on \cmd{\Verb}} for additional details about functionality and limitations.
%
% \DescribeMacro{\inputminted}
-% Finally, there's the |\inputminted| command to read and format whole files.
+% Finally, there's the |\inputminted| command to input external files.
% Its syntax is \cmd\inputminted\oarg{options}\marg{language}\marg{filename}.
%
-% \warn: \meta{filename} is used to generate a shell command for highlighing the file. Due to limitations in the design of \texpkg{minted} and limitations with TeX as a programming language, there is currently no escaping or sanitization of the filename as part of this process. Providing a malformed filename can execute arbitrary system commands. For example, providing ``|file.txt; touch file2.txt|'' as \meta{filename} could highlight one file while subsequently creating a new file. (Issue \href{https://github.com/gpoore/minted/issues/338}{\#338}.)
-%
%
% \subsection{Using different styles}
%
% \DescribeMacro{\usemintedstyle}
-% Instead of using the default style you may choose another stylesheet provided by \app{Pygments}. This may be done via the following:
%
-% \mint[frame=lines]{latex}/\usemintedstyle{name}/
-%
-% The full syntax is \cmd\usemintedstyle\oarg{language}\marg{style}. The style may be set for the document as a whole (no language specified), or only for a particular language. Note that the style may also be set via \cmd\setminted\ and via the optional argument for each command and environment.\footnote{Version 2.0 added the optional language argument and removed the restriction that the command be used in the preamble.}
+% \DescribeMacro{\setminted}
+% Instead of using the default highlighting style you may choose another style provided by Pygments. There are two equivalent ways to do this:
%
-% Highlighting styles with examples can be viewed online at \href{https://pygments.org/styles/}{pygments.org/styles}. It is possible to preview your code with different styles using the online demo at \href{http://pygments.org/demo/}{pygments.org/demo}. Available styles can also be listed by executing the following command on the command line:
+% \begin{minted}{latex}
+% \usemintedstyle{name}
+% \setminted{style=name}
+% \end{minted}
%
-% \begin{Verbatim}[gobble=3,commandchars=\\\{\}]
-% \$ pygmentize -L styles
-% \end{Verbatim}
+% The |\setminted| approach has the advantage that other \mintedpkg\ options are accepted as well; |\usemintedstyle| is restricted to style modifications. The full syntax is \cmd\usemintedstyle\oarg{language}\marg{style} and \cmd\setminted\oarg{language}\marg{key=value}. The style may be set for the document as a whole (no language specified), or only for a particular language. Note that the style may also be set via the optional argument for each command and environment.
%
+% Highlighting styles with examples are at \href{https://pygments.org/styles/}{pygments.org/styles}. It is possible to preview your code with different styles using the online demo at \href{https://pygments.org/demo/}{pygments.org/demo}. Available styles can also be listed by running the command |pygmentize -L styles|.
%
-% Creating your own styles is also easy. Just follow the instructions provided on the
-% \href{http://pygments.org/docs/styles/#creating-own-styles}{\texpkg{Pygments} website}.
+% It is also possible to create your own styles. See the instructions on the
+% \href{https://pygments.org/docs/styles/#creating-own-styles}{\texpkg{Pygments} website}.
+% \mintedpkg\ only supports style names that match the regular expression |^[0-9A-Za-z_-]+$|.
%
%
% \subsection{Supported languages}
%
-% \app{Pygments} supports hundreds of different programming languages, template languages, and other markup languages. To see an exhaustive list of the currently supported languages, use the command
+% Pygments supports hundreds of different programming languages, template languages, and other markup languages. The list of currently supported languages is at \href{https://pygments.org/docs/lexers/}{pygments.org/docs/lexers/}. You can also run |pygmentize -L lexers|.
%
-% \begin{Verbatim}[gobble=3,commandchars=\\\{\}]
-% \$ pygmentize -L lexers
-% \end{Verbatim}
%
%
% \section{Floating listings}\label{sec:float}
%
% \DescribeEnv{listing}
-% \texpkg{minted} provides the |listing| environment to wrap around a source code block. This puts the code into a floating box, with the default placement |tbp| like figures and tables. You can also provide a |\caption| and a |\label| for such a listing in the usual way (that is, as for the |figure| and |table| environments):
-% \begin{VerbatimOut}[gobble=1]{minted.doc.out}
-% \begin{listing}[H]
-% \mint{cl}/(car (cons 1 '(2)))/
-% \caption{Example of a listing.}
-% \label{lst:example}
-% \end{listing}
-%
-% Listing \ref{lst:example} contains an example of a listing.
-% \end{VerbatimOut}
-% \inputminted[gobble=2,frame=lines]{latex}{minted.doc.out}
+% \mintedpkg\ provides a |listing| environment that can be used to wrap code blocks. This puts the code in a floating box similar to a figure or table, with default placement |tbp|. You can also provide a |\caption| and a |\label|:
%
-% will yield:
+% \begin{longexample}
+% \begin{listing}[H]
+% \mint{cl}/(car (cons 1 '(2)))/
+% \caption{Example of a listing.}
+% \label{lst:example}
+% \end{listing}
%
-% \hfill
-% \colorbox{minted@samplebg}{\begin{minipage}{0.6\textwidth}
-% \input{minted.doc.out}
-% \end{minipage}}
-% \hfill\hfill
+% Listing \ref{lst:example} contains an example of a listing.
+% \end{longexample}
%
% The default |listing| placement can be modified easily. When the package option |newfloat=false| (default), the \texpkg{float} package is used to create the |listing| environment. Placement can be modified by redefining |\fps@listing|. For example,
%\begin{verbatim}
@@ -818,7 +623,7 @@
% \end{example}
%
% \subsection*{Customizing the \texttt{listing} environment}
-% By default, the |listing| environment is created using the \texpkg{float} package. In that case, the |\listingscaption| and |\listoflistingscaption| macros described below may be used to customize the caption and list of listings. If \texpkg{minted} is loaded with the |newfloat| option, then the |listing| environment will be created with the more powerful \href{http://www.ctan.org/pkg/newfloat}{\texpkg{newfloat}} package instead. \texpkg{newfloat} is part of \href{http://www.ctan.org/pkg/caption}{\texpkg{caption}}, which provides many options for customizing captions.
+% By default, the |listing| environment is created using the \texpkg{float} package. In that case, the |\listingscaption| and |\listoflistingscaption| macros described below may be used to customize the caption and list of listings. If \mintedpkg\ is loaded with the |newfloat| option, then the |listing| environment will be created with the more powerful \href{https://www.ctan.org/pkg/newfloat}{\texpkg{newfloat}} package instead. \texpkg{newfloat} is part of \href{https://www.ctan.org/pkg/caption}{\texpkg{caption}}, which provides many options for customizing captions.
%
% When \texpkg{newfloat} is used to create the |listing| environment, customization should be achieved using \texpkg{newfloat}'s |\SetupFloatingEnvironment| command. For example, the string ``Listing'' in the caption could be changed to ``Program code'' using
%\begin{verbatim}
@@ -830,155 +635,189 @@
% Refer to the \texpkg{newfloat} and \texpkg{caption} documentation for additional information.
%
% \DescribeMacro{\listingscaption}
-% (Only applies when package option |newfloat| is not used.) The string ``Listing'' in a listing's caption can be changed.
-% To do this, simply redefine the macro |\listingscaption|, for example:
+% This allows the string ``Listing'' in a listing's caption to be customized. It only applies when package option |newfloat=false|. For example:
%
-% \mint[frame=lines]{latex}/\renewcommand{\listingscaption}{Program code}/
+%\begin{verbatim}
+%\renewcommand{\listingscaption}{Program code}
+%\end{verbatim}
%
% \DescribeMacro{\listoflistingscaption}
-% (Only applies when package option |newfloat| is not used.) Likewise, the caption of the listings list, ``List of Listings,'' can be changed by redefining
-% |\listoflistingscaption|:
+% This allows the caption of the listings list, ``List of Listings,'' to be customized. It only applies when package option |newfloat=false|. For example:
%
-% \mint[frame=lines]{latex}/\renewcommand{\listoflistingscaption}{List of Program Code}/
+%\begin{verbatim}
+%\renewcommand{\listoflistingscaption}{List of Program Code}
+%\end{verbatim}
%
%
-% \section{Options}
%
+% \section{Configuration}
%
%
-% \subsection{Package options}
+% \subsection{\mintedpkg\ config file \Verb{.latexminted_config}}
%
-% \DescribeMacro{chapter}
-% To control how \LaTeX{} counts the |listing| floats, you can pass either the
-% |section| or |chapter| option when loading the \texpkg{minted} package.
-% For example, the following will cause listings to be counted by chapter:
+% Several \mintedpkg\ settings with security implications can be customized with a config file |.latexminted_config|. This config file is loaded by the |latexminted| Python executable when it runs.
%
-% \mint[frame=lines]{latex}/\usepackage[chapter]{minted}/
+% The |latexminted| Python executable looks for |.latexminted_config| files in the following locations:
+% \begin{itemize}
+% \item User home directory, as found by Python's \href{https://docs.python.org/3/library/pathlib.html#pathlib.Path.home}{|pathlib.Path.home()|}.
+% \item |TEXMFHOME|. With MiKTeX on systems with multiple MiKTeX installations, this will be the |TEXMFHOME| from the first MiKTeX installation on |PATH|. With TeX Live on Windows systems with multiple TeX Live installations, this will be the |TEXMFHOME| from the first TeX Live installation on |PATH|. In all other cases, |TEXMFHOME| will correspond to the currently active \TeX\ installation. See the \href{https://github.com/gpoore/latexrestricted}{\pypkg{latexrestricted}} documentation for details. \pypkg{latexrestricted} is used by the |latexminted| Python executable to retrieve the value of |TEXMFHOME|.
+% \item The current \TeX\ working directory. Note that |enable_cwd_config| must be set |true| in the |.latexminted_config| in the user home directory or in the |TEXMFHOME| directory to enable this; |.latexminted_config| in the current \TeX\ working directory is not enabled by default for security reasons. Even when a config file in the current \TeX\ working directory is enabled, it cannot be used to modify certain security-related settings.
+% \end{itemize}
%
+% Overall configuration is derived by merging all config files, with later files in the list above having precedence over earlier files. Boolean and string values are overwritten by later config files. Collection values (currently only sets derived from lists) are merged with earlier values.
+%
+% The |.latexminted_config| file may be in Python literal format (dicts and lists of strings and bools), JSON, or TOML (requires Python 3.11+). It must be encoded as UTF-8.
%
-% \DescribeMacro{cache=\meta{boolean} (default:~true)}
-% \texpkg{minted} works by saving code to a temporary file, highlighting the code via \app{Pygments} and saving the output to another temporary file, and inputting the output into the \LaTeX\ document. This process can become quite slow if there are several chunks of code to highlight. To avoid this, the package provides a |cache| option. This is on by default.
%
-% The |cache| option creates a directory |_minted-|\meta{jobname} in the document's root directory (this may be customized with the |cachedir| option).\footnote{The directory is actually named using a ``sanitized'' copy of \meta{jobname}, in which spaces and asterisks have been replaced by underscores, and double quotation marks have been stripped. If the file name contains spaces, \texttt{\string\jobname} will contain a quote-wrapped name, except under older versions of MiKTeX which used the name with spaces replaced by asterisks. Using a ``sanitized'' \meta{jobname} is simpler than accomodating the various escaping conventions.} Files of highlighted code are stored in this directory, so that the code will not have to be highlighted again in the future. In most cases, caching will significantly speed up document compilation.
+% \subsubsection*{Config settings}
%
-% Cached files that are no longer in use are automatically deleted.\footnote{This depends on the main auxiliary file not being deleted or becoming corrupted. If that happens, you could simply delete the cache directory and start over.}
+% \begin{description}
+% \item[{\Verb/security: dict[str, str | bool]/}] These settings relate to |latexminted| security. They can only be set in |.latexminted_config| in the user home directory or in |TEXMFHOME|. They cannot be set in |.latexminted_config| in the current \TeX\ working directory.
+% \begin{description}
+% \item[\Verb|enable_cwd_config: bool = False|] Load a |.latexminted_config| file from the current \TeX\ working directory if it exists. This is disabled by default because the config file can enable |custom_lexers|, which is equivalent to arbitrary code execution.
+% \item[\Verb/file_path_analysis: "resolve" | "string" = "resolve"/] This specifies how |latexminted| determines whether files are readable and writable. Relative file paths are always treated as being relative to the current \TeX\ working directory.
%
+% With |resolve|, any symlinks in file paths are resolved with the file system before paths are compared with permitted \LaTeX\ read/write locations. Arbitrary relative paths including ``|..|'' are allowed so long as the final location is permitted.
%
-% \DescribeMacro{cachedir=\meta{directory} (def:~\_minted-\meta{jobname})}
-% This allows the directory in which cached files are stored to be specified. Paths should use forward slashes, even under Windows.
+% With |string|, paths are analyzed as strings in comparing them with permitted \LaTeX\ read/write locations. This follows the approach taken in \TeX's file system security. Paths cannot contain ``|..|'' to access a parent directory, even if the parent directory is a valid location. Because symlinks are not resolved with the file system, it is possible to access locations outside permitted \LaTeX\ read/write locations, if the permitted locations contain symlinks to elsewhere.
%
-% Special characters must be escaped. For example, |cachedir=~/mintedcache| would not work because the tilde |~| would be converted into the \LaTeX\ commands for a non-breaking space, rather than being treated literally. Instead, use |\string~/mintedcache|, |\detokenize{~/mintedcache}|, or an equivalent solution.
+% \item[{\Verb|permitted_pathext_file_extensions: list[str]|}] As a security measure under Windows, \LaTeX\ cannot write files with file extensions in |PATHEXT|, such as |.bat| and |.exe|. This setting allows |latexminted| to write files with the specified file extensions, overriding \LaTeX\ security. File extensions should be in the form ``|.<ext>|'', for example, ``|.bat|''. This setting is used in extracting source code from \LaTeX\ documents and saving it in standalone source files.
%
-% Paths may contain spaces, but only if the entire \meta{directory} is wrapped in curly braces |{}|, and only if the spaces are quoted. For example,
+% When these file extensions are enabled for writing, as a security measure |latexminted| will only allow them to be created in \textbf{subdirectories} of the current \TeX\ working directory, |TEXMFOUTPUT|, and |TEXMF_OUTPUT_DIRECTORY|. These files cannot be created directly under the \TeX\ working directory, |TEXMFOUTPUT|, and |TEXMF_OUTPUT_DIRECTORY| because those locations are more likely to be used as a working directory in a shell, and thus writing executable files in those locations would increase the risk of accidental code execution.
+% \end{description}
+%
+% \item[{\Verb/custom_lexers: dict[str, str | list[str]]/}] This is a mapping of custom lexer file names to SHA256 hashes. Only custom lexers with these file names and the corresponding hashes are permitted. Lists of hashes are allowed to permit multiple versions of a lexer with a given file name. All other custom lexers are prohibited, because loading custom lexers is equivalent to arbitrary code execution. For example:
+%\begin{verbatim}
+%"custom_lexers": {
+% "mylexer.py": "<sha256>"
+%}
+%\end{verbatim}
+%
+% By default, it is assumed that custom lexer files implement a class |CustomLexer|. This can be modified by including the lexer class name with the file name, separated by a colon, when the lexer is used. For example:
+%
+%\begin{verbatim}
+%\inputminted{./<path>/mylexer.py:LexerClass}{<file>}
+%\end{verbatim}
+%
+% Note that |custom_lexers| only applies to custom lexers in standalone Python files. Lexers that are installed within Python as plugin packages work automatically with Pygments and do not need to be enabled separately. However, in that case it is necessary to install \pypkg{latexminted} and Pygments within a Python installation. When \TeX\ package managers install \pypkg{latexminted} and Pygments within a \TeX\ installation, these are not compatible with Pygments plugin packages.
+% \end{description}
+%
+%
+% \subsection{macOS compatibility}
+% \label{sec:configuration:macos}
+%
+% If you are using \mintedpkg\ with some versions/configurations of macOS, and are using caching with a large number of code blocks ($>256$), you may receive a Python error during syntax highlighting that looks like this:
%\begin{Verbatim}
-%cachedir = {\detokenize{~/"minted cache"/"with spaces"}}
+%OSError: [Errno 24] Too many open files:
%\end{Verbatim}
+% This is due to the way files are handled by the operating system, combined with the way that caching works. To resolve this, you may use one of the following commands to increase the number of files that may be used:
+% \begin{itemize}
+% \item |launchctl limit maxfiles|
+% \item |ulimit -n|
+% \end{itemize}
%
-% Note that the cache directory is relative to the |outputdir|, if an |outputdir| is specified.
%
+% \section{Options}
%
-% \DescribeMacro{finalizecache=\meta{boolean} (default:~false)}
-% In some cases, it may be desirable to use \texpkg{minted} in an environment in which |-shell-escape| is not allowed. A document might be submitted to a publisher or preprint server or used with an online service that does not support |-shell-escape|. This is possible as long as \texpkg{minted} content does not need to be modified.
%
-% Compiling with the |finalizecache| option prepares the cache for use in an environment without |-shell-escape|.\footnote{Ordinarily, cache files are named using an MD5 hash of highlighting settings and highlighted text. \texttt{finalizecache} renames cache files using a \texttt{listing<number>.pygtex} scheme. This makes it simpler to match up document content and cache files, and is also necessary for the XeTeX engine since prior to TeX Live 2016 it lacked the built-in MD5 capabilities that pdfTeX and LuaTeX have.} Once this has been done, the |finalizecache| option may be swapped for the |frozencache| option, which will then use the frozen (static) cache in the future, without needing |-shell-escape|.
%
+% \subsection{Package options}
%
-% \DescribeMacro{fontencoding=\meta{encoding} (default:~\meta{doc~encoding})}
-% Set font encoding used for typesetting code.
+% \DescribeMacro{chapter}
+% To control how \LaTeX{} counts the |listing| floats, you can pass either the
+% |chapter| or |section| option when loading the \mintedpkg\ package.
+% For example, the following will cause listings to be counted by chapter:
%
-% For example, |fontencoding=T1|.
+% \begin{minted}{latex}
+% \usepackage[chapter]{minted}
+% \end{minted}
%
-% \DescribeMacro{frozencache=\meta{boolean} (default:~false)}
-% Use a frozen (static) cache created with the |finalizecache| option. When |frozencache| is on, |-shell-escape| is not needed, and Python and Pygments are not required. In addition, any external files accessed through |\inputminted| are no longer necessary.
%
-% \textbf{This option must be used with care. A document \emph{must} be in final form, as far as \texpkg{minted} is concerned, \emph{before} \texttt{frozencache} is turned on, and the document \emph{must} have been compiled with \texttt{finalizecache}. When this option is on, \texpkg{minted} content cannot be modified, except by editing the cache files directly. Changing any \texpkg{minted} settings that require Pygments or Python is not possible. If \texpkg{minted} content is incorrectly modified after \texttt{frozencache} is turned on, \texpkg{minted} \emph{cannot} detect the modification.}
+% \DescribeMacro{cache=\meta{boolean} (default:~true)}
+% \mintedpkg\ works by saving code to a temporary file, highlighting it with Pygments, and then passing the result back to \LaTeX\ for inclusion in the document. This process can become quite slow if there are several chunks of code to highlight. To avoid this, the package provides a |cache| option. This is on by default.
%
-% If you are using |frozencache|, and want to verify that \texpkg{minted} settings or content have not been modified in an invalid fashion, you can test the cache using the following procedure.
-% \begin{enumerate}
-% \item Obtain a copy of the cache used with |frozencache|.
-% \item Compile the document in an environment that supports |-shell-escape|, with |finalizecache=true| and |frozencache=false|. This essentially regenerates the frozen (static) cache.
-% \item Compare the original cache with the newly generated cache. Under Linux and OS X, you could use |diff|; under Windows, you probably want |fc|. If \texpkg{minted} content and settings have not been modified in an invalid fashion, all files will be identical (assuming that compatible versions of Pygments are used for both caches).
-% \end{enumerate}
+% The |cache| option creates a directory |_minted| in the document's root directory (this may be customized with the |cachedir| option). Files of highlighted code are stored in this directory, so that the code will not have to be highlighted again in the future. Cache files that are no longer used are automatically deleted. In most cases, caching will significantly speed up document compilation.
%
%
-% \DescribeMacro{draft=\meta{boolean} (default:~false)}
-% This uses \texpkg{fancyvrb} alone for all typesetting; \app{Pygments} is not used. This trades syntax highlighting and some other \app{minted} features for faster compiling. Performance should be essentially the same as using \texpkg{fancyvrb} directly; no external temporary files are used. Note that if you are not changing much code between compiles, the difference in performance between caching and draft mode may be minimal. Also note that |draft| settings are typically inherited from the document class.
+% \DescribeMacro{cachedir=\meta{directory} (default:~\_minted)}
+% This allows the directory in which cache files are stored to be customized. Paths should use forward slashes, even under Windows. Special characters must be escaped with |\string| or |\detokenize|.
%
-% Draft mode does not support |autogobble|. Regular |gobble|, |linenos|, and most other options not related to syntax highlighting will still function in draft mode.
+% Note that the cache directory is relative to |-output-directory| or equivalently the |TEXMF_OUTPUT_DIRECTORY| environment variable, if that is set.
%
-% Documents can usually be compiled without shell escape in draft mode. The \texpkg{ifplatform} package may issue a warning about limited functionality due to shell escape being disabled, but this may be ignored in almost all cases. (Shell escape is only really required if you have an unusual system configuration such that the |\ifwindows| macro must fall back to using shell escape to determine the system. See the \texpkg{ifplatform} documentation for more details: \url{http://www.ctan.org/pkg/ifplatform}.)
%
-% If the |cache| option is set, then all existing cache files will be kept while draft mode is on. This allows caching to be used intermitently with draft mode without requiring that the cache be completely recreated each time. Automatic cleanup of cached files will resume as soon as draft mode is turned off. (This assumes that the auxiliary file has not been deleted in the meantime; it contains the cache history and allows automatic cleanup of unused files.)
+% \DescribeMacro{debug=\meta{boolean} (default:~false)}
+% Provide additional information for aid in debugging. This keeps temp files that are used in generating highlighted code and also writes additional information to the log.
%
%
-% \DescribeMacro{final=\meta{boolean} (default:~true)}
-% This is the opposite of |draft|; it is equivalent to |draft=false|. Again, note that |draft| and |final| settings are typically inherited from the document class.
+% \DescribeMacro{frozencache=\meta{boolean} (default:~false)}
+% Use a frozen (static) cache. When |frozencache=true|, Python and Pygments are not required, and any external files accessed through |\inputminted| are no longer necessary. If a cache file is missing, an error will be reported and there will be no attempt to generate the missing cache file.
%
+% When using |frozencache| with |-output-directory|, the |cachedir| package option should be used to specify a full relative path to the cache (for example, |cachedir=./<output_directory>/_minted|).
%
-% \DescribeMacro{inputlanglinenos=\meta{boolean} (default:~false)}
-% This enables |langlinenos| and causes it to apply to |\inputminted| (and custom commands based on it) in addition to |minted| environments and |\mint| commands (and custom environments/commands based on them).
%
-% The regular |langlinenos| option treats all code within a document's |.tex| files as having one set of line numbering per language, and then treats each inputted source file as having its own separate numbering. |inputlanglinenos| defines a single numbering per language, regardless of where code originates.
+% \DescribeMacro{highlightmode=\meta{string} (default:~fastfirst)}
+% Determines when code is highlighted.
%
+% The default is |fastfirst|. If a cache for the document exists, then code is highlighted immediately. If a cache for the document does not exist, then typeset a placeholder instead of code and highlight all code at the end of the document. This will require a second compile before code is typeset, but because all code is highlighted at once, there is less overhead and the total time required can be significantly less for documents that include many code snippets.
%
-% \DescribeMacro{kpsewhich=\meta{boolean} (default:~false)}
-% This option uses |kpsewhich| to locate files that are to be highlighted. Some build tools such as |texi2pdf| function by modifying |TEXINPUTS|; in some cases, users may customize |TEXINPUTS| as well. The |kpsewhich| option allows \texpkg{minted} to work with such configurations.
+% The alternatives are |fast| (always highlight at end of document, requiring a second compile) and |immediate| (always highlight immediately, so no second compile is needed). |immediate| should be used when typesetting code in external temp files that are overwritten during compilation.
%
-% This option may add a noticeable amount of overhead on some systems, or with some system configurations.
+% When code is highlighted at the end of the document with |fast| or |fastfirst|, any error and warning messages will refer to a location at the end of the document rather than the original code location, since highlighting occurred at the end of the document. In this case, messages are supplemented with original \LaTeX\ source file names and line numbers to aid in debugging.
%
-% This option does \emph{not} make \texpkg{minted} work with the |-output-directory| and |-aux-directory| command-line options for \LaTeX. For those, see the |outputdir| package option.
%
+% \DescribeMacro{inputlexerlinenos=\meta{boolean} (default:~false)}
+% This enables |lexerlinenos| and causes it to apply to |\inputminted| (and custom commands based on it) in addition to |minted| environments and |\mint| commands (and custom environments/commands based on them).
%
-% \DescribeMacro{langlinenos=\meta{boolean} (default:~false)}
-% This allows all |minted| environments and |\mint| commands (and custom environments/commands based on them) for a given language to share line numbering when |firstnumber=last|, so that each subsequent command/environment has line numbering that continues from the previous one. This does not apply to |\inputminted| (and custom commands based on it); see the package option |inputlanglinenos| for that.
+% The regular |lexerlinenos| option treats all code within a document's |.tex| files as having one set of line numbering per language, and then treats each inputted source file as having its own separate numbering. |inputlexerlinenos| defines a single numbering per lexer, regardless of where code originates.
%
-% \texpkg{minted} uses the \texpkg{fancyvrb} package behind the scenes for the code typesetting. \texpkg{fancyvrb} provides an option |firstnumber| that allows the starting line number of an environment to be specified. For convenience, there is an option |firstnumber=last| that allows line numbering to pick up where it left off. The |langlinenos| option makes |firstnumber| work for each language individually with all |minted| and |\mint| usages. For example, consider the code and output below.
%
-% \begin{VerbatimOut}[gobble=1]{minted.doc.out}
-% \begin{minted}[linenos]{python}
-% def f(x):
-% return x**2
-% \end{minted}
+% \DescribeMacro{lexerlinenos=\meta{boolean} (default:~false)}
+% This allows all |minted| environments and |\mint| commands (and custom environments/commands based on them) for a given lexer (language) to share line numbering when |firstnumber=last|, so that each subsequent command/environment has line numbering that continues from the previous one. This does not apply to |\inputminted| (and custom commands based on it); see the package option |inputlexerlinenos| for that.
%
-% \begin{minted}[linenos]{ruby}
-% def func
-% puts "message"
-% end
-% \end{minted}
+% \mintedpkg\ uses the \texpkg{fancyvrb} package behind the scenes for the code typesetting. \texpkg{fancyvrb} provides an option |firstnumber| that allows the starting line number of an environment to be specified. For convenience, there is an option |firstnumber=last| that allows line numbering to pick up where it left off. The |lexerlinenos| option makes |firstnumber| work for each lexer (language) individually with all |minted| and |\mint| usages. For example, consider the code and output below.
%
-% \begin{minted}[linenos, firstnumber=last]{python}
-% def g(x):
-% return 2*x
-% \end{minted}
-% \end{VerbatimOut}
-% \inputminted[frame=single, rulecolor=minted@linkcolor]{latex}{minted.doc.out}
-% \hfill
-% \colorbox{minted@samplebg}{\begin{minipage}{0.6\textwidth}
-% \input{minted.doc.out}
-% \end{minipage}}
-% \hfill\hfill
+% \begin{longexample}[xleftmargin=1em]
+% \begin{minted}[linenos]{python}
+% def f(x):
+% return x**2
+% \end{minted}
%
-% Without the |langlinenos| option, the line numbering in the second Python environment would not pick up where the first Python environment left off. Rather, it would pick up with the Ruby line numbering.
+% \begin{minted}[linenos]{ruby}
+% def func
+% puts "message"
+% end
+% \end{minted}
+%
+% \begin{minted}[linenos, firstnumber=last]{python}
+% def g(x):
+% return 2*x
+% \end{minted}
+% \end{longexample}
+%
+% Without the |lexerlinenos| option, the line numbering in the second Python environment would not pick up where the first Python environment left off. Rather, it would pick up with the Ruby line numbering.
%
%
% \DescribeMacro{newfloat=\meta{boolean} (default:~false)}
% By default, the |listing| environment is created using the \texpkg{float} package. The |newfloat| option creates the environment using \texpkg{newfloat} instead. This provides better integration with the \texpkg{caption} package.
%
%
-% \DescribeMacro{outputdir=\meta{directory} (default:~\meta{none})}
-% The |-output-directory| and |-aux-directory| (MiKTeX) command-line options for \LaTeX\ cause problems for \texpkg{minted}, because the \texpkg{minted} temporary files are saved in |<outputdir>|, but \texpkg{minted} still looks for them in the document root directory. There is no way to access the value of the command-line option so that \texpkg{minted} can automatically look in the right place. But it is possible to allow the output directory to be specified manually as a package option.
-%
-% The output directory should be specified using an absolute path or a path relative to the document root directory. Paths should use forward slashes, even under Windows. Special characters must be escaped, while spaces require quoting and need the entire \meta{directory} to be wrapped in curly braces |{}|. See |cachedir| above for examples of escaping and quoting.
+% \DescribeMacro{placeholder=\meta{boolean} (default:~false)}
+% Instead of typesetting code, insert a placeholder. This is enabled automatically when working with PGF/TikZ externalization.
%
%
% \DescribeMacro{section}
% To control how \LaTeX{} counts the |listing| floats, you can pass either the
-% |section| or |chapter| option when loading the \texpkg{minted} package.
+% |section| or |chapter| option when loading the \mintedpkg\ package.
%
%
-% \subsection{Macro option usage}
+% \DescribeMacro{verbatim=\meta{boolean} (default:~false)}
+% Instead of highlighting code, attempt to typeset it verbatim without using the |latexminted| Python executable. This is not guaranteed to be an accurate representation of the code, since some features such as |autogobble| require Python.
%
-% All \texpkg{minted} highlighting commands accept the same set of options.
+%
+% \subsection{Setting options for commands and environments}
+% \label{sec:options:macro}
+%
+% All \mintedpkg\ highlighting commands and environment accept the same set of options.
% Options are specified as a comma-separated list of |key=value| pairs.
% For example, we can specify that the lines should be numbered:
%
@@ -994,8 +833,6 @@
% \end{example}
%
% An option value of |true| may also be omitted entirely (including the ``|=|'').
-% To customize the display of the line numbers further, override the |\theFancyVerbLine| command.
-% Consult the \texpkg{fancyvrb} documentation for details.
%
% |\mint| accepts the same options:
%
@@ -1006,7 +843,7 @@
% Here's another example: we want to use the \LaTeX{} math mode inside comments:
%
% \begin{example}
-% \begin{minted}[mathescape]{python}
+% \begin{minted}[mathescape]{py}
% # Returns $\sum_{i=1}^{n}i$
% def sum_from_one_to(n):
% r = range(1, n + 1)
@@ -1016,36 +853,38 @@
%
% To make your \LaTeX{} code more readable you might want to indent the code inside a |minted|
% environment.
-% The option |gobble| removes these unnecessary whitespace characters from the output. There is also an |autogobble| option that detects the length of this whitespace automatically.
+% The option |gobble| removes a specified number of characters from the output. There is also an |autogobble| option that automatically removes indentation (dedents code).
%
+% \begingroup
+% \setminted{autogobble=false}
% \begin{example}
-% \begin{minted}[gobble=2,
-% showspaces]{python}
+% \begin{minted}[showspaces]{py}
% def boring(args = None):
% pass
-% \end{minted}
+% \end{minted}
%
-% versus
+% versus
%
-% \begin{minted}[showspaces]{python}
+% \begin{minted}[gobble=4,
+% showspaces]{py}
% def boring(args = None):
% pass
-% \end{minted}
+% \end{minted}
% \end{example}
+% \endgroup
%
% \DescribeMacro{\setminted}
-% You may wish to set options for the document as a whole, or for an entire language. This is possible via \cmd\setminted\oarg{language}\marg{key=value,...}. Language-specific options override document-wide options. Individual command and environment options override language-specific options.
+% You may wish to set options for the document as a whole, or for an entire lexer (language). This is possible via \cmd\setminted\oarg{lexer}\marg{key=value,...}. Lexer-specific options override document-wide options. Individual command and environment options override lexer-specific options.
%
% \DescribeMacro{\setmintedinline}
-% You may wish to set separate options for \cmd\mintinline, either for the document as a whole or for a specific language. This is possible via \cmd\setmintedinline. The syntax is
-% \cmd\setmintedinline\oarg{language}\marg{key=value,...}. Language-specific options override document-wide options. Individual command options override language-specific options. All settings specified with \cmd\setmintedinline\ override those set with \cmd\setminted. That is, inline settings always have a higher precedence than general settings.
+% You may wish to set separate options for \cmd\mintinline, either for the document as a whole or for a specific lexer (language). This is possible via \cmd\setmintedinline. The syntax is
+% \cmd\setmintedinline\oarg{lexer}\marg{key=value,...}. Lexer-specific options override document-wide options. Individual command options override lexer-specific options. All settings specified with \cmd\setmintedinline\ override those set with \cmd\setminted. That is, inline settings always have a higher precedence than general settings.
%
-% \subsection{Available options}
+% \subsection{Command and environment options}
%
% \newcommand\appliesto[1]{\textsf{[For #1 only]}}
%
-% Following is a full list of available options.
-% For more detailed option descriptions please refer to the \texpkg{fancyvrb} and \app{Pygments} documentation.
+% Following is a full list of available options. Several options are simply passed on to Pygments, \texpkg{fancyvrb}, and \texpkg{fvextra} for processing. In those cases, more details may be in the documentation for those software packages.
%
% \begin{optionlist}
% \item[autogobble (boolean) (false)]
@@ -1053,52 +892,41 @@
%
% \begin{example}
% ...text.
-% \begin{minted}[autogobble]{python}
+% \begin{minted}[autogobble]{py}
% def f(x):
% return x**2
% \end{minted}
% \end{example}
%
+% When |autogobble| and |gobble| are used together, the effect is cumulative. First |autogobble| removes all common indentation, and then |gobble| is applied.
+%
+% |autogobble| and |gobble| operate on code before the highlighting process begins (before lexing), treating the code purely as text. Meanwhile, |gobblefilter| operates on the token stream generated by a lexer. If the removed characters are simply indentation coming from how the code was entered within \LaTeX, then |autogobble| and |gobble| should typically be preferred. If the removed characters are syntactically significant, then |gobblefilter| may be better. Which approach is preferable may also depend on the implementation details of the lexer.
+%
% \item[baselinestretch (dimension) (\meta{document default})]
-% Value to use as for baselinestretch inside the listing.
+% Value to use for baselinestretch inside the listing.
%
%
% \item[beameroverlays (boolean) (false)]
% Give the |<| and |>| characters their normal text meanings when used with |escapeinside| and |texcomments|, so that \texpkg{beamer} overlays of the form |\only<1>{...}| will work.
%
%
-% \item[bgcolor (string) (\meta{none})]
-% Background color of the listing. Be aware that this option has several limitations (described below); see ``Framing alternatives'' below for more powerful alternatives.
+% \item[bgcolor (string) (none)]
+% Background color behind commands and environments. This is only a basic, lightweight implementation of background colors using |\colorbox|. For more control of background colors, consider \href{https://ctan.org/pkg/tcolorbox}{\pkg{tcolorbox}} or a similar package, or a custom background color implementation.
%
-% The value of this option must \emph{not} be a color command. Instead, it must be a color \emph{name}, given as a string, of a previously-defined color:
+% |bgcolor| prevents line breaks for |\mintinline|. If you want to use \texttt{\string\setminted} to set background colors, and only want background colors on \texttt{minted} and \texttt{\string\mint}, you may use \texttt{\string\setmintedinline\{bgcolor=none\}} to turn off the coloring for inline commands.
+%
+% The value of this option must \emph{not} be a color command. Instead, it must be a color \emph{name}, given as a string, of a previously-defined color:
%
% \begin{example}
-% \definecolor{bg}{rgb}{0.95,0.95,0.95}
-% \begin{minted}[bgcolor=bg]{php}
-% <?php
-% echo "Hello, $x";
-% ?>
-% \end{minted}
+% \definecolor{bg}{rgb}{.9, .9, .9}
+% \begin{minted}[bgcolor=bg]{php}
+% <?php
+% echo "Hello, $x";
+% ?>
+% \end{minted}
% \end{example}
%
-% This option puts \texttt{minted} environments and \texttt{\string\mint} commands in a \texttt{snugshade*} environment from the \texpkg{framed} package, which supports breaks across pages. (Prior to \texpkg{minted} 2.2, a \texttt{minipage} was used, which prevented page breaks and gave undesirable spacing from surrounding text.) Be aware that if \texttt{bgcolor} is used with \texttt{breaklines=true}, and a line break occurs just before a page break, then text may extend below the colored background in some instances. It is best to use a more advanced framing package in those cases; see ``Framing alternatives'' below.
-%
-% This option puts \texttt{\string\mintinline} inside a \texttt{\string\colorbox}, which \textbf{does not allow line breaks}. If you want to use \texttt{\string\setminted} to set background colors, and only want background colors on \texttt{minted} and \texttt{\string\mint}, you may use \texttt{\string\setmintedinline\{bgcolor=\{\}\}} to turn off the coloring for inline commands.
-%
-% ~
-%
-% \textbf{Framing alternatives}
-%
-% If you want more reliable and advanced options for background colors and framing, you should consider a more advanced framing package such as \texpkg{mdframed} or \texpkg{tcolorbox}. It is easy to add framing to \texpkg{minted} commands and environments using the \texpkg{etoolbox} package, which is automatically loaded by \texpkg{minted}. For example, using \texpkg{mdframed}:
-%\begin{Verbatim}
-%\BeforeBeginEnvironment{minted}{\begin{mdframed}}
-%\AfterEndEnvironment{minted}{\end{mdframed}}
-%\end{Verbatim}
-% Some framing packages also provide built-in commands for such purposes. For example, \texpkg{mdframed} provides a \texttt{\string\surroundwithmdframed} command, which could be used to add a frame to all \texttt{minted} environments:
-%\begin{Verbatim}
-%\surroundwithmdframed{minted}
-%\end{Verbatim}
-% \texpkg{tcolorbox} even provides a built-in framing environment with \texpkg{minted} support. Simply use \texttt{\string\tcbuselibrary\{minted\}} in the preamble, and then put code within a \texttt{tcblisting} environment:
+% As an alternative to |bgcolor|, \texpkg{tcolorbox} provides a built-in framing environment with \mintedpkg\ support. Simply use \texttt{\string\tcbuselibrary\{minted\}} in the preamble, and then put code within a \texttt{tcblisting} environment:
%\begin{Verbatim}
%\begin{tcblisting}{<tcb options>,
% minted language=<language>,
@@ -1110,6 +938,14 @@
% \texpkg{tcolorbox} provides other commands and environments for fine-tuning listing appearance and for working with external code files.
%
%
+% \item[bgcolorpadding (length) (none)]
+% Padding when |bgcolor| is set. For inline commands and for environments based on |BVerbatim|, this sets |\fboxsep| for the |\colorbox| that is used to create the background color. For environments based on |Verbatim|, \texpkg{fancyvrb}'s frame options are used instead, particularly |framesep| and |fillcolor|. See the \texpkg{fvextra} documentation for implementation details.
+%
+%
+% \item[bgcolorvphantom (macro) (\Verb{\vphantom{\"Apgjy}})]
+% |\vphantom| or similar macro such as |\strut| that is inserted at the beginning of each line of code using |bgcolor|. This allows the height of the background for each line of code to be customized. This is primarily useful for customizing the background for |\mintinline| and other inline code. It will typically have no effect on |minted| environments and other block code unless it is set to a size larger than |\strut|.
+%
+%
% \item[breakafter (string) (\meta{none})]
% Break lines after specified characters, not just at spaces, when \texttt{breaklines=true}.
%
@@ -1126,12 +962,14 @@
% \item[breakafterinrun] (boolean) (true)
% When \texttt{breakafter} is used, group all adjacent identical characters together, and only allow a break after the last character. When \texttt{breakbefore} and \texttt{breakafter} are used for the same character, \texttt{breakbeforeinrun} and \texttt{breakafterinrun} must both have the same setting.
%
-% \item[breakaftersymbolpre (string) (\string\,\string\footnotesize\string\ensuremath\{\_\string\rfloor\}, \,\footnotesize\ensuremath{_\rfloor})]
-% The symbol inserted pre-break for breaks inserted by \texttt{breakafter}.
%
% \item[breakaftersymbolpost (string) (\meta{none})]
% The symbol inserted post-break for breaks inserted by \texttt{breakafter}.
%
+% \item[breakaftersymbolpre (string) (\string\,\string\footnotesize\string\ensuremath\{\_\string\rfloor\}, \,\footnotesize\ensuremath{_\rfloor})]
+% The symbol inserted pre-break for breaks inserted by \texttt{breakafter}.
+%
+%
% \item[breakanywhere (boolean) (false)]
% Break lines anywhere, not just at spaces, when \texttt{breaklines=true}.
%
@@ -1144,12 +982,20 @@
% \end{longexample}
% \endgroup
%
-% \item[breakanywheresymbolpre (string) (\string\,\string\footnotesize\string\ensuremath\{\_\string\rfloor\}, \,\footnotesize\ensuremath{_\rfloor})]
-% The symbol inserted pre-break for breaks inserted by \texttt{breakanywhere}.
+% \item[breakanywhereinlinestretch (length) (\meta{none})]
+% Stretch glue to insert at potential |breakanywhere| break locations in inline contexts, to give better line widths and avoid overfull |\hbox|. This allows the spacing between adjacent non-space characters to stretch, so it should not be used when column alignment is important. For typical line lengths, values between |0.01em| and |0.02em| should be sufficient to provide a cumulative stretch per line that is equal to or greater than the width of one character.
+%
+% This is typically not needed in cases where an overfull |\hbox| only overflows by tiny amount, perhaps a fraction of a pt. In those cases, the overfull |\hbox| could be ignored, |\hfuzz| could be set to 1pt or 2pt to suppress tiny overfull |\hbox| warnings, or |breakanywheresymbolpre| might be redefined to adjust spacing.
+%
%
% \item[breakanywheresymbolpost (string) (\meta{none})]
% The symbol inserted post-break for breaks inserted by \texttt{breakanywhere}.
%
+%
+% \item[breakanywheresymbolpre (string) (\string\,\string\footnotesize\string\ensuremath\{\_\string\rfloor\}, \,\footnotesize\ensuremath{_\rfloor})]
+% The symbol inserted pre-break for breaks inserted by \texttt{breakanywhere}.
+%
+%
% \item[breakautoindent (boolean) (true)]
% When a line is broken, automatically indent the continuation lines to the indentation level of the first line. When \texttt{breakautoindent} and \texttt{breakindent} are used together, the indentations add. This indentation is combined with \texttt{breaksymbolindentleft} to give the total actual left indentation. Does not apply to \texttt{\string\mintinline}.
%
@@ -1169,22 +1015,29 @@
% \item[breakbeforeinrun] (boolean) (true)
% When \texttt{breakbefore} is used, group all adjacent identical characters together, and only allow a break before the first character. When \texttt{breakbefore} and \texttt{breakafter} are used for the same character, \texttt{breakbeforeinrun} and \texttt{breakafterinrun} must both have the same setting.
%
-% \item[breakbeforesymbolpre (string) (\string\,\string\footnotesize\string\ensuremath\{\_\string\rfloor\}, \,\footnotesize\ensuremath{_\rfloor})]
-% The symbol inserted pre-break for breaks inserted by \texttt{breakbefore}.
%
% \item[breakbeforesymbolpost (string) (\meta{none})]
% The symbol inserted post-break for breaks inserted by \texttt{breakbefore}.
%
+%
+% \item[breakbeforesymbolpre (string) (\string\,\string\footnotesize\string\ensuremath\{\_\string\rfloor\}, \,\footnotesize\ensuremath{_\rfloor})]
+% The symbol inserted pre-break for breaks inserted by \texttt{breakbefore}.
+%
+%
% \item[breakbytoken (boolean) (false)]
% Only break lines at locations that are not within tokens; prevent tokens from being split by line breaks. By default, \texttt{breaklines} causes line breaking at the space nearest the margin. While this minimizes the number of line breaks that are necessary, it can be inconvenient if a break occurs in the middle of a string or similar token.
%
-% This is not compatible with \texttt{draft} mode. A complete list of Pygments tokens is available at \url{http://pygments.org/docs/tokens/}. If the breaks provided by \texttt{breakbytoken} occur in unexpected locations, it may indicate a bug or shortcoming in the Pygments lexer for the language.
+% This does not allow line breaks between immediately adjacent tokens; for that, see |breakbytokenanywhere|.
+%
+% A complete list of Pygments tokens is available at \href{https://pygments.org/docs/tokens}{pygments.org/docs/tokens}. If the breaks provided by \texttt{breakbytoken} occur in unexpected locations, it may indicate a bug or shortcoming in the Pygments lexer for the language.
%
% \item[breakbytokenanywhere (boolean) (false)]
% Like \texttt{breakbytoken}, but also allows line breaks between immediately adjacent tokens, not just between tokens that are separated by spaces. Using \texttt{breakbytokenanywhere} with \texttt{breakanywhere} is redundant.
%
% \item[breakindent (dimension) (\meta{breakindentnchars})]
-% When a line is broken, indent the continuation lines by this amount. When |breakautoindent| and |breakindent| are used together, the indentations add. This indentation is combined with |breaksymbolindentleft| to give the total actual left indentation.
+% When a line is broken, indent the continuation lines by this amount.
+%
+% When |breakautoindent| and |breakindent| are used together, the indentations add. This indentation is combined with |breaksymbolindentleft| to give the total actual left indentation.
%
% Does not apply to \texttt{\string\mintinline}.
%
@@ -1194,11 +1047,11 @@
% \item[breaklines (boolean) (false)]
% Automatically break long lines in \texttt{minted} environments and \texttt{\string\mint} commands, and wrap longer lines in \texttt{\string\mintinline}.
%
-% By default, automatic breaks occur at space characters. Use \texttt{breakanywhere} to enable breaking anywhere; use \texttt{breakbytoken}, \texttt{breakbytokenanywhere}, \texttt{breakbefore}, and \texttt{breakafter} for more fine-tuned breaking. Using \texttt{escapeinside} to escape to \LaTeX\ and then insert a manual break is also an option. For example, use \texttt{escapeinside=||}, and then insert \texttt{|\textbackslash\textbackslash|} at the appropriate point. (Note that \texttt{escapeinside} does not work within strings.)
+% By default, automatic breaks occur at space characters. Use \texttt{breakanywhere} to enable breaking anywhere; use \texttt{breakbytoken}, \texttt{breakbytokenanywhere}, \texttt{breakbefore}, and \texttt{breakafter} for more fine-tuned breaking. Using \texttt{escapeinside} to escape to \LaTeX\ and then insert a manual break is also an option. For example, use \Verb{escapeinside=||}, and then insert \Verb{|\\|} at the appropriate point. (Note that \texttt{escapeinside} does not work within strings.)
%
% \begin{example}
% ...text.
-% \begin{minted}[breaklines]{python}
+% \begin{minted}[breaklines]{py}
% def f(x):
% return 'Some text ' + str(x)
% \end{minted}
@@ -1226,27 +1079,15 @@
% \end{longexample}
% \endgroup
%
-% Automatic line breaks are limited with \app{Pygments} styles that use a colored background behind large chunks of text. This coloring is accomplished with \texttt{\string\colorbox}, which cannot break across lines. It may be possible to create an alternative to \texttt{\string\colorbox} that supports line breaks, perhaps with \texpkg{TikZ}, but the author is unaware of a satisfactory solution. The only current alternative is to redefine \texttt{\string\colorbox} so that it does nothing. For example,
+% Automatic line breaks are limited with Pygments styles that use a colored background behind large chunks of text. This coloring is accomplished with \texttt{\string\colorbox}, which cannot break across lines. It may be possible to create an alternative to \texttt{\string\colorbox} that supports line breaks, perhaps with \texpkg{TikZ}, but the author is unaware of a satisfactory solution. The only current alternative is to redefine \texttt{\string\colorbox} so that it does nothing. For example,
%\begin{Verbatim}
%\AtBeginEnvironment{minted}{\renewcommand{\colorbox}[3][]{#3}}
%\end{Verbatim}
% uses the \texpkg{etoolbox} package to redefine \texttt{\string\colorbox} within all \texttt{minted} environments.
%
-% Automatic line breaks will not work with \texttt{showspaces=true} unless you use \texttt{breakanywhere} or \texttt{breakafter=\string\space}.
-%
% \item[breaksymbol (string) (breaksymbolleft)]
% Alias for \texttt{breaksymbolleft}.
%
-% \item[breaksymbolleft (string) (\string\tiny\string\ensuremath\{\string\hookrightarrow\}, {\tiny\ensuremath{\hookrightarrow}})]
-% The symbol used at the beginning (left) of continuation lines when \texttt{breaklines=true}. To have no symbol, simply set \texttt{breaksymbolleft} to an empty string (``\texttt{=,}'' or ``\texttt{=\{\}}''). The symbol is wrapped within curly braces \texttt{\{\}} when used, so there is no danger of formatting commands such as \texttt{\string\tiny} ``escaping.''
-%
-% The \texttt{\string\hookrightarrow} and \texttt{\string\hookleftarrow} may be further customized by the use of the \texttt{\string\rotatebox} command provided by \texpkg{graphicx}. Additional arrow-type symbols that may be useful are available in the \texpkg{dingbat} (\texttt{\string\carriagereturn}) and \texpkg{mnsymbol} (hook and curve arrows) packages, among others.
-%
-% Does not apply to \texttt{\string\mintinline}.
-%
-% \item[breaksymbolright (string) (\meta{none})]
-% The symbol used at breaks (right) when \texttt{breaklines=true}. Does not appear at the end of the very last segment of a broken line.
-%
%
% \item[breaksymbolindent (dimension) (\meta{breaksymbolindentleftnchars})]
% Alias for |breaksymbolindentleft|.
@@ -1270,6 +1111,17 @@
% This allows |breaksymbolindentright| to be specified as an integer number of characters rather than as a dimension (assumes a fixed-width font).
%
%
+% \item[breaksymbolleft (string) (\string\tiny\string\ensuremath\{\string\hookrightarrow\}, {\tiny\ensuremath{\hookrightarrow}})]
+% The symbol used at the beginning (left) of continuation lines when \texttt{breaklines=true}. To have no symbol, simply set \texttt{breaksymbolleft} to an empty string (``\texttt{=,}'' or ``\texttt{=\{\}}''). The symbol is wrapped within curly braces \texttt{\{\}} when used, so there is no danger of formatting commands such as \texttt{\string\tiny} ``escaping.''
+%
+% The \texttt{\string\hookrightarrow} and \texttt{\string\hookleftarrow} may be further customized by the use of the \texttt{\string\rotatebox} command provided by \texpkg{graphicx}. Additional arrow-type symbols that may be useful are available in the \texpkg{dingbat} (\texttt{\string\carriagereturn}) and \texpkg{mnsymbol} (hook and curve arrows) packages, among others.
+%
+% Does not apply to \texttt{\string\mintinline}.
+%
+% \item[breaksymbolright (string) (\meta{none})]
+% The symbol used at breaks (right) when \texttt{breaklines=true}. Does not appear at the end of the very last segment of a broken line.
+%
+%
% \item[breaksymbolsep (dimension) (\meta{breaksymbolsepleftnchars})]
% Alias for |breaksymbolsepleft|.
%
@@ -1291,23 +1143,45 @@
% Allows |breaksymbolsepright| to be specified as an integer number of characters rather than as a dimension (assumes a fixed-width font).
%
%
-% \item[codetagify (list of strings) (\textrm{highlight \texttt{XXX}, \texttt{TODO}, \texttt{BUG}, and \texttt{NOTE}})]
-% Highlight special code tags in comments and docstrings.
+% \item[codetagify (single macro or backslash-escaped string) (XXX,TODO,FIXME,BUG,NOTE)]
+% Highlight special code tags in comments and docstrings.
+%
+% The value must be a list of strings, either comma-delimited or space-delimited. The value must be a single macro that gives the desired text when fully expanded, or a string that is interpreted literally except that backslash escapes of ASCII punctuation characters are allowed to give the literal characters (``|\\|'' for backslash, ``|\#|'' for ``|#|'', and so on).
%
% \item[curlyquotes (boolean) (false)]
% By default, the backtick \texttt{\textasciigrave} and typewriter single quotation mark \texttt{\textquotesingle} always appear literally, instead of becoming the left and right curly single quotation marks \texttt{`'}. This option allows these characters to be replaced by the curly quotation marks when that is desirable.
%
-% \item[encoding (string) (\meta{system-specific})]
-% Sets the file encoding that \app{Pygments} expects. See also |outencoding|.
-% \item[escapeinside (string) (\meta{none})]
-% Escape to \LaTeX\ between the two characters specified in \texttt{\string(string\string)}. All code between the two characters will be interpreted as \LaTeX\ and typeset accordingly. This allows for additional formatting. The escape characters need not be identical. Special \LaTeX\ characters must be escaped when they are used as the escape characters (for example, \texttt{escapeinside=\textbackslash\#\textbackslash\%}). Requires \app{Pygments} 2.0+.
%
-% \textbf{Escaping does not work inside strings and comments (for comments, there is \texttt{texcomments}). As of Pygments 2.0.2, this means that escaping is ``fragile'' with some lexers.} Due to the way that Pygments implements \texttt{escapeinside}, any ``escaped'' \LaTeX\ code that resembles a string or comment for the current lexer may break \texttt{escapeinside}. There is a \href{https://bitbucket.org/birkenfeld/pygments-main/issue/1118}{Pygments issue} for this case. Additional details and a limited workaround for some scenarios are available on the \href{https://github.com/gpoore/minted/issues/70#issuecomment-111729930}{\texpkg{minted} GitHub site}.
+% \item[encoding (string) (UTF-8)]
+% File encoding used by |\inputminted| and derived commands when reading files.
+%
+%
+% \item[envname (string) (\textrm{\texttt{Verbatim}, or \texttt{VerbEnv} for inline})]
+% This is the name of the environment that wraps typeset code. By default, it is |Verbatim| in block contexts and |VerbEnv| in inline contexts (|\setminted| versus |\setmintedinline|). This is compatible with \texpkg{fancyvrb}'s |BVerbatim|.
+%
+% There are two requirements for using a custom environment other than |Verbatim| and |BVerbatim| in block contexts:
+% \begin{itemize}
+% \item For |minted| and |\mint| support, the custom environment must be created with \texpkg{fancyvrb}'s |\DefineVerbatimEnvironment| or otherwise defined in a manner compatible with \texpkg{fancyvrb}'s environment implementation conventions.
+% \item For |\inputminted| support, a corresponding |\|\meta{envname}|Insert| command must be defined, using \texpkg{fancyvrb}'s |\CustomVerbatimCommand| or otherwise following \texpkg{fancyvrb} command conventions. For example, using a custom variant of |BVerbatim| involves creating both a custom environment as well as a corresponding variant of |\BVerbatimInput|.
+% \end{itemize}
+%
+% There is currently only limited support for using an environment other than |VerbEnv| in inline contexts. If an environment other than |VerbEnv| is specified, it will be used for highlighted code, but will not be used if code is typeset verbatim instead or if highlighting fails and a verbatim fallback is needed. In both of those cases, |\Verb| is currently used.
+%
+% Note that |envname| is the name of the environment that wraps typeset code, but it is \emph{not} the name of the environment that literally appears in highlighted code output. Highlighted code output uses the |MintedVerbatim| environment by default, and then |MintedVerbatim| is redefined based on |envname|. This allows a single cache file to be used in multiple contexts. The name of the environment that literally appears in highlighted code output can be modified with |literalenvname|, but there should be few if any situations where that is actually necessary.
+%
+%
+% \item[escapeinside (single macro or backslash-escaped two-character string) (\meta{none})]
+% Escape to \LaTeX\ between the two characters specified. All code between the two characters will be interpreted as \LaTeX\ and typeset accordingly. This allows for additional formatting. The escape characters need not be identical.
+%
+% The value must be a single macro that gives the desired text when fully expanded, or a string that is interpreted literally except that backslash escapes of ASCII punctuation characters are allowed to give the literal characters (``|\\|'' for backslash, ``|\#|'' for ``|#|'', and so on). Special \LaTeX\ characters must be escaped when they are used as the escape characters (for example, \texttt{escapeinside=\textbackslash\#\textbackslash\%}).
+%
+% \textbf{Escaping does not work inside strings and comments (for comments, there is \texttt{texcomments}). Escaping is ``fragile'' with some lexers.} Due to the way that Pygments implements \texttt{escapeinside}, any ``escaped'' \LaTeX\ code that resembles a string or comment for the current lexer may break \texttt{escapeinside}. There is a \href{https://github.com/pygments/pygments/issues/825}{Pygments issue} for this case. Additional details and a limited workaround for some scenarios are available on the \href{https://github.com/gpoore/minted/issues/70#issuecomment-111729930}{\mintedpkg\ GitHub site}.
%
% \begingroup ^^A Need to prevent active "|" from causing problems
% \catcode`\|=11
% \begin{example}
-% \begin{minted}[escapeinside=||]{py}
+% \setminted{escapeinside=||}
+% \begin{minted}{py}
% def f(x):
% y = x|\colorbox{green}{**}|2
% return y
@@ -1315,33 +1189,57 @@
% \end{example}
% \endgroup
%
-% \textbf{Note that when math is used inside escapes, any active characters beyond those that are normally active in verbatim can cause problems.} Any package that relies on special active characters in math mode (for example, \texpkg{icomma}) will produce errors along the lines of \texttt{TeX capacity exceeded} and \texttt{\string\leavevmode \string\kern \string\z@}. This may be fixed by modifying \texttt{\string\@noligs}, as described at \url{http://tex.stackexchange.com/questions/223876}.
+% \textbf{Note that when math is used inside escapes, any active characters beyond those that are normally active in verbatim can cause problems.} Any package that relies on special active characters in math mode (for example, \texpkg{icomma}) will produce errors along the lines of ``\texttt{TeX capacity exceeded}'' and ``\texttt{\string\leavevmode \string\kern \string\z@}''. This may be fixed by modifying \texttt{\string\@noligs}, as described at \url{https://tex.stackexchange.com/questions/223876}.
% \item[firstline (integer) (1)]
% The first line to be shown.
% All lines before that line are ignored and do not appear in the output.
% \item[firstnumber (auto \| last \| integer) (auto = 1)]
% Line number of the first line.
+%
+%
+% \item [fontencoding (font encoding) (\meta{doc~encoding})]
+% Set font encoding used for typesetting code. For example, |fontencoding=T1|.
+%
+%
% \item[fontfamily (family name) (tt)]
% The font family to use.
% |tt|, |courier| and |helvetica| are pre-defined.
-% \item[fontseries (series name) (auto \textrm{-- the same as the current font})]
+%
+%
+% \item[fontseries (series name) (auto\textrm{ -- the same as the current font})]
% The font series to use.
-% \item[fontsize (font size) (auto \textrm{-- the same as the current font})]
-% The size of the font to use, as a size command, e.g. |\footnotesize|.
-% \item[fontshape (font shape) (auto \textrm{-- the same as the current font})]
+%
+%
+% \item[fontshape (font shape) (auto\textrm{ -- the same as the current font})]
% The font shape to use.
+%
+%
+% \item[fontsize (font size) (auto\textrm{ -- the same as the current font})]
+% The size of the font to use, as a size command, e.g. |\footnotesize|.
+%
+%
% \item[formatcom (command) (\meta{none})]
% A format to execute before printing verbatim text.
% \item[frame (none \| leftline \| topline \| bottomline \| lines \| single) (none)]
-% The type of frame to put around the source code listing.
+% The type of frame to put around the source code listing. For more sophisticated framing, consider \texpkg{tcolorbox}.
% \item[framerule (dimension) (0.4pt)]
% Width of the frame.
% \item[framesep (dimension) (\cmd\fboxsep)]
% Distance between frame and content.
% \item[funcnamehighlighting (boolean) (true)] \appliesto{PHP}
% If |true|, highlights built-in function names.
-% \item[gobble (integer) (0)]
-% Remove the first $n$ characters from each input line.
+% \item[gobble (integer) (0)]
+% Remove the first $n$ characters from each input line.
+%
+% When |autogobble| and |gobble| are used together, the effect is cumulative. First |autogobble| removes all common indentation, and then |gobble| is applied.
+%
+% |autogobble| and |gobble| operate on code before the highlighting process begins (before lexing), treating the code purely as text. Meanwhile, |gobblefilter| operates on the token stream generated by a lexer. If the removed characters are simply indentation coming from how the code was entered within \LaTeX, then |autogobble| and |gobble| should typically be preferred. If the removed characters are syntactically significant, then |gobblefilter| may be better. Which approach is preferable may also depend on the implementation details of the lexer.
+%
+% \item[gobblefilter (integer) (0)]
+% Remove the first $n$ characters from each input line, using the Pygments gobble filter.
+%
+% |autogobble| and |gobble| operate on code before the highlighting process begins (before lexing), treating the code purely as text. Meanwhile, |gobblefilter| operates on the token stream generated by a lexer. If the removed characters are simply indentation coming from how the code was entered within \LaTeX, then |autogobble| and |gobble| should typically be preferred. If the removed characters are syntactically significant, then |gobblefilter| may be better. Which approach is preferable may also depend on the implementation details of the lexer.
+%
%
% \item[highlightcolor (string) (LightCyan)]
% Set the color used for |highlightlines|, using a predefined color name from \texpkg{color} or \texpkg{xcolor}, or a color defined via |\definecolor|.
@@ -1353,15 +1251,31 @@
% The highlighting color can be customized with |highlightcolor|.
%
%
-% \item[keywordcase] (string) (lower)
-% Changes capitalization of keywords. Takes |lower|, |upper|, or |capitalize|.
+% \item[ignorelexererrors (boolean) (false)]
+% When lexer errors are shown in highlighted output (default), they are typically displayed as red boxes that surround the relevant text. When lexer errors are ignored, the literal text that caused lexer errors is shown but there is no indication that it caused errors.
+%
+% \begin{longexample}
+% \begin{minted}{python}
+% variable = !!!
+% \end{minted}
+% \end{longexample}
+%
+% \begin{longexample}
+% \begin{minted}[ignorelexererrors=true]{python}
+% variable = !!!
+% \end{minted}
+% \end{longexample}
+%
+%
+% \item[keywordcase (lower \| upper \| capitalize \| none) (none)]
+% Changes capitalization of keywords.
% \item[label (string) (\emph{empty})]
% Add a label to the top, the bottom or both of the frames around the code.
% See the \texpkg{fancyvrb} documentation for more information and examples.
% \emph{Note:} This does \emph{not} add a |\label| to the current listing.
% To achieve that, use a floating environment (section \ref{sec:float}) instead.
% \item[labelposition (none \| topline \| bottomline \| all) (topline, all, \textrm{or} none)]
-% Position where to print the label (see above; default: |topline| if one label is defined, |all| if two are defined, |none| else).
+% Location for the label. Default: |topline| if one label is defined, |all| if two are defined, |none| otherwise.
% See the \texpkg{fancyvrb} documentation for more information.
% \item[lastline (integer) (\meta{last line of input})]
% The last line to be shown.
@@ -1370,9 +1284,11 @@
% In order to customize the display style of line numbers, you need to redefine the |\theFancyVerbLine| macro:
%
% \begin{example}
-% \renewcommand{\theFancyVerbLine}{\sffamily
-% \textcolor[rgb]{0.5,0.5,1.0}{\scriptsize
-% \oldstylenums{\arabic{FancyVerbLine}}}}
+% \renewcommand{\theFancyVerbLine}{%
+% \sffamily
+% \textcolor[rgb]{0.5,0.5,1.0}{%
+% \scriptsize\oldstylenums{%
+% \arabic{FancyVerbLine}}}}
%
% \begin{minted}[linenos,
% firstnumber=11]{python}
@@ -1384,49 +1300,112 @@
% \end{minted}
% \end{example}
%
-% \item[numberfirstline (boolean) (false)]
-% Always number the first line, regardless of |stepnumber|.
+%
+% \item[listparameters (macro) (\meta{empty})]
+% \texpkg{fancyvrb} option for setting list-related lengths to modify spacing around lines of code. For example, |listparameters=\setlength{\topsep}{0pt}| will remove space before and after a |minted| environment.
+%
+%
+% \item[literalenvname (string) (MintedVerbatim)]
+% This is the name of the environment that literally appears in highlighted code output as a wrapper around the code. It is redefined to be equivalent to |envname|. There should be few if any situations where modifying |literalenvname| rather than |envname| is actually necessary.
+%
+%
+% \item[literatecomment (single macro or backslash-escaped string) (\meta{none})]
+% This is for compatibility with literate programming formats, such as the |.dtx| format commonly used for writing \LaTeX\ packages. If all lines of code begin with \meta{literatecomment}, then \meta{literatecomment} is removed from the beginning of all lines. For example, for |.dtx|, |literatecomment=\%|.
+%
+% The value must be a single macro that gives the desired text when fully expanded, or a string that is interpreted literally except that backslash escapes of ASCII punctuation characters are allowed to give the literal characters (``|\\|'' for backslash, ``|\#|'' for ``|#|'', and so on).
%
%
-% \item[numbers (left \| right \| both \| none) (none)]
-% Essentially the same as |linenos|, except the side on which the numbers appear may be specified.
% \item[mathescape (boolean) (false)]
% Enable \LaTeX{} math mode inside comments.
% Usage as in package \texpkg{listings}.
% See the note under \texttt{escapeinside} regarding math and ligatures.
+%
+%
% \item[numberblanklines (boolean) (true)]
% Enables or disables numbering of blank lines.
+%
+%
+% \item[numberfirstline (boolean) (false)]
+% Always number the first line, regardless of |stepnumber|.
+%
+%
+% \item[numbers (left \| right \| both \| none) (none)]
+% Essentially the same as |linenos|, except the side on which the numbers appear may be specified.
+%
+%
% \item[numbersep (dimension) (12pt)]
% Gap between numbers and start of line.
% \item[obeytabs (boolean) (false)]
-% Treat tabs as tabs instead of converting them to spaces---that is, expand them to tab stops determined by |tabsize|. \textcolor{DarkRed}{\textbf{While this will correctly expand tabs within leading indentation, usually it will not correctly expand tabs that are preceded by anything other than spaces or other tabs. It should be avoided in those case.}}
+% Treat tabs as tabs instead of converting them to spaces---that is, expand them to tab stops determined by |tabsize|. \textbf{While this will correctly expand tabs within leading indentation, usually it will not correctly expand tabs that are preceded by anything other than spaces or other tabs. It should be avoided in those case.}
%
-% \item[outencoding (string) (\meta{system-specific})]
-% Sets the file encoding that \app{Pygments} uses for highlighted output. Overrides any encoding previously set via |encoding|.
-% \item[python3 (boolean) (false)] \appliesto{PythonConsoleLexer}
+% \item[python3 (boolean) (true)] \appliesto{PythonConsoleLexer}
% Specifies whether Python 3 highlighting is applied.
+%
+%
+% \item[rangeregex (single macro or backslash-escaped string) (\meta{none})]
+% Select code that matches this regular expression.
+%
+% The value must be a single macro that gives the desired text when fully expanded, or a string that is interpreted literally except that backslash escapes of ASCII punctuation characters are allowed to give the literal characters (``|\\|'' for backslash, ``|\#|'' for ``|#|'', and so on).
+%
+% If line numbers are displayed, they are based on the range of code that is selected; code that is discarded in selecting the range is not considered in calculating line numbers.
+%
+%
+% \item[rangeregexmatchnumber (integer) (1)]
+% If there are multiple non-overlapping matches for |rangeregex|, this determines which is used.
+%
+%
+% \item[rangeregexdotall (boolean) (false)]
+% ``|.|'' matches any character including the newline.
+%
+%
+% \item[rangeregexmultiline (boolean) (false)]
+% ``|^|'' and ``|$|'' match at internal newlines, not just at the start/end of the string.
+%
+%
+% \item[rangestartafterstring (single macro or backslash-escaped string) (\meta{none})]
+% Select code starting immediately after this string.
+%
+% The value must be a single macro that gives the desired text when fully expanded, or a string that is interpreted literally except that backslash escapes of ASCII punctuation characters are allowed to give the literal characters (``|\\|'' for backslash, ``|\#|'' for ``|#|'', and so on).
+%
+% If line numbers are displayed, they are based on the range of code that is selected; code that is discarded in selecting the range is not considered in calculating line numbers.
+%
+%
+% \item[rangestartstring (single macro or backslash-escaped string) (\meta{none})]
+% Select code starting with this string.
+%
+% The value must be a single macro that gives the desired text when fully expanded, or a string that is interpreted literally except that backslash escapes of ASCII punctuation characters are allowed to give the literal characters (``|\\|'' for backslash, ``|\#|'' for ``|#|'', and so on).
+%
+% If line numbers are displayed, they are based on the range of code that is selected; code that is discarded in selecting the range is not considered in calculating line numbers.
+%
+%
+% \item[rangestopbeforestring (single macro or backslash-escaped string) (\meta{none})]
+% Select code ending immediately before this string.
+%
+% The value must be a single macro that gives the desired text when fully expanded, or a string that is interpreted literally except that backslash escapes of ASCII punctuation characters are allowed to give the literal characters (``|\\|'' for backslash, ``|\#|'' for ``|#|'', and so on).
+%
+% If line numbers are displayed, they are based on the range of code that is selected; code that is discarded in selecting the range is not considered in calculating line numbers.
+%
+%
+% \item [rangestopstring (single macro or backslash-escaped string) (\meta{none})]
+% Select code ending with this string.
+%
+% The value must be a single macro that gives the desired text when fully expanded, or a string that is interpreted literally except that backslash escapes of ASCII punctuation characters are allowed to give the literal characters (``|\\|'' for backslash, ``|\#|'' for ``|#|'', and so on).
+%
+% If line numbers are displayed, they are based on the range of code that is selected; code that is discarded in selecting the range is not considered in calculating line numbers.
+%
+%
% \item[resetmargins (boolean) (false)]
% Resets the left margin inside other environments.
% \item[rulecolor (color command) (black)]
% The color of the frame.
% \item[samepage (boolean) (false)]
% Forces the whole listing to appear on the same page, even if it doesn't fit.
-% \item[ignorelexererrors (boolean) (false)]
-% When lexer errors are shown in highlighted output (default), they are typically displayed as red boxes that surround the relevant text. When lexer errors are ignored, the literal text that caused lexer errors is shown but there is no indication that it caused errors.
%
-% \begin{longexample}
-% \begin{minted}{python}
-% variable = !!!
-% \end{minted}
-% \end{longexample}
%
-% \begin{longexample}
-% \begin{minted}[ignorelexererrors=true]{python}
-% variable = !!!
-% \end{minted}
-% \end{longexample}
% \item[showspaces (boolean) (false)]
% Enables visible spaces: \verb*/visible spaces/.
+%
+%
% \item[showtabs (boolean) (false)]
% Enables visible tabs---only works in combination with |obeytabs|.
%
@@ -1441,8 +1420,8 @@
%
% \item[startinline (boolean) (false)] \appliesto{PHP}
% Specifies that the code starts in PHP mode, i.e., leading |<?php| is omitted.
-% \item[style] (string) (\meta{default})
-% Sets the stylesheet used by \app{Pygments}.
+%
+%
% \item[stepnumber (integer) (1)]
% Interval at which line numbers appear.
%
@@ -1461,6 +1440,10 @@
% Strip leading and trailing newlines from the input.
%
%
+% \item[style] (string) (\meta{default})
+% Sets the stylesheet used by Pygments.
+%
+%
% \item[tab (macro) ({\rmfamily\texpkg{fancyvrb}'s} \string\FancyVerbTab, \FancyVerbTab)]
% Redefine the visible tab character. Note that this is only used if |showtabs=true|. |\rightarrowfill|, \hbox to 2em{\rightarrowfill}, may be a nice alternative.
%
@@ -1477,7 +1460,7 @@
% \item[texcomments (boolean) (false)]
% Enables \LaTeX{} code inside comments. The newer name for |texcl|. See the note under |escapeinside| regarding math and ligatures.
%
-% As of Pygments 2.0.2, \texttt{texcomments} fails with multiline C/C++ preprocessor directives, and may fail in some other circumstances. This is because preprocessor directives are \href{http://pygments.org/docs/tokens/}{tokenized as \texttt{Comment.Preproc}}, so \texttt{texcomments} causes preprocessor directives to be treated as literal \LaTeX\ code. \href{https://bitbucket.org/birkenfeld/pygments-main/issue/1086/wrong-processing-of-in-c-c-macros-if-is}{An issue has been opened} at the Pygments site; additional details are also available on the \href{https://github.com/gpoore/minted/issues/66}{\texpkg{minted} GitHub site}.
+% \texttt{texcomments} fails with multiline C/C++ preprocessor directives, and may fail in some other circumstances. This is because preprocessor directives are \href{https://pygments.org/docs/tokens/}{tokenized as \texttt{Comment.Preproc}}, so \texttt{texcomments} causes preprocessor directives to be treated as literal \LaTeX\ code. \href{https://github.com/pygments/pygments/issues/793}{An issue has been opened} at the Pygments site; additional details are also available on the \href{https://github.com/gpoore/minted/issues/66}{\mintedpkg\ GitHub site}.
% \item[xleftmargin (dimension) (0)]
% Indentation to add before the listing.
% \item[xrightmargin (dimension) (0)]
@@ -1490,116 +1473,102 @@
%
% \section{Defining shortcuts}
%
-% Large documents with a lot of listings will nonetheless use the same source language and the
-% same set of options for most listings.
-% Always specifying all options is redundant, a lot to type and makes performing changes hard.
-%
-% One option is to use \cmd\setminted, but even then you must still specify the language each time.
-%
-% \texpkg{minted} therefore defines a set of commands that lets you define shortcuts for the highlighting commands.
-% Each shortcut is specific for one programming language.
+% Large documents with many listings may use the same lexer and the same set of options for most listings. \mintedpkg\ therefore defines a set of commands that lets you define shortcuts for the highlighting commands and environments. Each shortcut is specific to one lexer.
%
% \DescribeMacro{\newminted}
% |\newminted| defines a new alias for the |minted| environment:
%
+% \begingroup
+% \setminted{autogobble=false}
% \begin{example}
-% \newminted{cpp}{gobble=2,linenos}
-%
-% \begin{cppcode}
-% template <typename T>
-% T id(T value) {
-% return value;
-% }
-% \end{cppcode}
+% \newminted{cpp}{gobble=2,linenos}
+%
+% \begin{cppcode}
+% template <typename T>
+% T id(T value) {
+% return value;
+% }
+% \end{cppcode}
% \end{example}
+% \endgroup
%
% If you want to provide extra options on the fly, or override existing default options, you can do that, too:
%
+% \begingroup
+% \setminted{autogobble=false}
% \begin{example}
-% \newminted{cpp}{gobble=2,linenos}
+% \newminted{cpp}{gobble=2,linenos}
%
-% \begin{cppcode*}{linenos=false,
-% frame=single}
-% int const answer = 42;
-% \end{cppcode*}
+% \begin{cppcode}[linenos=false,
+% frame=single]
+% int const answer = 42;
+% \end{cppcode}
% \end{example}
+% \endgroup
%
-% Notice the star ``|*|'' behind the environment name---due to restrictions in \texpkg{fancyvrb}'s handling
-% of options, it is necessary to provide a \emph{separate} environment that accepts options, and the options
-% are \emph{not} optional on the starred version of the environment.
-%
-% The default name of the environment is \meta{language}|code|.
-% If this name clashes with another environment or if you want to choose an own name for another reason, you may
-% do so by specifying it as the first argument: \cmd\newminted\oarg{environment name}\marg{language}\marg{options}.
+% The default name of the environment is \meta{lexer}|code|.
+% If this name clashes with another environment or if you want to choose a different name, you can use an optional argument: \cmd\newminted\oarg{environment name}\marg{lexer}\marg{options}.
%
-% Like normal \texpkg{minted} environments, environments created with |\newminted| may be used within other environment definitions. Since the \texpkg{minted} environments use \texpkg{fancyvrb} internally, any environment based on them must include the \texpkg{fancyvrb} command |\VerbatimEnvironment|. This allows \texpkg{fancyvrb} to determine the name of the environment that is being defined, and correctly find its end. It is best to include this command at the beginning of the definition. For example,
+% Like normal \mintedpkg\ environments, environments created with |\newminted| may be used within other environment definitions. Since the \mintedpkg\ environments use \texpkg{fancyvrb} internally, any environment based on them must include the \texpkg{fancyvrb} command |\VerbatimEnvironment|. This allows \texpkg{fancyvrb} to determine the name of the environment that is being defined, and correctly find its end. It is best to include this command at the beginning of the definition. For example,
%\begin{Verbatim}
%\newminted{cpp}{gobble=2,linenos}
%\newenvironment{env}{\VerbatimEnvironment\begin{cppcode}}{\end{cppcode}}
%\end{Verbatim}
%
% \DescribeMacro{\newmint}
-% The above macro only defines shortcuts for the |minted| environment.
-% The main reason is that the short command form |\mint| often needs different options---at the very least, it
-% will generally not use the |gobble| option.
-% A shortcut for |\mint| is defined using \cmd\newmint\oarg{macro name}\marg{language}\marg{options}.
+% A shortcut for |\mint| is defined using \cmd\newmint\oarg{macro name}\marg{lexer}\marg{options}.
% The arguments and usage are identical to |\newminted|.
-% If no \meta{macro name} is specified, \meta{language} is used.
+% If no \meta{macro name} is specified, \meta{lexer} is used.
%
% \begin{example}
% \newmint{perl}{showspaces}
-%
% \perl/my $foo = $bar;/
% \end{example}
%
%
% \DescribeMacro{\newmintinline}
-% This creates custom versions of \cmd\mintinline. The syntax is the same as that for \cmd\newmint: \cmd\newmintinline\oarg{macro~name}\marg{language}\marg{options}. If a \meta{macro~name} is not specified, then the created macro is called |\|\meta{language}|inline|.
+% This creates custom versions of \cmd\mintinline. The syntax is the same as that for \cmd\newmint: \cmd\newmintinline\oarg{macro~name}\marg{lexer}\marg{options}. If a \meta{macro~name} is not specified, then the created macro is called \meta{lexer}|inline|.
%
% \begin{example}
% \newmintinline{perl}{showspaces}
-%
-% X\perlinline/my $foo = $bar;/X
+% \perlinline/my $foo = $bar;/
% \end{example}
%
% \DescribeMacro{\newmintedfile}
% This creates custom versions of \cmd\inputminted. The syntax is
% \begin{center}
-% \cmd\newmintedfile\oarg{macro~name}\marg{language}\marg{options}
+% \cmd\newmintedfile\oarg{macro~name}\marg{lexer}\marg{options}
% \end{center}
-% If no \meta{macro name} is given, then the macro is called |\|\meta{language}|file|.
+% If no \meta{macro name} is given, then the macro is called \meta{lexer}|file|.
%
%
%
% \section{FAQ and Troubleshooting}
%
-% In some cases, \texpkg{minted} may not give the desired result due to other document settings that it cannot control, or due to limitations in \LaTeX\ or the PDF format. Common issues are described below, with workarounds or solutions. You may also wish to search \href{http://tex.stackexchange.com/}{tex.stackexchange.com} or ask a question there, if you are working with \texpkg{minted} in a non-typical context.
+% In some cases, \mintedpkg\ may not give the desired result due to other document settings that it cannot control, or due to limitations in \LaTeX\ or the PDF format. Common issues are described below, with workarounds or solutions. You may also wish to search \href{https://tex.stackexchange.com/}{tex.stackexchange.com} or ask a question there, if you are working with \mintedpkg\ in a non-typical context.
%
% \begin{itemize}
-% \item \textbf{I can't copy and paste code out of a PDF created with \texpkg{minted}. The line numbers also get copied, or whitespace is lost, or something else happens that makes the code incorrect.} There is no known method that always guarantees correct copy and paste for code in a PDF. This does not depend on whether \texpkg{minted} is used. You may want to search \href{http://tex.stackexchange.com/}{tex.stackexchange.com} to find current approaches (and their limitations). You may also want to consider using \href{https://ctan.org/pkg/attachfile}{\texpkg{attachfile}} or a similar package to bundle source code files as part of your PDF.
-% \item \textbf{There are intermittent ``I can't write on file'' errors.} This can be caused by using \texpkg{minted} in a directory that is synchronized with Dropbox or a similar file syncing program. These programs can try to sync \texpkg{minted}'s temporary files while it still needs to be able to modify them. The solution is to turn off file syncing or use a directory that is not synced.
-% \item \textbf{I receive a ``Font Warning: Some font shapes were not available'' message, or bold or italic seem to be missing.} This is due to a limitation in the font that is currently in use for typesetting code. In some cases, the default font shapes that \LaTeX\ substitutes are perfectly adequate, and the warning may be ignored. In other cases, the font substitutions may not clearly indicate bold or italic text, and you will want to switch to a different font. See The \LaTeX\ Font Catalogue's section on \href{http://www.tug.dk/FontCatalogue/typewriterfonts.html}{Typewriter Fonts} for alternatives. If you like the default \LaTeX\ fonts, the \texpkg{lmodern} package is a good place to start. The \texpkg{beramono} and \texpkg{courier} packages may also be good options.
-% \item \textbf{I receive a ``Too many open files'' error under OS X when using caching.} See the note on OS X under Section~\ref{sec:basic:preliminary}.
-% \item \textbf{TeXShop can't find \texttt{pygmentize}.} You may need to create a symlink. See \url{https://tex.stackexchange.com/questions/279214}.
-% \item \textbf{Weird things happen when I use the \texpkg{fancybox} package.} \texpkg{fancybox} conflicts with \texpkg{fancyvrb}, which \texpkg{minted} uses internally. When using \texpkg{fancybox}, make sure that it is loaded before \texpkg{minted} (or before \texpkg{fancyvrb}, if \texpkg{fancyvrb} is not loaded by \texpkg{minted}).
-% \item \textbf{When I use \texpkg{minted} with KOMA-Script document classes, I get warnings about \texttt{\string\float@addtolists}.} \texpkg{minted} uses the \texpkg{float} package to produce floated listings, but this conflicts with the way KOMA-Script does floats. Load the package \texpkg{scrhack} to resolve the conflict. Or use \texpkg{minted}'s |newfloat| package option.
+% \item \textbf{I can't copy and paste code out of a PDF created with \mintedpkg. The line numbers also get copied, or whitespace is lost, or something else happens that makes the code incorrect.} There is no known method that always guarantees correct copy and paste for code in a PDF. This does not depend on whether \mintedpkg\ is used. You may want to search \href{https://tex.stackexchange.com/}{tex.stackexchange.com} to find current approaches (and their limitations). You may also want to consider using \href{https://ctan.org/pkg/attachfile}{\texpkg{attachfile}} or a similar package to bundle source code files as part of your PDF.
+% \item \textbf{There are intermittent ``I can't write on file'' errors.} This can be caused by using \mintedpkg\ in a directory that is synchronized with Dropbox or a similar file syncing program. These programs can try to sync \mintedpkg's temporary files while it still needs to be able to modify them. The solution is to turn off file syncing or use a directory that is not synced.
+% \item \textbf{I receive a ``Font Warning: Some font shapes were not available'' message, or bold or italic seem to be missing.} This is due to a limitation in the font that is currently in use for typesetting code. In some cases, the default font shapes that \LaTeX\ substitutes are perfectly adequate, and the warning may be ignored. In other cases, the font substitutions may not clearly indicate bold or italic text, and you will want to switch to a different font. See The \LaTeX\ Font Catalogue's section on \href{https://www.tug.org/FontCatalogue/typewriterfonts.html}{Typewriter Fonts} for alternatives. If you like the default \LaTeX\ fonts, the \texpkg{lmodern} package is a good place to start. The \texpkg{beramono} and \texpkg{courier} packages may also be good options.
+% \item \textbf{I receive a ``Too many open files'' error under macOS when using caching.} See the note on macOS under Section~\ref{sec:configuration:macos}.
+% \item \textbf{Weird things happen when I use the \texpkg{fancybox} package.} \texpkg{fancybox} conflicts with \texpkg{fancyvrb}, which \mintedpkg\ uses internally. When using \texpkg{fancybox}, make sure that it is loaded before \mintedpkg\ (or before \texpkg{fancyvrb}, if \texpkg{fancyvrb} is not loaded by \mintedpkg).
+% \item \textbf{When I use \mintedpkg\ with KOMA-Script document classes, I get warnings about \texttt{\string\float@addtolists}.} \mintedpkg\ uses the \texpkg{float} package to produce floated listings, but this conflicts with the way KOMA-Script does floats. Load the package \texpkg{scrhack} to resolve the conflict. Or use \mintedpkg's |newfloat| package option.
% \item \textbf{Tilde characters \texttt{\string~} are raised, almost like superscripts.}
% This is a font issue. You need a different font encoding, possibly with a different font. Try |\usepackage[T1]{fontenc}|, perhaps with |\usepackage{lmodern}|, or something similar.
%
% \item \textbf{I'm getting errors with math, something like \texttt{TeX capacity exceeded} and \texttt{\string\leavevmode \string\kern \string\z@}.} This is due to ligatures being disabled within verbatim content. See the note under |escapeinside|.
%
-% \item \textbf{With \texttt{mathescape} and the \texpkg{breqn} package (or another special math package), the document never finishes compiling or there are other unexpected results.} Some math packages like \texpkg{breqn} give certain characters like the comma special meanings in math mode. These can conflict with \texpkg{minted}. In the \texpkg{breqn} and comma case, this can be fixed by redefining the comma within |minted| environments:
+% \item \textbf{With \texttt{mathescape} and the \texpkg{breqn} package (or another special math package), the document never finishes compiling or there are other unexpected results.} Some math packages like \texpkg{breqn} give certain characters like the comma special meanings in math mode. These can conflict with \mintedpkg. In the \texpkg{breqn} and comma case, this can be fixed by redefining the comma within |minted| environments:
%\begin{verbatim}
%\AtBeginEnvironment{minted}{\catcode`\,=12\mathcode`\,="613B}
%\end{verbatim}
%Other packages/special characters may need their own modifications.
%
-% \item \textbf{I'm getting errors with Beamer.} Due to how Beamer treats verbatim content, you may need to use either the |fragile| or |fragile=singleslide| options for frames that contain \texpkg{minted} commands and environments. |fragile=singleslide| works best, but it disables overlays. |fragile| works by saving the contents of each frame to a temp file and then reusing them. This approach allows overlays, but will break if you have the string |\end{frame}| at the beginning of a line (for example, in a |minted| environment). To work around that, you can indent the content of the environment (so that the |\end{frame}| is preceded by one or more spaces) and then use the |gobble| or |autogobble| options to remove the indentation.
-%
-% \item \textbf{Tabs are eaten by Beamer.} This is due to \href{https://bitbucket.org/rivanvx/beamer/issue/310/tab-characters-in-listings-lost-when-using}{a bug in Beamer's treatment of verbatim content}. Upgrade Beamer or use the linked patch. Otherwise, try |fragile=singleslide| if you don't need overlays, or consider using \cmd\inputminted\ or converting the tabs into spaces.
+% \item \textbf{I'm getting errors with Beamer.} Due to how Beamer treats verbatim content, you may need to use either the |fragile| or |fragile=singleslide| options for frames that contain \mintedpkg\ commands and environments. |fragile=singleslide| works best, but it disables overlays. |fragile| works by saving the contents of each frame to a temp file and then reusing them. This approach allows overlays, but will break if you have the string |\end{frame}| at the beginning of a line (for example, in a |minted| environment). To work around that, you can indent the content of the environment (so that the |\end{frame}| is preceded by one or more spaces) and then use the |gobble| or |autogobble| options to remove the indentation.
%
-% \item \textbf{I'm trying to create several new \texpkg{minted} commands/environments, and want them all to have the same settings. I'm saving the settings in a macro and then using the macro when defining the commands/environments. But it's failing.}
-% This is due to the way that \texpkg{keyval} works (\texpkg{minted} uses it to manage options). Arguments are not expanded. See \href{http://tex.stackexchange.com/questions/13563/building-keyval-arguments-using-a-macro/13564#13564}{this} and \href{http://tex.stackexchange.com/questions/145363/why-does-includegraphics-varone-vartwo-not-compile/145366#145366}{this} for more information. It is still possible to do what you want; you just need to expand the options macro before passing it to the commands that create the new commands/environments. An example is shown below. The |\expandafter| is the vital part.
+% \item \textbf{I'm trying to create several new \mintedpkg\ commands/environments, and want them all to have the same settings. I'm saving the settings in a macro and then using the macro when defining the commands/environments. But it's failing.}
+% This is due to the way that key-value processing operates. See \href{https://tex.stackexchange.com/questions/13563/building-keyval-arguments-using-a-macro/13564#13564}{this} and \href{https://tex.stackexchange.com/questions/145363/why-does-includegraphics-varone-vartwo-not-compile/145366#145366}{this} for more information. It is still possible to do what you want; you just need to expand the options macro before passing it to the commands that create the new commands/environments. An example is shown below. The |\expandafter| is the vital part.
%\begin{verbatim}
%\def\args{linenos,frame=single,fontsize=\footnotesize,style=bw}
%
@@ -1622,7 +1591,7 @@
%\commandthatdoesnotlikeverbatim{Text \usebox{\mybox}}
%\end{verbatim}
%
-% \item \textbf{Extended characters do not work inside \texpkg{minted} commands and environments, even when the \texpkg{inputenc} package is used.}
+% \item \textbf{Extended characters do not work inside \mintedpkg\ commands and environments, even when the \texpkg{inputenc} package is used.}
% Version 2.0 adds support for extended characters under the pdfTeX engine. But if you need characters that are not supported by \texpkg{inputenc}, you should use the XeTeX or LuaTeX engines instead.
%
% \item \textbf{The \texpkg{polyglossia} package is doing undesirable things to code. (For example, adding extra space around colons in French.)} You may need to put your code within |\begin{english}...\end{english}|. This may done for all |minted| environments using \texpkg{etoolbox} in the preamble:
@@ -1633,29 +1602,23 @@
% \end{verbatim}
%
% \item \begin{sloppypar} \textbf{Tabs are being turned into the character sequence \texttt{\string^\string^I}}.
-% This happens when you use XeLaTeX. You need to use the |-8bit| command-line option so that tabs may be written correctly to temporary files. See \url{http://tex.stackexchange.com/questions/58732/how-to-output-a-tabulation-into-a-file} for more on XeLaTeX's handling of tab characters. \end{sloppypar}
+% This happens when you use XeLaTeX. You need to use the |-8bit| command-line option so that tabs may be written correctly to temporary files. See \url{https://tex.stackexchange.com/questions/58732/how-to-output-a-tabulation-into-a-file} for more on XeLaTeX's handling of tab characters. \end{sloppypar}
%
-% \item \textbf{The \texpkg{caption} package produces an error when \texttt{\string\captionof} and other commands are used in combination with \texpkg{minted}.}
-% Load the \texpkg{caption} package with the option |compatibility=false|. Or better yet, use \texpkg{minted}'s |newfloat| package option, which provides better \texpkg{caption} compatibility.
+% \item \textbf{The \texpkg{caption} package produces an error when \texttt{\string\captionof} and other commands are used in combination with \mintedpkg.}
+% Load the \texpkg{caption} package with the option |compatibility=false|. Or better yet, use \mintedpkg's |newfloat| package option, which provides better \texpkg{caption} compatibility.
%
% \item \textbf{I need a listing environment that supports page breaks.} The built-in listing environment is a standard float; it doesn't support page breaks. You will probably want to define a new environment for long floats. For example,
%\begin{verbatim}
%\usepackage{caption}
%\newenvironment{longlisting}{\captionsetup{type=listing}}{}
%\end{verbatim}
-% With the \texpkg{caption} package, it is best to use \texpkg{minted}'s |newfloat| package option. See \url{http://tex.stackexchange.com/a/53540/10742} for more on |listing| environments with page breaks.
+% With the \texpkg{caption} package, it is best to use \mintedpkg's |newfloat| package option. See \url{https://tex.stackexchange.com/a/53540/10742} for more on |listing| environments with page breaks.
%
-% \item \textbf{I want to use a custom script/executable to access Pygments, rather than |pygmentize|.} Redefine |\MintedPygmentize|:
-%\begin{verbatim}
-%\renewcommand{\MintedPygmentize}{...}
-%\end{verbatim}
+% \item \textbf{I want to use the command-line option \texttt{-output-directory}, or MiKTeX's \texttt{-aux-directory}, but am getting errors.} With TeX Live 2024+, this should work automatically. Otherwise, set the environment variable |TEXMF_OUTPUT_DIRECTORY| to the desired location.
%
-% \item \textbf{I want to use the command-line option \texttt{-output-directory}, or MiKTeX's \texttt{-aux-directory}, but am getting errors.} Use the package option |outputdir| to specify the location of the output directory. Unfortunately, there is no way for \texpkg{minted} to detect the output directory automatically.
-%
-% \item \textbf{I want extended characters in frame labels, but am getting errors.} This can happen with \texpkg{minted} <2.0 and Python 2.7, due to a \href{https://bitbucket.org/birkenfeld/pygments-main/issue/801/python-2-fails-to-detect-terminal-encoding}{terminal encoding issue with Pygments}. It should work with any version of Python with \texpkg{minted} 2.0+, which processes labels internally and does not send them to Python.
% \item \textbf{\texttt{minted} environments have extra vertical space inside \texttt{tabular}.} It is possible to \href{https://github.com/gpoore/minted/issues/82}{create a custom environment} that eliminates the extra space. However, a general solution that behaves as expected in the presence of adjacent text remains to be found.
-% \item \textbf{I'm receiving a warning from \texttt{lineno.sty} that ``Command \texttt{\string\@parboxrestore} has changed.''} This can happen when \texpkg{minted} is loaded after \texpkg{csquotes}. Try loading \texpkg{minted} first. If you receive this message when you are not using \texpkg{csquotes}, you may want to experiment with the order of loading packages and might also open an issue.
-% \item \textbf{I'm using \app{texi2pdf}, and getting ``Cannot stat'' errors from \app{tar}}: This is due to the way that \app{texi2pdf} handles temporary files. \texpkg{minted} automatically cleans up its temporary files, but \app{texi2pdf} assumes that any temporary file that is ever created will still exist at the end of the run, so it tries to access the files that \texpkg{minted} has deleted. It's possible to disable minted's temp file cleanup by adding |\renewcommand{\DeleteFile}[2][]{}| after the |\usepackage{minted}|.
+% \item \textbf{I'm receiving a warning from \texttt{lineno.sty} that ``Command \texttt{\string\@parboxrestore} has changed.''} This can happen when \mintedpkg\ is loaded after \texpkg{csquotes}. Try loading \mintedpkg\ first. If you receive this message when you are not using \texpkg{csquotes}, you may want to experiment with the order of loading packages and might also open an issue.
+% \item \textbf{I'm using \app{texi2pdf}, and getting ``Cannot stat'' errors from \app{tar}}: This is due to the way that \app{texi2pdf} handles temporary files. \mintedpkg\ automatically cleans up its temporary files, but \app{texi2pdf} assumes that any temporary file that is ever created will still exist at the end of the run, so it tries to access the files that \mintedpkg\ has deleted. It's possible to disable minted's temp file cleanup by adding |\renewcommand{\DeleteFile}[2][]{}| after the |\usepackage{minted}|.
% \end{itemize}
%
%
@@ -1665,7 +1628,9 @@
%
% \textbf{Konrad Rudolph:} Special thanks to Philipp Stephani and the rest of the guys from \texttt{comp.text.tex} and \texttt{tex.stackexchange.com}.
%
-% \textbf{Geoffrey Poore:}
+% ~\par
+%
+% \noindent\textbf{Geoffrey Poore:}
% \begin{itemize}
% \item Thanks to Marco Daniel for the code on \url{tex.stackexchange.com} that inspired automatic line breaking.
% \item Thanks to Patrick Vogt for improving TikZ externalization compatibility.
@@ -1673,9 +1638,7 @@
% \item Thanks to \textsf{@jfbu} for suggestions and discussion regarding support for arbitrary Pygments style names (\#210, \#294, \#299, \#317), and for debugging assistance.
% \end{itemize}
%
-% \PrintChangelog
-%
-% \StopEventually{} %\StopEventually{\PrintIndex}
+% \StopEventually{} ^^A\StopEventually{\PrintIndex}
%
%
% \section{Implementation}
@@ -1685,1684 +1648,2140 @@
% \fi
%
%
+%
% \subsection{Required packages}
-% Load required packages. For compatibility reasons, most old functionality should be supported with the original set of packages. More recently added packages, such as |etoolbox| and |xstring|, should only be used for new features when possible. |shellesc| must be loaded before any packages that invoke |\write18|, since it is possible that they haven't yet been patched to work with LuaTeX 0.87+.
-% \begin{macrocode}
-\RequirePackage{keyval}
-\RequirePackage{kvoptions}
-\RequirePackage{fvextra}[2022/11/30]
-\RequirePackage{ifthen}
-\IfFileExists{shellesc.sty}
- {\RequirePackage{shellesc}
- \@ifpackagelater{shellesc}{2016/04/29}
- {}
- {\protected\def\ShellEscape{\immediate\write18 }}}
- {\protected\def\ShellEscape{\immediate\write18 }}
-\RequirePackage{ifplatform}
-\RequirePackage{pdftexcmds}
-\RequirePackage{etoolbox}
-\RequirePackage{xstring}
-\RequirePackage{lineno}
-\RequirePackage{framed}
+%
+%
+% \begin{macrocode}
\RequirePackage{catchfile}
+\RequirePackage{etoolbox}
+\RequirePackage{fvextra}[2024/09/05]
+\RequirePackage{latex2pydata}[2024/05/16]
+\RequirePackage{pdftexcmds}
+\RequirePackage{pgfkeys}
+\RequirePackage{pgfopts}
+\RequirePackage{shellesc}
% \end{macrocode}
%
% Make sure that either |color| or |xcolor| is loaded by the beginning of the document.
% \begin{macrocode}
\AtEndPreamble{%
- \@ifpackageloaded{color}{}{%
- \@ifpackageloaded{xcolor}{}{\RequirePackage{xcolor}}}%
-}
+ \IfPackageLoadedTF{color}%
+ {}%
+ {\IfPackageLoadedTF{xcolor}{}{\RequirePackage{xcolor}}}}
% \end{macrocode}
%
%
%
-% \subsection{Package options}
+% \subsection{Exception handling}
%
-% \begin{macro}{\minted@float@within}
%
-% Define an option that controls the section numbering of the |listing| float.
+% \begin{macro}{\minted@error}
+% \begin{macrocode}
+\def\minted@error#1{\PackageError{minted}{#1}{}}
+% \end{macrocode}
+% \end{macro}
%
+% \begin{macro}{\minted@fatalerror}
+% |\batchmode\read -1 to \minted@fatalerror@exitnow| forces an immediate exit with ``\Verb[breaklines]{! Emergency stop [...] cannot \read from terminal in nonstop modes}.''
% \begin{macrocode}
-\DeclareVoidOption{chapter}{\def\minted@float@within{chapter}}
-\DeclareVoidOption{section}{\def\minted@float@within{section}}
+\def\minted@fatalerror#1{%
+ \minted@error{#1}%
+ \batchmode\read -1 to \minted@fatalerror@exitnow}
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\minted@warning}
+% \begin{macrocode}
+\def\minted@warning#1{\PackageWarning{minted}{#1}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \subsection{Python executable and minimum supported version}
%
-% \begin{macro}{newfloat}
%
-% Define an option to use \texpkg{newfloat} rather than \texpkg{float} to create a floated |listing| environment.
+% \begin{macro}{\MintedExecutable}
+% Name of \mintedpkg\ Python executable.
+% \begin{macrocode}
+\edef\MintedExecutable{\detokenize{latexminted}}
+% \end{macrocode}
+% \end{macro}
+%
%
+% \begin{macro}{\minted@executable@minversion}
% \begin{macrocode}
-\DeclareBoolOption{newfloat}
+\edef\minted@executable@minversion{\detokenize{0.1.0}}
% \end{macrocode}
% \end{macro}
%
%
-% \begin{macro}{cache}
-% Define an option that determines whether highlighted content is cached. We use a boolean to keep track of its state.
+% \begin{macro}{\minted@executable@minmajor,\minted@executable@minminor,\minted@executable@minpatch}
% \begin{macrocode}
-\DeclareBoolOption[true]{cache}
+\def\minted@executable@setminversioncomponents{%
+ \expandafter\minted@executable@setminversioncomponents@i
+ \minted@executable@minversion\relax}
+\begingroup
+\catcode`\.=12
+\gdef\minted@executable@setminversioncomponents@i#1.#2.#3\relax{%
+ \def\minted@executable@minmajor{#1}%
+ \def\minted@executable@minminor{#2}%
+ \def\minted@executable@minpatch{#3}}
+\endgroup
+\minted@executable@setminversioncomponents
% \end{macrocode}
% \end{macro}
%
%
-% \begin{macro}{\minted@jobname}
-% At various points, temporary files and directories will need to be named after the main |.tex| file. The typical way to do this is to use |\jobname|. However, if the file name contains spaces, then |\jobname| will contain the name wrapped in quotes (older versions of MiKTeX replace spaces with asterisks instead, and \texttt{XeTeX} apparently \href{http://tex.stackexchange.com/a/93829/10742}{allows double quotes within file names}, in which case names are wrapped in single quotes). While that is perfectly fine for working with \LaTeX\ internally, it causes problems with |\write18|, since quotes will end up in unwanted locations in shell commands. It would be possible to strip the wrapping quotation marks when they are present, and maintain any spaces in the file name. But it is simplest to create a ``sanitized'' version of |\jobname| in which spaces and asterisks are replaced by underscores, and double quotes are stripped. Single quotes are also replaced, since they can cause quoted string errors, or become double quotes in the process of being passed to the system through |\write18|.
+% \begin{macro}{\minted@executable@version}
% \begin{macrocode}
-\StrSubstitute{\jobname}{ }{_}[\minted@jobname]
-\StrSubstitute{\minted@jobname}{*}{_}[\minted@jobname]
-\StrSubstitute{\minted@jobname}{"}{}[\minted@jobname]
-\StrSubstitute{\minted@jobname}{'}{_}[\minted@jobname]
+\let\minted@executable@version\relax
% \end{macrocode}
% \end{macro}
%
%
-% \begin{macro}{\minted@cachedir}
-% Set the directory in which cached content is saved. The default uses a |minted-| prefix followed by the sanitized |\minted@jobname|.
+% \begin{macro}{minted@executable@exists}
% \begin{macrocode}
-\newcommand{\minted@cachedir}{\detokenize{_}minted-\minted@jobname}
-\let\minted@cachedir@windows\minted@cachedir
-\define@key{minted}{cachedir}{%
- \@namedef{minted@cachedir}{#1}%
- \StrSubstitute{\minted@cachedir}{/}{\@backslashchar}[\minted@cachedir@windows]}
+\newbool{minted@executable@exists}
% \end{macrocode}
% \end{macro}
%
%
-% \begin{macro}{finalizecache}
-% Define an option that switches the naming of cache files from an MD5-based system to a |listing<number>| scheme. Compiling with this option is a prerequisite to turning on |frozencache|.
+% \begin{macro}{minted@executable@issupported}
% \begin{macrocode}
-\DeclareBoolOption{finalizecache}
+\newbool{minted@executable@issupported}
% \end{macrocode}
% \end{macro}
%
%
-% \begin{macro}{frozencache}
-% Define an option that uses a fixed set of cache files, using |listing<number>| file naming with |\write18| disabled. This is convenient for working with a document in an environment in which |\write18| support is disabled and \texpkg{minted} content does not need to be modified.
+%
+% \subsection{Timestamp}
+%
+%
+% Timestamp for current compile. This could eventually be simplified to use |\c_sys_timestamp_str| for all engines; that macro is in \texpkg{l3kernel} from 2023-08-29.
+%
+% \begin{macro}{\minted@timestamp}
% \begin{macrocode}
-\DeclareBoolOption{frozencache}
+\begingroup
+\catcode`\-=12
+\catcode`\+=12
+\catcode`\:=12
+\def\minted@creationdatetotimestamp#1{%
+ \expandafter\minted@creationdatetotimestamp@i#1-\relax}
+\def\minted@creationdatetotimestamp@i#1:#2-#3\relax{%
+ \minted@creationdatetotimestamp@ii#2+\relax}
+\def\minted@creationdatetotimestamp@ii#1+#2\relax{%
+ #1}
+\expandafter\ifx\csname pdftexversion\endcsname\relax
+\else
+ \xdef\minted@timestamp{\minted@creationdatetotimestamp{\pdfcreationdate}}
+\fi
+\expandafter\ifx\csname XeTeXrevision\endcsname\relax
+\else
+ \xdef\minted@timestamp{\minted@creationdatetotimestamp{\creationdate}}
+\fi
+\expandafter\ifx\csname directlua\endcsname\relax
+\else
+ \xdef\minted@timestamp{\minted@creationdatetotimestamp{\pdffeedback creationdate}}
+\fi
+\endgroup
+\ifcsname minted@timestamp\endcsname
+\else
+ \begingroup
+ \newcounter{minted@timestamp@hr}
+ \newcounter{minted@timestamp@min}
+ \setcounter{minted@timestamp@min}{\number\time}
+ \loop\unless\ifnum\value{minted@timestamp@min}<60\relax
+ \addtocounter{minted@timestamp@hr}{1}
+ \addtocounter{minted@timestamp@min}{-60}
+ \repeat
+ \xdef\minted@timestamp{%
+ \the\year
+ \ifnum\month<10 0\fi\the\month
+ \ifnum\day<10 0\fi\the\day
+ \ifnum\value{minted@timestamp@hr}<10 0\fi\theminted@timestamp@hr
+ \ifnum\value{minted@timestamp@min}<10 0\fi\theminted@timestamp@min}
+ \endgroup
+\fi
% \end{macrocode}
% \end{macro}
%
%
-% \begin{macro}{\minted@outputdir}
-% The |-output-directory| command-line option for \LaTeX\ causes problems for \texpkg{minted}, because the \texpkg{minted} temporary files are saved in the output directory, but \texpkg{minted} still looks for them in the document root directory. There is no way to access the value of the command-line option. But it is possible to allow the output directory to be specified manually as a package option. A trailing slash is automatically appended to the |outputdir|, so that it may be directly joined to |cachedir|. This may be redundant if the user-supplied value already ends with a slash, but doubled slashes are ignored under *nix and Windows, so it isn't a problem.
+%
+% \subsection{Jobname MD5 and derived file names}
+%
+%
+% \begin{macro}{\MintedJobnameMdfive}
+% MD5 hash of |\jobname|. If |\jobname| contains spaces so that \LaTeX\ inserts wrapping quotes (\href{https://tex.stackexchange.com/a/93829/10742}{single} or double) within |\jobname|, these quotes are stripped, so that only the stem (basename without file extension) of the file path is hashed. This makes it simple to calculate the hash externally outside of \LaTeX.
+%
+% |\MintedJobnameMdfive| is used for creating temp files rather than |\jobname| to avoid shell escaping issues. Under restricted shell escape, shell commands are quoted and escaped by \LaTeX\ itself, so using |\jobname| would work correctly in most cases. However, when full shell escape is enabled, no command escaping is performed by \LaTeX, so \mintedpkg\ would have to quote/escape |\jobname| in a platform-specific manner. (See for example \href{https://github.com/TeX-Live/texlive-source/blob/e47512fcb293e2390b609bce612449d579efc230/texk/web2c/doc/web2c.info#L1573}{\Verb{web2c.info}} and \href{https://github.com/TeX-Live/texlive-source/blob/e47512fcb293e2390b609bce612449d579efc230/texk/web2c/lib/texmfmp.c#L228}{\Verb{texmfmp.c}} in the TeX Live source for shell escape implementation details.) It is simpler to avoid escaping issues altogether, including edge cases in the restricted shell escape scenario, by using an MD5 hash that is guaranteed to consist only of ASCII alphanumeric characters.
% \begin{macrocode}
-\let\minted@outputdir\@empty
-\let\minted@outputdir@windows\@empty
-\define@key{minted}{outputdir}{%
- \@namedef{minted@outputdir}{#1/}%
- \StrSubstitute{\minted@outputdir}{/}%
- {\@backslashchar}[\minted@outputdir@windows]}
+\begingroup
+\catcode`\"=12
+\catcode`\'=12
+\gdef\minted@setjobnamemdfive#1#2\FV@Sentinel{%
+ \ifx#1"\relax
+ \let\minted@next\minted@setjobnamemdfive@dquoted
+ \else\ifx#1'\relax
+ \let\minted@next\minted@setjobnamemdfive@squoted
+ \else
+ \let\minted@next\minted@setjobnamemdfive@uquoted
+ \fi\fi
+ \minted@next#1#2\FV@Sentinel}
+\gdef\minted@setjobnamemdfive@dquoted#1#2\FV@Sentinel{%
+ \minted@setjobnamemdfive@dquoted@i#2"\FV@Sentinel}
+\gdef\minted@setjobnamemdfive@dquoted@i#1"#2\FV@Sentinel{%
+ \if\relax\detokenize{#2}\relax
+ \edef\MintedJobnameMdfive{\pdf@mdfivesum{\jobname}}%
+ \else\if\relax\detokenize\expandafter{\@gobble#2}\relax
+ \edef\MintedJobnameMdfive{\pdf@mdfivesum{#1}}%
+ \else
+ \edef\MintedJobnameMdfive{\pdf@mdfivesum{\jobname}}%
+ \fi\fi}
+\gdef\minted@setjobnamemdfive@squoted#1#2\FV@Sentinel{%
+ \minted@setjobnamemdfive@squoted@i#2'\FV@Sentinel}
+\gdef\minted@setjobnamemdfive@squoted@i#1'#2\FV@Sentinel{%
+ \if\relax\detokenize{#2}\relax
+ \edef\MintedJobnameMdfive{\pdf@mdfivesum{\jobname}}%
+ \else\if\relax\detokenize\expandafter{\@gobble#2}\relax
+ \edef\MintedJobnameMdfive{\pdf@mdfivesum{#1}}%
+ \else
+ \edef\MintedJobnameMdfive{\pdf@mdfivesum{\jobname}}%
+ \fi\fi}
+\gdef\minted@setjobnamemdfive@uquoted#1\FV@Sentinel{%
+ \edef\MintedJobnameMdfive{\pdf@mdfivesum{#1}}}
+\endgroup
+\expandafter\minted@setjobnamemdfive\jobname\FV@Sentinel
% \end{macrocode}
% \end{macro}
%
%
-% \begin{macro}{inputlanglinenos}
-% Enable |langlinenos| and make it apply to |\inputminted|.
+%
+% \begin{macro}{\MintedCacheIndexFilename}
+% Index file in cache. Used to detect whether cache exists.
% \begin{macrocode}
-\DeclareBoolOption{inputlanglinenos}
+\edef\MintedCacheIndexFilename{%
+ \detokenize{_}\MintedJobnameMdfive\detokenize{.index.minted}}
% \end{macrocode}
% \end{macro}
%
%
-% \begin{macro}{kpsewhich}
-% Define an option that invokes |kpsewhich| to locate the files that are to be |pygmentize|d. This isn't done by default to avoid the extra overhead, but can be useful with some build tools such as |texi2pdf| that rely on modifying |TEXINPUTS|.
+% \begin{macro}{\MintedConfigFilename}
+% File containing config info such as Python executable version. Written by the Python side, read by the \LaTeX\ side, and then immediately deleted.
% \begin{macrocode}
-\DeclareBoolOption{kpsewhich}
+\edef\MintedConfigFilename{%
+ \detokenize{_}\MintedJobnameMdfive\detokenize{.config.minted}}
% \end{macrocode}
% \end{macro}
%
%
-% \begin{macro}{langlinenos}
-% Define an option that makes all |minted| environments and |\mint| commands for a given language share cumulative line numbering (if |firstnumber=last|).
+% \begin{macro}{\MintedDataFilename}
+% Temp file for data. Written by the \LaTeX\ side, read by the Python side. Frequently overwritten, so only cleaned up at the end of the compile.
% \begin{macrocode}
-\DeclareBoolOption{langlinenos}
+\edef\MintedDataFilename{%
+ \detokenize{_}\MintedJobnameMdfive\detokenize{.data.minted}}
% \end{macrocode}
% \end{macro}
%
%
-% \begin{macro}{draft}
-% Define an option that allows \texpkg{fancyvrb} to do all typesetting directly, without using \app{Pygments}. This trades syntax highlighting for speed. Note that in many cases, the difference in performance between caching and draft mode will be minimal. Also note that draft settings may be inherited from the document class.
+% \begin{macro}{\MintedErrlogFilename}
+% Log file created when the Python side encounters an unexpected error that it is not designed to report to the \LaTeX\ side.
% \begin{macrocode}
-\DeclareBoolOption{draft}
+\edef\MintedErrlogFilename{%
+ \detokenize{_}\MintedJobnameMdfive\detokenize{.errlog.minted}}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{final}
-% Define a |final| option that is the opposite of |draft|, since many packages do this.
+%
+% \begin{macro}{\MintedMessageFilename}
+% Messages from the Python side to the LaTeX side. Deleted immediately after reading.
% \begin{macrocode}
-\DeclareComplementaryOption{final}{draft}
+\edef\MintedMessageFilename{%
+ \detokenize{_}\MintedJobnameMdfive\detokenize{.message.minted}}
% \end{macrocode}
% \end{macro}
%
%
-% Process package options. Proceed with everything that immediately relies upon them. If PGF/Ti\textit{k}Z externalization is in use, switch on |draft| mode and turn off |cache|. Externalization involves compiling the \emph{entire} document; all parts not related to the current image are ``silently thrown away.'' \texpkg{minted} needs to cooperate with that by not writing any temp files or creating any directories. Two checks are done for externalization. The first, using |\tikzifexternalizing|, works if externalization is set before \texpkg{minted} is loaded. The second, using |\tikzexternalrealjob|, works if externalization is set after \texpkg{minted} is loaded.
%
+% \subsection{Package options}
+%
+%
+% \begin{macro}{\minted@pgfopts}
% \begin{macrocode}
-\ProcessKeyvalOptions*
-\ifthenelse{\boolean{minted@newfloat}}{\RequirePackage{newfloat}}{\RequirePackage{float}}
-\ifcsname tikzifexternalizing\endcsname
- \tikzifexternalizing{\minted@drafttrue\minted@cachefalse}{}
-\else
- \ifcsname tikzexternalrealjob\endcsname
- \minted@drafttrue
- \minted@cachefalse
- \else
- \fi
-\fi
-\ifthenelse{\boolean{minted@finalizecache}}%
- {\ifthenelse{\boolean{minted@frozencache}}%
- {\PackageError{minted}%
- {Options "finalizecache" and "frozencache" are not compatible}%
- {Options "finalizecache" and "frozencache" are not compatible}}%
- {}}%
- {}
-\ifthenelse{\boolean{minted@cache}}%
- {\ifthenelse{\boolean{minted@frozencache}}%
- {}%
- {\AtEndOfPackage{\ProvideDirectory{\minted@outputdir\minted@cachedir}}}}%
- {}
+\def\minted@pgfopts#1{%
+ \pgfkeys{/minted/pkg/.cd,#1}}
% \end{macrocode}
+% \end{macro}
%
%
+% \subsubsection{Package option definitions}
%
-% \subsection{Input, caching, and temp files}
%
-% \begin{macro}{\minted@input}
-% We need a wrapper for |\input|. In most cases, |\input| failure will be due to attempts to use |\inputminted| with files that don't exist, but we also want to give informative error messages when |outputdir| is needed or incompatible build tools are used.
+% \begin{macro}{\minted@float@within}
+% Control the section numbering of the |listing| float.
% \begin{macrocode}
-\newcommand{\minted@input}[1]{%
- \IfFileExists{#1}%
- {\input{#1}}%
- {\PackageError{minted}{Missing Pygments output; \string\inputminted\space
- was^^Jprobably given a file that does not exist--otherwise, you may need
- ^^Jthe outputdir package option, or may be using an incompatible build
- tool,^^Jor may be using frozencache with a missing file}%
- {This could be caused by using -output-directory or -aux-directory
- ^^Jwithout setting minted's outputdir, or by using a build tool that
- ^^Jchanges paths in ways minted cannot detect,
- ^^Jor using frozencache with a missing file.}}%
+\minted@pgfopts{
+ chapter/.code=\def\minted@float@within{chapter},
+ chapter/.value forbidden,
+ section/.code=\def\minted@float@within{section},
+ section/.value forbidden,
}
% \end{macrocode}
% \end{macro}
%
%
-% \begin{macro}{\minted@infile}
-% Define a default name for files of highlighted content that are brought it. Caching will redefine this. We start out with the default, non-caching value.
+% \begin{macro}{minted@newfloat}
+% Use \texpkg{newfloat} rather than \texpkg{float} to create a floating |listing| environment.
% \begin{macrocode}
-\newcommand{\minted@infile}{\minted@jobname.out.pyg}
+\newbool{minted@newfloat}
+\minted@pgfopts{
+ newfloat/.is if=minted@newfloat,
+}
% \end{macrocode}
% \end{macro}
%
%
-% We need a way to track the cache files that are created, and delete those that are not in use. This is accomplished by creating a comma-delimited list of cache files and saving this list to the |.aux| file so that it may be accessed on subsequent runs. During subsequent runs, this list is compared against the cache files that are actually used, and unused files are deleted. Cache file names are created with MD5 hashes of highlighting settings and file contents, with a |.pygtex| extension, so they never contain commas. Thus comma-delimiting the list of file names doesn't introduce a potential for errors.
-%
-% \begin{macro}{\minted@cachelist}
-% This is a list of the current cache files.
+% \begin{macro}{minted@debug}
+% Keep temp files for aid in debugging.
% \begin{macrocode}
-\newcommand{\minted@cachelist}{}
+\newbool{minted@debug}
+\minted@pgfopts{
+ debug/.is if=minted@debug,
+}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\minted@addcachefile}
-% This adds a file to the list of cache files. It also creates a macro involving the hash, so that the current usage of the hash can be easily checked by seeing if the macro exists. The list of cache files must be created with built-in linebreaks, so that when it is written to the |.aux| file, it won't all be on one line and thereby risk buffer errors.
+%
+% \begin{macro}{minted@cache}
+% Determine whether highlighted content is cached.
% \begin{macrocode}
-\newcommand{\minted@addcachefile}[1]{%
- \expandafter\long\expandafter\gdef\expandafter\minted@cachelist\expandafter{%
- \minted@cachelist,^^J%
- \space\space#1}%
- \expandafter\gdef\csname minted@cached@#1\endcsname{}%
+\newbool{minted@cache}
+\booltrue{minted@cache}
+\minted@pgfopts{
+ cache/.is if=minted@cache,
}
% \end{macrocode}
% \end{macro}
%
-%
-% \begin{macro}{\minted@savecachelist}
-%
-% We need to be able to save the list of cache files to the |.aux| file, so that we can reload it on the next run.
+% \begin{macro}{\minted@cachedir}
+% Set the directory in which cached content is saved.
% \begin{macrocode}
-\newcommand{\minted@savecachelist}{%
- \ifdefempty{\minted@cachelist}{}{%
- \immediate\write\@mainaux{%
- \string\gdef\string\minted@oldcachelist\string{%
- \minted@cachelist\string}}%
- }%
+\edef\minted@cachedir{\detokenize{_minted}}
+\minted@pgfopts{
+ cachedir/.estore in=\minted@cachedir,
}
% \end{macrocode}
% \end{macro}
%
-%
-% \begin{macro}{\minted@cleancache}
-% Clean up old cache files that are no longer in use.
+% \begin{macro}{minted@frozencache}
+% When a cache file is missing, raise an error instead of attempting to update the cache. This is intended for editing a document with a pre-existing cache in an environment in which |\ShellEscape| support is disabled or the \mintedpkg\ executable is not available.
% \begin{macrocode}
-\newcommand{\minted@cleancache}{%
- \ifcsname minted@oldcachelist\endcsname
- \def\do##1{%
- \ifthenelse{\equal{##1}{}}{}{%
- \ifcsname minted@cached@##1\endcsname\else
- \DeleteFile[\minted@outputdir\minted@cachedir]{##1}%
- \fi
- }%
- }%
- \expandafter\docsvlist\expandafter{\minted@oldcachelist}%
- \else
- \fi
+\newbool{minted@frozencache}
+\minted@pgfopts{
+ frozencache/.is if=minted@frozencache,
}
% \end{macrocode}
% \end{macro}
%
%
-% At the end of the document, save the list of cache files and clean the cache. If in draft mode, don't clean up the cache and save the old cache file list for next time. This allows draft mode to be switched on and off without requiring that all highlighted content be regenerated. The saving and cleaning operations may be called without conditionals, since their definitions already contain all necessary checks for their correct operation.
+% \begin{macro}{minted@lexerlinenos}
+% Make all |minted| environments and |\mint| commands for a given lexer share cumulative line numbering (if |firstnumber=last|). |langlinenos| is for backward compatility with \mintedpkg\ v2.
% \begin{macrocode}
-\ifthenelse{\boolean{minted@draft}}%
- {\AtEndDocument{%
- \ifcsname minted@oldcachelist\endcsname
- \StrSubstitute{\minted@oldcachelist}{,}{,^^J }[\minted@cachelist]
- \minted@savecachelist
- \fi}}%
- {\ifthenelse{\boolean{minted@frozencache}}%
- {\AtEndDocument{%
- \ifcsname minted@oldcachelist\endcsname
- \StrSubstitute{\minted@oldcachelist}{,}{,^^J }[\minted@cachelist]
- \minted@savecachelist
- \fi}}%
- {\AtEndDocument{%
- \minted@savecachelist
- \minted@cleancache}}}%
+\newbool{minted@lexerlinenos}
+\minted@pgfopts{
+ lexerlinenos/.is if=minted@lexerlinenos,
+ langlinenos/.is if=minted@lexerlinenos,
+}
% \end{macrocode}
+% \end{macro}
%
+% \begin{macro}{minted@inputlexerlinenos}
+% Enable |lexerlinenos| and make it apply to |\inputminted|. |inputlanglinenos| is for backward compatility with \mintedpkg\ v2.
+% \begin{macrocode}
+\newbool{minted@inputlexerlinenos}
+\minted@pgfopts{
+ inputlexerlinenos/.is if=minted@inputlexerlinenos,
+ inputlanglinenos/.is if=minted@inputlexerlinenos,
+}
+% \end{macrocode}
+% \end{macro}
%
%
-% \subsection{OS interaction}
-%
-% We need system-dependent macros for communicating with the ``outside world.''
-%
-% \begin{macro}{\DeleteFile}
-%
-% Delete a file. Define conditionally in case an equivalent macro has already been defined.
+% \begin{macro}{minted@placeholder,\minted@insertplaceholder}
+% Cause all commands and environments to insert a placeholder rather than typesetting code. This functionality is primarily intended for use with PGF/Ti\textit{k}Z externalization, when all non-PGF/Ti\textit{k}Z features should be disabled.
+% \begin{macrocode}
+\newbool{minted@placeholder}
+\minted@pgfopts{
+ placeholder/.is if=minted@placeholder,
+}
+\gdef\minted@insertplaceholder{%
+ \ifbool{minted@isinline}%
+ {\begingroup
+ \fvset{extra=true}\Verb[formatcom=\color{red}\bfseries]{<MINTED>}%
+ \endgroup}%
+ {\begingroup
+ \par\noindent
+ \fvset{extra=true}\Verb[formatcom=\color{red}\bfseries]{<MINTED>}%
+ \par
+ \endgroup}}%
+% \end{macrocode}
+% \end{macro}
%
+% \begin{macro}{minted@verbatim}
+% Typeset all code verbatim using \texpkg{fancyvrb}; do not use Python at all.
% \begin{macrocode}
-\ifwindows
- \providecommand{\DeleteFile}[2][]{%
- \ifthenelse{\equal{#1}{}}%
- {\IfFileExists{#2}{\ShellEscape{del #2}}{}}%
- {\IfFileExists{#1/#2}{%
- \StrSubstitute{#1}{/}{\@backslashchar}[\minted@windir]
- \ShellEscape{del \minted@windir\@backslashchar #2}}{}}}
-\else
- \providecommand{\DeleteFile}[2][]{%
- \ifthenelse{\equal{#1}{}}%
- {\IfFileExists{#2}{\ShellEscape{rm #2}}{}}%
- {\IfFileExists{#1/#2}{\ShellEscape{rm #1/#2}}{}}}
-\fi
+\newbool{minted@verbatim}
+\minted@pgfopts{
+ verbatim/.is if=minted@verbatim,
+}
% \end{macrocode}
% \end{macro}
%
%
-% \begin{macro}{\ProvideDirectory}
+% \begin{macro}{\minted@highlightmode@init,\minted@fasthighlightmode@checkstart,\minted@fasthighlightmode@checkend}
+% Determine whether highlighting is performed immediately or at the end of the compile. Immediately means more overhead during the compile, but no second compile is required. Highlighting at the end of the compile means a second compile is required, but also makes highlighing much faster since there is only a single |\ShellEscape|.
%
-% We need to be able to create a directory, if it doesn't already exist. This is primarily for storing cached highlighted content.
+% |\minted@highlightmode@init| is invoked within |\minted@detectconfig| if the Python executable is available and enabled. For the |fastfirst| case, |\minted@highlightmode@init| requires the |\minted@cachepath| that is set within |\minted@detectconfig|.
%
+% |\minted@fasthighlightmode@checkend| is invoked |\AfterEndDocument| with |\minted@clean|; the |\AtEndDocument| is created with the definition of |\minted@clean| so that everything is in the correct order.
% \begin{macrocode}
-\ifwindows
- \newcommand{\ProvideDirectory}[1]{%
- \StrSubstitute{#1}{/}{\@backslashchar}[\minted@windir]
- \ShellEscape{if not exist \minted@windir\space mkdir \minted@windir}}
-\else
- \newcommand{\ProvideDirectory}[1]{%
- \ShellEscape{mkdir -p #1}}
-\fi
+\newbool{minted@fasthighlightmode}
+\newbool{minted@fasthighlightmode@open}
+\minted@pgfopts{
+ highlightmode/.is choice,
+ highlightmode/fast/.code=
+ \let\minted@highlightmode@init\minted@highlightmode@init@fast,
+ highlightmode/fastfirst/.code=
+ \let\minted@highlightmode@init\minted@highlightmode@init@fastfirst,
+ highlightmode/immediate/.code=
+ \let\minted@highlightmode@init\minted@highlightmode@init@immediate,
+}
+\def\minted@highlightmode@init@fast{%
+ \global\booltrue{minted@fasthighlightmode}}
+\def\minted@highlightmode@init@fastfirst{%
+ \IfFileExists{\minted@cachepath\MintedCacheIndexFilename}%
+ {\global\boolfalse{minted@fasthighlightmode}}
+ {\global\booltrue{minted@fasthighlightmode}}}
+\def\minted@highlightmode@init@immediate{%
+ \global\boolfalse{minted@fasthighlightmode}}
+\let\minted@highlightmode@init\minted@highlightmode@init@fastfirst
+\def\minted@fasthighlightmode@checkstart{%
+ \ifbool{minted@fasthighlightmode}%
+ {\pydatawritelistopen
+ \global\booltrue{minted@fasthighlightmode@open}}%
+ {}%
+ \global\let\minted@fasthighlightmode@checkstart\relax}
+\def\minted@fasthighlightmode@checkend{%
+ \ifbool{minted@fasthighlightmode@open}%
+ {\pydatasetfilename{\MintedDataFilename}%
+ \pydatawritelistclose
+ \pydataclosefilename{\MintedDataFilename}%
+ \global\boolfalse{minted@fasthighlightmode@open}%
+ \global\boolfalse{minted@fasthighlightmode}%
+ \begingroup
+ \minted@exec@batch
+ \ifx\minted@exec@warning\relax
+ \else
+ \expandafter\minted@exec@warning
+ \fi
+ \ifx\minted@exec@error\relax
+ \else
+ \expandafter\minted@exec@error
+ \fi
+ \endgroup
+ \global\boolfalse{minted@canexec}}%
+ {}%
+ \global\let\minted@fasthighlightmode@checkend\relax}
% \end{macrocode}
% \end{macro}
%
%
-% \begin{macro}{\TestAppExists}
%
-% Determine whether a given application exists.
+% \subsubsection{Package options that are no longer supported or deprecated}
%
-% Usage is a bit roundabout, but has been retained for backward compatibility. At some point, it may be worth replacing this with something using \verb`\@@input"|<command>"`. That would require MiKTeX users to |--enable-pipes|, however, which would make things a little more complicated. If Windows XP compatibility is ever no longer required, the |where| command could be used instead of the approach for Windows.
%
-% To test whether an application exists, use the following code:
+% \paragraph{finalizecache}
+% Old, no longer needed option from \mintedpkg\ v2.
+% \begin{macrocode}
+\minted@pgfopts{
+ finalizecache/.code=\minted@error{%
+ Package option "finalizecache" is no longer needed with minted v3+},
+}
+% \end{macrocode}
%
-% \begin{Verbatim}
-%\TestAppExists{appname}
-%\ifthenelse{\boolean{AppExists}}{app exists}{app doesn't exist}
-% \end{Verbatim}
%
+% \paragraph{kpsewhich}
+% Old, no longer needed option from \mintedpkg\ v2.
% \begin{macrocode}
-\newboolean{AppExists}
-\newread\minted@appexistsfile
-\newcommand{\TestAppExists}[1]{%
- \ifwindows
+\minted@pgfopts{
+ kpsewhich/.code=\minted@error{%
+ Package option "kpsewhich" is no longer needed with minted v3+},
+}
% \end{macrocode}
%
-% On Windows, we need to use path expansion and write the result to a file.
-% If the application doesn't exist, the file will be empty (except for a newline);
-% otherwise, it will contain the full path of the application.
%
+% \paragraph{outputdir}
+% Old, no longer needed option from \mintedpkg\ v2.
+%
+% The empty |\minted@outputdir| is for backward compatibility with packages that depend on \mintedpkg\ v2 internals.
% \begin{macrocode}
- \DeleteFile{\minted@jobname.aex}%
- \ShellEscape{for \string^\@percentchar i in (#1.exe #1.bat #1.cmd)
- do set > \minted@jobname.aex <nul: /p
- x=\string^\@percentchar \string~$PATH:i>> \minted@jobname.aex}%
- %$ <- balance syntax highlighting
- \immediate\openin\minted@appexistsfile\minted@jobname.aex
- \expandafter\def\expandafter\@tmp@cr\expandafter{\the\endlinechar}%
- \endlinechar=-1\relax
- \readline\minted@appexistsfile to \minted@apppathifexists
- \endlinechar=\@tmp@cr
- \ifthenelse{\equal{\minted@apppathifexists}{}}%
- {\AppExistsfalse}%
- {\AppExiststrue}%
- \immediate\closein\minted@appexistsfile
- \DeleteFile{\minted@jobname.aex}%
- \else
+\minted@pgfopts{
+ outputdir/.code=\minted@error{%
+ Package option "outputdir" is no longer needed with minted v3+;
+ the output directory is automatically detected for TeX Live 2024+,
+ and the environment variable \detokenize{TEXMF_OUTPUT_DIRECTORY}
+ can be set manually in other cases},
+}
+\def\minted@outputdir{}
% \end{macrocode}
%
-% On Unix-like systems, we do a straightforward |which| test and create a file upon success, whose existence we can then check.
%
+% \paragraph{draft}
+% Old, no longer supported option from \mintedpkg\ v2. Improvements in caching combined with the new \mintedpkg\ v3 package options |placeholder| and |verbatim| provide better alternatives.
% \begin{macrocode}
- \ShellEscape{command -v #1 && touch \minted@jobname.aex}%
- \IfFileExists{\minted@jobname.aex}%
- {\AppExiststrue
- \DeleteFile{\minted@jobname.aex}}%
- {\AppExistsfalse}%
- \fi
+\minted@pgfopts{
+ draft/.code=\minted@warning{%
+ Package option "draft" no longer has any effect with minted v3+},
}
% \end{macrocode}
-% \end{macro}
%
+% \paragraph{final}
+% Old, no longer supported option from \mintedpkg\ v2. Improvements in caching combined with the new \mintedpkg\ v3 package options |placeholder| and |verbatim| provide better alternatives.
+% \begin{macrocode}
+\minted@pgfopts{
+ final/.code=\minted@warning{%
+ Package option "final" no longer has any effect with minted v3+},
+}
+% \end{macrocode}
%
-% \subsection{Option processing}
%
-% Option processing is somewhat involved, because we want to be able to define options at various levels of hierarchy: individual command/environment, language, global (document). And once those options are defined, we need to go through the hierarchy in a defined order of precedence to determine which option to apply. As if that wasn't complicated enough, some options need to be sent to Pygments, some need to be sent to \texpkg{fancyvrb}, and some need to be processed within \texpkg{minted} itself.
%
-% To begin with, we need macros for storing lists of options that will later be passed via the command line to Pygments (|optlistcl|). These are defined at the global (|cl@g|), language (|cl@lang|), and command or environment (|cl@cmd|) levels, so that settings can be specified at various levels of hierarchy. The language macro is actually a placeholder. The current language will be tracked using |\minted@lang|. Each individual language will create a |\minted@optlistcl@lang|\meta{language} macro. |\minted@optlistcl@lang| may be |\let| to this macro as convenient; otherwise, the general language macro merely serves as a placeholder.
+% \subsubsection{Package option processing}
%
-% The global- and language-level lists also have an |inline| (|i|) variant. This allows different settings to be applied in inline settings. An inline variant is not needed at the command/environment level, since at that level settings would not be present unless they were supposed to be applied.
%
-% \begin{macro}{\minted@optlistcl@g}
% \begin{macrocode}
-\newcommand{\minted@optlistcl@g}{}
+\ProcessPgfOptions{/minted/pkg}
+\ifbool{minted@cache}{}{\def\minted@cachedir{}}%
+\ifbool{minted@newfloat}{\RequirePackage{newfloat}}{\RequirePackage{float}}
+\ifcsname tikzifexternalizing\endcsname
+ \ifx\tikzifexternalizing\relax
+ \else
+ \tikzifexternalizing{\booltrue{minted@placeholder}}{}
+ \fi
+\fi
% \end{macrocode}
-% \end{macro}
%
-% \begin{macro}{\minted@optlistcl@g@i}
+%
+%
+% \subsection{Util}
+%
+%
+% \begin{macro}{\minted@styleprefix}
+% Prefix for generating Pygments style names.
% \begin{macrocode}
-\newcommand{\minted@optlistcl@g@i}{}
+\def\minted@styleprefix{PYG}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\minted@lang}
+%
+% \begin{macro}{minted@tmpcnt}
+% Temp counter.
% \begin{macrocode}
-\let\minted@lang\@empty
+\newcounter{minted@tmpcnt}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\minted@optlistcl@lang}
+%
+% \begin{macro}{\minted@forcsvlist}
+% Wrapper for \texpkg{etoolbox} |\forcsvlist|. Syntax: |\minted@forcsvlist|\marg{handler}\marg{listmacro}.
% \begin{macrocode}
-\newcommand{\minted@optlistcl@lang}{}
+\def\minted@forcsvlist#1#2{%
+ \if\relax\detokenize\expandafter{\@gobble#2}\relax
+ \expandafter\minted@forcsvlist@exp
+ \else
+ \expandafter\minted@forcsvlist@i
+ \fi
+ {#2}{#1}}
+\def\minted@forcsvlist@exp#1#2{%
+ \expandafter\minted@forcsvlist@i\expandafter{#1}{#2}}
+\def\minted@forcsvlist@i#1#2{%
+ \forcsvlist{#2}{#1}}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\minted@optlistcl@lang@i}
+%
+% \begin{macro}{\minted@apptoprovidecs}
% \begin{macrocode}
-\newcommand{\minted@optlistcl@lang@i}{}
+\def\minted@apptoprovidecs#1#2{%
+ \ifcsname#1\endcsname
+ \else
+ \expandafter\def\csname#1\endcsname{}%
+ \fi
+ \expandafter\let\expandafter\minted@tmp\csname#1\endcsname
+ \expandafter\def\expandafter\minted@tmp\expandafter{\minted@tmp#2}%
+ \expandafter\let\csname#1\endcsname\minted@tmp}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\minted@optlistcl@cmd}
+%
+% \begin{macro}{\minted@const@pgfkeysnovalue}
% \begin{macrocode}
-\newcommand{\minted@optlistcl@cmd}{}
+\def\minted@const@pgfkeysnovalue{\pgfkeysnovalue}
% \end{macrocode}
% \end{macro}
%
-% We also need macros for storing lists of options that will later be passed to \texpkg{fancyvrb} (|optlistfv|). As before, these exist at the global (|fv@g|), language (|fv@lang|), and command or environment (|fv@cmd|) levels. Pygments accepts \texpkg{fancyvrb} options, but in almost all cases, these options may be applied via |\fvset| rather than via running Pygments. This is significantly more efficient when caching is turned on, since it allows formatting changes to be applied without having to re-highlight the code.
%
-% \begin{macro}{\minted@optlistfv@g}
+% \begin{macro}{\minted@ensureatletter}
% \begin{macrocode}
-\newcommand{\minted@optlistfv@g}{}
+\def\minted@ensureatletter#1{%
+ \edef\minted@tmpatcat{\the\catcode`\@}%
+ \catcode`\@=11\relax
+ #1%
+ \catcode`\@=\minted@tmpatcat\relax}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\minted@optlistfv@g@i}
+%
+%
+% \subsubsection{Check whether a string matches the regex \Verb{^[0-9A-Za-z_-]+$}}
+%
+% These macros are used to restrict possible names of highlighting styles on the \LaTeX\ side.
+%
+% \begin{macro}{\minted@is\detokenize{<char_category><codepoint_decimal>}}
+% Create macros used in determining whether a given character is part of a specified set of characters.
% \begin{macrocode}
-\newcommand{\minted@optlistfv@g@i}{}
+% [0-9]
+\setcounter{minted@tmpcnt}{48}
+\loop\unless\ifnum\value{minted@tmpcnt}>57\relax
+ \expandafter\let\csname minted@isnum\arabic{minted@tmpcnt}\endcsname\relax
+ \expandafter\let\csname minted@isalphanum\arabic{minted@tmpcnt}\endcsname\relax
+ \expandafter\let
+ \csname minted@isalphanumhyphenunderscore\arabic{minted@tmpcnt}\endcsname\relax
+ \stepcounter{minted@tmpcnt}
+\repeat
+% [A-Z]
+\setcounter{minted@tmpcnt}{65}
+\loop\unless\ifnum\value{minted@tmpcnt}>90\relax
+ \expandafter\let\csname minted@isalpha\arabic{minted@tmpcnt}\endcsname\relax
+ \expandafter\let\csname minted@isalphanum\arabic{minted@tmpcnt}\endcsname\relax
+ \expandafter\let
+ \csname minted@isalphanumhyphenunderscore\arabic{minted@tmpcnt}\endcsname\relax
+ \stepcounter{minted@tmpcnt}
+\repeat
+% [a-z]
+\setcounter{minted@tmpcnt}{97}
+\loop\unless\ifnum\value{minted@tmpcnt}>122\relax
+ \expandafter\let\csname minted@isalpha\arabic{minted@tmpcnt}\endcsname\relax
+ \expandafter\let\csname minted@isalphanum\arabic{minted@tmpcnt}\endcsname\relax
+ \expandafter\let
+ \csname minted@isalphanumhyphenunderscore\arabic{minted@tmpcnt}\endcsname\relax
+ \stepcounter{minted@tmpcnt}
+\repeat
+% [-]
+\expandafter\let\csname minted@isalphanumhyphenunderscore45\endcsname\relax
+% [_]
+\expandafter\let\csname minted@isalphanumhyphenunderscore95\endcsname\relax
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\minted@optlistfv@lang}
+%
+% \begin{macro}{\minted@ifalphanumhyphenunderscore}
+% Conditional based on whether first argument is ASCII alphanumeric, hyphen, or underscore.
% \begin{macrocode}
-\newcommand{\minted@optlistfv@lang}{}
+\def\minted@ifalphanumhyphenunderscore#1#2#3{%
+ \if\relax\detokenize{#1}\relax
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi
+ {#3}%
+ {\expandafter\minted@ifalphanumhyphenunderscore@i\detokenize{#1}\FV@Sentinel{#2}{#3}}}
+\def\minted@ifalphanumhyphenunderscore@i#1#2\FV@Sentinel{%
+ \if\relax#2\relax
+ \expandafter\minted@ifalphanumhyphenunderscore@iii
+ \else
+ \expandafter\minted@ifalphanumhyphenunderscore@ii
+ \fi
+ #1#2\FV@Sentinel}
+\def\minted@ifalphanumhyphenunderscore@ii#1#2\FV@Sentinel{%
+ \ifcsname minted@isalphanumhyphenunderscore\number`#1\endcsname
+ \expandafter\minted@ifalphanumhyphenunderscore@i
+ \else
+ \expandafter\minted@ifalphanumhyphenunderscore@false
+ \fi
+ #2\FV@Sentinel}
+\def\minted@ifalphanumhyphenunderscore@iii#1\FV@Sentinel{%
+ \ifcsname minted@isalphanumhyphenunderscore\number`#1\endcsname
+ \expandafter\minted@ifalphanumhyphenunderscore@true
+ \else
+ \expandafter\minted@ifalphanumhyphenunderscore@false
+ \fi
+ \FV@Sentinel}
+\def\minted@ifalphanumhyphenunderscore@true\FV@Sentinel#1#2{#1}
+\def\minted@ifalphanumhyphenunderscore@false#1\FV@Sentinel#2#3{#3}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\minted@optlistfv@lang@i}
+%
+%
+% \subsection{State}
+%
+%
+% \begin{macro}{\minted@lexer}
+% Current lexer (language). Should be the empty macro if not set; it is used within |\ifcsname...\endcsname| to check for the existence of lexer-specific settings macros.
% \begin{macrocode}
-\newcommand{\minted@optlistfv@lang@i}{}
+\let\minted@lexer\@empty
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\minted@optlistfv@cmd}
+%
+% \begin{macro}{minted@isinline}
+% Whether in command or environment.
% \begin{macrocode}
-\newcommand{\minted@optlistfv@cmd}{}
+\newbool{minted@isinline}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\minted@configlang}
%
-% We need a way to check whether a language has had all its option list macros created. This generally occurs in a context where |\minted@lang| needs to be set. So we create a macro that does both at once. If the language list macros do not exist, we create them globally to simplify future operations.
+% \begin{macro}{minted@tmpcodebufferlength}
+% Length of buffer in which code to be highlighted is stored.
% \begin{macrocode}
-\newcommand{\minted@configlang}[1]{%
- \def\minted@lang{#1}%
- \ifcsname minted@optlistcl@lang\minted@lang\endcsname\else
- \expandafter\gdef\csname minted@optlistcl@lang\minted@lang\endcsname{}%
- \fi
- \ifcsname minted@optlistcl@lang\minted@lang @i\endcsname\else
- \expandafter\gdef\csname minted@optlistcl@lang\minted@lang @i\endcsname{}%
- \fi
- \ifcsname minted@optlistfv@lang\minted@lang\endcsname\else
- \expandafter\gdef\csname minted@optlistfv@lang\minted@lang\endcsname{}%
- \fi
- \ifcsname minted@optlistfv@lang\minted@lang @i\endcsname\else
- \expandafter\gdef\csname minted@optlistfv@lang\minted@lang @i\endcsname{}%
- \fi
-}
+\newcounter{minted@tmpcodebufferlength}
% \end{macrocode}
% \end{macro}
%
-% We need a way to define options in bulk at the global, language, and command levels. How this is done will depend on the type of option. The keys created are grouped by level: |minted@opt@g|, |minted@opt@lang|, and |minted@opt@cmd|, plus inline variants. The language-level key groupings use |\minted@lang| internally, so we don't need to duplicate the internals for different languages. The key groupings are independent of whether a given option relates to Pygments, \texpkg{fancyvrb}, etc. Organization by level is the only thing that is important here, since keys are applied in a hierarchical fashion. Key values are stored in macros of the form |\minted@opt@|\meta{level}|:|\meta{key}, so that they may be retrieved later. In practice, these key macros will generally not be used directly (hence the colon in the name). Rather, the hierarchy of macros will be traversed until an existing macro is found.
%
-% \begin{macro}{\minted@def@optcl}
%
-% Define a generic option that will be passed to the command line. Options are given in a |{key}{value}| format that is transformed into |key=value| and then passed to |pygmentize|. This allows |value| to be easily stored in a separate macro for later access. This is useful, for example, in separately accessing the value of |encoding| for performing |autogobble|.
+% \subsection{Calling \mintedpkg\ executable}
%
-% If a |key| option is specified without |=value|, the default is assumed. Options are automatically created at all levels.
%
-% Options are added to the option lists in such a way that they will be detokenized. This is necessary since they will ultimately be used in |\write18|.
+% \begin{macro}{minted@canexec}
% \begin{macrocode}
-\ifwindows
- \newcommand{\minted@optlistcl@quote}[2]{%
- \detokenize{#1="#2"}}
-\else
- \newcommand{\minted@optlistcl@quote}[2]{%
- \detokenize{#1='#2'}}
+\newbool{minted@canexec}
+\booltrue{minted@canexec}
+\ifnum\csname c_sys_shell_escape_int\endcsname=0\relax
+ \boolfalse{minted@canexec}
\fi
-\newcommand{\minted@addto@optlistcl}[3]{%
- \expandafter\def\expandafter#1\expandafter{#1%
- \minted@optlistcl@quote{#2}{#3}\space}}
-\newcommand{\minted@addto@optlistcl@lang}[3]{%
- \expandafter\let\expandafter\minted@tmp\csname #1\endcsname
- \expandafter\def\expandafter\minted@tmp\expandafter{\minted@tmp%
- \minted@optlistcl@quote{#2}{#3}\space}%
- \expandafter\let\csname #1\endcsname\minted@tmp}
-\newcommand{\minted@def@optcl}[4][]{%
- \ifthenelse{\equal{#1}{}}%
- {\define@key{minted@opt@g}{#2}{%
- \minted@addto@optlistcl{\minted@optlistcl@g}{#3}{#4}%
- \@namedef{minted@opt@g:#2}{#4}}%
- \define@key{minted@opt@g@i}{#2}{%
- \minted@addto@optlistcl{\minted@optlistcl@g@i}{#3}{#4}%
- \@namedef{minted@opt@g@i:#2}{#4}}%
- \define@key{minted@opt@lang}{#2}{%
- \minted@addto@optlistcl@lang{minted@optlistcl@lang\minted@lang}{#3}{#4}%
- \@namedef{minted@opt@lang\minted@lang:#2}{#4}}%
- \define@key{minted@opt@lang@i}{#2}{%
- \minted@addto@optlistcl@lang{%
- minted@optlistcl@lang\minted@lang @i}{#3}{#4}%
- \@namedef{minted@opt@lang\minted@lang @i:#2}{#4}}%
- \define@key{minted@opt@cmd}{#2}{%
- \minted@addto@optlistcl{\minted@optlistcl@cmd}{#3}{#4}%
- \@namedef{minted@opt@cmd:#2}{#4}}}%
- {\define@key{minted@opt@g}{#2}[#1]{%
- \minted@addto@optlistcl{\minted@optlistcl@g}{#3}{#4}%
- \@namedef{minted@opt@g:#2}{#4}}%
- \define@key{minted@opt@g@i}{#2}[#1]{%
- \minted@addto@optlistcl{\minted@optlistcl@g@i}{#3}{#4}%
- \@namedef{minted@opt@g@i:#2}{#4}}%
- \define@key{minted@opt@lang}{#2}[#1]{%
- \minted@addto@optlistcl@lang{minted@optlistcl@lang\minted@lang}{#3}{#4}%
- \@namedef{minted@opt@lang\minted@lang:#2}{#4}}%
- \define@key{minted@opt@lang@i}{#2}[#1]{%
- \minted@addto@optlistcl@lang{%
- minted@optlistcl@lang\minted@lang @i}{#3}{#4}%
- \@namedef{minted@opt@lang\minted@lang @i:#2}{#4}}%
- \define@key{minted@opt@cmd}{#2}[#1]{%
- \minted@addto@optlistcl{\minted@optlistcl@cmd}{#3}{#4}%
- \@namedef{minted@opt@cmd:#2}{#4}}}%
-}
+\ifbool{minted@frozencache}{\boolfalse{minted@canexec}}{}
+\ifbool{minted@placeholder}{\boolfalse{minted@canexec}}{}
+\ifbool{minted@verbatim}{\boolfalse{minted@canexec}}{}
% \end{macrocode}
% \end{macro}
%
-% This covers the typical options that must be passed to Pygments. But some, particularly |escapeinside|, need more work. Since their arguments may contain escaped characters, expansion rather than detokenization is needed. Getting expansion to work as desired in a |\write18| context requires the redefinition of some characters.
%
-% \begin{macro}{\minted@escape}
-% Process (possibly backslash-escaped) characters into a form that will work correctly under expansion for use in |\write18|. This assumes that only punctuation characters are escaped. (Otherwise, trailing spaces from |\detokenize| would need to be stripped.) This is currently only used for |escapeinside|.
+% \begin{macro}{\minted@ShellEscapeMaybeMessages,\minted@ShellEscapeNoMessages}
% \begin{macrocode}
-\begingroup
-\catcode`\!=0
-!catcode`!\=12
-!gdef!minted@escape#1{%
- !expandafter!minted@escape@i!detokenize{#1}\!FV@Sentinel}
-!gdef!minted@escape@i#1\#2!FV@Sentinel{%
- !if!relax!detokenize{#2}!relax
- !expandafter!@firstoftwo
- !else
- !expandafter!@secondoftwo
- !fi
- {#1!minted@escape@end\#2!FV@Sentinel}
- {#1!minted@escape@esc\#2!FV@Sentinel}}
-!gdef!minted@escape@end#1!FV@Sentinel{}
-!gdef!minted@escape@esc\#1#2!FV@Sentinel{%
- #1!minted@escape@i#2!FV@Sentinel}
-!endgroup
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\minted@def@optcl@e}
-% Now to define options that involve backslash escapes.
-% \begin{macrocode}
-\newcommand{\minted@addto@optlistcl@e}[3]{%
- \edef\minted@tmp{\minted@escape{#3}}%
- \expandafter\minted@addto@optlistcl@e@i\expandafter{\minted@tmp}{#1}{#2}}
-\def\minted@addto@optlistcl@e@i#1#2#3{%
- \expandafter\def\expandafter#2\expandafter{#2\minted@optlistcl@quote{#3}{#1}\space}}
-\newcommand{\minted@addto@optlistcl@lang@e}[3]{%
- \edef\minted@tmp{\minted@escape{#3}}%
- \expandafter\minted@addto@optlistcl@lang@e@i\expandafter{\minted@tmp}{#1}{#2}}
-\def\minted@addto@optlistcl@lang@e@i#1#2#3{%
- \expandafter\let\expandafter\minted@tmp\csname #2\endcsname
- \expandafter\def\expandafter\minted@tmp\expandafter{\minted@tmp\minted@optlistcl@quote{#3}{#1}\space}%
- \expandafter\let\csname #2\endcsname\minted@tmp}
-\newcommand{\minted@def@optcl@e}[4][]{%
- \ifthenelse{\equal{#1}{}}%
- {\define@key{minted@opt@g}{#2}{%
- \minted@addto@optlistcl@e{\minted@optlistcl@g}{#3}{#4}%
- \@namedef{minted@opt@g:#2}{#4}}%
- \define@key{minted@opt@g@i}{#2}{%
- \minted@addto@optlistcl@e{\minted@optlistcl@g@i}{#3}{#4}%
- \@namedef{minted@opt@g@i:#2}{#4}}%
- \define@key{minted@opt@lang}{#2}{%
- \minted@addto@optlistcl@lang@e{minted@optlistcl@lang\minted@lang}{#3}{#4}%
- \@namedef{minted@opt@lang\minted@lang:#2}{#4}}%
- \define@key{minted@opt@lang@i}{#2}{%
- \minted@addto@optlistcl@lang@e{%
- minted@optlistcl@lang\minted@lang @i}{#3}{#4}%
- \@namedef{minted@opt@lang\minted@lang @i:#2}{#4}}%
- \define@key{minted@opt@cmd}{#2}{%
- \minted@addto@optlistcl@e{\minted@optlistcl@cmd}{#3}{#4}%
- \@namedef{minted@opt@cmd:#2}{#4}}}%
- {\define@key{minted@opt@g}{#2}[#1]{%
- \minted@addto@optlistcl@e{\minted@optlistcl@g}{#3}{#4}%
- \@namedef{minted@opt@g:#2}{#4}}%
- \define@key{minted@opt@g@i}{#2}[#1]{%
- \minted@addto@optlistcl@e{\minted@optlistcl@g@i}{#3}{#4}%
- \@namedef{minted@opt@g@i:#2}{#4}}%
- \define@key{minted@opt@lang}{#2}[#1]{%
- \minted@addto@optlistcl@lang@e{minted@optlistcl@lang\minted@lang}{#3}{#4}%
- \@namedef{minted@opt@lang\minted@lang:#2}{#4}}%
- \define@key{minted@opt@lang@i}{#2}[#1]{%
- \minted@addto@optlistcl@lang@e{%
- minted@optlistcl@lang\minted@lang @i}{#3}{#4}%
- \@namedef{minted@opt@lang\minted@lang @i:#2}{#4}}%
- \define@key{minted@opt@cmd}{#2}[#1]{%
- \minted@addto@optlistcl@e{\minted@optlistcl@cmd}{#3}{#4}%
- \@namedef{minted@opt@cmd:#2}{#4}}}%
-}
+\def\minted@ShellEscapeMaybeMessages#1{%
+ \let\minted@exec@warning\relax
+ \let\minted@exec@error\relax
+ \ifbool{minted@canexec}{\ShellEscape{#1}\minted@inputexecmessages}{}}
+\def\minted@ShellEscapeNoMessages#1{%
+ \ifbool{minted@canexec}{\ShellEscape{#1}}{}}
% \end{macrocode}
% \end{macro}
%
%
-% \begin{macro}{\minted@def@optcl@switch}
-%
-% Define a switch or boolean option that is passed to Pygments, which is |true| when no value is specified.
-% \begin{macrocode}
-\newcommand{\minted@def@optcl@switch}[2]{%
- \define@booleankey{minted@opt@g}{#1}%
- {\minted@addto@optlistcl{\minted@optlistcl@g}{#2}{True}%
- \@namedef{minted@opt@g:#1}{true}}
- {\minted@addto@optlistcl{\minted@optlistcl@g}{#2}{False}%
- \@namedef{minted@opt@g:#1}{false}}
- \define@booleankey{minted@opt@g@i}{#1}%
- {\minted@addto@optlistcl{\minted@optlistcl@g@i}{#2}{True}%
- \@namedef{minted@opt@g@i:#1}{true}}
- {\minted@addto@optlistcl{\minted@optlistcl@g@i}{#2}{False}%
- \@namedef{minted@opt@g@i:#1}{false}}
- \define@booleankey{minted@opt@lang}{#1}%
- {\minted@addto@optlistcl@lang{minted@optlistcl@lang\minted@lang}{#2}{True}%
- \@namedef{minted@opt@lang\minted@lang:#1}{true}}
- {\minted@addto@optlistcl@lang{minted@optlistcl@lang\minted@lang}{#2}{False}%
- \@namedef{minted@opt@lang\minted@lang:#1}{false}}
- \define@booleankey{minted@opt@lang@i}{#1}%
- {\minted@addto@optlistcl@lang{minted@optlistcl@lang\minted@lang @i}{#2}{True}%
- \@namedef{minted@opt@lang\minted@lang @i:#1}{true}}
- {\minted@addto@optlistcl@lang{minted@optlistcl@lang\minted@lang @i}{#2}{False}%
- \@namedef{minted@opt@lang\minted@lang @i:#1}{false}}
- \define@booleankey{minted@opt@cmd}{#1}%
- {\minted@addto@optlistcl{\minted@optlistcl@cmd}{#2}{True}%
- \@namedef{minted@opt@cmd:#1}{true}}
- {\minted@addto@optlistcl{\minted@optlistcl@cmd}{#2}{False}%
- \@namedef{minted@opt@cmd:#1}{false}}
-}
+% \begin{macro}{\minted@execarg@debug,\minted@execarg@timestamp}
+% \begin{macrocode}
+\def\minted@execarg@debug{%
+ \ifbool{minted@debug}{\detokenize{ --debug }}{}}
+\def\minted@execarg@timestamp{%
+ \detokenize{ --timestamp }\minted@timestamp\detokenize{ }}
% \end{macrocode}
% \end{macro}
%
-% Now that all the machinery for Pygments options is in place, we can move on to \texpkg{fancyvrb} options.
-%
-% \begin{macro}{\minted@def@optfv}
-%
-% Define \texpkg{fancyvrb} options. The |#1={##1}| is needed because any braces enclosing the argument (|##1|) will be stripped during the initial capture, and they need to be reinserted before \texpkg{fancyvrb} gets the argument and sends it through another \texpkg{keyval} processing step. If there were no braces initially, adding them here doesn't hurt, since they are just stripped off again during processing.
-% \begin{macrocode}
-\newcommand{\minted@def@optfv}[1]{%
- \define@key{minted@opt@g}{#1}{%
- \expandafter\def\expandafter\minted@optlistfv@g\expandafter{%
- \minted@optlistfv@g#1={##1},}%
- \@namedef{minted@opt@g:#1}{##1}}
- \define@key{minted@opt@g@i}{#1}{%
- \expandafter\def\expandafter\minted@optlistfv@g@i\expandafter{%
- \minted@optlistfv@g@i#1={##1},}%
- \@namedef{minted@opt@g@i:#1}{##1}}
- \define@key{minted@opt@lang}{#1}{%
- \expandafter\let\expandafter\minted@tmp%
- \csname minted@optlistfv@lang\minted@lang\endcsname
- \expandafter\def\expandafter\minted@tmp\expandafter{%
- \minted@tmp#1={##1},}%
- \expandafter\let\csname minted@optlistfv@lang\minted@lang\endcsname%
- \minted@tmp
- \@namedef{minted@opt@lang\minted@lang:#1}{##1}}
- \define@key{minted@opt@lang@i}{#1}{%
- \expandafter\let\expandafter\minted@tmp%
- \csname minted@optlistfv@lang\minted@lang @i\endcsname
- \expandafter\def\expandafter\minted@tmp\expandafter{%
- \minted@tmp#1={##1},}%
- \expandafter\let\csname minted@optlistfv@lang\minted@lang @i\endcsname%
- \minted@tmp
- \@namedef{minted@opt@lang\minted@lang @i:#1}{##1}}
- \define@key{minted@opt@cmd}{#1}{%
- \expandafter\def\expandafter\minted@optlistfv@cmd\expandafter{%
- \minted@optlistfv@cmd#1={##1},}%
- \@namedef{minted@opt@cmd:#1}{##1}}
-}
+%
+% \begin{macro}{\minted@exec@cleanfile}
+% Clean (delete) a temp file in all locations where it might be expected to exist. Only files under the working directory, |TEXMFOUTPUT|, or |TEXMF_OUTPUT_DIRECTORY| can be cleaned, and only if their names match the regex
+%\begin{verbatim}
+%[0-9a-zA-Z_-]+\.(?:config|data|errlog|highlight|message|style)\.minted
+%\end{verbatim}
+% The identifier immediately before the |.minted| file extension describes the role of the file. Files ending with |.errlog.minted| are not automatically cleaned up at the end of a compile, but are deleted at the beginning as part of config detection.
+% \begin{macrocode}
+\def\minted@exec@cleanfile#1{%
+ \minted@ShellEscapeNoMessages{%
+ \MintedExecutable\detokenize{ cleanfile }\minted@execarg@debug#1}}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\minted@def@optfv@switch}
-%
-% Define \texpkg{fancyvrb} boolean options.
-% \begin{macrocode}
-\newcommand{\minted@def@optfv@switch}[1]{%
- \define@booleankey{minted@opt@g}{#1}%
- {\expandafter\def\expandafter\minted@optlistfv@g\expandafter{%
- \minted@optlistfv@g#1=true,}%
- \@namedef{minted@opt@g:#1}{true}}%
- {\expandafter\def\expandafter\minted@optlistfv@g\expandafter{%
- \minted@optlistfv@g#1=false,}%
- \@namedef{minted@opt@g:#1}{false}}%
- \define@booleankey{minted@opt@g@i}{#1}%
- {\expandafter\def\expandafter\minted@optlistfv@g@i\expandafter{%
- \minted@optlistfv@g@i#1=true,}%
- \@namedef{minted@opt@g@i:#1}{true}}%
- {\expandafter\def\expandafter\minted@optlistfv@g@i\expandafter{%
- \minted@optlistfv@g@i#1=false,}%
- \@namedef{minted@opt@g@i:#1}{false}}%
- \define@booleankey{minted@opt@lang}{#1}%
- {\expandafter\let\expandafter\minted@tmp%
- \csname minted@optlistfv@lang\minted@lang\endcsname
- \expandafter\def\expandafter\minted@tmp\expandafter{%
- \minted@tmp#1=true,}%
- \expandafter\let\csname minted@optlistfv@lang\minted@lang\endcsname%
- \minted@tmp
- \@namedef{minted@opt@lang\minted@lang:#1}{true}}%
- {\expandafter\let\expandafter\minted@tmp%
- \csname minted@optlistfv@lang\minted@lang\endcsname
- \expandafter\def\expandafter\minted@tmp\expandafter{%
- \minted@tmp#1=false,}%
- \expandafter\let\csname minted@optlistfv@lang\minted@lang\endcsname%
- \minted@tmp
- \@namedef{minted@opt@lang\minted@lang:#1}{false}}%
- \define@booleankey{minted@opt@lang@i}{#1}%
- {\expandafter\let\expandafter\minted@tmp%
- \csname minted@optlistfv@lang\minted@lang @i\endcsname
- \expandafter\def\expandafter\minted@tmp\expandafter{%
- \minted@tmp#1=true,}%
- \expandafter\let\csname minted@optlistfv@lang\minted@lang @i\endcsname%
- \minted@tmp
- \@namedef{minted@opt@lang\minted@lang @i:#1}{true}}%
- {\expandafter\let\expandafter\minted@tmp%
- \csname minted@optlistfv@lang\minted@lang @i\endcsname
- \expandafter\def\expandafter\minted@tmp\expandafter{%
- \minted@tmp#1=false,}%
- \expandafter\let\csname minted@optlistfv@lang\minted@lang @i\endcsname%
- \minted@tmp
- \@namedef{minted@opt@lang\minted@lang @i:#1}{false}}%
- \define@booleankey{minted@opt@cmd}{#1}%
- {\expandafter\def\expandafter\minted@optlistfv@cmd\expandafter{%
- \minted@optlistfv@cmd#1=true,}%
- \@namedef{minted@opt@cmd:#1}{true}}%
- {\expandafter\def\expandafter\minted@optlistfv@cmd\expandafter{%
- \minted@optlistfv@cmd#1=false,}%
- \@namedef{minted@opt@cmd:#1}{false}}%
-}
+%
+% \begin{macro}{\minted@inputexecmessages}
+% If temp file containing warning and/or error messages exists, |\input| and then delete.
+% \begin{macrocode}
+\def\minted@inputexecmessages{%
+ \minted@ensureatletter{\InputIfFileExists{\MintedMessageFilename}{}{}}}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{minted@isinline}
-% In resolving value precedence when actually using values, we need a way to determine whether we are in an inline context. This is accomplished via a boolean that is set at the beginning of inline commands.
+%
+% \begin{macro}{\minted@exec@batch}
+% Run in batch mode, for |highlightmode=fast| or |highlightmode=fastfirst|.
% \begin{macrocode}
-\newboolean{minted@isinline}
+\def\minted@exec@batch{%
+ \minted@ShellEscapeMaybeMessages{%
+ \MintedExecutable
+ \detokenize{ batch }\minted@execarg@timestamp\minted@execarg@debug
+ \MintedJobnameMdfive}}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\minted@fvset}
-% We will need a way to actually use the lists of stored \texpkg{fancyvrb} options later on.
+%
+% \begin{macro}{\minted@exec@config}
+% Detect configuration.
% \begin{macrocode}
-\newcommand{\minted@fvset}{%
- \expandafter\fvset\expandafter{\minted@optlistfv@g}%
- \expandafter\let\expandafter\minted@tmp%
- \csname minted@optlistfv@lang\minted@lang\endcsname
- \expandafter\fvset\expandafter{\minted@tmp}%
- \ifthenelse{\boolean{minted@isinline}}%
- {\expandafter\fvset\expandafter{\minted@optlistfv@g@i}%
- \expandafter\let\expandafter\minted@tmp%
- \csname minted@optlistfv@lang\minted@lang @i\endcsname
- \expandafter\fvset\expandafter{\minted@tmp}}%
- {}%
- \expandafter\fvset\expandafter{\minted@optlistfv@cmd}%
-}
+\def\minted@exec@config{%
+ \minted@ShellEscapeMaybeMessages{%
+ \MintedExecutable
+ \detokenize{ config }\minted@execarg@timestamp\minted@execarg@debug
+ \MintedJobnameMdfive}}
% \end{macrocode}
% \end{macro}
%
%
-% We need a way to define \texpkg{minted}-specific options at multiple levels of hierarchy, as well as a way to retrieve these options. As with previous types of options, values are stored in macros of the form |\minted@opt@|\meta{level}|:|\meta{key}, since they are not meant to be accessed directly.
-%
-% The order of precedence is |cmd|, |lang@i|, |g@i|, |lang|, |g|. A value specified at the command or environment level should override other settings. In its absence, a value specified for an inline command should override other settings, if we are indeed in an inline context. Otherwise, language settings take precedence over global settings.
-%
-% Before actually creating the option-definition macro, we need a few helper macros.
-%
+% \begin{macro}{\minted@exec@styledef}
+% Create style definition.
+% \begin{macrocode}
+\def\minted@exec@styledef{%
+ \minted@ShellEscapeMaybeMessages{%
+ \MintedExecutable
+ \detokenize{ styledef }\minted@execarg@timestamp\minted@execarg@debug
+ \MintedJobnameMdfive}}
+% \end{macrocode}
+% \end{macro}
%
-% \begin{macro}{\minted@def@opt}
-% Finally, on to the actual option definitions for \texpkg{minted}-specific options.
%
-% Usage: |\minted@def@opt[|\meta{initial global value}|]{|\meta{key name}|}|
+% \begin{macro}{\minted@exec@highlight}
+% Highlight code.
% \begin{macrocode}
-\newcommand{\minted@def@opt}[2][]{%
- \define@key{minted@opt@g}{#2}{%
- \@namedef{minted@opt@g:#2}{##1}}
- \define@key{minted@opt@g@i}{#2}{%
- \@namedef{minted@opt@g@i:#2}{##1}}
- \define@key{minted@opt@lang}{#2}{%
- \@namedef{minted@opt@lang\minted@lang:#2}{##1}}
- \define@key{minted@opt@lang@i}{#2}{%
- \@namedef{minted@opt@lang\minted@lang @i:#2}{##1}}
- \define@key{minted@opt@cmd}{#2}{%
- \@namedef{minted@opt@cmd:#2}{##1}}
- \ifstrempty{#1}{}{\@namedef{minted@opt@g:#2}{#1}}%
-}
+\def\minted@exec@highlight{%
+ \minted@ShellEscapeMaybeMessages{%
+ \MintedExecutable
+ \detokenize{ highlight }\minted@execarg@timestamp\minted@execarg@debug
+ \MintedJobnameMdfive}}
% \end{macrocode}
% \end{macro}
%
%
-% \begin{macro}{\minted@def@opt@detok}
-% Same as |\minted@def@opt|, except wraps argument in |\detokenize|.
+% \begin{macro}{\minted@exec@clean}
+% Clean output directory and cache.
% \begin{macrocode}
-\newcommand{\minted@def@opt@detok}[2][]{%
- \define@key{minted@opt@g}{#2}{%
- \@namedef{minted@opt@g:#2}{\detokenize{##1}}}
- \define@key{minted@opt@g@i}{#2}{%
- \@namedef{minted@opt@g@i:#2}{\detokenize{##1}}}
- \define@key{minted@opt@lang}{#2}{%
- \@namedef{minted@opt@lang\minted@lang:#2}{\detokenize{##1}}}
- \define@key{minted@opt@lang@i}{#2}{%
- \@namedef{minted@opt@lang\minted@lang @i:#2}{\detokenize{##1}}}
- \define@key{minted@opt@cmd}{#2}{%
- \@namedef{minted@opt@cmd:#2}{\detokenize{##1}}}
- \ifstrempty{#1}{}{\@namedef{minted@opt@g:#2}{\detokenize{#1}}}%
-}
+\def\minted@exec@clean{%
+ \minted@ShellEscapeNoMessages{%
+ \MintedExecutable
+ \detokenize{ clean }\minted@execarg@timestamp\minted@execarg@debug
+ \MintedJobnameMdfive}}
% \end{macrocode}
% \end{macro}
%
%
-% \begin{macro}{\minted@generate@PYGdef}
-% Generate Pygments style definition with |pygmentize| if a cached version does not exist. Load the style definition into a global macro of the form
-%\begin{Verbatim}
-%\csname minted@PYGdef@<style>\endcsname
-%\end{Verbatim}
-% to allow styles to be defined later. Styles are not defined globally to avoid naming issues with style names that involve punctuation characters and numbers. Rather, styles are redefined upon every use (within groups), and all styles use macros with a |\PYG| prefix.
%
-% Takes a single argument that is the detokenized style name. Getting the detokenized style name here requires expansion (|\edef|) in an earlier macro (currently |\minted@defstyle|) to convert |\minted@get@opt{style}{default}| into detokenized text. The |style| value is always wrapped in |\detokenize| when it is set, so expansion automatically detokenizes. Detokenization can be important depending on active characters. Expansion is important because the style name may be used with caching, so we need the current value retrieved by |\minted@get@opt|, not the value at the end of the document when cache data is written to the |.aux| file.
+% \subsection{Config detection}
%
-% Certain catcodes are required when loading Pygments style definitions from file.
-% \begin{itemize}
-% \item At sign |@| would be handled by the |\makeatletter| within the Pygments style definition if the style was brought in via |\input|, but |\makeatletter| doesn't affect tokenization with the |catchfile| approach.
-% \item Percent |%| may not have its normal meaning within a |.dtx| file.
-% \item Backtick |`| is made active by some \texpkg{babel} package options, such as |magyar|.
-% \end{itemize}
-% |\endlinechar| also requires special handling to avoid introducing unwanted spaces.
%
-% The |\ifx\PYG\relax| tests detect outdated style definitions from \texpkg{minted} <2.6 and replace them when possible, and also detect missing styles. Before \texpkg{minted} 2.6, style macros used a |\PYG<style>| prefix and were defined globally. Starting with 2.6, styles are redefined upon every use (within groups), and all styles use macros with a |\PYG| prefix. This allows more robust treatment of style names that involve punctuation characters and numbers.
+% \begin{macro}{minted@diddetectconfig}
% \begin{macrocode}
-\newcommand{\minted@generate@PYGdef}[1]{%
- \ifthenelse{\boolean{minted@cache}}%
- {\def\minted@pygstylepath@load{\minted@outputdir\minted@cachedir/#1.pygstyle}%
- \minted@addcachefile{#1.pygstyle}}%
- {\def\minted@pygstylepath@load{\minted@outputdir\minted@jobname.out.pyg}}%
- \ifwindows
- \StrSubstitute{\minted@pygstylepath@load}%
- {/}{\@backslashchar}[\minted@pygstylepath@save]%
- \else
- \let\minted@pygstylepath@save\minted@pygstylepath@load
- \fi
- \IfFileExists{\minted@pygstylepath@load}%
+\newbool{minted@diddetectconfig}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\minted@detectconfig}
+% When the |minted@canexec| bool is defined, it is set false if shell escape is completely disabled (|\c_sys_shell_escape_int=0|) or if execution is disabled by package options, so those cases don't need to be handled here.
+%
+% If the Python executable is available, then it will create a |.config.minted| file to notify the \LaTeX\ side that it is present. This |.config.minted| file always contains a timestamp |\minted@executable@timestamp|, which is the timestamp passed directly to the executable as a command-line option. If the executable finds a |.data.minted| file, then it will extract the timestamp from this file and save it in the |.config.minted| file as |\minted@config@timestamp|; otherwise, the |.config.minted| file will not contain this timestamp. When \LaTeX\ loads the |.config.minted| file, the presence and values of these timestamps is used to determine whether the executable is present and whether the correct |.data.minted| file was located by the executable.
+% \begin{macrocode}
+\def\minted@detectconfig{%
+ \ifbool{minted@diddetectconfig}%
{}%
- {\ifthenelse{\boolean{minted@frozencache}}%
- {\PackageError{minted}%
- {Missing style definition for #1 with frozencache}%
- {Missing style definition for #1 with frozencache}}%
- {}%
- \ShellEscape{%
- \MintedPygmentize\space -S #1 -f latex -P commandprefix=PYG
- > \minted@pygstylepath@save
- }%
- }%
- \CatchFileDef{\minted@tmp@filecontents}%
- {\minted@pygstylepath@load}{\catcode`@=11\catcode`\%=14\catcode``=12\endlinechar=-1}%
- \begingroup
- \let\PYG\relax
- \minted@tmp@filecontents
- \ifx\PYG\relax
- \ifthenelse{\boolean{minted@frozencache}}%
- {\PackageError{minted}%
- {Outdated style definition for #1 with frozencache}%
- {Outdated style definition for #1 with frozencache}}%
- {}%
- \ShellEscape{%
- \MintedPygmentize\space -S #1 -f latex -P commandprefix=PYG
- > \minted@pygstylepath@save
- }%
- \CatchFileDef{\minted@tmp@filecontents}%
- {\minted@pygstylepath@load}{\catcode`@=11\catcode`\%=14\catcode``=12\endlinechar=-1}%
- \minted@tmp@filecontents
- \ifx\PYG\relax
- \PackageError{minted}%
- {Cannot find Pygments style #1}%
- {Cannot find Pygments style #1}%
+ {\ifx\minted@cachedir\@empty
+ \gdef\minted@cachepath{}%
+ \else
+ \gdef\minted@cachepath{\minted@cachedir/}%
\fi
+ \ifbool{minted@canexec}{\begingroup\minted@detectconfig@i\endgroup}{}%
+ \global\booltrue{minted@diddetectconfig}}}
+\def\minted@detectconfig@i{%
+ \global\let\minted@executable@version\relax
+ \global\let\minted@executable@timestamp\relax
+ \global\let\minted@config@timestamp\relax
+ \pydatasetfilename{\MintedDataFilename}%
+ \pydatawritedictopen
+ \pydatawritekeyvalue{command}{config}%
+ \pydatawritekeyedefvalue{jobname}{\jobname}%
+ \pydatawritekeyedefvalue{timestamp}{\minted@timestamp}%
+ \pydatawritekeyedefvalue{cachedir}{\minted@cachedir}%
+ \pydatawritedictclose
+ \pydataclosefilename{\MintedDataFilename}%
+ \minted@exec@config
+ \minted@ensureatletter{%
+ \InputIfFileExists{\MintedConfigFilename}{}{}}%
+ \ifx\minted@executable@version\relax
+ \expandafter\minted@detectconfig@noexecutable
+ \else
+ \expandafter\minted@detectconfig@ii
+ \fi}
+\def\minted@detectconfig@noexecutable{%
+ \global\boolfalse{minted@canexec}%
+ \ifnum\csname c_sys_shell_escape_int\endcsname=1\relax
+ \minted@error{minted v3+ executable is not installed or is not added to PATH}%
+ \else
+ \minted@error{minted v3+ executable is not installed, is not added to PATH,
+ or is not permitted with restricted shell escape}%
+ \fi}
+\def\minted@detectconfig@ii{%
+ \ifx\minted@timestamp\minted@config@timestamp
+ \expandafter\minted@detectconfig@iii
+ \else
+ \expandafter\minted@detectconfig@wrongtimestamp
+ \fi}
+\def\minted@detectconfig@wrongtimestamp{%
+ \ifx\minted@timestamp\minted@executable@timestamp
+ \minted@exec@cleanfile{\MintedConfigFilename}%
+ \global\boolfalse{minted@canexec}%
+ \minted@error{minted v3 Python executable could not find output directory;
+ upgrade to TeX distribution that supports \detokenize{TEXMF_OUTPUT_DIRECTORY}
+ or set environment variable \detokenize{TEXMF_OUTPUT_DIRECTORY} manually)}%
+ \else
+ \expandafter\minted@detectconfig@noexecutable
+ \fi}
+\def\minted@detectconfig@iii{%
+ \minted@exec@cleanfile{\MintedConfigFilename}%
+ \ifx\minted@exec@warning\relax
+ \else
+ \expandafter\minted@exec@warning
\fi
- \expandafter\global\expandafter\let\csname minted@PYGdef@#1\endcsname%
- \minted@tmp@filecontents
- \endgroup
-}
+ \ifx\minted@exec@error\relax
+ \expandafter\minted@detectconfig@iv
+ \else
+ \expandafter\minted@detectconfig@error
+ \fi}
+\def\minted@detectconfig@error{%
+ \global\boolfalse{minted@canexec}%
+ \minted@exec@error}
+\def\minted@detectconfig@iv{%
+ \expandafter\minted@detectconfig@v\minted@executable@version\relax}
+\begingroup
+\catcode`\.=12
+\gdef\minted@detectconfig@v#1.#2.#3\relax{%
+ \def\minted@executable@major{#1}%
+ \def\minted@executable@minor{#2}%
+ \def\minted@executable@patch{#3}%
+ \minted@detectconfig@vi}
+\endgroup
+\def\minted@detectconfig@vi{%
+ \ifnum\minted@executable@major>\minted@executable@minmajor\relax
+ \global\booltrue{minted@executable@issupported}%
+ \else\ifnum\minted@executable@major=\minted@executable@minmajor\relax
+ \ifnum\minted@executable@minor>\minted@executable@minminor\relax
+ \global\booltrue{minted@executable@issupported}%
+ \else\ifnum\minted@executable@minor=\minted@executable@minminor\relax
+ \ifnum\minted@executable@patch<\minted@executable@minpatch\relax
+ \else
+ \global\booltrue{minted@executable@issupported}%
+ \fi
+ \fi\fi
+ \fi\fi
+ \ifbool{minted@executable@issupported}%
+ {\ifx\minted@config@cachepath\relax
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi
+ {\global\boolfalse{minted@canexec}%
+ \minted@error{minted Python executable returned incomplete configuration data;
+ this may indicate a bug in minted or file corruption}}%
+ {\global\let\minted@cachepath\minted@config@cachepath
+ \minted@highlightmode@init}}%
+ {\global\boolfalse{minted@canexec}%
+ \minted@error{minted Python executable is version \minted@executable@version,
+ but version \minted@executable@minversion+ is required}}}
% \end{macrocode}
% \end{macro}
%
%
-% \begin{macro}{\minted@defstyle}
-% Define Pygments style macros. These are defined locally rather than globally, and redefined upon every use. Patch single quote macro if needed.
+%
+% \subsection{Options}
+%
+%
+% \subsubsection{Option processing}
+%
+% \begin{macro}{\minted@optcats,\minted@optkeyslist@<optcat>}
+% Option categories, along with lists of keys for each.
+% \begin{itemize}
+% \item |fv|: Passed on to \texpkg{fancyvrb}. Options are stored in scope-specific lists, rather than in individual per-option macros.
+% \item |py|: Passed to Python. Options are stored in scope-specific, individual per-option macros. Some of these are passed to \texpkg{fancyvrb} when the Python executable isn't available or is disabled.
+% \item |tex|: Processed in \LaTeX. Options are stored in scope-specific, individual per-option macros.
+% \end{itemize}
% \begin{macrocode}
-\newcommand{\minted@defstyle}[1]{%
- \edef\minted@style{#1}%
- \ifcsname minted@PYGdef@\minted@style\endcsname\else
- \expandafter\minted@generate@PYGdef\expandafter{\minted@style}%
- \fi
- \csname minted@PYGdef@\minted@style\endcsname
- \minted@patch@PYGZsq
- \minted@patch@PYGZhy
- \ifthenelse{\equal{\minted@get@opt{ignorelexererrors}{true}}{true}}%
- {\let\PYG@tok@err\relax}{}}
-\ifthenelse{\boolean{minted@draft}}{\renewcommand{\minted@defstyle}[1]{}}{}
+\begingroup
+\catcode`\,=12
+\gdef\minted@optcats{fv,py,tex}
+\endgroup
+\def\minted@do#1{\expandafter\def\csname minted@optkeyslist@#1\endcsname{}}
+\minted@forcsvlist{\minted@do}{\minted@optcats}
% \end{macrocode}
% \end{macro}
%
%
-% \begin{macro}{\minted@patch@PYGZsq}
-% The single quote macro from \texpkg{Pygments} 1.6+ needs to be patched if the \texpkg{upquote} package is in use. Patching is done when the default style is created. Patching is only attempted if the macro exists, so that there is a graceful fallback in the event of a custom \texpkg{Pygments} stylesheet.
+% \begin{macro}{\minted@optscopes,\minted@optscopes@onlyblock}
+% Scopes for options. |cmd| scope is the scope of a single command or environment.
% \begin{macrocode}
-\newcommand{\minted@patch@PYGZsq}{%
- \ifcsname PYGZsq\endcsname
- \expandafter\ifdefstring\expandafter{\csname PYGZsq\endcsname}{\char`\'}%
- {\minted@patch@PYGZsq@i}%
- {}%
- \fi
-}
\begingroup
-\catcode`\'=\active
-\gdef\minted@patch@PYGZsq@i{\gdef\PYGZsq{'}}
+\catcode`\,=12
+\gdef\minted@optscopes{global,lexer,globalinline,lexerinline,cmd}
+\gdef\minted@optscopes@onlyblock{global,lexer,cmd}
\endgroup
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\minted@patch@PYGZhy}
-% Redefine the hyphen under LuaTeX to prevent unintended line breaks.
+% \begin{macro}{\minted@iflexerscope}
% \begin{macrocode}
-\newcommand{\minted@patch@PYGZhy}{%
- \ifcsname PYGZhy\endcsname
- \expandafter\ifdefstring\expandafter{\csname PYGZhy\endcsname}{\char`\-}%
- {\def\PYGZhy{\mbox{-}}}%
- {}%
+\let\minted@iflexerscope@lexer\relax
+\let\minted@iflexerscope@lexerinline\relax
+\def\minted@iflexerscope#1#2#3{%
+ \ifcsname minted@iflexerscope@#1\endcsname
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
\fi
-}
+ {#2}{#3}}
% \end{macrocode}
% \end{macro}
%
%
+% \begin{macro}{\mintedpgfkeyscreate}
+% Core macro for defining options.
%
-% \begin{macro}{\minted@def@opt@switch}
-% And we need a switch version.
-%
-% It would be possible to create a special version of |\minted@get@opt| to work with these, but that would be redundant. During the key processing, any values other than |true| and |false| are filtered out. So when using |\minted@get@opt| later, we know that that part has already been taken care of, and we can just use something like |\ifthenelse{\equal{\minted@get@opt{<opt>}{<default>}}{true}}{...}{...}|. Of course, there is the possibility that a default value has not been set, but |\minted@def@opt@switch| sets a global default of |false| to avoid this. And as usual, Pygments values shouldn't be used without considering whether |\minted@get@opt| needs a fallback value.
+% Syntax: |\mintedpgfkeyscreate|\oarg{processor}\marg{option category}\marg{key(=value)? list}.
+% \begin{itemize}
+% \item Optional \meta{processor} is a macro that processes \meta{value}. It can take two forms.
+% \begin{enumerate}
+% \item It can take a single argument. In this case, it is used to wrap \meta{value}: |\processor|\marg{value}. It is not invoked until \meta{value} wrapped in \meta{processor} is actually used.
+% \item It can take two arguments. The first is the \meta{csname} that the processed \meta{value} should be stored in, and the second is \meta{value}. In this case, \meta{processor} is invoked immediately and stores the processed \meta{value} in \meta{csname}. See |\minted@opthandler@deforrestrictedescape| for an example of implementing this sort of \meta{processor}.
+% \end{enumerate}
+% \meta{processor} is only supported for |py| and |tex| options.
+% \item \meta{option category} is |fv| (for \texpkg{fancyvrb}), |py| (Python side of \mintedpkg), or |tex| (\LaTeX\ side of \mintedpkg).
+% \item If only \meta{key} is given, then \meta{value} defaults to |\pgfkeysnovalue|. In that case, options are defined so that they can be used in the future, but they are ignored until an explicit \meta{value} is provided later. |fv| options are typically defined only with \meta{key}. |py| and |tex| options are currently required to have an initial \meta{value}. If a \meta{key} is given an initial \meta{value} when it is defined, then that \meta{value} is stored for the \meta{key} in the |global| scope. When an initial value is needed for a different scope such as |lexer| or |inline|, |\pgfkeys| is used directly (|\setminted| and |\setmintedinline| don't yet exist).
+% \item |py| only: A default value for \meta{key} (value used when only \meta{key} is given without a value) can be specified with the syntax |key<default>=value|. Default values for |fv| options are already defined in \texpkg{fancyvrb}, and currently the few |tex| options are the sort that always need an explicit value for clarity.
+% \end{itemize}
% \begin{macrocode}
-\newcommand{\minted@def@opt@switch}[2][false]{%
- \define@booleankey{minted@opt@g}{#2}%
- {\@namedef{minted@opt@g:#2}{true}}%
- {\@namedef{minted@opt@g:#2}{false}}
- \define@booleankey{minted@opt@g@i}{#2}%
- {\@namedef{minted@opt@g@i:#2}{true}}%
- {\@namedef{minted@opt@g@i:#2}{false}}
- \define@booleankey{minted@opt@lang}{#2}%
- {\@namedef{minted@opt@lang\minted@lang:#2}{true}}%
- {\@namedef{minted@opt@lang\minted@lang:#2}{false}}
- \define@booleankey{minted@opt@lang@i}{#2}%
- {\@namedef{minted@opt@lang\minted@lang @i:#2}{true}}%
- {\@namedef{minted@opt@lang\minted@lang @i:#2}{false}}
- \define@booleankey{minted@opt@cmd}{#2}%
- {\@namedef{minted@opt@cmd:#2}{true}}%
- {\@namedef{minted@opt@cmd:#2}{false}}%
- \@namedef{minted@opt@g:#2}{#1}%
-}
+\def\minted@addoptkey#1#2{%
+ \ifcsname minted@optkeyslist@#1\endcsname
+ \else
+ \minted@fatalerror{Defining options under category "#1" is not supported}%
+ \fi
+ \expandafter\let\expandafter\minted@tmp\csname minted@optkeyslist@#1\endcsname
+ \ifx\minted@tmp\@empty
+ \def\minted@tmp{#2}%
+ \else
+ \expandafter\def\expandafter\minted@tmp\expandafter{\minted@tmp,#2}%
+ \fi
+ \expandafter\let\csname minted@optkeyslist@#1\endcsname\minted@tmp}
+\newcommand*{\mintedpgfkeyscreate}[3][]{%
+ \mintedpgfkeyscreate@i{#1}{#2}{#3}}
+\begingroup
+\catcode`\==12
+\gdef\mintedpgfkeyscreate@i#1#2#3{%
+ \def\minted@do##1{%
+ \minted@do@i##1=\FV@Sentinel}%
+ \def\minted@do@i##1=##2\FV@Sentinel{%
+ \minted@do@ii##1<>\FV@Sentinel}%
+ \def\minted@do@ii##1<##2>##3\FV@Sentinel{%
+ \minted@addoptkey{#2}{##1}}%
+ \minted@forcsvlist{\minted@do}{#3}%
+ \csname minted@pgfkeyscreate@#2\endcsname{#1}{#3}}
+\endgroup
% \end{macrocode}
% \end{macro}
%
%
-% \begin{macro}{\minted@get@opt}
-% We need a way to traverse the hierarchy of values for a given key and return the current value that has precedence. In doing this, we need to specify a default value to use if no value is found. When working with \texpkg{minted}-specific values, there should generally be a default value; in those cases, an empty default may be supplied. But the macro should also work with Pygments settings, which are stored in macros of the same form and will sometimes need to be accessed (for example, |encoding|). In the Pygments case, there may very well be no default values on the \LaTeX\ side, because we are falling back on Pygments' own built-in defaults. There is no need to duplicate those when very few Pygments values are ever needed; it is simpler to specify the default fallback when accessing the macro value.
+% \begin{macro}{\minted@pgfkeyscreate@fv,\minted@fvoptlist@<scope>(@<lexer>)?,\minted@usefvopts,\minted@usefvoptsnopy}
+% Syntax: |\minted@pgfkeyscreate@fv|\marg{key(=value)? list}.
+%
+% Options are stored in scope-specific lists. They are applied by passing these lists to |\fvset|. Individual option values are not retrievable.
%
-% From a programming perspective, the default argument value needs to be mandatory, so that |\minted@get@opt| can be fully expandable. This significantly simplifies accessing options.
+% The |\begingroup\fvset{...}\endgroup| checks \texpkg{fancyvrb} options at definition time so that any errors are caught immediately instead of when the options are used later elsewhere.
+%
+% |\minted@usefvopts| applies options via |\fvset|. |\minted@useadditionalfvoptsnopy| applies additional options that are usually handled on the Python side and is intended for situations where Python is not available or is not used, such as purely verbatim typesetting.
% \begin{macrocode}
-\def\minted@get@opt#1#2{%
- \ifcsname minted@opt@cmd:#1\endcsname
- \csname minted@opt@cmd:#1\endcsname
+\def\minted@pgfkeyscreate@fv#1#2{%
+ \if\relax\detokenize{#1}\relax
\else
- \ifminted@isinline
- \ifcsname minted@opt@lang\minted@lang @i:#1\endcsname
- \csname minted@opt@lang\minted@lang @i:#1\endcsname
- \else
- \ifcsname minted@opt@g@i:#1\endcsname
- \csname minted@opt@g@i:#1\endcsname
+ \minted@fatalerror{Processor macros are not supported in defining fancyvrb options}%
+ \fi
+ \minted@forcsvlist{\minted@pgfkeycreate@fv}{#2}}
+\begingroup
+\catcode`\==12
+\gdef\minted@pgfkeycreate@fv#1{%
+ \minted@pgfkeycreate@fv@i#1=\FV@Sentinel}
+\gdef\minted@pgfkeycreate@fv@i#1=#2\FV@Sentinel{%
+ \if\relax\detokenize{#2}\relax
+ \expandafter\minted@pgfkeycreate@fv@ii
+ \else
+ \expandafter\minted@pgfkeycreate@fv@iii
+ \fi
+ {#1}#2\FV@Sentinel}
+\gdef\minted@pgfkeycreate@fv@ii#1\FV@Sentinel{%
+ \minted@pgfkeycreate@fv@iv{#1}{\minted@const@pgfkeysnovalue}}
+\gdef\minted@pgfkeycreate@fv@iii#1#2=\FV@Sentinel{%
+ \minted@pgfkeycreate@fv@iv{#1}{#2}}
+\endgroup
+\def\minted@pgfkeycreate@fv@iv#1#2{%
+ \def\minted@do##1{%
+ \minted@iflexerscope{##1}%
+ {\minted@do@i{##1}{@\minted@lexer}}%
+ {\minted@do@i{##1}{}}}%
+ \def\minted@do@i##1##2{%
+ \pgfkeys{%
+ /minted/##1/.cd,
+ #1/.code=
+ \def\minted@tmp{####1}%
+ \ifx\minted@tmp\minted@const@pgfkeysnovalue
+ \begingroup\fvset{#1}\endgroup
+ \minted@apptoprovidecs{minted@fvoptlist@##1##2}{#1,}%
\else
- \ifcsname minted@opt@lang\minted@lang:#1\endcsname
- \csname minted@opt@lang\minted@lang:#1\endcsname
+ \begingroup\fvset{#1=####1}\endgroup
+ \minted@apptoprovidecs{minted@fvoptlist@##1##2}{#1=####1,}%
+ \fi,
+ }%
+ }%
+ \minted@forcsvlist{\minted@do}{\minted@optscopes}%
+ \ifx\minted@const@pgfkeysnovalue#2\relax
+ \else
+ \pgfkeys{%
+ /minted/global/.cd,
+ #1=#2,
+ }%
+ \fi}
+\def\minted@usefvopts{%
+ \ifbool{minted@isinline}%
+ {\minted@forcsvlist{\minted@usefvopts@do}{\minted@optscopes}}%
+ {\minted@forcsvlist{\minted@usefvopts@do}{\minted@optscopes@onlyblock}}}
+\def\minted@usefvopts@do#1{%
+ \minted@iflexerscope{#1}%
+ {\ifcsname minted@fvoptlist@#1@\minted@lexer\endcsname
+ \expandafter
+ \let\expandafter\minted@tmp\csname minted@fvoptlist@#1@\minted@lexer\endcsname
+ \expandafter\fvset\expandafter{\minted@tmp}%
+ \fi}%
+ {\ifcsname minted@fvoptlist@#1\endcsname
+ \expandafter
+ \let\expandafter\minted@tmp\csname minted@fvoptlist@#1\endcsname
+ \expandafter\fvset\expandafter{\minted@tmp}%
+ \fi}}
+\def\minted@useadditionalfvoptsnopy{%
+ \edef\minted@tmp{\mintedpyoptvalueof{gobble}}%
+ \ifx\minted@tmp\minted@const@pgfkeysnovalue
+ \else
+ \expandafter\minted@useadditionalfvoptsnopy@fvsetvk
+ \expandafter{\minted@tmp}{gobble}%
+ \fi
+ \edef\minted@tmp{\mintedpyoptvalueof{mathescape}}%
+ \ifx\minted@tmp\minted@const@pgfkeysnovalue
+ \else
+ \expandafter\minted@useadditionalfvoptsnopy@fvsetvk
+ \expandafter{\minted@tmp}{mathescape}%
+ \fi}
+\def\minted@useadditionalfvoptsnopy@fvsetvk#1#2{%
+ \fvset{#2=#1}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\minted@pgfkeyscreate@py,\mintedpyoptvalueof}
+% Syntax: |\minted@pgfkeyscreate@py|\marg{processor}\marg{key(<default>)?=initial value list}.
+%
+% Currently, initial values are required. The key processing macros are written to handle the possibility of optional initial values: If no initial value is set, use |\pgfkeysnovalue|, which is skipped in passing data to the Python side to invoke defaults.
+%
+% |\mintedpyoptvalueof| is used for retrieving values via |\edef|.
+% \begin{macrocode}
+\def\minted@pgfkeyscreate@py#1#2{%
+ \minted@forcsvlist{\minted@pgfkeycreate@py{#1}}{#2}}
+\begingroup
+\catcode`\==12
+\catcode`\<=12
+\catcode`\>=12
+\gdef\minted@pgfkeycreate@py#1#2{%
+ \minted@pgfkeycreate@py@i{#1}#2=\FV@Sentinel}
+\gdef\minted@pgfkeycreate@py@i#1#2=#3\FV@Sentinel{%
+ \if\relax\detokenize{#3}\relax
+ \expandafter\minted@pgfkeycreate@py@ii
+ \else
+ \expandafter\minted@pgfkeycreate@py@iii
+ \fi
+ {#1}{#2}#3\FV@Sentinel}
+\gdef\minted@pgfkeycreate@py@ii#1#2\FV@Sentinel{%
+ \minted@pgfkeycreate@py@iv{#1}{\pgfkeysnovalue}#2<>\FV@Sentinel}
+\gdef\minted@pgfkeycreate@py@iii#1#2#3=\FV@Sentinel{%
+ \minted@pgfkeycreate@py@iv{#1}{#3}#2<>\FV@Sentinel}
+\gdef\minted@pgfkeycreate@py@iv#1#2#3<#4>#5\FV@Sentinel{%
+ \if\relax\detokenize{#4}\relax
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi
+ {\minted@pgfkeycreate@py@v{#1}{#3}{#2}{\minted@const@pgfkeysnovalue}}%
+ {\minted@pgfkeycreate@py@v{#1}{#3}{#2}{#4}}}
+\endgroup
+\def\minted@pgfkeycreate@py@v#1#2#3#4{%
+ \def\minted@do##1{%
+ \minted@iflexerscope{##1}%
+ {\minted@do@i{##1}{@\minted@lexer}}%
+ {\minted@do@i{##1}{}}}
+ \def\minted@do@i##1##2{%
+ \if\relax\detokenize{#1}\relax
+ \pgfkeys{%
+ /minted/##1/.cd,
+ #2/.code=\expandafter\def\csname minted@pyopt@##1##2@#2\endcsname{####1},
+ }%
+ \else
+ \pgfkeys{%
+ /minted/##1/.cd,
+ #2/.code=
+ \def\minted@tmp{####1}%
+ \ifx\minted@tmp\minted@const@pgfkeysnovalue
+ \expandafter\let\csname minted@pyopt@##1##2@#2\endcsname\minted@tmp
+ \else\ifcsname minted@opthandler@immediate@\string#1\endcsname
+ #1{minted@pyopt@##1##2@#2}{####1}%
\else
- \ifcsname minted@opt@g:#1\endcsname
- \csname minted@opt@g:#1\endcsname
- \else
- #2%
- \fi
- \fi
- \fi
- \fi
+ \expandafter\def\csname minted@pyopt@##1##2@#2\endcsname{#1{####1}}%
+ \fi\fi,
+ }%
+ \fi
+ \ifx\minted@const@pgfkeysnovalue#4\relax
+ \pgfkeys{%
+ /minted/##1/.cd,
+ #2/.value required,
+ }%
\else
- \ifcsname minted@opt@lang\minted@lang:#1\endcsname
- \csname minted@opt@lang\minted@lang:#1\endcsname
- \else
- \ifcsname minted@opt@g:#1\endcsname
- \csname minted@opt@g:#1\endcsname
- \else
- #2%
- \fi
- \fi
+ \pgfkeys{%
+ /minted/##1/.cd,
+ #2/.default=#4,
+ }%
\fi
- \fi
-}%
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \noindent Actual option definitions. Some of these must be defined conditionally depending on whether we are in |draft| mode; in |draft| mode, we need to emulate Pygments functionality with \LaTeX, particularly with \texpkg{fancyvrb}, when possible. For example, gobbling must be performed by Pygments when |draft| is off, but when |draft| is on, \texpkg{fancyvrb} can perform gobbling.
-%
-% Lexers.
-% \begin{macrocode}
-\minted@def@optcl{encoding}{-P encoding}{#1}
-\minted@def@optcl{outencoding}{-P outencoding}{#1}
-\minted@def@optcl@e{escapeinside}{-P escapeinside}{#1}
-\minted@def@optcl@switch{stripnl}{-P stripnl}
-\minted@def@optcl@switch{stripall}{-P stripall}
-% Python console
-\minted@def@optcl@switch{python3}{-P python3}
-% PHP
-\minted@def@optcl@switch{funcnamehighlighting}{-P funcnamehighlighting}
-\minted@def@optcl@switch{startinline}{-P startinline}
-% \end{macrocode}
-%
-% Filters.
-% \begin{macrocode}
-\ifthenelse{\boolean{minted@draft}}%
- {\minted@def@optfv{gobble}}%
- {\minted@def@optcl{gobble}{-F gobble:n}{#1}}
-\minted@def@optcl{codetagify}{-F codetagify:codetags}{#1}
-\minted@def@optcl{keywordcase}{-F keywordcase:case}{#1}
-% \end{macrocode}
-%
-% \LaTeX\ formatter.
-% \begin{macrocode}
-\minted@def@optcl@switch{texcl}{-P texcomments}
-\minted@def@optcl@switch{texcomments}{-P texcomments}
-\minted@def@optcl@switch{mathescape}{-P mathescape}
-\minted@def@optfv@switch{linenos}
-\minted@def@opt@detok{style}
-% \end{macrocode}
-%
-% \texpkg{fancyvrb} and \texpkg{fvextra} options.
-% \begin{macrocode}
-\minted@def@optfv{frame}
-\minted@def@optfv{framesep}
-\minted@def@optfv{framerule}
-\minted@def@optfv{rulecolor}
-\minted@def@optfv{numbersep}
-\minted@def@optfv{numbers}
-\minted@def@optfv{firstnumber}
-\minted@def@optfv{stepnumber}
-\minted@def@optfv{firstline}
-\minted@def@optfv{lastline}
-\minted@def@optfv{baselinestretch}
-\minted@def@optfv{xleftmargin}
-\minted@def@optfv{xrightmargin}
-\minted@def@optfv{fillcolor}
-\minted@def@optfv{tabsize}
-\minted@def@optfv{fontfamily}
-\minted@def@optfv{fontsize}
-\minted@def@optfv{fontshape}
-\minted@def@optfv{fontseries}
-\minted@def@optfv{formatcom}
-\minted@def@optfv{label}
-\minted@def@optfv{labelposition}
-\minted@def@optfv{highlightlines}
-\minted@def@optfv{highlightcolor}
-\minted@def@optfv{space}
-\minted@def@optfv{spacecolor}
-\minted@def@optfv{tab}
-\minted@def@optfv{tabcolor}
-\minted@def@optfv{highlightcolor}
-\minted@def@optfv@switch{beameroverlays}
-\minted@def@optfv@switch{curlyquotes}
-\minted@def@optfv@switch{numberfirstline}
-\minted@def@optfv@switch{numberblanklines}
-\minted@def@optfv@switch{stepnumberfromfirst}
-\minted@def@optfv@switch{stepnumberoffsetvalues}
-\minted@def@optfv@switch{showspaces}
-\minted@def@optfv@switch{resetmargins}
-\minted@def@optfv@switch{samepage}
-\minted@def@optfv@switch{showtabs}
-\minted@def@optfv@switch{obeytabs}
-\minted@def@optfv@switch{breaklines}
-\minted@def@optfv@switch{breakbytoken}
-\minted@def@optfv@switch{breakbytokenanywhere}
-\minted@def@optfv{breakindent}
-\minted@def@optfv{breakindentnchars}
-\minted@def@optfv@switch{breakautoindent}
-\minted@def@optfv{breaksymbol}
-\minted@def@optfv{breaksymbolsep}
-\minted@def@optfv{breaksymbolsepnchars}
-\minted@def@optfv{breaksymbolindent}
-\minted@def@optfv{breaksymbolindentnchars}
-\minted@def@optfv{breaksymbolleft}
-\minted@def@optfv{breaksymbolsepleft}
-\minted@def@optfv{breaksymbolsepleftnchars}
-\minted@def@optfv{breaksymbolindentleft}
-\minted@def@optfv{breaksymbolindentleftnchars}
-\minted@def@optfv{breaksymbolright}
-\minted@def@optfv{breaksymbolsepright}
-\minted@def@optfv{breaksymbolseprightnchars}
-\minted@def@optfv{breaksymbolindentright}
-\minted@def@optfv{breaksymbolindentrightnchars}
-\minted@def@optfv{breakbefore}
-\minted@def@optfv{breakbeforesymbolpre}
-\minted@def@optfv{breakbeforesymbolpost}
-\minted@def@optfv@switch{breakbeforeinrun}
-\minted@def@optfv{breakafter}
-\minted@def@optfv@switch{breakafterinrun}
-\minted@def@optfv{breakaftersymbolpre}
-\minted@def@optfv{breakaftersymbolpost}
-\minted@def@optfv@switch{breakanywhere}
-\minted@def@optfv{breakanywheresymbolpre}
-\minted@def@optfv{breakanywheresymbolpost}
-\minted@def@optfv{fontencoding}
-% \end{macrocode}
-%
-% Finally, options specific to \texpkg{minted}.
-%
-% |bgcolor|. The original, |minipage|- and |\colorbox|-based solution was replaced with a |framed|-based solution in version 2.2. A dedicated framing package will often be preferable.
-% \begin{macrocode}
-\minted@def@opt{bgcolor}
-% \end{macrocode}
-%
-% Autogobble. We create an option that governs when Python's |textwrap.dedent()| is used to autogobble code.
-% \begin{macrocode}
-\minted@def@opt@switch{autogobble}
-% \end{macrocode}
-%
-% Whether lexer errors are shown.
-% \begin{macrocode}
-\minted@def@opt@switch{ignorelexererrors}
-% \end{macrocode}
-%
-% \begin{macro}{\minted@encoding}
-% When working with encoding, we will need access to the current encoding. That may be done via |\minted@get@opt|, but it is more convenient to go ahead and define a shortcut with an appropriate default
-% \begin{macrocode}
-\newcommand{\minted@encoding}{\minted@get@opt{encoding}{UTF8}}
-% \end{macrocode}
-% \end{macro}
-%
-%
-%
-%
-% \subsection{Internal helpers}
-%
-% \begin{environment}{minted@snugshade*}
-% Define a custom version of \texpkg{framed}'s |snugshade*| that takes a color as argument. This avoids the need to redefine |shadecolor|.
-% \begin{macrocode}
-\newenvironment{minted@snugshade*}[1]{%
- \def\FrameCommand##1{\hskip\@totalleftmargin
- \colorbox{#1}{##1}%
- \hskip-\linewidth \hskip-\@totalleftmargin \hskip\columnwidth}%
- \MakeFramed{\advance\hsize-\width
- \@totalleftmargin\z@ \linewidth\hsize
- \advance\labelsep\fboxsep
- \@setminipage}%
- }{\par\unskip\@minipagefalse\endMakeFramed}
+ }%
+ \minted@forcsvlist{\minted@do}{\minted@optscopes}%
+ \pgfkeys{%
+ /minted/global/.cd,
+ #2=#3,
+ }}
+\def\mintedpyoptvalueof#1{%
+ \ifbool{minted@isinline}%
+ {\minted@pyoptvalueof@inline{#1}}%
+ {\minted@pyoptvalueof@block{#1}}}
+\def\minted@pyoptvalueof@inline#1{%
+ \ifcsname minted@pyopt@cmd@#1\endcsname
+ \unexpanded\expandafter\expandafter\expandafter{%
+ \csname minted@pyopt@cmd@#1\endcsname}%
+ \else\ifcsname minted@pyopt@lexerinline@\minted@lexer @#1\endcsname
+ \unexpanded\expandafter\expandafter\expandafter{%
+ \csname minted@pyopt@lexerinline@\minted@lexer @#1\endcsname}%
+ \else\ifcsname minted@pyopt@globalinline@#1\endcsname
+ \unexpanded\expandafter\expandafter\expandafter{%
+ \csname minted@pyopt@globalinline@#1\endcsname}%
+ \else\ifcsname minted@pyopt@lexer@\minted@lexer @#1\endcsname
+ \unexpanded\expandafter\expandafter\expandafter{%
+ \csname minted@pyopt@lexer@\minted@lexer @#1\endcsname}%
+ \else
+ \unexpanded\expandafter\expandafter\expandafter{%
+ \csname minted@pyopt@global@#1\endcsname}%
+ \fi\fi\fi\fi}
+\def\minted@pyoptvalueof@block#1{%
+ \ifcsname minted@pyopt@cmd@#1\endcsname
+ \unexpanded\expandafter\expandafter\expandafter{%
+ \csname minted@pyopt@cmd@#1\endcsname}%
+ \else\ifcsname minted@pyopt@lexer@\minted@lexer @#1\endcsname
+ \unexpanded\expandafter\expandafter\expandafter{%
+ \csname minted@pyopt@lexer@\minted@lexer @#1\endcsname}%
+ \else
+ \unexpanded\expandafter\expandafter\expandafter{%
+ \csname minted@pyopt@global@#1\endcsname}%
+ \fi\fi}
% \end{macrocode}
-% \end{environment}
+% \end{macro}
%
%
-% \begin{environment}{\minted@bgbox}
+% \begin{macro}{\minted@pgfkeyscreate@tex,\mintedtexoptvalueof,\minted@usetexoptsnonpygments}
+% Syntax: |\minted@pgfkeyscreate@tex|\marg{processor}\marg{key=initial value list}.
%
-% Define an environment that may be wrapped around a |minted| environment to assign a background color. This is retained as a holdover from version 1.0. In most cases, it is probably better to use a dedicated framing package, such as \texpkg{tcolorbox} or \texpkg{mdframed}.
+% Currently, initial values are required. The key processing macros are written to handle the possibility of optional initial values: If no initial value is set, use |\pgfkeysnovalue|.
%
-% First, we need to define a new save box.
+% |\mintedtexoptvalueof| is used for retrieving values via |\edef|.
%
+% |\minted@usetexoptsnonpygments| applies the |tex| options that aren't used by Pygments. It is initially empty and is redefined after |tex| options are defined. Unlike the |\minted@usefvopts| case, it isn't possible to simply loop through all defined options; more specialized per-option handling is required, since some options are handled in separate Pygments-related macros and there is no equivalent of |\fvset|.
% \begin{macrocode}
-\newsavebox{\minted@bgbox}
+\def\minted@pgfkeyscreate@tex#1#2{%
+ \minted@forcsvlist{\minted@pgfkeycreate@tex{#1}}{#2}}
+\begingroup
+\catcode`\==12
+\gdef\minted@pgfkeycreate@tex#1#2{%
+ \minted@pgfkeycreate@tex@i{#1}#2=\FV@Sentinel}
+\gdef\minted@pgfkeycreate@tex@i#1#2=#3\FV@Sentinel{%
+ \if\relax\detokenize{#3}\relax
+ \expandafter\minted@pgfkeycreate@tex@ii
+ \else
+ \expandafter\minted@pgfkeycreate@tex@iii
+ \fi
+ {#1}{#2}#3\FV@Sentinel}
+\gdef\minted@pgfkeycreate@tex@ii#1#2\FV@Sentinel{%
+ \minted@pgfkeycreate@tex@iv{#1}{#2}{\pgfkeysnovalue}}
+\gdef\minted@pgfkeycreate@tex@iii#1#2#3=\FV@Sentinel{%
+ \minted@pgfkeycreate@tex@iv{#1}{#2}{#3}}
+\endgroup
+\def\minted@pgfkeycreate@tex@iv#1#2#3{%
+ \def\minted@do##1{%
+ \minted@iflexerscope{##1}%
+ {\minted@do@i{##1}{@\minted@lexer}}%
+ {\minted@do@i{##1}{}}}
+ \def\minted@do@i##1##2{%
+ \if\relax\detokenize{#1}\relax
+ \pgfkeys{%
+ /minted/##1/.cd,
+ #2/.code=\expandafter\def\csname minted@texopt@##1##2@#2\endcsname{####1},
+ #2/.value required,
+ }%
+ \else
+ \pgfkeys{%
+ /minted/##1/.cd,
+ #2/.code=
+ \def\minted@tmp{####1}%
+ \ifx\minted@tmp\minted@const@pgfkeysnovalue
+ \expandafter\let\csname minted@texopt@##1##2@#2\endcsname\minted@tmp
+ \else\ifcsname minted@opthandler@immediate@\string#1\endcsname
+ #1{minted@texopt@##1##2@#2}{####1}%
+ \else
+ \expandafter\def\csname minted@texopt@##1##2@#2\endcsname{#1{####1}}%
+ \fi\fi,
+ #2/.value required,
+ }%
+ \fi
+ }%
+ \minted@forcsvlist{\minted@do}{\minted@optscopes}%
+ \pgfkeys{%
+ /minted/global/.cd,
+ #2=#3,
+ }}
+\def\mintedtexoptvalueof#1{%
+ \ifbool{minted@isinline}%
+ {\minted@texoptvalueof@inline{#1}}%
+ {\minted@texoptvalueof@block{#1}}}
+\def\minted@texoptvalueof@inline#1{%
+ \ifcsname minted@texopt@cmd@#1\endcsname
+ \unexpanded\expandafter\expandafter\expandafter{%
+ \csname minted@texopt@cmd@#1\endcsname}%
+ \else\ifcsname minted@texopt@lexerinline@\minted@lexer @#1\endcsname
+ \unexpanded\expandafter\expandafter\expandafter{%
+ \csname minted@texopt@lexerinline@\minted@lexer @#1\endcsname}%
+ \else\ifcsname minted@texopt@globalinline@#1\endcsname
+ \unexpanded\expandafter\expandafter\expandafter{%
+ \csname minted@texopt@globalinline@#1\endcsname}%
+ \else\ifcsname minted@texopt@lexer@\minted@lexer @#1\endcsname
+ \unexpanded\expandafter\expandafter\expandafter{%
+ \csname minted@texopt@lexer@\minted@lexer @#1\endcsname}%
+ \else
+ \unexpanded\expandafter\expandafter\expandafter{%
+ \csname minted@texopt@global@#1\endcsname}%
+ \fi\fi\fi\fi}
+\def\minted@texoptvalueof@block#1{%
+ \ifcsname minted@texopt@cmd@#1\endcsname
+ \unexpanded\expandafter\expandafter\expandafter{%
+ \csname minted@texopt@cmd@#1\endcsname}%
+ \else\ifcsname minted@texopt@lexer@\minted@lexer @#1\endcsname
+ \unexpanded\expandafter\expandafter\expandafter{%
+ \csname minted@texopt@lexer@\minted@lexer @#1\endcsname}%
+ \else
+ \unexpanded\expandafter\expandafter\expandafter{%
+ \csname minted@texopt@global@#1\endcsname}%
+ \fi\fi}
+\def\minted@usetexoptsnonpygments{}
% \end{macrocode}
+% \end{macro}
%
-% Now we can define the environment that applies a background color. Prior to \texpkg{minted} 2.2, this involved a |minipage|. However, that approach was problematic because it did not allow linebreaks, would be pushed into the margin by immediately preceding text, and had very different whitespace separation from preceding and following text compared to no background color. In version 2.2, this was replaced with an approach based on \texpkg{framed}. |\FV@NumberSep| is adjusted by |\fboxsep| to ensure that line numbers remain in the same location in the margin regardless of whether |bgcolor| is used.
%
-% \begin{macrocode}
-\newenvironment{minted@colorbg}[1]{%
- \setlength{\OuterFrameSep}{0pt}%
- \let\minted@tmp\FV@NumberSep
- \edef\FV@NumberSep{%
- \the\numexpr\dimexpr\minted@tmp+\number\fboxsep\relax sp\relax}%
- \medskip
- \begin{minted@snugshade*}{#1}}
- {\end{minted@snugshade*}%
- \medskip\noindent}
-% \end{macrocode}
-% \end{environment}
+%
+% \subsubsection{Option handlers}
%
%
-% \begin{macro}{\minted@code}
-% Create a file handle for saving code (and anything else that must be written to temp files).
+% \begin{macro}{\minted@opthandler@deforrestrictedescape}
+% Syntax: |\minted@opthandler@deforrestrictedescape|\marg{csname}\marg{value}. \meta{value} is processed and then the result is stored in \meta{csname}.
+%
+% Leave \meta{value} unchanged if a single macro. Otherwise process it with |\FVExtraDetokenizeREscVArg|, which performs backslash escapes but restricted to ASCII symbols and punctuation. This guarantees exact output (no issues with spaces due to detokenizing alphabetical control sequences).
+%
+% The |\minted@opthandler@immediate@<macro_name>| tells option processing to invoke the macro immediately, instead of simply storing it as a value wrapper that will only be invoked when the value is used. This provides immediate error messages in the event of invalid escapes. |\FVExtraDetokenizeREscVArg| is not fully expandable, so waiting to invoke it later when \meta{value} is expanded (|\edef|) isn't an option.
% \begin{macrocode}
-\newwrite\minted@code
+\def\minted@opthandler@deforrestrictedescape#1#2{%
+ \if\relax\detokenize{#2}\relax
+ \expandafter\def\csname#1\endcsname{#2}%
+ \else\if\relax\detokenize\expandafter{\@gobble#2}\relax
+ \ifcat\relax\noexpand#2%
+ \expandafter\expandafter\expandafter\minted@opthandler@deforrestrictedescape@i
+ \expandafter\@gobble\string#2\FV@Sentinel{#1}{#2}%
+ \else
+ \FVExtraDetokenizeREscVArg{\expandafter\def\csname#1\endcsname}{#2}%
+ \fi
+ \else
+ \FVExtraDetokenizeREscVArg{\expandafter\def\csname#1\endcsname}{#2}%
+ \fi\fi}
+\def\minted@opthandler@deforrestrictedescape@i#1#2\FV@Sentinel#3#4{%
+ \ifcsname minted@isalpha\number`#1\endcsname
+ \expandafter\def\csname#3\endcsname{#4}%
+ \else
+ \FVExtraDetokenizeREscVArg{\expandafter\def\csname#3\endcsname}{#4}%
+ \fi}
+\expandafter\let\csname
+ minted@opthandler@immediate@\string\minted@opthandler@deforrestrictedescape
+ \endcsname\relax
% \end{macrocode}
% \end{macro}
%
%
-% \begin{macro}{\minted@savecode}
%
-% Save code to be pygmentized to a file.
+% \subsubsection{Option definitions}
+%
+%
+% \paragraph{\texpkg{fancyvrb}}
+% \begin{itemize}
+% \item |tabcolor|: Visible tabs should have a specified color so that they don't change colors when used to indent multiline strings or comments.
+% \end{itemize}
% \begin{macrocode}
-\newcommand{\minted@savecode}[1]{
- \immediate\openout\minted@code\minted@jobname.pyg\relax
- \immediate\write\minted@code{\expandafter\detokenize\expandafter{#1}}%
- \immediate\closeout\minted@code}
+\mintedpgfkeyscreate{fv}{
+ baselinestretch,
+ beameroverlays,
+ backgroundcolor,
+ backgroundcolorvphantom,
+ bgcolor,
+ bgcolorpadding,
+ bgcolorvphantom,
+ breakafter,
+ breakafterinrun,
+ breakaftersymbolpost,
+ breakaftersymbolpre,
+ breakanywhere,
+ breakanywhereinlinestretch,
+ breakanywheresymbolpost,
+ breakanywheresymbolpre,
+ breakautoindent,
+ breakbefore,
+ breakbeforeinrun,
+ breakbeforesymbolpost,
+ breakbeforesymbolpre,
+ breakbytoken,
+ breakbytokenanywhere,
+ breakindent,
+ breakindentnchars,
+ breaklines,
+ breaksymbol,
+ breaksymbolindent,
+ breaksymbolindentleft,
+ breaksymbolindentleftnchars,
+ breaksymbolindentnchars,
+ breaksymbolindentright,
+ breaksymbolindentrightnchars,
+ breaksymbolleft,
+ breaksymbolright,
+ breaksymbolsep,
+ breaksymbolsepleft,
+ breaksymbolsepleftnchars,
+ breaksymbolsepnchars,
+ breaksymbolsepright,
+ breaksymbolseprightnchars,
+ curlyquotes,
+ fillcolor,
+ firstline,
+ firstnumber,
+ fontencoding,
+ fontfamily,
+ fontseries,
+ fontshape,
+ fontsize,
+ formatcom,
+ frame,
+ framerule,
+ framesep,
+ highlightcolor,
+ highlightlines,
+ label,
+ labelposition,
+ lastline,
+ linenos,
+ listparameters,
+ numberblanklines,
+ numberfirstline,
+ numbers,
+ numbersep,
+ obeytabs,
+ resetmargins,
+ rulecolor,
+ samepage,
+ showspaces,
+ showtabs,
+ space,
+ spacecolor,
+ stepnumber,
+ stepnumberfromfirst,
+ stepnumberoffsetvalues,
+ tab,
+ tabcolor=black,
+ tabsize,
+ xleftmargin,
+ xrightmargin,
+}
% \end{macrocode}
-% \end{macro}
%
+% \paragraph{\mintedpkg\ (passed to Python)}
+% \begin{itemize}
+% \item PHP should use |startinline| for |\mintinline|.
+% \end{itemize}
+% \begin{macrocode}
+\mintedpgfkeyscreate{py}{
+ autogobble<true>=false,
+ encoding=utf8,
+ funcnamehighlighting<true>=true,
+ gobble=0,
+ gobblefilter=0,
+ keywordcase=none,
+ literalenvname=MintedVerbatim,
+ mathescape<true>=false,
+ python3<true>=true,
+ rangeregexmatchnumber=1,
+ rangeregexdotall<true>=false,
+ rangeregexmultiline<true>=false,
+ startinline<true>=false,
+ stripall<true>=false,
+ stripnl<true>=false,
+ texcl<true>=false,
+ texcomments<true>=false,
+}
+\mintedpgfkeyscreate[\minted@opthandler@deforrestrictedescape]{py}{
+ codetagify=,
+ escapeinside=,
+ literatecomment=,
+ rangestartstring=,
+ rangestartafterstring=,
+ rangestopstring=,
+ rangestopbeforestring=,
+ rangeregex=,
+}
+\let\minted@tmplexer\minted@lexer
+\def\minted@lexer{php}
+\pgfkeys{
+ /minted/lexerinline/.cd,
+ startinline=true,
+}
+\let\minted@lexer\minted@tmplexer
+% \end{macrocode}
%
-% \begin{macro}{minted@FancyVerbLineTemp}
-% At various points, we will need a temporary counter for storing and then restoring the value of |FancyVerbLine|. When using the |langlinenos| option, we need to store the current value of |FancyVerbLine|, then set |FancyVerbLine| to the current value of a language-specific counter, and finally restore |FancyVerbLine| to its initial value after the current chunk of code has been typeset. In patching |VerbatimOut|, we need to prevent |FancyVerbLine| from being incremented during the write process.
+% \paragraph{\mintedpkg\ (kept in \LaTeX)}
+% \begin{itemize}
+% \item The |\minted@def@optcl| is for backward compatibility with versions of \texpkg{tcolorbox} that used this to define an |envname| option under \mintedpkg\ v2.
+% \end{itemize}
% \begin{macrocode}
-\newcounter{minted@FancyVerbLineTemp}
+\mintedpgfkeyscreate{tex}{
+ envname=Verbatim,
+ ignorelexererrors=false,
+ style=default,
+}
+\pgfkeys{
+ /minted/globalinline/.cd,
+ envname=VerbEnv,
+}
+\expandafter\def\expandafter\minted@usetexoptsnonpygments\expandafter{%
+ \minted@usetexoptsnonpygments
+ \edef\minted@literalenvname{\mintedpyoptvalueof{literalenvname}}%
+ \edef\minted@envname{\mintedtexoptvalueof{envname}}%
+ \expandafter\def\expandafter\minted@literalenv\expandafter{%
+ \csname \minted@literalenvname\endcsname}%
+ \expandafter\def\expandafter\minted@endliteralenv\expandafter{%
+ \csname end\minted@literalenvname\endcsname}%
+ \expandafter\expandafter\expandafter
+ \let\expandafter\minted@literalenv\csname \minted@envname\endcsname
+ \expandafter\expandafter\expandafter
+ \let\expandafter\minted@endliteralenv\csname end\minted@envname\endcsname}%
+\ifcsname minted@def@optcl\endcsname
+ \ifx\minted@def@optcl\relax
+ \let\minted@def@optcl\minted@undefined
+ \fi
+\fi
+\providecommand{\minted@def@optcl}[4][]{%
+ \minted@warning{Macro \string\minted@def@optcl\space is deprecated with minted v3
+ and no longer has any effect}}
% \end{macrocode}
-% \end{macro}
%
%
-% \begin{macro}{\minted@FVB@VerbatimOut}
-% We need a custom version of \texpkg{fancyvrb}'s |\FVB@VerbatimOut| that supports Unicode (everything written to file is |\detokenized|). We also need to prevent the value of |FancyVerbLine| from being incorrectly incremented.
+%
+% \subsection{Caching, styles, and highlighting}
+%
+%
+%
+% \subsubsection{Cache management}
+%
+%
+% \begin{macro}{\minted@addcachefilename,\minted@cachefile<n>}
+% Track cache files that are used, so that unused files can be removed.
% \begin{macrocode}
-\newcommand{\minted@write@detok}[1]{%
- \immediate\write\FV@OutFile{\detokenize{#1}}}
-\newcommand{\minted@FVB@VerbatimOut}[1]{%
- \setcounter{minted@FancyVerbLineTemp}{\value{FancyVerbLine}}%
- \@bsphack
- \begingroup
- \FV@UseKeyValues
- \FV@DefineWhiteSpace
- \def\FV@Space{\space}%
- \FV@DefineTabOut
- \let\FV@ProcessLine\minted@write@detok
- \immediate\openout\FV@OutFile #1\relax
- \let\FV@FontScanPrep\relax
- \let\@noligs\relax
- \FV@Scan}
+\newcounter{minted@numcachefiles}
+\def\minted@addcachefilename#1{%
+ \ifbool{minted@canexec}%
+ {\stepcounter{minted@numcachefiles}%
+ \expandafter
+ \xdef\csname minted@cachefile\arabic{minted@numcachefiles}\endcsname{#1}}%
+ {}}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\minted@FVE@VerbatimOut}
-% Likewise, we need a custom version of |\FVE@VerbatimOut| that completes the protection of |FancyVerbLine| from being incremented.
+%
+% \begin{macro}{\minted@clean}
+% If the Python executable is available and was used, clean up temp files. If a cache is in use, also update the cache index and remove unused cache files.
+%
+% Only create a |.data.minted| file if there is a cache list to save. Otherwise, no file is needed.
+%
+% Runs |\AfterEndDocument| so that all typesetting is complete, and thus the cache list is complete. |\minted@fasthighlightmode@checkend| is placed within the same |\AfterEndDocument| to guarantee correct ordering.
+%
% \begin{macrocode}
-\newcommand{\minted@FVE@VerbatimOut}{%
- \immediate\closeout\FV@OutFile\endgroup\@esphack
- \setcounter{FancyVerbLine}{\value{minted@FancyVerbLineTemp}}}%
+\def\minted@clean{%
+ \ifbool{minted@canexec}%
+ {\ifbool{minted@diddetectconfig}{\minted@clean@i}{}}%
+ {}}
+\def\minted@clean@i{%
+ \ifnum\value{minted@numcachefiles}>0\relax
+ \expandafter\minted@savecachelist
+ \fi
+ \ifbool{minted@fasthighlightmode}%
+ {}%
+ {\minted@exec@clean
+ \global\boolfalse{minted@canexec}}}
+\def\minted@savecachelist{%
+ \pydatasetfilename{\MintedDataFilename}%
+ \minted@fasthighlightmode@checkstart
+ \pydatawritedictopen
+ \pydatawritekeyvalue{command}{clean}%
+ \pydatawritekeyedefvalue{jobname}{\jobname}%
+ \pydatawritekeyedefvalue{timestamp}{\minted@timestamp}%
+ \pydatawritekeyedefvalue{cachepath}{\minted@cachepath}%
+ \pydatawritekey{cachefiles}%
+ \pydatawritemlvaluestart
+ \pydatawritemlvalueline{[}%
+ \setcounter{minted@tmpcnt}{1}%
+ \loop\unless\ifnum\value{minted@tmpcnt}>\value{minted@numcachefiles}\relax
+ \expandafter\minted@savecachelist@writecachefile\expandafter{%
+ \csname minted@cachefile\arabic{minted@tmpcnt}\endcsname}%
+ \expandafter\global\expandafter
+ \let\csname minted@cachefile\arabic{minted@tmpcnt}\endcsname\minted@undefined
+ \stepcounter{minted@tmpcnt}%
+ \repeat
+ \setcounter{minted@numcachefiles}{0}%
+ \pydatawritemlvalueline{]}%
+ \pydatawritemlvalueend
+ \pydatawritedictclose
+ \ifbool{minted@fasthighlightmode}{}{\pydataclosefilename{\MintedDataFilename}}}
+\begingroup
+\catcode`\"=12
+\catcode`\,=12
+\gdef\minted@savecachelist@writecachefile#1{%
+ \expandafter\pydatawritemlvalueline\expandafter{\expandafter"#1",}}
+\endgroup
+\AfterEndDocument{%
+ \minted@clean
+ \minted@fasthighlightmode@checkend}
% \end{macrocode}
% \end{macro}
%
%
-% \begin{macro}{\MintedPygmentize}
-% We need a way to customize the executable/script that is called to perform highlighting. Typically, we will want |pygmentize|. But advanced users might wish to use a custom Python script instead. The command is only defined if it does not exist. In general, the command should be |\renewcommand|ed after the package is loaded, but this way, it will work if defined before \texpkg{minted} is loaded.
+%
+% \subsubsection{Style definitions}
+%
+%
+% \begin{macro}{\minted@patch@PygmentsStyledef}
+% The macros generated by Pygments must be patched: the single quote macro is redefined for \texpkg{upquote} compatibility, and the hyphen is redefined to prevent unintended line breaks under LuaTeX.
% \begin{macrocode}
-\ifcsname MintedPygmentize\endcsname\else
- \newcommand{\MintedPygmentize}{pygmentize}
-\fi
+\def\minted@patch@PygmentsZsq{%
+ \ifcsname\minted@styleprefix Zsq\endcsname
+ \ifcsstring{\minted@styleprefix Zsq}{\char`\'}{\minted@patch@PygmentsZsq@i}{}%
+ \fi}
+\begingroup
+\catcode`\'=\active
+\gdef\minted@patch@PygmentsZsq@i{\def\PYGZsq{'}}
+\endgroup
+\def\minted@patch@PygmentsZhy{%
+ \ifcsname\minted@styleprefix Zhy\endcsname
+ \ifcsstring{\minted@styleprefix Zhy}{\char`\-}{\def\PYGZhy{\mbox{-}}}{}%
+ \fi}
+\def\minted@patch@ignorelexererrors{%
+ \edef\minted@tmp{\mintedtexoptvalueof{ignorelexererrors}}%
+ \ifdefstring{\minted@tmp}{true}%
+ {\expandafter\let\csname\minted@styleprefix @tok@err\endcsname\relax}%
+ {}}
+\def\minted@patch@PygmentsStyledef{%
+ \minted@patch@PygmentsZsq
+ \minted@patch@PygmentsZhy
+ \minted@patch@ignorelexererrors}
% \end{macrocode}
% \end{macro}
%
%
-% \begin{macro}{minted@pygmentizecounter}
-% We need a counter to keep track of how many files have been pygmentized. This is primarily used with |finalizecache| for naming cache files sequentially in |listing<number>.pygtex| form.
+% \begin{macro}{\minted@VerbatimPygments}
+% Enable \texpkg{fancyvrb} features for Pygments macros.
% \begin{macrocode}
-\newcounter{minted@pygmentizecounter}
+\def\minted@VerbatimPygments{%
+ \expandafter\minted@VerbatimPygments@i\expandafter{%
+ \csname\minted@styleprefix\endcsname}}
+\def\minted@VerbatimPygments@i#1{%
+ \VerbatimPygments{#1}{#1}}
% \end{macrocode}
% \end{macro}
%
%
-% \begin{macro}{\MintedPython}
-% Python executable to be used for |autogobble|.
+% \begin{macro}{\minted@standardcatcodes}
+% Set standard catcodes. Used before |\input| of style definitions and in reading the optional argument of environments that wrap Pygments output.
% \begin{macrocode}
-\ifwindows
- \newcommand{\MintedPython}{python}
-\else
- \newcommand{\MintedPython}{python3}
-\fi
+\def\minted@standardcatcodes{%
+ \catcode`\\=0
+ \catcode`\{=1
+ \catcode`\}=2
+ \catcode`\#=6
+ \catcode`\ =10
+ \catcode`\@=11
+ \catcode`\`=12
+ \catcode`\==12
+ \catcode`\+=12
+ \catcode`\.=12
+ \catcode`\,=12
+ \catcode`\[=12
+ \catcode`\]=12
+ \catcode`\%=14}
% \end{macrocode}
% \end{macro}
%
%
-% \begin{macro}{\minted@check@MintedPython}
-% Check that |\MintedPython| is a valid executable before use. Swap |python| for |python3| and vice versa depending on what is available.
+% \begin{macro}{\minted@defstyle}
+% Define highlighting style macros.
% \begin{macrocode}
-\newcommand{\minted@check@MintedPython}{%
- \ifcsname minted@MintedPython@\MintedPython\endcsname
+\def\minted@defstyle{%
+ \edef\minted@tmp{\mintedtexoptvalueof{style}}%
+ \expandafter\minted@defstyle@i\expandafter{\minted@tmp}}
+\def\minted@defstyle@i#1{%
+ \minted@ifalphanumhyphenunderscore{#1}%
+ {\minted@defstyle@ii{#1}}%
+ {\minted@error{Highlighting style is set to "#1" but only style names with
+ alphanumeric characters, hyphens, and underscores are supported;
+ falling back to default style}%
+ \minted@defstyle@ii{default}}}
+\def\minted@defstyle@ii#1{%
+ \ifcsname minted@styledef@#1\endcsname
+ \expandafter\@firstoftwo
\else
- \let\minted@altpython\minted@undefined
- \ifdefstring{\MintedPython}{python}{\def\minted@altpython{python3}}{}%
- \ifdefstring{\MintedPython}{python3}{\def\minted@altpython{python}}{}%
- \ifx\minted@altpython\minted@undefined\relax
- \TestAppExists{\MintedPython}%
- \ifAppExists
- \expandafter\global\expandafter\let%
- \csname minted@MintedPython@\MintedPython\endcsname\relax
- \else
- \PackageError{minted}%
- {Failed to find Python executable \MintedPython;
- check Python installation (including PATH),
- or redefine \string\MintedPython}%
- {Failed to find Python executable \MintedPython;
- check Python installation (including PATH),
- or redefine \string\MintedPython}%
- \fi
- \else
- \ifcsname minted@MintedPython@\minted@altpython\endcsname
- \let\MintedPython\minted@altpython
- \else
- \TestAppExists{\MintedPython}%
- \ifAppExists
- \expandafter\global\expandafter\let%
- \csname minted@MintedPython@\MintedPython\endcsname\relax
- \else
- \TestAppExists{\minted@altpython}%
- \ifAppExists
- \expandafter\global\expandafter\let%
- \csname minted@MintedPython@\minted@altpython\endcsname\relax
- \let\MintedPython\minted@altpython
- \else
- \PackageError{minted}%
- {Failed to find Python executables python or python3;
- check Python installation (including PATH),
- or redefine \string\MintedPython}%
- {Failed to find Python executables python or python3;
- check Python installation (including PATH),
- or redefine \string\MintedPython}%
- \fi
- \fi
- \fi
- \fi
+ \expandafter\@secondoftwo
\fi
-}
+ {\csname minted@styledef@#1\endcsname
+ \minted@patch@PygmentsStyledef
+ \minted@VerbatimPygments}%
+ {\minted@defstyle@load{#1}}}
% \end{macrocode}
% \end{macro}
%
%
-% \begin{macro}{\minted@pygmentize}
-%
-% Pygmentize a file (default: |\minted@outputdir\minted@jobname.pyg|) using the options provided.
-%
-% Unfortunately, the logic for caching is a little complex due to operations that are OS- and engine-dependent.
-%
-% The name of cached files is the result of concatenating the md5 of the code and the md5 of the command. This results in a filename that is longer than ideal (64 characters plus path and extension). Unfortunately, this is the only robust approach that is possible using the built-in pdfTeX hashing capabilities.\footnote{It would be possible to use only the cache of the code, but that approach breaks down as soon as the code is used multiple times with different options. While that may seem unlikely in practice, it occurs in this documentation and may be expected to occur in other docs.} LuaTeX could do better, by hashing the command and code together. The Python script that provides XeTeX capabilities simply runs both the command and the code through a single sha1 hasher, but has the additional overhead of the |\write18| call and Python execution.
-%
-% One potential concern is that caching should also keep track of the command from which code originates. What if identical code is highlighted with identical settings in both the |minted| environment and |\mintinline| command? In both cases, what is actually saved by Pygments is identical. The difference in final appearance is due to how the environment and command treat the Pygments output.
-%
-% \textbf{This macro must always be checked carefully whenever it is modified.} Under no circumstances should |#1| be written to or opened by Python in write mode. When |\inputminted| is used, |#1| will be an external file that is brought in for highlighting, so it must be left intact.
-%
-% At the very beginning, a check is performed to make sure that style macros exist. This must be done before the highlighted content is generated, so that temp file names can be shared without accidental overwriting. Styles are generated here, rather than when a style is set, so that creating the style macros is done as late as possible in case a custom |pygmentize| is in use via |\MintedPygmentize|.
+% \begin{macro}{\minted@defstyle@load}
+% Certain catcodes are required when loading Pygments style definitions from file.
+% \begin{itemize}
+% \item At sign |@| would be handled by the |\makeatletter| within the Pygments style definition if the style were brought in via |\input|, but |\makeatletter| doesn't affect tokenization with the |catchfile| approach.
+% \item Percent |%| may not have its normal meaning within a |.dtx| file.
+% \item Backtick |`| is made active by some \texpkg{babel} package options, such as |magyar|.
+% \item Catcodes for other symbolic/non-alphanumeric characters may (probably rarely) not have their normal definitions.
+% \end{itemize}
+% |\endlinechar| also requires special handling to avoid introducing unwanted spaces.
%
+% The |\begingroup...\endgroup| around |\minted@exec@styledef| and associated messages is necessary to prevent errors related to the message file. If a style does not exist, then the Python executable will create a |_<hash>.message.minted| file, which is brought in via |\InputIfFileExists| and generates an error message. After this, there is an attempt to load the default style. If the default style needs to be generated, then |\InputIfFileExists| will attempt to bring in a |_<hash>.message.minted| file regardless of whether it exists, unless it is wrapped in the |\begingroup...\endgroup|.
% \begin{macrocode}
-\ifwindows
- \def\minted@opt@quote#1{\detokenize{"#1"}}
-\else
- \def\minted@opt@quote#1{\detokenize{'#1'}}
-\fi
-\newcommand{\minted@pygmentize}[2][\minted@outputdir\minted@jobname.pyg]{%
- \minted@defstyle{\minted@get@opt{style}{default}}%
- \stepcounter{minted@pygmentizecounter}%
- \ifthenelse{\equal{\minted@get@opt{autogobble}{false}}{true}}%
- {\def\minted@codefile{\minted@outputdir\minted@jobname.pyg}}%
- {\def\minted@codefile{#1}}%
- \ifthenelse{\boolean{minted@isinline}}%
- {\def\minted@optlistcl@inlines{%
- \minted@optlistcl@g@i
- \csname minted@optlistcl@lang\minted@lang @i\endcsname}}%
- {\let\minted@optlistcl@inlines\@empty}%
- \def\minted@cmd{%
- \ifminted@kpsewhich
- \ifwindows
- \detokenize{for /f "usebackq tokens=*"}\space\@percentchar\detokenize{a in (`kpsewhich}\space\minted@codefile\detokenize{`) do}\space
- \fi
+\def\minted@catchfiledef#1#2{%
+ \CatchFileDef{#1}{#2}{\minted@standardcatcodes\endlinechar=-1}}
+\def\minted@defstyle@load#1{%
+ \minted@detectconfig
+ \ifbool{minted@cache}%
+ {\edef\minted@styledeffilename{#1\detokenize{.style.minted}}%
+ \edef\minted@styledeffilepath{\minted@cachepath\minted@styledeffilename}%
+ \IfFileExists{\minted@styledeffilepath}%
+ {\minted@defstyle@input{#1}}%
+ {\ifbool{minted@canexec}%
+ {\minted@defstyle@generate{#1}}%
+ {\minted@error{Missing definition for highlighting style "#1" (minted executable
+ is unavailable or disabled); attempting to substitute fallback style}%
+ \minted@defstyle@fallback{#1}}}}%
+ {\edef\minted@styledeffilename{%
+ \detokenize{_}\MintedJobnameMdfive\detokenize{.style.minted}}%
+ \let\minted@styledeffilepath\minted@styledeffilename
+ \ifbool{minted@canexec}%
+ {\minted@defstyle@generate{#1}}%
+ {\minted@error{Missing definition for highlighting style "#1" (minted executable
+ is unavailable or disabled); attempting to substitute fallback style}%
+ \minted@defstyle@fallback{#1}}}}
+\def\minted@defstyle@input#1{%
+ \begingroup
+ \minted@catchfiledef{\minted@tmp}{\minted@styledeffilepath}%
+ \minted@tmp
+ \ifcsname\minted@styleprefix\endcsname
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi
+ {\expandafter\global\expandafter\let\csname minted@styledef@#1\endcsname\minted@tmp
+ \endgroup
+ \ifbool{minted@cache}{\minted@addcachefilename{\minted@styledeffilename}}{}%
+ \csname minted@styledef@#1\endcsname
+ \minted@patch@PygmentsStyledef
+ \minted@VerbatimPygments}%
+ {\endgroup
+ \ifbool{minted@canexec}%
+ {\minted@warning{Invalid or corrupted style definition file
+ "\minted@styledeffilename"; attempting to regenerate}%
+ \minted@defstyle@generate{#1}}%
+ {\minted@error{Invalid or corrupted style definition file
+ "\minted@styledeffilename"; attempting to substitute fallback style
+ (minted executable is unavailable or disabled)}%
+ \minted@defstyle@fallback{#1}}}}
+\def\minted@defstyle@generate#1{%
+ \pydatasetfilename{\MintedDataFilename}%
+ \minted@fasthighlightmode@checkstart
+ \pydatawritedictopen
+ \pydatawritekeyvalue{command}{styledef}%
+ \pydatawritekeyedefvalue{jobname}{\jobname}%
+ \pydatawritekeyedefvalue{timestamp}{\minted@timestamp}%
+ \pydatawritekeyedefvalue{currentfilepath}{\CurrentFilePath}%
+ \pydatawritekeyedefvalue{currentfile}{\CurrentFile}%
+ \pydatawritekeyedefvalue{inputlineno}{\the\inputlineno}%
+ \pydatawritekeyedefvalue{cachepath}{\minted@cachepath}%
+ \pydatawritekeyedefvalue{styledeffilename}{\minted@styledeffilename}%
+ \pydatawritekeyvalue{style}{#1}%
+ \pydatawritekeyedefvalue{commandprefix}{\minted@styleprefix}%
+ \pydatawritedictclose
+ \ifbool{minted@fasthighlightmode}%
+ {\minted@defstyle@fallback{#1}}%
+ {\pydataclosefilename{\MintedDataFilename}%
+ \begingroup
+ \minted@exec@styledef
+ \ifx\minted@exec@warning\relax
+ \else
+ \expandafter\minted@exec@warning
\fi
- \MintedPygmentize\space -l \minted@opt@quote{#2}
- -f latex -P commandprefix=PYG -F tokenmerge
- \minted@optlistcl@g \csname minted@optlistcl@lang\minted@lang\endcsname
- \minted@optlistcl@inlines
- \minted@optlistcl@cmd -o \minted@outputdir\minted@infile\space
- \ifminted@kpsewhich
- \ifwindows
- \@percentchar\detokenize{a}%
- \else
- \detokenize{`}kpsewhich \minted@codefile\space
- \detokenize{||} \minted@codefile\detokenize{`}%
- \fi
+ \ifx\minted@exec@error\relax
+ \expandafter\minted@defstyle@generate@i
\else
- \minted@codefile
- \fi}%
- % For debugging, uncomment: %%%%
- % \immediate\typeout{\minted@cmd}%
- % %%%%
- \ifthenelse{\boolean{minted@cache}}%
- {%
- \ifminted@frozencache
- \else
- \ifthenelse{\equal{\minted@get@opt{autogobble}{false}}{true}}%
- {\edef\minted@hash{%
- \pdf@filemdfivesum{#1}%
- \pdf@mdfivesum{\minted@cmd\space%
- autogobble(\the\numexpr\FancyVerbStartNum\relax-%
- \the\numexpr\FancyVerbStopNum\relax)}}}%
- {\edef\minted@hash{%
- \pdf@filemdfivesum{#1}%
- \pdf@mdfivesum{\minted@cmd}}}%
- \edef\minted@infile{\minted@cachedir/\minted@hash.pygtex}%
- \IfFileExists{\minted@infile}{}{%
- \ifthenelse{\equal{\minted@get@opt{autogobble}{false}}{true}}{%
- \minted@autogobble{#1}}{}%
- \ShellEscape{\minted@cmd}}%
- \fi
- \ifthenelse{\boolean{minted@finalizecache}}%
- {%
- \edef\minted@cachefilename{listing\arabic{minted@pygmentizecounter}.pygtex}%
- \edef\minted@actualinfile{\minted@cachedir/\minted@cachefilename}%
- \ifwindows
- \StrSubstitute{\minted@infile}{/}{\@backslashchar}[\minted@infile@windows]
- \StrSubstitute{\minted@actualinfile}{/}{\@backslashchar}[\minted@actualinfile@windows]
- \ShellEscape{move /y \minted@outputdir\minted@infile@windows\space\minted@outputdir\minted@actualinfile@windows}%
- \else
- \ShellEscape{mv -f \minted@outputdir\minted@infile\space\minted@outputdir\minted@actualinfile}%
- \fi
- \let\minted@infile\minted@actualinfile
- \expandafter\minted@addcachefile\expandafter{\minted@cachefilename}%
- }%
- {\ifthenelse{\boolean{minted@frozencache}}%
- {%
- \edef\minted@cachefilename{listing\arabic{minted@pygmentizecounter}.pygtex}%
- \edef\minted@infile{\minted@cachedir/\minted@cachefilename}%
- \expandafter\minted@addcachefile\expandafter{\minted@cachefilename}}%
- {\expandafter\minted@addcachefile\expandafter{\minted@hash.pygtex}}%
- }%
- \minted@inputpyg}%
- {%
- \ifthenelse{\equal{\minted@get@opt{autogobble}{false}}{true}}{%
- \minted@autogobble{#1}}{}%
- \ShellEscape{\minted@cmd}%
- \minted@inputpyg}%
-}
+ \expandafter\minted@defstyle@generate@error
+ \fi
+ {#1}}}
+\def\minted@defstyle@generate@i#1{%
+ \endgroup
+ \begingroup
+ \minted@catchfiledef{\minted@tmp}{\minted@styledeffilepath}%
+ \minted@tmp
+ \ifcsname\minted@styleprefix\endcsname
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi
+ {\expandafter\global\expandafter\let\csname minted@styledef@#1\endcsname\minted@tmp
+ \endgroup
+ \ifbool{minted@cache}{\minted@addcachefilename{\minted@styledeffilename}}{}%
+ \csname minted@styledef@#1\endcsname
+ \minted@patch@PygmentsStyledef
+ \minted@VerbatimPygments}%
+ {\endgroup
+ \minted@error{Failed to create style definition file "\minted@styledeffilename"
+ (no error message, see "\MintedErrlogFilename" if it exists);
+ attempting to substitute fallback style}%
+ \minted@defstyle@fallback{#1}}}
+\def\minted@defstyle@generate@error#1{%
+ \minted@exec@error
+ \endgroup
+ \minted@defstyle@fallback{#1}}
+\def\minted@defstyle@fallback#1{%
+ \ifstrequal{#1}{default}%
+ {\expandafter\global\expandafter
+ \let\csname minted@styledef@default\endcsname\minted@styledeffallback}%
+ {\ifcsname minted@styledef@default\endcsname
+ \else
+ \minted@defstyle@load{default}%
+ \fi
+ \expandafter\let\expandafter\minted@tmp\csname minted@styledef@default\endcsname
+ \expandafter\global\expandafter\let\csname minted@styledef@#1\endcsname\minted@tmp}}
% \end{macrocode}
% \end{macro}
%
%
-% \begin{macro}{\minted@autogobble}
-% Remove common leading whitespace.
+% \begin{macro}{\minted@styledeffallback}
+% Basic style definition to make |.highlight.minted| cache files usable if no styles exist, not even the default style, and no styles can be generated.
% \begin{macrocode}
-\def\minted@autogobble#1{%
- \edef\minted@argone@esc{#1}%
- \StrSubstitute{\minted@argone@esc}{\@backslashchar}{\@backslashchar\@backslashchar}[\minted@argone@esc]%
- \StrSubstitute{\minted@argone@esc}{"}{\@backslashchar"}[\minted@argone@esc]%
- \edef\minted@tmpfname@esc{\minted@outputdir\minted@jobname}%
- \StrSubstitute{\minted@tmpfname@esc}{\@backslashchar}{\@backslashchar\@backslashchar}[\minted@tmpfname@esc]%
- \StrSubstitute{\minted@tmpfname@esc}{"}{\@backslashchar"}[\minted@tmpfname@esc]%
- %Need a version of open() that supports encoding under Python 2
- \minted@check@MintedPython
- \edef\minted@autogobblecmd{%
- \ifminted@kpsewhich
- \ifwindows
- \detokenize{for /f "usebackq tokens=*" }\@percentchar\detokenize{a in (`kpsewhich} #1\detokenize{`) do}\space
- \fi
- \fi
- \MintedPython\detokenize{ -c "import sys; import os;
- import textwrap;
- from io import open;
- fname = }%
- \ifminted@kpsewhich
- \detokenize{sys.argv[1];}\space
- \else
- \detokenize{os.path.expanduser(os.path.expandvars(\"}\minted@argone@esc\detokenize{\"));}\space
- \fi
- \detokenize{f = open(fname, \"r\", encoding=\"}\minted@encoding\detokenize{\") if os.path.isfile(fname) else None;
- t = f.readlines() if f is not None else None;
- t_opt = t if t is not None else [];
- f.close() if f is not None else None;
- tmpfname = os.path.expanduser(os.path.expandvars(\"}\minted@tmpfname@esc.pyg\detokenize{\"));
- f = open(tmpfname, \"w\", encoding=\"}\minted@encoding\detokenize{\") if t is not None else None;
- fvstartnum = }\the\numexpr\FancyVerbStartNum\detokenize{;
- fvstopnum = }\the\numexpr\FancyVerbStopNum\detokenize{;
- s = max(0, fvstartnum-1);
- e = max(s, fvstopnum) if fvstopnum > 0 else len(t_opt);
- [f.write(textwrap.dedent(\"\".join(x))) for x in (t_opt[0:s], t_opt[s:e], t_opt[e:]) if x and t is not None];
- f.close() if t is not None else os.remove(tmpfname);"}%
- \ifminted@kpsewhich
- \ifwindows
- \space\@percentchar\detokenize{a}%
- \else
- \space\detokenize{`}kpsewhich #1\space\detokenize{||} #1\detokenize{`}%
- \fi
- \fi
- }%
- \ShellEscape{\minted@autogobblecmd}%
-}
+\def\minted@styledeffallback{%
+ \expandafter\def\csname\minted@styleprefix\endcsname##1##2{##2}%
+ \expandafter\def\csname\minted@styleprefix Zbs\endcsname{\char`\\}%
+ \expandafter\def\csname\minted@styleprefix Zus\endcsname{\char`\_}%
+ \expandafter\def\csname\minted@styleprefix Zob\endcsname{\char`\{}%
+ \expandafter\def\csname\minted@styleprefix Zcb\endcsname{\char`\}}%
+ \expandafter\def\csname\minted@styleprefix Zca\endcsname{\char`\^}%
+ \expandafter\def\csname\minted@styleprefix Zam\endcsname{\char`\&}%
+ \expandafter\def\csname\minted@styleprefix Zlt\endcsname{\char`\<}%
+ \expandafter\def\csname\minted@styleprefix Zgt\endcsname{\char`\>}%
+ \expandafter\def\csname\minted@styleprefix Zsh\endcsname{\char`\#}%
+ \expandafter\def\csname\minted@styleprefix Zpc\endcsname{\char`\%}%
+ \expandafter\def\csname\minted@styleprefix Zdl\endcsname{\char`\$}%
+ \expandafter\def\csname\minted@styleprefix Zhy\endcsname{\char`\-}%
+ \expandafter\def\csname\minted@styleprefix Zsq\endcsname{\char`\'}%
+ \expandafter\def\csname\minted@styleprefix Zdq\endcsname{\char`\"}%
+ \expandafter\def\csname\minted@styleprefix Zti\endcsname{\char`\~}%
+ \minted@patch@PygmentsStyledef
+ \minted@VerbatimPygments}
% \end{macrocode}
% \end{macro}
%
%
-% \begin{macro}{\minted@inputpyg}
-% For increased clarity, the actual |\input| process is separated out into its own macro.
%
-% At the last possible moment, |\PYG| is |\let| to |\PYG|\meta{style} and redefined to used appropriate line breaking via |\VerbatimPygments| from \texpkg{fvextra}.
+% \subsubsection{Lexer-specific line numbering}
+%
%
-% The |bgcolor| option needs to be dealt with in different ways depending on whether we are using |\mintinline|. It is simplest to apply this option here, so that the macro redefinitions may be local and thus do not need to be manually reset later.
+% \begin{macro}{minted@FancyVerbLineTemp}
+% Temporary counter for storing and then restoring the value of |FancyVerbLine|. When using the |lexerlinenos| option, we need to store the current value of |FancyVerbLine|, then set |FancyVerbLine| to the current value of a lexer-specific counter, and finally restore |FancyVerbLine| to its initial value after the current chunk of code has been typeset.
% \begin{macrocode}
-\newcommand{\minted@inputpyg}{%
- \VerbatimPygments{\PYG}{\PYG}%
- \ifthenelse{\boolean{minted@isinline}}%
- {\ifthenelse{\equal{\minted@get@opt{breaklines}{false}}{true}}%
- {\let\FV@BeginVBox\relax
- \let\FV@EndVBox\relax
- \def\FV@BProcessLine##1{\FancyVerbFormatLine{##1}}%
- \minted@inputpyg@inline}%
- {\minted@inputpyg@inline}}%
- {\minted@inputpyg@block}%
-}
-\def\minted@inputpyg@inline{%
- \ifthenelse{\equal{\minted@get@opt{bgcolor}{}}{}}%
- {\minted@input{\minted@outputdir\minted@infile}}%
- {\colorbox{\minted@get@opt{bgcolor}{}}{%
- \minted@input{\minted@outputdir\minted@infile}}}%
-}
-\def\minted@inputpyg@block{%
- \ifthenelse{\equal{\minted@get@opt{bgcolor}{}}{}}%
- {\minted@input{\minted@outputdir\minted@infile}}%
- {\begin{minted@colorbg}{\minted@get@opt{bgcolor}{}}%
- \minted@input{\minted@outputdir\minted@infile}%
- \end{minted@colorbg}}}
+\newcounter{minted@FancyVerbLineTemp}
% \end{macrocode}
% \end{macro}
%
-%
-% We need a way to have line counters on a per-language basis.
-%
-% \begin{macro}{\minted@langlinenoson}
+% \begin{macro}{\minted@lexerlinenoson,\minted@lexerlinenosoff,\minted@inputlexerlinenoson,\minted@inputlexerlinenosoff}
+% Line counters on a per-lexer basis for |minted| and |\mintinline|; line counters on a per-lexer basis for |\inputminted|.
% \begin{macrocode}
-\newcommand{\minted@langlinenoson}{%
- \ifcsname c@minted@lang\minted@lang\endcsname\else
- \newcounter{minted@lang\minted@lang}%
+\def\minted@lexerlinenoson{%
+ \ifcsname c@minted@lexer\minted@lexer\endcsname
+ \else
+ \newcounter{minted@lexer\minted@lexer}%
\fi
\setcounter{minted@FancyVerbLineTemp}{\value{FancyVerbLine}}%
- \setcounter{FancyVerbLine}{\value{minted@lang\minted@lang}}%
-}
+ \setcounter{FancyVerbLine}{\value{minted@lexer\minted@lexer}}}
+\def\minted@lexerlinenosoff{%
+ \setcounter{minted@lexer\minted@lexer}{\value{FancyVerbLine}}%
+ \setcounter{FancyVerbLine}{\value{minted@FancyVerbLineTemp}}}
+\ifbool{minted@inputlexerlinenos}%
+ {\let\minted@inputlexerlinenoson\minted@lexerlinenoson
+ \let\minted@inputlexerlinenosoff\minted@lexerlinenosoff}%
+ {\let\minted@inputlexerlinenoson\relax
+ \let\minted@inputlexerlinenosoff\relax
+ \ifbool{minted@lexerlinenos}
+ {}%
+ {\let\minted@lexerlinenoson\relax
+ \let\minted@lexerlinenosoff\relax}}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\minted@langlinenosoff}
%
+% \begin{macro}{\minted@codewrapper}
+% Wrapper around typeset code. |\minted@inputfilepath| will exist when the code is brought in from an external file.
% \begin{macrocode}
-\newcommand{\minted@langlinenosoff}{%
- \setcounter{minted@lang\minted@lang}{\value{FancyVerbLine}}%
- \setcounter{FancyVerbLine}{\value{minted@FancyVerbLineTemp}}%
-}
+\def\minted@codewrapper#1{%
+ \ifcsname minted@inputfilepath\endcsname
+ \minted@inputlexerlinenoson
+ \else
+ \minted@lexerlinenoson
+ \fi
+ #1%
+ \ifcsname minted@inputfilepath\endcsname
+ \minted@inputlexerlinenosoff
+ \else
+ \minted@lexerlinenosoff
+ \fi}
% \end{macrocode}
% \end{macro}
%
%
-% Disable the language-specific settings if the package option isn't used.
-% \begin{macrocode}
-\ifbool{minted@langlinenos}{}{%
- \ifbool{minted@inputlanglinenos}{}{%
- \let\minted@langlinenoson\relax
- \let\minted@langlinenosoff\relax
- }
-}
-% \end{macrocode}
%
-% \begin{macro}{\minted@inputlanglinenoson}
-% \begin{macro}{\minted@inputlanglinenosoff}
-% Language-specific settings that apply to |\inputminted| in addition to |minted| and |\mintinline|.
+% \subsubsection{Highlighting code}
+%
+%
+% \begin{macro}{\minted@highlight,\minted@highlightinputfile}
+% Highlight code previously stored in buffer |minted@tmpdatabuffer|, or code in an external file.
+%
+% |\minted@defstyle| will invoke |\minted@detectconfig| the first time a style is loaded, so no separate |\minted@detectconfig| is needed.
+%
+% The default |\minted@highlight@fallback| inserts a placeholder. Typically commands/environments will redefine the fallback locally to inserted a verbatim approximation of code that could not be highlighted.
+%
+% Python-related options are buffered/written under a |pyopt| namespace. This prevents the possibility of naming collisions between options and other data that must be passed to Python.
+%
+% Some data such as |jobname|, |timestamp|, and |cachepath| should be written to file, but not used in hashing because otherwise it would unnecessarily make the cache files dependent on irrelevant data.
% \begin{macrocode}
-\ifbool{minted@inputlanglinenos}%
- {\def\minted@inputlanglinenoson{\minted@langlinenoson}%
- \def\minted@inputlanglinenosoff{\minted@langlinenosoff}}%
- {\let\minted@inputlanglinenoson\relax
- \let\minted@inputlanglinenosoff\relax}
+\def\minted@debug@input{%
+ \ifbool{minted@debug}%
+ {\immediate\typeout{%
+ minted debug: \string\input\space at
+ \ifx\CurrentFile\@empty\else\CurrentFile\space\fi line \the\inputlineno}}%
+ {}}
+\def\minted@highlight{%
+ \minted@defstyle
+ \pydatasetbuffername{minted@tmpdatabuffer}%
+ \pydatabufferkeyvalue{command}{highlight}%
+ \pydatabufferkey{code}%
+ \pydatabuffermlvaluestart
+ \setcounter{minted@tmpcnt}{1}%
+ \loop\unless\ifnum\value{minted@tmpcnt}>\value{minted@tmpcodebufferlength}\relax
+ \expandafter\let\expandafter
+ \minted@tmp\csname minted@tmpcodebufferline\arabic{minted@tmpcnt}\endcsname
+ \expandafter\pydatabuffermlvalueline\expandafter{\minted@tmp}%
+ \stepcounter{minted@tmpcnt}%
+ \repeat
+ \pydatabuffermlvalueend
+ \minted@highlight@i}
+\def\minted@highlightinputfile{%
+ \minted@defstyle
+ \edef\minted@inputfilemdfivesum{\pdf@filemdfivesum{\minted@inputfilepath}}%
+ \ifx\minted@inputfilemdfivesum\@empty
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi
+ {\minted@error{Cannot find input file "\minted@inputfilepath"; inserting placeholder}%
+ \minted@insertplaceholder}%
+ {\pydatasetbuffername{minted@tmpdatabuffer}%
+ \pydatabufferkeyvalue{command}{highlight}%
+ \pydatabufferkeyedefvalue{inputfilepath}{\minted@inputfilepath}%
+ \pydatabufferkeyedefvalue{inputfilemdfivesum}{\minted@inputfilemdfivesum}%
+ \minted@highlight@i}}
+\def\minted@def@FV@GetKeyValues@standardcatcodes{%
+ \let\minted@FV@GetKeyValues@orig\FV@GetKeyValues
+ \def\FV@GetKeyValues##1{%
+ \begingroup
+ \minted@standardcatcodes
+ \minted@FV@GetKeyValues@i{##1}}%
+ \def\minted@FV@GetKeyValues@i##1[##2]{%
+ \endgroup
+ \let\FV@GetKeyValues\minted@FV@GetKeyValues@orig
+ \let\minted@FV@GetKeyValues@i\minted@undefined
+ \FV@GetKeyValues{##1}[##2]}}
+\def\minted@highlight@i{%
+ \pydatabufferkeyedefvalue{pyopt.lexer}{\minted@lexer}%
+ \pydatabufferkeyedefvalue{pyopt.commandprefix}{\minted@styleprefix}%
+ \minted@forcsvlist{\minted@highlight@bufferpykeys}{\minted@optkeyslist@py}%
+ \ifbool{minted@cache}%
+ {\edef\minted@highlightfilename{\pydatabuffermdfivesum\detokenize{.highlight.minted}}%
+ \edef\minted@highlightfilepath{\minted@cachepath\minted@highlightfilename}%
+ \IfFileExists{\minted@highlightfilepath}%
+ {\minted@codewrapper{%
+ \minted@def@FV@GetKeyValues@standardcatcodes
+ \minted@debug@input
+ \input{\minted@highlightfilepath}}%
+ \minted@addcachefilename{\minted@highlightfilename}}%
+ {\ifbool{minted@canexec}%
+ {\minted@highlight@create}%
+ {\minted@error{Cannot highlight code (minted executable is unavailable or
+ disabled); attempting to typeset without highlighting}%
+ \minted@highlight@fallback}}}%
+ {\edef\minted@highlightfilename{%
+ \detokenize{_}\MintedJobnameMdfive\detokenize{.highlight.minted}}%
+ \let\minted@highlightfilepath\minted@highlightfilename
+ \ifbool{minted@canexec}%
+ {\minted@highlight@create}%
+ {\minted@error{Cannot highlight code (minted executable is unavailable or
+ disabled); attempting to typeset without highlighting}%
+ \minted@highlight@fallback}}%
+ \pydataclearbuffername{minted@tmpdatabuffer}}
+\def\minted@highlight@bufferpykeys#1{%
+ \edef\minted@tmp{\mintedpyoptvalueof{#1}}%
+ \ifx\minted@tmp\minted@const@pgfkeysnovalue
+ \else
+ \pydatabufferkeyedefvalue{pyopt.#1}{\minted@tmp}%
+ \fi}
+\def\minted@highlight@create{%
+ \pydatasetfilename{\MintedDataFilename}%
+ \minted@fasthighlightmode@checkstart
+ \pydatawritedictopen
+ \pydatawritebuffer
+ \pydatawritekeyedefvalue{jobname}{\jobname}%
+ \pydatawritekeyedefvalue{timestamp}{\minted@timestamp}%
+ \pydatawritekeyedefvalue{currentfilepath}{\CurrentFilePath}%
+ \pydatawritekeyedefvalue{currentfile}{\CurrentFile}%
+ \pydatawritekeyedefvalue{inputlineno}{\the\inputlineno}%
+ \pydatawritekeyedefvalue{cachepath}{\minted@cachepath}%
+ \pydatawritekeyedefvalue{highlightfilename}{\minted@highlightfilename}%
+ \pydatawritedictclose
+ \ifbool{minted@fasthighlightmode}%
+ {\minted@insertplaceholder}%
+ {\pydataclosefilename{\MintedDataFilename}%
+ \begingroup
+ \minted@exec@highlight
+ \IfFileExists{\minted@highlightfilepath}%
+ {\ifx\minted@exec@warning\relax
+ \else
+ \expandafter\minted@exec@warning
+ \fi
+ \ifx\minted@exec@error\relax
+ \else
+ \expandafter\minted@exec@error
+ \fi
+ \endgroup
+ \minted@codewrapper{%
+ \minted@def@FV@GetKeyValues@standardcatcodes
+ \minted@debug@input
+ \input{\minted@highlightfilepath}}%
+ \ifbool{minted@cache}{\minted@addcachefilename{\minted@highlightfilename}}{}}%
+ {\ifx\minted@exec@warning\relax
+ \else
+ \expandafter\minted@exec@warning
+ \fi
+ \ifx\minted@exec@error\relax
+ \minted@error{Minted executable failed during syntax highlighting
+ but returned no error message (see if "\MintedErrlogFilename" exists)}%
+ \else
+ \expandafter\minted@exec@error
+ \fi
+ \endgroup
+ \minted@highlight@fallback}}}
+\def\minted@highlight@fallback{%
+ \minted@insertplaceholder}
% \end{macrocode}
% \end{macro}
-% \end{macro}
%
%
%
% \subsection{Public API}
%
+%
% \begin{macro}{\setminted}
-% Set global or language-level options.
+% Set global or lexer-level options.
% \begin{macrocode}
\newcommand{\setminted}[2][]{%
- \ifthenelse{\equal{#1}{}}%
- {\setkeys{minted@opt@g}{#2}}%
- {\minted@configlang{#1}%
- \setkeys{minted@opt@lang}{#2}}}
+ \ifstrempty{#1}%
+ {\pgfkeys{/minted/global/.cd,#2}}%
+ {\let\minted@tmplexer\minted@lexer
+ \edef\minted@lexer{#1}%
+ \pgfkeys{/minted/lexer/.cd,#2}%
+ \let\minted@lexer\minted@tmplexer}}
% \end{macrocode}
% \end{macro}
%
+%
% \begin{macro}{\setmintedinline}
-% Set global or language-level options, but only for inline (|\mintinline|) content. These settings will override the corresponding |\setminted| settings.
+% Set global or lexer-level options, but only for inline (|\mintinline|) content. These settings will override the corresponding |\setminted| settings.
% \begin{macrocode}
\newcommand{\setmintedinline}[2][]{%
- \ifthenelse{\equal{#1}{}}%
- {\setkeys{minted@opt@g@i}{#2}}%
- {\minted@configlang{#1}%
- \setkeys{minted@opt@lang@i}{#2}}}
+ \ifstrempty{#1}%
+ {\pgfkeys{/minted/globalinline/.cd,#2}}%
+ {\let\minted@tmplexer\minted@lexer
+ \edef\minted@lexer{#1}%
+ \pgfkeys{/minted/lexerinline/.cd,#2}%
+ \let\minted@lexer\minted@tmplexer}}
% \end{macrocode}
% \end{macro}
%
-% Now that the settings macros exist, we go ahead and create any needed defaults.
-%
-% PHP should use |startinline| for |\mintinline|. Visible tabs should have a specified color so that they don't change colors when used to indent multiline strings or comments. Leading/trailing empty lines should be preserved by default.
-% \begin{macrocode}
-\setmintedinline[php]{startinline=true}
-\setminted{tabcolor=black}
-\setminted{stripnl=false}
-% \end{macrocode}
%
% \begin{macro}{\usemintedstyle}
-%
-% Set style. This is a holdover from version 1, since |\setminted| can now accomplish this, and a hierarchy of style settings are now possible.
+% Set style. This is a holdover from \mintedpkg\ v1, before |\setminted| could be used to set the style.
% \begin{macrocode}
\newcommand{\usemintedstyle}[2][]{\setminted[#1]{style=#2}}
% \end{macrocode}
% \end{macro}
%
%
-% \begin{macro}{\minted@defwhitespace@retok}
-% The |\mint| and |\mintinline| commands need to be able to retokenize the code they collect, particularly in |draft| mode. Retokenizeation involves expansion combined with |\scantokens|, with active space and tab characters. The active characters need to expand to the appropriate \texpkg{fancyvrb} macros, but the macros themselves should not be expanded. We need a macro that will accomplish the appropriate definitions.
-% \begin{macrocode}
-\begingroup
-\catcode`\ =\active
-\catcode`\^^I=\active
-\gdef\minted@defwhitespace@retok{\def {\noexpand\FV@Space}\def^^I{\noexpand\FV@Tab}}%
-\endgroup
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\minted@writecmdcode}
-% The |\mintinline| and |\mint| commands will need to write the code they capture to a temporary file for highlighting. It will be convenient to be able to accomplish this via a simple macro, since that makes it simpler to deal with any expansion of what is to be written. This isn't needed for the |minted| environment, because the (patched) |VerbatimOut| is used.
-% \begin{macrocode}
-\newcommand{\minted@writecmdcode}[1]{%
- \immediate\openout\minted@code\minted@jobname.pyg\relax
- \immediate\write\minted@code{\detokenize{#1}}%
- \immediate\closeout\minted@code}
-% \end{macrocode}
-% \end{macro}
-%
-%
% \begin{macro}{\mintinline}
% Define an inline command. This is modeled after the reimplemented |\Verb| from \texpkg{fvextra}. See the \texpkg{fvextra} documentation for details about expansion handling, argument reading, and (re)tokenization.
%
-% Pygments emits code wrapped in a |Verbatim| environment. Getting the inline command to work correctly requires redefining |Verbatim| to be \texpkg{fvextra}'s |VerbEnv| temporarily.
-%
% Everything needs to be within a |\begingroup...\endgroup| to prevent settings from escaping.
%
-% In the case of |draft| mode, \texpkg{fvextra}'s |\Verb| is used directly.
+% |\RobustMintInlineProcess@verbatim| doesn't need an explicit |\FVExtraRetokenizeVArg| step because this is done when the code is inserted into |\Verb|.
% \begin{macrocode}
\def\mintinline{%
\FVExtraRobustCommand\RobustMintInline\FVExtraUnexpandedReadStarOArgMArgBVArg}
@@ -3372,37 +3791,56 @@
\ifbool{FVExtraRobustCommandExpanded}%
{\@ifnextchar\bgroup
{\FVExtraReadVArg{\RobustMintInlineProcess{#1}{#2}}}%
- {\PackageError{minted}%
- {Inline delimiters must be paired curly braces in this context}%
- {Use curly braces as delimiters}}}%
+ {\minted@error{Inline delimiters must be paired curly braces in this context}}}%
{\FVExtraReadVArg{\RobustMintInlineProcess{#1}{#2}}}}
-\def\RobustMintInlineProcess#1#2#3{%
+\def\RobustMintInlineProcess@highlight#1#2#3{%
\begingroup
- \setboolean{minted@isinline}{true}%
- \minted@configlang{#2}%
- \setkeys{minted@opt@cmd}{#1}%
- \minted@fvset
- \RobustMintInlineProcess@i{#3}}
-\ifthenelse{\boolean{minted@draft}}%
- {\def\RobustMintInlineProcess@i#1{%
- \fvset{extra=true}%
- \Verb{#1}%
- \endgroup}}%
- {\def\RobustMintInlineProcess@i#1{%
- \FVExtraDetokenizeVArg{%
- \FVExtraRetokenizeVArg{\RobustMintInlineProcess@ii}{\FV@CatCodes}}{#1}}
- \def\RobustMintInlineProcess@ii#1{%
- \minted@writecmdcode{#1}%
- \let\Verbatim\VerbEnv
- \let\endVerbatim\endVerbEnv
- \expandafter\minted@pygmentize\expandafter{\minted@lang}%
- \endgroup}}
+ \booltrue{minted@isinline}%
+ \ifstrempty{#1}{}{\pgfkeys{/minted/cmd/.cd,#1}}%
+ \edef\minted@lexer{#2}%
+ \minted@usefvopts
+ \minted@usetexoptsnonpygments
+ \FVExtraDetokenizeVArg{%
+ \FVExtraRetokenizeVArg{\RobustMintInlineProcess@highlight@i}{\FV@CatCodes}}{#3}}
+\def\RobustMintInlineProcess@highlight@i#1{%
+ \expandafter\def\csname minted@tmpcodebufferline1\endcsname{#1}%
+ \setcounter{minted@tmpcodebufferlength}{1}%
+ \let\minted@highlight@fallback\RobustMintInlineProcess@highlight@fallback
+ \minted@highlight
+ \setcounter{minted@tmpcodebufferlength}{0}%
+ \endgroup}
+\def\RobustMintInlineProcess@highlight@fallback{%
+ \minted@useadditionalfvoptsnopy
+ \fvset{extra=true}%
+ \minted@codewrapper{%
+ \expandafter\let\expandafter\minted@tmp\csname minted@tmpcodebufferline1\endcsname
+ \expandafter\Verb\expandafter{\minted@tmp}}}
+\def\RobustMintInlineProcess@placeholder#1#2#3{%
+ \begingroup
+ \booltrue{minted@isinline}%
+ \minted@insertplaceholder
+ \endgroup}
+\def\RobustMintInlineProcess@verbatim#1#2#3{%
+ \begingroup
+ \booltrue{minted@isinline}%
+ \ifstrempty{#1}{}{\pgfkeys{/minted/cmd/.cd,#1}}%
+ \edef\minted@lexer{#2}%
+ \minted@usefvopts
+ \minted@useadditionalfvoptsnopy
+ \minted@usetexoptsnonpygments
+ \fvset{extra=true}%
+ \minted@codewrapper{\Verb{#3}}%
+ \endgroup}
+\ifbool{minted@placeholder}%
+ {\let\RobustMintInlineProcess\RobustMintInlineProcess@placeholder}%
+ {\ifbool{minted@verbatim}%
+ {\let\RobustMintInlineProcess\RobustMintInlineProcess@verbatim}%
+ {\let\RobustMintInlineProcess\RobustMintInlineProcess@highlight}}
% \end{macrocode}
% \end{macro}
%
%
% \begin{macro}{\mint}
-%
% Highlight a single line of code. This is essentially a shortcut for the \env{minted} environment when there is only a single line of code. The implementation follows \cmd{\mintinline} for argument reading and processing, but then typesets the code as an environment rather than command. The \cmd{\@doendpe} ensures proper paragraph indentation for following text (immediately following text with no intervening blank lines does not begin a new paragraph).
% \begin{macrocode}
\def\mint{%
@@ -3413,161 +3851,202 @@
\ifbool{FVExtraRobustCommandExpanded}%
{\@ifnextchar\bgroup
{\FVExtraReadVArg{\RobustMintProcess{#1}{#2}}}%
- {\PackageError{minted}%
- {Delimiters must be paired curly braces in this context}%
- {Use curly braces as delimiters}}}%
+ {\minted@error{Delimiters must be paired curly braces in this context}}}%
{\FVExtraReadVArg{\RobustMintProcess{#1}{#2}}}}
-\def\RobustMintProcess#1#2#3{%
+\def\RobustMintProcess@highlight#1#2#3{%
\begingroup
- \minted@configlang{#2}%
- \setkeys{minted@opt@cmd}{#1}%
- \minted@fvset
- \RobustMintProcess@i{#3}}
-\begingroup
-\catcode`\^^M=\active%
-\catcode`\<=1%
-\catcode`\>=2%
-\catcode`\{=12%
-\catcode`\}=12%
-\catcode`\!=0%
-\catcode`\\=12%
-!ifthenelse<!boolean<minted@draft>>%
- <!gdef!RobustMintProcess@i#1<%
- !FVExtraDetokenizeVArg<%
- !FVExtraRetokenizeVArg<!RobustMintProcess@ii><!FV@CatCodes>><#1>>%
- !gdef!RobustMintProcess@ii#1<%
- !minted@langlinenoson%
- !scantokens<%
- \begin{Verbatim}
- #1
- \end{Verbatim}
- !noexpand>%
- !minted@langlinenosoff%
- !endgroup!@doendpe>>%
- <!gdef!RobustMintProcess@i#1<%
- !FVExtraDetokenizeVArg<%
- !FVExtraRetokenizeVArg<!RobustMintProcess@ii><!FV@CatCodes>><#1>>%
- !gdef!RobustMintProcess@ii#1<%
- !minted@writecmdcode<#1>%
- !minted@langlinenoson%
- !expandafter!minted@pygmentize!expandafter<!minted@lang>%
- !minted@langlinenosoff%
- !endgroup!@doendpe>>%
-!endgroup
+ \ifstrempty{#1}{}{\pgfkeys{/minted/cmd/.cd,#1}}%
+ \edef\minted@lexer{#2}%
+ \minted@usefvopts
+ \minted@usetexoptsnonpygments
+ \FVExtraDetokenizeVArg{%
+ \FVExtraRetokenizeVArg{\RobustMintProcess@highlight@i}{\FV@CatCodes}}{#3}}
+\def\RobustMintProcess@highlight@i#1{%
+ \expandafter\def\csname minted@tmpcodebufferline1\endcsname{#1}%
+ \setcounter{minted@tmpcodebufferlength}{1}%
+ \let\minted@highlight@fallback\RobustMintProcess@highlight@fallback
+ \minted@highlight
+ \setcounter{minted@tmpcodebufferlength}{0}%
+ \endgroup}
+\def\RobustMintProcess@highlight@fallback{%
+ \minted@useadditionalfvoptsnopy
+ \minted@codewrapper{%
+ \VerbatimInsertBuffer[buffername=minted@tmpcodebuffer,insertenvname=\minted@envname]}}
+\def\RobustMintProcess@placeholder#1#2#3{%
+ \minted@insertplaceholder}
+\def\RobustMintProcess@verbatim#1#2#3{%
+ \begingroup
+ \ifstrempty{#1}{}{\pgfkeys{/minted/cmd/.cd,#1}}%
+ \edef\minted@lexer{#2}%
+ \minted@usefvopts
+ \minted@useadditionalfvoptsnopy
+ \minted@usetexoptsnonpygments
+ \FVExtraDetokenizeVArg{%
+ \FVExtraRetokenizeVArg{\RobustMintProcess@verbatim@i}{\FV@CatCodes}}{#3}}
+\def\RobustMintProcess@verbatim@i#1{%
+ \expandafter\def\csname minted@tmpcodebufferline1\endcsname{#1}%
+ \setcounter{minted@tmpcodebufferlength}{1}%
+ \minted@codewrapper{%
+ \VerbatimInsertBuffer[buffername=minted@tmpcodebuffer,insertenvname=\minted@envname]}%
+ \setcounter{minted@tmpcodebufferlength}{0}%
+ \endgroup}
+\ifbool{minted@placeholder}%
+ {\let\RobustMintProcess\RobustMintProcess@placeholder}%
+ {\ifbool{minted@verbatim}%
+ {\let\RobustMintProcess\RobustMintProcess@verbatim}%
+ {\let\RobustMintProcess\RobustMintProcess@highlight}}
% \end{macrocode}
% \end{macro}
%
%
% \begin{environment}{minted}
-%
% Highlight a longer piece of code inside a verbatim environment.
% \begin{macrocode}
-\ifthenelse{\boolean{minted@draft}}%
- {\newenvironment{minted}[2][]
- {\VerbatimEnvironment
- \minted@configlang{#2}%
- \setkeys{minted@opt@cmd}{#1}%
- \minted@fvset
- \minted@langlinenoson
- \begin{Verbatim}}%
- {\end{Verbatim}%
- \minted@langlinenosoff}}%
- {\newenvironment{minted}[2][]
- {\VerbatimEnvironment
- \let\FVB@VerbatimOut\minted@FVB@VerbatimOut
- \let\FVE@VerbatimOut\minted@FVE@VerbatimOut
- \minted@configlang{#2}%
- \setkeys{minted@opt@cmd}{#1}%
- \minted@fvset
- \begin{VerbatimOut}[codes={\catcode`\^^I=12},firstline,lastline]{\minted@jobname.pyg}}%
- {\end{VerbatimOut}%
- \minted@langlinenoson
- \expandafter\minted@pygmentize\expandafter{\minted@lang}%
- \minted@langlinenosoff}}
+\newenvironment{minted}[2][]%
+ {\VerbatimEnvironment
+ \MintedBegin{#1}{#2}}%
+ {\MintedEnd}
+\def\MintedBegin@highlight#1#2{%
+ \ifstrempty{#1}{}{\pgfkeys{/minted/cmd/.cd,#1}}%
+ \edef\minted@lexer{#2}%
+ \minted@usefvopts
+ \minted@usetexoptsnonpygments
+ \begin{VerbatimBuffer}[buffername=minted@tmpcodebuffer,globalbuffer=true]}
+\def\MintedEnd@highlight{%
+ \end{VerbatimBuffer}%
+ \let\minted@highlight@fallback\MintedEnv@highlight@fallback
+ \minted@highlight
+ \VerbatimClearBuffer[buffername=minted@tmpcodebuffer]}
+\def\MintedEnv@highlight@fallback{%
+ \minted@useadditionalfvoptsnopy
+ \minted@codewrapper{%
+ \VerbatimInsertBuffer[buffername=minted@tmpcodebuffer,insertenvname=\minted@envname]}}
+\def\MintedBegin@placeholder#1#2{%
+ \begin{VerbatimBuffer}[buffername=minted@tmpcodebuffer]}
+\def\MintedEnd@placeholder{%
+ \end{VerbatimBuffer}%
+ \minted@insertplaceholder}
+\def\MintedBegin@verbatim#1#2{%
+ \ifstrempty{#1}{}{\pgfkeys{/minted/cmd/.cd,#1}}%
+ \edef\minted@lexer{#2}%
+ \minted@usefvopts
+ \minted@useadditionalfvoptsnopy
+ \minted@usetexoptsnonpygments
+ \begin{\minted@envname}}
+\def\MintedEnd@verbatim{%
+ \end{\minted@envname}}
+\ifbool{minted@placeholder}%
+ {\let\MintedBegin\MintedBegin@placeholder
+ \let\MintedEnd\MintedEnd@placeholder}%
+ {\ifbool{minted@verbatim}%
+ {\let\MintedBegin\MintedBegin@verbatim
+ \let\MintedEnd\MintedEnd@verbatim}%
+ {\let\MintedBegin\MintedBegin@highlight
+ \let\MintedEnd\MintedEnd@highlight}}
% \end{macrocode}
% \end{environment}
%
-% \begin{macro}{\inputminted}
%
+% \begin{macro}{\inputminted}
% Highlight an external source file.
% \begin{macrocode}
-\ifthenelse{\boolean{minted@draft}}%
- {\newcommand{\inputminted}[3][]{%
- \begingroup
- \minted@configlang{#2}%
- \setkeys{minted@opt@cmd}{#1}%
- \minted@fvset
- \minted@inputlanglinenoson
- \VerbatimInput{#3}%
- \minted@inputlanglinenosoff
- \endgroup}}%
- {\newcommand{\inputminted}[3][]{%
- \begingroup
- \minted@configlang{#2}%
- \setkeys{minted@opt@cmd}{#1}%
- \minted@fvset
- \minted@inputlanglinenoson
- \minted@pygmentize[#3]{#2}%
- \minted@inputlanglinenosoff
- \endgroup}}
+\def\minted@readinputmintedargs#1#{%
+ \minted@readinputmintedargs@i{#1}}
+\def\minted@readinputmintedargs@i#1#2#3{%
+ \FVExtraAlwaysUnexpanded{\minted@readinputmintedargs#1{#2}{#3}}}
+\FVExtrapdfstringdefDisableCommands{%
+ \makeatletter
+ \def\minted@readinputmintedargs@i#1#2#3{%
+ \detokenize{<input from file "}#3\detokenize{">}}%
+ \makeatother}
+\def\inputminted{%
+ \FVExtraRobustCommand\RobustInputMinted\minted@readinputmintedargs}
+\FVExtrapdfstringdefDisableCommands{%
+ \def\RobustInputMinted{}}
+\newrobustcmd{\RobustInputMinted}[3][]{%
+ \RobustInputMintedProcess{#1}{#2}{#3}}
+\def\RobustInputMintedProcess@highlight#1#2#3{%
+ \begingroup
+ \ifstrempty{#1}{}{\pgfkeys{/minted/cmd/.cd,#1}}%
+ \edef\minted@lexer{#2}%
+ \edef\minted@inputfilepath{#3}%
+ \minted@usefvopts
+ \minted@usetexoptsnonpygments
+ \let\minted@highlight@fallback\RobustInputMintedProcess@highlight@fallback
+ \minted@highlightinputfile
+ \endgroup}
+\def\RobustInputMintedProcess@highlight@fallback{%
+ \minted@useadditionalfvoptsnopy
+ \minted@codewrapper{%
+ \csname\minted@envname Input\endcsname{\minted@inputfilepath}}}
+\def\RobustInputMintedProcess@placeholder#1#2#3{%
+ \minted@insertplaceholder}
+\def\RobustInputMintedProcess@verbatim#1#2#3{%
+ \begingroup
+ \ifstrempty{#1}{}{\pgfkeys{/minted/cmd/.cd,#1}}%
+ \edef\minted@lexer{#2}%
+ \edef\minted@inputfilepath{#3}%
+ \minted@usefvopts
+ \minted@useadditionalfvoptsnopy
+ \minted@usetexoptsnonpygments
+ \minted@codewrapper{%
+ \csname\minted@envname Input\endcsname{\minted@inputfilepath}}%
+ \endgroup}
+\ifbool{minted@placeholder}%
+ {\let\RobustInputMintedProcess\RobustInputMintedProcess@placeholder}%
+ {\ifbool{minted@verbatim}%
+ {\let\RobustInputMintedProcess\RobustInputMintedProcess@verbatim}%
+ {\let\RobustInputMintedProcess\RobustInputMintedProcess@highlight}}
% \end{macrocode}
% \end{macro}
%
%
+%
% \subsection{Command shortcuts}
%
-% We allow the user to define shortcuts for the highlighting commands.
+% Allow the user to define shortcuts for the highlighting commands.
%
% \begin{macro}{\newminted}
-%
% Define a new language-specific alias for the |minted| environment.
%
-% \begin{macrocode}
-\newcommand{\newminted}[3][]{
-% \end{macrocode}
-%
-% First, we look whether a custom environment name was given as the first
-% optional argument.
-% If that's not the case, construct it from the language name (append ``|code|'').
-%
-% \begin{macrocode}
- \ifthenelse{\equal{#1}{}}
- {\def\minted@envname{#2code}}
- {\def\minted@envname{#1}}
-% \end{macrocode}
-%
-% Now, we define two environments.
-% The first takes no further arguments.
-% The second, starred version, takes an extra argument that specifies option
-% overrides.
+% The starred |*| version of the environment takes a mandatory argument containing options. It is retained for backward compatibility purposes with \mintedpkg\ v1 and v2. \mintedpkg\ v3 added support for an optional argument to the standard environment, so the starred version is no longer necessary.
%
+% The |^^M| is needed because |\FVExtraReadOArgBeforeVEnv| strips a following |^^M| (basically the newline), but \texpkg{fancyvrb} environments expect |^^M| before the start of environment contents.
% \begin{macrocode}
- \newenvironment{\minted@envname}
- {\VerbatimEnvironment
- \begin{minted}[#3]{#2}}
- {\end{minted}}
- \newenvironment{\minted@envname *}[1]
- {\VerbatimEnvironment\begin{minted}[#3,##1]{#2}}
- {\end{minted}}}
+\newcommand{\newminted}[3][]{%
+ \ifstrempty{#1}%
+ {\newminted@i{#2code}{#2}{#3}}%
+ {\newminted@i{#1}{#2}{#3}}}
+\begingroup
+\catcode`\^^M=\active%
+\gdef\newminted@i#1#2#3{%
+ \expandafter\def\csname#1@i\endcsname##1{%
+ \begin{minted}[#3,##1]{#2}^^M}%
+ \newenvironment{#1}%
+ {\VerbatimEnvironment%
+ \FVExtraReadOArgBeforeVEnv{\csname#1@i\endcsname}}%
+ {\end{minted}}%
+ \newenvironment{#1*}[1]%
+ {\VerbatimEnvironment%
+ \begin{minted}[#3,##1]{#2}}%
+ {\end{minted}}}%
+\endgroup
% \end{macrocode}
% \end{macro}
%
%
% \begin{macro}{\newmint}
-%
% Define a new language-specific alias for the |\mint| short form.
% \begin{macrocode}
\newcommand{\newmint}[3][]{%
- \if\relax\detokenize{#1}\relax
- \def\minted@shortname{#2}%
- \else
- \def\minted@shortname{#1}%
- \fi
- \expandafter\newmint@i\expandafter{\minted@shortname}{#2}{#3}}
+ \ifstrempty{#1}%
+ {\edef\minted@tmp{#2}}%
+ {\edef\minted@tmp{#1}}
+ \expandafter\newmint@i\expandafter{\minted@tmp}{#2}{#3}}
\def\newmint@i#1#2#3{%
\expandafter\newcommand\csname#1\endcsname{%
\expandafter\FVExtraRobustCommand\csname RobustNewMint#1\endcsname
- \FVExtraUnexpandedReadStarOArgBVArg}%
+ \FVExtraUnexpandedReadStarOArgBVArg}%
\FVExtrapdfstringdefDisableCommands{%
\expandafter\def\csname RobustNewMint#1\endcsname{}}%
\expandafter\newrobustcmd\csname RobustNewMint#1\endcsname{%
@@ -3576,9 +4055,7 @@
\ifbool{FVExtraRobustCommandExpanded}%
{\@ifnextchar\bgroup
{\FVExtraReadVArg{\csname RobustNewMint#1@ii\endcsname{##1}}}%
- {\PackageError{minted}%
- {Delimiters must be paired curly braces in this context}%
- {Use curly braces as delimiters}}}%
+ {\minted@error{Delimiters must be paired curly braces in this context}}}%
{\FVExtraReadVArg{\csname RobustNewMint#1@ii\endcsname{##1}}}}
\expandafter\def\csname RobustNewMint#1@ii\endcsname##1##2{%
\RobustMintProcess{#3,##1}{#2}{##2}}}
@@ -3587,23 +4064,30 @@
%
%
% \begin{macro}{\newmintedfile}
-%
% Define a new language-specific alias for |\inputminted|.
% \begin{macrocode}
-\newcommand{\newmintedfile}[3][]{
-% \end{macrocode}
-% Here, the default macro name (if none is provided) appends ``|file|'' to the language name.
-% \begin{macrocode}
- \ifthenelse{\equal{#1}{}}
- {\def\minted@shortname{#2file}}
- {\def\minted@shortname{#1}}
-% \end{macrocode}
-%
-% \dots and define the macro.
-%
-% \begin{macrocode}
- \expandafter\newcommand\csname\minted@shortname\endcsname[2][]{
- \inputminted[#3,##1]{#2}{##2}}}
+\def\minted@readnewmintedfileargs#1#{%
+ \minted@readnewmintedfileargs@i{#1}}
+\def\minted@readnewmintedfileargs@i#1#2{%
+ \FVExtraAlwaysUnexpanded{\minted@readnewmintedfileargs#1{#2}}}
+\FVExtrapdfstringdefDisableCommands{%
+ \makeatletter
+ \def\minted@readnewmintedfileargs@i#1#2{%
+ \detokenize{<input from file "}#2\detokenize{">}}%
+ \makeatother}
+\newcommand{\newmintedfile}[3][]{%
+ \ifstrempty{#1}%
+ {\edef\minted@tmp{#2file}}%
+ {\edef\minted@tmp{#1}}%
+ \expandafter\newmintedfile@i\expandafter{\minted@tmp}{#2}{#3}}
+\def\newmintedfile@i#1#2#3{%
+ \expandafter\newcommand\csname#1\endcsname{%
+ \expandafter\FVExtraRobustCommand\csname RobustNewMintedFile#1\endcsname
+ \minted@readnewmintedfileargs}%
+ \FVExtrapdfstringdefDisableCommands{%
+ \expandafter\def\csname RobustNewMintedFile#1\endcsname{}}%
+ \expandafter\newrobustcmd\csname RobustNewMintedFile#1\endcsname[2][]{%
+ \RobustInputMintedProcess{#3,##1}{#2}{##2}}}
% \end{macrocode}
% \end{macro}
%
@@ -3612,16 +4096,14 @@
% Define an alias for |\mintinline|.
% \begin{macrocode}
\newcommand{\newmintinline}[3][]{%
- \if\relax\detokenize{#1}\relax
- \def\minted@shortname{#2inline}%
- \else
- \def\minted@shortname{#1}%
- \fi
- \expandafter\newmintinline@i\expandafter{\minted@shortname}{#2}{#3}}
+ \ifstrempty{#1}%
+ {\edef\minted@tmp{#2inline}}%
+ {\edef\minted@tmp{#1}}%
+ \expandafter\newmintinline@i\expandafter{\minted@tmp}{#2}{#3}}
\def\newmintinline@i#1#2#3{%
\expandafter\newcommand\csname#1\endcsname{%
\expandafter\FVExtraRobustCommand\csname RobustNewMintInline#1\endcsname
- \FVExtraUnexpandedReadStarOArgBVArg}%
+ \FVExtraUnexpandedReadStarOArgBVArg}%
\FVExtrapdfstringdefDisableCommands{%
\expandafter\def\csname RobustNewMintInline#1\endcsname{}}%
\expandafter\newrobustcmd\csname RobustNewMintInline#1\endcsname{%
@@ -3630,9 +4112,7 @@
\ifbool{FVExtraRobustCommandExpanded}%
{\@ifnextchar\bgroup
{\FVExtraReadVArg{\csname RobustNewMintInline#1@ii\endcsname{##1}}}%
- {\PackageError{minted}%
- {Inline delimiters must be paired curly braces in this context}%
- {Use curly braces as delimiters}}}%
+ {\minted@error{Inline delimiters must be paired curly braces in this context}}}%
{\FVExtraReadVArg{\csname RobustNewMintInline#1@ii\endcsname{##1}}}}
\expandafter\def\csname RobustNewMintInline#1@ii\endcsname##1##2{%
\RobustMintInlineProcess{#3,##1}{#2}{##2}}}
@@ -3640,22 +4120,22 @@
% \end{macro}
%
%
+%
% \subsection{Float support}
%
-% \begin{environment}{listing}
%
+% \begin{environment}{listing}
% Define a new floating environment to use for floated listings. This is defined conditionally based on the |newfloat| package option.
-%
% \begin{macrocode}
-\ifthenelse{\boolean{minted@newfloat}}%
+\ifbool{minted@newfloat}%
{\@ifundefined{minted@float@within}%
- {\DeclareFloatingEnvironment[fileext=lol,placement=tbp]{listing}}%
- {\def\minted@tmp#1{%
- \DeclareFloatingEnvironment[fileext=lol,placement=tbp, within=#1]{listing}}%
- \expandafter\minted@tmp\expandafter{\minted@float@within}}}%
+ {\DeclareFloatingEnvironment[fileext=lol,placement=tbp]{listing}}%
+ {\def\minted@tmp#1{%
+ \DeclareFloatingEnvironment[fileext=lol,placement=tbp,within=#1]{listing}}%
+ \expandafter\minted@tmp\expandafter{\minted@float@within}}}%
{\@ifundefined{minted@float@within}%
- {\newfloat{listing}{tbp}{lol}}%
- {\newfloat{listing}{tbp}{lol}[\minted@float@within]}}
+ {\newfloat{listing}{tbp}{lol}}%
+ {\newfloat{listing}{tbp}{lol}[\minted@float@within]}}
% \end{macrocode}
% \end{environment}
%
@@ -3665,36 +4145,29 @@
% \end{macrocode}
%
% \begin{macro}{\listingcaption}
-%
% The name that is displayed before each individual listings caption and its number.
% The macro |\listingscaption| can be redefined by the user.
-%
% \begin{macrocode}
\newcommand{\listingscaption}{Listing}
% \end{macrocode}
%
% The following definition should not be changed by the user.
-%
% \begin{macrocode}
\floatname{listing}{\listingscaption}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\listoflistingscaption}
-%
% The caption that is displayed for the list of listings.
-%
% \begin{macrocode}
\newcommand{\listoflistingscaption}{List of Listings}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\listoflistings}
-%
% Used to produce a list of listings (like |\listoffigures| etc.).
% This may well clash with other packages (for example, \texpkg{listings}) but we choose to ignore this
% since these two packages shouldn't be used together in the first place.
-%
% \begin{macrocode}
\providecommand{\listoflistings}{\listof{listing}{\listoflistingscaption}}
% \end{macrocode}
@@ -3705,323 +4178,11 @@
\fi
% \end{macrocode}
%
-% \subsection{Epilogue}
-%
-% Check whether LaTeX was invoked with |-shell-escape| option, set the default style, and make sure |pygmentize| exists. Checking for |pygmentize| must wait until the end of the preamble, in case it is specified via |\MintedPygmentize| (which would typically be after the package is loaded).
-%
-% \begin{macrocode}
-\AtEndOfPackage{%
- \ifthenelse{\boolean{minted@draft}}%
- {}%
- {%
- \ifthenelse{\boolean{minted@frozencache}}{}{%
- \ifnum\pdf@shellescape=1\relax\else
- \PackageError{minted}%
- {You must invoke LaTeX with the
- -shell-escape flag}%
- {Pass the -shell-escape flag to LaTeX. Refer to the minted.sty
- documentation for more information.}%
- \fi}%
- }%
-}
-\AtEndPreamble{%
- \ifthenelse{\boolean{minted@draft}}%
- {}%
- {%
- \ifthenelse{\boolean{minted@frozencache}}{}{%
- \TestAppExists{\MintedPygmentize}%
- \ifAppExists\else
- \PackageError{minted}%
- {You must have `pygmentize' installed
- to use this package}%
- {Refer to the installation instructions in the minted
- documentation for more information.}%
- \fi}%
- }%
-}
-% \end{macrocode}
-%
-%
-%
-% \subsection{Final cleanup}
-%
-% Clean up temp files. What actually needs to be done depends on caching and engine.
-% \begin{macrocode}
-\AfterEndDocument{%
- \ifthenelse{\boolean{minted@draft}}%
- {}%
- {\ifthenelse{\boolean{minted@frozencache}}%
- {}
- {\ifx\XeTeXinterchartoks\minted@undefined
- \else
- \DeleteFile[\minted@outputdir]{\minted@jobname.mintedcmd}%
- \DeleteFile[\minted@outputdir]{\minted@jobname.mintedmd5}%
- \fi
- \DeleteFile[\minted@outputdir]{\minted@jobname.pyg}%
- \DeleteFile[\minted@outputdir]{\minted@jobname.out.pyg}%
- }%
- }%
-}
-% \end{macrocode}
%
% \iffalse
%</package>
% \fi
%
%
-%
-% \section{Implementation of compatibility package}
-% \setcounter{CodelineNo}{0}
-%
-% \iffalse
-%<*packageone>
-% \fi
-%
-% \texpkg{minted} version 2 is designed to be completely compatible with version 1.7. All of the same options and commands still exist. As far as most users are concerned, the only difference should be the new commands and options.
-%
-% However, \texpkg{minted} 2 does require some additional packages compared to \texpkg{minted} 1.7. More importantly, since \texpkg{minted} 2 has almost completely new internal code, user code that accessed the internals of 1.7 will generally not work with 2.0, at least not without some modification. For these reasons, a copy of \texpkg{minted} 1.7 is supplied as the package \texpkg{minted1}. This is intended \emph{only} for compatibility cases when using the current version is too inconvenient.
-%
-% The code in \texpkg{minted1} is an exact copy of \texpkg{minted} version 1.7, except for two things: (1) the package has been renamed, and (2) code has been added that allows \texpkg{minted1} to act as (impersonate) \texpkg{minted}, so that it can cooperate with other packages that require \texpkg{minted} to be loaded.\footnote{The approach used for doing this is described at \url{http://tex.stackexchange.com/a/39418/10742}.} When \texpkg{minted1} is used, it must be loaded \emph{before} any other packages that would require \texpkg{minted}.
-%
-% All modifications to the original \texpkg{minted} 1.7 source are indicated with comments. All original code that has been replaced has been commented out rather than deleted. Any future modifications of \texpkg{minted1} should \emph{only} be for the purpose of allowing it to serve better as a drop-in compatibility substitute for the current release of \texpkg{minted}.
-%
-% \begin{macrocode}
-\NeedsTeXFormat{LaTeX2e}
-%%%% Begin minted1 modification
-%%\ProvidesPackage{minted}[2011/09/17 v1.7 Yet another Pygments shim for LaTeX]
-\ProvidesPackage{minted1}[2015/01/31 v1.0 minted 1.7 compatibility package]
-%%%% End minted1 modification
-\RequirePackage{keyval}
-\RequirePackage{fancyvrb}
-\RequirePackage{xcolor}
-\RequirePackage{float}
-\RequirePackage{ifthen}
-%%%% Begin minted1 modification
-\newboolean{mintedone@mintedloaded}
-\@ifpackageloaded{minted}%
- {\setboolean{mintedone@mintedloaded}{true}%
- \PackageError{minted1}{The package "minted1" may not be loaded after
- ^^J"minted" has already been loaded--load "minted1" only for "minted"
- ^^Jversion 1.7 compatibility}%
- {Load "minted1" only when "minted" version 1.7 compatibility is required}}%
- {}
-\ifmintedone@mintedloaded\else
-\@namedef{ver@minted.sty}{2011/09/17 v1.7 Yet another Pygments shim for LaTeX}
-\expandafter\let\expandafter\minted@tmp\csname opt@minted1.sty\endcsname
-\expandafter\let\csname opt@minted.sty\endcsname\minted@tmp
-\let\minted@tmp\relax
-%%%% End minted1 modification
-\RequirePackage{calc}
-\RequirePackage{ifplatform}
-\DeclareOption{chapter}{\def\minted@float@within{chapter}}
-\DeclareOption{section}{\def\minted@float@within{section}}
-\ProcessOptions\relax
-\ifwindows
- \providecommand\DeleteFile[1]{\immediate\write18{del #1}}
-\else
- \providecommand\DeleteFile[1]{\immediate\write18{rm #1}}
-\fi
-\newboolean{AppExists}
-\newcommand\TestAppExists[1]{
- \ifwindows
- \DeleteFile{\jobname.aex}
- \immediate\write18{for \string^\@percentchar i in (#1.exe #1.bat #1.cmd)
- do set >\jobname.aex <nul: /p x=\string^\@percentchar \string~$PATH:i>>\jobname.aex} %$
- \newread\@appexistsfile
- \immediate\openin\@appexistsfile\jobname.aex
- \expandafter\def\expandafter\@tmp@cr\expandafter{\the\endlinechar}
- \endlinechar=-1\relax
- \readline\@appexistsfile to \@apppathifexists
- \endlinechar=\@tmp@cr
- \ifthenelse{\equal{\@apppathifexists}{}}
- {\AppExistsfalse}
- {\AppExiststrue}
- \immediate\closein\@appexistsfile
- \DeleteFile{\jobname.aex}
-\immediate\typeout{file deleted}
- \else
- \immediate\write18{which #1 && touch \jobname.aex}
- \IfFileExists{\jobname.aex}
- {\AppExiststrue
- \DeleteFile{\jobname.aex}}
- {\AppExistsfalse}
- \fi}
-\newcommand\minted@resetoptions{}
-\newcommand\minted@defopt[1]{
- \expandafter\def\expandafter\minted@resetoptions\expandafter{%
- \minted@resetoptions
- \@namedef{minted@opt@#1}{}}}
-\newcommand\minted@opt[1]{
- \expandafter\detokenize%
- \expandafter\expandafter\expandafter{\csname minted@opt@#1\endcsname}}
-\newcommand\minted@define@opt[3][]{
- \minted@defopt{#2}
- \ifthenelse{\equal{#1}{}}{
- \define@key{minted@opt}{#2}{\@namedef{minted@opt@#2}{#3}}}
- {\define@key{minted@opt}{#2}[#1]{\@namedef{minted@opt@#2}{#3}}}}
-\newcommand\minted@define@switch[3][]{
- \minted@defopt{#2}
- \define@booleankey{minted@opt}{#2}
- {\@namedef{minted@opt@#2}{#3}}
- {\@namedef{minted@opt@#2}{#1}}}
-\minted@defopt{extra}
-\newcommand\minted@define@extra[1]{
- \define@key{minted@opt}{#1}{
- \expandafter\def\expandafter\minted@opt@extra\expandafter{%
- \minted@opt@extra,#1=##1}}}
-\newcommand\minted@define@extra@switch[1]{
- \define@booleankey{minted@opt}{#1}
- {\expandafter\def\expandafter\minted@opt@extra\expandafter{%
- \minted@opt@extra,#1}}
- {\expandafter\def\expandafter\minted@opt@extra\expandafter{%
- \minted@opt@extra,#1=false}}}
-\minted@define@switch{texcl}{-P texcomments}
-\minted@define@switch{mathescape}{-P mathescape}
-\minted@define@switch{linenos}{-P linenos}
-\minted@define@switch{startinline}{-P startinline}
-\minted@define@switch[-P funcnamehighlighting=False]%
- {funcnamehighlighting}{-P funcnamehighlighting}
-\minted@define@opt{gobble}{-F gobble:n=#1}
-\minted@define@opt{bgcolor}{#1}
-\minted@define@extra{frame}
-\minted@define@extra{framesep}
-\minted@define@extra{framerule}
-\minted@define@extra{rulecolor}
-\minted@define@extra{numbersep}
-\minted@define@extra{firstnumber}
-\minted@define@extra{stepnumber}
-\minted@define@extra{firstline}
-\minted@define@extra{lastline}
-\minted@define@extra{baselinestretch}
-\minted@define@extra{xleftmargin}
-\minted@define@extra{xrightmargin}
-\minted@define@extra{fillcolor}
-\minted@define@extra{tabsize}
-\minted@define@extra{fontfamily}
-\minted@define@extra{fontsize}
-\minted@define@extra{fontshape}
-\minted@define@extra{fontseries}
-\minted@define@extra{formatcom}
-\minted@define@extra{label}
-\minted@define@extra@switch{numberblanklines}
-\minted@define@extra@switch{showspaces}
-\minted@define@extra@switch{resetmargins}
-\minted@define@extra@switch{samepage}
-\minted@define@extra@switch{showtabs}
-\minted@define@extra@switch{obeytabs}
-\newsavebox{\minted@bgbox}
-\newenvironment{minted@colorbg}[1]{
- \def\minted@bgcol{#1}
- \noindent
- \begin{lrbox}{\minted@bgbox}
- \begin{minipage}{\linewidth-2\fboxsep}}
- {\end{minipage}
- \end{lrbox}%
- \colorbox{\minted@bgcol}{\usebox{\minted@bgbox}}}
-\newwrite\minted@code
-\newcommand\minted@savecode[1]{
- \immediate\openout\minted@code\jobname.pyg
- \immediate\write\minted@code{#1}
- \immediate\closeout\minted@code}
-\newcommand\minted@pygmentize[2][\jobname.pyg]{
- \def\minted@cmd{pygmentize -l #2 -f latex -F tokenmerge
- \minted@opt{gobble} \minted@opt{texcl} \minted@opt{mathescape}
- \minted@opt{startinline} \minted@opt{funcnamehighlighting}
- \minted@opt{linenos} -P "verboptions=\minted@opt{extra}"
- -o \jobname.out.pyg #1}
- \immediate\write18{\minted@cmd}
- % For debugging, uncomment:
- %\immediate\typeout{\minted@cmd}
- \ifthenelse{\equal{\minted@opt@bgcolor}{}}
- {}
- {\begin{minted@colorbg}{\minted@opt@bgcolor}}
- \input{\jobname.out.pyg}
- \ifthenelse{\equal{\minted@opt@bgcolor}{}}
- {}
- {\end{minted@colorbg}}
- \DeleteFile{\jobname.out.pyg}}
-\newcommand\minted@usedefaultstyle{\usemintedstyle{default}}
-\newcommand\usemintedstyle[1]{
- \renewcommand\minted@usedefaultstyle{}
- \immediate\write18{pygmentize -S #1 -f latex > \jobname.pyg}
- \input{\jobname.pyg}}
-\newcommand\mint[3][]{
- \DefineShortVerb{#3}
- \minted@resetoptions
- \setkeys{minted@opt}{#1}
- \SaveVerb[aftersave={
- \UndefineShortVerb{#3}
- \minted@savecode{\FV@SV@minted@verb}
- \minted@pygmentize{#2}
- \DeleteFile{\jobname.pyg}}]{minted@verb}#3}
-\newcommand\minted@proglang[1]{}
-\newenvironment{minted}[2][]
- {\VerbatimEnvironment
- \renewcommand{\minted@proglang}[1]{#2}
- \minted@resetoptions
- \setkeys{minted@opt}{#1}
- \begin{VerbatimOut}[codes={\catcode`\^^I=12}]{\jobname.pyg}}%
- {\end{VerbatimOut}
- \minted@pygmentize{\minted@proglang{}}
- \DeleteFile{\jobname.pyg}}
-\newcommand\inputminted[3][]{
- \minted@resetoptions
- \setkeys{minted@opt}{#1}
- \minted@pygmentize[#3]{#2}}
-\newcommand\newminted[3][]{
- \ifthenelse{\equal{#1}{}}
- {\def\minted@envname{#2code}}
- {\def\minted@envname{#1}}
- \newenvironment{\minted@envname}
- {\VerbatimEnvironment\begin{minted}[#3]{#2}}
- {\end{minted}}
- \newenvironment{\minted@envname *}[1]
- {\VerbatimEnvironment\begin{minted}[#3,##1]{#2}}
- {\end{minted}}}
-\newcommand\newmint[3][]{
- \ifthenelse{\equal{#1}{}}
- {\def\minted@shortname{#2}}
- {\def\minted@shortname{#1}}
- \expandafter\newcommand\csname\minted@shortname\endcsname[2][]{
- \mint[#3,##1]{#2}##2}}
-\newcommand\newmintedfile[3][]{
- \ifthenelse{\equal{#1}{}}
- {\def\minted@shortname{#2file}}
- {\def\minted@shortname{#1}}
- \expandafter\newcommand\csname\minted@shortname\endcsname[2][]{
- \inputminted[#3,##1]{#2}{##2}}}
-\@ifundefined{minted@float@within}
- {\newfloat{listing}{h}{lol}}
- {\newfloat{listing}{h}{lol}[\minted@float@within]}
-\newcommand\listingscaption{Listing}
-\floatname{listing}{\listingscaption}
-\newcommand\listoflistingscaption{List of listings}
-\providecommand\listoflistings{\listof{listing}{\listoflistingscaption}}
-\AtBeginDocument{
- \minted@usedefaultstyle}
-\AtEndOfPackage{
- \ifnum\pdf@shellescape=1\relax\else
- \PackageError{minted}
- {You must invoke LaTeX with the
- -shell-escape flag}
- {Pass the -shell-escape flag to LaTeX. Refer to the minted.sty
- documentation for more information.}\fi
- \TestAppExists{pygmentize}
- \ifAppExists\else
- \PackageError{minted}
- {You must have `pygmentize' installed
- to use this package}
- {Refer to the installation instructions in the minted
- documentation for more information.}
- \fi}
-%%%% Begin minted1 modification
-\fi
-%%%% End minted1 modification
-% \end{macrocode}
-% \iffalse
-%</packageone>
-% \fi
-%
% \Finale
\endinput
-
diff --git a/macros/latex/contrib/minted/minted.ins b/macros/latex/contrib/minted/minted.ins
index 2b5da824ca..61f72c6b0a 100644
--- a/macros/latex/contrib/minted/minted.ins
+++ b/macros/latex/contrib/minted/minted.ins
@@ -3,19 +3,17 @@
\askforoverwritefalse
\preamble
-Copyright 2013--2022 Geoffrey M. Poore
-Copyright 2010--2011 Konrad Rudolph
+Copyright (C) 2013-2024 by Geoffrey M. Poore <gpoore@gmail.com>
+Copyright (C) 2010-2011 by Konrad Rudolph <konrad_rudolph@madrat.net>
+--------------------------------------------------------------------------
This work may be distributed and/or modified under the
-conditions of the LaTeX Project Public License, either version 1.3
+conditions of the LaTeX Project Public License, either version 1.3c
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.
-
-Additionally, the project may be distributed under the terms of the new BSD
-license.
+ https://www.latex-project.org/lppl.txt
+and version 1.3c or later is part of all distributions of LaTeX
+version 2008/05/04 or later.
This work has the LPPL maintenance status `maintained'.
@@ -23,14 +21,13 @@ The Current Maintainer of this work is Geoffrey Poore.
This work consists of the files minted.dtx and minted.ins
and the derived file minted.sty.
+
\endpreamble
\usedir{tex/latex/minted}
\generate{%
\file{minted.sty}{\from{minted.dtx}{package}}%
- \file{minted1.sty}{\from{minted.dtx}{packageone}}%
}
\endbatchfile
-% vim: ft=tex
diff --git a/macros/latex/contrib/minted/minted.pdf b/macros/latex/contrib/minted/minted.pdf
index 352f07b667..21e35243e3 100644
--- a/macros/latex/contrib/minted/minted.pdf
+++ b/macros/latex/contrib/minted/minted.pdf
Binary files differ
diff --git a/macros/latex/contrib/minted/minted1.sty b/macros/latex/contrib/minted/minted1.sty
new file mode 100644
index 0000000000..12b71d1bb8
--- /dev/null
+++ b/macros/latex/contrib/minted/minted1.sty
@@ -0,0 +1,261 @@
+%%
+%% This is file `minted1.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% minted.dtx (with options: `packageone')
+%% Copyright 2013--2022 Geoffrey M. Poore
+%% Copyright 2010--2011 Konrad Rudolph
+%%
+%% 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.
+%%
+%% Additionally, the project may be distributed under the terms of the new BSD
+%% license.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainer of this work is Geoffrey Poore.
+%%
+%% This work consists of the files minted.dtx and minted.ins
+%% and the derived file minted.sty.
+\NeedsTeXFormat{LaTeX2e}
+%%%% Begin minted1 modification
+%%\ProvidesPackage{minted}[2011/09/17 v1.7 Yet another Pygments shim for LaTeX]
+\ProvidesPackage{minted1}[2015/01/31 v1.0 minted 1.7 compatibility package]
+%%%% End minted1 modification
+\RequirePackage{keyval}
+\RequirePackage{fancyvrb}
+\RequirePackage{xcolor}
+\RequirePackage{float}
+\RequirePackage{ifthen}
+%%%% Begin minted1 modification
+\newboolean{mintedone@mintedloaded}
+\@ifpackageloaded{minted}%
+ {\setboolean{mintedone@mintedloaded}{true}%
+ \PackageError{minted1}{The package "minted1" may not be loaded after
+ ^^J"minted" has already been loaded--load "minted1" only for "minted"
+ ^^Jversion 1.7 compatibility}%
+ {Load "minted1" only when "minted" version 1.7 compatibility is required}}%
+ {}
+\ifmintedone@mintedloaded\else
+\@namedef{ver@minted.sty}{2011/09/17 v1.7 Yet another Pygments shim for LaTeX}
+\expandafter\let\expandafter\minted@tmp\csname opt@minted1.sty\endcsname
+\expandafter\let\csname opt@minted.sty\endcsname\minted@tmp
+\let\minted@tmp\relax
+%%%% End minted1 modification
+\RequirePackage{calc}
+\RequirePackage{ifplatform}
+\DeclareOption{chapter}{\def\minted@float@within{chapter}}
+\DeclareOption{section}{\def\minted@float@within{section}}
+\ProcessOptions\relax
+\ifwindows
+ \providecommand\DeleteFile[1]{\immediate\write18{del #1}}
+\else
+ \providecommand\DeleteFile[1]{\immediate\write18{rm #1}}
+\fi
+\newboolean{AppExists}
+\newcommand\TestAppExists[1]{
+ \ifwindows
+ \DeleteFile{\jobname.aex}
+ \immediate\write18{for \string^\@percentchar i in (#1.exe #1.bat #1.cmd)
+ do set >\jobname.aex <nul: /p x=\string^\@percentchar \string~$PATH:i>>\jobname.aex} %$
+ \newread\@appexistsfile
+ \immediate\openin\@appexistsfile\jobname.aex
+ \expandafter\def\expandafter\@tmp@cr\expandafter{\the\endlinechar}
+ \endlinechar=-1\relax
+ \readline\@appexistsfile to \@apppathifexists
+ \endlinechar=\@tmp@cr
+ \ifthenelse{\equal{\@apppathifexists}{}}
+ {\AppExistsfalse}
+ {\AppExiststrue}
+ \immediate\closein\@appexistsfile
+ \DeleteFile{\jobname.aex}
+\immediate\typeout{file deleted}
+ \else
+ \immediate\write18{which #1 && touch \jobname.aex}
+ \IfFileExists{\jobname.aex}
+ {\AppExiststrue
+ \DeleteFile{\jobname.aex}}
+ {\AppExistsfalse}
+ \fi}
+\newcommand\minted@resetoptions{}
+\newcommand\minted@defopt[1]{
+ \expandafter\def\expandafter\minted@resetoptions\expandafter{%
+ \minted@resetoptions
+ \@namedef{minted@opt@#1}{}}}
+\newcommand\minted@opt[1]{
+ \expandafter\detokenize%
+ \expandafter\expandafter\expandafter{\csname minted@opt@#1\endcsname}}
+\newcommand\minted@define@opt[3][]{
+ \minted@defopt{#2}
+ \ifthenelse{\equal{#1}{}}{
+ \define@key{minted@opt}{#2}{\@namedef{minted@opt@#2}{#3}}}
+ {\define@key{minted@opt}{#2}[#1]{\@namedef{minted@opt@#2}{#3}}}}
+\newcommand\minted@define@switch[3][]{
+ \minted@defopt{#2}
+ \define@booleankey{minted@opt}{#2}
+ {\@namedef{minted@opt@#2}{#3}}
+ {\@namedef{minted@opt@#2}{#1}}}
+\minted@defopt{extra}
+\newcommand\minted@define@extra[1]{
+ \define@key{minted@opt}{#1}{
+ \expandafter\def\expandafter\minted@opt@extra\expandafter{%
+ \minted@opt@extra,#1=##1}}}
+\newcommand\minted@define@extra@switch[1]{
+ \define@booleankey{minted@opt}{#1}
+ {\expandafter\def\expandafter\minted@opt@extra\expandafter{%
+ \minted@opt@extra,#1}}
+ {\expandafter\def\expandafter\minted@opt@extra\expandafter{%
+ \minted@opt@extra,#1=false}}}
+\minted@define@switch{texcl}{-P texcomments}
+\minted@define@switch{mathescape}{-P mathescape}
+\minted@define@switch{linenos}{-P linenos}
+\minted@define@switch{startinline}{-P startinline}
+\minted@define@switch[-P funcnamehighlighting=False]%
+ {funcnamehighlighting}{-P funcnamehighlighting}
+\minted@define@opt{gobble}{-F gobble:n=#1}
+\minted@define@opt{bgcolor}{#1}
+\minted@define@extra{frame}
+\minted@define@extra{framesep}
+\minted@define@extra{framerule}
+\minted@define@extra{rulecolor}
+\minted@define@extra{numbersep}
+\minted@define@extra{firstnumber}
+\minted@define@extra{stepnumber}
+\minted@define@extra{firstline}
+\minted@define@extra{lastline}
+\minted@define@extra{baselinestretch}
+\minted@define@extra{xleftmargin}
+\minted@define@extra{xrightmargin}
+\minted@define@extra{fillcolor}
+\minted@define@extra{tabsize}
+\minted@define@extra{fontfamily}
+\minted@define@extra{fontsize}
+\minted@define@extra{fontshape}
+\minted@define@extra{fontseries}
+\minted@define@extra{formatcom}
+\minted@define@extra{label}
+\minted@define@extra@switch{numberblanklines}
+\minted@define@extra@switch{showspaces}
+\minted@define@extra@switch{resetmargins}
+\minted@define@extra@switch{samepage}
+\minted@define@extra@switch{showtabs}
+\minted@define@extra@switch{obeytabs}
+\newsavebox{\minted@bgbox}
+\newenvironment{minted@colorbg}[1]{
+ \def\minted@bgcol{#1}
+ \noindent
+ \begin{lrbox}{\minted@bgbox}
+ \begin{minipage}{\linewidth-2\fboxsep}}
+ {\end{minipage}
+ \end{lrbox}%
+ \colorbox{\minted@bgcol}{\usebox{\minted@bgbox}}}
+\newwrite\minted@code
+\newcommand\minted@savecode[1]{
+ \immediate\openout\minted@code\jobname.pyg
+ \immediate\write\minted@code{#1}
+ \immediate\closeout\minted@code}
+\newcommand\minted@pygmentize[2][\jobname.pyg]{
+ \def\minted@cmd{pygmentize -l #2 -f latex -F tokenmerge
+ \minted@opt{gobble} \minted@opt{texcl} \minted@opt{mathescape}
+ \minted@opt{startinline} \minted@opt{funcnamehighlighting}
+ \minted@opt{linenos} -P "verboptions=\minted@opt{extra}"
+ -o \jobname.out.pyg #1}
+ \immediate\write18{\minted@cmd}
+ % For debugging, uncomment:
+ %\immediate\typeout{\minted@cmd}
+ \ifthenelse{\equal{\minted@opt@bgcolor}{}}
+ {}
+ {\begin{minted@colorbg}{\minted@opt@bgcolor}}
+ \input{\jobname.out.pyg}
+ \ifthenelse{\equal{\minted@opt@bgcolor}{}}
+ {}
+ {\end{minted@colorbg}}
+ \DeleteFile{\jobname.out.pyg}}
+\newcommand\minted@usedefaultstyle{\usemintedstyle{default}}
+\newcommand\usemintedstyle[1]{
+ \renewcommand\minted@usedefaultstyle{}
+ \immediate\write18{pygmentize -S #1 -f latex > \jobname.pyg}
+ \input{\jobname.pyg}}
+\newcommand\mint[3][]{
+ \DefineShortVerb{#3}
+ \minted@resetoptions
+ \setkeys{minted@opt}{#1}
+ \SaveVerb[aftersave={
+ \UndefineShortVerb{#3}
+ \minted@savecode{\FV@SV@minted@verb}
+ \minted@pygmentize{#2}
+ \DeleteFile{\jobname.pyg}}]{minted@verb}#3}
+\newcommand\minted@proglang[1]{}
+\newenvironment{minted}[2][]
+ {\VerbatimEnvironment
+ \renewcommand{\minted@proglang}[1]{#2}
+ \minted@resetoptions
+ \setkeys{minted@opt}{#1}
+ \begin{VerbatimOut}[codes={\catcode`\^^I=12}]{\jobname.pyg}}%
+ {\end{VerbatimOut}
+ \minted@pygmentize{\minted@proglang{}}
+ \DeleteFile{\jobname.pyg}}
+\newcommand\inputminted[3][]{
+ \minted@resetoptions
+ \setkeys{minted@opt}{#1}
+ \minted@pygmentize[#3]{#2}}
+\newcommand\newminted[3][]{
+ \ifthenelse{\equal{#1}{}}
+ {\def\minted@envname{#2code}}
+ {\def\minted@envname{#1}}
+ \newenvironment{\minted@envname}
+ {\VerbatimEnvironment\begin{minted}[#3]{#2}}
+ {\end{minted}}
+ \newenvironment{\minted@envname *}[1]
+ {\VerbatimEnvironment\begin{minted}[#3,##1]{#2}}
+ {\end{minted}}}
+\newcommand\newmint[3][]{
+ \ifthenelse{\equal{#1}{}}
+ {\def\minted@shortname{#2}}
+ {\def\minted@shortname{#1}}
+ \expandafter\newcommand\csname\minted@shortname\endcsname[2][]{
+ \mint[#3,##1]{#2}##2}}
+\newcommand\newmintedfile[3][]{
+ \ifthenelse{\equal{#1}{}}
+ {\def\minted@shortname{#2file}}
+ {\def\minted@shortname{#1}}
+ \expandafter\newcommand\csname\minted@shortname\endcsname[2][]{
+ \inputminted[#3,##1]{#2}{##2}}}
+\@ifundefined{minted@float@within}
+ {\newfloat{listing}{h}{lol}}
+ {\newfloat{listing}{h}{lol}[\minted@float@within]}
+\newcommand\listingscaption{Listing}
+\floatname{listing}{\listingscaption}
+\newcommand\listoflistingscaption{List of listings}
+\providecommand\listoflistings{\listof{listing}{\listoflistingscaption}}
+\AtBeginDocument{
+ \minted@usedefaultstyle}
+\AtEndOfPackage{
+ \ifnum\pdf@shellescape=1\relax\else
+ \PackageError{minted}
+ {You must invoke LaTeX with the
+ -shell-escape flag}
+ {Pass the -shell-escape flag to LaTeX. Refer to the minted.sty
+ documentation for more information.}\fi
+ \TestAppExists{pygmentize}
+ \ifAppExists\else
+ \PackageError{minted}
+ {You must have `pygmentize' installed
+ to use this package}
+ {Refer to the installation instructions in the minted
+ documentation for more information.}
+ \fi}
+%%%% Begin minted1 modification
+\fi
+%%%% End minted1 modification
+\endinput
+%%
+%% End of file `minted1.sty'.
diff --git a/macros/latex/contrib/minted/minted2.sty b/macros/latex/contrib/minted/minted2.sty
new file mode 100644
index 0000000000..e2431e4714
--- /dev/null
+++ b/macros/latex/contrib/minted/minted2.sty
@@ -0,0 +1,1285 @@
+%%
+%% This is file `minted2.sty'.
+%%
+%% Copyright 2013--2024 Geoffrey M. Poore
+%% Copyright 2010--2011 Konrad Rudolph
+%%
+%% 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.
+%%
+%% Additionally, the project may be distributed under the terms of the new BSD
+%% license.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainer of this work is Geoffrey Poore.
+%%
+%% This work consists of the file minted2.sty.
+\NeedsTeXFormat{LaTeX2e}
+%%%% Begin minted2 modification
+%% \ProvidesPackage{minted}
+%% [2023/12/18 v2.9 Yet another Pygments shim for LaTeX]
+\ProvidesPackage{minted2}
+ [2024/05/09 v2.9 Yet another Pygments shim for LaTeX]
+\IfPackageLoadedTF{minted}%
+ {\PackageError{minted2}%
+ {Packages minted and minted2 cannot be loaded at the same time}{}%
+ \endinput}%
+ {}
+\@namedef{ver@minted.sty}{2023/12/18 v2.9 Yet another Pygments shim for LaTeX}
+\expandafter\let\expandafter\minted@tmp\csname opt@minted2.sty\endcsname
+\expandafter\let\csname opt@minted.sty\endcsname\minted@tmp
+\let\minted@tmp\relax
+%%%% End minted2 modification
+\RequirePackage{keyval}
+\RequirePackage{kvoptions}
+%%%% Begin minted2 modification
+\SetupKeyvalOptions{family=minted, prefix=minted@}
+%%%% End minted2 modification
+\RequirePackage{fvextra}[2022/11/30]
+\RequirePackage{ifthen}
+\IfFileExists{shellesc.sty}
+ {\RequirePackage{shellesc}
+ \@ifpackagelater{shellesc}{2016/04/29}
+ {}
+ {\protected\def\ShellEscape{\immediate\write18 }}}
+ {\protected\def\ShellEscape{\immediate\write18 }}
+\RequirePackage{ifplatform}
+\RequirePackage{pdftexcmds}
+\RequirePackage{etoolbox}
+\RequirePackage{xstring}
+\RequirePackage{lineno}
+\RequirePackage{framed}
+\RequirePackage{catchfile}
+\AtEndPreamble{%
+ \@ifpackageloaded{color}{}{%
+ \@ifpackageloaded{xcolor}{}{\RequirePackage{xcolor}}}%
+}
+\DeclareVoidOption{chapter}{\def\minted@float@within{chapter}}
+\DeclareVoidOption{section}{\def\minted@float@within{section}}
+\DeclareBoolOption{newfloat}
+\DeclareBoolOption[true]{cache}
+\StrSubstitute{\jobname}{ }{_}[\minted@jobname]
+\StrSubstitute{\minted@jobname}{*}{_}[\minted@jobname]
+\StrSubstitute{\minted@jobname}{"}{}[\minted@jobname]
+\StrSubstitute{\minted@jobname}{'}{_}[\minted@jobname]
+\newcommand{\minted@cachedir}{\detokenize{_}minted-\minted@jobname}
+\let\minted@cachedir@windows\minted@cachedir
+\define@key{minted}{cachedir}{%
+ \@namedef{minted@cachedir}{#1}%
+ \StrSubstitute{\minted@cachedir}{/}{\@backslashchar}[\minted@cachedir@windows]}
+\DeclareBoolOption{finalizecache}
+\DeclareBoolOption{frozencache}
+\let\minted@outputdir\@empty
+\let\minted@outputdir@windows\@empty
+\define@key{minted}{outputdir}{%
+ \@namedef{minted@outputdir}{#1/}%
+ \StrSubstitute{\minted@outputdir}{/}%
+ {\@backslashchar}[\minted@outputdir@windows]}
+\DeclareBoolOption{inputlanglinenos}
+\DeclareBoolOption{kpsewhich}
+\DeclareBoolOption{langlinenos}
+\DeclareBoolOption{draft}
+\DeclareComplementaryOption{final}{draft}
+\ProcessKeyvalOptions*
+\ifthenelse{\boolean{minted@newfloat}}{\RequirePackage{newfloat}}{\RequirePackage{float}}
+\ifcsname tikzifexternalizing\endcsname
+ \tikzifexternalizing{\minted@drafttrue\minted@cachefalse}{}
+\else
+ \ifcsname tikzexternalrealjob\endcsname
+ \minted@drafttrue
+ \minted@cachefalse
+ \else
+ \fi
+\fi
+\ifthenelse{\boolean{minted@finalizecache}}%
+ {\ifthenelse{\boolean{minted@frozencache}}%
+ {\PackageError{minted}%
+ {Options "finalizecache" and "frozencache" are not compatible}%
+ {Options "finalizecache" and "frozencache" are not compatible}}%
+ {}}%
+ {}
+\ifthenelse{\boolean{minted@cache}}%
+ {\ifthenelse{\boolean{minted@frozencache}}%
+ {}%
+ {\AtEndOfPackage{\ProvideDirectory{\minted@outputdir\minted@cachedir}}}}%
+ {}
+\newcommand{\minted@input}[1]{%
+ \IfFileExists{#1}%
+ {\input{#1}}%
+ {\PackageError{minted}{Missing Pygments output; \string\inputminted\space
+ was^^Jprobably given a file that does not exist--otherwise, you may need
+ ^^Jthe outputdir package option, or may be using an incompatible build
+ tool,^^Jor may be using frozencache with a missing file}%
+ {This could be caused by using -output-directory or -aux-directory
+ ^^Jwithout setting minted's outputdir, or by using a build tool that
+ ^^Jchanges paths in ways minted cannot detect,
+ ^^Jor using frozencache with a missing file.}}%
+}
+\newcommand{\minted@infile}{\minted@jobname.out.pyg}
+\newcommand{\minted@cachelist}{}
+\newcommand{\minted@addcachefile}[1]{%
+ \expandafter\long\expandafter\gdef\expandafter\minted@cachelist\expandafter{%
+ \minted@cachelist,^^J%
+ \space\space#1}%
+ \expandafter\gdef\csname minted@cached@#1\endcsname{}%
+}
+\newcommand{\minted@savecachelist}{%
+ \ifdefempty{\minted@cachelist}{}{%
+ \immediate\write\@mainaux{%
+ \string\gdef\string\minted@oldcachelist\string{%
+ \minted@cachelist\string}}%
+ }%
+}
+\newcommand{\minted@cleancache}{%
+ \ifcsname minted@oldcachelist\endcsname
+ \def\do##1{%
+ \ifthenelse{\equal{##1}{}}{}{%
+ \ifcsname minted@cached@##1\endcsname\else
+ \DeleteFile[\minted@outputdir\minted@cachedir]{##1}%
+ \fi
+ }%
+ }%
+ \expandafter\docsvlist\expandafter{\minted@oldcachelist}%
+ \else
+ \fi
+}
+\ifthenelse{\boolean{minted@draft}}%
+ {\AtEndDocument{%
+ \ifcsname minted@oldcachelist\endcsname
+ \StrSubstitute{\minted@oldcachelist}{,}{,^^J }[\minted@cachelist]
+ \minted@savecachelist
+ \fi}}%
+ {\ifthenelse{\boolean{minted@frozencache}}%
+ {\AtEndDocument{%
+ \ifcsname minted@oldcachelist\endcsname
+ \StrSubstitute{\minted@oldcachelist}{,}{,^^J }[\minted@cachelist]
+ \minted@savecachelist
+ \fi}}%
+ {\AtEndDocument{%
+ \minted@savecachelist
+ \minted@cleancache}}}%
+\ifwindows
+ \providecommand{\DeleteFile}[2][]{%
+ \ifthenelse{\equal{#1}{}}%
+ {\IfFileExists{#2}{\ShellEscape{del #2}}{}}%
+ {\IfFileExists{#1/#2}{%
+ \StrSubstitute{#1}{/}{\@backslashchar}[\minted@windir]
+ \ShellEscape{del \minted@windir\@backslashchar #2}}{}}}
+\else
+ \providecommand{\DeleteFile}[2][]{%
+ \ifthenelse{\equal{#1}{}}%
+ {\IfFileExists{#2}{\ShellEscape{rm #2}}{}}%
+ {\IfFileExists{#1/#2}{\ShellEscape{rm #1/#2}}{}}}
+\fi
+\ifwindows
+ \newcommand{\ProvideDirectory}[1]{%
+ \StrSubstitute{#1}{/}{\@backslashchar}[\minted@windir]
+ \ShellEscape{if not exist \minted@windir\space mkdir \minted@windir}}
+\else
+ \newcommand{\ProvideDirectory}[1]{%
+ \ShellEscape{mkdir -p #1}}
+\fi
+\newboolean{AppExists}
+\newread\minted@appexistsfile
+\newcommand{\TestAppExists}[1]{%
+ \ifwindows
+ \DeleteFile{\minted@jobname.aex}%
+ \ShellEscape{for \string^\@percentchar i in (#1.exe #1.bat #1.cmd)
+ do set > \minted@jobname.aex <nul: /p
+ x=\string^\@percentchar \string~$PATH:i>> \minted@jobname.aex}%
+ %$ <- balance syntax highlighting
+ \immediate\openin\minted@appexistsfile\minted@jobname.aex
+ \expandafter\def\expandafter\@tmp@cr\expandafter{\the\endlinechar}%
+ \endlinechar=-1\relax
+ \readline\minted@appexistsfile to \minted@apppathifexists
+ \endlinechar=\@tmp@cr
+ \ifthenelse{\equal{\minted@apppathifexists}{}}%
+ {\AppExistsfalse}%
+ {\AppExiststrue}%
+ \immediate\closein\minted@appexistsfile
+ \DeleteFile{\minted@jobname.aex}%
+ \else
+ \ShellEscape{command -v #1 && touch \minted@jobname.aex}%
+ \IfFileExists{\minted@jobname.aex}%
+ {\AppExiststrue
+ \DeleteFile{\minted@jobname.aex}}%
+ {\AppExistsfalse}%
+ \fi
+}
+\newcommand{\minted@optlistcl@g}{}
+\newcommand{\minted@optlistcl@g@i}{}
+\let\minted@lang\@empty
+\newcommand{\minted@optlistcl@lang}{}
+\newcommand{\minted@optlistcl@lang@i}{}
+\newcommand{\minted@optlistcl@cmd}{}
+\newcommand{\minted@optlistfv@g}{}
+\newcommand{\minted@optlistfv@g@i}{}
+\newcommand{\minted@optlistfv@lang}{}
+\newcommand{\minted@optlistfv@lang@i}{}
+\newcommand{\minted@optlistfv@cmd}{}
+\newcommand{\minted@configlang}[1]{%
+ \def\minted@lang{#1}%
+ \ifcsname minted@optlistcl@lang\minted@lang\endcsname\else
+ \expandafter\gdef\csname minted@optlistcl@lang\minted@lang\endcsname{}%
+ \fi
+ \ifcsname minted@optlistcl@lang\minted@lang @i\endcsname\else
+ \expandafter\gdef\csname minted@optlistcl@lang\minted@lang @i\endcsname{}%
+ \fi
+ \ifcsname minted@optlistfv@lang\minted@lang\endcsname\else
+ \expandafter\gdef\csname minted@optlistfv@lang\minted@lang\endcsname{}%
+ \fi
+ \ifcsname minted@optlistfv@lang\minted@lang @i\endcsname\else
+ \expandafter\gdef\csname minted@optlistfv@lang\minted@lang @i\endcsname{}%
+ \fi
+}
+\ifwindows
+ \newcommand{\minted@optlistcl@quote}[2]{%
+ \detokenize{#1="#2"}}
+\else
+ \newcommand{\minted@optlistcl@quote}[2]{%
+ \detokenize{#1='#2'}}
+\fi
+\newcommand{\minted@addto@optlistcl}[3]{%
+ \expandafter\def\expandafter#1\expandafter{#1%
+ \minted@optlistcl@quote{#2}{#3}\space}}
+\newcommand{\minted@addto@optlistcl@lang}[3]{%
+ \expandafter\let\expandafter\minted@tmp\csname #1\endcsname
+ \expandafter\def\expandafter\minted@tmp\expandafter{\minted@tmp%
+ \minted@optlistcl@quote{#2}{#3}\space}%
+ \expandafter\let\csname #1\endcsname\minted@tmp}
+\newcommand{\minted@def@optcl}[4][]{%
+ \ifthenelse{\equal{#1}{}}%
+ {\define@key{minted@opt@g}{#2}{%
+ \minted@addto@optlistcl{\minted@optlistcl@g}{#3}{#4}%
+ \@namedef{minted@opt@g:#2}{#4}}%
+ \define@key{minted@opt@g@i}{#2}{%
+ \minted@addto@optlistcl{\minted@optlistcl@g@i}{#3}{#4}%
+ \@namedef{minted@opt@g@i:#2}{#4}}%
+ \define@key{minted@opt@lang}{#2}{%
+ \minted@addto@optlistcl@lang{minted@optlistcl@lang\minted@lang}{#3}{#4}%
+ \@namedef{minted@opt@lang\minted@lang:#2}{#4}}%
+ \define@key{minted@opt@lang@i}{#2}{%
+ \minted@addto@optlistcl@lang{%
+ minted@optlistcl@lang\minted@lang @i}{#3}{#4}%
+ \@namedef{minted@opt@lang\minted@lang @i:#2}{#4}}%
+ \define@key{minted@opt@cmd}{#2}{%
+ \minted@addto@optlistcl{\minted@optlistcl@cmd}{#3}{#4}%
+ \@namedef{minted@opt@cmd:#2}{#4}}}%
+ {\define@key{minted@opt@g}{#2}[#1]{%
+ \minted@addto@optlistcl{\minted@optlistcl@g}{#3}{#4}%
+ \@namedef{minted@opt@g:#2}{#4}}%
+ \define@key{minted@opt@g@i}{#2}[#1]{%
+ \minted@addto@optlistcl{\minted@optlistcl@g@i}{#3}{#4}%
+ \@namedef{minted@opt@g@i:#2}{#4}}%
+ \define@key{minted@opt@lang}{#2}[#1]{%
+ \minted@addto@optlistcl@lang{minted@optlistcl@lang\minted@lang}{#3}{#4}%
+ \@namedef{minted@opt@lang\minted@lang:#2}{#4}}%
+ \define@key{minted@opt@lang@i}{#2}[#1]{%
+ \minted@addto@optlistcl@lang{%
+ minted@optlistcl@lang\minted@lang @i}{#3}{#4}%
+ \@namedef{minted@opt@lang\minted@lang @i:#2}{#4}}%
+ \define@key{minted@opt@cmd}{#2}[#1]{%
+ \minted@addto@optlistcl{\minted@optlistcl@cmd}{#3}{#4}%
+ \@namedef{minted@opt@cmd:#2}{#4}}}%
+}
+\begingroup
+\catcode`\!=0
+!catcode`!\=12
+!gdef!minted@escape#1{%
+ !expandafter!minted@escape@i!detokenize{#1}\!FV@Sentinel}
+!gdef!minted@escape@i#1\#2!FV@Sentinel{%
+ !if!relax!detokenize{#2}!relax
+ !expandafter!@firstoftwo
+ !else
+ !expandafter!@secondoftwo
+ !fi
+ {#1!minted@escape@end\#2!FV@Sentinel}
+ {#1!minted@escape@esc\#2!FV@Sentinel}}
+!gdef!minted@escape@end#1!FV@Sentinel{}
+!gdef!minted@escape@esc\#1#2!FV@Sentinel{%
+ #1!minted@escape@i#2!FV@Sentinel}
+!endgroup
+\newcommand{\minted@addto@optlistcl@e}[3]{%
+ \edef\minted@tmp{\minted@escape{#3}}%
+ \expandafter\minted@addto@optlistcl@e@i\expandafter{\minted@tmp}{#1}{#2}}
+\def\minted@addto@optlistcl@e@i#1#2#3{%
+ \expandafter\def\expandafter#2\expandafter{#2\minted@optlistcl@quote{#3}{#1}\space}}
+\newcommand{\minted@addto@optlistcl@lang@e}[3]{%
+ \edef\minted@tmp{\minted@escape{#3}}%
+ \expandafter\minted@addto@optlistcl@lang@e@i\expandafter{\minted@tmp}{#1}{#2}}
+\def\minted@addto@optlistcl@lang@e@i#1#2#3{%
+ \expandafter\let\expandafter\minted@tmp\csname #2\endcsname
+ \expandafter\def\expandafter\minted@tmp\expandafter{\minted@tmp\minted@optlistcl@quote{#3}{#1}\space}%
+ \expandafter\let\csname #2\endcsname\minted@tmp}
+\newcommand{\minted@def@optcl@e}[4][]{%
+ \ifthenelse{\equal{#1}{}}%
+ {\define@key{minted@opt@g}{#2}{%
+ \minted@addto@optlistcl@e{\minted@optlistcl@g}{#3}{#4}%
+ \@namedef{minted@opt@g:#2}{#4}}%
+ \define@key{minted@opt@g@i}{#2}{%
+ \minted@addto@optlistcl@e{\minted@optlistcl@g@i}{#3}{#4}%
+ \@namedef{minted@opt@g@i:#2}{#4}}%
+ \define@key{minted@opt@lang}{#2}{%
+ \minted@addto@optlistcl@lang@e{minted@optlistcl@lang\minted@lang}{#3}{#4}%
+ \@namedef{minted@opt@lang\minted@lang:#2}{#4}}%
+ \define@key{minted@opt@lang@i}{#2}{%
+ \minted@addto@optlistcl@lang@e{%
+ minted@optlistcl@lang\minted@lang @i}{#3}{#4}%
+ \@namedef{minted@opt@lang\minted@lang @i:#2}{#4}}%
+ \define@key{minted@opt@cmd}{#2}{%
+ \minted@addto@optlistcl@e{\minted@optlistcl@cmd}{#3}{#4}%
+ \@namedef{minted@opt@cmd:#2}{#4}}}%
+ {\define@key{minted@opt@g}{#2}[#1]{%
+ \minted@addto@optlistcl@e{\minted@optlistcl@g}{#3}{#4}%
+ \@namedef{minted@opt@g:#2}{#4}}%
+ \define@key{minted@opt@g@i}{#2}[#1]{%
+ \minted@addto@optlistcl@e{\minted@optlistcl@g@i}{#3}{#4}%
+ \@namedef{minted@opt@g@i:#2}{#4}}%
+ \define@key{minted@opt@lang}{#2}[#1]{%
+ \minted@addto@optlistcl@lang@e{minted@optlistcl@lang\minted@lang}{#3}{#4}%
+ \@namedef{minted@opt@lang\minted@lang:#2}{#4}}%
+ \define@key{minted@opt@lang@i}{#2}[#1]{%
+ \minted@addto@optlistcl@lang@e{%
+ minted@optlistcl@lang\minted@lang @i}{#3}{#4}%
+ \@namedef{minted@opt@lang\minted@lang @i:#2}{#4}}%
+ \define@key{minted@opt@cmd}{#2}[#1]{%
+ \minted@addto@optlistcl@e{\minted@optlistcl@cmd}{#3}{#4}%
+ \@namedef{minted@opt@cmd:#2}{#4}}}%
+}
+\newcommand{\minted@def@optcl@switch}[2]{%
+ \define@booleankey{minted@opt@g}{#1}%
+ {\minted@addto@optlistcl{\minted@optlistcl@g}{#2}{True}%
+ \@namedef{minted@opt@g:#1}{true}}
+ {\minted@addto@optlistcl{\minted@optlistcl@g}{#2}{False}%
+ \@namedef{minted@opt@g:#1}{false}}
+ \define@booleankey{minted@opt@g@i}{#1}%
+ {\minted@addto@optlistcl{\minted@optlistcl@g@i}{#2}{True}%
+ \@namedef{minted@opt@g@i:#1}{true}}
+ {\minted@addto@optlistcl{\minted@optlistcl@g@i}{#2}{False}%
+ \@namedef{minted@opt@g@i:#1}{false}}
+ \define@booleankey{minted@opt@lang}{#1}%
+ {\minted@addto@optlistcl@lang{minted@optlistcl@lang\minted@lang}{#2}{True}%
+ \@namedef{minted@opt@lang\minted@lang:#1}{true}}
+ {\minted@addto@optlistcl@lang{minted@optlistcl@lang\minted@lang}{#2}{False}%
+ \@namedef{minted@opt@lang\minted@lang:#1}{false}}
+ \define@booleankey{minted@opt@lang@i}{#1}%
+ {\minted@addto@optlistcl@lang{minted@optlistcl@lang\minted@lang @i}{#2}{True}%
+ \@namedef{minted@opt@lang\minted@lang @i:#1}{true}}
+ {\minted@addto@optlistcl@lang{minted@optlistcl@lang\minted@lang @i}{#2}{False}%
+ \@namedef{minted@opt@lang\minted@lang @i:#1}{false}}
+ \define@booleankey{minted@opt@cmd}{#1}%
+ {\minted@addto@optlistcl{\minted@optlistcl@cmd}{#2}{True}%
+ \@namedef{minted@opt@cmd:#1}{true}}
+ {\minted@addto@optlistcl{\minted@optlistcl@cmd}{#2}{False}%
+ \@namedef{minted@opt@cmd:#1}{false}}
+}
+\newcommand{\minted@def@optfv}[1]{%
+ \define@key{minted@opt@g}{#1}{%
+ \expandafter\def\expandafter\minted@optlistfv@g\expandafter{%
+ \minted@optlistfv@g#1={##1},}%
+ \@namedef{minted@opt@g:#1}{##1}}
+ \define@key{minted@opt@g@i}{#1}{%
+ \expandafter\def\expandafter\minted@optlistfv@g@i\expandafter{%
+ \minted@optlistfv@g@i#1={##1},}%
+ \@namedef{minted@opt@g@i:#1}{##1}}
+ \define@key{minted@opt@lang}{#1}{%
+ \expandafter\let\expandafter\minted@tmp%
+ \csname minted@optlistfv@lang\minted@lang\endcsname
+ \expandafter\def\expandafter\minted@tmp\expandafter{%
+ \minted@tmp#1={##1},}%
+ \expandafter\let\csname minted@optlistfv@lang\minted@lang\endcsname%
+ \minted@tmp
+ \@namedef{minted@opt@lang\minted@lang:#1}{##1}}
+ \define@key{minted@opt@lang@i}{#1}{%
+ \expandafter\let\expandafter\minted@tmp%
+ \csname minted@optlistfv@lang\minted@lang @i\endcsname
+ \expandafter\def\expandafter\minted@tmp\expandafter{%
+ \minted@tmp#1={##1},}%
+ \expandafter\let\csname minted@optlistfv@lang\minted@lang @i\endcsname%
+ \minted@tmp
+ \@namedef{minted@opt@lang\minted@lang @i:#1}{##1}}
+ \define@key{minted@opt@cmd}{#1}{%
+ \expandafter\def\expandafter\minted@optlistfv@cmd\expandafter{%
+ \minted@optlistfv@cmd#1={##1},}%
+ \@namedef{minted@opt@cmd:#1}{##1}}
+}
+\newcommand{\minted@def@optfv@switch}[1]{%
+ \define@booleankey{minted@opt@g}{#1}%
+ {\expandafter\def\expandafter\minted@optlistfv@g\expandafter{%
+ \minted@optlistfv@g#1=true,}%
+ \@namedef{minted@opt@g:#1}{true}}%
+ {\expandafter\def\expandafter\minted@optlistfv@g\expandafter{%
+ \minted@optlistfv@g#1=false,}%
+ \@namedef{minted@opt@g:#1}{false}}%
+ \define@booleankey{minted@opt@g@i}{#1}%
+ {\expandafter\def\expandafter\minted@optlistfv@g@i\expandafter{%
+ \minted@optlistfv@g@i#1=true,}%
+ \@namedef{minted@opt@g@i:#1}{true}}%
+ {\expandafter\def\expandafter\minted@optlistfv@g@i\expandafter{%
+ \minted@optlistfv@g@i#1=false,}%
+ \@namedef{minted@opt@g@i:#1}{false}}%
+ \define@booleankey{minted@opt@lang}{#1}%
+ {\expandafter\let\expandafter\minted@tmp%
+ \csname minted@optlistfv@lang\minted@lang\endcsname
+ \expandafter\def\expandafter\minted@tmp\expandafter{%
+ \minted@tmp#1=true,}%
+ \expandafter\let\csname minted@optlistfv@lang\minted@lang\endcsname%
+ \minted@tmp
+ \@namedef{minted@opt@lang\minted@lang:#1}{true}}%
+ {\expandafter\let\expandafter\minted@tmp%
+ \csname minted@optlistfv@lang\minted@lang\endcsname
+ \expandafter\def\expandafter\minted@tmp\expandafter{%
+ \minted@tmp#1=false,}%
+ \expandafter\let\csname minted@optlistfv@lang\minted@lang\endcsname%
+ \minted@tmp
+ \@namedef{minted@opt@lang\minted@lang:#1}{false}}%
+ \define@booleankey{minted@opt@lang@i}{#1}%
+ {\expandafter\let\expandafter\minted@tmp%
+ \csname minted@optlistfv@lang\minted@lang @i\endcsname
+ \expandafter\def\expandafter\minted@tmp\expandafter{%
+ \minted@tmp#1=true,}%
+ \expandafter\let\csname minted@optlistfv@lang\minted@lang @i\endcsname%
+ \minted@tmp
+ \@namedef{minted@opt@lang\minted@lang @i:#1}{true}}%
+ {\expandafter\let\expandafter\minted@tmp%
+ \csname minted@optlistfv@lang\minted@lang @i\endcsname
+ \expandafter\def\expandafter\minted@tmp\expandafter{%
+ \minted@tmp#1=false,}%
+ \expandafter\let\csname minted@optlistfv@lang\minted@lang @i\endcsname%
+ \minted@tmp
+ \@namedef{minted@opt@lang\minted@lang @i:#1}{false}}%
+ \define@booleankey{minted@opt@cmd}{#1}%
+ {\expandafter\def\expandafter\minted@optlistfv@cmd\expandafter{%
+ \minted@optlistfv@cmd#1=true,}%
+ \@namedef{minted@opt@cmd:#1}{true}}%
+ {\expandafter\def\expandafter\minted@optlistfv@cmd\expandafter{%
+ \minted@optlistfv@cmd#1=false,}%
+ \@namedef{minted@opt@cmd:#1}{false}}%
+}
+\newboolean{minted@isinline}
+\newcommand{\minted@fvset}{%
+ \expandafter\fvset\expandafter{\minted@optlistfv@g}%
+ \expandafter\let\expandafter\minted@tmp%
+ \csname minted@optlistfv@lang\minted@lang\endcsname
+ \expandafter\fvset\expandafter{\minted@tmp}%
+ \ifthenelse{\boolean{minted@isinline}}%
+ {\expandafter\fvset\expandafter{\minted@optlistfv@g@i}%
+ \expandafter\let\expandafter\minted@tmp%
+ \csname minted@optlistfv@lang\minted@lang @i\endcsname
+ \expandafter\fvset\expandafter{\minted@tmp}}%
+ {}%
+ \expandafter\fvset\expandafter{\minted@optlistfv@cmd}%
+}
+\newcommand{\minted@def@opt}[2][]{%
+ \define@key{minted@opt@g}{#2}{%
+ \@namedef{minted@opt@g:#2}{##1}}
+ \define@key{minted@opt@g@i}{#2}{%
+ \@namedef{minted@opt@g@i:#2}{##1}}
+ \define@key{minted@opt@lang}{#2}{%
+ \@namedef{minted@opt@lang\minted@lang:#2}{##1}}
+ \define@key{minted@opt@lang@i}{#2}{%
+ \@namedef{minted@opt@lang\minted@lang @i:#2}{##1}}
+ \define@key{minted@opt@cmd}{#2}{%
+ \@namedef{minted@opt@cmd:#2}{##1}}
+ \ifstrempty{#1}{}{\@namedef{minted@opt@g:#2}{#1}}%
+}
+\newcommand{\minted@def@opt@detok}[2][]{%
+ \define@key{minted@opt@g}{#2}{%
+ \@namedef{minted@opt@g:#2}{\detokenize{##1}}}
+ \define@key{minted@opt@g@i}{#2}{%
+ \@namedef{minted@opt@g@i:#2}{\detokenize{##1}}}
+ \define@key{minted@opt@lang}{#2}{%
+ \@namedef{minted@opt@lang\minted@lang:#2}{\detokenize{##1}}}
+ \define@key{minted@opt@lang@i}{#2}{%
+ \@namedef{minted@opt@lang\minted@lang @i:#2}{\detokenize{##1}}}
+ \define@key{minted@opt@cmd}{#2}{%
+ \@namedef{minted@opt@cmd:#2}{\detokenize{##1}}}
+ \ifstrempty{#1}{}{\@namedef{minted@opt@g:#2}{\detokenize{#1}}}%
+}
+\newcommand{\minted@generate@PYGdef}[1]{%
+ \ifthenelse{\boolean{minted@cache}}%
+ {\def\minted@pygstylepath@load{\minted@outputdir\minted@cachedir/#1.pygstyle}%
+ \minted@addcachefile{#1.pygstyle}}%
+ {\def\minted@pygstylepath@load{\minted@outputdir\minted@jobname.out.pyg}}%
+ \ifwindows
+ \StrSubstitute{\minted@pygstylepath@load}%
+ {/}{\@backslashchar}[\minted@pygstylepath@save]%
+ \else
+ \let\minted@pygstylepath@save\minted@pygstylepath@load
+ \fi
+ \IfFileExists{\minted@pygstylepath@load}%
+ {}%
+ {\ifthenelse{\boolean{minted@frozencache}}%
+ {\PackageError{minted}%
+ {Missing style definition for #1 with frozencache}%
+ {Missing style definition for #1 with frozencache}}%
+ {}%
+ \ShellEscape{%
+ \MintedPygmentize\space -S #1 -f latex -P commandprefix=PYG
+ > \minted@pygstylepath@save
+ }%
+ }%
+ \CatchFileDef{\minted@tmp@filecontents}%
+ {\minted@pygstylepath@load}{\catcode`@=11\catcode`\%=14\catcode``=12\endlinechar=-1}%
+ \begingroup
+ \let\PYG\relax
+ \minted@tmp@filecontents
+ \ifx\PYG\relax
+ \ifthenelse{\boolean{minted@frozencache}}%
+ {\PackageError{minted}%
+ {Outdated style definition for #1 with frozencache}%
+ {Outdated style definition for #1 with frozencache}}%
+ {}%
+ \ShellEscape{%
+ \MintedPygmentize\space -S #1 -f latex -P commandprefix=PYG
+ > \minted@pygstylepath@save
+ }%
+ \CatchFileDef{\minted@tmp@filecontents}%
+ {\minted@pygstylepath@load}{\catcode`@=11\catcode`\%=14\catcode``=12\endlinechar=-1}%
+ \minted@tmp@filecontents
+ \ifx\PYG\relax
+ \PackageError{minted}%
+ {Cannot find Pygments style #1}%
+ {Cannot find Pygments style #1}%
+ \fi
+ \fi
+ \expandafter\global\expandafter\let\csname minted@PYGdef@#1\endcsname%
+ \minted@tmp@filecontents
+ \endgroup
+}
+\newcommand{\minted@defstyle}[1]{%
+ \edef\minted@style{#1}%
+ \ifcsname minted@PYGdef@\minted@style\endcsname\else
+ \expandafter\minted@generate@PYGdef\expandafter{\minted@style}%
+ \fi
+ \csname minted@PYGdef@\minted@style\endcsname
+ \minted@patch@PYGZsq
+ \minted@patch@PYGZhy
+ \ifthenelse{\equal{\minted@get@opt{ignorelexererrors}{true}}{true}}%
+ {\let\PYG@tok@err\relax}{}}
+\ifthenelse{\boolean{minted@draft}}{\renewcommand{\minted@defstyle}[1]{}}{}
+\newcommand{\minted@patch@PYGZsq}{%
+ \ifcsname PYGZsq\endcsname
+ \expandafter\ifdefstring\expandafter{\csname PYGZsq\endcsname}{\char`\'}%
+ {\minted@patch@PYGZsq@i}%
+ {}%
+ \fi
+}
+\begingroup
+\catcode`\'=\active
+\gdef\minted@patch@PYGZsq@i{\gdef\PYGZsq{'}}
+\endgroup
+\newcommand{\minted@patch@PYGZhy}{%
+ \ifcsname PYGZhy\endcsname
+ \expandafter\ifdefstring\expandafter{\csname PYGZhy\endcsname}{\char`\-}%
+ {\def\PYGZhy{\mbox{-}}}%
+ {}%
+ \fi
+}
+\newcommand{\minted@def@opt@switch}[2][false]{%
+ \define@booleankey{minted@opt@g}{#2}%
+ {\@namedef{minted@opt@g:#2}{true}}%
+ {\@namedef{minted@opt@g:#2}{false}}
+ \define@booleankey{minted@opt@g@i}{#2}%
+ {\@namedef{minted@opt@g@i:#2}{true}}%
+ {\@namedef{minted@opt@g@i:#2}{false}}
+ \define@booleankey{minted@opt@lang}{#2}%
+ {\@namedef{minted@opt@lang\minted@lang:#2}{true}}%
+ {\@namedef{minted@opt@lang\minted@lang:#2}{false}}
+ \define@booleankey{minted@opt@lang@i}{#2}%
+ {\@namedef{minted@opt@lang\minted@lang @i:#2}{true}}%
+ {\@namedef{minted@opt@lang\minted@lang @i:#2}{false}}
+ \define@booleankey{minted@opt@cmd}{#2}%
+ {\@namedef{minted@opt@cmd:#2}{true}}%
+ {\@namedef{minted@opt@cmd:#2}{false}}%
+ \@namedef{minted@opt@g:#2}{#1}%
+}
+\def\minted@get@opt#1#2{%
+ \ifcsname minted@opt@cmd:#1\endcsname
+ \csname minted@opt@cmd:#1\endcsname
+ \else
+ \ifminted@isinline
+ \ifcsname minted@opt@lang\minted@lang @i:#1\endcsname
+ \csname minted@opt@lang\minted@lang @i:#1\endcsname
+ \else
+ \ifcsname minted@opt@g@i:#1\endcsname
+ \csname minted@opt@g@i:#1\endcsname
+ \else
+ \ifcsname minted@opt@lang\minted@lang:#1\endcsname
+ \csname minted@opt@lang\minted@lang:#1\endcsname
+ \else
+ \ifcsname minted@opt@g:#1\endcsname
+ \csname minted@opt@g:#1\endcsname
+ \else
+ #2%
+ \fi
+ \fi
+ \fi
+ \fi
+ \else
+ \ifcsname minted@opt@lang\minted@lang:#1\endcsname
+ \csname minted@opt@lang\minted@lang:#1\endcsname
+ \else
+ \ifcsname minted@opt@g:#1\endcsname
+ \csname minted@opt@g:#1\endcsname
+ \else
+ #2%
+ \fi
+ \fi
+ \fi
+ \fi
+}%
+\minted@def@optcl{encoding}{-P encoding}{#1}
+\minted@def@optcl{outencoding}{-P outencoding}{#1}
+\minted@def@optcl@e{escapeinside}{-P escapeinside}{#1}
+\minted@def@optcl@switch{stripnl}{-P stripnl}
+\minted@def@optcl@switch{stripall}{-P stripall}
+\minted@def@optcl@switch{python3}{-P python3}
+\minted@def@optcl@switch{funcnamehighlighting}{-P funcnamehighlighting}
+\minted@def@optcl@switch{startinline}{-P startinline}
+\ifthenelse{\boolean{minted@draft}}%
+ {\minted@def@optfv{gobble}}%
+ {\minted@def@optcl{gobble}{-F gobble:n}{#1}}
+\minted@def@optcl{codetagify}{-F codetagify:codetags}{#1}
+\minted@def@optcl{keywordcase}{-F keywordcase:case}{#1}
+\minted@def@optcl@switch{texcl}{-P texcomments}
+\minted@def@optcl@switch{texcomments}{-P texcomments}
+\minted@def@optcl@switch{mathescape}{-P mathescape}
+\minted@def@optfv@switch{linenos}
+\minted@def@opt@detok{style}
+\minted@def@optfv{frame}
+\minted@def@optfv{framesep}
+\minted@def@optfv{framerule}
+\minted@def@optfv{rulecolor}
+\minted@def@optfv{numbersep}
+\minted@def@optfv{numbers}
+\minted@def@optfv{firstnumber}
+\minted@def@optfv{stepnumber}
+\minted@def@optfv{firstline}
+\minted@def@optfv{lastline}
+\minted@def@optfv{baselinestretch}
+\minted@def@optfv{xleftmargin}
+\minted@def@optfv{xrightmargin}
+\minted@def@optfv{fillcolor}
+\minted@def@optfv{tabsize}
+\minted@def@optfv{fontfamily}
+\minted@def@optfv{fontsize}
+\minted@def@optfv{fontshape}
+\minted@def@optfv{fontseries}
+\minted@def@optfv{formatcom}
+\minted@def@optfv{label}
+\minted@def@optfv{labelposition}
+\minted@def@optfv{highlightlines}
+\minted@def@optfv{highlightcolor}
+\minted@def@optfv{space}
+\minted@def@optfv{spacecolor}
+\minted@def@optfv{tab}
+\minted@def@optfv{tabcolor}
+\minted@def@optfv{highlightcolor}
+\minted@def@optfv@switch{beameroverlays}
+\minted@def@optfv@switch{curlyquotes}
+\minted@def@optfv@switch{numberfirstline}
+\minted@def@optfv@switch{numberblanklines}
+\minted@def@optfv@switch{stepnumberfromfirst}
+\minted@def@optfv@switch{stepnumberoffsetvalues}
+\minted@def@optfv@switch{showspaces}
+\minted@def@optfv@switch{resetmargins}
+\minted@def@optfv@switch{samepage}
+\minted@def@optfv@switch{showtabs}
+\minted@def@optfv@switch{obeytabs}
+\minted@def@optfv@switch{breaklines}
+\minted@def@optfv@switch{breakbytoken}
+\minted@def@optfv@switch{breakbytokenanywhere}
+\minted@def@optfv{breakindent}
+\minted@def@optfv{breakindentnchars}
+\minted@def@optfv@switch{breakautoindent}
+\minted@def@optfv{breaksymbol}
+\minted@def@optfv{breaksymbolsep}
+\minted@def@optfv{breaksymbolsepnchars}
+\minted@def@optfv{breaksymbolindent}
+\minted@def@optfv{breaksymbolindentnchars}
+\minted@def@optfv{breaksymbolleft}
+\minted@def@optfv{breaksymbolsepleft}
+\minted@def@optfv{breaksymbolsepleftnchars}
+\minted@def@optfv{breaksymbolindentleft}
+\minted@def@optfv{breaksymbolindentleftnchars}
+\minted@def@optfv{breaksymbolright}
+\minted@def@optfv{breaksymbolsepright}
+\minted@def@optfv{breaksymbolseprightnchars}
+\minted@def@optfv{breaksymbolindentright}
+\minted@def@optfv{breaksymbolindentrightnchars}
+\minted@def@optfv{breakbefore}
+\minted@def@optfv{breakbeforesymbolpre}
+\minted@def@optfv{breakbeforesymbolpost}
+\minted@def@optfv@switch{breakbeforeinrun}
+\minted@def@optfv{breakafter}
+\minted@def@optfv@switch{breakafterinrun}
+\minted@def@optfv{breakaftersymbolpre}
+\minted@def@optfv{breakaftersymbolpost}
+\minted@def@optfv@switch{breakanywhere}
+\minted@def@optfv{breakanywheresymbolpre}
+\minted@def@optfv{breakanywheresymbolpost}
+\minted@def@optfv{fontencoding}
+\minted@def@opt{bgcolor}
+\minted@def@opt@switch{autogobble}
+\minted@def@opt@switch{ignorelexererrors}
+\newcommand{\minted@encoding}{\minted@get@opt{encoding}{UTF8}}
+\newenvironment{minted@snugshade*}[1]{%
+ \def\FrameCommand##1{\hskip\@totalleftmargin
+ \colorbox{#1}{##1}%
+ \hskip-\linewidth \hskip-\@totalleftmargin \hskip\columnwidth}%
+ \MakeFramed{\advance\hsize-\width
+ \@totalleftmargin\z@ \linewidth\hsize
+ \advance\labelsep\fboxsep
+ \@setminipage}%
+ }{\par\unskip\@minipagefalse\endMakeFramed}
+\newsavebox{\minted@bgbox}
+\newenvironment{minted@colorbg}[1]{%
+ \setlength{\OuterFrameSep}{0pt}%
+ \let\minted@tmp\FV@NumberSep
+ \edef\FV@NumberSep{%
+ \the\numexpr\dimexpr\minted@tmp+\number\fboxsep\relax sp\relax}%
+ \medskip
+ \begin{minted@snugshade*}{#1}}
+ {\end{minted@snugshade*}%
+ \medskip\noindent}
+\newwrite\minted@code
+\newcommand{\minted@savecode}[1]{
+ \immediate\openout\minted@code\minted@jobname.pyg\relax
+ \immediate\write\minted@code{\expandafter\detokenize\expandafter{#1}}%
+ \immediate\closeout\minted@code}
+\newcounter{minted@FancyVerbLineTemp}
+\newcommand{\minted@write@detok}[1]{%
+ \immediate\write\FV@OutFile{\detokenize{#1}}}
+\newcommand{\minted@FVB@VerbatimOut}[1]{%
+ \setcounter{minted@FancyVerbLineTemp}{\value{FancyVerbLine}}%
+ \@bsphack
+ \begingroup
+ \FV@UseKeyValues
+ \FV@DefineWhiteSpace
+ \def\FV@Space{\space}%
+ \FV@DefineTabOut
+ \let\FV@ProcessLine\minted@write@detok
+ \immediate\openout\FV@OutFile #1\relax
+ \let\FV@FontScanPrep\relax
+ \let\@noligs\relax
+ \FV@Scan}
+\newcommand{\minted@FVE@VerbatimOut}{%
+ \immediate\closeout\FV@OutFile\endgroup\@esphack
+ \setcounter{FancyVerbLine}{\value{minted@FancyVerbLineTemp}}}%
+\ifcsname MintedPygmentize\endcsname\else
+ \newcommand{\MintedPygmentize}{pygmentize}
+\fi
+\newcounter{minted@pygmentizecounter}
+\ifwindows
+ \newcommand{\MintedPython}{python}
+\else
+ \newcommand{\MintedPython}{python3}
+\fi
+\newcommand{\minted@check@MintedPython}{%
+ \ifcsname minted@MintedPython@\MintedPython\endcsname
+ \else
+ \let\minted@altpython\minted@undefined
+ \ifdefstring{\MintedPython}{python}{\def\minted@altpython{python3}}{}%
+ \ifdefstring{\MintedPython}{python3}{\def\minted@altpython{python}}{}%
+ \ifx\minted@altpython\minted@undefined\relax
+ \TestAppExists{\MintedPython}%
+ \ifAppExists
+ \expandafter\global\expandafter\let%
+ \csname minted@MintedPython@\MintedPython\endcsname\relax
+ \else
+ \PackageError{minted}%
+ {Failed to find Python executable \MintedPython;
+ check Python installation (including PATH),
+ or redefine \string\MintedPython}%
+ {Failed to find Python executable \MintedPython;
+ check Python installation (including PATH),
+ or redefine \string\MintedPython}%
+ \fi
+ \else
+ \ifcsname minted@MintedPython@\minted@altpython\endcsname
+ \let\MintedPython\minted@altpython
+ \else
+ \TestAppExists{\MintedPython}%
+ \ifAppExists
+ \expandafter\global\expandafter\let%
+ \csname minted@MintedPython@\MintedPython\endcsname\relax
+ \else
+ \TestAppExists{\minted@altpython}%
+ \ifAppExists
+ \expandafter\global\expandafter\let%
+ \csname minted@MintedPython@\minted@altpython\endcsname\relax
+ \let\MintedPython\minted@altpython
+ \else
+ \PackageError{minted}%
+ {Failed to find Python executables python or python3;
+ check Python installation (including PATH),
+ or redefine \string\MintedPython}%
+ {Failed to find Python executables python or python3;
+ check Python installation (including PATH),
+ or redefine \string\MintedPython}%
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+}
+\ifwindows
+ \def\minted@opt@quote#1{\detokenize{"#1"}}
+\else
+ \def\minted@opt@quote#1{\detokenize{'#1'}}
+\fi
+\newcommand{\minted@pygmentize}[2][\minted@outputdir\minted@jobname.pyg]{%
+ \minted@defstyle{\minted@get@opt{style}{default}}%
+ \stepcounter{minted@pygmentizecounter}%
+ \ifthenelse{\equal{\minted@get@opt{autogobble}{false}}{true}}%
+ {\def\minted@codefile{\minted@outputdir\minted@jobname.pyg}}%
+ {\def\minted@codefile{#1}}%
+ \ifthenelse{\boolean{minted@isinline}}%
+ {\def\minted@optlistcl@inlines{%
+ \minted@optlistcl@g@i
+ \csname minted@optlistcl@lang\minted@lang @i\endcsname}}%
+ {\let\minted@optlistcl@inlines\@empty}%
+ \def\minted@cmd{%
+ \ifminted@kpsewhich
+ \ifwindows
+ \detokenize{for /f "usebackq tokens=*"}\space\@percentchar\detokenize{a in (`kpsewhich}\space\minted@codefile\detokenize{`) do}\space
+ \fi
+ \fi
+ \MintedPygmentize\space -l \minted@opt@quote{#2}
+ -f latex -P commandprefix=PYG -F tokenmerge
+ \minted@optlistcl@g \csname minted@optlistcl@lang\minted@lang\endcsname
+ \minted@optlistcl@inlines
+ \minted@optlistcl@cmd -o \minted@outputdir\minted@infile\space
+ \ifminted@kpsewhich
+ \ifwindows
+ \@percentchar\detokenize{a}%
+ \else
+ \detokenize{`}kpsewhich \minted@codefile\space
+ \detokenize{||} \minted@codefile\detokenize{`}%
+ \fi
+ \else
+ \minted@codefile
+ \fi}%
+ % For debugging, uncomment: %%%%
+ % \immediate\typeout{\minted@cmd}%
+ % %%%%
+ \ifthenelse{\boolean{minted@cache}}%
+ {%
+ \ifminted@frozencache
+ \else
+ \ifthenelse{\equal{\minted@get@opt{autogobble}{false}}{true}}%
+ {\edef\minted@hash{%
+ \pdf@filemdfivesum{#1}%
+ \pdf@mdfivesum{\minted@cmd\space%
+ autogobble(\the\numexpr\FancyVerbStartNum\relax-%
+ \the\numexpr\FancyVerbStopNum\relax)}}}%
+ {\edef\minted@hash{%
+ \pdf@filemdfivesum{#1}%
+ \pdf@mdfivesum{\minted@cmd}}}%
+ \edef\minted@infile{\minted@cachedir/\minted@hash.pygtex}%
+ \IfFileExists{\minted@infile}{}{%
+ \ifthenelse{\equal{\minted@get@opt{autogobble}{false}}{true}}{%
+ \minted@autogobble{#1}}{}%
+ \ShellEscape{\minted@cmd}}%
+ \fi
+ \ifthenelse{\boolean{minted@finalizecache}}%
+ {%
+ \edef\minted@cachefilename{listing\arabic{minted@pygmentizecounter}.pygtex}%
+ \edef\minted@actualinfile{\minted@cachedir/\minted@cachefilename}%
+ \ifwindows
+ \StrSubstitute{\minted@infile}{/}{\@backslashchar}[\minted@infile@windows]
+ \StrSubstitute{\minted@actualinfile}{/}{\@backslashchar}[\minted@actualinfile@windows]
+ \ShellEscape{move /y \minted@outputdir\minted@infile@windows\space\minted@outputdir\minted@actualinfile@windows}%
+ \else
+ \ShellEscape{mv -f \minted@outputdir\minted@infile\space\minted@outputdir\minted@actualinfile}%
+ \fi
+ \let\minted@infile\minted@actualinfile
+ \expandafter\minted@addcachefile\expandafter{\minted@cachefilename}%
+ }%
+ {\ifthenelse{\boolean{minted@frozencache}}%
+ {%
+ \edef\minted@cachefilename{listing\arabic{minted@pygmentizecounter}.pygtex}%
+ \edef\minted@infile{\minted@cachedir/\minted@cachefilename}%
+ \expandafter\minted@addcachefile\expandafter{\minted@cachefilename}}%
+ {\expandafter\minted@addcachefile\expandafter{\minted@hash.pygtex}}%
+ }%
+ \minted@inputpyg}%
+ {%
+ \ifthenelse{\equal{\minted@get@opt{autogobble}{false}}{true}}{%
+ \minted@autogobble{#1}}{}%
+ \ShellEscape{\minted@cmd}%
+ \minted@inputpyg}%
+}
+\def\minted@autogobble#1{%
+ \edef\minted@argone@esc{#1}%
+ \StrSubstitute{\minted@argone@esc}{\@backslashchar}{\@backslashchar\@backslashchar}[\minted@argone@esc]%
+ \StrSubstitute{\minted@argone@esc}{"}{\@backslashchar"}[\minted@argone@esc]%
+ \edef\minted@tmpfname@esc{\minted@outputdir\minted@jobname}%
+ \StrSubstitute{\minted@tmpfname@esc}{\@backslashchar}{\@backslashchar\@backslashchar}[\minted@tmpfname@esc]%
+ \StrSubstitute{\minted@tmpfname@esc}{"}{\@backslashchar"}[\minted@tmpfname@esc]%
+ %Need a version of open() that supports encoding under Python 2
+ \minted@check@MintedPython
+ \edef\minted@autogobblecmd{%
+ \ifminted@kpsewhich
+ \ifwindows
+ \detokenize{for /f "usebackq tokens=*" }\@percentchar\detokenize{a in (`kpsewhich} #1\detokenize{`) do}\space
+ \fi
+ \fi
+ \MintedPython\detokenize{ -c "import sys; import os;
+ import textwrap;
+ from io import open;
+ fname = }%
+ \ifminted@kpsewhich
+ \detokenize{sys.argv[1];}\space
+ \else
+ \detokenize{os.path.expanduser(os.path.expandvars(\"}\minted@argone@esc\detokenize{\"));}\space
+ \fi
+ \detokenize{f = open(fname, \"r\", encoding=\"}\minted@encoding\detokenize{\") if os.path.isfile(fname) else None;
+ t = f.readlines() if f is not None else None;
+ t_opt = t if t is not None else [];
+ f.close() if f is not None else None;
+ tmpfname = os.path.expanduser(os.path.expandvars(\"}\minted@tmpfname@esc.pyg\detokenize{\"));
+ f = open(tmpfname, \"w\", encoding=\"}\minted@encoding\detokenize{\") if t is not None else None;
+ fvstartnum = }\the\numexpr\FancyVerbStartNum\detokenize{;
+ fvstopnum = }\the\numexpr\FancyVerbStopNum\detokenize{;
+ s = max(0, fvstartnum-1);
+ e = max(s, fvstopnum) if fvstopnum > 0 else len(t_opt);
+ [f.write(textwrap.dedent(\"\".join(x))) for x in (t_opt[0:s], t_opt[s:e], t_opt[e:]) if x and t is not None];
+ f.close() if t is not None else os.remove(tmpfname);"}%
+ \ifminted@kpsewhich
+ \ifwindows
+ \space\@percentchar\detokenize{a}%
+ \else
+ \space\detokenize{`}kpsewhich #1\space\detokenize{||} #1\detokenize{`}%
+ \fi
+ \fi
+ }%
+ \ShellEscape{\minted@autogobblecmd}%
+}
+\newcommand{\minted@inputpyg}{%
+ \VerbatimPygments{\PYG}{\PYG}%
+ \ifthenelse{\boolean{minted@isinline}}%
+ {\ifthenelse{\equal{\minted@get@opt{breaklines}{false}}{true}}%
+ {\let\FV@BeginVBox\relax
+ \let\FV@EndVBox\relax
+ \def\FV@BProcessLine##1{\FancyVerbFormatLine{##1}}%
+ \minted@inputpyg@inline}%
+ {\minted@inputpyg@inline}}%
+ {\minted@inputpyg@block}%
+}
+\def\minted@inputpyg@inline{%
+ \ifthenelse{\equal{\minted@get@opt{bgcolor}{}}{}}%
+ {\minted@input{\minted@outputdir\minted@infile}}%
+ {\colorbox{\minted@get@opt{bgcolor}{}}{%
+ \minted@input{\minted@outputdir\minted@infile}}}%
+}
+\def\minted@inputpyg@block{%
+ \ifthenelse{\equal{\minted@get@opt{bgcolor}{}}{}}%
+ {\minted@input{\minted@outputdir\minted@infile}}%
+ {\begin{minted@colorbg}{\minted@get@opt{bgcolor}{}}%
+ \minted@input{\minted@outputdir\minted@infile}%
+ \end{minted@colorbg}}}
+\newcommand{\minted@langlinenoson}{%
+ \ifcsname c@minted@lang\minted@lang\endcsname\else
+ \newcounter{minted@lang\minted@lang}%
+ \fi
+ \setcounter{minted@FancyVerbLineTemp}{\value{FancyVerbLine}}%
+ \setcounter{FancyVerbLine}{\value{minted@lang\minted@lang}}%
+}
+\newcommand{\minted@langlinenosoff}{%
+ \setcounter{minted@lang\minted@lang}{\value{FancyVerbLine}}%
+ \setcounter{FancyVerbLine}{\value{minted@FancyVerbLineTemp}}%
+}
+\ifbool{minted@langlinenos}{}{%
+ \ifbool{minted@inputlanglinenos}{}{%
+ \let\minted@langlinenoson\relax
+ \let\minted@langlinenosoff\relax
+ }
+}
+\ifbool{minted@inputlanglinenos}%
+ {\def\minted@inputlanglinenoson{\minted@langlinenoson}%
+ \def\minted@inputlanglinenosoff{\minted@langlinenosoff}}%
+ {\let\minted@inputlanglinenoson\relax
+ \let\minted@inputlanglinenosoff\relax}
+\newcommand{\setminted}[2][]{%
+ \ifthenelse{\equal{#1}{}}%
+ {\setkeys{minted@opt@g}{#2}}%
+ {\minted@configlang{#1}%
+ \setkeys{minted@opt@lang}{#2}}}
+\newcommand{\setmintedinline}[2][]{%
+ \ifthenelse{\equal{#1}{}}%
+ {\setkeys{minted@opt@g@i}{#2}}%
+ {\minted@configlang{#1}%
+ \setkeys{minted@opt@lang@i}{#2}}}
+\setmintedinline[php]{startinline=true}
+\setminted{tabcolor=black}
+\setminted{stripnl=false}
+\newcommand{\usemintedstyle}[2][]{\setminted[#1]{style=#2}}
+\begingroup
+\catcode`\ =\active
+\catcode`\^^I=\active
+\gdef\minted@defwhitespace@retok{\def {\noexpand\FV@Space}\def^^I{\noexpand\FV@Tab}}%
+\endgroup
+\newcommand{\minted@writecmdcode}[1]{%
+ \immediate\openout\minted@code\minted@jobname.pyg\relax
+ \immediate\write\minted@code{\detokenize{#1}}%
+ \immediate\closeout\minted@code}
+\def\mintinline{%
+ \FVExtraRobustCommand\RobustMintInline\FVExtraUnexpandedReadStarOArgMArgBVArg}
+\FVExtrapdfstringdefDisableCommands{%
+ \def\RobustMintInline{}}
+\newrobustcmd{\RobustMintInline}[2][]{%
+ \ifbool{FVExtraRobustCommandExpanded}%
+ {\@ifnextchar\bgroup
+ {\FVExtraReadVArg{\RobustMintInlineProcess{#1}{#2}}}%
+ {\PackageError{minted}%
+ {Inline delimiters must be paired curly braces in this context}%
+ {Use curly braces as delimiters}}}%
+ {\FVExtraReadVArg{\RobustMintInlineProcess{#1}{#2}}}}
+\def\RobustMintInlineProcess#1#2#3{%
+ \begingroup
+ \setboolean{minted@isinline}{true}%
+ \minted@configlang{#2}%
+ \setkeys{minted@opt@cmd}{#1}%
+ \minted@fvset
+ \RobustMintInlineProcess@i{#3}}
+\ifthenelse{\boolean{minted@draft}}%
+ {\def\RobustMintInlineProcess@i#1{%
+ \fvset{extra=true}%
+ \Verb{#1}%
+ \endgroup}}%
+ {\def\RobustMintInlineProcess@i#1{%
+ \FVExtraDetokenizeVArg{%
+ \FVExtraRetokenizeVArg{\RobustMintInlineProcess@ii}{\FV@CatCodes}}{#1}}
+ \def\RobustMintInlineProcess@ii#1{%
+ \minted@writecmdcode{#1}%
+ \let\Verbatim\VerbEnv
+ \let\endVerbatim\endVerbEnv
+ \expandafter\minted@pygmentize\expandafter{\minted@lang}%
+ \endgroup}}
+\def\mint{%
+ \FVExtraRobustCommand\RobustMint\FVExtraUnexpandedReadStarOArgMArgBVArg}
+\FVExtrapdfstringdefDisableCommands{%
+ \def\RobustMint{}}
+\newrobustcmd{\RobustMint}[2][]{%
+ \ifbool{FVExtraRobustCommandExpanded}%
+ {\@ifnextchar\bgroup
+ {\FVExtraReadVArg{\RobustMintProcess{#1}{#2}}}%
+ {\PackageError{minted}%
+ {Delimiters must be paired curly braces in this context}%
+ {Use curly braces as delimiters}}}%
+ {\FVExtraReadVArg{\RobustMintProcess{#1}{#2}}}}
+\def\RobustMintProcess#1#2#3{%
+ \begingroup
+ \minted@configlang{#2}%
+ \setkeys{minted@opt@cmd}{#1}%
+ \minted@fvset
+ \RobustMintProcess@i{#3}}
+\begingroup
+\catcode`\^^M=\active%
+\catcode`\<=1%
+\catcode`\>=2%
+\catcode`\{=12%
+\catcode`\}=12%
+\catcode`\!=0%
+\catcode`\\=12%
+!ifthenelse<!boolean<minted@draft>>%
+ <!gdef!RobustMintProcess@i#1<%
+ !FVExtraDetokenizeVArg<%
+ !FVExtraRetokenizeVArg<!RobustMintProcess@ii><!FV@CatCodes>><#1>>%
+ !gdef!RobustMintProcess@ii#1<%
+ !minted@langlinenoson%
+ !scantokens<%
+ \begin{Verbatim}
+ #1
+ \end{Verbatim}
+ !noexpand>%
+ !minted@langlinenosoff%
+ !endgroup!@doendpe>>%
+ <!gdef!RobustMintProcess@i#1<%
+ !FVExtraDetokenizeVArg<%
+ !FVExtraRetokenizeVArg<!RobustMintProcess@ii><!FV@CatCodes>><#1>>%
+ !gdef!RobustMintProcess@ii#1<%
+ !minted@writecmdcode<#1>%
+ !minted@langlinenoson%
+ !expandafter!minted@pygmentize!expandafter<!minted@lang>%
+ !minted@langlinenosoff%
+ !endgroup!@doendpe>>%
+!endgroup
+\ifthenelse{\boolean{minted@draft}}%
+ {\newenvironment{minted}[2][]
+ {\VerbatimEnvironment
+ \minted@configlang{#2}%
+ \setkeys{minted@opt@cmd}{#1}%
+ \minted@fvset
+ \minted@langlinenoson
+ \begin{Verbatim}}%
+ {\end{Verbatim}%
+ \minted@langlinenosoff}}%
+ {\newenvironment{minted}[2][]
+ {\VerbatimEnvironment
+ \let\FVB@VerbatimOut\minted@FVB@VerbatimOut
+ \let\FVE@VerbatimOut\minted@FVE@VerbatimOut
+ \minted@configlang{#2}%
+ \setkeys{minted@opt@cmd}{#1}%
+ \minted@fvset
+ \begin{VerbatimOut}[codes={\catcode`\^^I=12},firstline,lastline]{\minted@jobname.pyg}}%
+ {\end{VerbatimOut}%
+ \minted@langlinenoson
+ \expandafter\minted@pygmentize\expandafter{\minted@lang}%
+ \minted@langlinenosoff}}
+\ifthenelse{\boolean{minted@draft}}%
+ {\newcommand{\inputminted}[3][]{%
+ \begingroup
+ \minted@configlang{#2}%
+ \setkeys{minted@opt@cmd}{#1}%
+ \minted@fvset
+ \minted@inputlanglinenoson
+ \VerbatimInput{#3}%
+ \minted@inputlanglinenosoff
+ \endgroup}}%
+ {\newcommand{\inputminted}[3][]{%
+ \begingroup
+ \minted@configlang{#2}%
+ \setkeys{minted@opt@cmd}{#1}%
+ \minted@fvset
+ \minted@inputlanglinenoson
+ \minted@pygmentize[#3]{#2}%
+ \minted@inputlanglinenosoff
+ \endgroup}}
+\newcommand{\newminted}[3][]{
+ \ifthenelse{\equal{#1}{}}
+ {\def\minted@envname{#2code}}
+ {\def\minted@envname{#1}}
+ \newenvironment{\minted@envname}
+ {\VerbatimEnvironment
+ \begin{minted}[#3]{#2}}
+ {\end{minted}}
+ \newenvironment{\minted@envname *}[1]
+ {\VerbatimEnvironment\begin{minted}[#3,##1]{#2}}
+ {\end{minted}}}
+\newcommand{\newmint}[3][]{%
+ \if\relax\detokenize{#1}\relax
+ \def\minted@shortname{#2}%
+ \else
+ \def\minted@shortname{#1}%
+ \fi
+ \expandafter\newmint@i\expandafter{\minted@shortname}{#2}{#3}}
+\def\newmint@i#1#2#3{%
+ \expandafter\newcommand\csname#1\endcsname{%
+ \expandafter\FVExtraRobustCommand\csname RobustNewMint#1\endcsname
+ \FVExtraUnexpandedReadStarOArgBVArg}%
+ \FVExtrapdfstringdefDisableCommands{%
+ \expandafter\def\csname RobustNewMint#1\endcsname{}}%
+ \expandafter\newrobustcmd\csname RobustNewMint#1\endcsname{%
+ \FVExtraReadOArgBeforeVArg{\csname RobustNewMint#1@i\endcsname}}%
+ \expandafter\def\csname RobustNewMint#1@i\endcsname##1{%
+ \ifbool{FVExtraRobustCommandExpanded}%
+ {\@ifnextchar\bgroup
+ {\FVExtraReadVArg{\csname RobustNewMint#1@ii\endcsname{##1}}}%
+ {\PackageError{minted}%
+ {Delimiters must be paired curly braces in this context}%
+ {Use curly braces as delimiters}}}%
+ {\FVExtraReadVArg{\csname RobustNewMint#1@ii\endcsname{##1}}}}
+ \expandafter\def\csname RobustNewMint#1@ii\endcsname##1##2{%
+ \RobustMintProcess{#3,##1}{#2}{##2}}}
+\newcommand{\newmintedfile}[3][]{
+ \ifthenelse{\equal{#1}{}}
+ {\def\minted@shortname{#2file}}
+ {\def\minted@shortname{#1}}
+ \expandafter\newcommand\csname\minted@shortname\endcsname[2][]{
+ \inputminted[#3,##1]{#2}{##2}}}
+\newcommand{\newmintinline}[3][]{%
+ \if\relax\detokenize{#1}\relax
+ \def\minted@shortname{#2inline}%
+ \else
+ \def\minted@shortname{#1}%
+ \fi
+ \expandafter\newmintinline@i\expandafter{\minted@shortname}{#2}{#3}}
+\def\newmintinline@i#1#2#3{%
+ \expandafter\newcommand\csname#1\endcsname{%
+ \expandafter\FVExtraRobustCommand\csname RobustNewMintInline#1\endcsname
+ \FVExtraUnexpandedReadStarOArgBVArg}%
+ \FVExtrapdfstringdefDisableCommands{%
+ \expandafter\def\csname RobustNewMintInline#1\endcsname{}}%
+ \expandafter\newrobustcmd\csname RobustNewMintInline#1\endcsname{%
+ \FVExtraReadOArgBeforeVArg{\csname RobustNewMintInline#1@i\endcsname}}%
+ \expandafter\def\csname RobustNewMintInline#1@i\endcsname##1{%
+ \ifbool{FVExtraRobustCommandExpanded}%
+ {\@ifnextchar\bgroup
+ {\FVExtraReadVArg{\csname RobustNewMintInline#1@ii\endcsname{##1}}}%
+ {\PackageError{minted}%
+ {Inline delimiters must be paired curly braces in this context}%
+ {Use curly braces as delimiters}}}%
+ {\FVExtraReadVArg{\csname RobustNewMintInline#1@ii\endcsname{##1}}}}
+ \expandafter\def\csname RobustNewMintInline#1@ii\endcsname##1##2{%
+ \RobustMintInlineProcess{#3,##1}{#2}{##2}}}
+\ifthenelse{\boolean{minted@newfloat}}%
+ {\@ifundefined{minted@float@within}%
+ {\DeclareFloatingEnvironment[fileext=lol,placement=tbp]{listing}}%
+ {\def\minted@tmp#1{%
+ \DeclareFloatingEnvironment[fileext=lol,placement=tbp, within=#1]{listing}}%
+ \expandafter\minted@tmp\expandafter{\minted@float@within}}}%
+ {\@ifundefined{minted@float@within}%
+ {\newfloat{listing}{tbp}{lol}}%
+ {\newfloat{listing}{tbp}{lol}[\minted@float@within]}}
+\ifminted@newfloat\else
+\newcommand{\listingscaption}{Listing}
+\floatname{listing}{\listingscaption}
+\newcommand{\listoflistingscaption}{List of Listings}
+\providecommand{\listoflistings}{\listof{listing}{\listoflistingscaption}}
+\fi
+\AtEndOfPackage{%
+ \ifthenelse{\boolean{minted@draft}}%
+ {}%
+ {%
+ \ifthenelse{\boolean{minted@frozencache}}{}{%
+ \ifnum\pdf@shellescape=1\relax\else
+ \PackageError{minted}%
+ {You must invoke LaTeX with the
+ -shell-escape flag}%
+ {Pass the -shell-escape flag to LaTeX. Refer to the minted.sty
+ documentation for more information.}%
+ \fi}%
+ }%
+}
+\AtEndPreamble{%
+ \ifthenelse{\boolean{minted@draft}}%
+ {}%
+ {%
+ \ifthenelse{\boolean{minted@frozencache}}{}{%
+ \TestAppExists{\MintedPygmentize}%
+ \ifAppExists\else
+ \PackageError{minted}%
+ {You must have `pygmentize' installed
+ to use this package}%
+ {Refer to the installation instructions in the minted
+ documentation for more information.}%
+ \fi}%
+ }%
+}
+\AfterEndDocument{%
+ \ifthenelse{\boolean{minted@draft}}%
+ {}%
+ {\ifthenelse{\boolean{minted@frozencache}}%
+ {}
+ {\ifx\XeTeXinterchartoks\minted@undefined
+ \else
+ \DeleteFile[\minted@outputdir]{\minted@jobname.mintedcmd}%
+ \DeleteFile[\minted@outputdir]{\minted@jobname.mintedmd5}%
+ \fi
+ \DeleteFile[\minted@outputdir]{\minted@jobname.pyg}%
+ \DeleteFile[\minted@outputdir]{\minted@jobname.out.pyg}%
+ }%
+ }%
+}
+\endinput
+%%
+%% End of file `minted2.sty'.
diff --git a/macros/latex/contrib/minted/pygments-2.18.0-py3-none-any.whl b/macros/latex/contrib/minted/pygments-2.18.0-py3-none-any.whl
new file mode 100644
index 0000000000..e67ab03354
--- /dev/null
+++ b/macros/latex/contrib/minted/pygments-2.18.0-py3-none-any.whl
Binary files differ
diff --git a/macros/latex/contrib/mitthesis/MIT-Thesis.pdf b/macros/latex/contrib/mitthesis/MIT-Thesis.pdf
index e7f9b4a01a..a007efaeea 100644
--- a/macros/latex/contrib/mitthesis/MIT-Thesis.pdf
+++ b/macros/latex/contrib/mitthesis/MIT-Thesis.pdf
Binary files differ
diff --git a/macros/latex/contrib/mitthesis/MIT-thesis-template/MIT-Thesis.tex b/macros/latex/contrib/mitthesis/MIT-thesis-template/MIT-Thesis.tex
index fc7e8a88f1..4449939a2c 100644
--- a/macros/latex/contrib/mitthesis/MIT-thesis-template/MIT-Thesis.tex
+++ b/macros/latex/contrib/mitthesis/MIT-thesis-template/MIT-Thesis.tex
@@ -3,7 +3,7 @@
% This file is MIT-Thesis.tex, a LaTeX template for formatting an MIT thesis with the mitthesis class.
%
-% Version: 1.14, 2024/07/19
+% Version: 1.15, 2024/08/31
%
% Author: John H. Lienhard, copyright 2024. Reuse under the MIT license: https://ctan.org/license/mit
@@ -17,12 +17,11 @@
lang = en-US,
% pdfversion = 2.0,
% pdfstandard = a-4,
-% debug = {xmp-export}, % uncomment to output a separate xmpi file showing the metadata
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\documentclass[twoside]{mitthesis} %,fontset=libertine, fontset=newtx-sans-text, fontset=heros-stix2, fontset=stix2
+\documentclass[twoside]{mitthesis}% fontset=newtx, fontset=libertine, fontset=newtx-sans-text, fontset=heros-stix2, fontset=stix2
%
% option [twoside] gives facing-page behavior for printing; omitting twoside will eliminate even-numbered blank pages.
% option [lineno] provides line numbers, as for editing
@@ -53,12 +52,21 @@
\usepackage{array}% Additional options for column formats (https://ctan.org/pkg/array)
-%\usepackage{dcolumn}% For alignment of numbers on the decimal place (https://ctan.org/pkg/dcolumn)
-% \newcolumntype{d}[1]{D{.}{.}{#1}}% use with dcolumn package
+\usepackage{dcolumn}% For alignment of numbers on the decimal place (https://ctan.org/pkg/dcolumn)
+ \newcolumntype{d}[1]{D{.}{.}{#1}}% use with dcolumn package
+ % syntax: d{x.y} where x is max number of digits before decimal and y is max number after.
+
+% Package for multipage table in Appendix B.
+\usepackage{longtable}% typeset multi-page tables (https://ctan.org/pkg/longtable)
%\usepackage{tabularx}% adjustable-width columns in tabular (https://ctan.org/pkg/tabularx)
+%% Package for improved typography
+
+\usepackage{microtype}% typographic fine-tuning, used in sample thesis committee page, but also acting globally on the text
+
+
%%%%%%%%% Graphics path (to figure files) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Can set graphicspath to point to specific directories containing figures (the current directory is searched automatically)
@@ -188,10 +196,10 @@
% Professor who formally accepts theses for your department (e.g., the Graduate Officer, Professor Sméagol,...)
% If more than one department, use more than once
- \Acceptor{Primus Castor}{Professor of Wetlands Engineering}{}%{Undergraduate Officer, Department of Physics}
-% \Acceptor{Tertius Castor}{Professor of Log Dams}{Graduate Officer, Department of Research}
+\Acceptor{Tertius Castor}{Professor of Log Dams}{Graduate Officer, Department of Research} % \\ \> Third title}
% \Acceptor{Quarta Castor}{Professor of Lodge Building}{Graduate Officer, Department of Mechanical Engineering}
-%% If you need to reduce vertical space, put the acceptor title in the second argument and leave the third blank, {}.
+%%% If you need to reduce vertical space, put the acceptor title in the second argument and leave the third blank, {}.
+% \Acceptor{Primus Castor}{Professor and Undergraduate Officer, Department of Physics}{}
% Usage: \DegreeDate{Month}{year}
% Valid degree months are February, May, June, or September
@@ -239,7 +247,6 @@
% This command is useful when the text has not already reach the bottom of the page, since the glue gets squashed automatically
% when the page is too full.
-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Make titlepage
@@ -250,9 +257,11 @@
% \includeonly{acknowledgments,biography,chapter1,chapter2,...,appendixa,...}
% for usage of includeonly, see https://latexref.xyz/_005cinclude-_0026-_005cincludeonly.html
-
%%% Frontmatter (write this material in the mentioned files) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% This page is optional. Edit the file committee_members.tex
+\include{committee_members}
+
% The abstract environment creates all the required headings and footers.
% You only need to the text of the abstract in the file abstract.tex
\begin{abstract}
@@ -283,7 +292,7 @@
\appendix
\include{appendixa}
-
+\include{appendixb}
%%% Bibliography (biblatex) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/macros/latex/contrib/mitthesis/MIT-thesis-template/appendixa.tex b/macros/latex/contrib/mitthesis/MIT-thesis-template/appendixa.tex
index a7914cb851..cb61cca430 100644
--- a/macros/latex/contrib/mitthesis/MIT-thesis-template/appendixa.tex
+++ b/macros/latex/contrib/mitthesis/MIT-thesis-template/appendixa.tex
@@ -5,6 +5,10 @@
\chapter{Code listing}
+This example uses the \texttt{listings} package.
+
+\bigskip
+
\lstdefinestyle{mystyle}{
backgroundcolor=\color{CadetBlue!15!white},
commentstyle=\color{Red3},
diff --git a/macros/latex/contrib/mitthesis/MIT-thesis-template/appendixb.tex b/macros/latex/contrib/mitthesis/MIT-thesis-template/appendixb.tex
new file mode 100644
index 0000000000..1d9dd847c0
--- /dev/null
+++ b/macros/latex/contrib/mitthesis/MIT-thesis-template/appendixb.tex
@@ -0,0 +1,108 @@
+\chapter{One-term coefficients for heat conduction}
+
+\section{A multipage table of numbers}
+This example uses the \texttt{longtable} package: $\theta = A_1 f_1 \exp(-\lambda_1^2\mkern2mu\textrm{Fo})$, $\overline{\theta} = D_1 \exp(-\lambda_1^2\mkern2mu\textrm{Fo})$.
+
+
+{\footnotesize
+%\newcolumntype{d}[1]{D{.}{.}{#1}} % defined in root .tex file
+\renewcommand{\doublerulesep}{0pt}%
+\newcolumntype{X}{>{\hspace{1ex}}c@{\hspace{2ex}}c@{\hspace{2ex}}c<{\hspace{1ex}}}%
+
+\begin{longtable}{|||d{3.2}|X|X|X|||}
+
+\caption{One-term coefficients for one-dimensional heat conduction with a convective boundary condition. Data follow H. D. Baehr and K. Stephan~\cite{baehr1998}.}%
+
+\\
+\hline\hline\hline
+&&&&&&&&&\\[-7pt]
+& \multicolumn{3}{c|}{\textsf{\textit{Plate}}} & \multicolumn{3}{c|}{\textsf{\textit{Cylinder}}} & \multicolumn{3}{c|||}{\textsf{\textit{Sphere}}}
+\\
+\cline{2-10}
+\multicolumn{1}{|||c|}{\raisebox{1.5ex}[0cm][0cm]{Bi}}
+ & $\lambda_1$\rule[0pt]{0pt}{11pt} & $A_1$ & $D_1$ & $\lambda_1$ & $A_1$ & $D_1$ & $\lambda_1$ & $A_1$ & $D_1$
+\\
+\hline
+\endfirsthead
+\caption[]{(continued)} \\
+\hline\hline\hline
+&&&&&&&&&\\[-7pt]
+& \multicolumn{3}{c|}{\textsf{\textit{Plate}}} & \multicolumn{3}{c|}{\textsf{\textit{Cylinder}}} & \multicolumn{3}{c|||}{\textsf{\textit{Sphere}}}
+\\
+\cline{2-10}
+\multicolumn{1}{|||c|}{\raisebox{1.5ex}[0cm][0cm]{Bi}}
+ & $\lambda_1$\rule[0pt]{0pt}{11pt} & $A_1$ & $D_1$ & $\lambda_1$ & $A_1$ & $D_1$ & $\lambda_1$ & $A_1$ & $D_1$
+\\ \hline
+&&&&&&&&&\\[-1ex]
+\endhead
+\hline\hline\hline
+\endfoot
+\hline\hline\hline
+\endlastfoot
+0.01 & 0.09983 & 1.0017 & 1.0000 & 0.14124 & 1.0025 & 1.0000 & 0.17303 & 1.0030 & 1.0000\rule[0pt]{0pt}{15pt} \\
+0.02 & 0.14095 & 1.0033 & 1.0000 & 0.19950 & 1.0050 & 1.0000 & 0.24446 & 1.0060 & 1.0000 \\
+0.03 & 0.17234 & 1.0049 & 1.0000 & 0.24403 & 1.0075 & 1.0000 & 0.29910 & 1.0090 & 1.0000 \\
+0.04 & 0.19868 & 1.0066 & 1.0000 & 0.28143 & 1.0099 & 1.0000 & 0.34503 & 1.0120 & 1.0000 \\
+0.05 & 0.22176 & 1.0082 & 0.9999 & 0.31426 & 1.0124 & 0.9999 & 0.38537 & 1.0150 & 1.0000 \\
+0.06 & 0.24253 & 1.0098 & 0.9999 & 0.34383 & 1.0148 & 0.9999 & 0.42173 & 1.0179 & 0.9999 \\
+0.07 & 0.26153 & 1.0114 & 0.9999 & 0.37092 & 1.0173 & 0.9999 & 0.45506 & 1.0209 & 0.9999 \\
+0.08 & 0.27913 & 1.0130 & 0.9999 & 0.39603 & 1.0197 & 0.9999 & 0.48600 & 1.0239 & 0.9999 \\
+0.09 & 0.29557 & 1.0145 & 0.9998 & 0.41954 & 1.0222 & 0.9998 & 0.51497 & 1.0268 & 0.9999 \\
+0.10 & 0.31105 & 1.0161 & 0.9998 & 0.44168 & 1.0246 & 0.9998 & 0.54228 & 1.0298 & 0.9998 \\[6pt]
+%
+0.15 & 0.37788 & 1.0237 & 0.9995 & 0.53761 & 1.0365 & 0.9995 & 0.66086 & 1.0445 & 0.9996 \\*
+0.20 & 0.43284 & 1.0311 & 0.9992 & 0.61697 & 1.0483 & 0.9992 & 0.75931 & 1.0592 & 0.9993 \\
+0.25 & 0.48009 & 1.0382 & 0.9988 & 0.68559 & 1.0598 & 0.9988 & 0.84473 & 1.0737 & 0.9990 \\
+0.30 & 0.52179 & 1.0450 & 0.9983 & 0.74646 & 1.0712 & 0.9983 & 0.92079 & 1.0880 & 0.9985 \\
+0.40 & 0.59324 & 1.0580 & 0.9971 & 0.85158 & 1.0931 & 0.9970 & 1.05279 & 1.1164 & 0.9974 \\
+0.50 & 0.65327 & 1.0701 & 0.9956 & 0.94077 & 1.1143 & 0.9954 & 1.16556 & 1.1441 & 0.9960 \\
+0.60 & 0.70507 & 1.0814 & 0.9940 & 1.01844 & 1.1345 & 0.9936 & 1.26440 & 1.1713 & 0.9944 \\
+0.70 & 0.75056 & 1.0918 & 0.9922 & 1.08725 & 1.1539 & 0.9916 & 1.35252 & 1.1978 & 0.9925 \\
+0.80 & 0.79103 & 1.1016 & 0.9903 & 1.14897 & 1.1724 & 0.9893 & 1.43203 & 1.2236 & 0.9904 \\
+0.90 & 0.82740 & 1.1107 & 0.9882 & 1.20484 & 1.1902 & 0.9869 & 1.50442 & 1.2488 & 0.9880 \\[6pt]
+%
+1.00 & 0.86033 & 1.1191 & 0.9861 & 1.25578 & 1.2071 & 0.9843 & 1.57080 & 1.2732 & 0.9855 \\*
+1.10 & 0.89035 & 1.1270 & 0.9839 & 1.30251 & 1.2232 & 0.9815 & 1.63199 & 1.2970 & 0.9828 \\
+1.20 & 0.91785 & 1.1344 & 0.9817 & 1.34558 & 1.2387 & 0.9787 & 1.68868 & 1.3201 & 0.9800 \\
+1.30 & 0.94316 & 1.1412 & 0.9794 & 1.38543 & 1.2533 & 0.9757 & 1.74140 & 1.3424 & 0.9770 \\
+1.40 & 0.96655 & 1.1477 & 0.9771 & 1.42246 & 1.2673 & 0.9727 & 1.79058 & 1.3640 & 0.9739 \\
+1.50 & 0.98824 & 1.1537 & 0.9748 & 1.45695 & 1.2807 & 0.9696 & 1.83660 & 1.3850 & 0.9707 \\
+1.60 & 1.00842 & 1.1593 & 0.9726 & 1.48917 & 1.2934 & 0.9665 & 1.87976 & 1.4052 & 0.9674 \\
+1.70 & 1.02725 & 1.1645 & 0.9703 & 1.51936 & 1.3055 & 0.9633 & 1.92035 & 1.4247 & 0.9640 \\*
+1.80 & 1.04486 & 1.1695 & 0.9680 & 1.54769 & 1.3170 & 0.9601 & 1.95857 & 1.4436 & 0.9605 \\*
+1.90 & 1.06136 & 1.1741 & 0.9658 & 1.57434 & 1.3279 & 0.9569 & 1.99465 & 1.4618 & 0.9570 \\[6pt]
+%
+2.00 & 1.07687 & 1.1785 & 0.9635 & 1.59945 & 1.3384 & 0.9537 & 2.02876 & 1.4793 & 0.9534 \\*
+2.20 & 1.10524 & 1.1864 & 0.9592 & 1.64557 & 1.3578 & 0.9472 & 2.09166 & 1.5125 & 0.9462 \\
+2.40 & 1.13056 & 1.1934 & 0.9549 & 1.68691 & 1.3754 & 0.9408 & 2.14834 & 1.5433 & 0.9389 \\
+2.60 & 1.15330 & 1.1997 & 0.9509 & 1.72418 & 1.3914 & 0.9345 & 2.19967 & 1.5718 & 0.9316 \\
+2.80 & 1.17383 & 1.2052 & 0.9469 & 1.75794 & 1.4059 & 0.9284 & 2.24633 & 1.5982 & 0.9243 \\
+3.00 & 1.19246 & 1.2102 & 0.9431 & 1.78866 & 1.4191 & 0.9224 & 2.28893 & 1.6227 & 0.9171 \\
+3.50 & 1.23227 & 1.2206 & 0.9343 & 1.85449 & 1.4473 & 0.9081 & 2.38064 & 1.6761 & 0.8995 \\
+4.00 & 1.26459 & 1.2287 & 0.9264 & 1.90808 & 1.4698 & 0.8950 & 2.45564 & 1.7202 & 0.8830 \\*
+4.50 & 1.29134 & 1.2351 & 0.9193 & 1.95248 & 1.4880 & 0.8830 & 2.51795 & 1.7567 & 0.8675 \\*
+5.00 & 1.31384 & 1.2402 & 0.9130 & 1.98981 & 1.5029 & 0.8721 & 2.57043 & 1.7870 & 0.8533 \\[6pt]
+%
+6.00 & 1.34955 & 1.2479 & 0.9021 & 2.04901 & 1.5253 & 0.8532 & 2.65366 & 1.8338 & 0.8281 \\*
+7.00 & 1.37662 & 1.2532 & 0.8932 & 2.09373 & 1.5411 & 0.8375 & 2.71646 & 1.8673 & 0.8069 \\
+8.00 & 1.39782 & 1.2570 & 0.8858 & 2.12864 & 1.5526 & 0.8244 & 2.76536 & 1.8920 & 0.7889 \\
+9.00 & 1.41487 & 1.2598 & 0.8796 & 2.15661 & 1.5611 & 0.8133 & 2.80443 & 1.9106 & 0.7737 \\
+10.00 & 1.42887 & 1.2620 & 0.8743 & 2.17950 & 1.5677 & 0.8039 & 2.83630 & 1.9249 & 0.7607 \\
+12.00 & 1.45050 & 1.2650 & 0.8658 & 2.21468 & 1.5769 & 0.7887 & 2.88509 & 1.9450 & 0.7397 \\
+14.00 & 1.46643 & 1.2669 & 0.8592 & 2.24044 & 1.5828 & 0.7770 & 2.92060 & 1.9581 & 0.7236 \\
+16.00 & 1.47864 & 1.2683 & 0.8541 & 2.26008 & 1.5869 & 0.7678 & 2.94756 & 1.9670 & 0.7109 \\*
+18.00 & 1.48830 & 1.2692 & 0.8499 & 2.27556 & 1.5898 & 0.7603 & 2.96871 & 1.9734 & 0.7007 \\*
+20.00 & 1.49613 & 1.2699 & 0.8464 & 2.28805 & 1.5919 & 0.7542 & 2.98572 & 1.9781 & 0.6922 \\[6pt]
+%
+25.00 & 1.51045 & 1.2710 & 0.8400 & 2.31080 & 1.5954 & 0.7427 & 3.01656 & 1.9856 & 0.6766 \\*
+30.00 & 1.52017 & 1.2717 & 0.8355 & 2.32614 & 1.5973 & 0.7348 & 3.03724 & 1.9898 & 0.6658 \\
+35.00 & 1.52719 & 1.2721 & 0.8322 & 2.33719 & 1.5985 & 0.7290 & 3.05207 & 1.9924 & 0.6579 \\
+40.00 & 1.53250 & 1.2723 & 0.8296 & 2.34552 & 1.5993 & 0.7246 & 3.06321 & 1.9942 & 0.6519 \\
+50.00 & 1.54001 & 1.2727 & 0.8260 & 2.35724 & 1.6002 & 0.7183 & 3.07884 & 1.9962 & 0.6434 \\
+60.00 & 1.54505 & 1.2728 & 0.8235 & 2.36510 & 1.6007 & 0.7140 & 3.08928 & 1.9974 & 0.6376 \\
+80.00 & 1.55141 & 1.2730 & 0.8204 & 2.37496 & 1.6013 & 0.7085 & 3.10234 & 1.9985 & 0.6303 \\
+100.00 & 1.55525 & 1.2731 & 0.8185 & 2.38090 & 1.6015 & 0.7052 & 3.11019 & 1.9990 & 0.6259 \\*
+200.00 & 1.56298 & 1.2732 & 0.8146 & 2.39283 & 1.6019 & 0.6985 & 3.12589 & 1.9998 & 0.6170 \\*
+\infty & 1.57080 & 1.2732 & 0.8106 & 2.40483 & 1.6020 & 0.6917 & 3.14159 & 2.0000 & 0.6079 \\[3pt]
+\end{longtable}
+}
diff --git a/macros/latex/contrib/mitthesis/MIT-thesis-template/committee_members.tex b/macros/latex/contrib/mitthesis/MIT-thesis-template/committee_members.tex
new file mode 100644
index 0000000000..b09f276c8b
--- /dev/null
+++ b/macros/latex/contrib/mitthesis/MIT-thesis-template/committee_members.tex
@@ -0,0 +1,69 @@
+% Sample thesis committee page for mitthesis.cls
+% Version 1.00, 2024/08/24
+%
+% This page is not required by the MIT Libraries, but some departments require it
+%
+% Insert between title page and abstract page.
+% Format this page in any way that you like.
+% Add supervisor titles, degrees, and departments as appropriate
+
+%%%%% FORMATTING COMMANDS %%%%%%%%%%%%%%%%%%
+
+%% Format title
+\NewDocumentCommand\CommitteePageTitle{m}{
+ \vspace*{75pt}%36pt}
+ \IfPackageLoadedTF{microtype}
+ {\textls*{\Large\textbf{\MakeUppercase{#1}}}}
+ {{\Large\textbf{\MakeUppercase{#1}}}}%
+ \pdfbookmark[0]{#1}{Committee}%
+ \vspace*{10pt}%
+}
+% \textls* produces additional letter separation (appropriate for capitalized display text),
+% PROVIDED THAT \usepackage{microtype} has been loaded in the preamble.
+% The extra space added is 100/1000 em (adjustable, see package documentation).
+
+%% Format committee member subheadings
+\NewDocumentCommand\Role{m}{
+ \vspace*{50pt}%25pt}
+ \IfPackageLoadedTF{microtype}
+ {\textls*{\large{\textsc{#1}}}}
+ {{\large\textsc{#1}}}%
+ \vspace*{12pt}%
+}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\begin{flushright}
+
+\CommitteePageTitle{Thesis committee}
+
+\Role{Thesis Supervisor}
+
+ \textbf{Marcus Gavius Apicius} \\
+ {\itshape
+ Professor of Cooking Arts \\
+ Department of Food Science \\
+ }
+
+\Role{Thesis Readers}
+
+ \textbf{Marie-Antoine Carême} \\
+ {\itshape
+ Professor of Haute Cuisine \\
+ Department of Food Science \\[18pt]
+ }
+
+ \textbf{Julia Child}\\
+ {\itshape
+ Professor of French Cuisine \\
+ Department of Food Science \\[18pt]
+ }
+
+ \textbf{Magnus Dicen, Ph.D.} \\
+ {\itshape
+ Gloriosus Professor of Personal Pronouns \\
+ Department of Rhetoric \\
+ }
+
+\end{flushright}
+
+\cleardoublepage
diff --git a/macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-defaultfonts.tex b/macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-defaultfonts.tex
index 8795eb547e..bc7ba62c91 100644
--- a/macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-defaultfonts.tex
+++ b/macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-defaultfonts.tex
@@ -1,16 +1,16 @@
% From mitthesis package
% Documentation: https://ctan.org/pkg/mitthesis
-\ProvidesFile{mitthesis-defaultfonts.tex}[2023/09/12 v1.03 Load Computer/Latin Modern text and math fonts]
+\ProvidesFile{mitthesis-defaultfonts.tex}[2024/06/28 v1.04 Load Computer/Latin Modern text and math fonts]
%% Default fonts
%
\ifpdftex
- \typeout{^^JLoading Computer Modern text and math fonts (default for pdftex).^^J}
+ \ClassNoteNoLine{\ClassName}{Loading Computer Modern text and math fonts (default for pdftex)}
\RequirePackage[T1]{fontenc}
\RequirePackage{bm}
\else
- \typeout{^^JLoading Latin Modern text and math fonts (default for unicode engines).^^J}
+ \ClassNoteNoLine{\ClassName}{Loading Latin Modern text and math fonts (default for unicode engines)}
%
\RequirePackage[warnings-off={mathtools-colon,mathtools-overbracket}]{unicode-math}
% suppress tiresome warnings about lack of integration between mathtools and unicode-math.
diff --git a/macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-fira-newtxsf.tex b/macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-fira-newtxsf.tex
index 01fa981d78..ebba9ab190 100644
--- a/macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-fira-newtxsf.tex
+++ b/macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-fira-newtxsf.tex
@@ -1,19 +1,19 @@
% From mitthesis package
% Documentation: https://ctan.org/pkg/mitthesis
-\ProvidesFile{mitthesis-fira-newtxsf.tex}[2023/09/12 v1.04 Load Fira Sans text font with newtx sans serif math font and Inconsolata typewriter font]
+\ProvidesFile{mitthesis-fira-newtxsf.tex}[2024/06/28 v1.05 Load Fira Sans text font with newtx sans serif math font and Inconsolata typewriter font]
%% Fira Sans text font with newtx sans serif math font and Inconsolata typewriter font
%
\ifpdftex
- \typeout{^^JLoading Fira sans text font with newtx sans serif math font and Inconsolata typewriter^^J}
+ \ClassNoteNoLine{\ClassName}{Loading Fira sans text font with newtx sans serif math font and Inconsolata typewriter}
\RequirePackage[sfdefault,scaled=0.90]{FiraSans} % sans serif text package %,scaled=.85
\RequirePackage[T1]{fontenc}
\RequirePackage[varqu,varl,scaled=1.05]{zi4} % inconsolata font for typewriter
\RequirePackage[scaled=1.05]{newtxsf} % sans serif math
\RequirePackage{bm}
\else
- \ClassWarning{mitnewthesis}{The fira-newtxsf font set requires pdflatex. Defaulting to LMR fonts}
+ \ClassWarning{\ClassName}{The fira-newtxsf font set requires pdflatex. Defaulting to LMR fonts}
\RequirePackage[warnings-off={mathtools-colon,mathtools-overbracket}]{unicode-math}
% suppress tiresome warnings about lack of integration between mathtools and unicode-math.
% Unicode-math loads the fontspec package, but the default fonts are not selected by fontspec in this case.
diff --git a/macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-heros-stix2.tex b/macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-heros-stix2.tex
index 26ee2ab07b..1535771f11 100644
--- a/macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-heros-stix2.tex
+++ b/macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-heros-stix2.tex
@@ -1,7 +1,7 @@
% From mitthesis package
% Documentation: https://ctan.org/pkg/mitthesis
-\ProvidesFile{mitthesis-heros-stix2.tex}[2023/09/12 v1.02 Load TeX Gyre Heros (sans serif) text font with STIX Two Math font and Inconsolata monospaced font]
+\ProvidesFile{mitthesis-heros-stix2.tex}[2024/06/28 v1.03 Load TeX Gyre Heros (sans serif) text font with STIX Two Math font and Inconsolata monospaced font]
%% TeX Gyre Heros (sans serif) text font with STIX Two Math font and Inconsolata monospaced font
%
@@ -12,11 +12,11 @@
% Install these as system fonts on your computer
%
\ifpdftex
- \ClassWarning{mitnewthesis}{The heros-stix2 fontset requires a unicode engine. Defaulting to CMR fonts.}
+ \ClassWarning{\ClassName}{The heros-stix2 fontset requires a unicode engine. Defaulting to CMR fonts}
\RequirePackage[T1]{fontenc}
\RequirePackage{bm}
\else
- \typeout{^^JTeX Gyre Heros (sans serif) text font with STIX2 math font and Inconsolata monospaced font.^^J}
+ \ClassNoteNoLine{\ClassName}{TeX Gyre Heros (sans serif) text font with STIX2 math font and Inconsolata monospaced font}
%
\RequirePackage[warnings-off={mathtools-colon,mathtools-overbracket}]{unicode-math}
% suppress tiresome warnings about lack of integration between mathtools and unicode-math
diff --git a/macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-libertine.tex b/macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-libertine.tex
index 57cf26f915..41b2f561df 100644
--- a/macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-libertine.tex
+++ b/macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-libertine.tex
@@ -1,7 +1,7 @@
% From mitthesis package
% Documentation: https://ctan.org/pkg/mitthesis
-\ProvidesFile{mitthesis-libertine.tex}[2023/09/12 v1.02 Load Libertine and related fonts]
+\ProvidesFile{mitthesis-libertine.tex}[2024/06/28 v1.03 Load Libertine and related fonts]
%% Linux Libertine (serif) text font with newtxmath[libertine] (pdftex) or Libertinus (unicode) math font
%
@@ -10,7 +10,7 @@
% install these as system fonts on your computer
%
\ifpdftex
- \typeout{^^JLoading newtx-libertine text and math fonts with Insolata typewriter font^^J}
+ \ClassNoteNoLine{\ClassName}{Loading newtx-libertine text and math fonts with Insolata typewriter font}
\RequirePackage[lining,semibold]{libertine}
\RequirePackage[T1]{fontenc}
\RequirePackage[varqu,varl]{inconsolata}% typewriter
@@ -18,7 +18,7 @@
\RequirePackage[libertine,vvarbb]{newtxmath}
\RequirePackage{bm}% load after all math to give access to bold math
\else
- \typeout{^^JLoading Linux Libertine (serif) text font with Libertinus math font^^J}
+ \ClassNoteNoLine{\ClassName}{Loading Linux Libertine (serif) text font with Libertinus math font}
%
\RequirePackage[warnings-off={mathtools-colon,mathtools-overbracket}]{unicode-math}
% suppress tiresome warnings about lack of integration between mathtools and unicode-math
diff --git a/macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-lucida.tex b/macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-lucida.tex
index 6466c36929..e18c72fd92 100644
--- a/macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-lucida.tex
+++ b/macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-lucida.tex
@@ -1,11 +1,11 @@
% From mitthesis package
% Documentation: https://ctan.org/pkg/mitthesis
-\ProvidesFile{mitthesis-lucida.tex}[2023/09/12 v1.02 Load Lucida fonts]
+\ProvidesFile{mitthesis-lucida.tex}[2024/06/28 v1.03 Load Lucida fonts]
%% Lucida Bright and Lucida Bright Math fonts (available from the TeX Users Group)
-\typeout{^^JLucida Bright and Lucida Bright Math fonts^^J}
+\ClassNoteNoLine{\ClassName}{Lucida Bright and Lucida Bright Math fonts}
\ifpdftex
\RequirePackage[LY1]{fontenc}
diff --git a/macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-newtx-sans-text.tex b/macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-newtx-sans-text.tex
index 03d62286e2..b76428f383 100644
--- a/macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-newtx-sans-text.tex
+++ b/macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-newtx-sans-text.tex
@@ -1,11 +1,12 @@
% From mitthesis package
% Documentation: https://ctan.org/pkg/mitthesis
-\ProvidesFile{mitthesis-newtx-sans-text.tex}[2023/10/03 v1.03 Load newtx sans-serif text and regular math fonts]
+\ProvidesFile{mitthesis-newtx-sans-text.tex}[2024/06/68 v1.04 Load newtx sans-serif text and regular math fonts]
%% newtx package with sans-serif text (Helvetica-like text with Times-like math)
%
\ifpdftex
+ \ClassNoteNoLine{\ClassName}{Loading newtx sans-serif text and newtx serif math fonts}
\RequirePackage[T1]{fontenc}
\RequirePackage[subscriptcorrection,varvw,helvratio=0.91,defaultsups]{newtx}% upint for upright integrals
\AtEndPreamble{% added to accommodate v1.731 of newtx, 2023/11/03
@@ -17,7 +18,7 @@
% \DeclareFontFamily{\encodingdefault}{\ttdefault}{\hyphenchar\font=`\-} %
\RequirePackage{bm}% bold math
\else
- \ClassWarning{mitnewthesis}{The newtx font set requires pdflatex. Defaulting to LMR fonts}
+ \ClassWarning{\ClassName}{The newtx font set requires pdflatex. Defaulting to LMR fonts}
\RequirePackage[warnings-off={mathtools-colon,mathtools-overbracket}]{unicode-math}
% suppress tiresome warnings about lack of integration between mathtools and unicode-math.
% Unicode-math loads the fontspec package, but the default fonts are not selected by fontspec in this case.
diff --git a/macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-newtx.tex b/macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-newtx.tex
index cc43427055..b1541bbd05 100644
--- a/macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-newtx.tex
+++ b/macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-newtx.tex
@@ -1,17 +1,17 @@
% From mitthesis package
% Documentation: https://ctan.org/pkg/mitthesis
-\ProvidesFile{mitthesis-newtx.tex}[2023/09/12 v1.03 Load newtx text and math fonts]
+\ProvidesFile{mitthesis-newtx.tex}[2024/06/28 v1.04 Load newtx text and math fonts]
\ifpdftex
- \typeout{^^JLoading newtx fonts with inconsolata typewriter^^J}
+ \ClassNoteNoLine{\ClassName}{Loading newtx fonts with inconsolata typewriter}
\RequirePackage[T1]{fontenc}
\RequirePackage[subscriptcorrection,varvw,helvratio=0.91]{newtx}% stix2, upint
\RequirePackage[varl,varqu,hyphenate,mono]{inconsolata}% sans typewriter font; mono = fixed word spacing, hyphenate = allow hyphenation
\RequirePackage{bm}
\let\textsuperscript\textsu% newtx changes the default superiors font; this is needed to get commas aligned in sequential footnotes
\else
- \ClassWarning{mitnewthesis}{The newtx font set requires pdflatex. Defaulting to LMR fonts}
+ \ClassWarning{\ClassName}{The newtx font set requires pdflatex. Defaulting to LMR fonts}
\RequirePackage[warnings-off={mathtools-colon,mathtools-overbracket}]{unicode-math}
% suppress tiresome warnings about lack of integration between mathtools and unicode-math.
% Unicode-math loads the fontspec package, but the default fonts are not selected by fontspec in this case.
diff --git a/macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-stix2.tex b/macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-stix2.tex
index de3983fe4e..c178ff233f 100644
--- a/macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-stix2.tex
+++ b/macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-stix2.tex
@@ -1,7 +1,7 @@
% From mitthesis package
% Documentation: https://ctan.org/pkg/mitthesis
-\ProvidesFile{mitthesis-stix2.tex}[2023/09/12 v1.03 Load STIX Two text and math fonts]
+\ProvidesFile{mitthesis-stix2.tex}[2024/06/28 v1.04 Load STIX Two text and math fonts]
%% STIX Two text and math fonts with Heros sans serif font and Inconsolata monospaced font
%
@@ -12,11 +12,11 @@
% Install these as system fonts on your computer
%
\ifpdftex
- \ClassWarning{mitnewthesis}{The stix2 fontset requires a unicode engine. Defaulting to CMR fonts.}
+ \ClassWarning{\ClassName}{The stix2 fontset requires a unicode engine. Defaulting to CMR fonts.}
\RequirePackage[T1]{fontenc}
\RequirePackage{bm}
\else
- \typeout{^^JLoading STIX Two text and math fonts with Heros sans serif font and Inconsolata monospaced font.^^J}
+ \ClassNoteNoLine{\ClassName}{Loading STIX Two text and math fonts with Heros sans serif font and Inconsolata monospaced font}
%
\RequirePackage[warnings-off={mathtools-colon,mathtools-overbracket}]{unicode-math}
% suppress tiresome warnings about lack of integration between mathtools and unicode-math
diff --git a/macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-termes-stix2.tex b/macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-termes-stix2.tex
index 1e65724cc0..ed2abc1655 100644
--- a/macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-termes-stix2.tex
+++ b/macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-termes-stix2.tex
@@ -1,7 +1,7 @@
% From mitthesis package
% Documentation: https://ctan.org/pkg/mitthesis
-\ProvidesFile{mitthesis-termes-stix2.tex}[2023/09/12 v1.03 Load TeX Gyre Termes text font with STIX2 math font, Heros sans serif font, and Inconsolata monospaced font]
+\ProvidesFile{mitthesis-termes-stix2.tex}[2024/10/28 v1.04 Load TeX Gyre Termes text font with STIX2 math font, Heros sans serif font, and Inconsolata monospaced font]
%% TeX Gyre Termes text font and Heros sans serif font with STIX2 math font and Inconsolata monospaced font
%
@@ -12,11 +12,11 @@
% Install these as system fonts on your computer
%
\ifpdftex
- \ClassWarning{mitnewthesis}{The termes-stix2 fontset requires a unicode engine. Defaulting to CMR fonts.}
+ \ClassWarning{\ClassName}{The termes-stix2 fontset requires a unicode engine. Defaulting to CMR fonts.}
\RequirePackage[T1]{fontenc}
\RequirePackage{bm}
\else
- \typeout{^^JLoading TeX Gyre Termes text font with STIX2 math font, Heros sans serif font, and Inconsolata monospaced font.^^J}
+ \ClassNoteNoLine{\ClassName}{Loading TeX Gyre Termes text font with STIX2 math font, Heros sans serif font, and Inconsolata monospaced font}
%
\RequirePackage[warnings-off={mathtools-colon,mathtools-overbracket}]{unicode-math}
% suppress tiresome warnings about lack of integration between mathtools and unicode-math
diff --git a/macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-termes.tex b/macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-termes.tex
index 64fffb9264..fd1e15bab8 100644
--- a/macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-termes.tex
+++ b/macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-termes.tex
@@ -1,7 +1,7 @@
% From mitthesis package
% Documentation: https://ctan.org/pkg/mitthesis
-\ProvidesFile{mitthesis-termes.tex}[2023/09/12 v1.03 Load TeX Gyre Termes text and math fonts, Heros sans serif font, and Cursor monospaced font]
+\ProvidesFile{mitthesis-termes.tex}[2024/06/28 v1.04 Load TeX Gyre Termes text and math fonts, Heros sans serif font, and Cursor monospaced font]
%% TeX Gyre Termes (Times-like) text font with Termes math font and Heros sans serif font and Cursor monospaced font
%
@@ -9,11 +9,11 @@
% install these as system fonts on your computer
%
\ifpdftex
- \ClassWarning{mitnewthesis}{The termes fontset requires a unicode engine. Defaulting to CMR fonts.}
+ \ClassWarning{\ClassName}{The termes fontset requires a unicode engine. Defaulting to CMR fonts.}
\RequirePackage[T1]{fontenc}
\RequirePackage{bm}
\else
- \typeout{^^JLoading TeX Gyre Termes text and math fonts, Heros sans serif font, and Cursor monospaced font^^J}
+ \ClassNoteNoLine{\ClassName}{Loading TeX Gyre Termes text and math fonts, Heros sans serif font, and Cursor monospaced font}
\RequirePackage[warnings-off={mathtools-colon,mathtools-overbracket}]{unicode-math}
% suppress tiresome warnings about lack of integration between mathtools and unicode-math
% unicode-math loads the fontspec package
diff --git a/macros/latex/contrib/mitthesis/MIT-thesis-template/mitthesis-sample.bib b/macros/latex/contrib/mitthesis/MIT-thesis-template/mitthesis-sample.bib
index 1131bed50d..98ba37532e 100644
--- a/macros/latex/contrib/mitthesis/MIT-thesis-template/mitthesis-sample.bib
+++ b/macros/latex/contrib/mitthesis/MIT-thesis-template/mitthesis-sample.bib
@@ -1,6 +1,6 @@
%% Sample bibliography file for mitthesis.cls
%%
-%% Revised: 12 September 2023
+%% Revised: 01 August 2024
%% Copyright John H. Lienhard, MIT
%% Offered under the MIT license: https://ctan.org/license/mit
@@ -322,4 +322,14 @@
address = {San Francisco, CA},
month = sep,
}
+
+@book{baehr1998,
+ author ={H. D. Baehr and K. Stephan},
+ title = {Heat and Mass Transfer},
+ publisher = {Springer-Verlag},
+ address = {Berlin},
+ year = {1998},
+ isbn = {3-540-63695-1},
+}
+
\ No newline at end of file
diff --git a/macros/latex/contrib/mitthesis/README.md b/macros/latex/contrib/mitthesis/README.md
index 9d2918ca36..3a30748862 100644
--- a/macros/latex/contrib/mitthesis/README.md
+++ b/macros/latex/contrib/mitthesis/README.md
@@ -1,7 +1,7 @@
#mitthesis --- A LaTeX template for an MIT thesis#
- v1.14 dated 2024/07/19
+ v1.16 dated 2024/09/06
####Overview####
This class provides a LaTeX template to format an MIT thesis according to
@@ -26,8 +26,10 @@
abstract.tex -- put your abstract in this file
acknowledgments.tex -- put your acknowledgments in this file
biosketch.tex -- put your biosketch in this file (optional)
- chapter1.tex -- put your first chapter in this file (etc.)
- appendixa.tex -- put your first appendix in this file (etc.)
+ chapter1.tex -- sample first chapter
+ committee_members.tex -- sample thesis committee members page (optional)
+ appendixa.tex -- sample appendix with code listing
+ appendixb.tex -- sample appendix with multipage table
mitthesis-sample.bib -- a sample bibliography file with many examples
mydesign.tex -- an optional file to load packages for document design
fontsets/ -- a subdirectory of input files that load optional fonts
@@ -53,8 +55,21 @@
---
####Change log####
+
+ v1.16 (06 September 2024)
+ - Same as v1.15, but now with the correct version of MIT-Thesis.tex
+
+ v1.15 (31 August 2024)
+ - add an example for the longtable package (App. B)
+ - add sample Thesis Committee page (optional)
+ - load microtype package, enable tracking for capitalized strings (degree name[s], institution name)
+ - fix typo in MIT-Thesis.tex
+ - edit documentation
+ - edit pdfauthor string to separator authors with semicolon, not comma (per Dublin Core recommendation)
+ - define \\@author and \\@title in case needed
+
v1.14 (19 July 2024)
- - add backward compatibility code for \\text_titlecase_all:n
+ - add backward compatibility code for \\text\_titlecase\_all:n
- adjust supervisor and acceptor titles used on sample cover pages
- format J/psi as \\symbfit in sample chapter 1 and regenerate font samples
- edit documentation
diff --git a/macros/latex/contrib/mitthesis/examples/font_samples/Defaultfonts.pdf b/macros/latex/contrib/mitthesis/examples/font_samples/Defaultfonts.pdf
index 97243bde84..ef50423842 100644
--- a/macros/latex/contrib/mitthesis/examples/font_samples/Defaultfonts.pdf
+++ b/macros/latex/contrib/mitthesis/examples/font_samples/Defaultfonts.pdf
Binary files differ
diff --git a/macros/latex/contrib/mitthesis/examples/font_samples/Fira_Newtxsf.pdf b/macros/latex/contrib/mitthesis/examples/font_samples/Fira_Newtxsf.pdf
index cc3e40ce75..ab8796fe83 100644
--- a/macros/latex/contrib/mitthesis/examples/font_samples/Fira_Newtxsf.pdf
+++ b/macros/latex/contrib/mitthesis/examples/font_samples/Fira_Newtxsf.pdf
Binary files differ
diff --git a/macros/latex/contrib/mitthesis/examples/font_samples/Heros-Stix2.pdf b/macros/latex/contrib/mitthesis/examples/font_samples/Heros-Stix2.pdf
index c09afd43ee..888046a1d8 100644
--- a/macros/latex/contrib/mitthesis/examples/font_samples/Heros-Stix2.pdf
+++ b/macros/latex/contrib/mitthesis/examples/font_samples/Heros-Stix2.pdf
Binary files differ
diff --git a/macros/latex/contrib/mitthesis/examples/font_samples/Libertine.pdf b/macros/latex/contrib/mitthesis/examples/font_samples/Libertine.pdf
index 418bf7e8d3..ab8fa1531f 100644
--- a/macros/latex/contrib/mitthesis/examples/font_samples/Libertine.pdf
+++ b/macros/latex/contrib/mitthesis/examples/font_samples/Libertine.pdf
Binary files differ
diff --git a/macros/latex/contrib/mitthesis/examples/font_samples/Lucida.pdf b/macros/latex/contrib/mitthesis/examples/font_samples/Lucida.pdf
index 43081a36f0..e81c210952 100644
--- a/macros/latex/contrib/mitthesis/examples/font_samples/Lucida.pdf
+++ b/macros/latex/contrib/mitthesis/examples/font_samples/Lucida.pdf
Binary files differ
diff --git a/macros/latex/contrib/mitthesis/examples/font_samples/Newtx-sans-text.pdf b/macros/latex/contrib/mitthesis/examples/font_samples/Newtx-sans-text.pdf
index d21ca4d057..5bd3928957 100644
--- a/macros/latex/contrib/mitthesis/examples/font_samples/Newtx-sans-text.pdf
+++ b/macros/latex/contrib/mitthesis/examples/font_samples/Newtx-sans-text.pdf
Binary files differ
diff --git a/macros/latex/contrib/mitthesis/examples/font_samples/Newtx.pdf b/macros/latex/contrib/mitthesis/examples/font_samples/Newtx.pdf
index 45952c0c52..2ccbde4b1d 100644
--- a/macros/latex/contrib/mitthesis/examples/font_samples/Newtx.pdf
+++ b/macros/latex/contrib/mitthesis/examples/font_samples/Newtx.pdf
Binary files differ
diff --git a/macros/latex/contrib/mitthesis/examples/font_samples/Stix2.pdf b/macros/latex/contrib/mitthesis/examples/font_samples/Stix2.pdf
index 0792ee30f9..d13e8a05c4 100644
--- a/macros/latex/contrib/mitthesis/examples/font_samples/Stix2.pdf
+++ b/macros/latex/contrib/mitthesis/examples/font_samples/Stix2.pdf
Binary files differ
diff --git a/macros/latex/contrib/mitthesis/examples/font_samples/Termes-stix2.pdf b/macros/latex/contrib/mitthesis/examples/font_samples/Termes-stix2.pdf
index 80b8e07d10..5601e9541a 100644
--- a/macros/latex/contrib/mitthesis/examples/font_samples/Termes-stix2.pdf
+++ b/macros/latex/contrib/mitthesis/examples/font_samples/Termes-stix2.pdf
Binary files differ
diff --git a/macros/latex/contrib/mitthesis/examples/font_samples/Termes.pdf b/macros/latex/contrib/mitthesis/examples/font_samples/Termes.pdf
index 90dfd3ab31..0451bdf880 100644
--- a/macros/latex/contrib/mitthesis/examples/font_samples/Termes.pdf
+++ b/macros/latex/contrib/mitthesis/examples/font_samples/Termes.pdf
Binary files differ
diff --git a/macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/Defaultfonts.tex b/macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/Defaultfonts.tex
index b6480ef952..33fa1e5d3a 100644
--- a/macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/Defaultfonts.tex
+++ b/macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/Defaultfonts.tex
@@ -1,12 +1,12 @@
% !TEX encoding = UTF-8 Unicode
-% !BIB TS-program = biber
-% !BIB program = biber
+% !BIB TS-program = biber
+% !BIB program = biber
% This file is MIT-Thesis.tex, a LaTeX template for formatting an MIT thesis with the mitthesis class.
%
-% Version: 1.06, 2023/08/28
+% Version: 1.15, 2024/08/31
%
-% Author: John H. Lienhard (c) 2023. Reuse under the MIT license: https://ctan.org/license/mit
+% Author: John H. Lienhard, copyright 2024. Reuse under the MIT license: https://ctan.org/license/mit
% Documentation is here: https://ctan.org/pkg/mitthesis
@@ -16,19 +16,21 @@
pdfstandard = a-2b,
pdfversion = 1.7,
lang = en-US,
-% debug = {xmp-export}, % uncomment to output a separate xmpi file showing the metadata
+% pdfversion = 2.0,
+% pdfstandard = a-4,
}
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\documentclass[]{mitthesis} %,fontset=libertine ,fontset=newtx-sans-text, fontset=heros-stix2, fontset=stix2
+\documentclass[]{mitthesis}% fontset=newtx, fontset=libertine, fontset=newtx-sans-text, fontset=heros-stix2, fontset=stix2
%
% option [twoside] gives facing-page behavior for printing; omitting twoside will eliminate even-numbered blank pages.
% option [lineno] provides line numbers, as for editing
% option [mydesign] loads packages for color, title and list formats, margins, or captions: edit mydesign.tex to change defaults.
% option [fontset] is a keyvalue which can be:
-% pdftex or unicode engines: defaultfonts, libertine, lucida
-% pdftex only: fira-newtxsf, newtx, newtx-sans-text
-% unicode engines (luatex): heros-stix2, stix2, termes, termes-stix2
+% for pdftex or unicode engines: defaultfonts, libertine, lucida
+% for pdftex only: fira-newtxsf, newtx, newtx-sans-text
+% for unicode engines (luatex): heros-stix2, stix2, termes, termes-stix2
% if no key value is given, fonts default to CMR (pdftex) or LMR (unicode), i.e., "the LaTeX font".
% You can edit the fontset files or you can write your own, myfonts.tex, and do [fontset=myfonts].
% If you are using multiple languages, load the babel package in your fontset file, before the fonts.
@@ -39,12 +41,32 @@
\usepackage{listings}% documentation is here https://ctan.org/pkg/listings
%% Set chemical formulas nicely
-\usepackage[version=4]{mhchem}% documentation is here https://ctan.org/pkg/mhchem
+\usepackage[version=4]{mhchem}% documentation at https://ctan.org/pkg/mhchem
-%% Latin filler used in Chapter 1, with a test for package version date. https://ctan.org/pkg/lipsum
+%% Latin filler used in Chapter 1, with a test for package version date (https://ctan.org/pkg/lipsum)
\usepackage{lipsum}
\IfPackageAtLeastTF{lipsum}{2021/09/20}{\setlipsum{auto-lang=false}}{}
+%% Table related packages
+
+\usepackage{booktabs}% publication quality tables (https://ctan.org/pkg/booktabs)
+
+\usepackage{array}% Additional options for column formats (https://ctan.org/pkg/array)
+
+\usepackage{dcolumn}% For alignment of numbers on the decimal place (https://ctan.org/pkg/dcolumn)
+ \newcolumntype{d}[1]{D{.}{.}{#1}}% use with dcolumn package
+ % syntax: d{x.y} where x is max number of digits before decimal and y is max number after.
+
+% Package for multipage table in Appendix B.
+\usepackage{longtable}% typeset multi-page tables (https://ctan.org/pkg/longtable)
+
+%\usepackage{tabularx}% adjustable-width columns in tabular (https://ctan.org/pkg/tabularx)
+
+
+%% Package for improved typography
+
+\usepackage{microtype}% typographic fine-tuning, used in sample thesis committee page, but also acting globally on the text
+
%%%%%%%%% Graphics path (to figure files) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -59,16 +81,26 @@
%% Numerical citations of references
\usepackage[style=ext-numeric-comp,giveninits=true,maxbibnames=10,sorting=none]{biblatex}
+%% IEEE style citations and references
+% \usepackage[style=ieee,maxbibnames=10,sorting=none]{biblatex}% style=ext-numeric-comp,articlein=false,giveninits=true
+% \DefineBibliographyStrings{english}{url= \textsc{url} , }% replaces the IEEE default "[Online]. Available" by "URL"
-\addbibresource{mitthesis-sample.bib}%% <== change to YOUR bib file <================= CHANGE
+%% author-year style citations and references
+%% use \parencite, not \cite, when you want "(Author, year)"
+%% The sample files are not set up to include parentheses.
+% \usepackage[style=authoryear, maxbibnames=10]{biblatex}
-%% These two commands enable line breaks in long URLs in the bibliography (delete if you don't want that)
-\setcounter{biburllcpenalty}{7000}
-\setcounter{biburlucpenalty}{8000}
-% biblatex is very powerful, and you can customize most aspects the reference list and citations to suit your needs.
-% documentation is here: https://ctan.org/pkg/biblatex
+\addbibresource{mitthesis-sample.bib}%% <== change to YOUR bib file <= CHANGE
+%% to avoid split urls and stretched white space, you can set the bibliography ragged-right:
+%\appto{\bibsetup}{\raggedright}
+
+%% biblatex is very powerful, and you can customize most aspects the reference list and citations to suit your needs.
+%% documentation is here: https://ctan.org/pkg/biblatex
+%% cheat sheet is here: https://tug.ctan.org/info/biblatex-cheatsheet/biblatex-cheatsheet.pdf
+
+%% To ensure citations are set, run Latex --> biblatex/biber --> Latex again
%%%%%%%%%% Option to use natbib %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -80,19 +112,9 @@
%%% You can use this to rename the bibliography section
%\renewcommand{\bibname}{References}
-%%% Can adjust space between bibliography items (change 4pt to something else; don't drop last two lengths, they are stretchable "glue")
+%%% To adjust space between bibliography items
%\setlength\bibsep{4pt plus 1pt minus 1pt}
-
-
-%%%%%%%%%% Table related packages %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\usepackage{booktabs}% better quality tables, https://ctan.org/pkg/booktabs
-\usepackage{array}% additional options for table columns, https://ctan.org/pkg/array
-
-%\usepackage{tabularx}% https://ctan.org/pkg/tabularx
-
-%\usepackage{dcolumn}% alignment on decimal place, https://ctan.org/pkg/dcolumn
-%\newcolumntype{d}[1]{D{.}{.}{#1}}
+% change 4pt to something else; don't drop last two lengths (they are stretchable "glue")
%%%%%%%%%% Option for "double spacing" %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -103,18 +125,18 @@
%% to change the line separation, the most attractive results will be obtained by changing the
%% leading in proportion to the the current font size, rather than just doubling the space.
-%% The setspace package provides a tool for changing line separation (use thesetwo here)
+%% The setspace package provides a tool for changing line separation. Use these two commands here:
%
% \usepackage{setspace}% documentation at https://ctan.org/pkg/setspace
% \setstretch{1.1}% you can choose some other value for the stretch of space between lines
%
-%% Use the these commands AFTER the frontmatter
+%% Use one or more of the these commands *AFTER* the frontmatter
%
% \onehalfspacing
% \doublespacing
% \singlespacing % will turn these effects off (you can use these anywhere in the document)
-%% The best result may be to stay with leading selected by the typographer who set up the font.
+%% The best result is usually to stay with leading selected by the typographer who set up the font.
%%%%%%%%%%% Metadata %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -129,7 +151,7 @@
pdfkeywords={Massachusetts Institute of Technology, MIT},
% Add keywords that will help search engines and libraries to find your work.
% Includes the name[s] of the author[s]
- % (If you have used \DocumentMetadata, at line 15, you can just put "\CopyrightAuthor," for the names.)
+ % (If you used \DocumentMetadata at line 14, you can just put "\CopyrightAuthor," for the names.)
%
pdfurl={},
% If you have a url for the thesis, put it here. Otherwise delete this.
@@ -155,11 +177,11 @@
% \Author{Author full name}{Author department}[Author's first PREVIOUS degree][Author's second PREVIOUS degree][...
% Note that third, fourth, fifth, and sixth arguments are optional [] and may be omitted
-% note on names: most of the following names are made up; Silas Holman was a professor at MIT in the 19th century.
+% note on names: most of the following names are made up; Silas Holman was a physics professor at MIT in the 19th century.
-\Author{Silas W. Holman}{Department of Physics}%[B.S. Physics, MIT, 1876][MBA, Ferengi School of Management, 2022]
-%\Author{Luisa Hernández}{Department of Research}[B.S. Mechanical Engineering, UCLA, 2018][M.S. Stellar Interiors, Vulcan Science Academy, 2020][MBA, Ferengi School of Management, 2022]
-%\Author{Thurston Howell III}{Department of Economics}
+\Author{Silas W. Holman}{Department of Physics}
+% \Author{Luisa Hernández}{Department of Research}[B.S. Mechanical Engineering, UCLA, 2018][M.S. Stellar Interiors, Vulcan Science Academy, 2020]
+% \Author{Thurston Howell III}{Department of Economics}[MBA, Ferengi School of Management, 2022]
% Use once for each degree fulfilled by thesis
% For two degrees from one department, leave the department argument blank for the second degree {}.
@@ -169,22 +191,19 @@
% If there is more than one supervisor, use the \Supervisor command for each.
\Supervisor{Edward C. Pickering}{Professor of Physics}
-%\Supervisor{Secunda Castor}{Professor of Research}
-%\Supervisor{Quintus Castor}{Professor of Log Dams}
+% \Supervisor{Edward C. Pickering}{Professor of Physics, and \\ \> Professor of Something Else}
+% \Supervisor{Secunda Castor}{Professor of Research}
+% \Supervisor{Quintus Castor}{Professor of Log Dams}
% Professor who formally accepts theses for your department (e.g., the Graduate Officer, Professor Sméagol,...)
% If more than one department, use more than once
-% **If you need to reduce vertical space, put the acceptor title in the second argument and leave the third blank {}.**
-\Acceptor{Primus Castor}{Professor of Wetlands Engineering}{Undergraduate Officer, Department of Physics}
-%\Acceptor{Tertius Castor}{Professor of Log Dams}{Graduate Officer, Department of Research}
-%\Acceptor{Quarta Castor}{Professor of Lodge Building}{Graduate Officer, Department of Mechanical Engineering}
-
-% If your title page is overflowing (from too many names, degrees, etc.), you can scale
-% down the Signature block at the bottom with this command, or use another creative solution...
-%\SignatureBlockSize{\small} %\SignatureBlockSize{\footnotesize}
+\Acceptor{Tertius Castor}{Professor of Log Dams}{Graduate Officer, Department of Research} % \\ \> Third title}
+% \Acceptor{Quarta Castor}{Professor of Lodge Building}{Graduate Officer, Department of Mechanical Engineering}
+%%% If you need to reduce vertical space, put the acceptor title in the second argument and leave the third blank, {}.
+% \Acceptor{Primus Castor}{Professor and Undergraduate Officer, Department of Physics}{}
% Usage: \DegreeDate{Month}{year}
-% Valid degree months are September, February, or June.
+% Valid degree months are February, May, June, or September
\DegreeDate{June}{1876}
% Date that final thesis is submitted to department
@@ -198,53 +217,85 @@
%
\CClicense{CC BY-NC-ND 4.0}{https://creativecommons.org/licenses/by-nc-nd/4.0/}
%
+
+%%%%%%% Solutions for overflowing titlepage %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% If your title page is overflowing (from too many names, degrees, etc.):
+%
+% (a) you can reduce the 12pt and 18pt skips between various blocks to 6pt with this command:
+%
+% \Tighten
+%
+% (b) you can scale down the Signature block at the bottom with this command:
+%
+% \SignatureBlockSize{\small} %or this one \SignatureBlockSize{\footnotesize}
+%
+% (c) you can put the acceptor name and title onto two lines, rather than three like this:
+%
+% \Acceptor{Tertius Castor}{Professor and Graduate Officer, Department of Research}{}
+%
+% (d) you can change the font size of the author name[s] with
+%
+% \AuthorNameSize{\normalsize}
+%
+% (e) and you can omit any previous degrees from the title page, instead mentioning them in the biographical sketch
+
+% Also, if you prefer to keep the text toward the top of the page with most white space at the bottom, you
+% can use this command to squash all of the vertical glue (stretchy space) with this command:
+%
+% \Squash
+%
+% This command is useful when the text has not already reach the bottom of the page, since the glue gets squashed automatically
+% when the page is too full.
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% Titlepage
+%%% Make titlepage
\maketitle
-%%%%%%%%% Contents that you need to write follows %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%% Contents that you need to write follows! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \includeonly{acknowledgments,biography,chapter1,chapter2,...,appendixa,...}
-% for usage, see https://latexref.xyz/dev/latex2e.html#g_t_005cinclude-_0026-_005cincludeonly
+% for usage of includeonly, see https://latexref.xyz/_005cinclude-_0026-_005cincludeonly.html
+
+%%% Frontmatter (write this material in the mentioned files) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% Frontmatter (write this material in the mentioned files) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% This page is optional. Edit the file committee_members.tex
+\include{committee_members}
-% The abstract environment creates all the required headers and footnote.
-% You only need to add the text of the abstract itself in the file abstract.tex
+% The abstract environment creates all the required headings and footers.
+% You only need to the text of the abstract in the file abstract.tex
\begin{abstract}
- \input{abstract.tex}% in this case, use \input rather than \include because you are inside an environment
+ \input{abstract.tex}% use \input rather than \include because we're inside an environment
\end{abstract}
-\include{acknowledgments.tex}
+\include{acknowledgments}% acknowledgments.tex (.tex extension is presumed by \include)
-\include{biography.tex}% optional, see MIT Libraries https://libraries.mit.edu/distinctive-collections/thesis-specs/#format
+\include{biography}% biography.tex (optional, see https://libraries.mit.edu/distinctive-collections/thesis-specs/#format)
-
-%%% Table of contents and lists of stuff (delete lists you don't need, e.g., if no tables) %%%%%%%%
+%%% Table of contents and lists of stuff (delete unused lists, i.e., if no tables or figures) %%%%%
\tableofcontents
\listoffigures
\listoftables
-
%%% Chapters of thesis %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% If you want to use "double spacing", you can start here...
+%% If you want to use "double spacing", you should start here...
-\include{chapter1.tex}
-%\include{chapter2.tex}
-%\include{chapter3.tex}
-%\include{chapter4.tex}
+ \include{chapter1}% .tex extension is presumed
+% \include{chapter2}
+%\include{chapter3}
+%\include{chapter4}
%%% Appendicies of thesis %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\appendix
-\include{appendixa.tex}
+\include{appendixa}
+\include{appendixb}
-
-%%% Bibliography %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% Bibliography (biblatex) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\defbibheading{bibintoc}{\chapter*{#1}\addcontentsline{toc}{backmatter}{\refname}}
% this sets the title of contents name for bibliography to \refname (= References)
@@ -257,6 +308,7 @@
%%%% Option for natbib %%%%%%%%%%%%%
+
%% use an appropriate style (.bst) and your own .bib file[s]
%\bibliographystyle{plainnat}
diff --git a/macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/Fira_Newtxsf.tex b/macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/Fira_Newtxsf.tex
index f2c8ed1158..c574f2bf8c 100644
--- a/macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/Fira_Newtxsf.tex
+++ b/macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/Fira_Newtxsf.tex
@@ -1,12 +1,12 @@
% !TEX encoding = UTF-8 Unicode
-% !BIB TS-program = biber
-% !BIB program = biber
+% !BIB TS-program = biber
+% !BIB program = biber
% This file is MIT-Thesis.tex, a LaTeX template for formatting an MIT thesis with the mitthesis class.
%
-% Version: 1.06, 2023/08/28
+% Version: 1.15, 2024/08/31
%
-% Author: John H. Lienhard (c) 2023. Reuse under the MIT license: https://ctan.org/license/mit
+% Author: John H. Lienhard, copyright 2024. Reuse under the MIT license: https://ctan.org/license/mit
% Documentation is here: https://ctan.org/pkg/mitthesis
@@ -16,19 +16,21 @@
pdfstandard = a-2b,
pdfversion = 1.7,
lang = en-US,
-% debug = {xmp-export}, % uncomment to output a separate xmpi file showing the metadata
+% pdfversion = 2.0,
+% pdfstandard = a-4,
}
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\documentclass[fontset=fira-newtxsf]{mitthesis} %,fontset=libertine ,fontset=newtx-sans-text, fontset=heros-stix2, fontset=stix2
+\documentclass[fontset=fira-newtxsf]{mitthesis}% fontset=newtx, fontset=libertine, fontset=newtx-sans-text, fontset=heros-stix2, fontset=stix2
%
% option [twoside] gives facing-page behavior for printing; omitting twoside will eliminate even-numbered blank pages.
% option [lineno] provides line numbers, as for editing
% option [mydesign] loads packages for color, title and list formats, margins, or captions: edit mydesign.tex to change defaults.
% option [fontset] is a keyvalue which can be:
-% pdftex or unicode engines: defaultfonts, libertine, lucida
-% pdftex only: fira-newtxsf, newtx, newtx-sans-text
-% unicode engines (luatex): heros-stix2, stix2, termes, termes-stix2
+% for pdftex or unicode engines: defaultfonts, libertine, lucida
+% for pdftex only: fira-newtxsf, newtx, newtx-sans-text
+% for unicode engines (luatex): heros-stix2, stix2, termes, termes-stix2
% if no key value is given, fonts default to CMR (pdftex) or LMR (unicode), i.e., "the LaTeX font".
% You can edit the fontset files or you can write your own, myfonts.tex, and do [fontset=myfonts].
% If you are using multiple languages, load the babel package in your fontset file, before the fonts.
@@ -39,12 +41,32 @@
\usepackage{listings}% documentation is here https://ctan.org/pkg/listings
%% Set chemical formulas nicely
-\usepackage[version=4]{mhchem}% documentation is here https://ctan.org/pkg/mhchem
+\usepackage[version=4]{mhchem}% documentation at https://ctan.org/pkg/mhchem
-%% Latin filler used in Chapter 1, with a test for package version date. https://ctan.org/pkg/lipsum
+%% Latin filler used in Chapter 1, with a test for package version date (https://ctan.org/pkg/lipsum)
\usepackage{lipsum}
\IfPackageAtLeastTF{lipsum}{2021/09/20}{\setlipsum{auto-lang=false}}{}
+%% Table related packages
+
+\usepackage{booktabs}% publication quality tables (https://ctan.org/pkg/booktabs)
+
+\usepackage{array}% Additional options for column formats (https://ctan.org/pkg/array)
+
+\usepackage{dcolumn}% For alignment of numbers on the decimal place (https://ctan.org/pkg/dcolumn)
+ \newcolumntype{d}[1]{D{.}{.}{#1}}% use with dcolumn package
+ % syntax: d{x.y} where x is max number of digits before decimal and y is max number after.
+
+% Package for multipage table in Appendix B.
+\usepackage{longtable}% typeset multi-page tables (https://ctan.org/pkg/longtable)
+
+%\usepackage{tabularx}% adjustable-width columns in tabular (https://ctan.org/pkg/tabularx)
+
+
+%% Package for improved typography
+
+\usepackage{microtype}% typographic fine-tuning, used in sample thesis committee page, but also acting globally on the text
+
%%%%%%%%% Graphics path (to figure files) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -59,16 +81,26 @@
%% Numerical citations of references
\usepackage[style=ext-numeric-comp,giveninits=true,maxbibnames=10,sorting=none]{biblatex}
+%% IEEE style citations and references
+% \usepackage[style=ieee,maxbibnames=10,sorting=none]{biblatex}% style=ext-numeric-comp,articlein=false,giveninits=true
+% \DefineBibliographyStrings{english}{url= \textsc{url} , }% replaces the IEEE default "[Online]. Available" by "URL"
-\addbibresource{mitthesis-sample.bib}%% <== change to YOUR bib file <================= CHANGE
+%% author-year style citations and references
+%% use \parencite, not \cite, when you want "(Author, year)"
+%% The sample files are not set up to include parentheses.
+% \usepackage[style=authoryear, maxbibnames=10]{biblatex}
-%% These two commands enable line breaks in long URLs in the bibliography (delete if you don't want that)
-\setcounter{biburllcpenalty}{7000}
-\setcounter{biburlucpenalty}{8000}
-% biblatex is very powerful, and you can customize most aspects the reference list and citations to suit your needs.
-% documentation is here: https://ctan.org/pkg/biblatex
+\addbibresource{mitthesis-sample.bib}%% <== change to YOUR bib file <= CHANGE
+%% to avoid split urls and stretched white space, you can set the bibliography ragged-right:
+%\appto{\bibsetup}{\raggedright}
+
+%% biblatex is very powerful, and you can customize most aspects the reference list and citations to suit your needs.
+%% documentation is here: https://ctan.org/pkg/biblatex
+%% cheat sheet is here: https://tug.ctan.org/info/biblatex-cheatsheet/biblatex-cheatsheet.pdf
+
+%% To ensure citations are set, run Latex --> biblatex/biber --> Latex again
%%%%%%%%%% Option to use natbib %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -80,19 +112,9 @@
%%% You can use this to rename the bibliography section
%\renewcommand{\bibname}{References}
-%%% Can adjust space between bibliography items (change 4pt to something else; don't drop last two lengths, they are stretchable "glue")
+%%% To adjust space between bibliography items
%\setlength\bibsep{4pt plus 1pt minus 1pt}
-
-
-%%%%%%%%%% Table related packages %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\usepackage{booktabs}% better quality tables, https://ctan.org/pkg/booktabs
-\usepackage{array}% additional options for table columns, https://ctan.org/pkg/array
-
-%\usepackage{tabularx}% https://ctan.org/pkg/tabularx
-
-%\usepackage{dcolumn}% alignment on decimal place, https://ctan.org/pkg/dcolumn
-%\newcolumntype{d}[1]{D{.}{.}{#1}}
+% change 4pt to something else; don't drop last two lengths (they are stretchable "glue")
%%%%%%%%%% Option for "double spacing" %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -103,18 +125,18 @@
%% to change the line separation, the most attractive results will be obtained by changing the
%% leading in proportion to the the current font size, rather than just doubling the space.
-%% The setspace package provides a tool for changing line separation (use thesetwo here)
+%% The setspace package provides a tool for changing line separation. Use these two commands here:
%
% \usepackage{setspace}% documentation at https://ctan.org/pkg/setspace
% \setstretch{1.1}% you can choose some other value for the stretch of space between lines
%
-%% Use the these commands AFTER the frontmatter
+%% Use one or more of the these commands *AFTER* the frontmatter
%
% \onehalfspacing
% \doublespacing
% \singlespacing % will turn these effects off (you can use these anywhere in the document)
-%% The best result may be to stay with leading selected by the typographer who set up the font.
+%% The best result is usually to stay with leading selected by the typographer who set up the font.
%%%%%%%%%%% Metadata %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -129,7 +151,7 @@
pdfkeywords={Massachusetts Institute of Technology, MIT},
% Add keywords that will help search engines and libraries to find your work.
% Includes the name[s] of the author[s]
- % (If you have used \DocumentMetadata, at line 15, you can just put "\CopyrightAuthor," for the names.)
+ % (If you used \DocumentMetadata at line 14, you can just put "\CopyrightAuthor," for the names.)
%
pdfurl={},
% If you have a url for the thesis, put it here. Otherwise delete this.
@@ -155,11 +177,11 @@
% \Author{Author full name}{Author department}[Author's first PREVIOUS degree][Author's second PREVIOUS degree][...
% Note that third, fourth, fifth, and sixth arguments are optional [] and may be omitted
-% note on names: most of the following names are made up; Silas Holman was a professor at MIT in the 19th century.
+% note on names: most of the following names are made up; Silas Holman was a physics professor at MIT in the 19th century.
-\Author{Silas W. Holman}{Department of Physics}%[B.S. Physics, MIT, 1876][MBA, Ferengi School of Management, 2022]
-%\Author{Luisa Hernández}{Department of Research}[B.S. Mechanical Engineering, UCLA, 2018][M.S. Stellar Interiors, Vulcan Science Academy, 2020][MBA, Ferengi School of Management, 2022]
-%\Author{Thurston Howell III}{Department of Economics}
+\Author{Silas W. Holman}{Department of Physics}
+% \Author{Luisa Hernández}{Department of Research}[B.S. Mechanical Engineering, UCLA, 2018][M.S. Stellar Interiors, Vulcan Science Academy, 2020]
+% \Author{Thurston Howell III}{Department of Economics}[MBA, Ferengi School of Management, 2022]
% Use once for each degree fulfilled by thesis
% For two degrees from one department, leave the department argument blank for the second degree {}.
@@ -169,22 +191,19 @@
% If there is more than one supervisor, use the \Supervisor command for each.
\Supervisor{Edward C. Pickering}{Professor of Physics}
-%\Supervisor{Secunda Castor}{Professor of Research}
-%\Supervisor{Quintus Castor}{Professor of Log Dams}
+% \Supervisor{Edward C. Pickering}{Professor of Physics, and \\ \> Professor of Something Else}
+% \Supervisor{Secunda Castor}{Professor of Research}
+% \Supervisor{Quintus Castor}{Professor of Log Dams}
% Professor who formally accepts theses for your department (e.g., the Graduate Officer, Professor Sméagol,...)
% If more than one department, use more than once
-% **If you need to reduce vertical space, put the acceptor title in the second argument and leave the third blank {}.**
-\Acceptor{Primus Castor}{Professor of Wetlands Engineering}{Undergraduate Officer, Department of Physics}
-%\Acceptor{Tertius Castor}{Professor of Log Dams}{Graduate Officer, Department of Research}
-%\Acceptor{Quarta Castor}{Professor of Lodge Building}{Graduate Officer, Department of Mechanical Engineering}
-
-% If your title page is overflowing (from too many names, degrees, etc.), you can scale
-% down the Signature block at the bottom with this command, or use another creative solution...
-%\SignatureBlockSize{\small} %\SignatureBlockSize{\footnotesize}
+\Acceptor{Tertius Castor}{Professor of Log Dams}{Graduate Officer, Department of Research} % \\ \> Third title}
+% \Acceptor{Quarta Castor}{Professor of Lodge Building}{Graduate Officer, Department of Mechanical Engineering}
+%%% If you need to reduce vertical space, put the acceptor title in the second argument and leave the third blank, {}.
+% \Acceptor{Primus Castor}{Professor and Undergraduate Officer, Department of Physics}{}
% Usage: \DegreeDate{Month}{year}
-% Valid degree months are September, February, or June.
+% Valid degree months are February, May, June, or September
\DegreeDate{June}{1876}
% Date that final thesis is submitted to department
@@ -198,53 +217,85 @@
%
\CClicense{CC BY-NC-ND 4.0}{https://creativecommons.org/licenses/by-nc-nd/4.0/}
%
+
+%%%%%%% Solutions for overflowing titlepage %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% If your title page is overflowing (from too many names, degrees, etc.):
+%
+% (a) you can reduce the 12pt and 18pt skips between various blocks to 6pt with this command:
+%
+% \Tighten
+%
+% (b) you can scale down the Signature block at the bottom with this command:
+%
+% \SignatureBlockSize{\small} %or this one \SignatureBlockSize{\footnotesize}
+%
+% (c) you can put the acceptor name and title onto two lines, rather than three like this:
+%
+% \Acceptor{Tertius Castor}{Professor and Graduate Officer, Department of Research}{}
+%
+% (d) you can change the font size of the author name[s] with
+%
+% \AuthorNameSize{\normalsize}
+%
+% (e) and you can omit any previous degrees from the title page, instead mentioning them in the biographical sketch
+
+% Also, if you prefer to keep the text toward the top of the page with most white space at the bottom, you
+% can use this command to squash all of the vertical glue (stretchy space) with this command:
+%
+% \Squash
+%
+% This command is useful when the text has not already reach the bottom of the page, since the glue gets squashed automatically
+% when the page is too full.
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% Titlepage
+%%% Make titlepage
\maketitle
-%%%%%%%%% Contents that you need to write follows %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%% Contents that you need to write follows! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \includeonly{acknowledgments,biography,chapter1,chapter2,...,appendixa,...}
-% for usage, see https://latexref.xyz/dev/latex2e.html#g_t_005cinclude-_0026-_005cincludeonly
+% for usage of includeonly, see https://latexref.xyz/_005cinclude-_0026-_005cincludeonly.html
-%%% Frontmatter (write this material in the mentioned files) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% Frontmatter (write this material in the mentioned files) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% The abstract environment creates all the required headers and footnote.
-% You only need to add the text of the abstract itself in the file abstract.tex
+% This page is optional. Edit the file committee_members.tex
+\include{committee_members}
+
+% The abstract environment creates all the required headings and footers.
+% You only need to the text of the abstract in the file abstract.tex
\begin{abstract}
- \input{abstract.tex}% in this case, use \input rather than \include because you are inside an environment
+ \input{abstract.tex}% use \input rather than \include because we're inside an environment
\end{abstract}
-\include{acknowledgments.tex}
-
-\include{biography.tex}% optional, see MIT Libraries https://libraries.mit.edu/distinctive-collections/thesis-specs/#format
+\include{acknowledgments}% acknowledgments.tex (.tex extension is presumed by \include)
+\include{biography}% biography.tex (optional, see https://libraries.mit.edu/distinctive-collections/thesis-specs/#format)
-%%% Table of contents and lists of stuff (delete lists you don't need, e.g., if no tables) %%%%%%%%
+%%% Table of contents and lists of stuff (delete unused lists, i.e., if no tables or figures) %%%%%
\tableofcontents
\listoffigures
\listoftables
-
%%% Chapters of thesis %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% If you want to use "double spacing", you can start here...
+%% If you want to use "double spacing", you should start here...
-\include{chapter1.tex}
-%\include{chapter2.tex}
-%\include{chapter3.tex}
-%\include{chapter4.tex}
+ \include{chapter1}% .tex extension is presumed
+% \include{chapter2}
+%\include{chapter3}
+%\include{chapter4}
%%% Appendicies of thesis %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\appendix
-\include{appendixa.tex}
-
+\include{appendixa}
+\include{appendixb}
-%%% Bibliography %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% Bibliography (biblatex) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\defbibheading{bibintoc}{\chapter*{#1}\addcontentsline{toc}{backmatter}{\refname}}
% this sets the title of contents name for bibliography to \refname (= References)
@@ -252,8 +303,12 @@
\printbibliography[title={\refname},heading=bibintoc]
+% biblatex also supports chapter-by-chapter bibliography, https://tex.stackexchange.com/a/296502/119566
+% see the biblatex manual, section 3.14.3
+
%%%% Option for natbib %%%%%%%%%%%%%
+
%% use an appropriate style (.bst) and your own .bib file[s]
%\bibliographystyle{plainnat}
diff --git a/macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/Heros-Stix2.tex b/macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/Heros-Stix2.tex
index 7e914bfa38..8d39d55b8a 100644
--- a/macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/Heros-Stix2.tex
+++ b/macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/Heros-Stix2.tex
@@ -1,12 +1,12 @@
% !TEX encoding = UTF-8 Unicode
-% !BIB TS-program = biber
-% !BIB program = biber
+% !BIB TS-program = biber
+% !BIB program = biber
% This file is MIT-Thesis.tex, a LaTeX template for formatting an MIT thesis with the mitthesis class.
%
-% Version: 1.06, 2023/08/28
+% Version: 1.15, 2024/08/31
%
-% Author: John H. Lienhard (c) 2023. Reuse under the MIT license: https://ctan.org/license/mit
+% Author: John H. Lienhard, copyright 2024. Reuse under the MIT license: https://ctan.org/license/mit
% Documentation is here: https://ctan.org/pkg/mitthesis
@@ -16,19 +16,21 @@
pdfstandard = a-2b,
pdfversion = 1.7,
lang = en-US,
-% debug = {xmp-export}, % uncomment to output a separate xmpi file showing the metadata
+% pdfversion = 2.0,
+% pdfstandard = a-4,
}
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\documentclass[fontset=heros-stix2]{mitthesis} %,fontset=libertine ,fontset=newtx-sans-text, fontset=heros-stix2, fontset=stix2
+\documentclass[fontset=heros-stix2]{mitthesis}% fontset=newtx, fontset=libertine, fontset=newtx-sans-text, fontset=heros-stix2, fontset=stix2
%
% option [twoside] gives facing-page behavior for printing; omitting twoside will eliminate even-numbered blank pages.
% option [lineno] provides line numbers, as for editing
% option [mydesign] loads packages for color, title and list formats, margins, or captions: edit mydesign.tex to change defaults.
% option [fontset] is a keyvalue which can be:
-% pdftex or unicode engines: defaultfonts, libertine, lucida
-% pdftex only: fira-newtxsf, newtx, newtx-sans-text
-% unicode engines (luatex): heros-stix2, stix2, termes, termes-stix2
+% for pdftex or unicode engines: defaultfonts, libertine, lucida
+% for pdftex only: fira-newtxsf, newtx, newtx-sans-text
+% for unicode engines (luatex): heros-stix2, stix2, termes, termes-stix2
% if no key value is given, fonts default to CMR (pdftex) or LMR (unicode), i.e., "the LaTeX font".
% You can edit the fontset files or you can write your own, myfonts.tex, and do [fontset=myfonts].
% If you are using multiple languages, load the babel package in your fontset file, before the fonts.
@@ -39,12 +41,32 @@
\usepackage{listings}% documentation is here https://ctan.org/pkg/listings
%% Set chemical formulas nicely
-\usepackage[version=4]{mhchem}% documentation is here https://ctan.org/pkg/mhchem
+\usepackage[version=4]{mhchem}% documentation at https://ctan.org/pkg/mhchem
-%% Latin filler used in Chapter 1, with a test for package version date. https://ctan.org/pkg/lipsum
+%% Latin filler used in Chapter 1, with a test for package version date (https://ctan.org/pkg/lipsum)
\usepackage{lipsum}
\IfPackageAtLeastTF{lipsum}{2021/09/20}{\setlipsum{auto-lang=false}}{}
+%% Table related packages
+
+\usepackage{booktabs}% publication quality tables (https://ctan.org/pkg/booktabs)
+
+\usepackage{array}% Additional options for column formats (https://ctan.org/pkg/array)
+
+\usepackage{dcolumn}% For alignment of numbers on the decimal place (https://ctan.org/pkg/dcolumn)
+ \newcolumntype{d}[1]{D{.}{.}{#1}}% use with dcolumn package
+ % syntax: d{x.y} where x is max number of digits before decimal and y is max number after.
+
+% Package for multipage table in Appendix B.
+\usepackage{longtable}% typeset multi-page tables (https://ctan.org/pkg/longtable)
+
+%\usepackage{tabularx}% adjustable-width columns in tabular (https://ctan.org/pkg/tabularx)
+
+
+%% Package for improved typography
+
+\usepackage{microtype}% typographic fine-tuning, used in sample thesis committee page, but also acting globally on the text
+
%%%%%%%%% Graphics path (to figure files) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -59,16 +81,26 @@
%% Numerical citations of references
\usepackage[style=ext-numeric-comp,giveninits=true,maxbibnames=10,sorting=none]{biblatex}
+%% IEEE style citations and references
+% \usepackage[style=ieee,maxbibnames=10,sorting=none]{biblatex}% style=ext-numeric-comp,articlein=false,giveninits=true
+% \DefineBibliographyStrings{english}{url= \textsc{url} , }% replaces the IEEE default "[Online]. Available" by "URL"
+
+%% author-year style citations and references
+%% use \parencite, not \cite, when you want "(Author, year)"
+%% The sample files are not set up to include parentheses.
+% \usepackage[style=authoryear, maxbibnames=10]{biblatex}
-\addbibresource{mitthesis-sample.bib}%% <== change to YOUR bib file <================= CHANGE
-%% These two commands enable line breaks in long URLs in the bibliography (delete if you don't want that)
-\setcounter{biburllcpenalty}{7000}
-\setcounter{biburlucpenalty}{8000}
+\addbibresource{mitthesis-sample.bib}%% <== change to YOUR bib file <= CHANGE
-% biblatex is very powerful, and you can customize most aspects the reference list and citations to suit your needs.
-% documentation is here: https://ctan.org/pkg/biblatex
+%% to avoid split urls and stretched white space, you can set the bibliography ragged-right:
+%\appto{\bibsetup}{\raggedright}
+%% biblatex is very powerful, and you can customize most aspects the reference list and citations to suit your needs.
+%% documentation is here: https://ctan.org/pkg/biblatex
+%% cheat sheet is here: https://tug.ctan.org/info/biblatex-cheatsheet/biblatex-cheatsheet.pdf
+
+%% To ensure citations are set, run Latex --> biblatex/biber --> Latex again
%%%%%%%%%% Option to use natbib %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -80,19 +112,9 @@
%%% You can use this to rename the bibliography section
%\renewcommand{\bibname}{References}
-%%% Can adjust space between bibliography items (change 4pt to something else; don't drop last two lengths, they are stretchable "glue")
+%%% To adjust space between bibliography items
%\setlength\bibsep{4pt plus 1pt minus 1pt}
-
-
-%%%%%%%%%% Table related packages %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\usepackage{booktabs}% better quality tables, https://ctan.org/pkg/booktabs
-\usepackage{array}% additional options for table columns, https://ctan.org/pkg/array
-
-%\usepackage{tabularx}% https://ctan.org/pkg/tabularx
-
-%\usepackage{dcolumn}% alignment on decimal place, https://ctan.org/pkg/dcolumn
-%\newcolumntype{d}[1]{D{.}{.}{#1}}
+% change 4pt to something else; don't drop last two lengths (they are stretchable "glue")
%%%%%%%%%% Option for "double spacing" %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -103,18 +125,18 @@
%% to change the line separation, the most attractive results will be obtained by changing the
%% leading in proportion to the the current font size, rather than just doubling the space.
-%% The setspace package provides a tool for changing line separation (use thesetwo here)
+%% The setspace package provides a tool for changing line separation. Use these two commands here:
%
% \usepackage{setspace}% documentation at https://ctan.org/pkg/setspace
% \setstretch{1.1}% you can choose some other value for the stretch of space between lines
%
-%% Use the these commands AFTER the frontmatter
+%% Use one or more of the these commands *AFTER* the frontmatter
%
% \onehalfspacing
% \doublespacing
% \singlespacing % will turn these effects off (you can use these anywhere in the document)
-%% The best result may be to stay with leading selected by the typographer who set up the font.
+%% The best result is usually to stay with leading selected by the typographer who set up the font.
%%%%%%%%%%% Metadata %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -129,7 +151,7 @@
pdfkeywords={Massachusetts Institute of Technology, MIT},
% Add keywords that will help search engines and libraries to find your work.
% Includes the name[s] of the author[s]
- % (If you have used \DocumentMetadata, at line 15, you can just put "\CopyrightAuthor," for the names.)
+ % (If you used \DocumentMetadata at line 14, you can just put "\CopyrightAuthor," for the names.)
%
pdfurl={},
% If you have a url for the thesis, put it here. Otherwise delete this.
@@ -155,11 +177,11 @@
% \Author{Author full name}{Author department}[Author's first PREVIOUS degree][Author's second PREVIOUS degree][...
% Note that third, fourth, fifth, and sixth arguments are optional [] and may be omitted
-% note on names: most of the following names are made up; Silas Holman was a professor at MIT in the 19th century.
+% note on names: most of the following names are made up; Silas Holman was a physics professor at MIT in the 19th century.
-\Author{Silas W. Holman}{Department of Physics}%[B.S. Physics, MIT, 1876][MBA, Ferengi School of Management, 2022]
-%\Author{Luisa Hernández}{Department of Research}[B.S. Mechanical Engineering, UCLA, 2018][M.S. Stellar Interiors, Vulcan Science Academy, 2020][MBA, Ferengi School of Management, 2022]
-%\Author{Thurston Howell III}{Department of Economics}
+\Author{Silas W. Holman}{Department of Physics}
+% \Author{Luisa Hernández}{Department of Research}[B.S. Mechanical Engineering, UCLA, 2018][M.S. Stellar Interiors, Vulcan Science Academy, 2020]
+% \Author{Thurston Howell III}{Department of Economics}[MBA, Ferengi School of Management, 2022]
% Use once for each degree fulfilled by thesis
% For two degrees from one department, leave the department argument blank for the second degree {}.
@@ -169,22 +191,19 @@
% If there is more than one supervisor, use the \Supervisor command for each.
\Supervisor{Edward C. Pickering}{Professor of Physics}
-%\Supervisor{Secunda Castor}{Professor of Research}
-%\Supervisor{Quintus Castor}{Professor of Log Dams}
+% \Supervisor{Edward C. Pickering}{Professor of Physics, and \\ \> Professor of Something Else}
+% \Supervisor{Secunda Castor}{Professor of Research}
+% \Supervisor{Quintus Castor}{Professor of Log Dams}
% Professor who formally accepts theses for your department (e.g., the Graduate Officer, Professor Sméagol,...)
% If more than one department, use more than once
-% **If you need to reduce vertical space, put the acceptor title in the second argument and leave the third blank {}.**
-\Acceptor{Primus Castor}{Professor of Wetlands Engineering}{Undergraduate Officer, Department of Physics}
-%\Acceptor{Tertius Castor}{Professor of Log Dams}{Graduate Officer, Department of Research}
-%\Acceptor{Quarta Castor}{Professor of Lodge Building}{Graduate Officer, Department of Mechanical Engineering}
-
-% If your title page is overflowing (from too many names, degrees, etc.), you can scale
-% down the Signature block at the bottom with this command, or use another creative solution...
-%\SignatureBlockSize{\small} %\SignatureBlockSize{\footnotesize}
+\Acceptor{Tertius Castor}{Professor of Log Dams}{Graduate Officer, Department of Research} % \\ \> Third title}
+% \Acceptor{Quarta Castor}{Professor of Lodge Building}{Graduate Officer, Department of Mechanical Engineering}
+%%% If you need to reduce vertical space, put the acceptor title in the second argument and leave the third blank, {}.
+% \Acceptor{Primus Castor}{Professor and Undergraduate Officer, Department of Physics}{}
% Usage: \DegreeDate{Month}{year}
-% Valid degree months are September, February, or June.
+% Valid degree months are February, May, June, or September
\DegreeDate{June}{1876}
% Date that final thesis is submitted to department
@@ -198,67 +217,98 @@
%
\CClicense{CC BY-NC-ND 4.0}{https://creativecommons.org/licenses/by-nc-nd/4.0/}
%
+
+%%%%%%% Solutions for overflowing titlepage %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% If your title page is overflowing (from too many names, degrees, etc.):
+%
+% (a) you can reduce the 12pt and 18pt skips between various blocks to 6pt with this command:
+%
+% \Tighten
+%
+% (b) you can scale down the Signature block at the bottom with this command:
+%
+% \SignatureBlockSize{\small} %or this one \SignatureBlockSize{\footnotesize}
+%
+% (c) you can put the acceptor name and title onto two lines, rather than three like this:
+%
+% \Acceptor{Tertius Castor}{Professor and Graduate Officer, Department of Research}{}
+%
+% (d) you can change the font size of the author name[s] with
+%
+% \AuthorNameSize{\normalsize}
+%
+% (e) and you can omit any previous degrees from the title page, instead mentioning them in the biographical sketch
+
+% Also, if you prefer to keep the text toward the top of the page with most white space at the bottom, you
+% can use this command to squash all of the vertical glue (stretchy space) with this command:
+%
+% \Squash
+%
+% This command is useful when the text has not already reach the bottom of the page, since the glue gets squashed automatically
+% when the page is too full.
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% Titlepage
+%%% Make titlepage
\maketitle
-%%%%%%%%% Contents that you need to write follows %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%% Contents that you need to write follows! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \includeonly{acknowledgments,biography,chapter1,chapter2,...,appendixa,...}
-% for usage, see https://latexref.xyz/dev/latex2e.html#g_t_005cinclude-_0026-_005cincludeonly
+% for usage of includeonly, see https://latexref.xyz/_005cinclude-_0026-_005cincludeonly.html
+
+%%% Frontmatter (write this material in the mentioned files) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% Frontmatter (write this material in the mentioned files) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% This page is optional. Edit the file committee_members.tex
+\include{committee_members}
-% The abstract environment creates all the required headers and footnote.
-% You only need to add the text of the abstract itself in the file abstract.tex
+% The abstract environment creates all the required headings and footers.
+% You only need to the text of the abstract in the file abstract.tex
\begin{abstract}
- \input{abstract.tex}% in this case, use \input rather than \include because you are inside an environment
+ \input{abstract.tex}% use \input rather than \include because we're inside an environment
\end{abstract}
-\include{acknowledgments.tex}
+\include{acknowledgments}% acknowledgments.tex (.tex extension is presumed by \include)
-\include{biography.tex}% optional, see MIT Libraries https://libraries.mit.edu/distinctive-collections/thesis-specs/#format
+\include{biography}% biography.tex (optional, see https://libraries.mit.edu/distinctive-collections/thesis-specs/#format)
-
-%%% Table of contents and lists of stuff (delete lists you don't need, e.g., if no tables) %%%%%%%%
+%%% Table of contents and lists of stuff (delete unused lists, i.e., if no tables or figures) %%%%%
\tableofcontents
\listoffigures
\listoftables
-
%%% Chapters of thesis %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% If you want to use "double spacing", you can start here...
+%% If you want to use "double spacing", you should start here...
-\include{chapter1.tex}
-%\include{chapter2.tex}
-%\include{chapter3.tex}
-%\include{chapter4.tex}
+ \include{chapter1}% .tex extension is presumed
+% \include{chapter2}
+%\include{chapter3}
+%\include{chapter4}
%%% Appendicies of thesis %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\appendix
-\include{appendixa.tex}
+\include{appendixa}
+\include{appendixb}
-
-%%% Bibliography %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% Bibliography (biblatex) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\defbibheading{bibintoc}{\chapter*{#1}\addcontentsline{toc}{backmatter}{\refname}}
% this sets the title of contents name for bibliography to \refname (= References)
% change "backmatter" to "chapter" if you prefer a bold face entry in the table of contents
-{ \raggedright% to avoid stretched white space and split urls; DELETE THIS if you prefer justified text
-%
\printbibliography[title={\refname},heading=bibintoc]
-}
+
% biblatex also supports chapter-by-chapter bibliography, https://tex.stackexchange.com/a/296502/119566
% see the biblatex manual, section 3.14.3
%%%% Option for natbib %%%%%%%%%%%%%
+
%% use an appropriate style (.bst) and your own .bib file[s]
%\bibliographystyle{plainnat}
diff --git a/macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/Libertine.tex b/macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/Libertine.tex
index 9198d8a489..eb0798989e 100644
--- a/macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/Libertine.tex
+++ b/macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/Libertine.tex
@@ -1,12 +1,12 @@
% !TEX encoding = UTF-8 Unicode
-% !BIB TS-program = biber
-% !BIB program = biber
+% !BIB TS-program = biber
+% !BIB program = biber
% This file is MIT-Thesis.tex, a LaTeX template for formatting an MIT thesis with the mitthesis class.
%
-% Version: 1.06, 2023/08/28
+% Version: 1.15, 2024/08/31
%
-% Author: John H. Lienhard (c) 2023. Reuse under the MIT license: https://ctan.org/license/mit
+% Author: John H. Lienhard, copyright 2024. Reuse under the MIT license: https://ctan.org/license/mit
% Documentation is here: https://ctan.org/pkg/mitthesis
@@ -16,19 +16,21 @@
pdfstandard = a-2b,
pdfversion = 1.7,
lang = en-US,
-% debug = {xmp-export}, % uncomment to output a separate xmpi file showing the metadata
+% pdfversion = 2.0,
+% pdfstandard = a-4,
}
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\documentclass[fontset=libertine]{mitthesis} %,fontset=libertine ,fontset=newtx-sans-text, fontset=heros-stix2, fontset=stix2
+\documentclass[fontset=libertine]{mitthesis}% fontset=newtx, fontset=libertine, fontset=newtx-sans-text, fontset=heros-stix2, fontset=stix2
%
% option [twoside] gives facing-page behavior for printing; omitting twoside will eliminate even-numbered blank pages.
% option [lineno] provides line numbers, as for editing
% option [mydesign] loads packages for color, title and list formats, margins, or captions: edit mydesign.tex to change defaults.
% option [fontset] is a keyvalue which can be:
-% pdftex or unicode engines: defaultfonts, libertine, lucida
-% pdftex only: fira-newtxsf, newtx, newtx-sans-text
-% unicode engines (luatex): heros-stix2, stix2, termes, termes-stix2
+% for pdftex or unicode engines: defaultfonts, libertine, lucida
+% for pdftex only: fira-newtxsf, newtx, newtx-sans-text
+% for unicode engines (luatex): heros-stix2, stix2, termes, termes-stix2
% if no key value is given, fonts default to CMR (pdftex) or LMR (unicode), i.e., "the LaTeX font".
% You can edit the fontset files or you can write your own, myfonts.tex, and do [fontset=myfonts].
% If you are using multiple languages, load the babel package in your fontset file, before the fonts.
@@ -39,12 +41,32 @@
\usepackage{listings}% documentation is here https://ctan.org/pkg/listings
%% Set chemical formulas nicely
-\usepackage[version=4]{mhchem}% documentation is here https://ctan.org/pkg/mhchem
+\usepackage[version=4]{mhchem}% documentation at https://ctan.org/pkg/mhchem
-%% Latin filler used in Chapter 1, with a test for package version date. https://ctan.org/pkg/lipsum
+%% Latin filler used in Chapter 1, with a test for package version date (https://ctan.org/pkg/lipsum)
\usepackage{lipsum}
\IfPackageAtLeastTF{lipsum}{2021/09/20}{\setlipsum{auto-lang=false}}{}
+%% Table related packages
+
+\usepackage{booktabs}% publication quality tables (https://ctan.org/pkg/booktabs)
+
+\usepackage{array}% Additional options for column formats (https://ctan.org/pkg/array)
+
+\usepackage{dcolumn}% For alignment of numbers on the decimal place (https://ctan.org/pkg/dcolumn)
+ \newcolumntype{d}[1]{D{.}{.}{#1}}% use with dcolumn package
+ % syntax: d{x.y} where x is max number of digits before decimal and y is max number after.
+
+% Package for multipage table in Appendix B.
+\usepackage{longtable}% typeset multi-page tables (https://ctan.org/pkg/longtable)
+
+%\usepackage{tabularx}% adjustable-width columns in tabular (https://ctan.org/pkg/tabularx)
+
+
+%% Package for improved typography
+
+\usepackage{microtype}% typographic fine-tuning, used in sample thesis committee page, but also acting globally on the text
+
%%%%%%%%% Graphics path (to figure files) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -59,16 +81,26 @@
%% Numerical citations of references
\usepackage[style=ext-numeric-comp,giveninits=true,maxbibnames=10,sorting=none]{biblatex}
+%% IEEE style citations and references
+% \usepackage[style=ieee,maxbibnames=10,sorting=none]{biblatex}% style=ext-numeric-comp,articlein=false,giveninits=true
+% \DefineBibliographyStrings{english}{url= \textsc{url} , }% replaces the IEEE default "[Online]. Available" by "URL"
-\addbibresource{mitthesis-sample.bib}%% <== change to YOUR bib file <================= CHANGE
+%% author-year style citations and references
+%% use \parencite, not \cite, when you want "(Author, year)"
+%% The sample files are not set up to include parentheses.
+% \usepackage[style=authoryear, maxbibnames=10]{biblatex}
-%% These two commands enable line breaks in long URLs in the bibliography (delete if you don't want that)
-\setcounter{biburllcpenalty}{7000}
-\setcounter{biburlucpenalty}{8000}
-% biblatex is very powerful, and you can customize most aspects the reference list and citations to suit your needs.
-% documentation is here: https://ctan.org/pkg/biblatex
+\addbibresource{mitthesis-sample.bib}%% <== change to YOUR bib file <= CHANGE
+%% to avoid split urls and stretched white space, you can set the bibliography ragged-right:
+%\appto{\bibsetup}{\raggedright}
+
+%% biblatex is very powerful, and you can customize most aspects the reference list and citations to suit your needs.
+%% documentation is here: https://ctan.org/pkg/biblatex
+%% cheat sheet is here: https://tug.ctan.org/info/biblatex-cheatsheet/biblatex-cheatsheet.pdf
+
+%% To ensure citations are set, run Latex --> biblatex/biber --> Latex again
%%%%%%%%%% Option to use natbib %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -80,19 +112,9 @@
%%% You can use this to rename the bibliography section
%\renewcommand{\bibname}{References}
-%%% Can adjust space between bibliography items (change 4pt to something else; don't drop last two lengths, they are stretchable "glue")
+%%% To adjust space between bibliography items
%\setlength\bibsep{4pt plus 1pt minus 1pt}
-
-
-%%%%%%%%%% Table related packages %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\usepackage{booktabs}% better quality tables, https://ctan.org/pkg/booktabs
-\usepackage{array}% additional options for table columns, https://ctan.org/pkg/array
-
-%\usepackage{tabularx}% https://ctan.org/pkg/tabularx
-
-%\usepackage{dcolumn}% alignment on decimal place, https://ctan.org/pkg/dcolumn
-%\newcolumntype{d}[1]{D{.}{.}{#1}}
+% change 4pt to something else; don't drop last two lengths (they are stretchable "glue")
%%%%%%%%%% Option for "double spacing" %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -103,18 +125,18 @@
%% to change the line separation, the most attractive results will be obtained by changing the
%% leading in proportion to the the current font size, rather than just doubling the space.
-%% The setspace package provides a tool for changing line separation (use thesetwo here)
+%% The setspace package provides a tool for changing line separation. Use these two commands here:
%
% \usepackage{setspace}% documentation at https://ctan.org/pkg/setspace
% \setstretch{1.1}% you can choose some other value for the stretch of space between lines
%
-%% Use the these commands AFTER the frontmatter
+%% Use one or more of the these commands *AFTER* the frontmatter
%
% \onehalfspacing
% \doublespacing
% \singlespacing % will turn these effects off (you can use these anywhere in the document)
-%% The best result may be to stay with leading selected by the typographer who set up the font.
+%% The best result is usually to stay with leading selected by the typographer who set up the font.
%%%%%%%%%%% Metadata %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -129,7 +151,7 @@
pdfkeywords={Massachusetts Institute of Technology, MIT},
% Add keywords that will help search engines and libraries to find your work.
% Includes the name[s] of the author[s]
- % (If you have used \DocumentMetadata, at line 15, you can just put "\CopyrightAuthor," for the names.)
+ % (If you used \DocumentMetadata at line 14, you can just put "\CopyrightAuthor," for the names.)
%
pdfurl={},
% If you have a url for the thesis, put it here. Otherwise delete this.
@@ -155,11 +177,11 @@
% \Author{Author full name}{Author department}[Author's first PREVIOUS degree][Author's second PREVIOUS degree][...
% Note that third, fourth, fifth, and sixth arguments are optional [] and may be omitted
-% note on names: most of the following names are made up; Silas Holman was a professor at MIT in the 19th century.
+% note on names: most of the following names are made up; Silas Holman was a physics professor at MIT in the 19th century.
-\Author{Silas W. Holman}{Department of Physics}%[B.S. Physics, MIT, 1876][MBA, Ferengi School of Management, 2022]
-%\Author{Luisa Hernández}{Department of Research}[B.S. Mechanical Engineering, UCLA, 2018][M.S. Stellar Interiors, Vulcan Science Academy, 2020][MBA, Ferengi School of Management, 2022]
-%\Author{Thurston Howell III}{Department of Economics}
+\Author{Silas W. Holman}{Department of Physics}
+% \Author{Luisa Hernández}{Department of Research}[B.S. Mechanical Engineering, UCLA, 2018][M.S. Stellar Interiors, Vulcan Science Academy, 2020]
+% \Author{Thurston Howell III}{Department of Economics}[MBA, Ferengi School of Management, 2022]
% Use once for each degree fulfilled by thesis
% For two degrees from one department, leave the department argument blank for the second degree {}.
@@ -169,22 +191,19 @@
% If there is more than one supervisor, use the \Supervisor command for each.
\Supervisor{Edward C. Pickering}{Professor of Physics}
-%\Supervisor{Secunda Castor}{Professor of Research}
-%\Supervisor{Quintus Castor}{Professor of Log Dams}
+% \Supervisor{Edward C. Pickering}{Professor of Physics, and \\ \> Professor of Something Else}
+% \Supervisor{Secunda Castor}{Professor of Research}
+% \Supervisor{Quintus Castor}{Professor of Log Dams}
% Professor who formally accepts theses for your department (e.g., the Graduate Officer, Professor Sméagol,...)
% If more than one department, use more than once
-% **If you need to reduce vertical space, put the acceptor title in the second argument and leave the third blank {}.**
-\Acceptor{Primus Castor}{Professor of Wetlands Engineering}{Undergraduate Officer, Department of Physics}
-%\Acceptor{Tertius Castor}{Professor of Log Dams}{Graduate Officer, Department of Research}
-%\Acceptor{Quarta Castor}{Professor of Lodge Building}{Graduate Officer, Department of Mechanical Engineering}
-
-% If your title page is overflowing (from too many names, degrees, etc.), you can scale
-% down the Signature block at the bottom with this command, or use another creative solution...
-%\SignatureBlockSize{\small} %\SignatureBlockSize{\footnotesize}
+\Acceptor{Tertius Castor}{Professor of Log Dams}{Graduate Officer, Department of Research} % \\ \> Third title}
+% \Acceptor{Quarta Castor}{Professor of Lodge Building}{Graduate Officer, Department of Mechanical Engineering}
+%%% If you need to reduce vertical space, put the acceptor title in the second argument and leave the third blank, {}.
+% \Acceptor{Primus Castor}{Professor and Undergraduate Officer, Department of Physics}{}
% Usage: \DegreeDate{Month}{year}
-% Valid degree months are September, February, or June.
+% Valid degree months are February, May, June, or September
\DegreeDate{June}{1876}
% Date that final thesis is submitted to department
@@ -198,53 +217,85 @@
%
\CClicense{CC BY-NC-ND 4.0}{https://creativecommons.org/licenses/by-nc-nd/4.0/}
%
+
+%%%%%%% Solutions for overflowing titlepage %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% If your title page is overflowing (from too many names, degrees, etc.):
+%
+% (a) you can reduce the 12pt and 18pt skips between various blocks to 6pt with this command:
+%
+% \Tighten
+%
+% (b) you can scale down the Signature block at the bottom with this command:
+%
+% \SignatureBlockSize{\small} %or this one \SignatureBlockSize{\footnotesize}
+%
+% (c) you can put the acceptor name and title onto two lines, rather than three like this:
+%
+% \Acceptor{Tertius Castor}{Professor and Graduate Officer, Department of Research}{}
+%
+% (d) you can change the font size of the author name[s] with
+%
+% \AuthorNameSize{\normalsize}
+%
+% (e) and you can omit any previous degrees from the title page, instead mentioning them in the biographical sketch
+
+% Also, if you prefer to keep the text toward the top of the page with most white space at the bottom, you
+% can use this command to squash all of the vertical glue (stretchy space) with this command:
+%
+% \Squash
+%
+% This command is useful when the text has not already reach the bottom of the page, since the glue gets squashed automatically
+% when the page is too full.
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% Titlepage
+%%% Make titlepage
\maketitle
-%%%%%%%%% Contents that you need to write follows %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%% Contents that you need to write follows! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \includeonly{acknowledgments,biography,chapter1,chapter2,...,appendixa,...}
-% for usage, see https://latexref.xyz/dev/latex2e.html#g_t_005cinclude-_0026-_005cincludeonly
+% for usage of includeonly, see https://latexref.xyz/_005cinclude-_0026-_005cincludeonly.html
+
+%%% Frontmatter (write this material in the mentioned files) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% Frontmatter (write this material in the mentioned files) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% This page is optional. Edit the file committee_members.tex
+\include{committee_members}
-% The abstract environment creates all the required headers and footnote.
-% You only need to add the text of the abstract itself in the file abstract.tex
+% The abstract environment creates all the required headings and footers.
+% You only need to the text of the abstract in the file abstract.tex
\begin{abstract}
- \input{abstract.tex}% in this case, use \input rather than \include because you are inside an environment
+ \input{abstract.tex}% use \input rather than \include because we're inside an environment
\end{abstract}
-\include{acknowledgments.tex}
+\include{acknowledgments}% acknowledgments.tex (.tex extension is presumed by \include)
-\include{biography.tex}% optional, see MIT Libraries https://libraries.mit.edu/distinctive-collections/thesis-specs/#format
+\include{biography}% biography.tex (optional, see https://libraries.mit.edu/distinctive-collections/thesis-specs/#format)
-
-%%% Table of contents and lists of stuff (delete lists you don't need, e.g., if no tables) %%%%%%%%
+%%% Table of contents and lists of stuff (delete unused lists, i.e., if no tables or figures) %%%%%
\tableofcontents
\listoffigures
\listoftables
-
%%% Chapters of thesis %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% If you want to use "double spacing", you can start here...
+%% If you want to use "double spacing", you should start here...
-\include{chapter1.tex}
-%\include{chapter2.tex}
-%\include{chapter3.tex}
-%\include{chapter4.tex}
+ \include{chapter1}% .tex extension is presumed
+% \include{chapter2}
+%\include{chapter3}
+%\include{chapter4}
%%% Appendicies of thesis %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\appendix
-\include{appendixa.tex}
+\include{appendixa}
+\include{appendixb}
-
-%%% Bibliography %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% Bibliography (biblatex) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\defbibheading{bibintoc}{\chapter*{#1}\addcontentsline{toc}{backmatter}{\refname}}
% this sets the title of contents name for bibliography to \refname (= References)
@@ -257,6 +308,7 @@
%%%% Option for natbib %%%%%%%%%%%%%
+
%% use an appropriate style (.bst) and your own .bib file[s]
%\bibliographystyle{plainnat}
diff --git a/macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/Lucida.tex b/macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/Lucida.tex
index 3fd445d4ff..9c7284cd7c 100644
--- a/macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/Lucida.tex
+++ b/macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/Lucida.tex
@@ -1,12 +1,12 @@
% !TEX encoding = UTF-8 Unicode
-% !BIB TS-program = biber
-% !BIB program = biber
+% !BIB TS-program = biber
+% !BIB program = biber
% This file is MIT-Thesis.tex, a LaTeX template for formatting an MIT thesis with the mitthesis class.
%
-% Version: 1.06, 2023/08/28
+% Version: 1.15, 2024/08/31
%
-% Author: John H. Lienhard (c) 2023. Reuse under the MIT license: https://ctan.org/license/mit
+% Author: John H. Lienhard, copyright 2024. Reuse under the MIT license: https://ctan.org/license/mit
% Documentation is here: https://ctan.org/pkg/mitthesis
@@ -16,19 +16,21 @@
pdfstandard = a-2b,
pdfversion = 1.7,
lang = en-US,
-% debug = {xmp-export}, % uncomment to output a separate xmpi file showing the metadata
+% pdfversion = 2.0,
+% pdfstandard = a-4,
}
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\documentclass[fontset=lucida]{mitthesis} %,fontset=libertine ,fontset=newtx-sans-text, fontset=heros-stix2, fontset=stix2
+\documentclass[fontset=lucida]{mitthesis}% fontset=newtx, fontset=libertine, fontset=newtx-sans-text, fontset=heros-stix2, fontset=stix2
%
% option [twoside] gives facing-page behavior for printing; omitting twoside will eliminate even-numbered blank pages.
% option [lineno] provides line numbers, as for editing
% option [mydesign] loads packages for color, title and list formats, margins, or captions: edit mydesign.tex to change defaults.
% option [fontset] is a keyvalue which can be:
-% pdftex or unicode engines: defaultfonts, libertine, lucida
-% pdftex only: fira-newtxsf, newtx, newtx-sans-text
-% unicode engines (luatex): heros-stix2, stix2, termes, termes-stix2
+% for pdftex or unicode engines: defaultfonts, libertine, lucida
+% for pdftex only: fira-newtxsf, newtx, newtx-sans-text
+% for unicode engines (luatex): heros-stix2, stix2, termes, termes-stix2
% if no key value is given, fonts default to CMR (pdftex) or LMR (unicode), i.e., "the LaTeX font".
% You can edit the fontset files or you can write your own, myfonts.tex, and do [fontset=myfonts].
% If you are using multiple languages, load the babel package in your fontset file, before the fonts.
@@ -39,12 +41,32 @@
\usepackage{listings}% documentation is here https://ctan.org/pkg/listings
%% Set chemical formulas nicely
-\usepackage[version=4]{mhchem}% documentation is here https://ctan.org/pkg/mhchem
+\usepackage[version=4]{mhchem}% documentation at https://ctan.org/pkg/mhchem
-%% Latin filler used in Chapter 1, with a test for package version date. https://ctan.org/pkg/lipsum
+%% Latin filler used in Chapter 1, with a test for package version date (https://ctan.org/pkg/lipsum)
\usepackage{lipsum}
\IfPackageAtLeastTF{lipsum}{2021/09/20}{\setlipsum{auto-lang=false}}{}
+%% Table related packages
+
+\usepackage{booktabs}% publication quality tables (https://ctan.org/pkg/booktabs)
+
+\usepackage{array}% Additional options for column formats (https://ctan.org/pkg/array)
+
+\usepackage{dcolumn}% For alignment of numbers on the decimal place (https://ctan.org/pkg/dcolumn)
+ \newcolumntype{d}[1]{D{.}{.}{#1}}% use with dcolumn package
+ % syntax: d{x.y} where x is max number of digits before decimal and y is max number after.
+
+% Package for multipage table in Appendix B.
+\usepackage{longtable}% typeset multi-page tables (https://ctan.org/pkg/longtable)
+
+%\usepackage{tabularx}% adjustable-width columns in tabular (https://ctan.org/pkg/tabularx)
+
+
+%% Package for improved typography
+
+\usepackage{microtype}% typographic fine-tuning, used in sample thesis committee page, but also acting globally on the text
+
%%%%%%%%% Graphics path (to figure files) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -59,16 +81,26 @@
%% Numerical citations of references
\usepackage[style=ext-numeric-comp,giveninits=true,maxbibnames=10,sorting=none]{biblatex}
+%% IEEE style citations and references
+% \usepackage[style=ieee,maxbibnames=10,sorting=none]{biblatex}% style=ext-numeric-comp,articlein=false,giveninits=true
+% \DefineBibliographyStrings{english}{url= \textsc{url} , }% replaces the IEEE default "[Online]. Available" by "URL"
-\addbibresource{mitthesis-sample.bib}%% <== change to YOUR bib file <================= CHANGE
+%% author-year style citations and references
+%% use \parencite, not \cite, when you want "(Author, year)"
+%% The sample files are not set up to include parentheses.
+% \usepackage[style=authoryear, maxbibnames=10]{biblatex}
-%% These two commands enable line breaks in long URLs in the bibliography (delete if you don't want that)
-\setcounter{biburllcpenalty}{7000}
-\setcounter{biburlucpenalty}{8000}
-% biblatex is very powerful, and you can customize most aspects the reference list and citations to suit your needs.
-% documentation is here: https://ctan.org/pkg/biblatex
+\addbibresource{mitthesis-sample.bib}%% <== change to YOUR bib file <= CHANGE
+%% to avoid split urls and stretched white space, you can set the bibliography ragged-right:
+%\appto{\bibsetup}{\raggedright}
+
+%% biblatex is very powerful, and you can customize most aspects the reference list and citations to suit your needs.
+%% documentation is here: https://ctan.org/pkg/biblatex
+%% cheat sheet is here: https://tug.ctan.org/info/biblatex-cheatsheet/biblatex-cheatsheet.pdf
+
+%% To ensure citations are set, run Latex --> biblatex/biber --> Latex again
%%%%%%%%%% Option to use natbib %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -80,19 +112,9 @@
%%% You can use this to rename the bibliography section
%\renewcommand{\bibname}{References}
-%%% Can adjust space between bibliography items (change 4pt to something else; don't drop last two lengths, they are stretchable "glue")
+%%% To adjust space between bibliography items
%\setlength\bibsep{4pt plus 1pt minus 1pt}
-
-
-%%%%%%%%%% Table related packages %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\usepackage{booktabs}% better quality tables, https://ctan.org/pkg/booktabs
-\usepackage{array}% additional options for table columns, https://ctan.org/pkg/array
-
-%\usepackage{tabularx}% https://ctan.org/pkg/tabularx
-
-%\usepackage{dcolumn}% alignment on decimal place, https://ctan.org/pkg/dcolumn
-%\newcolumntype{d}[1]{D{.}{.}{#1}}
+% change 4pt to something else; don't drop last two lengths (they are stretchable "glue")
%%%%%%%%%% Option for "double spacing" %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -103,18 +125,18 @@
%% to change the line separation, the most attractive results will be obtained by changing the
%% leading in proportion to the the current font size, rather than just doubling the space.
-%% The setspace package provides a tool for changing line separation (use thesetwo here)
+%% The setspace package provides a tool for changing line separation. Use these two commands here:
%
% \usepackage{setspace}% documentation at https://ctan.org/pkg/setspace
% \setstretch{1.1}% you can choose some other value for the stretch of space between lines
%
-%% Use the these commands AFTER the frontmatter
+%% Use one or more of the these commands *AFTER* the frontmatter
%
% \onehalfspacing
% \doublespacing
% \singlespacing % will turn these effects off (you can use these anywhere in the document)
-%% The best result may be to stay with leading selected by the typographer who set up the font.
+%% The best result is usually to stay with leading selected by the typographer who set up the font.
%%%%%%%%%%% Metadata %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -129,7 +151,7 @@
pdfkeywords={Massachusetts Institute of Technology, MIT},
% Add keywords that will help search engines and libraries to find your work.
% Includes the name[s] of the author[s]
- % (If you have used \DocumentMetadata, at line 15, you can just put "\CopyrightAuthor," for the names.)
+ % (If you used \DocumentMetadata at line 14, you can just put "\CopyrightAuthor," for the names.)
%
pdfurl={},
% If you have a url for the thesis, put it here. Otherwise delete this.
@@ -155,11 +177,11 @@
% \Author{Author full name}{Author department}[Author's first PREVIOUS degree][Author's second PREVIOUS degree][...
% Note that third, fourth, fifth, and sixth arguments are optional [] and may be omitted
-% note on names: most of the following names are made up; Silas Holman was a professor at MIT in the 19th century.
+% note on names: most of the following names are made up; Silas Holman was a physics professor at MIT in the 19th century.
-\Author{Silas W. Holman}{Department of Physics}%[B.S. Physics, MIT, 1876][MBA, Ferengi School of Management, 2022]
-%\Author{Luisa Hernández}{Department of Research}[B.S. Mechanical Engineering, UCLA, 2018][M.S. Stellar Interiors, Vulcan Science Academy, 2020][MBA, Ferengi School of Management, 2022]
-%\Author{Thurston Howell III}{Department of Economics}
+\Author{Silas W. Holman}{Department of Physics}
+% \Author{Luisa Hernández}{Department of Research}[B.S. Mechanical Engineering, UCLA, 2018][M.S. Stellar Interiors, Vulcan Science Academy, 2020]
+% \Author{Thurston Howell III}{Department of Economics}[MBA, Ferengi School of Management, 2022]
% Use once for each degree fulfilled by thesis
% For two degrees from one department, leave the department argument blank for the second degree {}.
@@ -169,22 +191,19 @@
% If there is more than one supervisor, use the \Supervisor command for each.
\Supervisor{Edward C. Pickering}{Professor of Physics}
-%\Supervisor{Secunda Castor}{Professor of Research}
-%\Supervisor{Quintus Castor}{Professor of Log Dams}
+% \Supervisor{Edward C. Pickering}{Professor of Physics, and \\ \> Professor of Something Else}
+% \Supervisor{Secunda Castor}{Professor of Research}
+% \Supervisor{Quintus Castor}{Professor of Log Dams}
% Professor who formally accepts theses for your department (e.g., the Graduate Officer, Professor Sméagol,...)
% If more than one department, use more than once
-% **If you need to reduce vertical space, put the acceptor title in the second argument and leave the third blank {}.**
-\Acceptor{Primus Castor}{Professor of Wetlands Engineering}{Undergraduate Officer, Department of Physics}
-%\Acceptor{Tertius Castor}{Professor of Log Dams}{Graduate Officer, Department of Research}
-%\Acceptor{Quarta Castor}{Professor of Lodge Building}{Graduate Officer, Department of Mechanical Engineering}
-
-% If your title page is overflowing (from too many names, degrees, etc.), you can scale
-% down the Signature block at the bottom with this command, or use another creative solution...
-%\SignatureBlockSize{\small} %\SignatureBlockSize{\footnotesize}
+\Acceptor{Tertius Castor}{Professor of Log Dams}{Graduate Officer, Department of Research} % \\ \> Third title}
+% \Acceptor{Quarta Castor}{Professor of Lodge Building}{Graduate Officer, Department of Mechanical Engineering}
+%%% If you need to reduce vertical space, put the acceptor title in the second argument and leave the third blank, {}.
+% \Acceptor{Primus Castor}{Professor and Undergraduate Officer, Department of Physics}{}
% Usage: \DegreeDate{Month}{year}
-% Valid degree months are September, February, or June.
+% Valid degree months are February, May, June, or September
\DegreeDate{June}{1876}
% Date that final thesis is submitted to department
@@ -198,53 +217,85 @@
%
\CClicense{CC BY-NC-ND 4.0}{https://creativecommons.org/licenses/by-nc-nd/4.0/}
%
+
+%%%%%%% Solutions for overflowing titlepage %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% If your title page is overflowing (from too many names, degrees, etc.):
+%
+% (a) you can reduce the 12pt and 18pt skips between various blocks to 6pt with this command:
+%
+% \Tighten
+%
+% (b) you can scale down the Signature block at the bottom with this command:
+%
+% \SignatureBlockSize{\small} %or this one \SignatureBlockSize{\footnotesize}
+%
+% (c) you can put the acceptor name and title onto two lines, rather than three like this:
+%
+% \Acceptor{Tertius Castor}{Professor and Graduate Officer, Department of Research}{}
+%
+% (d) you can change the font size of the author name[s] with
+%
+% \AuthorNameSize{\normalsize}
+%
+% (e) and you can omit any previous degrees from the title page, instead mentioning them in the biographical sketch
+
+% Also, if you prefer to keep the text toward the top of the page with most white space at the bottom, you
+% can use this command to squash all of the vertical glue (stretchy space) with this command:
+%
+% \Squash
+%
+% This command is useful when the text has not already reach the bottom of the page, since the glue gets squashed automatically
+% when the page is too full.
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% Titlepage
+%%% Make titlepage
\maketitle
-%%%%%%%%% Contents that you need to write follows %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%% Contents that you need to write follows! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \includeonly{acknowledgments,biography,chapter1,chapter2,...,appendixa,...}
-% for usage, see https://latexref.xyz/dev/latex2e.html#g_t_005cinclude-_0026-_005cincludeonly
+% for usage of includeonly, see https://latexref.xyz/_005cinclude-_0026-_005cincludeonly.html
+
+%%% Frontmatter (write this material in the mentioned files) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% Frontmatter (write this material in the mentioned files) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% This page is optional. Edit the file committee_members.tex
+\include{committee_members}
-% The abstract environment creates all the required headers and footnote.
-% You only need to add the text of the abstract itself in the file abstract.tex
+% The abstract environment creates all the required headings and footers.
+% You only need to the text of the abstract in the file abstract.tex
\begin{abstract}
- \input{abstract.tex}% in this case, use \input rather than \include because you are inside an environment
+ \input{abstract.tex}% use \input rather than \include because we're inside an environment
\end{abstract}
-\include{acknowledgments.tex}
+\include{acknowledgments}% acknowledgments.tex (.tex extension is presumed by \include)
-\include{biography.tex}% optional, see MIT Libraries https://libraries.mit.edu/distinctive-collections/thesis-specs/#format
+\include{biography}% biography.tex (optional, see https://libraries.mit.edu/distinctive-collections/thesis-specs/#format)
-
-%%% Table of contents and lists of stuff (delete lists you don't need, e.g., if no tables) %%%%%%%%
+%%% Table of contents and lists of stuff (delete unused lists, i.e., if no tables or figures) %%%%%
\tableofcontents
\listoffigures
\listoftables
-
%%% Chapters of thesis %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% If you want to use "double spacing", you can start here...
+%% If you want to use "double spacing", you should start here...
-\include{chapter1.tex}
-%\include{chapter2.tex}
-%\include{chapter3.tex}
-%\include{chapter4.tex}
+ \include{chapter1}% .tex extension is presumed
+% \include{chapter2}
+%\include{chapter3}
+%\include{chapter4}
%%% Appendicies of thesis %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\appendix
-\include{appendixa.tex}
+\include{appendixa}
+\include{appendixb}
-
-%%% Bibliography %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% Bibliography (biblatex) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\defbibheading{bibintoc}{\chapter*{#1}\addcontentsline{toc}{backmatter}{\refname}}
% this sets the title of contents name for bibliography to \refname (= References)
@@ -257,6 +308,7 @@
%%%% Option for natbib %%%%%%%%%%%%%
+
%% use an appropriate style (.bst) and your own .bib file[s]
%\bibliographystyle{plainnat}
diff --git a/macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/Newtx-sans-text.tex b/macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/Newtx-sans-text.tex
index 9729118c30..11edff3cdc 100644
--- a/macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/Newtx-sans-text.tex
+++ b/macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/Newtx-sans-text.tex
@@ -1,12 +1,12 @@
% !TEX encoding = UTF-8 Unicode
-% !BIB TS-program = biber
-% !BIB program = biber
+% !BIB TS-program = biber
+% !BIB program = biber
% This file is MIT-Thesis.tex, a LaTeX template for formatting an MIT thesis with the mitthesis class.
%
-% Version: 1.06, 2023/08/28
+% Version: 1.15, 2024/08/31
%
-% Author: John H. Lienhard (c) 2023. Reuse under the MIT license: https://ctan.org/license/mit
+% Author: John H. Lienhard, copyright 2024. Reuse under the MIT license: https://ctan.org/license/mit
% Documentation is here: https://ctan.org/pkg/mitthesis
@@ -16,19 +16,21 @@
pdfstandard = a-2b,
pdfversion = 1.7,
lang = en-US,
-% debug = {xmp-export}, % uncomment to output a separate xmpi file showing the metadata
+% pdfversion = 2.0,
+% pdfstandard = a-4,
}
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\documentclass[fontset=newtx-sans-text]{mitthesis} %,fontset=libertine ,fontset=newtx-sans-text, fontset=heros-stix2, fontset=stix2
+\documentclass[fontset=newtx-sans-text]{mitthesis}% fontset=newtx, fontset=libertine, fontset=newtx-sans-text, fontset=heros-stix2, fontset=stix2
%
% option [twoside] gives facing-page behavior for printing; omitting twoside will eliminate even-numbered blank pages.
% option [lineno] provides line numbers, as for editing
% option [mydesign] loads packages for color, title and list formats, margins, or captions: edit mydesign.tex to change defaults.
% option [fontset] is a keyvalue which can be:
-% pdftex or unicode engines: defaultfonts, libertine, lucida
-% pdftex only: fira-newtxsf, newtx, newtx-sans-text
-% unicode engines (luatex): heros-stix2, stix2, termes, termes-stix2
+% for pdftex or unicode engines: defaultfonts, libertine, lucida
+% for pdftex only: fira-newtxsf, newtx, newtx-sans-text
+% for unicode engines (luatex): heros-stix2, stix2, termes, termes-stix2
% if no key value is given, fonts default to CMR (pdftex) or LMR (unicode), i.e., "the LaTeX font".
% You can edit the fontset files or you can write your own, myfonts.tex, and do [fontset=myfonts].
% If you are using multiple languages, load the babel package in your fontset file, before the fonts.
@@ -39,12 +41,32 @@
\usepackage{listings}% documentation is here https://ctan.org/pkg/listings
%% Set chemical formulas nicely
-\usepackage[version=4]{mhchem}% documentation is here https://ctan.org/pkg/mhchem
+\usepackage[version=4]{mhchem}% documentation at https://ctan.org/pkg/mhchem
-%% Latin filler used in Chapter 1, with a test for package version date. https://ctan.org/pkg/lipsum
+%% Latin filler used in Chapter 1, with a test for package version date (https://ctan.org/pkg/lipsum)
\usepackage{lipsum}
\IfPackageAtLeastTF{lipsum}{2021/09/20}{\setlipsum{auto-lang=false}}{}
+%% Table related packages
+
+\usepackage{booktabs}% publication quality tables (https://ctan.org/pkg/booktabs)
+
+\usepackage{array}% Additional options for column formats (https://ctan.org/pkg/array)
+
+\usepackage{dcolumn}% For alignment of numbers on the decimal place (https://ctan.org/pkg/dcolumn)
+ \newcolumntype{d}[1]{D{.}{.}{#1}}% use with dcolumn package
+ % syntax: d{x.y} where x is max number of digits before decimal and y is max number after.
+
+% Package for multipage table in Appendix B.
+\usepackage{longtable}% typeset multi-page tables (https://ctan.org/pkg/longtable)
+
+%\usepackage{tabularx}% adjustable-width columns in tabular (https://ctan.org/pkg/tabularx)
+
+
+%% Package for improved typography
+
+\usepackage{microtype}% typographic fine-tuning, used in sample thesis committee page, but also acting globally on the text
+
%%%%%%%%% Graphics path (to figure files) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -59,16 +81,26 @@
%% Numerical citations of references
\usepackage[style=ext-numeric-comp,giveninits=true,maxbibnames=10,sorting=none]{biblatex}
+%% IEEE style citations and references
+% \usepackage[style=ieee,maxbibnames=10,sorting=none]{biblatex}% style=ext-numeric-comp,articlein=false,giveninits=true
+% \DefineBibliographyStrings{english}{url= \textsc{url} , }% replaces the IEEE default "[Online]. Available" by "URL"
-\addbibresource{mitthesis-sample.bib}%% <== change to YOUR bib file <================= CHANGE
+%% author-year style citations and references
+%% use \parencite, not \cite, when you want "(Author, year)"
+%% The sample files are not set up to include parentheses.
+% \usepackage[style=authoryear, maxbibnames=10]{biblatex}
-%% These two commands enable line breaks in long URLs in the bibliography (delete if you don't want that)
-\setcounter{biburllcpenalty}{7000}
-\setcounter{biburlucpenalty}{8000}
-% biblatex is very powerful, and you can customize most aspects the reference list and citations to suit your needs.
-% documentation is here: https://ctan.org/pkg/biblatex
+\addbibresource{mitthesis-sample.bib}%% <== change to YOUR bib file <= CHANGE
+%% to avoid split urls and stretched white space, you can set the bibliography ragged-right:
+%\appto{\bibsetup}{\raggedright}
+
+%% biblatex is very powerful, and you can customize most aspects the reference list and citations to suit your needs.
+%% documentation is here: https://ctan.org/pkg/biblatex
+%% cheat sheet is here: https://tug.ctan.org/info/biblatex-cheatsheet/biblatex-cheatsheet.pdf
+
+%% To ensure citations are set, run Latex --> biblatex/biber --> Latex again
%%%%%%%%%% Option to use natbib %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -80,19 +112,9 @@
%%% You can use this to rename the bibliography section
%\renewcommand{\bibname}{References}
-%%% Can adjust space between bibliography items (change 4pt to something else; don't drop last two lengths, they are stretchable "glue")
+%%% To adjust space between bibliography items
%\setlength\bibsep{4pt plus 1pt minus 1pt}
-
-
-%%%%%%%%%% Table related packages %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\usepackage{booktabs}% better quality tables, https://ctan.org/pkg/booktabs
-\usepackage{array}% additional options for table columns, https://ctan.org/pkg/array
-
-%\usepackage{tabularx}% https://ctan.org/pkg/tabularx
-
-%\usepackage{dcolumn}% alignment on decimal place, https://ctan.org/pkg/dcolumn
-%\newcolumntype{d}[1]{D{.}{.}{#1}}
+% change 4pt to something else; don't drop last two lengths (they are stretchable "glue")
%%%%%%%%%% Option for "double spacing" %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -103,18 +125,18 @@
%% to change the line separation, the most attractive results will be obtained by changing the
%% leading in proportion to the the current font size, rather than just doubling the space.
-%% The setspace package provides a tool for changing line separation (use thesetwo here)
+%% The setspace package provides a tool for changing line separation. Use these two commands here:
%
% \usepackage{setspace}% documentation at https://ctan.org/pkg/setspace
% \setstretch{1.1}% you can choose some other value for the stretch of space between lines
%
-%% Use the these commands AFTER the frontmatter
+%% Use one or more of the these commands *AFTER* the frontmatter
%
% \onehalfspacing
% \doublespacing
% \singlespacing % will turn these effects off (you can use these anywhere in the document)
-%% The best result may be to stay with leading selected by the typographer who set up the font.
+%% The best result is usually to stay with leading selected by the typographer who set up the font.
%%%%%%%%%%% Metadata %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -129,7 +151,7 @@
pdfkeywords={Massachusetts Institute of Technology, MIT},
% Add keywords that will help search engines and libraries to find your work.
% Includes the name[s] of the author[s]
- % (If you have used \DocumentMetadata, at line 15, you can just put "\CopyrightAuthor," for the names.)
+ % (If you used \DocumentMetadata at line 14, you can just put "\CopyrightAuthor," for the names.)
%
pdfurl={},
% If you have a url for the thesis, put it here. Otherwise delete this.
@@ -155,11 +177,11 @@
% \Author{Author full name}{Author department}[Author's first PREVIOUS degree][Author's second PREVIOUS degree][...
% Note that third, fourth, fifth, and sixth arguments are optional [] and may be omitted
-% note on names: most of the following names are made up; Silas Holman was a professor at MIT in the 19th century.
+% note on names: most of the following names are made up; Silas Holman was a physics professor at MIT in the 19th century.
-\Author{Silas W. Holman}{Department of Physics}%[B.S. Physics, MIT, 1876][MBA, Ferengi School of Management, 2022]
-%\Author{Luisa Hernández}{Department of Research}[B.S. Mechanical Engineering, UCLA, 2018][M.S. Stellar Interiors, Vulcan Science Academy, 2020][MBA, Ferengi School of Management, 2022]
-%\Author{Thurston Howell III}{Department of Economics}
+\Author{Silas W. Holman}{Department of Physics}
+% \Author{Luisa Hernández}{Department of Research}[B.S. Mechanical Engineering, UCLA, 2018][M.S. Stellar Interiors, Vulcan Science Academy, 2020]
+% \Author{Thurston Howell III}{Department of Economics}[MBA, Ferengi School of Management, 2022]
% Use once for each degree fulfilled by thesis
% For two degrees from one department, leave the department argument blank for the second degree {}.
@@ -169,22 +191,19 @@
% If there is more than one supervisor, use the \Supervisor command for each.
\Supervisor{Edward C. Pickering}{Professor of Physics}
-%\Supervisor{Secunda Castor}{Professor of Research}
-%\Supervisor{Quintus Castor}{Professor of Log Dams}
+% \Supervisor{Edward C. Pickering}{Professor of Physics, and \\ \> Professor of Something Else}
+% \Supervisor{Secunda Castor}{Professor of Research}
+% \Supervisor{Quintus Castor}{Professor of Log Dams}
% Professor who formally accepts theses for your department (e.g., the Graduate Officer, Professor Sméagol,...)
% If more than one department, use more than once
-% **If you need to reduce vertical space, put the acceptor title in the second argument and leave the third blank {}.**
-\Acceptor{Primus Castor}{Professor of Wetlands Engineering}{Undergraduate Officer, Department of Physics}
-%\Acceptor{Tertius Castor}{Professor of Log Dams}{Graduate Officer, Department of Research}
-%\Acceptor{Quarta Castor}{Professor of Lodge Building}{Graduate Officer, Department of Mechanical Engineering}
-
-% If your title page is overflowing (from too many names, degrees, etc.), you can scale
-% down the Signature block at the bottom with this command, or use another creative solution...
-%\SignatureBlockSize{\small} %\SignatureBlockSize{\footnotesize}
+\Acceptor{Tertius Castor}{Professor of Log Dams}{Graduate Officer, Department of Research} % \\ \> Third title}
+% \Acceptor{Quarta Castor}{Professor of Lodge Building}{Graduate Officer, Department of Mechanical Engineering}
+%%% If you need to reduce vertical space, put the acceptor title in the second argument and leave the third blank, {}.
+% \Acceptor{Primus Castor}{Professor and Undergraduate Officer, Department of Physics}{}
% Usage: \DegreeDate{Month}{year}
-% Valid degree months are September, February, or June.
+% Valid degree months are February, May, June, or September
\DegreeDate{June}{1876}
% Date that final thesis is submitted to department
@@ -198,53 +217,85 @@
%
\CClicense{CC BY-NC-ND 4.0}{https://creativecommons.org/licenses/by-nc-nd/4.0/}
%
+
+%%%%%%% Solutions for overflowing titlepage %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% If your title page is overflowing (from too many names, degrees, etc.):
+%
+% (a) you can reduce the 12pt and 18pt skips between various blocks to 6pt with this command:
+%
+% \Tighten
+%
+% (b) you can scale down the Signature block at the bottom with this command:
+%
+% \SignatureBlockSize{\small} %or this one \SignatureBlockSize{\footnotesize}
+%
+% (c) you can put the acceptor name and title onto two lines, rather than three like this:
+%
+% \Acceptor{Tertius Castor}{Professor and Graduate Officer, Department of Research}{}
+%
+% (d) you can change the font size of the author name[s] with
+%
+% \AuthorNameSize{\normalsize}
+%
+% (e) and you can omit any previous degrees from the title page, instead mentioning them in the biographical sketch
+
+% Also, if you prefer to keep the text toward the top of the page with most white space at the bottom, you
+% can use this command to squash all of the vertical glue (stretchy space) with this command:
+%
+% \Squash
+%
+% This command is useful when the text has not already reach the bottom of the page, since the glue gets squashed automatically
+% when the page is too full.
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% Titlepage
+%%% Make titlepage
\maketitle
-%%%%%%%%% Contents that you need to write follows %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%% Contents that you need to write follows! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \includeonly{acknowledgments,biography,chapter1,chapter2,...,appendixa,...}
-% for usage, see https://latexref.xyz/dev/latex2e.html#g_t_005cinclude-_0026-_005cincludeonly
+% for usage of includeonly, see https://latexref.xyz/_005cinclude-_0026-_005cincludeonly.html
-%%% Frontmatter (write this material in the mentioned files) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% Frontmatter (write this material in the mentioned files) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% The abstract environment creates all the required headers and footnote.
-% You only need to add the text of the abstract itself in the file abstract.tex
+% This page is optional. Edit the file committee_members.tex
+\include{committee_members}
+
+% The abstract environment creates all the required headings and footers.
+% You only need to the text of the abstract in the file abstract.tex
\begin{abstract}
- \input{abstract.tex}% in this case, use \input rather than \include because you are inside an environment
+ \input{abstract.tex}% use \input rather than \include because we're inside an environment
\end{abstract}
-\include{acknowledgments.tex}
-
-\include{biography.tex}% optional, see MIT Libraries https://libraries.mit.edu/distinctive-collections/thesis-specs/#format
+\include{acknowledgments}% acknowledgments.tex (.tex extension is presumed by \include)
+\include{biography}% biography.tex (optional, see https://libraries.mit.edu/distinctive-collections/thesis-specs/#format)
-%%% Table of contents and lists of stuff (delete lists you don't need, e.g., if no tables) %%%%%%%%
+%%% Table of contents and lists of stuff (delete unused lists, i.e., if no tables or figures) %%%%%
\tableofcontents
\listoffigures
\listoftables
-
%%% Chapters of thesis %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% If you want to use "double spacing", you can start here...
+%% If you want to use "double spacing", you should start here...
-\include{chapter1.tex}
-%\include{chapter2.tex}
-%\include{chapter3.tex}
-%\include{chapter4.tex}
+ \include{chapter1}% .tex extension is presumed
+% \include{chapter2}
+%\include{chapter3}
+%\include{chapter4}
%%% Appendicies of thesis %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\appendix
-\include{appendixa.tex}
-
+\include{appendixa}
+\include{appendixb}
-%%% Bibliography %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% Bibliography (biblatex) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\defbibheading{bibintoc}{\chapter*{#1}\addcontentsline{toc}{backmatter}{\refname}}
% this sets the title of contents name for bibliography to \refname (= References)
@@ -252,8 +303,12 @@
\printbibliography[title={\refname},heading=bibintoc]
+% biblatex also supports chapter-by-chapter bibliography, https://tex.stackexchange.com/a/296502/119566
+% see the biblatex manual, section 3.14.3
+
%%%% Option for natbib %%%%%%%%%%%%%
+
%% use an appropriate style (.bst) and your own .bib file[s]
%\bibliographystyle{plainnat}
diff --git a/macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/Newtx.tex b/macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/Newtx.tex
index e2cebe98ac..d755977cb5 100644
--- a/macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/Newtx.tex
+++ b/macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/Newtx.tex
@@ -1,12 +1,11 @@
% !TEX encoding = UTF-8 Unicode
-% !BIB TS-program = biber
-% !BIB program = biber
+% !BIB TS-program = biber
% This file is MIT-Thesis.tex, a LaTeX template for formatting an MIT thesis with the mitthesis class.
%
-% Version: 1.06, 2023/08/28
+% Version: 1.15, 2024/08/31
%
-% Author: John H. Lienhard (c) 2023. Reuse under the MIT license: https://ctan.org/license/mit
+% Author: John H. Lienhard, copyright 2024. Reuse under the MIT license: https://ctan.org/license/mit
% Documentation is here: https://ctan.org/pkg/mitthesis
@@ -16,19 +15,21 @@
pdfstandard = a-2b,
pdfversion = 1.7,
lang = en-US,
-% debug = {xmp-export}, % uncomment to output a separate xmpi file showing the metadata
+% pdfversion = 2.0,
+% pdfstandard = a-4,
}
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\documentclass[fontset=newtx]{mitthesis} %,fontset=libertine ,fontset=newtx-sans-text, fontset=heros-stix2, fontset=stix2
+\documentclass[fontset=newtx]{mitthesis}% fontset=newtx, fontset=libertine, fontset=newtx-sans-text, fontset=heros-stix2, fontset=stix2
%
% option [twoside] gives facing-page behavior for printing; omitting twoside will eliminate even-numbered blank pages.
% option [lineno] provides line numbers, as for editing
% option [mydesign] loads packages for color, title and list formats, margins, or captions: edit mydesign.tex to change defaults.
% option [fontset] is a keyvalue which can be:
-% pdftex or unicode engines: defaultfonts, libertine, lucida
-% pdftex only: fira-newtxsf, newtx, newtx-sans-text
-% unicode engines (luatex): heros-stix2, stix2, termes, termes-stix2
+% for pdftex or unicode engines: defaultfonts, libertine, lucida
+% for pdftex only: fira-newtxsf, newtx, newtx-sans-text
+% for unicode engines (luatex): heros-stix2, stix2, termes, termes-stix2
% if no key value is given, fonts default to CMR (pdftex) or LMR (unicode), i.e., "the LaTeX font".
% You can edit the fontset files or you can write your own, myfonts.tex, and do [fontset=myfonts].
% If you are using multiple languages, load the babel package in your fontset file, before the fonts.
@@ -39,12 +40,32 @@
\usepackage{listings}% documentation is here https://ctan.org/pkg/listings
%% Set chemical formulas nicely
-\usepackage[version=4]{mhchem}% documentation is here https://ctan.org/pkg/mhchem
+\usepackage[version=4]{mhchem}% documentation at https://ctan.org/pkg/mhchem
-%% Latin filler used in Chapter 1, with a test for package version date. https://ctan.org/pkg/lipsum
+%% Latin filler used in Chapter 1, with a test for package version date (https://ctan.org/pkg/lipsum)
\usepackage{lipsum}
\IfPackageAtLeastTF{lipsum}{2021/09/20}{\setlipsum{auto-lang=false}}{}
+%% Table related packages
+
+\usepackage{booktabs}% publication quality tables (https://ctan.org/pkg/booktabs)
+
+\usepackage{array}% Additional options for column formats (https://ctan.org/pkg/array)
+
+\usepackage{dcolumn}% For alignment of numbers on the decimal place (https://ctan.org/pkg/dcolumn)
+ \newcolumntype{d}[1]{D{.}{.}{#1}}% use with dcolumn package
+ % syntax: d{x.y} where x is max number of digits before decimal and y is max number after.
+
+% Package for multipage table in Appendix B.
+\usepackage{longtable}% typeset multi-page tables (https://ctan.org/pkg/longtable)
+
+%\usepackage{tabularx}% adjustable-width columns in tabular (https://ctan.org/pkg/tabularx)
+
+
+%% Package for improved typography
+
+\usepackage{microtype}% typographic fine-tuning, used in sample thesis committee page, but also acting globally on the text
+
%%%%%%%%% Graphics path (to figure files) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -59,16 +80,26 @@
%% Numerical citations of references
\usepackage[style=ext-numeric-comp,giveninits=true,maxbibnames=10,sorting=none]{biblatex}
+%% IEEE style citations and references
+% \usepackage[style=ieee,maxbibnames=10,sorting=none]{biblatex}% style=ext-numeric-comp,articlein=false,giveninits=true
+% \DefineBibliographyStrings{english}{url= \textsc{url} , }% replaces the IEEE default "[Online]. Available" by "URL"
-\addbibresource{mitthesis-sample.bib}%% <== change to YOUR bib file <================= CHANGE
+%% author-year style citations and references
+%% use \parencite, not \cite, when you want "(Author, year)"
+%% The sample files are not set up to include parentheses.
+% \usepackage[style=authoryear, maxbibnames=10]{biblatex}
-%% These two commands enable line breaks in long URLs in the bibliography (delete if you don't want that)
-\setcounter{biburllcpenalty}{7000}
-\setcounter{biburlucpenalty}{8000}
-% biblatex is very powerful, and you can customize most aspects the reference list and citations to suit your needs.
-% documentation is here: https://ctan.org/pkg/biblatex
+\addbibresource{mitthesis-sample.bib}%% <== change to YOUR bib file <= CHANGE
+%% to avoid split urls and stretched white space, you can set the bibliography ragged-right:
+%\appto{\bibsetup}{\raggedright}
+
+%% biblatex is very powerful, and you can customize most aspects the reference list and citations to suit your needs.
+%% documentation is here: https://ctan.org/pkg/biblatex
+%% cheat sheet is here: https://tug.ctan.org/info/biblatex-cheatsheet/biblatex-cheatsheet.pdf
+
+%% To ensure citations are set, run Latex --> biblatex/biber --> Latex again
%%%%%%%%%% Option to use natbib %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -80,19 +111,9 @@
%%% You can use this to rename the bibliography section
%\renewcommand{\bibname}{References}
-%%% Can adjust space between bibliography items (change 4pt to something else; don't drop last two lengths, they are stretchable "glue")
+%%% To adjust space between bibliography items
%\setlength\bibsep{4pt plus 1pt minus 1pt}
-
-
-%%%%%%%%%% Table related packages %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\usepackage{booktabs}% better quality tables, https://ctan.org/pkg/booktabs
-\usepackage{array}% additional options for table columns, https://ctan.org/pkg/array
-
-%\usepackage{tabularx}% https://ctan.org/pkg/tabularx
-
-%\usepackage{dcolumn}% alignment on decimal place, https://ctan.org/pkg/dcolumn
-%\newcolumntype{d}[1]{D{.}{.}{#1}}
+% change 4pt to something else; don't drop last two lengths (they are stretchable "glue")
%%%%%%%%%% Option for "double spacing" %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -103,18 +124,18 @@
%% to change the line separation, the most attractive results will be obtained by changing the
%% leading in proportion to the the current font size, rather than just doubling the space.
-%% The setspace package provides a tool for changing line separation (use thesetwo here)
+%% The setspace package provides a tool for changing line separation. Use these two commands here:
%
% \usepackage{setspace}% documentation at https://ctan.org/pkg/setspace
% \setstretch{1.1}% you can choose some other value for the stretch of space between lines
%
-%% Use the these commands AFTER the frontmatter
+%% Use one or more of the these commands *AFTER* the frontmatter
%
% \onehalfspacing
% \doublespacing
% \singlespacing % will turn these effects off (you can use these anywhere in the document)
-%% The best result may be to stay with leading selected by the typographer who set up the font.
+%% The best result is usually to stay with leading selected by the typographer who set up the font.
%%%%%%%%%%% Metadata %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -129,7 +150,7 @@
pdfkeywords={Massachusetts Institute of Technology, MIT},
% Add keywords that will help search engines and libraries to find your work.
% Includes the name[s] of the author[s]
- % (If you have used \DocumentMetadata, at line 15, you can just put "\CopyrightAuthor," for the names.)
+ % (If you used \DocumentMetadata at line 14, you can just put "\CopyrightAuthor," for the names.)
%
pdfurl={},
% If you have a url for the thesis, put it here. Otherwise delete this.
@@ -155,11 +176,11 @@
% \Author{Author full name}{Author department}[Author's first PREVIOUS degree][Author's second PREVIOUS degree][...
% Note that third, fourth, fifth, and sixth arguments are optional [] and may be omitted
-% note on names: most of the following names are made up; Silas Holman was a professor at MIT in the 19th century.
+% note on names: most of the following names are made up; Silas Holman was a physics professor at MIT in the 19th century.
-\Author{Silas W. Holman}{Department of Physics}%[B.S. Physics, MIT, 1876][MBA, Ferengi School of Management, 2022]
-%\Author{Luisa Hernández}{Department of Research}[B.S. Mechanical Engineering, UCLA, 2018][M.S. Stellar Interiors, Vulcan Science Academy, 2020][MBA, Ferengi School of Management, 2022]
-%\Author{Thurston Howell III}{Department of Economics}
+\Author{Silas W. Holman}{Department of Physics}
+% \Author{Luisa Hernández}{Department of Research}[B.S. Mechanical Engineering, UCLA, 2018][M.S. Stellar Interiors, Vulcan Science Academy, 2020]
+% \Author{Thurston Howell III}{Department of Economics}[MBA, Ferengi School of Management, 2022]
% Use once for each degree fulfilled by thesis
% For two degrees from one department, leave the department argument blank for the second degree {}.
@@ -169,22 +190,19 @@
% If there is more than one supervisor, use the \Supervisor command for each.
\Supervisor{Edward C. Pickering}{Professor of Physics}
-%\Supervisor{Secunda Castor}{Professor of Research}
-%\Supervisor{Quintus Castor}{Professor of Log Dams}
+% \Supervisor{Edward C. Pickering}{Professor of Physics, and \\ \> Professor of Something Else}
+% \Supervisor{Secunda Castor}{Professor of Research}
+% \Supervisor{Quintus Castor}{Professor of Log Dams}
% Professor who formally accepts theses for your department (e.g., the Graduate Officer, Professor Sméagol,...)
% If more than one department, use more than once
-% **If you need to reduce vertical space, put the acceptor title in the second argument and leave the third blank {}.**
-\Acceptor{Primus Castor}{Professor of Wetlands Engineering}{Undergraduate Officer, Department of Physics}
-%\Acceptor{Tertius Castor}{Professor of Log Dams}{Graduate Officer, Department of Research}
-%\Acceptor{Quarta Castor}{Professor of Lodge Building}{Graduate Officer, Department of Mechanical Engineering}
-
-% If your title page is overflowing (from too many names, degrees, etc.), you can scale
-% down the Signature block at the bottom with this command, or use another creative solution...
-%\SignatureBlockSize{\small} %\SignatureBlockSize{\footnotesize}
+\Acceptor{Tertius Castor}{Professor of Log Dams}{Graduate Officer, Department of Research} % \\ \> Third title}
+% \Acceptor{Quarta Castor}{Professor of Lodge Building}{Graduate Officer, Department of Mechanical Engineering}
+%%% If you need to reduce vertical space, put the acceptor title in the second argument and leave the third blank, {}.
+% \Acceptor{Primus Castor}{Professor and Undergraduate Officer, Department of Physics}{}
% Usage: \DegreeDate{Month}{year}
-% Valid degree months are September, February, or June.
+% Valid degree months are February, May, June, or September
\DegreeDate{June}{1876}
% Date that final thesis is submitted to department
@@ -198,53 +216,85 @@
%
\CClicense{CC BY-NC-ND 4.0}{https://creativecommons.org/licenses/by-nc-nd/4.0/}
%
+
+%%%%%%% Solutions for overflowing titlepage %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% If your title page is overflowing (from too many names, degrees, etc.):
+%
+% (a) you can reduce the 12pt and 18pt skips between various blocks to 6pt with this command:
+%
+% \Tighten
+%
+% (b) you can scale down the Signature block at the bottom with this command:
+%
+% \SignatureBlockSize{\small} %or this one \SignatureBlockSize{\footnotesize}
+%
+% (c) you can put the acceptor name and title onto two lines, rather than three like this:
+%
+% \Acceptor{Tertius Castor}{Professor and Graduate Officer, Department of Research}{}
+%
+% (d) you can change the font size of the author name[s] with
+%
+% \AuthorNameSize{\normalsize}
+%
+% (e) and you can omit any previous degrees from the title page, instead mentioning them in the biographical sketch
+
+% Also, if you prefer to keep the text toward the top of the page with most white space at the bottom, you
+% can use this command to squash all of the vertical glue (stretchy space) with this command:
+%
+% \Squash
+%
+% This command is useful when the text has not already reach the bottom of the page, since the glue gets squashed automatically
+% when the page is too full.
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% Titlepage
+%%% Make titlepage
\maketitle
-%%%%%%%%% Contents that you need to write follows %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%% Contents that you need to write follows! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \includeonly{acknowledgments,biography,chapter1,chapter2,...,appendixa,...}
-% for usage, see https://latexref.xyz/dev/latex2e.html#g_t_005cinclude-_0026-_005cincludeonly
+% for usage of includeonly, see https://latexref.xyz/_005cinclude-_0026-_005cincludeonly.html
+
+%%% Frontmatter (write this material in the mentioned files) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% Frontmatter (write this material in the mentioned files) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% This page is optional. Edit the file committee_members.tex
+\include{committee_members}
-% The abstract environment creates all the required headers and footnote.
-% You only need to add the text of the abstract itself in the file abstract.tex
+% The abstract environment creates all the required headings and footers.
+% You only need to the text of the abstract in the file abstract.tex
\begin{abstract}
- \input{abstract.tex}% in this case, use \input rather than \include because you are inside an environment
+ \input{abstract.tex}% use \input rather than \include because we're inside an environment
\end{abstract}
-\include{acknowledgments.tex}
+\include{acknowledgments}% acknowledgments.tex (.tex extension is presumed by \include)
-\include{biography.tex}% optional, see MIT Libraries https://libraries.mit.edu/distinctive-collections/thesis-specs/#format
+\include{biography}% biography.tex (optional, see https://libraries.mit.edu/distinctive-collections/thesis-specs/#format)
-
-%%% Table of contents and lists of stuff (delete lists you don't need, e.g., if no tables) %%%%%%%%
+%%% Table of contents and lists of stuff (delete unused lists, i.e., if no tables or figures) %%%%%
\tableofcontents
\listoffigures
\listoftables
-
%%% Chapters of thesis %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% If you want to use "double spacing", you can start here...
+%% If you want to use "double spacing", you should start here...
-\include{chapter1.tex}
-%\include{chapter2.tex}
-%\include{chapter3.tex}
-%\include{chapter4.tex}
+ \include{chapter1}% .tex extension is presumed
+% \include{chapter2}
+%\include{chapter3}
+%\include{chapter4}
%%% Appendicies of thesis %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\appendix
-\include{appendixa.tex}
+\include{appendixa}
+\include{appendixb}
-
-%%% Bibliography %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% Bibliography (biblatex) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\defbibheading{bibintoc}{\chapter*{#1}\addcontentsline{toc}{backmatter}{\refname}}
% this sets the title of contents name for bibliography to \refname (= References)
@@ -257,6 +307,7 @@
%%%% Option for natbib %%%%%%%%%%%%%
+
%% use an appropriate style (.bst) and your own .bib file[s]
%\bibliographystyle{plainnat}
diff --git a/macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/README_font_sample_sources.txt b/macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/README_font_sample_sources.txt
index beacdde0a3..18b95f79ec 100644
--- a/macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/README_font_sample_sources.txt
+++ b/macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/README_font_sample_sources.txt
@@ -6,11 +6,16 @@ These font sample files call the following additional files as inputs:
abstract.tex
acknowledgments.tex
appendixa.tex
+appendixb.tex
biography.tex
chapter1.tex
+committee_members.tex
mitthesis-sample.bib
mydesign.tex
All of those files are in the directory mitthesis/MIT-thesis-template.
You should also copy the fontsets directory (and mitthesis.cls) into this folder.
+
+Run as % ./compile-font-samples.sh
+
diff --git a/macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/Stix2.tex b/macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/Stix2.tex
index 6fe4965432..aabac07cda 100644
--- a/macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/Stix2.tex
+++ b/macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/Stix2.tex
@@ -1,12 +1,12 @@
% !TEX encoding = UTF-8 Unicode
-% !BIB TS-program = biber
-% !BIB program = biber
+% !BIB TS-program = biber
+% !BIB program = biber
% This file is MIT-Thesis.tex, a LaTeX template for formatting an MIT thesis with the mitthesis class.
%
-% Version: 1.06, 2023/08/28
+% Version: 1.15, 2024/08/31
%
-% Author: John H. Lienhard (c) 2023. Reuse under the MIT license: https://ctan.org/license/mit
+% Author: John H. Lienhard, copyright 2024. Reuse under the MIT license: https://ctan.org/license/mit
% Documentation is here: https://ctan.org/pkg/mitthesis
@@ -16,19 +16,21 @@
pdfstandard = a-2b,
pdfversion = 1.7,
lang = en-US,
-% debug = {xmp-export}, % uncomment to output a separate xmpi file showing the metadata
+% pdfversion = 2.0,
+% pdfstandard = a-4,
}
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\documentclass[fontset=stix2]{mitthesis} %,fontset=libertine ,fontset=newtx-sans-text, fontset=heros-stix2, fontset=stix2
+\documentclass[fontset=stix2]{mitthesis}% fontset=newtx, fontset=libertine, fontset=newtx-sans-text, fontset=heros-stix2, fontset=stix2
%
% option [twoside] gives facing-page behavior for printing; omitting twoside will eliminate even-numbered blank pages.
% option [lineno] provides line numbers, as for editing
% option [mydesign] loads packages for color, title and list formats, margins, or captions: edit mydesign.tex to change defaults.
% option [fontset] is a keyvalue which can be:
-% pdftex or unicode engines: defaultfonts, libertine, lucida
-% pdftex only: fira-newtxsf, newtx, newtx-sans-text
-% unicode engines (luatex): heros-stix2, stix2, termes, termes-stix2
+% for pdftex or unicode engines: defaultfonts, libertine, lucida
+% for pdftex only: fira-newtxsf, newtx, newtx-sans-text
+% for unicode engines (luatex): heros-stix2, stix2, termes, termes-stix2
% if no key value is given, fonts default to CMR (pdftex) or LMR (unicode), i.e., "the LaTeX font".
% You can edit the fontset files or you can write your own, myfonts.tex, and do [fontset=myfonts].
% If you are using multiple languages, load the babel package in your fontset file, before the fonts.
@@ -39,12 +41,32 @@
\usepackage{listings}% documentation is here https://ctan.org/pkg/listings
%% Set chemical formulas nicely
-\usepackage[version=4]{mhchem}% documentation is here https://ctan.org/pkg/mhchem
+\usepackage[version=4]{mhchem}% documentation at https://ctan.org/pkg/mhchem
-%% Latin filler used in Chapter 1, with a test for package version date. https://ctan.org/pkg/lipsum
+%% Latin filler used in Chapter 1, with a test for package version date (https://ctan.org/pkg/lipsum)
\usepackage{lipsum}
\IfPackageAtLeastTF{lipsum}{2021/09/20}{\setlipsum{auto-lang=false}}{}
+%% Table related packages
+
+\usepackage{booktabs}% publication quality tables (https://ctan.org/pkg/booktabs)
+
+\usepackage{array}% Additional options for column formats (https://ctan.org/pkg/array)
+
+\usepackage{dcolumn}% For alignment of numbers on the decimal place (https://ctan.org/pkg/dcolumn)
+ \newcolumntype{d}[1]{D{.}{.}{#1}}% use with dcolumn package
+ % syntax: d{x.y} where x is max number of digits before decimal and y is max number after.
+
+% Package for multipage table in Appendix B.
+\usepackage{longtable}% typeset multi-page tables (https://ctan.org/pkg/longtable)
+
+%\usepackage{tabularx}% adjustable-width columns in tabular (https://ctan.org/pkg/tabularx)
+
+
+%% Package for improved typography
+
+\usepackage{microtype}% typographic fine-tuning, used in sample thesis committee page, but also acting globally on the text
+
%%%%%%%%% Graphics path (to figure files) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -59,16 +81,26 @@
%% Numerical citations of references
\usepackage[style=ext-numeric-comp,giveninits=true,maxbibnames=10,sorting=none]{biblatex}
+%% IEEE style citations and references
+% \usepackage[style=ieee,maxbibnames=10,sorting=none]{biblatex}% style=ext-numeric-comp,articlein=false,giveninits=true
+% \DefineBibliographyStrings{english}{url= \textsc{url} , }% replaces the IEEE default "[Online]. Available" by "URL"
-\addbibresource{mitthesis-sample.bib}%% <== change to YOUR bib file <================= CHANGE
+%% author-year style citations and references
+%% use \parencite, not \cite, when you want "(Author, year)"
+%% The sample files are not set up to include parentheses.
+% \usepackage[style=authoryear, maxbibnames=10]{biblatex}
-%% These two commands enable line breaks in long URLs in the bibliography (delete if you don't want that)
-\setcounter{biburllcpenalty}{7000}
-\setcounter{biburlucpenalty}{8000}
-% biblatex is very powerful, and you can customize most aspects the reference list and citations to suit your needs.
-% documentation is here: https://ctan.org/pkg/biblatex
+\addbibresource{mitthesis-sample.bib}%% <== change to YOUR bib file <= CHANGE
+%% to avoid split urls and stretched white space, you can set the bibliography ragged-right:
+%\appto{\bibsetup}{\raggedright}
+
+%% biblatex is very powerful, and you can customize most aspects the reference list and citations to suit your needs.
+%% documentation is here: https://ctan.org/pkg/biblatex
+%% cheat sheet is here: https://tug.ctan.org/info/biblatex-cheatsheet/biblatex-cheatsheet.pdf
+
+%% To ensure citations are set, run Latex --> biblatex/biber --> Latex again
%%%%%%%%%% Option to use natbib %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -80,19 +112,9 @@
%%% You can use this to rename the bibliography section
%\renewcommand{\bibname}{References}
-%%% Can adjust space between bibliography items (change 4pt to something else; don't drop last two lengths, they are stretchable "glue")
+%%% To adjust space between bibliography items
%\setlength\bibsep{4pt plus 1pt minus 1pt}
-
-
-%%%%%%%%%% Table related packages %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\usepackage{booktabs}% better quality tables, https://ctan.org/pkg/booktabs
-\usepackage{array}% additional options for table columns, https://ctan.org/pkg/array
-
-%\usepackage{tabularx}% https://ctan.org/pkg/tabularx
-
-%\usepackage{dcolumn}% alignment on decimal place, https://ctan.org/pkg/dcolumn
-%\newcolumntype{d}[1]{D{.}{.}{#1}}
+% change 4pt to something else; don't drop last two lengths (they are stretchable "glue")
%%%%%%%%%% Option for "double spacing" %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -103,18 +125,18 @@
%% to change the line separation, the most attractive results will be obtained by changing the
%% leading in proportion to the the current font size, rather than just doubling the space.
-%% The setspace package provides a tool for changing line separation (use thesetwo here)
+%% The setspace package provides a tool for changing line separation. Use these two commands here:
%
% \usepackage{setspace}% documentation at https://ctan.org/pkg/setspace
% \setstretch{1.1}% you can choose some other value for the stretch of space between lines
%
-%% Use the these commands AFTER the frontmatter
+%% Use one or more of the these commands *AFTER* the frontmatter
%
% \onehalfspacing
% \doublespacing
% \singlespacing % will turn these effects off (you can use these anywhere in the document)
-%% The best result may be to stay with leading selected by the typographer who set up the font.
+%% The best result is usually to stay with leading selected by the typographer who set up the font.
%%%%%%%%%%% Metadata %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -129,7 +151,7 @@
pdfkeywords={Massachusetts Institute of Technology, MIT},
% Add keywords that will help search engines and libraries to find your work.
% Includes the name[s] of the author[s]
- % (If you have used \DocumentMetadata, at line 15, you can just put "\CopyrightAuthor," for the names.)
+ % (If you used \DocumentMetadata at line 14, you can just put "\CopyrightAuthor," for the names.)
%
pdfurl={},
% If you have a url for the thesis, put it here. Otherwise delete this.
@@ -155,11 +177,11 @@
% \Author{Author full name}{Author department}[Author's first PREVIOUS degree][Author's second PREVIOUS degree][...
% Note that third, fourth, fifth, and sixth arguments are optional [] and may be omitted
-% note on names: most of the following names are made up; Silas Holman was a professor at MIT in the 19th century.
+% note on names: most of the following names are made up; Silas Holman was a physics professor at MIT in the 19th century.
-\Author{Silas W. Holman}{Department of Physics}%[B.S. Physics, MIT, 1876][MBA, Ferengi School of Management, 2022]
-%\Author{Luisa Hernández}{Department of Research}[B.S. Mechanical Engineering, UCLA, 2018][M.S. Stellar Interiors, Vulcan Science Academy, 2020][MBA, Ferengi School of Management, 2022]
-%\Author{Thurston Howell III}{Department of Economics}
+\Author{Silas W. Holman}{Department of Physics}
+% \Author{Luisa Hernández}{Department of Research}[B.S. Mechanical Engineering, UCLA, 2018][M.S. Stellar Interiors, Vulcan Science Academy, 2020]
+% \Author{Thurston Howell III}{Department of Economics}[MBA, Ferengi School of Management, 2022]
% Use once for each degree fulfilled by thesis
% For two degrees from one department, leave the department argument blank for the second degree {}.
@@ -169,22 +191,19 @@
% If there is more than one supervisor, use the \Supervisor command for each.
\Supervisor{Edward C. Pickering}{Professor of Physics}
-%\Supervisor{Secunda Castor}{Professor of Research}
-%\Supervisor{Quintus Castor}{Professor of Log Dams}
+% \Supervisor{Edward C. Pickering}{Professor of Physics, and \\ \> Professor of Something Else}
+% \Supervisor{Secunda Castor}{Professor of Research}
+% \Supervisor{Quintus Castor}{Professor of Log Dams}
% Professor who formally accepts theses for your department (e.g., the Graduate Officer, Professor Sméagol,...)
% If more than one department, use more than once
-% **If you need to reduce vertical space, put the acceptor title in the second argument and leave the third blank {}.**
-\Acceptor{Primus Castor}{Professor of Wetlands Engineering}{Undergraduate Officer, Department of Physics}
-%\Acceptor{Tertius Castor}{Professor of Log Dams}{Graduate Officer, Department of Research}
-%\Acceptor{Quarta Castor}{Professor of Lodge Building}{Graduate Officer, Department of Mechanical Engineering}
-
-% If your title page is overflowing (from too many names, degrees, etc.), you can scale
-% down the Signature block at the bottom with this command, or use another creative solution...
-%\SignatureBlockSize{\small} %\SignatureBlockSize{\footnotesize}
+\Acceptor{Tertius Castor}{Professor of Log Dams}{Graduate Officer, Department of Research} % \\ \> Third title}
+% \Acceptor{Quarta Castor}{Professor of Lodge Building}{Graduate Officer, Department of Mechanical Engineering}
+%%% If you need to reduce vertical space, put the acceptor title in the second argument and leave the third blank, {}.
+% \Acceptor{Primus Castor}{Professor and Undergraduate Officer, Department of Physics}{}
% Usage: \DegreeDate{Month}{year}
-% Valid degree months are September, February, or June.
+% Valid degree months are February, May, June, or September
\DegreeDate{June}{1876}
% Date that final thesis is submitted to department
@@ -198,53 +217,85 @@
%
\CClicense{CC BY-NC-ND 4.0}{https://creativecommons.org/licenses/by-nc-nd/4.0/}
%
+
+%%%%%%% Solutions for overflowing titlepage %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% If your title page is overflowing (from too many names, degrees, etc.):
+%
+% (a) you can reduce the 12pt and 18pt skips between various blocks to 6pt with this command:
+%
+% \Tighten
+%
+% (b) you can scale down the Signature block at the bottom with this command:
+%
+% \SignatureBlockSize{\small} %or this one \SignatureBlockSize{\footnotesize}
+%
+% (c) you can put the acceptor name and title onto two lines, rather than three like this:
+%
+% \Acceptor{Tertius Castor}{Professor and Graduate Officer, Department of Research}{}
+%
+% (d) you can change the font size of the author name[s] with
+%
+% \AuthorNameSize{\normalsize}
+%
+% (e) and you can omit any previous degrees from the title page, instead mentioning them in the biographical sketch
+
+% Also, if you prefer to keep the text toward the top of the page with most white space at the bottom, you
+% can use this command to squash all of the vertical glue (stretchy space) with this command:
+%
+% \Squash
+%
+% This command is useful when the text has not already reach the bottom of the page, since the glue gets squashed automatically
+% when the page is too full.
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% Titlepage
+%%% Make titlepage
\maketitle
-%%%%%%%%% Contents that you need to write follows %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%% Contents that you need to write follows! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \includeonly{acknowledgments,biography,chapter1,chapter2,...,appendixa,...}
-% for usage, see https://latexref.xyz/dev/latex2e.html#g_t_005cinclude-_0026-_005cincludeonly
+% for usage of includeonly, see https://latexref.xyz/_005cinclude-_0026-_005cincludeonly.html
+
+%%% Frontmatter (write this material in the mentioned files) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% Frontmatter (write this material in the mentioned files) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% This page is optional. Edit the file committee_members.tex
+\include{committee_members}
-% The abstract environment creates all the required headers and footnote.
-% You only need to add the text of the abstract itself in the file abstract.tex
+% The abstract environment creates all the required headings and footers.
+% You only need to the text of the abstract in the file abstract.tex
\begin{abstract}
- \input{abstract.tex}% in this case, use \input rather than \include because you are inside an environment
+ \input{abstract.tex}% use \input rather than \include because we're inside an environment
\end{abstract}
-\include{acknowledgments.tex}
+\include{acknowledgments}% acknowledgments.tex (.tex extension is presumed by \include)
-\include{biography.tex}% optional, see MIT Libraries https://libraries.mit.edu/distinctive-collections/thesis-specs/#format
+\include{biography}% biography.tex (optional, see https://libraries.mit.edu/distinctive-collections/thesis-specs/#format)
-
-%%% Table of contents and lists of stuff (delete lists you don't need, e.g., if no tables) %%%%%%%%
+%%% Table of contents and lists of stuff (delete unused lists, i.e., if no tables or figures) %%%%%
\tableofcontents
\listoffigures
\listoftables
-
%%% Chapters of thesis %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% If you want to use "double spacing", you can start here...
+%% If you want to use "double spacing", you should start here...
-\include{chapter1.tex}
-%\include{chapter2.tex}
-%\include{chapter3.tex}
-%\include{chapter4.tex}
+ \include{chapter1}% .tex extension is presumed
+% \include{chapter2}
+%\include{chapter3}
+%\include{chapter4}
%%% Appendicies of thesis %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\appendix
-\include{appendixa.tex}
+\include{appendixa}
+\include{appendixb}
-
-%%% Bibliography %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% Bibliography (biblatex) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\defbibheading{bibintoc}{\chapter*{#1}\addcontentsline{toc}{backmatter}{\refname}}
% this sets the title of contents name for bibliography to \refname (= References)
@@ -257,6 +308,7 @@
%%%% Option for natbib %%%%%%%%%%%%%
+
%% use an appropriate style (.bst) and your own .bib file[s]
%\bibliographystyle{plainnat}
diff --git a/macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/Termes-stix2.tex b/macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/Termes-stix2.tex
index 3bbf3c8333..3b17a9c4cd 100644
--- a/macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/Termes-stix2.tex
+++ b/macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/Termes-stix2.tex
@@ -1,12 +1,11 @@
% !TEX encoding = UTF-8 Unicode
-% !BIB TS-program = biber
-% !BIB program = biber
+% !BIB TS-program = biber
% This file is MIT-Thesis.tex, a LaTeX template for formatting an MIT thesis with the mitthesis class.
%
-% Version: 1.06, 2023/08/28
+% Version: 1.15, 2024/08/31
%
-% Author: John H. Lienhard (c) 2023. Reuse under the MIT license: https://ctan.org/license/mit
+% Author: John H. Lienhard, copyright 2024. Reuse under the MIT license: https://ctan.org/license/mit
% Documentation is here: https://ctan.org/pkg/mitthesis
@@ -16,19 +15,21 @@
pdfstandard = a-2b,
pdfversion = 1.7,
lang = en-US,
-% debug = {xmp-export}, % uncomment to output a separate xmpi file showing the metadata
+% pdfversion = 2.0,
+% pdfstandard = a-4,
}
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\documentclass[fontset=termes-stix2]{mitthesis} %,fontset=libertine ,fontset=newtx-sans-text, fontset=heros-stix2, fontset=stix2
+\documentclass[fontset=termes-stix2]{mitthesis}% fontset=newtx, fontset=libertine, fontset=newtx-sans-text, fontset=heros-stix2, fontset=stix2
%
% option [twoside] gives facing-page behavior for printing; omitting twoside will eliminate even-numbered blank pages.
% option [lineno] provides line numbers, as for editing
% option [mydesign] loads packages for color, title and list formats, margins, or captions: edit mydesign.tex to change defaults.
% option [fontset] is a keyvalue which can be:
-% pdftex or unicode engines: defaultfonts, libertine, lucida
-% pdftex only: fira-newtxsf, newtx, newtx-sans-text
-% unicode engines (luatex): heros-stix2, stix2, termes, termes-stix2
+% for pdftex or unicode engines: defaultfonts, libertine, lucida
+% for pdftex only: fira-newtxsf, newtx, newtx-sans-text
+% for unicode engines (luatex): heros-stix2, stix2, termes, termes-stix2
% if no key value is given, fonts default to CMR (pdftex) or LMR (unicode), i.e., "the LaTeX font".
% You can edit the fontset files or you can write your own, myfonts.tex, and do [fontset=myfonts].
% If you are using multiple languages, load the babel package in your fontset file, before the fonts.
@@ -39,12 +40,32 @@
\usepackage{listings}% documentation is here https://ctan.org/pkg/listings
%% Set chemical formulas nicely
-\usepackage[version=4]{mhchem}% documentation is here https://ctan.org/pkg/mhchem
+\usepackage[version=4]{mhchem}% documentation at https://ctan.org/pkg/mhchem
-%% Latin filler used in Chapter 1, with a test for package version date. https://ctan.org/pkg/lipsum
+%% Latin filler used in Chapter 1, with a test for package version date (https://ctan.org/pkg/lipsum)
\usepackage{lipsum}
\IfPackageAtLeastTF{lipsum}{2021/09/20}{\setlipsum{auto-lang=false}}{}
+%% Table related packages
+
+\usepackage{booktabs}% publication quality tables (https://ctan.org/pkg/booktabs)
+
+\usepackage{array}% Additional options for column formats (https://ctan.org/pkg/array)
+
+\usepackage{dcolumn}% For alignment of numbers on the decimal place (https://ctan.org/pkg/dcolumn)
+ \newcolumntype{d}[1]{D{.}{.}{#1}}% use with dcolumn package
+ % syntax: d{x.y} where x is max number of digits before decimal and y is max number after.
+
+% Package for multipage table in Appendix B.
+\usepackage{longtable}% typeset multi-page tables (https://ctan.org/pkg/longtable)
+
+%\usepackage{tabularx}% adjustable-width columns in tabular (https://ctan.org/pkg/tabularx)
+
+
+%% Package for improved typography
+
+\usepackage{microtype}% typographic fine-tuning, used in sample thesis committee page, but also acting globally on the text
+
%%%%%%%%% Graphics path (to figure files) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -59,16 +80,26 @@
%% Numerical citations of references
\usepackage[style=ext-numeric-comp,giveninits=true,maxbibnames=10,sorting=none]{biblatex}
+%% IEEE style citations and references
+% \usepackage[style=ieee,maxbibnames=10,sorting=none]{biblatex}% style=ext-numeric-comp,articlein=false,giveninits=true
+% \DefineBibliographyStrings{english}{url= \textsc{url} , }% replaces the IEEE default "[Online]. Available" by "URL"
-\addbibresource{mitthesis-sample.bib}%% <== change to YOUR bib file <================= CHANGE
+%% author-year style citations and references
+%% use \parencite, not \cite, when you want "(Author, year)"
+%% The sample files are not set up to include parentheses.
+% \usepackage[style=authoryear, maxbibnames=10]{biblatex}
-%% These two commands enable line breaks in long URLs in the bibliography (delete if you don't want that)
-\setcounter{biburllcpenalty}{7000}
-\setcounter{biburlucpenalty}{8000}
-% biblatex is very powerful, and you can customize most aspects the reference list and citations to suit your needs.
-% documentation is here: https://ctan.org/pkg/biblatex
+\addbibresource{mitthesis-sample.bib}%% <== change to YOUR bib file <= CHANGE
+%% to avoid split urls and stretched white space, you can set the bibliography ragged-right:
+%\appto{\bibsetup}{\raggedright}
+
+%% biblatex is very powerful, and you can customize most aspects the reference list and citations to suit your needs.
+%% documentation is here: https://ctan.org/pkg/biblatex
+%% cheat sheet is here: https://tug.ctan.org/info/biblatex-cheatsheet/biblatex-cheatsheet.pdf
+
+%% To ensure citations are set, run Latex --> biblatex/biber --> Latex again
%%%%%%%%%% Option to use natbib %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -80,19 +111,9 @@
%%% You can use this to rename the bibliography section
%\renewcommand{\bibname}{References}
-%%% Can adjust space between bibliography items (change 4pt to something else; don't drop last two lengths, they are stretchable "glue")
+%%% To adjust space between bibliography items
%\setlength\bibsep{4pt plus 1pt minus 1pt}
-
-
-%%%%%%%%%% Table related packages %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\usepackage{booktabs}% better quality tables, https://ctan.org/pkg/booktabs
-\usepackage{array}% additional options for table columns, https://ctan.org/pkg/array
-
-%\usepackage{tabularx}% https://ctan.org/pkg/tabularx
-
-%\usepackage{dcolumn}% alignment on decimal place, https://ctan.org/pkg/dcolumn
-%\newcolumntype{d}[1]{D{.}{.}{#1}}
+% change 4pt to something else; don't drop last two lengths (they are stretchable "glue")
%%%%%%%%%% Option for "double spacing" %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -103,18 +124,18 @@
%% to change the line separation, the most attractive results will be obtained by changing the
%% leading in proportion to the the current font size, rather than just doubling the space.
-%% The setspace package provides a tool for changing line separation (use thesetwo here)
+%% The setspace package provides a tool for changing line separation. Use these two commands here:
%
% \usepackage{setspace}% documentation at https://ctan.org/pkg/setspace
% \setstretch{1.1}% you can choose some other value for the stretch of space between lines
%
-%% Use the these commands AFTER the frontmatter
+%% Use one or more of the these commands *AFTER* the frontmatter
%
% \onehalfspacing
% \doublespacing
% \singlespacing % will turn these effects off (you can use these anywhere in the document)
-%% The best result may be to stay with leading selected by the typographer who set up the font.
+%% The best result is usually to stay with leading selected by the typographer who set up the font.
%%%%%%%%%%% Metadata %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -129,7 +150,7 @@
pdfkeywords={Massachusetts Institute of Technology, MIT},
% Add keywords that will help search engines and libraries to find your work.
% Includes the name[s] of the author[s]
- % (If you have used \DocumentMetadata, at line 15, you can just put "\CopyrightAuthor," for the names.)
+ % (If you used \DocumentMetadata at line 14, you can just put "\CopyrightAuthor," for the names.)
%
pdfurl={},
% If you have a url for the thesis, put it here. Otherwise delete this.
@@ -155,11 +176,11 @@
% \Author{Author full name}{Author department}[Author's first PREVIOUS degree][Author's second PREVIOUS degree][...
% Note that third, fourth, fifth, and sixth arguments are optional [] and may be omitted
-% note on names: most of the following names are made up; Silas Holman was a professor at MIT in the 19th century.
+% note on names: most of the following names are made up; Silas Holman was a physics professor at MIT in the 19th century.
-\Author{Silas W. Holman}{Department of Physics}%[B.S. Physics, MIT, 1876][MBA, Ferengi School of Management, 2022]
-%\Author{Luisa Hernández}{Department of Research}[B.S. Mechanical Engineering, UCLA, 2018][M.S. Stellar Interiors, Vulcan Science Academy, 2020][MBA, Ferengi School of Management, 2022]
-%\Author{Thurston Howell III}{Department of Economics}
+\Author{Silas W. Holman}{Department of Physics}
+% \Author{Luisa Hernández}{Department of Research}[B.S. Mechanical Engineering, UCLA, 2018][M.S. Stellar Interiors, Vulcan Science Academy, 2020]
+% \Author{Thurston Howell III}{Department of Economics}[MBA, Ferengi School of Management, 2022]
% Use once for each degree fulfilled by thesis
% For two degrees from one department, leave the department argument blank for the second degree {}.
@@ -169,22 +190,19 @@
% If there is more than one supervisor, use the \Supervisor command for each.
\Supervisor{Edward C. Pickering}{Professor of Physics}
-%\Supervisor{Secunda Castor}{Professor of Research}
-%\Supervisor{Quintus Castor}{Professor of Log Dams}
+% \Supervisor{Edward C. Pickering}{Professor of Physics, and \\ \> Professor of Something Else}
+% \Supervisor{Secunda Castor}{Professor of Research}
+% \Supervisor{Quintus Castor}{Professor of Log Dams}
% Professor who formally accepts theses for your department (e.g., the Graduate Officer, Professor Sméagol,...)
% If more than one department, use more than once
-% **If you need to reduce vertical space, put the acceptor title in the second argument and leave the third blank {}.**
-\Acceptor{Primus Castor}{Professor of Wetlands Engineering}{Undergraduate Officer, Department of Physics}
-%\Acceptor{Tertius Castor}{Professor of Log Dams}{Graduate Officer, Department of Research}
-%\Acceptor{Quarta Castor}{Professor of Lodge Building}{Graduate Officer, Department of Mechanical Engineering}
-
-% If your title page is overflowing (from too many names, degrees, etc.), you can scale
-% down the Signature block at the bottom with this command, or use another creative solution...
-%\SignatureBlockSize{\small} %\SignatureBlockSize{\footnotesize}
+\Acceptor{Tertius Castor}{Professor of Log Dams}{Graduate Officer, Department of Research} % \\ \> Third title}
+% \Acceptor{Quarta Castor}{Professor of Lodge Building}{Graduate Officer, Department of Mechanical Engineering}
+%%% If you need to reduce vertical space, put the acceptor title in the second argument and leave the third blank, {}.
+% \Acceptor{Primus Castor}{Professor and Undergraduate Officer, Department of Physics}{}
% Usage: \DegreeDate{Month}{year}
-% Valid degree months are September, February, or June.
+% Valid degree months are February, May, June, or September
\DegreeDate{June}{1876}
% Date that final thesis is submitted to department
@@ -198,53 +216,85 @@
%
\CClicense{CC BY-NC-ND 4.0}{https://creativecommons.org/licenses/by-nc-nd/4.0/}
%
+
+%%%%%%% Solutions for overflowing titlepage %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% If your title page is overflowing (from too many names, degrees, etc.):
+%
+% (a) you can reduce the 12pt and 18pt skips between various blocks to 6pt with this command:
+%
+% \Tighten
+%
+% (b) you can scale down the Signature block at the bottom with this command:
+%
+% \SignatureBlockSize{\small} %or this one \SignatureBlockSize{\footnotesize}
+%
+% (c) you can put the acceptor name and title onto two lines, rather than three like this:
+%
+% \Acceptor{Tertius Castor}{Professor and Graduate Officer, Department of Research}{}
+%
+% (d) you can change the font size of the author name[s] with
+%
+% \AuthorNameSize{\normalsize}
+%
+% (e) and you can omit any previous degrees from the title page, instead mentioning them in the biographical sketch
+
+% Also, if you prefer to keep the text toward the top of the page with most white space at the bottom, you
+% can use this command to squash all of the vertical glue (stretchy space) with this command:
+%
+% \Squash
+%
+% This command is useful when the text has not already reach the bottom of the page, since the glue gets squashed automatically
+% when the page is too full.
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% Titlepage
+%%% Make titlepage
\maketitle
-%%%%%%%%% Contents that you need to write follows %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%% Contents that you need to write follows! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \includeonly{acknowledgments,biography,chapter1,chapter2,...,appendixa,...}
-% for usage, see https://latexref.xyz/dev/latex2e.html#g_t_005cinclude-_0026-_005cincludeonly
+% for usage of includeonly, see https://latexref.xyz/_005cinclude-_0026-_005cincludeonly.html
+
+%%% Frontmatter (write this material in the mentioned files) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% Frontmatter (write this material in the mentioned files) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% This page is optional. Edit the file committee_members.tex
+\include{committee_members}
-% The abstract environment creates all the required headers and footnote.
-% You only need to add the text of the abstract itself in the file abstract.tex
+% The abstract environment creates all the required headings and footers.
+% You only need to the text of the abstract in the file abstract.tex
\begin{abstract}
- \input{abstract.tex}% in this case, use \input rather than \include because you are inside an environment
+ \input{abstract.tex}% use \input rather than \include because we're inside an environment
\end{abstract}
-\include{acknowledgments.tex}
+\include{acknowledgments}% acknowledgments.tex (.tex extension is presumed by \include)
-\include{biography.tex}% optional, see MIT Libraries https://libraries.mit.edu/distinctive-collections/thesis-specs/#format
+\include{biography}% biography.tex (optional, see https://libraries.mit.edu/distinctive-collections/thesis-specs/#format)
-
-%%% Table of contents and lists of stuff (delete lists you don't need, e.g., if no tables) %%%%%%%%
+%%% Table of contents and lists of stuff (delete unused lists, i.e., if no tables or figures) %%%%%
\tableofcontents
\listoffigures
\listoftables
-
%%% Chapters of thesis %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% If you want to use "double spacing", you can start here...
+%% If you want to use "double spacing", you should start here...
-\include{chapter1.tex}
-%\include{chapter2.tex}
-%\include{chapter3.tex}
-%\include{chapter4.tex}
+ \include{chapter1}% .tex extension is presumed
+% \include{chapter2}
+%\include{chapter3}
+%\include{chapter4}
%%% Appendicies of thesis %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\appendix
-\include{appendixa.tex}
+\include{appendixa}
+\include{appendixb}
-
-%%% Bibliography %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% Bibliography (biblatex) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\defbibheading{bibintoc}{\chapter*{#1}\addcontentsline{toc}{backmatter}{\refname}}
% this sets the title of contents name for bibliography to \refname (= References)
@@ -257,6 +307,7 @@
%%%% Option for natbib %%%%%%%%%%%%%
+
%% use an appropriate style (.bst) and your own .bib file[s]
%\bibliographystyle{plainnat}
diff --git a/macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/Termes.tex b/macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/Termes.tex
index 92a905fe99..6733f96f13 100644
--- a/macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/Termes.tex
+++ b/macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/Termes.tex
@@ -1,12 +1,11 @@
% !TEX encoding = UTF-8 Unicode
-% !BIB TS-program = biber
-% !BIB program = biber
+% !BIB TS-program = biber
% This file is MIT-Thesis.tex, a LaTeX template for formatting an MIT thesis with the mitthesis class.
%
-% Version: 1.06, 2023/08/28
+% Version: 1.15, 2024/08/31
%
-% Author: John H. Lienhard (c) 2023. Reuse under the MIT license: https://ctan.org/license/mit
+% Author: John H. Lienhard, copyright 2024. Reuse under the MIT license: https://ctan.org/license/mit
% Documentation is here: https://ctan.org/pkg/mitthesis
@@ -16,19 +15,21 @@
pdfstandard = a-2b,
pdfversion = 1.7,
lang = en-US,
-% debug = {xmp-export}, % uncomment to output a separate xmpi file showing the metadata
+% pdfversion = 2.0,
+% pdfstandard = a-4,
}
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\documentclass[fontset=termes]{mitthesis} %,fontset=libertine ,fontset=newtx-sans-text, fontset=heros-stix2, fontset=stix2
+\documentclass[fontset=termes]{mitthesis}% fontset=newtx, fontset=libertine, fontset=newtx-sans-text, fontset=heros-stix2, fontset=stix2
%
% option [twoside] gives facing-page behavior for printing; omitting twoside will eliminate even-numbered blank pages.
% option [lineno] provides line numbers, as for editing
% option [mydesign] loads packages for color, title and list formats, margins, or captions: edit mydesign.tex to change defaults.
% option [fontset] is a keyvalue which can be:
-% pdftex or unicode engines: defaultfonts, libertine, lucida
-% pdftex only: fira-newtxsf, newtx, newtx-sans-text
-% unicode engines (luatex): heros-stix2, stix2, termes, termes-stix2
+% for pdftex or unicode engines: defaultfonts, libertine, lucida
+% for pdftex only: fira-newtxsf, newtx, newtx-sans-text
+% for unicode engines (luatex): heros-stix2, stix2, termes, termes-stix2
% if no key value is given, fonts default to CMR (pdftex) or LMR (unicode), i.e., "the LaTeX font".
% You can edit the fontset files or you can write your own, myfonts.tex, and do [fontset=myfonts].
% If you are using multiple languages, load the babel package in your fontset file, before the fonts.
@@ -39,12 +40,32 @@
\usepackage{listings}% documentation is here https://ctan.org/pkg/listings
%% Set chemical formulas nicely
-\usepackage[version=4]{mhchem}% documentation is here https://ctan.org/pkg/mhchem
+\usepackage[version=4]{mhchem}% documentation at https://ctan.org/pkg/mhchem
-%% Latin filler used in Chapter 1, with a test for package version date. https://ctan.org/pkg/lipsum
+%% Latin filler used in Chapter 1, with a test for package version date (https://ctan.org/pkg/lipsum)
\usepackage{lipsum}
\IfPackageAtLeastTF{lipsum}{2021/09/20}{\setlipsum{auto-lang=false}}{}
+%% Table related packages
+
+\usepackage{booktabs}% publication quality tables (https://ctan.org/pkg/booktabs)
+
+\usepackage{array}% Additional options for column formats (https://ctan.org/pkg/array)
+
+\usepackage{dcolumn}% For alignment of numbers on the decimal place (https://ctan.org/pkg/dcolumn)
+ \newcolumntype{d}[1]{D{.}{.}{#1}}% use with dcolumn package
+ % syntax: d{x.y} where x is max number of digits before decimal and y is max number after.
+
+% Package for multipage table in Appendix B.
+\usepackage{longtable}% typeset multi-page tables (https://ctan.org/pkg/longtable)
+
+%\usepackage{tabularx}% adjustable-width columns in tabular (https://ctan.org/pkg/tabularx)
+
+
+%% Package for improved typography
+
+\usepackage{microtype}% typographic fine-tuning, used in sample thesis committee page, but also acting globally on the text
+
%%%%%%%%% Graphics path (to figure files) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -59,16 +80,26 @@
%% Numerical citations of references
\usepackage[style=ext-numeric-comp,giveninits=true,maxbibnames=10,sorting=none]{biblatex}
+%% IEEE style citations and references
+% \usepackage[style=ieee,maxbibnames=10,sorting=none]{biblatex}% style=ext-numeric-comp,articlein=false,giveninits=true
+% \DefineBibliographyStrings{english}{url= \textsc{url} , }% replaces the IEEE default "[Online]. Available" by "URL"
-\addbibresource{mitthesis-sample.bib}%% <== change to YOUR bib file <================= CHANGE
+%% author-year style citations and references
+%% use \parencite, not \cite, when you want "(Author, year)"
+%% The sample files are not set up to include parentheses.
+% \usepackage[style=authoryear, maxbibnames=10]{biblatex}
-%% These two commands enable line breaks in long URLs in the bibliography (delete if you don't want that)
-\setcounter{biburllcpenalty}{7000}
-\setcounter{biburlucpenalty}{8000}
-% biblatex is very powerful, and you can customize most aspects the reference list and citations to suit your needs.
-% documentation is here: https://ctan.org/pkg/biblatex
+\addbibresource{mitthesis-sample.bib}%% <== change to YOUR bib file <= CHANGE
+%% to avoid split urls and stretched white space, you can set the bibliography ragged-right:
+%\appto{\bibsetup}{\raggedright}
+
+%% biblatex is very powerful, and you can customize most aspects the reference list and citations to suit your needs.
+%% documentation is here: https://ctan.org/pkg/biblatex
+%% cheat sheet is here: https://tug.ctan.org/info/biblatex-cheatsheet/biblatex-cheatsheet.pdf
+
+%% To ensure citations are set, run Latex --> biblatex/biber --> Latex again
%%%%%%%%%% Option to use natbib %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -80,19 +111,9 @@
%%% You can use this to rename the bibliography section
%\renewcommand{\bibname}{References}
-%%% Can adjust space between bibliography items (change 4pt to something else; don't drop last two lengths, they are stretchable "glue")
+%%% To adjust space between bibliography items
%\setlength\bibsep{4pt plus 1pt minus 1pt}
-
-
-%%%%%%%%%% Table related packages %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\usepackage{booktabs}% better quality tables, https://ctan.org/pkg/booktabs
-\usepackage{array}% additional options for table columns, https://ctan.org/pkg/array
-
-%\usepackage{tabularx}% https://ctan.org/pkg/tabularx
-
-%\usepackage{dcolumn}% alignment on decimal place, https://ctan.org/pkg/dcolumn
-%\newcolumntype{d}[1]{D{.}{.}{#1}}
+% change 4pt to something else; don't drop last two lengths (they are stretchable "glue")
%%%%%%%%%% Option for "double spacing" %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -103,18 +124,18 @@
%% to change the line separation, the most attractive results will be obtained by changing the
%% leading in proportion to the the current font size, rather than just doubling the space.
-%% The setspace package provides a tool for changing line separation (use thesetwo here)
+%% The setspace package provides a tool for changing line separation. Use these two commands here:
%
% \usepackage{setspace}% documentation at https://ctan.org/pkg/setspace
% \setstretch{1.1}% you can choose some other value for the stretch of space between lines
%
-%% Use the these commands AFTER the frontmatter
+%% Use one or more of the these commands *AFTER* the frontmatter
%
% \onehalfspacing
% \doublespacing
% \singlespacing % will turn these effects off (you can use these anywhere in the document)
-%% The best result may be to stay with leading selected by the typographer who set up the font.
+%% The best result is usually to stay with leading selected by the typographer who set up the font.
%%%%%%%%%%% Metadata %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -129,7 +150,7 @@
pdfkeywords={Massachusetts Institute of Technology, MIT},
% Add keywords that will help search engines and libraries to find your work.
% Includes the name[s] of the author[s]
- % (If you have used \DocumentMetadata, at line 15, you can just put "\CopyrightAuthor," for the names.)
+ % (If you used \DocumentMetadata at line 14, you can just put "\CopyrightAuthor," for the names.)
%
pdfurl={},
% If you have a url for the thesis, put it here. Otherwise delete this.
@@ -155,11 +176,11 @@
% \Author{Author full name}{Author department}[Author's first PREVIOUS degree][Author's second PREVIOUS degree][...
% Note that third, fourth, fifth, and sixth arguments are optional [] and may be omitted
-% note on names: most of the following names are made up; Silas Holman was a professor at MIT in the 19th century.
+% note on names: most of the following names are made up; Silas Holman was a physics professor at MIT in the 19th century.
-\Author{Silas W. Holman}{Department of Physics}%[B.S. Physics, MIT, 1876][MBA, Ferengi School of Management, 2022]
-%\Author{Luisa Hernández}{Department of Research}[B.S. Mechanical Engineering, UCLA, 2018][M.S. Stellar Interiors, Vulcan Science Academy, 2020][MBA, Ferengi School of Management, 2022]
-%\Author{Thurston Howell III}{Department of Economics}
+\Author{Silas W. Holman}{Department of Physics}
+% \Author{Luisa Hernández}{Department of Research}[B.S. Mechanical Engineering, UCLA, 2018][M.S. Stellar Interiors, Vulcan Science Academy, 2020]
+% \Author{Thurston Howell III}{Department of Economics}[MBA, Ferengi School of Management, 2022]
% Use once for each degree fulfilled by thesis
% For two degrees from one department, leave the department argument blank for the second degree {}.
@@ -169,22 +190,19 @@
% If there is more than one supervisor, use the \Supervisor command for each.
\Supervisor{Edward C. Pickering}{Professor of Physics}
-%\Supervisor{Secunda Castor}{Professor of Research}
-%\Supervisor{Quintus Castor}{Professor of Log Dams}
+% \Supervisor{Edward C. Pickering}{Professor of Physics, and \\ \> Professor of Something Else}
+% \Supervisor{Secunda Castor}{Professor of Research}
+% \Supervisor{Quintus Castor}{Professor of Log Dams}
% Professor who formally accepts theses for your department (e.g., the Graduate Officer, Professor Sméagol,...)
% If more than one department, use more than once
-% **If you need to reduce vertical space, put the acceptor title in the second argument and leave the third blank {}.**
-\Acceptor{Primus Castor}{Professor of Wetlands Engineering}{Undergraduate Officer, Department of Physics}
-%\Acceptor{Tertius Castor}{Professor of Log Dams}{Graduate Officer, Department of Research}
-%\Acceptor{Quarta Castor}{Professor of Lodge Building}{Graduate Officer, Department of Mechanical Engineering}
-
-% If your title page is overflowing (from too many names, degrees, etc.), you can scale
-% down the Signature block at the bottom with this command, or use another creative solution...
-%\SignatureBlockSize{\small} %\SignatureBlockSize{\footnotesize}
+\Acceptor{Tertius Castor}{Professor of Log Dams}{Graduate Officer, Department of Research} % \\ \> Third title}
+% \Acceptor{Quarta Castor}{Professor of Lodge Building}{Graduate Officer, Department of Mechanical Engineering}
+%%% If you need to reduce vertical space, put the acceptor title in the second argument and leave the third blank, {}.
+% \Acceptor{Primus Castor}{Professor and Undergraduate Officer, Department of Physics}{}
% Usage: \DegreeDate{Month}{year}
-% Valid degree months are September, February, or June.
+% Valid degree months are February, May, June, or September
\DegreeDate{June}{1876}
% Date that final thesis is submitted to department
@@ -198,53 +216,85 @@
%
\CClicense{CC BY-NC-ND 4.0}{https://creativecommons.org/licenses/by-nc-nd/4.0/}
%
+
+%%%%%%% Solutions for overflowing titlepage %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% If your title page is overflowing (from too many names, degrees, etc.):
+%
+% (a) you can reduce the 12pt and 18pt skips between various blocks to 6pt with this command:
+%
+% \Tighten
+%
+% (b) you can scale down the Signature block at the bottom with this command:
+%
+% \SignatureBlockSize{\small} %or this one \SignatureBlockSize{\footnotesize}
+%
+% (c) you can put the acceptor name and title onto two lines, rather than three like this:
+%
+% \Acceptor{Tertius Castor}{Professor and Graduate Officer, Department of Research}{}
+%
+% (d) you can change the font size of the author name[s] with
+%
+% \AuthorNameSize{\normalsize}
+%
+% (e) and you can omit any previous degrees from the title page, instead mentioning them in the biographical sketch
+
+% Also, if you prefer to keep the text toward the top of the page with most white space at the bottom, you
+% can use this command to squash all of the vertical glue (stretchy space) with this command:
+%
+% \Squash
+%
+% This command is useful when the text has not already reach the bottom of the page, since the glue gets squashed automatically
+% when the page is too full.
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% Titlepage
+%%% Make titlepage
\maketitle
-%%%%%%%%% Contents that you need to write follows %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%% Contents that you need to write follows! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \includeonly{acknowledgments,biography,chapter1,chapter2,...,appendixa,...}
-% for usage, see https://latexref.xyz/dev/latex2e.html#g_t_005cinclude-_0026-_005cincludeonly
+% for usage of includeonly, see https://latexref.xyz/_005cinclude-_0026-_005cincludeonly.html
+
+%%% Frontmatter (write this material in the mentioned files) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% Frontmatter (write this material in the mentioned files) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% This page is optional. Edit the file committee_members.tex
+\include{committee_members}
-% The abstract environment creates all the required headers and footnote.
-% You only need to add the text of the abstract itself in the file abstract.tex
+% The abstract environment creates all the required headings and footers.
+% You only need to the text of the abstract in the file abstract.tex
\begin{abstract}
- \input{abstract.tex}% in this case, use \input rather than \include because you are inside an environment
+ \input{abstract.tex}% use \input rather than \include because we're inside an environment
\end{abstract}
-\include{acknowledgments.tex}
+\include{acknowledgments}% acknowledgments.tex (.tex extension is presumed by \include)
-\include{biography.tex}% optional, see MIT Libraries https://libraries.mit.edu/distinctive-collections/thesis-specs/#format
+\include{biography}% biography.tex (optional, see https://libraries.mit.edu/distinctive-collections/thesis-specs/#format)
-
-%%% Table of contents and lists of stuff (delete lists you don't need, e.g., if no tables) %%%%%%%%
+%%% Table of contents and lists of stuff (delete unused lists, i.e., if no tables or figures) %%%%%
\tableofcontents
\listoffigures
\listoftables
-
%%% Chapters of thesis %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% If you want to use "double spacing", you can start here...
+%% If you want to use "double spacing", you should start here...
-\include{chapter1.tex}
-%\include{chapter2.tex}
-%\include{chapter3.tex}
-%\include{chapter4.tex}
+ \include{chapter1}% .tex extension is presumed
+% \include{chapter2}
+%\include{chapter3}
+%\include{chapter4}
%%% Appendicies of thesis %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\appendix
-\include{appendixa.tex}
+\include{appendixa}
+\include{appendixb}
-
-%%% Bibliography %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% Bibliography (biblatex) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\defbibheading{bibintoc}{\chapter*{#1}\addcontentsline{toc}{backmatter}{\refname}}
% this sets the title of contents name for bibliography to \refname (= References)
@@ -257,6 +307,7 @@
%%%% Option for natbib %%%%%%%%%%%%%
+
%% use an appropriate style (.bst) and your own .bib file[s]
%\bibliographystyle{plainnat}
diff --git a/macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/compile-font-samples.sh b/macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/compile-font-samples.sh
index fdb19c1f4f..16b0d5bc48 100755
--- a/macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/compile-font-samples.sh
+++ b/macros/latex/contrib/mitthesis/examples/font_samples/latex_sources/compile-font-samples.sh
@@ -1,60 +1,67 @@
#! /bin/bash
-# first run
-
+# Default fonts
+pdflatex Defaultfonts
+biber Defaultfonts
pdflatex Defaultfonts
-pdflatex Fira_Newtxsf
-pdflatex Libertine
-pdflatex Lucida
-pdflatex Newtx-sans-text
-pdflatex Newtx
-
-lualatex Heros-Stix2
-lualatex Stix2
-lualatex Termes-stix2
-lualatex Termes
-
-# biber
-
-biber Defaultfonts
-biber Fira_Newtxsf
-biber Libertine
-biber Lucida
-biber Newtx-sans-text
-biber Newtx
-biber Heros-Stix2
-biber Stix2
-biber Termes-stix2
-biber Termes
-
-# second run
-
pdflatex Defaultfonts
+
+# Fira_Newtxsf
+pdflatex Fira_Newtxsf
+biber Fira_Newtxsf
pdflatex Fira_Newtxsf
+pdflatex Fira_Newtxsf
+
+# Libertine
+pdflatex Libertine
+biber Libertine
pdflatex Libertine
+pdflatex Libertine
+
+# Lucida
+pdflatex Lucida
+biber Lucida
+pdflatex Lucida
pdflatex Lucida
+
+# Newtx-sans-text
+pdflatex Newtx-sans-text
+biber Newtx-sans-text
+pdflatex Newtx-sans-text
pdflatex Newtx-sans-text
+
+# Newtx
+pdflatex Newtx
+biber Newtx
+pdflatex Newtx
pdflatex Newtx
+# Heros-Stix2
+lualatex Heros-Stix2
+biber Heros-Stix2
lualatex Heros-Stix2
+lualatex Heros-Stix2
+
+# Stix2
+lualatex Stix2
+biber Stix2
lualatex Stix2
+lualatex Stix2
+
+# Termes-stix2
+lualatex Termes-stix2
+biber Termes-stix2
+lualatex Termes-stix2
lualatex Termes-stix2
-lualatex Termes
-# third run
-pdflatex Defaultfonts
-pdflatex Fira_Newtxsf
-pdflatex Libertine
-pdflatex Lucida
-pdflatex Newtx-sans-text
-pdflatex Newtx
-
-lualatex Heros-Stix2
-lualatex Stix2
-lualatex Termes-stix2
+# Termes
+lualatex Termes
+biber Termes
+lualatex Termes
lualatex Termes
+
# clean up
mkdir pdffiles
@@ -68,5 +75,3 @@ rm *.lot
rm *.lof
rm *.toc
rm *.xml
-
-
diff --git a/macros/latex/contrib/mitthesis/mitthesis-doc/mitthesis-doc.pdf b/macros/latex/contrib/mitthesis/mitthesis-doc/mitthesis-doc.pdf
index ab61cf59e5..69af5643ce 100644
--- a/macros/latex/contrib/mitthesis/mitthesis-doc/mitthesis-doc.pdf
+++ b/macros/latex/contrib/mitthesis/mitthesis-doc/mitthesis-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/mitthesis/mitthesis-doc/mitthesis-doc.tex b/macros/latex/contrib/mitthesis/mitthesis-doc/mitthesis-doc.tex
index 4e5e739585..dc0dd3ed8a 100644
--- a/macros/latex/contrib/mitthesis/mitthesis-doc/mitthesis-doc.tex
+++ b/macros/latex/contrib/mitthesis/mitthesis-doc/mitthesis-doc.tex
@@ -1,14 +1,14 @@
% !TEX TS-program = lualatex
% !TEX encoding = UTF-8 Unicode
-% Version date: 19 July 2024
+% Version date: 31 August 2024
\DocumentMetadata
{
pdfstandard = a-4,
pdfversion = 2.0,
-% testphase = {phase-III, table, firstaid, math},
lang = en-US,
+% testphase = {phase-III, table, firstaid, math, title},
% debug = {xmp-export}, % note that subject entries are all fine in dc format of outputted xmpi file.
}
@@ -17,9 +17,10 @@
\documentclass[11pt]{article}
\usepackage[letterpaper,margin=1in,footskip=0.5in]{geometry}
-\usepackage{metalogo}
+
\usepackage{hologo}
\newcommand*\pdfTeX{\hologo{pdfTeX}}
+\newcommand*\LuaLaTeX{\hologo{LuaLaTeX}}
\usepackage[x11names,svgnames,dvipsnames,table]{xcolor}
\usepackage{luacolor} % load AFTER xcolor
@@ -84,13 +85,11 @@
\usepackage[psdextra]{hyperref}
-\hypersetup{%
- unicode,%
-% pdftex,%
- pdfborder={0 0 0},%
- bookmarksnumbered=true,%
- bookmarksopen=true,%
- bookmarksopenlevel=2,%
+\hypersetup{
+ pdfborder={0 0 0},
+ bookmarksnumbered=true,
+ bookmarksopen=true,
+ bookmarksopenlevel=2,
colorlinks=true,
linkcolor=blue,
citecolor=blue,
@@ -99,15 +98,15 @@
anchorcolor=yellow,% not all pdf viewers recognize this field (Firefox does)
% colorscheme=phelype,% overrides link, cite, url, file colors with a preset scheme, through \DocumentMetadata
pdfpagelayout=SinglePage,
- pdfdisplaydoctitle=true,%
+ pdfdisplaydoctitle=true,
pdfstartview=Fit,
pdfmetalang={en},
- pdftitle={Documentation for the MIT thesis template},%
- pdfkeywords={John Lienhard, Massachusetts Institute of Technology, MIT, thesis, dissertation, template, latex},%
- pdfnewwindow=true,%
+ pdftitle={Documentation for the MIT thesis template},
+ pdfkeywords={John Lienhard, Massachusetts Institute of Technology, MIT, thesis, dissertation, template, latex},
+ pdfnewwindow=true,
pdfauthor={John H. Lienhard},
pdfauthortitle={Professor of Mechanical Engineering},
- pdfcaptionwriter={{John H. Lienhard, V}}, %{\xmpquote{John H. Lienhard\xmpcomma\ V}},
+ pdfcaptionwriter={{John H. Lienhard, V}},
pdfurl={https://lienhard.mit.edu},
pdfcontactemail={lienhard@mit.edu},
pdfcontactaddress={77 Massachusetts Avenue, Room 3-166},
@@ -126,10 +125,7 @@
\cs_if_exist:NTF \pdfmeta_xmp_add:n {\pdfmeta_xmp_add:n{<xmpRights:Marked>True</xmpRights:Marked>}}{}
\ExplSyntaxOff
-\urlstyle{same} % this changes font for \url to the current text font, but it is not recognized by \href.
-
-%\RequirePackage{bookmark}% improves handling of pdf bookmarks
-%\providecommand\hrefurl[2]{\href{#1}{#2}}% to address certain issues around URL recognition with new pdf management code
+\urlstyle{same}% this changes font for \url to the current text font, but it is not recognized by \href.
%%%%%%%% A nomenclature environment, if needed %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -155,7 +151,7 @@
% Increase first optional argument to a dimension > 2em if wide entries cause undesired misalignment of columns.
% Second optional argument can be used to rename the environment, e.g., to List of Symbols.
% Third optional argument selects section-level or chapter-level style for the nomenclature list.
-\newcounter{dummy}% for tagging code
+%\newcounter{dummy}% for tagging code
\NewDocumentEnvironment{nomenclature}{O{2em} O{\nomname} O{section}}{%
\setlength\columnsep{2em}
\setlength{\nomenwidth}{#1}
@@ -316,7 +312,7 @@ By default, \texttt{mitthesis.cls} will load the traditional \LaTeX\ typeface, C
Ten font sets are predefined, including the default set (see Table~\ref{tab:2}). Three work only with \pdfTeX, four work only with unicode engines, and three work with either. These options include a mixture of serif or sans serif text and math fonts, as shown in the table. To access the predefined font sets, you \textit{must} have the directory \texttt{fontsets} as a subdirectory of your working directory, including its files as named. For unicode engines, you must have the relevant fonts installed as system fonts on your computer.
-Among the predefined font sets, Termes and NewTX are serifed typefaces similar to the digital typeface Times New Roman. STIX Two is more similar to the original metal-type Times typeface. Linux Libertine is a serif typeface inspired by 19\textsuperscript{th} century book type. Lucida is a serifed typeface designed for high legibility at small size or on low resolution devices. Lucida is excellent for mathematics and includes a complete bold-face math font, but it is not free. Heros and NewTX-sans are sans-serif text typefaces similar to Helvetica. NewTXsf is a sans-serif math font which draws upon glyphs from the STIX fonts. Fira is a humanist sans-serif text typeface designed in association with the Firefox browser. Finally, Computer Modern (and its extension Latin Modern)---the traditional \LaTeX\ typeface---is a Didone typeface, with high contrast between thick and thin elements.
+Among the predefined font sets, Termes and NewTX are serifed typefaces similar to the digital typeface Times New Roman. STIX Two is more similar to the original metal-type Times typeface. Linux Libertine is a serif typeface inspired by 19\textsuperscript{th} century book type. Lucida is a serifed typeface designed for high legibility at small size or on low resolution devices. Lucida is excellent for mathematics and includes a complete bold-face math font, but it is not free. Heros and NewTX-sans are sans-serif text typefaces similar to Helvetica. NewTXsf is a sans-serif math font which draws upon glyphs from the STIX fonts. Fira is a humanist sans-serif text typeface designed in conjunction with the Firefox operating system. Finally, Computer Modern (and its extension Latin Modern)---the traditional \LaTeX\ typeface---is a Didone typeface, with high contrast between thick and thin elements.
% STIX Two, Termes, and LMR do not include a separate bold math font.
You may also place your own font-set file, say \texttt{Myfontset.tex}, in your working directory, and load it with:
@@ -402,7 +398,7 @@ The \texttt{mitthesis} class loads the \texttt{amsmath} package and its extensio
Specialized packages for many disciplines can be found in \hrefurl{https://ctan.org}{CTAN}. These include subjects like \hrefurl{https://ctan.org/topic/chemistry}{chemistry}, \hrefurl{https://ctan.org/topic/linguistic}{linguistics}, and \hrefurl{https://ctan.org/topic/physics}{physics}. As examples of such packages, the sample thesis template uses the package \texttt{\hrefurl{https://ctan.org/pkg/mhchem}{mhchem}} to set chemical equations and the package \texttt{\hrefurl{https://ctan.org/pkg/listings}{listings}} to list computer code.
-Several packages focus on table and tabular environments. The \texttt{\hrefurl{https://ctan.org/pkg/booktabs}{booktabs}} package, use in the sample thesis template, produces better quality horizontal lines (called \textit{rules}) for separating material in tables. The \texttt{\hrefurl{https://ctan.org/pkg/array}{array}} package (also used) provides additional options for column formats in tabular environments, and the \texttt{\hrefurl{https://ctan.org/pkg/dcolumn}{dcolumn}} package aligns columns of numbers on the decimal separator.
+Several packages focus on table and tabular environments. The \texttt{\hrefurl{https://ctan.org/pkg/booktabs}{booktabs}} package, use in the sample thesis template, produces better quality horizontal lines (called \textit{rules}) for separating material in tables. The \texttt{\hrefurl{https://ctan.org/pkg/array}{array}} package (also used) provides additional options for column formats in tabular environments, the \texttt{\hrefurl{https://ctan.org/pkg/dcolumn}{dcolumn}} package aligns columns of numbers on the decimal separator, and the \texttt{\hrefurl{https://ctan.org/pkg/longtable}{longtable}} package (also used) formats multipage tables with automatic page breaking.
When selecting a package to use, check that it is currently maintained (with relatively recent updates), and compare it to other packages that perform similar functions. Some packages are better than others, and some obsolete packages remain online.
@@ -410,8 +406,7 @@ The packages called by \texttt{mitthesis} are listed in Table~\ref{tab:3} on pag
\begin{table}
\caption{External packages used. For documentation, visit CTAN, \url{https://ctan.org}. Alternatively, if you have \hrefurl{https://www.tug.org/texlive/}{\TeX\ Live} installed, you can open a terminal window and type \texttt{\%\ texdoc package-name}.\label{tab:3}}
-\vskip5pt
-\centering{\small%
+\centering{\footnotesize%
\setlength\extrarowheight{3pt}
\begin{tabular*}{\textwidth}{>{\ttfamily}l<{}@{\extracolsep{\fill}}p{18em} p{22em} }
\\[-5pt]
@@ -419,20 +414,20 @@ The packages called by \texttt{mitthesis} are listed in Table~\ref{tab:3} on pag
Package & Class & User \\
\midrule
bm & defines commands to access bold math symbols (loaded for default fonts) & with \pdfTeX, the command \verb|\bm{..}| produces a bold math symbol \\
-bookmarks& is loaded automatically under the new pdf-management system & customize pdf bookmarks \\
+bookmark & is loaded automatically under the new pdf-management system & customize pdf bookmarks \\
doi & support for hyperlinking DOIs & hyperlink a doi number: \verb|\doi{..}| \\
etoolbox & extend or modify other macros & can use in preamble if needed \\
geometry & set page size and margins & can use \verb|\newgeometry| in \texttt{mydesign.tex}\\
graphicsx& support for inserting images & use to include graphics\\
hyperref & support for hyperlinks and metadata & must complete setup in preamble\\
iftex & check which \LaTeX\ engine is running& macros to check which engine, e.g., \verb|\ifpdftex| \\
-mathtools& loads and extends \texttt{amsmath} & \textbf{many useful math macros available}. See documentation for \texttt{amsmath} and \texttt{mathtools} \\[0.7em]
+mathtools& loads and extends \texttt{amsmath} & \textbf{many useful math macros available}. See documentation for \texttt{amsmath} and \texttt{mathtools} \\
\midrule
hyperxmp & fallback if no \verb|\DocumentMetadata{..}|& ---\\
kvoptions& key values for systems pre 2022/11/01 & ---\\
xparse & for systems older than 2020/10/01 & macros to define new commands\\
\midrule
-lineno & loaded if class option is given & keyvalue \texttt{lineno} will give line numbers; \texttt{lineno} package adds commands to control numbering\\[0.7em]
+lineno & loaded if class option is given & keyvalue \texttt{lineno} will give line numbers; \texttt{lineno} package adds commands to control numbering\\
\midrule
caption & also loaded by \texttt{mydesign.tex} & support for caption styling \\
subcaption & also loaded by \texttt{mydesign.tex} & support for subfigures within figures \\
@@ -441,6 +436,8 @@ xcolor & also loaded by \texttt{mydesign.tex} & support for colors, includi
array & --- & additional options for formatting table columns \\
booktabs & --- & better quality tables, with additional commands \\
dcolumn & --- & align number columns on selectable separators \\
+longtable & --- & multipage tables with automatic page breaking \\
+microtype & --- & typographical refinements: character protrusion, font expansion, letter spacing (tracking), etc. \\
\midrule
babel & --- & if you use multiple languages, load \texttt{babel} in a fontset file before loading fonts \\
biblatex & --- & sample template uses this bibliography tool. Change to \texttt{natbib} if you prefer\\
@@ -465,7 +462,8 @@ When a thesis supervisor has multiple titles (which will not fit on one line), y
\vskip 5pt
\quad\verb|\Supervisor{name}{first title and \\ \> second title}|
\vskip 5pt
-\noindent\textbf{\TeX hackers note:} The signature block is typeset as a \LaTeX\ \texttt{tabbing} environment.
+\noindent The same trick works in the \verb|\Acceptor| command.
+\textbf{\TeX hackers note:} The signature block is typeset as a \LaTeX\ \texttt{tabbing} environment.
\subsection{Overflowing title page: managing space} If your title page overflows the vertical space (from too many authors, degrees, previous degrees, etc.), you can use some or all of the following techniques. The commands must be given before \verb|\maketitle|.
\begin{enumerate}
diff --git a/macros/latex/contrib/mitthesis/mitthesis.cls b/macros/latex/contrib/mitthesis/mitthesis.cls
index 0a3a44310c..a41d201f0e 100644
--- a/macros/latex/contrib/mitthesis/mitthesis.cls
+++ b/macros/latex/contrib/mitthesis/mitthesis.cls
@@ -7,8 +7,8 @@
%% MIT Libraries' requirements as of 2024.
%%
%% This file's version and date:
- \def\versionno{1.14}
- \def\versiondate{2024/07/19\space}
+ \def\versionno{1.16}
+ \def\versiondate{2024/09/06\space}
%%
%% Author: John H. Lienhard, V
%% Department of Mechanical Engineering
@@ -89,6 +89,7 @@
\IfPackageLoadedTF{graphicx}{\define@key{Gin}{alt}{}}{\relax}
}
}
+% Most compatibility commands will be dropped as time goes by ...
%%%%%%%%%%%%%% Options for the class %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -157,22 +158,28 @@
% pdf bookmarks. This is not automatic for \chapter*, which is the format of toc, lof, and lot.
\RequirePackage{etoolbox}% provides \patchcmd
+
\patchcmd{\tableofcontents}{\contentsname}{\pdfbookmark[0]{Table of Contents}{toc}\contentsname}{}{} % placement matters.
-\patchcmd{\listoffigures}{\chapter*{\listfigurename}}{\chapter*{\phantomsection\listfigurename}\addcontentsline{toc}{frontmatter}{\listfigurename}}{}{}
-\patchcmd{\listoftables}{\chapter*{\listtablename}}{\chapter*{\phantomsection\listtablename}\addcontentsline{toc}{frontmatter}{\listtablename}}{}{}
+
+%% Temporary accommodation of latex tagging. Rework once tagging structures have been finalized by LaTeX3 team.
+%% No guarantee that this hack is hierarchically correct.
+%% Current latex-lab places tags around \@schapter, which is harder to deal with here.
+\providecommand*\MakeLinkTarget{\@gobbletwo}
+
+\patchcmd{\listoffigures}{\chapter*{\listfigurename}}{\chapter*{\phantomsection\listfigurename}\MakeLinkTarget[chapter]{}\addcontentsline{toc}{frontmatter}{\listfigurename}}{}{}
+\patchcmd{\listoftables}{\chapter*{\listtablename}}{\chapter*{\phantomsection\listtablename}\MakeLinkTarget[chapter]{}\addcontentsline{toc}{frontmatter}{\listtablename}}{}{}
\NewCommandCopy\l@frontmatter\l@chapter
\NewCommandCopy\l@backmatter\l@chapter
\providecommand*{\toclevel@frontmatter}{0}% prevent warning, see hyperref manual Sec. 13.3
\providecommand*{\toclevel@backmatter}{0}
-%% if you want different formatting for front/back matter, change here (cf. report.cls). This approach preserves tagging hooks.
-\AtBeginDocument{
- \patchcmd{\l@frontmatter}{\bfseries}{\itshape}{}{}
- \patchcmd{\l@frontmatter}{\nobreak\hfil}{\upshape\nobreak\hfil}{}{}
- \patchcmd{\l@frontmatter}{1.0em}{3pt}{}{}
- \patchcmd{\l@backmatter}{\bfseries}{\itshape}{}{}
- \patchcmd{\l@backmatter}{\nobreak\hfil}{\upshape\nobreak\hfil}{}{}
-}
+
+%% if you want different formatting for front/back matter, change here (cf. report.cls).
+\patchcmd{\l@frontmatter}{\bfseries}{\itshape}{}{}
+\patchcmd{\l@frontmatter}{\nobreak\hfil}{\upshape\nobreak\hfil}{}{}
+\patchcmd{\l@frontmatter}{1.0em}{3pt}{}{}
+\patchcmd{\l@backmatter}{\bfseries}{\itshape}{}{}
+\patchcmd{\l@backmatter}{\nobreak\hfil}{\upshape\nobreak\hfil}{}{}
%%%%%%%%%%%%% Geometry, mathtools, graphics, design, fonts, hyperrefs, bookmarks, footnotes %%%%%%%%%%%%%%%%%%%
@@ -294,8 +301,10 @@
%%%%%%%%%%%% PDF bookmark strings %%%%%%%%%%%%%%%%
-%%% Since \bm may be useful in headings, use this fix to reduce frequency with which alternate
-%%% bookmark strings must be given with commands such as \section{ \texorpdfstring{texstring}{pdfstring} }
+%%% By early 2024, \pdfstring removes all robust commands from bookmarks, so that such commands
+%%% don't cause errors; the following pdfstringdisables serve to suppress warnings.
+
+%% \bm may be useful in headings, but let's disable in the associated bookmarks
\pdfstringdefDisableCommands{%
\def\bm#1#{\relax}%
}
@@ -323,7 +332,7 @@
}
%%% Here's a more cumbersome removal of the warning for $ (math shift) in pdfbookmarks.
-%%% Not implementing this by default, since novice authors may benefit from the warning.
+%%% Not implementing this by default, since novice authors may benefit from the warning. :-)
%%% https://tex.stackexchange.com/a/620360/119566
%\let\oldHyPsd@CatcodeWarning\HyPsd@CatcodeWarning
%\renewcommand{\HyPsd@CatcodeWarning}[1]{%
@@ -349,6 +358,10 @@
%%%%%%%%%%%% MACROS FOR HANDLING TITLE AND ABSTRACT PAGES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\AtBeginDocument{
+ \providecommand{\textls}[2][]{#2}% in case microtype is not loaded
+}
+
%%%%%%%%%% Degree Date Module %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\tl_new:N \g__dd_month_tl
@@ -441,11 +454,11 @@
\int_incr:N \l__author_autcrcnt_int
\int_while_do:nNnn { \l__author_autcrcnt_int } < { \g_author_authorcnt_int }
{
- \tl_gput_right:Nx \g__author_ca_tl {,\ \seq_item:cn { g_author_name_seq } { \l__author_autcrcnt_int } }
+ \tl_gput_right:Nx \g__author_ca_tl {,~\seq_item:cn { g_author_name_seq } { \l__author_autcrcnt_int } }
\int_incr:N \l__author_autcrcnt_int
}
\int_compare:nNnT { \l__author_autcrcnt_int } = { \g_author_authorcnt_int } {
- \tl_gput_right:Nx \g__author_ca_tl {\ and\ \seq_item:cn { g_author_name_seq } { \l__author_autcrcnt_int } }
+ \tl_gput_right:Nx \g__author_ca_tl {~and~\seq_item:cn { g_author_name_seq } { \l__author_autcrcnt_int } }
}
\tl_set:Nn \l_tmpa_tl {\tl_item:Nn \g__author_ca_tl {-1} }% get last token
\str_case_e:nnT
@@ -453,6 +466,7 @@
{ {.}{} }
{ \__copyright_remove_period:N { \g__author_ca_tl } }% remove last token if it is a period
\__author_pdfcopyrightauthor:
+ \cs_gset:Npe \@author { \tl_use:N \g__author_ca_tl }% 2024/08/06
}
\cs_new:Nn \__copyright_remove_period:N
{
@@ -465,11 +479,11 @@
\int_until_do:nNnn { \l_tmpa_int } = { \g_author_authorcnt_int }
{
\int_incr:N \l_tmpa_int
- \tl_gput_right:Nx \g__author_pdfca_tl {,\ { \seq_item:cn { g_author_name_seq } { \l_tmpa_int } } }
- }
+ \tl_gput_right:Nx \g__author_pdfca_tl {;\ { \seq_item:cn { g_author_name_seq } { \l_tmpa_int } } }
+ % changed comma to semicolon for consistency with Dublin Core metadata format, 2024/08/30
+ }
}
-
\tl_new:N \g__author_namesize_tl
\tl_gset:Nn \g__author_namesize_tl { \large }
\cs_new:Nn \__author_block: {
@@ -722,10 +736,10 @@
\ of}
\par
\int_until_do:nNnn { \l__degree_degreeno_int } = { \g_degree_degreecnt_int } {
- \text_uppercase:n {\seq_item:cn { g_degree_name_seq } { \l__degree_degreeno_int }}\par and\par
+ \textls[60]{\text_uppercase:n {\seq_item:cn { g_degree_name_seq } { \l__degree_degreeno_int }}}\par and\par
\int_incr:N \l__degree_degreeno_int
}
- \text_uppercase:n {\seq_item:cn { g_degree_name_seq } { \l__degree_degreeno_int }}\par
+ \textls[60]{\text_uppercase:n {\seq_item:cn { g_degree_name_seq } { \l__degree_degreeno_int }}}\par
}
\msg_new:nnnn { \ClassName } { no_degree }
{ Missing\ degree!\ You\ must\ issue\ the\ \Degree{name}{department}\ command. }{
@@ -750,10 +764,10 @@
\ of}
\par\medskip
\int_until_do:nNnn { \l__degree_degreeno_int } = { \g_degree_degreecnt_int } {
- \text_uppercase:n {\seq_item:cn { g_degree_name_seq } { \l__degree_degreeno_int }}\par and\par
+ \textls[60]{\text_uppercase:n {\seq_item:cn { g_degree_name_seq } { \l__degree_degreeno_int }}}\par and\par
\int_incr:N \l__degree_degreeno_int
}
- \text_uppercase:n {\seq_item:cn { g_degree_name_seq } { \l__degree_degreeno_int }}\par\medskip
+ \textls[60]{\text_uppercase:n {\seq_item:cn { g_degree_name_seq } { \l__degree_degreeno_int }}}\par\medskip
}
%%%%%%%%%% End Degree Module %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -890,6 +904,7 @@
\RenewDocumentCommand{\title}{m}
{
\__mitthesis_title:n { #1 }
+ \cs_gset:Npe \@title { \tl_use:N \g_mitthesis_title_tl } % 2024/08/06
\hypersetup{
pdftitle={\g_mitthesis_title_tl},
}
@@ -967,12 +982,12 @@
{\Large\textbf{\g_mitthesis_title_tl}
%\phantomsection\addcontentsline{toc}{chapter}{Title\ page}
\par}
- \__titlepage_blockskip:nn {12}{1.5}% new idea
+ \__titlepage_blockskip:nn {12}{1.5}
\__author_block:
\__titlepage_blockskip:nn {12}{1.5}
\__degree_block:
- at\ the\par
- \text_uppercase:n { \g_titlepage_institution_name_tl }\par
+ at~the\par
+ \textls[60]{\text_uppercase:n { \g_titlepage_institution_name_tl }}\par
\DegreeMonth\ \DegreeYear\par
\__titlepage_blockskip:nn {12}{2}
\copyright\space\DegreeYear\space\CopyrightAuthor\@.\c_space_token \g_copyright_copyrightlicencse_tl % \@. in case name ends with III, IV, V,...
diff --git a/macros/latex/contrib/mlacls/mla-example.pdf b/macros/latex/contrib/mlacls/mla-example.pdf
index de61b592bf..560e110b66 100644
--- a/macros/latex/contrib/mlacls/mla-example.pdf
+++ b/macros/latex/contrib/mlacls/mla-example.pdf
Binary files differ
diff --git a/macros/latex/contrib/mlacls/mla.dtx b/macros/latex/contrib/mlacls/mla.dtx
index 807a073ed1..b957b75bbb 100644
--- a/macros/latex/contrib/mlacls/mla.dtx
+++ b/macros/latex/contrib/mlacls/mla.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright 2019 Seth Price.
+% Copyright 2019 Seth M. Price.
%
% This file may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
@@ -27,7 +27,7 @@
%<mla>\NeedsTeXFormat{LaTeX2e}
%<mla>\ProvidesClass{mla}
%<*mla>
- [2021/09/14 v1.0 MLA Paper Class]
+ [2024/09/13 v1.1 MLA Paper Class]
%</mla>
%<*driver>
@@ -80,7 +80,11 @@
\addbibresource{mla.bib}
%% Just thought it'd be cool to use `acro'
-\usepackage{acro}
+%% (though v3.6 seems to have broken everything)
+\ExplSyntaxOn
+\prop_new:N \l__acro_foreign_format_prop
+\ExplSyntaxOff
+\usepackage{acro2}
\DeclareAcronym{US}{short=US,long=United States}
\DeclareAcronym{MLA}{short=MLA,long=Modern Language Association}
\DeclareAcronym{CTAN}{short=CTAN,
@@ -109,11 +113,12 @@
\usepackage{microtype}
%% Fancy PDF
-\usepackage[hidelinks]{hyperref}
+\usepackage[numbered]{hypdoc}
\hypersetup{
+ hidelinks,
pdfinfo={
Title=The MLA class,
- Author=Seth Price,
+ Author=Seth M. Price,
Creator=LaTeX
}
}
@@ -131,7 +136,7 @@
%
% \fi
%
-% \CheckSum{401}
+% \CheckSum{430}
%
% \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
@@ -151,7 +156,7 @@
%
% \title{The \Dcls{mla} class\thanks{This document corresponds to
% \Dcls{mla}~\fileversion, dated \filedate.}}
-% \author{Seth Price \\ \href{mailto:\myemail}{\texttt{\myemail}}}
+% \author{Seth M.\ Price \\ \href{mailto:\myemail}{\texttt{\myemail}}}
% \date{\today}
%
% \maketitle
@@ -241,6 +246,7 @@
% \begin{macro}{\MLA@pageheader}
% \begin{macro}{\MLA@plainheadings}
% \begin{macro}{\MLA@fullpage}
+% \begin{macro}{\MLA@times}
% The following are true/false switches to toggle certain features.
%
% \begin{macrocode}
@@ -254,6 +260,7 @@
\newif\ifMLA@pageheader
\newif\ifMLA@plainheadings
\newif\ifMLA@fullpage
+\newif\ifMLA@times
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -265,6 +272,7 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \section{Options}
% \label{sec:options}
@@ -297,7 +305,7 @@
\DeclareOption{mla8alt}{\MLA@sevenfalse\MLA@eightfalse\MLA@eightalttrue}
% \end{macrocode}
%
-% For those who do not plan on using figures and/or footnotes,
+% For those who do not plan on using figures and/or endnotes,
% some time (and dependency disk space) might be saved by using the
% \Dopt{nofigures} and/or \Dopt{nonotes} options, as they are enabled
% by default.
@@ -352,6 +360,16 @@
\DeclareOption{fullpage}{\MLA@fullpagetrue}
% \end{macrocode}
%
+% \changes{v1.1}{2024/02/04}{Added \Dopt{notimes} option to not set Times New
+% Roman as the font}
+% For professors that do not require Times New Roman as the font, the
+% \Dopt{notimes} option may be used to keep the default font. This allows
+% maintaining \LaTeX{}'s default font if desired.
+% \begin{macrocode}
+\MLA@timestrue
+\DeclareOption{notimes}{\MLA@timesfalse}
+% \end{macrocode}
+%
% \subsection{Processing}
% \label{sec:processing}
%
@@ -397,7 +415,6 @@
\RequirePackage{fancyhdr}
\RequirePackage{fullpage}
\RequirePackage{ragged2e}
-\RequirePackage{newtxtext}
\RequirePackage{titlesec}
\RequirePackage{xstring}
% \end{macrocode}
@@ -454,6 +471,14 @@
\fi
% \end{macrocode}
%
+% And the \Dpkg{newtxtext} package can be disabled with \Dopt{notimes}.
+%
+% \begin{macrocode}
+\ifMLA@times
+ \RequirePackage{newtxtext}
+\fi
+% \end{macrocode}
+%
% The \Dpkg{microtype} package is loaded if the \Dopt{microtype}
% option is specified.
%
@@ -477,11 +502,12 @@
% \subsection{Font}
% \label{sec:font}
%
-% The \Dpkg{newtxtext} package was already loaded in
-% section~\ref{sec:loading_packages},
-% and the font was set to 12pt when loading the \Dcls{article} class
+% The font size was set to 12pt when loading the \Dcls{article} class
% in section~\ref{sec:initial_code}.
-% This should be metric-compatible with the infamous Times New Roman,
+% Unless the option \Dopt{notimes} was specified,
+% the \Dpkg{newtxtext} package will have been loaded in
+% section~\ref{sec:loading_packages},
+% which should be metric-compatible with the infamous Times New Roman,
% the \foreign{de facto} standard of the
% \ac{MLA} format\footnote{According to the popular, oft-referenced
% \ac{OWL}: \citeurl{owlmla}.}.
@@ -837,6 +863,28 @@
% \end{environment}
% \end{environment}
%
+% \changes{v1.1}{2024/09/12}{Modify footnotes to be more in-style}
+% \subsection{Footnotes}
+% \label{sec:footnotes}
+%
+% Footnotes are styled similarly to endnotes (see section \ref{sec:endnotes}),
+% but in smaller text, and glued to the bottom of the page.
+%
+% \begin{macrocode}
+\addtolength{\skip\footins}{1pc}
+\renewcommand{\footnoterule}{%
+ \vfill
+ \kern -3pt\hrule width 0.4\columnwidth
+ \vskip 6pt
+}
+\renewcommand{\@makefnmark}{\@thefnmark}
+\renewcommand{\@makefntext}[1]{%
+ \leftskip 0.5in
+ \parindent -0.5in
+ \@makefnmark.~#1
+}
+% \end{macrocode}
+%
% \subsection{Block quotation}
% \label{sec:block_quoatation}
%
@@ -1015,6 +1063,8 @@
\fi
% \end{macrocode}
%
+% See section \ref{sec:footnotes} for footnotes.
+%
% \subsubsection{Bibliography}
% \label{sec:bibliography}
%
diff --git a/macros/latex/contrib/mlacls/mla.pdf b/macros/latex/contrib/mlacls/mla.pdf
index 937392ba70..6849a5c61c 100644
--- a/macros/latex/contrib/mlacls/mla.pdf
+++ b/macros/latex/contrib/mlacls/mla.pdf
Binary files differ
diff --git a/macros/latex/contrib/naive-ebnf/README.md b/macros/latex/contrib/naive-ebnf/README.md
index 6e02dfc45c..27852bc9f8 100644
--- a/macros/latex/contrib/naive-ebnf/README.md
+++ b/macros/latex/contrib/naive-ebnf/README.md
@@ -1,12 +1,13 @@
+# EBNF Diagrams in LaTeX
+
[![l3build](https://github.com/yegor256/naive-ebnf/actions/workflows/l3build.yml/badge.svg)](https://github.com/yegor256/naive-ebnf/actions/workflows/l3build.yml)
[![CTAN](https://img.shields.io/ctan/v/naive-ebnf)](https://ctan.org/pkg/naive-ebnf)
[![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/yegor256/naive-ebnf/blob/master/LICENSE.txt)
-This LaTeX package helps you typeset an
-[Extended Backus-Naur Form](https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form) (EBNF)
-using plain text format.
+This LaTeX package helps you typeset an [Extended Backus-Naur Form][EBNF]
+(EBNF) using plain text format.
-First, [install it](https://en.wikibooks.org/wiki/LaTeX/Installing_Extra_Packages)
+First, [install it][LaTeX]
from [CTAN](https://ctan.org/pkg/naive-ebnf)
and then use in the preamble:
@@ -22,12 +23,16 @@ and then use in the preamble:
\end{document}
```
-Otherwise, you can download [`naive-ebnf.sty`](https://raw.githubusercontent.com/yegor256/naive-ebnf/gh-pages/naive-ebnf/naive-ebnf.sty) and add to your project.
+Otherwise, you can download [`naive-ebnf.sty`][sty] and add to your project.
## How to Contribute
-If you want to contribute yourself, make a fork, then create a branch,
+If you want to contribute yourself, make a fork, then create a branch,
then run `l3build ctan` in the root directory.
It should compile everything without errors. If not, submit an issue and wait.
Otherwise, make your changes and then run `l3build ctan` again. If the build is
still clean, submit a pull request.
+
+[EBNF]: https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form
+[LaTeX]: https://en.wikibooks.org/wiki/LaTeX/Installing_Extra_Packages
+[sty]: https://raw.githubusercontent.com/yegor256/naive-ebnf/gh-pages/naive-ebnf/naive-ebnf.sty
diff --git a/macros/latex/contrib/naive-ebnf/naive-ebnf.dtx b/macros/latex/contrib/naive-ebnf/naive-ebnf.dtx
index 6886393d88..0a7b7e39bd 100644
--- a/macros/latex/contrib/naive-ebnf/naive-ebnf.dtx
+++ b/macros/latex/contrib/naive-ebnf/naive-ebnf.dtx
@@ -50,7 +50,7 @@
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{naive-ebnf}
%<*package>
-[2023-08-11 0.0.15 EBNF in Plain Text]
+[2024/09/06 0.0.16 EBNF in Plain Text]
%</package>
%<*driver>
\documentclass{ltxdoc}
@@ -113,6 +113,7 @@
% \item |[...]| denotes an optional substitution;
% \item |{...}| denotes a zero or more times repetition;
% \item |{...}+| denotes one or more times repetition;
+% \item \texttt{\char`\|\char`\|\char`\|} denotes an indent at the beginning of the string.
% \item \texttt{\char`\|\char`\|} denotes an indented vertical bar at the beginning of the string.
% \end{itemize}
@@ -235,6 +236,22 @@
% \end{document}
% \end{docshot}
+
+% The \texttt{\char`\|\char`\|\char`\|} character allows indenting the text on a new line, allowing breaking long expressions:
+% \docshotOptions{firstline=5,lastline=11}
+% \begin{docshot}
+% \documentclass{minimal}
+% \usepackage[T1]{fontenc}
+% \usepackage{naive-ebnf}
+% \begin{document}
+% \begin{ebnf}
+% <x> := "beginning" \\
+% ||| ( <y> | <z> ) \\
+% ||| "ending" \\
+% \end{ebnf}
+% \end{document}
+% \end{docshot}
+
% \section{Package Options}
% It's possible to configure the behavior of the package with the help of a few package options:
@@ -407,6 +424,8 @@
{ >([^\s]) } {\\textgreater{}\1} \ebnf_tmp%
\regex_replace_all:nnN
{ ([^\s])'([^\s]) } {\1\\textquotesingle{}\2} \ebnf_tmp%
+ \regex_replace_all:nnN { \|\|\| }%
+ {\c{makebox}[#1][r]{ }} \ebnf_tmp%
\regex_replace_all:nnN
{ ([^\s])\|([^\s]) } {\1\\textbar{}\2} \ebnf_tmp%
%
diff --git a/macros/latex/contrib/naive-ebnf/naive-ebnf.pdf b/macros/latex/contrib/naive-ebnf/naive-ebnf.pdf
index 4d7e89803d..6b65d1f271 100644
--- a/macros/latex/contrib/naive-ebnf/naive-ebnf.pdf
+++ b/macros/latex/contrib/naive-ebnf/naive-ebnf.pdf
Binary files differ
diff --git a/macros/latex/contrib/nfssext-cfr/README b/macros/latex/contrib/nfssext-cfr/README
deleted file mode 100644
index 5a59f6bf04..0000000000
--- a/macros/latex/contrib/nfssext-cfr/README
+++ /dev/null
@@ -1,26 +0,0 @@
-nfssext-cfr.sty is an extension of Philipp Lehman's nfssext.sty. nfssext.sty
-provides commands which enable one to specify font features not covered by
-the New Font Selection Scheme of LaTeX-2e. nfssext-cfr.sty provides
-additional commands, further extending the facilities offered by NFSS.
-
-nfssext-cfr.sty is required by various font support packages I've written.
-It is being released separately to avoid unnecessary duplication and
-confusion. At least, I hope it will remove at least one source of unnecessary
-confusion. I have no reason to think it will avoid any of the others.
-
-The code is somewhat experimental. It works for me. So far. If you discover
-problems, please let me know. If you know how to fix them, even better.
-
-The 2010 update includes an attempt to improve the behaviour of \ofstyle, and to
-add support for microtype. I didn't publish this at the time because I wanted
-to test it first. I have just discovered that I am still using a local copy.
-Insofar as one person can test something, I figure that 5 years ought to be
-enough to pick up the most obvious problems. However, your kilometres may, as
-always, vary.
-
-There should be no changes for the end user except that in certain cases it is
-possible that line-breaks may be altered if microtype is in use due to the
-enhanced support included for variant font families.
-
-- Clea F. Rees (ReesC21 <at> cardiff <dot> ac <dot> uk)
-2017/03/28
diff --git a/macros/latex/contrib/nfssext-cfr/README.md b/macros/latex/contrib/nfssext-cfr/README.md
new file mode 100644
index 0000000000..66c1c18770
--- /dev/null
+++ b/macros/latex/contrib/nfssext-cfr/README.md
@@ -0,0 +1,114 @@
+$Id: README.md 10366 2024-09-18 14:25:21Z cfrees $
+
+=================================================
+# nfssext-cfr
+=================================================
+
+Additions and changes Copyright (C) 2008-2024 Clea F. Rees.
+Code from The Font Installation Guide Copyright (C) 2002-2004 Philipp Lehman
+(see below)
+
+This work may be distributed and/or modified under the conditions of the
+LaTeX Project Public License, either version 1.3c of this license or (at your
+option) any later version. The latest version of this license is in
+ https://www.latex-project.org/lppl.txt
+and version 1.3c or later is part of all distributions of LaTeX version
+2008-05-04 or later.
+
+This work has the LPPL maintenance status `maintained'.
+
+The Current Maintainer of this work is Clea F. Rees.
+
+This work consists of all files listed in manifest.txt.
+
+
+The files nfssext-cfr.sty, nfssext-cfr-nfss.sty and nfssext-cfr-nnfss.sty are
+derived works under the terms of the LPPL. They are based on version 1.2 of
+nfssext.sty which was supplied with fontinstallationguide by Philipp Lehman.
+A copy of fontinstallationguide, including an unmodified version of
+nfssext.sty is available from
+ https://tug.ctan.org/pkg/fontinstallationguide.
+nfssext.sty wajs part of the included archive figuide-examples.tar.gz which
+consisted of examples and templates released under the LPPL. nfssext.sty was
+included in the files for tutorials 3, 5 and 6.
+
+The main modifications made to this file are described in nfssext-cfr.dtx.
+
+
+In versions which use docstrip, the docstrip files nfssext-cfr.ins,
+nfssext-cfr.dtx, nfssext-cfr-t1.dtx and nfssext-cfr-t1.ins are derived
+from skeleton.ins and skeleton.dtx, both part of of version 2.4 of Scott
+Pakin's dtxtut. A copy of dtxtut including unmodified copies of skeleton.dtx
+and skeleton ins is available from https://www.ctan.org/pkg/dtxtut and
+released under the LPPL.
+
+Other attributions are included in the source of the package itself.
+
+=================================================
+## Origins & Purpose
+=================================================
+
+nfssext-cfr is an extension of Philipp Lehman's nfssext. nfssext
+provides commands which enable one to specify font features not covered by
+the New Font Selection Scheme of LaTeX-2e. nfssext-cfr provides
+additional commands, further extending the facilities offered by NFSS.
+
+nfssext-cfr is required by various font support packages I've written.
+It is released separately both to avoid unnecessary duplication and
+confusion and to make it available for other purposes.
+
+=================================================
+## Revision History
+=================================================
+
+Please see nfssext-cfr.pdf and nfssext-cfr.dtx.
+
+=================================================
+## Current Version
+=================================================
+
+The current version is an extremely belated update for compatibility with
+the (New) New Font Selection Scheme (NNFSS) introduced in 2020. This has
+somewhat complicated things in various ways and the current version may best
+be described as a compromise which will please nobody equally.
+
+The package includes three .sty files. The main package is a wrapper which
+decides which of the other two to load, together with a small amount of common
+code.
+
+The documentation explains changes required in font definition files for
+backwards compatibility and the options users have if reliant on files which
+have not been updated. No additional incompabilities should be introduced by
+the update to nfssext-cfr. At worst, things which were broken in 2020 will
+remain broken, but breakage which can be fixed in this package _should_ be
+fixed.
+
+nfssext-cfr interferes with kernel code in various ways. This is nothing new.
+nfssext rewrote kernel definitions. nfssext-cfr rewrote kernel definitions.
+The new version of nfssext-cfr rewrites kernel definitions. Details of what is
+done under what conditions are included in the documentation.
+
+=================================================
+## Code Repositories
+=================================================
+
+Code for the LaTeX support package is hosted at
+ https://codeberg.org/cfr/nfssext
+For convenience, the repository is mirrored at
+ https://github.com/cfr42/nfssext
+
+=================================================
+## Contact Details
+=================================================
+
+Bug reports, feature requests etc. concerning the LaTeX support or packaging
+should be filed at
+ https://codeberg.org/cfr/nfssext/issues
+
+
+Clea F. Rees
+Version 1.0
+2024-09-18
+
+=================================================
+vim: et:tw=80:sw=2:
diff --git a/macros/latex/contrib/nfssext-cfr/manifest.txt b/macros/latex/contrib/nfssext-cfr/manifest.txt
new file mode 100644
index 0000000000..6d7b8ab324
--- /dev/null
+++ b/macros/latex/contrib/nfssext-cfr/manifest.txt
@@ -0,0 +1,71 @@
+# Manifest for nfssext-cfr
+
+Copyright (C) 2008-2024 Clea F. Rees
+
+This work may be distributed and/or modified under the conditions of the LaTeX
+Project Public License, either version 1.3c of this license or (at your option)
+any later version. The latest version of this license is in
+ https://www.latex-project.org/lppl.txt
+and version 1.3 or later is part of all distributions of LaTeX version
+2008-05-04 or later.
+
+This work has the LPPL maintenance status `maintained'.
+
+The Current Maintainer of this work is Clea F. Rees.
+
+This work consists of all files listed in manifest.txt.
+
+This file was automatically generated by `l3build manifest`.
+
+## Source files
+
+
+### Package files
+
+
+* manifest.txt
+* README.md
+* nfssext-cfr.dtx
+* nfssext-cfr.ins
+
+### Development files
+
+
+* build.lua
+* manifest.lua
+* tag.lua
+* ot1cmrw.fd
+* ot1cmrj.fd
+* ot1cmr2j.fd
+* ot1cmr1.fd
+* ot1cmr0.fd
+* ot1cmr-mod.fd
+* ot1cmr2.fd
+* ot1cmr2dj.fd
+* nfssext-cfr-t1-fam.tlg
+* nfssext-cfr-t1-series.tlg
+* nfssext-cfr-t1-shape.tlg
+* nfssext-cfr-t1.dtx
+* nfssext-cfr-t1.ins
+
+
+## Derived files
+
+
+### Package files
+
+* nfssext-cfr-nfss.sty
+* nfssext-cfr-nnfss.sty
+* nfssext-cfr.sty
+
+### Development files
+
+* nfssext-cfr-t1-fam.lvt
+* nfssext-cfr-t1-series.lvt
+* nfssext-cfr-t1-shape.lvt
+* nfssext-cfr-t1-splitter.lvt
+* nfssext-cfr-t1-splitter.lve
+
+### Typeset documentation
+
+* nfssext-cfr.pdf
diff --git a/macros/latex/contrib/nfssext-cfr/nfssext-cfr.dtx b/macros/latex/contrib/nfssext-cfr/nfssext-cfr.dtx
new file mode 100644
index 0000000000..723f108284
--- /dev/null
+++ b/macros/latex/contrib/nfssext-cfr/nfssext-cfr.dtx
@@ -0,0 +1,3334 @@
+% \iffalse meta-comment
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% nfssext-cfr.dtx
+% Additions and changes Copyright (C) 2008-2024 Clea F. Rees.
+% Code from skeleton.dtx Copyright (C) 2015-2024 Scott Pakin (see below).
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% https://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2008-05-04 or later.
+%
+% This work has the LPPL maintenance status 'muaintained'.
+%
+% The Current Maintainer of this work is Clea F. Rees.
+%
+% This work consists of all files listed in manifest.txt.
+%
+% The file nfssext-cfr.dtx is a derived work under the terms of the
+% LPPL. It is based on version 2.4 of skeleton.dtx which is part of
+% dtxtut by Scott Pakin. A copy of dtxtut, including the
+% unmodified version of skeleton.dtx is available from
+% https://www.ctan.org/pkg/dtxtut and released under the LPPL.
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \fi
+%
+% \iffalse
+%<*driver>
+\RequirePackage{svn-prov}
+% ^^A \def\MakePrivateLetters{\makeatletter\ExplSyntaxOn\endlinechar13}
+% ^^A \def\MyMakePrivateLetters{\makeatletter\ExplSyntaxOn\endlinechar13}
+\ExplSyntaxOn
+% ^^A sylwad yannisl: https://tex.stackexchange.com/questions/723293/how-can-i-get-automatic-code-indexing-of-expl3-in-ltxdoc/723294#comment1799661_723294
+% ^^A \ExplSyntaxOn \cs_gset:Npn \MakePrivateLetters { \char_set_catcode_letter:N \@ \char_set_catcode_letter:N _ \char_set_catcode_letter:N \: } \ExplSyntaxOff`
+\cs_new_nopar:Npn \MyMakePrivateLetters
+{
+ \char_set_catcode_letter:N \@
+ \char_set_catcode_letter:N _
+ \char_set_catcode_letter:N \:
+}
+\ExplSyntaxOff
+\ProvidesFileSVN{$Id: nfssext-cfr.dtx 10366 2024-09-18 14:25:21Z cfrees $}[v1.0 \revinfo][\filebase DTX: Extended font selection for NFSS and NNFSS]
+\DefineFileInfoSVN[nfssext-cfr]
+\documentclass[10pt,british]{ltxdoc}
+% l3doc loads fancyvrb
+% fancyvrb overwrites svn-prov's macros without warning
+% restore \fileversion \filerev in case we're using l3doc
+\GetFileInfoSVN{nfssext-cfr}
+\usepackage[debug]{nfssext-cfr}
+\usepackage[rm={prop,osf},sf={prop,osf},tt={mono,tab,lf}]{cfr-lm}
+\EnableCrossrefs
+\CodelineIndex
+\RecordChanges
+\DoNotIndex{\verb,\ProvidesPackageSVN,\NeedsTeXFormat,\ProcessKeyOptions}
+\usepackage{babel}
+\usepackage{fancyhdr}
+% \usepackage[plain]{fancyref}
+\usepackage{fixfoot}
+\usepackage{array}
+\usepackage{tabularx}
+\usepackage{longtable}
+\usepackage{booktabs}
+\usepackage{multirow}
+\usepackage[inline]{enumitem}
+\usepackage[referable]{threeparttablex}
+\makeatletter
+\def\TPT@measurement{% ateb David Carlisle: https://tex.stackexchange.com/a/370691/
+ \ifdim\wd\@tempboxb<\TPTminimum
+ \hsize \TPTminimum
+ \else
+ \hsize\wd\@tempboxb
+ \fi
+ \xdef\TPT@hsize{\hsize\the\hsize \noexpand\@parboxrestore}\TPT@hsize
+ \ifx\TPT@docapt\@undefined\else
+ \TPT@docapt \vskip.2\baselineskip
+ \fi \par
+ \dimen@\dp\@tempboxb % new
+ \box\@tempboxb
+ \ifvmode \prevdepth\dimen@ \fi% was \z@ not \dimen@
+}
+\renewlist{tablenotes}{enumerate}{1}
+\setlist[tablenotes]{label=\tnote{\sffamily\alph*},ref=\alph*,itemsep=\z@,topsep=\z@skip,partopsep=\z@skip,parsep=\z@,itemindent=\z@,labelindent=\tabcolsep,labelsep=.2em,leftmargin=*,align=left,before={\unskip\medskip\rmfamily\lstyle\footnotesize}}
+\makeatother
+\usepackage{xcolor}
+\usepackage{xurl}
+\urlstyle{sf}
+\usepackage{microtype}
+%^^A \usepackage[a4paper,headheight=14pt,marginparwidth=45mm,hmarginratio=4:1,vscale=.8,hscale=.7,verbose]{geometry} % use 14pt for 11pt text, 15pt for 12pt text
+%^^A \usepackage[a4paper,headheight=14pt,vscale=.8,hscale=.7,verbose,showframe]{geometry} % use 14pt for 11pt text, 15pt for 12pt text
+%^^A \usepackage[verbose,showframe,marginparwidth=130pt,a4paper,includemp,hscale=0.8]{geometry}
+% addaswyd o chronos.tex
+\newlength\tewadjust
+\newlength\chronosdoctemplgth
+\AddToHook {begindocument/after}[.]
+{%
+ \setlength\tewadjust{\marginparwidth+\marginparsep-\paperwidth+\textwidth+\oddsidemargin+1in}%
+ \setlength\chronosdoctemplgth{0pt}%
+}
+\usepackage{csquotes}
+\MakeAutoQuote{‘}{’}
+\MakeAutoQuote*{“}{”}
+\usepackage{caption}
+\DeclareCaptionFont{lf}{\sffamily\lstyle}
+\captionsetup[table]{labelfont=lf}
+% sicrhau hyperindex=false: llwytho CYN bookmark
+\usepackage{hypdoc}% ateb Ulrike Fischer: https://tex.stackexchange.com/a/695555/
+\usepackage{bookmark}
+\hypersetup{%
+ colorlinks=true,
+ citecolor={moss},
+ extension=pdf,
+ linkcolor={strawberry},
+ linktocpage=true,
+ pdfcreator={TeX},
+ pdfproducer={pdfeTeX},
+ urlcolor={blueberry}%
+}
+\NewDocElement[%
+ idxtype=opt.,
+ idxgroup=options,
+ printtype=\textit{opt.},
+]{Opt}{option}
+\NewDocElement[%
+ idxtype=pkg.,
+ idxgroup=,
+ printtype=\textit{pkg.},
+]{Pkg}{package}
+\NewDocElement[%
+ printtype=\textdagger,
+ idxtype=,
+ idxgroup=,
+ macrolike,
+]{DMacro}{dmacro}
+\NewDocumentCommand \val { m }
+{%
+ {\ttfamily =\,\meta{#1}}%
+}
+\ExplSyntaxOn
+\NewDocumentCommand \vals { m }
+{
+ {
+ \ttfamily = \,
+ \clist_use:nn { #1 } { \textbar }
+ }
+}
+\keys_define:nn { clm / doc }
+{
+ unknown .code:n = {
+ \cs_if_free:cT { \l_keys_key_str }
+ {
+ \tl_gset:cn { \l_keys_key_str } { #1 }
+ }
+ },
+}
+\NewDocumentCommand \clmdocset { +m }
+{
+ \keys_set:nn { clm / doc } { #1 }
+}
+\ExplSyntaxOff
+\clmdocset{%
+ bug={\href{https://codeberg.org/cfr/nfssext/issues}{\textsc{bugtracker}}},
+ codeberg={\href{https://codeberg.org/cfr/nfssext}{\textsc{codeberg}}},
+ github={\href{https://github.com/cfr42/nfssext}{\textsc{github}}},
+ ctan={\href{https://ctan.org/}{\textsc{ctan}}},
+}
+\AddToHook {env/threeparttable/begin} {\typeout{Bagpuss}\sffamily}
+\usepackage{cleveref}
+\newcommand*{\gust}{\textsc{Gust}}
+\newcommand*{\lpack}[1]{\textsf{#1}}
+\newcommand*{\fgroup}[1]{\textsf{#1}}
+\newcommand*{\fname}[1]{\textsf{#1}}
+\newcommand*{\file}[1]{\texttt{#1}}
+\newcommand*{\mail}[1]{\texttt{#1}}
+% \newcommand*{\pkg}[1]{\mbox{\textsf{#1}}}
+\newcommand* \nfss {\textsc{nfss}}
+\newcommand* \nnfss {\textsc{nnfss}}
+\newcommand* \svn {\textsc{svn}}
+\title{\filebase}
+\author{Clea F. Rees\thanks{%
+ Bug tracker:
+ \href{https://codeberg.org/cfr/nfssext/issues}{\url{codeberg.org/cfr/nfssext/issues}}
+ \textbar{} Code:
+ \href{https://codeberg.org/cfr/nfssext}{\url{codeberg.org/cfr/nfssext}}
+ \textbar{} Mirror:
+ \href{https://github.com/cfr42/nfssext}{\url{github.com/cfr42/nfssext}}%
+}}
+% \date{\fileversion~\filetoday}
+\date{\fileversion~\filedate}
+\pagestyle{fancy}
+\fancyhf{}
+\def\exfsdocffont{\itshape\plstyle\footnotesize}
+\def\exfsdochfont{\itshape\plstyle}
+%^^A \fancyhf[rh]{\itshape\plstyle\leftmark}
+%^^A \fancyhf[lh]{\sffamily\plstyle\leftmark}
+\fancyhf[rh]{\exfsdochfont\thepage}
+\fancyhf[rf]{\exfsdocffont\fileversion}
+% ^^A \fancyhf[rh]{\itshape\filetoday}
+% ^^A \fancyhf[ch]{\itshape Support for Latin Modern}
+% ^^A\fancyhf[lf]{\itshape\fileversion}
+%^^A \fancyhf[cf]{\itshape\plstyle--- \thepage~/~\lastpage{} ---}
+% ref. fancyhdr (or see tc3 ref'd there?)
+\renewcommand \sectionmark[1]{\markboth{\thesection{} #1}{}}
+\renewcommand \subsectionmark[1]{\markright{\arabic{subsection} #1}}
+\ExplSyntaxOn
+\fancyhf[lh]{\exfsdochfont\rlap{\nouppercase{\leftmark}}\skip_horizontal:n { \g__exfs_doc_offset_dim }\nouppercase{\rightmark}}
+%^^A \fancyhf[lf]{\exfsdocffont\rlap{\filebase}\skip_horizontal:n { \g__exfs_doc_offset_dim }\fileversion }
+\fancyhf[lf]{\exfsdocffont\filebase }
+\hook_gput_code:nnn {shipout/lastpage} {.}
+{
+ \property_record:nn {t:lastpage}{abspage,page,pagenum}
+}
+\cs_new_protected_nopar:Npn \lastpage
+{
+ \property_ref:nn {t:lastpage}{page}
+}
+\cs_new_eq:NN \OrigMakePrivateLetters \MakePrivateLetters
+\dim_new:N \g__exfs_doc_offset_dim
+\hook_gput_code:nnn { begindocument } {.}
+{
+ \dim_gset:Nn \g__exfs_doc_offset_dim { \marginparwidth + \marginparsep }
+ \fancyheadoffset[lh,lf]{ \g__exfs_doc_offset_dim }
+}
+\ExplSyntaxOff
+\makeatletter
+\def\@xobeysp{\leavevmode\penalty100\ }
+\makeatother
+\definecolor{strawberry}{rgb}{1.000,0.000,0.502}
+\definecolor{blueberry}{rgb}{0.000,0.000,1.000}
+\definecolor{moss}{rgb}{0.000,0.502,0.251}
+\begin{document}
+\let\MakePrivateLetters\MyMakePrivateLetters
+\DocInput{\filename}
+\end{document}
+%</driver>
+% \fi
+%
+% \changes{2008-10-26}{2008/10/26}{First public release as part of \lpack{cfr-lm}.}
+% \changes{2008-12-22}{2008/12/22}{Updated version released standalone.}
+% \changes{\svn 6140}{2017/03/28}{%
+% Fixes a bug which prevented \cs{tmstyle} and \cs{tvstyle} working correctly if the current font was not a serif family.
+% (Especially problematic in Beamer where \cs{normalfont} cannot be used as a workaround, but annoying elsewhere.)}
+%
+% \changes{\svn 6140}{2017/03/28}{%
+% Provides something a bit closer to real documentation.%
+% }
+%
+% \maketitle\thispagestyle{empty}
+% \pdfinfo{%
+% /Creator (TeX)
+% /Producer (pdfTeX)
+% /Author (Clea F.\ Rees)
+% /Title (nfssext-cfr)
+% /Subject (TeX)
+% /Keywords (TeX,LaTeX,Clea,Rees)}
+% \pdfcatalog{%
+% /URL ()
+% /PageMode /UseOutlines}
+% \setlength{\parindent}{0pt}
+% \setlength{\parskip}{0.5em}
+%
+%
+% \begin{abstract}
+%
+% \noindent \lpack{nfssext-cfr} is an extension and modification of Philipp Lehman's \lpack{nfssext} which provides extended font selection commands modelled on those provided by \LaTeXe{}.
+% Given an appropriate font configuration, \lpack{nfssext-cfr} enables users to change the weight, width, shape and style of font as easily as they can select bold, italic or typewriter.
+% For instance, the package makes it trivial to use proportional, hanging figures in the body of the text, proportional, lining figures in captions and headers and tabular, lining figures in tables.
+% An extensive choice of commands are provided to access a wide variety of weights, widths, shapes and styles from the more common (e.g.~semi-bold or condensed) to the less common (e.g.~‘outline’ and right or upright italic).
+% Comprehensive support is provided for ‘swash’ and ‘alternate’ styles.
+% These are implemented as families rather than shapes to support fonts which offer multiple swash shapes (e.g.~small-caps, italic and upright) or alternate styles.
+% These may be used to provide effective access to fancy ligatures, end-of-word swashes etc.\ without sacrificing the range of characters provided by \textsc{t1}.
+%
+% The package is not primarily intended for direct use by end-users, but is designed rather to facilitate the creation of more sophisticated font support packages.
+% End-users may nonetheless find the package useful, subject to the constraints explained in this document.
+% Moreover, end-users may wish to pass options to the package on newer kernels, if loading font support packages which have not been updated for changes to font selection\footnote{‘Kernel’ refers to the \LaTeX{} kernel in this context and should not be confused with your system kernel.}.
+%
+% \end{abstract}
+%
+% \tableofcontents
+%
+% \listoftables
+%
+% \section{Introduction}\label{sec:intro}
+%
+%
+% The package was originally a fairly simple extension of Philipp Lehman's \lpack{nfssext}\@.
+% \lpack{nfssext} provides commands which enable one to specify font features not covered by the New Font Selection Scheme (\nfss).
+% The package developed according to the needs of particular fonts I configured for \LaTeX{} and, in a few cases, my dissatisfaction with the original commands.
+%
+% In adapting the package for the (New) New Font Selection Scheme\footnote{%
+% Officially, there is no such designation, but I have to call it something.
+% Throughout this document and packages which depend upon it, I use this term to refer to the font selection features introduced into \LaTeX{} in 2020.%
+% } (\nnfss), I have tried to balance \begin{enumerate*}[label=(\roman*)]\item backwards compatibility\footnote{%
+% Note that 100\% backwards compatibility cannot be implemented on current \LaTeX{} kernels.%
+% } for users loading updated font support packages, \item backwards compatibility for users loading packages which haven't been updated and \item compatibility with the new features of \nnfss{}\end{enumerate*}.
+% I have also tried to account for the common case in which documents use combinations of fonts from different packages, each of which may or may not load \lpack{nfssext-cfr} and may or may not have been updated for \nnfss{}.
+% This has inevitably required some compromises and there are certainly places where I would do things differently if starting from scratch.
+%
+% While I don't recommend installing this version of \lpack{nfssext-cfr} on an older system, the package should continue to work more-or-less as it always did on older kernels.
+% To achieve this, the package is split into a main file, \file{nfssext-cfr.sty}, which provides common code and figures out whether to load code for \nfss{} (\file{nfssext-cfr-nfss.sty}) or \nnfss{} (\file{nfssext-sty-nnfss.sty}).
+% \file{nfssext-cfr-nfss.sty} is essentially what was \file{nfssext-cfr.sty} minus the code retained in the latter.
+%
+% Unfortunately, tt is impossible to ensure 100\% backwards compatibility with recent \LaTeX{} kernels.
+% By default, \lpack{nfssext-cfr} tries to interfere as little as possible with the kernel, even at the cost of backwards compatibility.
+% If \texttt{compat} is enabled, however, the package does its best to enable backwards compatible behaviour, at the cost of the new functionality provided by the kernel.
+%
+% \lpack{nfssext-cfr} does not eschew interference with the kernel at all costs.
+% Even without \texttt{compat} it patches or replaces some kernel code because some things just don't work sensibly\footnote{%
+% This is true in two main places.
+% The first is the kernel's initialisation of series at the start of the document.
+% This overwrites the default \texttt{bf} series according to the font family name rather than the font name.
+% This means that virtual fonts which depend on Computer or Latin Modern are not handled correctly and, because this code is delayed, the problem cannot be corrected by setting things up appropriately earlier.
+%
+% The second is the implementation of ‘swash’ which is by far the most problematic of the changes and one of the most difficult to navigate.
+% It isn't clear to me how seriously the kernel's definition is intended to be, but I have chosen to overwrite the kernel code here.}.
+%
+% \begin{center}
+% \fbox{%
+% \begin{minipage}{.9\linewidth}
+% \textbf{All font-support code should be updated to use \texttt{compat=false} when loading \lpack{nfssext-cfr}.}
+% The changes in \nnfss{} \textbf{require} changes to code based on Philipp Lehman's Font Installation Guide.
+% \end{minipage}}
+% \end{center}
+%
+% \section{Macros}\label{sec:macros}
+%
+% \Cref{tab:smr,tab:srr,tab:wds,tab:wghts,tab:figs,tab:gen,tab:shapes} include macros supplied by the original \lpack{nfssext} and additions available with \lpack{nfssext-cfr}.
+% Macros in \cref{tab:wds,tab:wghts,tab:shapes} should work with any font definition files which more-or-less adhere to \nfss/\nnfss.
+% This should, theoretically, be all font packages but, in practice, things are rarely so simple.
+% Macros in \cref{tab:figs,tab:gen} will work only with fonts named strictly according to the Berry naming scheme.
+%
+% In \cref{tab:wghts,tab:wds,tab:gen,tab:figs,tab:shapes}, the third column lists the default letter codes for various font features.
+% If the defaults are changed, the macros will try to do something different.
+%
+% A \texttt{+} indicates that the macro will attempt to merge the addition into the current font's family name, series or shape.
+% For example, if the current font uses oldstyle figures, the \texttt{+2} indicates that \cs{pstyle} will attempt to select a font with figures which are both proportional and oldstyle.
+%
+% A \texttt{-} indicates that the macro will attempt to subtract from the current font's family name, series or shape.
+% For example, if the current font uses oldstyle figures, the \texttt{-2} indicates that \cs{tstyle} will attempt to select a font with figures which are both tabular and oldstyle.
+%
+% A comma-separated list indicates consecutive additions and/or subtraction.
+%
+% If no \texttt{+-} is used, the macro tries to select a font with the given feature without merging.
+% For example \cs{sistyle} tries to switch to \texttt{si} shape regardless of the current font shape.
+%
+% A \texttt{--} indicates that the macro will try to clear all relevant letter codes from the current font's family name, series or shape.
+% For example, \cs{regwidth} tries to switch to a series with no letter codes indicating non-standard widths in its name.
+%
+% Additions, subtractions and clearances operate on font family names, series or shapes, as appropriate.
+% In general, macros with \texttt{style} in their names operate on family names; those with \texttt{shape} operate on shape codes\footnote{But \textbf{not} \cs{swshape}!}; and those with \texttt{width} or \texttt{weight} operate on series codes.
+%
+% The letter codes correspond to those specified by the \nfss{} specification, unless the specification does not include the relevant feature.
+% In the latter case, I tried to choose something sensible i.e.~something which made sense to me at the time.
+% These choices are not always those specified by the \nnfss{} specification, since sense and sensibility are sometimes in the eye of the encoder.
+%
+% \newcolumntype{T}{>{\ttfamily\tlstyle\arraybackslash}l}
+% \newcolumntype{F}{>{\rmfamily\arraybackslash}l}
+% \newcolumntype{R}{>{\rmfamily\arraybackslash}X}
+% \begin{table}
+% \centering
+% \begin{threeparttable}
+% \caption{Standard (kernel) macros (re)defined}\label{tab:smr}
+% \begin{tabular}{lF}
+% \toprule
+% \cs{swshape}\tnotex{tn:sw-exists}\tnotex{tn:swshape-refs}\DescribeMacro[noprint]{\swshape} & redefined on new kernels\tnotex{tn:sw} \\
+% & defined on old kernels \\
+% \cs{itshape}\DescribeMacro[noprint]{\itshape} & old kernels only\\
+% \cs{scshape}\DescribeMacro[noprint]{\scshape} & old kernels only\\
+% \cs{upshape}\DescribeMacro[noprint]{\upshape} & old kernels only\\
+% \bottomrule
+% \end{tabular}
+% \begin{tablenotes}
+% \item\label{tn:sw-exists}Defined only by newer kernels.
+% \item\label{tn:swshape-refs}See \cref{tab:gen,tab:shapes} and text.
+% \item\label{tn:sw}Definition depends on kernel, \texttt{force} and \texttt{compat}.
+% \end{tablenotes}
+% \end{threeparttable}
+% \end{table}
+% \begin{table}
+% \centering
+% \caption{Standard (kernel) font change rules redefined}\label{tab:srr}
+% \begin{tabular}{TTF}
+% \toprule
+% \multicolumn{2}{c}{Shape} & \\
+% \multicolumn{1}{c}{Current} & \multicolumn{1}{c}{Requested} & \multicolumn{1}{c}{\sffamily Applied when?} \\
+% \midrule
+% it & sc & \texttt{compat} \& \nnfss{} only \\
+% sl & sc & \texttt{compat} \& \nnfss{} only \\
+% sc & it & \texttt{compat} \& \nnfss{} only \\
+% sc & sl & \texttt{compat} \& \nnfss{} only \\
+% scsl & it & \texttt{compat} \& \nnfss{} only \\
+% \bottomrule
+% \end{tabular}
+% \end{table}
+% \begin{table}
+% \centering
+% \begin{threeparttable}
+% \caption{Family switches: general}\label{tab:gen}
+% \begin{tabularx}\linewidth{llTR}
+% \toprule
+% \multicolumn{2}{c}{Macros} & \multicolumn{1}{c}{} & \\
+% \multicolumn{1}{c}{Text Command} & \multicolumn{1}{c}{Switch} & \multicolumn{1}{c}{Family Code} & \sffamily Style \\
+% \midrule
+% \cs{textti}\DescribeMacro[noprint]{\textti} & \cs{tistyle}\DescribeMacro[noprint]{\tistyle} & +d & titling/display\\
+% \cs{textlt}\tnotex{tn:cf-textlg}\DescribeMacro[noprint]{\textlt} & \cs{ltstyle}\tnotex{tn:cf-lgweight}\DescribeMacro[noprint]{\ltstyle} & +l & light if separate family \\
+% \cs{textof}\DescribeMacro[noprint]{\textof} & \cs{ofstyle}\DescribeMacro[noprint]{\ofstyle} & +l & open-face (or outline or blank) style\\
+% \cs{textalt}\DescribeMacro[noprint]{\textalt} & \cs{altstyle}\DescribeMacro[noprint]{\altstyle} & +a & alternative style\\
+% \cs{textreg}\DescribeMacro[noprint]{\textreg} & \cs{regstyle}\DescribeMacro[noprint]{\regstyle} & -- & regular style\\
+% \cs{emboss}\DescribeMacro[noprint]{\emboss} & \cs{embossstyle}\DescribeMacro[noprint]{\embossstyle} & +e & ‘embossed’ style \\
+% \cs{textorn}\DescribeMacro[noprint]{\textorn} & \cs{ornamentalstyle}\DescribeMacro[noprint]{\ornamentalstyle} & +p & decorative initials etc.\\
+% \cs{ornament}\DescribeMacro[noprint]{\ornament} & \\
+% \cs{textqt}\DescribeMacro[noprint]{\textqt} & \cs{qtstyle}\DescribeMacro[noprint]{\qtstyle} & +q & quotation style\\
+% \cs{textsh}\DescribeMacro[noprint]{\textsh} & \cs{shstyle}\DescribeMacro[noprint]{\shstyle} & +h & shadowed style\\
+% \cs{texttm}\DescribeMacro[noprint]{\texttm} & \cs{tmstyle}\DescribeMacro[noprint]{\tmstyle} & -s,-v,+t & monowidth typewriter\\
+% \cs{texttv}\DescribeMacro[noprint]{\texttv} & \cs{tvstyle}\DescribeMacro[noprint]{\tvstyle} & -s,-t,+v & variable width typewriter\\
+% \cs{textswash}\DescribeMacro[noprint]{\textswash} & \cs{swashstyle}\tnotex{tn:cf-swstyle}\DescribeMacro[noprint]{\swashstyle} & +w & swash \\
+% \cs{textsw}\tnotex{tn:swshape-not}\DescribeMacro[noprint]{\textsw} & \cs{swshape}\tnotex{tn:swshape-not}\DescribeMacro[noprint]{\swshape} && ‘find a route to swash’ \\
+% \bottomrule
+% \end{tabularx}
+% \begin{tablenotes}
+% \item\label{tn:cf-textlg}Cf.\ \cs{textlg} in \cref{tab:wghts}.
+% \item\label{tn:cf-lgweight}Cf.\ \cs{lgweight} in \cref{tab:wghts}.
+% \item\label{tn:cf-swstyle}Cf.\ \cs{swstyle} in \cref{tab:shapes}.
+% \item\label{tn:swshape-not}Effect is kernel and option dependent, but potentially changes family and/or shape.
+% ‘Tries to find a route to swash.’
+% See text for an explanation of what, why and when.
+% See \cref{sec:imp} for details of how.
+% \end{tablenotes}
+% \end{threeparttable}
+% \end{table}
+% \begin{table}
+% \centering
+% \begin{threeparttable}
+% \caption{Family switches: figures}\label{tab:figs}
+% \begin{tabular}{llTF}
+% \toprule
+% \multicolumn{2}{c}{Macros} & \multicolumn{1}{c}{} & \\
+% \multicolumn{1}{c}{Text Command} & \multicolumn{1}{c}{Switch} & \multicolumn{1}{c}{Family Code} & \sffamily Style of Figures \\
+% \midrule
+% \cs{textln}\tnotex{tn:orig}\DescribeMacro[noprint]{\textln} & \cs{lnstyle}\tnotex{tn:orig}\DescribeMacro[noprint]{\lnstyle} & -- & lining (cf.~\cs{lstyle} below)\\
+% \cs{textos}\tnotex{tn:orig}\DescribeMacro[noprint]{\textos} & \cs{osstyle}\tnotex{tn:orig}\DescribeMacro[noprint]{\osstyle} & j & oldstyle (cf.~\cs{ostyle} below)\\
+% \cs{textinf}\DescribeMacro[noprint]{\textinf} & \cs{infstyle}\DescribeMacro[noprint]{\infstyle} & 0 & inferior \\
+% & \cs{instyle}\DescribeMacro[noprint]{\instyle} & & \\
+% \textcolor{gray}{\cs{textin}\tnotex{tn:textin-dep}}\DescribeDMacro[noprint]{\textin} & & & \textcolor{gray}{if \lpack{hyperref} is not loaded} \\
+% \cs{textsu}\DescribeMacro[noprint]{\textsu} & \cs{sustyle}\DescribeMacro[noprint]{\sustyle} & 1 & superior \\
+% \cs{textl}\tnotex{tn:new}\DescribeMacro[noprint]{\textl} & \cs{lstyle}\tnotex{tn:new}\DescribeMacro[noprint]{\lstyle} & -j & lining (cf.~\cs{lnstyle} above)\\
+% \cs{texto}\tnotex{tn:new}\DescribeMacro[noprint]{\texto} & \cs{ostyle}\tnotex{tn:new}\DescribeMacro[noprint]{\ostyle} & +j & oldstyle (cf.~\cs{osstyle} above)\\
+% \cs{textp}\tnotex{tn:new}\DescribeMacro[noprint]{\textp} & \cs{pstyle}\tnotex{tn:new}\DescribeMacro[noprint]{\pstyle} & +2 & proportional \\
+% \cs{textt}\tnotex{tn:new}\DescribeMacro[noprint]{\textt} & \cs{tstyle}\tnotex{tn:new}\DescribeMacro[noprint]{\tstyle} & -2 & tabular \\
+% \cs{textpl}\tnotex{tn:both}\DescribeMacro[noprint]{\textpl} & \cs{plstyle}\tnotex{tn:both}\DescribeMacro[noprint]{\plstyle} & -j,+2 & proportional lining \\
+% \cs{textpo}\tnotex{tn:both}\DescribeMacro[noprint]{\textpo} & \cs{postyle}\tnotex{tn:both}\DescribeMacro[noprint]{\postyle} & +2j & proportional oldstyle \\
+% \cs{texttl}\tnotex{tn:both}\DescribeMacro[noprint]{\texttl} & \cs{tlstyle}\tnotex{tn:both}\DescribeMacro[noprint]{\tlstyle} & -j,-2 & tabular lining \\
+% \cs{textto}\tnotex{tn:both}\DescribeMacro[noprint]{\textto} & \cs{tostyle}\tnotex{tn:both}\DescribeMacro[noprint]{\tostyle} & +j,-2 & tabular oldstyle \\
+% \bottomrule
+% \end{tabular}
+% \begin{tablenotes}
+% \item\label{tn:orig}This macro is the original \lpack{nfssext} command.
+% The result is independent of the current style of figures.
+% \item\label{tn:textin-dep}Deprecated.
+% \item\label{tn:new}This macro changes precisely one aspect of the current figure style.
+% That is, the result depends on the current style of figures.
+% \item\label{tn:both}This macro ensures a specific fully-specified figure style.
+% \end{tablenotes}
+% \end{threeparttable}
+% \end{table}
+% \begin{table}
+% \centering
+% \begin{threeparttable}
+% \caption{Shape switches}\label{tab:shapes}
+% \begin{tabular}{llTF}
+% \toprule
+% \multicolumn{2}{c}{Macros} & \multicolumn{1}{c}{} & \\
+% \multicolumn{1}{c}{Text Command} & \multicolumn{1}{c}{Switch} & \multicolumn{1}{c}{Shape Code} & \sffamily Shape \\
+% \midrule
+% -- & \cs{scolshape}\DescribeMacro[noprint]{\scolshape} & scol & outline small-caps \\
+% \cs{textol}\DescribeMacro[noprint]{\textol} & \cs{olshape}\DescribeMacro[noprint]{\olshape} & ol & outline\\
+% \cs{textsi}\DescribeMacro[noprint]{\textsi} & \cs{sishape}\DescribeMacro[noprint]{\sishape} & si & italic small-caps\\
+% \cs{textu}\DescribeMacro[noprint]{\textu} & \cs{ushape}\DescribeMacro[noprint]{\ushape} & u & ?? \\
+% \cs{textscu}\DescribeMacro[noprint]{\textscu} & \cs{scushape}\DescribeMacro[noprint]{\scushape} & su & ?? \\
+% \cs{textui}\DescribeMacro[noprint]{\textui} & \cs{uishape}\DescribeMacro[noprint]{\uishape} & ui & upright italic\\
+% \cs{textri}\DescribeMacro[noprint]{\textri} & \cs{rishape}\DescribeMacro[noprint]{\rishape} & ri & reverse italic\\
+% \cs{textdf}\DescribeMacro[noprint]{\textdf} & \cs{dfshape}\DescribeMacro[noprint]{\dfshape} & n & default shape\\
+% -- & \cs{swstyle}\tnotex{tn:cf-swashstyle}\DescribeMacro[noprint]{\swstyle} & +w,it & swash family \emph{and} shape \\
+% \cs{textsw}\tnotex{tn:cf-textswash}\tnotex{tn:cf-swshape-not-shape}\DescribeMacro[noprint]{\textsw} & \cs{swshape}\tnotex{tn:cf-swshape-not-shape}\DescribeMacro[noprint]{\swshape} && ‘find a route to swash’ \\
+% \bottomrule
+% \end{tabular}
+% \begin{tablenotes}
+% \item\label{tn:cf-textswash}Cf.~\cs{textswash} in \cref{tab:gen}.
+% \item\label{tn:cf-swashstyle}Cf.~\cs{swashstyle} in \cref{tab:gen}.
+% \item\label{tn:cf-swshape-not-shape}Definition is kernel and option dependent, but probably doesn't (just) change shape.
+% See \cref{tab:gen} for sketch and text for details.
+% \end{tablenotes}
+% \end{threeparttable}
+% \end{table}
+% \begin{table}
+% \centering
+% \caption{Series switches: widths}\label{tab:wds}
+% \begin{tabular}{llTF}
+% \toprule
+% \multicolumn{2}{c}{Macros} & \multicolumn{1}{c}{} & \\
+% \multicolumn{1}{c}{Text Command} & \multicolumn{1}{c}{Switch} & \multicolumn{1}{c}{Series Code} & \sffamily Width \\
+% \midrule
+% \cs{textnw}\DescribeMacro[noprint]{\textnw} & \cs{nwwidth}\DescribeMacro[noprint]{\nwwidth} & +c & narrow \\
+% \cs{textcd}\DescribeMacro[noprint]{\textcd} & \cs{cdwidth}\DescribeMacro[noprint]{\cdwidth} & +c & compact \\
+% \cs{textec}\DescribeMacro[noprint]{\textec} & \cs{ecwidth}\DescribeMacro[noprint]{\ecwidth} & +ec & extra compact \\
+% \cs{textuc}\DescribeMacro[noprint]{\textuc} & \cs{ucwidth}\DescribeMacro[noprint]{\ucwidth} & +uc & ultra compact \\
+% -- & \cs{mdwidth}\DescribeMacro[noprint]{\mdwidth} & +?m & medium \\
+% \cs{textet}\DescribeMacro[noprint]{\textet} & \cs{etwidth}\DescribeMacro[noprint]{\etwidth} & +x & extended \\
+% \cs{textep}\DescribeMacro[noprint]{\textep} & \cs{epwidth}\DescribeMacro[noprint]{\epwidth} & +x & expanded \\
+% \cs{textex}\DescribeMacro[noprint]{\textex} & \cs{exwidth}\DescribeMacro[noprint]{\exwidth} & +ex & extra expanded \\
+% \cs{textux}\DescribeMacro[noprint]{\textux} & \cs{uxwidth}\DescribeMacro[noprint]{\uxwidth} & +ux & ultra expanded \\
+% \cs{textrw}\DescribeMacro[noprint]{\textrw} & \cs{regwidth}\DescribeMacro[noprint]{\regwidth} & -- & regular \\
+% \bottomrule
+% \end{tabular}
+% \end{table}
+% \begin{table}
+% \centering
+% \begin{threeparttable}
+% \caption{Series switches: weights}\label{tab:wghts}
+% \begin{tabular}{llTF}
+% \toprule
+% \multicolumn{2}{c}{Macros} & \multicolumn{1}{c}{} & \\
+% \multicolumn{1}{c}{Text Command} & \multicolumn{1}{c}{Switch} & \multicolumn{1}{c}{Series Code} & Weight \\
+% \midrule
+% -- & \cs{mdweight}\DescribeMacro[noprint]{\mdweight} & +m? & medium \\
+% \cs{textmb}\DescribeMacro[noprint]{\textmb} & \cs{mbweight}\DescribeMacro[noprint]{\mbweight} & +mb & medium-bold \\
+% \cs{textdb}\DescribeMacro[noprint]{\textdb} & \cs{dbweight}\DescribeMacro[noprint]{\dbweight} & +db & demi-bold \\
+% \cs{textsb}\DescribeMacro[noprint]{\textsb} & \cs{sbweight}\DescribeMacro[noprint]{\sbweight} & +sb & semi-bold \\
+% \cs{textbd}\DescribeMacro[noprint]{\textbd} & \cs{bdweight}\DescribeMacro[noprint]{\bdweight} & +b & bold \\
+% & \cs{bfweight}\DescribeMacro[noprint]{\bfweight} & & \\
+% \cs{texteb}\DescribeMacro[noprint]{\texteb} & \cs{ebweight}\DescribeMacro[noprint]{\ebweight} & +eb & extra-bold \\
+% \cs{textub}\DescribeMacro[noprint]{\textub} & \cs{ubweight}\DescribeMacro[noprint]{\ubweight} & +ub & ultra-bold \\
+% \cs{textlg}\tnotex{tn:cf-textlt}\DescribeMacro[noprint]{\textlg} & \cs{lgweight}\tnotex{tn:cf-ltstyle}\DescribeMacro[noprint]{\lgweight} & +l & light when weight \\
+% \cs{textel}\DescribeMacro[noprint]{\textel} & \cs{elweight}\DescribeMacro[noprint]{\elweight} & +el & extra-light \\
+% \cs{textul}\DescribeMacro[noprint]{\textul} & \cs{ulweight}\DescribeMacro[noprint]{\ulweight} & +ul & ultra-light \\
+% \bottomrule
+% \end{tabular}
+% \begin{tablenotes}
+% \item\label{tn:cf-textlt}Cf.\ \cs{textlt} in \cref{tab:gen}.
+% \item\label{tn:cf-ltstyle}Cf.\ \cs{ltstyle} in \cref{tab:gen}.
+% \end{tablenotes}
+% \end{threeparttable}
+% \end{table}
+%
+% One further macro is available, though it has no effect on older kernels.
+%
+% \DescribeMacro{\nfssextset}\marg{key-value list}
+%
+% Package options (see \cref{sec:nkern} may also be specified after loading either in the preamble (\texttt{compat} and \texttt{force}) or at any time (\texttt{debug}).
+% This enables users to set options after some other package loads \lpack{nfssext-cfr} and allows additional information to be printed to the console and/or logged on local basis.
+%
+% \iffalse
+%^^A \section{Applications}
+%^^A
+%^^A \lpack{nfssext-cfr} may be used by any font support package which supports fonts named according to the Berry scheme and uses compatible settings in its font definition files.
+%^^A
+%^^A In general, the package does little or nothing to extend support for arbitrary fonts.
+%^^A If your favourite font's support package doesn't do what you want, it is highly unlikely loading this package will help.
+%^^A There is usually no reason to load the package in documents, because any package requiring it should explicitly load it as a dependency.
+%^^A
+%^^A However, due to complications resulting from recent changes to \LaTeX's \nfss{} in \nnfss, those using current (or even moderately recent) versions of \LaTeX{} \emph{may} need to pass the package options as explained below.
+%^^A
+%^^A Furthermore, \lpack{nfssext-cfr} may be useful if you are using a font support package which provides an option to load, say, light and semi-bold in place of regular/medium and bold.
+%^^A If the package does not allow you to use more than two weights in a single document, loading \lpack{nfssext-cfr} should allow you to access the otherwise inaccessible weights.
+%^^A
+%^^A The same principle works for widths: if the package allows you to choose between, say, condensed and regular width at load time, but doesn't provide commands to switch in the document itself, \lpack{nfssext-cfr} may enable you to access the full range of widths.
+%^^A
+%^^A The same would apply to a package which offered, say, a choice of standard, reverse and/or upright italics, but did not allow you to switch between them.
+%^^A I'm not aware of any such package, but \lpack{nfssext-cfr} could be useful if such exists.
+%^^A
+%^^A However, this principle does \textbf{not} extend to the style of figures, use of swash or choice of alternate ligatures etc\@.
+%^^A If your preferred font support package offers you a choice of proportional/tabular and/or hanging/lining figures, but provides no means to switch between them, \lpack{nfssext-cfr} is unlikely to help unless the package happens to use Berry naming\footnote{%
+%^^A Most packages don't.
+%^^A In particular, packages which use \texttt{autoinst} do not generally use Berry names.}.
+%^^A
+% \fi
+%
+%
+% \section{Newer \LaTeX{} Kernels}\label{sec:nkern}
+%
+% The package tests for the presence of \cs{init@series@setup}.
+% If this exists, it loads a newer version of the package.
+% \lpack{nfssext-cfr} supports three options, but these are only effective if the newer code (for \nnfss) is loaded.
+% All three are booleans, initially false and default to true if used without specifying a value\footnote{%
+% ‘Default’ and ‘initial’ follow the usage in \file{l3interface.pdf}, \lpack{l3keys2e} and \file{clsguide.pdf}.
+% If you are familiar with \lpack{pgfkeys}, the terms have the same meaning there.
+% Basically, the ‘initial’ value is what you get if you don't specify the option at all when loading the package, while the ‘default’ is what you get if you specify the option without specifying a value.
+%
+% ‘Scope’ is used in the standard sense applicable to \LaTeXe{} class and package options.
+% That is, it indicates whether the option may be used only when loading the package, at any point in the preamble or also in the document.%
+% }.
+% The third option is described in \cref{sec:trafferth}.
+%
+% \DescribeOpt{force}\vals{true,false}
+%
+% Default: \texttt{true}
+%
+% Initial: \texttt{false}
+%
+% Scope: preamble
+%
+% You can force the old code to be loaded using the package option \texttt{force} or \texttt{force=true}.
+% Note, however, that the old version will not work as advertised on newer kernels because \LaTeX{} will overwrite some of the package's definitions at the end of the preamble.
+%
+% \DescribeOpt{compat}\vals{true,false}
+%
+% Default: \texttt{true}
+%
+% Initial: \texttt{false}
+%
+% Scope: preamble
+%
+% In contrast, \texttt{compat} or \texttt{compat=true} will activate code which tries to partially replicate the original \lpack{nfssext-cfr}'s behaviour.
+% This is far from unproblematic.
+% In particular, it will partly break features of the current \nfss{} for other fonts.
+%
+% If your document relies exclusively on text fonts supported by this package and none of the support for those fonts has been updated, compilation should produce a more satisfactory result than otherwise.
+% If, however, your document relies partly on text fonts not supported by this package or the support for those fonts has been updated in the ‘wrong’ way, compilation may produce a less satisfactory result.
+% There is no general rule here: whether the option helps or hinders things depends entirely on the fonts, the support for those fonts and the specific contents of your document.
+%
+% The main areas known to be problematic are
+% \begin{enumerate}
+% \item\label{enum:si} italic small-capitals (but oblique small-capitals should be mostly unaffected);
+% \item\label{enum:swash} swash;
+% \item\label{enum:it} transitions between small-caps, italic, oblique, italic small-caps, oblique small-caps, upright italic, right italic and upright;
+% \item\label{enum:swshape} any transition involving swash where shape is involved;
+% \item\label{enum:m} medium weight fonts where width is non-standard e.g.~medium condensed, medium ultra condensed etc.;
+% \item\label{enum:mb} medium bold weight in any context.
+% \end{enumerate}
+% \ref{enum:si}--\ref{enum:swshape} can be worked around at the document level, with some inconvenience.
+% Subject to the caveats above, the \texttt{compat} option may avoid at least some of these inconveniences.
+%
+% \ref{enum:m} and \ref{enum:mb} cannot be worked around at the document level.
+% Nor does \lpack{nfssext-cfr} make any attempt to mitigate these two issues.
+% Doing so would involve too much interference with current \nnfss{}.
+% This means that \ref{enum:m} and \ref{enum:mb} can be addressed only in the support files for the fonts affected.
+% Neither \texttt{compat} nor \texttt{force} makes any attempt to change this.
+%
+% Maximum backwards compatibility requires changes to the font support files \emph{and} \texttt{compat=false}, but some documents may still require (hopefully minor) changes.
+%
+% \subsection{Required Changes to Font Support Files}\label{subsec:fsf}
+%
+% \textbf{In all cases, additional changes to font substitution rules may be needed to prevent multiple substitutions by the same font, since these seem to cause problems.}
+%
+% \begin{description}
+% \item[italic small-caps] The problem here is that \lpack{nfssext} encoded italic small-caps as shape \texttt{si}, whereas the kernel has plumped for \texttt{scit}.
+% It does support \texttt{scsl} (although it does not distinguish oblique from italic), but not \texttt{si}.
+% This issue can be more-or-less dealt with by support files for fonts, but some issues arise at the document level concerning transitions (below).
+%
+% Ideally, \texttt{scit} should be substituted wherever font definition files specify the shape \texttt{si}.
+% \texttt{scit} should then be defined as a (silent) substitution for \texttt{si}.
+% However, it \emph{should} be sufficient to define \texttt{si} as a substitute for \texttt{scit}.
+%
+% Fonts which provide oblique small-caps, but not italic, should specify \texttt{scsl} as a (silent) substitution for \texttt{scit} and \texttt{scit} for \texttt{si} (or \emph{vice-versa}).
+% The kernel supports \texttt{scsl} out-of-the-box, together with the substitution for \texttt{scit}, but the changes should make support for \cs{textsi} and \cs{sishape} more robust.
+% \item[transitions] \textbf{No additional changes are recommended to support files which load \lpack{nfssext-cfr}.}
+% Provided \texttt{fd} files are updated as explained above, no further adjustments should be required to enable correct font selection during transitions involving italic, oblique, small-caps, upright italic, reverse italic etc\@.
+%
+% \item[swash] \textbf{No changes are recommended for swash to font definition files for packages which load \lpack{nfssext-cfr}.}
+% If loading \lpack{nfssext-cfr}, the recommendation is to \textbf{ignore} the kernel's implementation because it cannot be made to work correctly with any family which provides swash for multiple shapes e.g.~both upright and italic or small-caps and upper/lower case\footnote{%
+% The issue here is that the kernel considers swash to be a \emph{shape}, whereas \lpack{nfssext} only \emph{called} it a shape.
+% The underlying code treated it as a \emph{style} requiring a change of font \emph{family}.
+% The shape was always (potentially switched to) italic (\texttt{it}).
+% \lpack{nfssext-cfr} offered a second version of swash, which treats it as a family possibly requiring a change of shape, but the shape is typically italic or upright, as opposed to being specific to swash.
+%
+% To make things worse, not all fonts \emph{can} be setup in the way the kernel assumes because some fonts provide swash characters in a variety of shapes (upright and italic, for example).
+% Moreover, it is common to encode additional ligatures, for example, as swash, even though this is not accurate, in order to provide \emph{some} mechanism for accessing them within a traditional 8-bit font setup.%
+% }.
+%
+% \item[swshape] \textbf{No changes for swash are recommended for \texttt{sty} files in packages which load \lpack{nfssext-cfr}.}
+%
+% \lpack{nfssext-cfr-nfss} contains the original \lpack{nfssext} definition of \cs{swshape} and \cs{textsw}.
+% This is used on newer kernels only if \texttt{force} is used, in which case the code is largely broken.
+%
+% \lpack{nfssext-cfr-nnfss} contains both the original definition and a replacement.
+% The former is used only if \texttt{compat} is selected; otherwise, the latter is used on kernels supporting \nnfss.
+% The new definition tries to figure out which of the three possible implementations, if any, to use and behaves accordingly.
+% \textbf{The kernel definition is overwritten regardless.}
+% \texttt{compat} determines only \emph{what} overwrites the kernel's.
+% \item[medium] Any line of a font definition file which codes a series of two or more letters including \texttt{m} must be changed to delete the \texttt{m}.
+% For example, \texttt{\{mc\}} \textrightarrow{} \texttt{\{c\}}, \texttt{\{muc\}} \textrightarrow{} \texttt{\{uc\}} etc\@.
+% \textbf{It is NOT sufficient to substitute such series using rules.}
+% The changes \textbf{must} be made in the primary definitions of the font families.
+% \item[mb] I've chosen to make \cs{mbweight} an alias for \cs{sbweight}.
+% Hopefully no font family supports both.
+% Provided that's not the case, \texttt{mb} should be changed to \cs{sb} in all affected font definition files.
+% \textbf{It is NOT sufficient to substitute \texttt{mb} for \texttt{sb} using a rule.}
+% The change \textbf{must} be made in the definition of the family.
+% \end{description}
+%
+%
+% \section{Older \LaTeX{} Kernels}\label{sec:okern}
+%
+% This is the code base \lpack{nfssext} was written for.
+% \lpack{nfssext-cfr} extended that code.
+%
+% To the best of my knowledge, the code used with older \LaTeX{} kernels works as expected.
+% This means it is fully compatible with the Font Installation Guide and that things like \texttt{\textbackslash scshape \textbackslash itshape} will produce italic small-caps, as expected.
+% This code is also --- again to the best of my knowledge --- fully compatible with all features of \nfss{} with the single exception of code supporting medium weight, condensed width fonts which erroneously uses \texttt{mc} rather than \texttt{c}.
+%
+% Italic small-caps is assumed to be coded as \texttt{si}.
+% Oblique small-caps is assumed to be coded as \texttt{scsl}.
+%
+% If a set of fonts provides a swash \emph{family}, it is assumed the fonts are named in accordance with the Berry scheme.
+% \cs{textswash}, \cs{swshape}, \cs{swashstyle} and/or \cs{swstyle} can then be used to access this family.
+%
+% The difference between \cs{swashstyle} and \cs{swstyle} is that the former tries to merge any swash family with the current one, whereas the latter does not.
+% So, if a font set provides swash for two widths of font, say, and you've changed widths, \cs{swashstyle} will try to find a swash character without altering the width, whereas \cs{swstyle} will first switch to the base font, resetting the width.
+% On the other hand, if the font only provides swash in the standard width, say, and you've changed widths, \cs{swashstyle} will fail to switch to swash, whereas \cs{swstyle} will succeed.
+% Packages which include swash families should, therefore, advise users which command(s) to use.
+%
+% \cs{textswash} is the text font command for \cs{swashstyle}.
+% \cs{textsw} is the text font command for \cs{swshape}.
+%
+% \cs{swshape} first tries \cs{swstyle} before changing the shape to \cs{swshapedefault}.
+% By default, this is \cs{itdefault} because swash families are often coded as italic, but this is obviously font-dependant.
+%
+% \section{Bugs, Non-Bugs \& Debugging}\label{sec:trafferth}
+%
+% The actual effect of any macro depends on any changes made to the defaults for various font features, the current font and, of course, what is available.
+%
+%^^A For example, \cs{itdefault} is intended to be the name of italic shape and is used by the redefined \cs{itshape} supplied by this package for older kernels.
+%^^A By default, \cs{itdefault} is \texttt{it}.
+%^^A However, if you change that to, say, \texttt{sl}, then \cs{itshape} will use \texttt{sl} instead.
+%^^A Note that changing \cs{itdefault} will have no effect on newer kernels.
+%^^A
+%^^A Moreover, if the current shape is small-caps, \cs{itshape} will attempt to merge the default italic shape with the small-caps on older kernels.
+%^^A That is, it will try to select small-caps italic, if possible, before resorting to plain italic.
+%^^A On newer kernels, this attempt is builtin for a limited range of shape and series changes.
+%^^A
+% The macros operating on family names are almost entirely reliant on font names adhering strictly to the Karl Berry schema.
+% This includes the stipulation that multiple variants be listed in alphabetical order.
+% These macros cannot be used with fonts named in any other way.
+%
+%^^A Although font definition files \emph{should} adhere to the series and shape codes specified by \nfss{}, some do not.
+%^^A In particular, some newer packages prepared with \texttt{autoinst} use descriptive, but non-standard, codes.
+%^^A While these work fine if the packages provide comprehensive access to the series and shapes they support, they otherwise require bespoke solutions if extensions are required.
+%^^A
+%^^A Provided font definition files do adhere to the standard encoding conventions, however, macros for changing weight, width and shape in \lpack{nfssext-cfr} should work fine on newer kernels (\nnfss).
+% On older kernels (\nfss), changes to weight and width should work and most shapes should be supported, but italic small-caps is assumed to be coded as \texttt{si} on these kernels, so you may need something like
+% \iffalse
+%<*verb>
+% \fi
+% \begin{verbatim}
+\renewcommand*{\sidefault}{scit}% or scsl or whatever
+% \end{verbatim}
+% \iffalse
+%</verb>
+% \fi
+% On newer kernels, italic small-caps should be encoded as explained above and \cs{sishape}/\cs{textsi} should work out-of-the-box with packages which use any of \texttt{si}, \texttt{scit} or \texttt{scsl}.
+%
+% If a macro's attempt to enable or disable a font feature fails, a warning will generally be written to the console, but the code tries hard not to trigger errors.
+% If an attempt triggers an error, that's a bug, so please let me know.
+% If an attempt triggers a warning, please note that there may be no bug at all and, if there is a bug, it is probably not in this package\footnote{%
+% To be clear, there certainly are bugs.
+% It is just statistically unlikely that any given warning is caused by one.}
+%
+% \DescribeOpt{debug}\vals{true,false}
+%
+% Default: \texttt{true}
+%
+% Initial: \texttt{false}
+%
+% Scope: general
+%
+% You can get a bit more information printed to the console about what's happening using this option on newer kernels.
+% Some of the same information can also be found in the log.
+%
+% \changes{v6140}{2017-03-28}{%
+% Extend documentation somewhat.}
+%
+% \changes{2010-07-17}{2015-06-19}{%
+% There should be no changes for the end user except that in certain cases it is possible that line-breaks may be altered if \lpack{microtype} is in use due to the enhanced support included for variant font families.}
+%
+% \MaybeStop{%
+% \PrintChanges
+% \setcounter{IndexColumns}{2}%
+% \PrintIndex
+% }
+%
+% \section{Implementation}\label{sec:imp}
+%
+% You do not need to read the remainder of this document in order to install or use the package.
+%
+% \subsection{Main package file}\label{subsec:main}
+%
+% This used to be the complete package.
+% Now it is mostly responsible for processing options, figuring out which kernel we're on and implementing the small amount of code shared between the implementations for \nfss{} and \nnfss{}.
+%
+% \iffalse
+%<*sty>
+% \fi
+% \begin{package}{nfssext-cfr}
+% \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}
+\RequirePackage{svn-prov}
+\ProvidesPackageSVN[\filebase.sty]{$Id: nfssext-cfr.dtx 10366 2024-09-18 14:25:21Z cfrees $}[v1.0 \revinfo{} extensions for NFSS and NNFSS; based on 2003/03/14 v1.2 Experimental NFSS Extensions]
+\DefineFileInfoSVN
+% \end{macrocode}
+% ^^A Paid â defnyddio \GetFileInfoSVN*/\GetFileInfoSVN{} yn y fan hon!!
+%
+%
+% \changes{v0.0}{2020-2024}{Update for \nnfss.}
+%
+% \changes{v1.0}{2024-09-16}{%
+% So \lpack{nfssext-cfr} merging is now limited to family, weight and width.}
+%^^A I *could* use font change rules for weight and width - this would make sense if I could be confident of catching all cases *and* it didn't cause problems ....
+%^^A the real problem is, I don't know what I'm supposed to avoid ....
+%
+% \changes{v1.0}{2024-09-16}{%
+% Behaviour depends on kernel version and options.
+% On newer kernels, quite conservative/less compatible by default.
+% Fully compatible on older kernels.}
+%
+% \changes{v1.0}{2024-09-16}{Split \file{nfssext-cfr.sty} into \file{nfssext-cfr\{,-nfss,-nnfss\}.sty}.}
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \begin{macro}{\if@nfssextcfr@digonnew}
+% \mbox{ }
+% \begin{macrocode}
+\newif\if@nfssextcfr@digonnew
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+\@nfssextcfr@digonnewtrue
+% \end{macrocode}
+% Copied verbatim, excepting format and modulo package/module name from Joseph Wright's \file{siunitx.sty} under LPPL
+% \begin{macrocode}
+\@ifundefined{ExplLoaderFileDate}{%
+ \IfFileExists{expl3.sty}{%
+ \RequirePackage{expl3}%
+ }{%
+ \RequirePackage{nfssext-cfr-nfss}%
+ \@nfssextcfr@digonnewfalse
+ }%
+}{}
+\if@nfssextcfr@digonnew
+% \end{macrocode}
+% Almost verbatim from \file{siunitx.sty}
+% \begin{macrocode}
+ \@ifl@t@r\ExplLoaderFileDate{2022-02-24}{%
+ }{%
+ \RequirePackage{nfssext-cfr-nfss}%
+ \@nfssextcfr@digonnewfalse
+ }%
+\fi
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\if@nfssextcfr@digonnew
+% \end{macrocode}
+% BEGIN expl pkg option setup
+% \begin{macrocode}
+\newif\ifexfs@debug
+\ExplSyntaxOn
+\prop_gput:Nnn \g_msg_module_name_prop { nfssext-cfr } { exfs }
+\keys_define:nn { exfs }
+{
+% \end{macrocode}
+% \begin{option}{compat}
+% \changes{v1.0}{2024-09-16}{%
+% Add option \texttt{compat}.
+% More aggressive/backwards compatible with \texttt{compat}.}
+% \begin{macro}{\g__exfs_compat_bool}
+% Compatibility option.
+% \begin{macrocode}
+ compat .bool_gset:N = \g__exfs_compat_bool,
+ compat .default:n = true,
+ compat .initial:n = false,
+ compat .usage:n = preamble,
+% \end{macrocode}
+% \end{macro}
+% \end{option}
+% \begin{option}{debug}
+% Turns info messages into warnings for testing purposes and possibly provides additional information.
+% \changes{v1.0}{2024-09-16}{%
+% Add option \texttt{debug}.}
+% \begin{macrocode}
+ debug .legacy_if_gset:n = exfs@debug,
+ debug .initial:n = false,
+ debug .default:n = true,
+% \end{macrocode}
+% \end{option}
+% \begin{option}{force}
+% \changes{v1.0}{2024-09-16}{%
+% Add option \texttt{force}.
+% Load old file/incompatible with \texttt{force}.}
+% \begin{macro}{\g__exfs_force_bool}
+% Force loading of code for \nfss{} even on newer kernels.
+% \begin{macrocode}
+ force .bool_gset:N = \g__exfs_force_bool,
+ force .default:n = true,
+ force .initial:n = false,
+ force .usage:n = preamble,
+% \end{macrocode}
+% \end{macro}
+% \end{option}
+% \begin{macrocode}
+}
+% \end{macrocode}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Joseph Wright: from \file{siunitx.sty} ; \url{https://chat.stackexchange.com/transcript/message/64327823#64327823}
+% \begin{macrocode}
+\providecommand \IfFormatAtLeastTF { \@ifl@t@r \fmtversion }
+\IfFormatAtLeastTF { 2022-06-01 }
+{
+ \ProcessKeyOptions [ exfs ]
+}{
+ \RequirePackage { l3keys2e }
+ \ProcessKeysOptions { exfs }
+% \end{macrocode}
+% \begin{macro}{\ProcessKeyOptions}
+% \mbox{ }
+% \begin{macrocode}
+ \NewDocumentCommand \ProcessKeyOptions { o }
+ {
+ \IfValueTF { #1 } { \ProcessKeysOptions { #1 } }
+ { \PackageError{nfssext-cfr}{
+ Optional~argument~mandatory~on~kernels~this~old.\MessageBreak
+ Please~specify~the~module~whose~keys~should~be~processed
+ }{
+ \protect\ProcessKeyOptions~only~passes~keys~to~
+ \protect\ProcessKeyOptions\MessageBreak
+ on~older~kernels~for~the~convenience~of~package~authors.~
+ Since~\protect\ProcessKeysOptions\MessageBreak
+ takes~an~argument,~the~optional~argument~to~
+ \protect\ProcessKeyOptions~is~required
+ }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+}
+\IfFormatAtLeastTF { 2020-10-01 }{
+}{
+ \RequirePackage { xparse }
+% \end{macrocode}
+% \begin{macro}{\ExpandArgs}
+% \mbox{ }
+% \begin{macrocode}
+ \providecommand \ExpandArgs [1]
+ { \cs_if_exist_use:c { exp_args:N #1 } }
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+}
+% \end{macrocode}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% END expl pkg option setup
+%
+% BEGIN cfr-added: bifurcate
+%
+% We test for the presence of \cs{init@series@setup} in order to determine whether to load code for \nnfss{} or \nfss.
+% If \texttt{force} is set, we load for \nfss{} regardless.
+% \begin{macrocode}
+\RequirePackage{etoolbox}
+\msg_new:nnn { nfssext-cfr } { compat }
+{
+ You ~ or ~ a ~ font-support ~ package ~ have ~ loaded ~ me ~ ( line ~ \msg_line_number: ) ~ with ~ the ~ compat ~ option. ~
+ This ~ means ~ the ~ package ~ may ~ require ~ updating. ~
+ Update ~ the ~ package ~ if ~ necessary ~ and ~ use ~ compat=false ~ when ~ loading ~ me.
+}
+\msg_new:nnn { nfssext-cfr } { force }
+{
+ You ~ or ~ a ~ font-support ~ package ~ have ~ loaded ~ me ~ ( line ~ \msg_line_number: ) ~ with ~ the ~ force ~ option. ~
+ This ~ is ~ a ~ desperate ~ measure ~ of ~ last ~ resort. ~
+ **Breakage ~ is ~ expected.**
+}
+\hook_gput_code:nnn { begindocument/before } { . }
+{
+ \cs_if_exist:NTF \init@series@setup
+ {
+ \bool_if:NTF \g__exfs_force_bool
+ {
+ \msg_warning:nn { nfssext-cfr } { force }
+ \RequirePackage {nfssext-cfr-nfss}
+ }{
+ \bool_if:NT \g__exfs_compat_bool
+ {
+ \msg_warning:nn { nfssext-cfr } { compat }
+ }
+ \RequirePackage {nfssext-cfr-nnfss}
+ }
+ }{% achosiad heb broblemau - diolch byth!
+ \RequirePackage {nfssext-cfr-nfss}
+ }
+}
+% \end{macrocode}
+% \begin{macro}{\__exfs_set:n}
+% \begin{macrocode}
+\cs_new_protected_nopar:Nn \__exfs_set:n
+{
+ \keys_set:nn { exfs } { #1 }
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\nfssextset}
+% Allow setting of options later in preamble or in document.
+% This is intended to enable debugging to be toggled locally.
+% \begin{macrocode}
+\cs_set_eq:NN \nfssextset \__exfs_set:n
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+\ExplSyntaxOff
+% \end{macrocode}
+% END added
+% \begin{macro}{\DeclareTextOrnament,\ornament}
+% These are unmodified from \lpack{nfssext}.
+% I'm not aware of any \ctan{} packages using these and they have not been tested for compatibility with \nnfss{}, though I can't see any patently obvious problems.
+% \begin{macrocode}
+\newcommand*{\DeclareTextOrnament}[7]{%
+ \expandafter\def\csname#1@orn\@roman#2\endcsname{#3/#4/#5/#6/#7}}
+\begingroup
+ \catcode`\/=12
+ \gdef\exfs@split@orndef#1/#2/#3/#4/#5\@nil{%
+ \def\f@encoding{#1}%
+ \def\f@family{#2}%
+ \def\f@series{#3}%
+ \def\f@shape{#4}%
+ \def\exfs@tempa{#5}}
+\endgroup
+\def\exfs@base@family{\expandafter\exfs@get@base\f@family\@nil}
+\DeclareRobustCommand{\ornament}[1]{%
+ \expandafter\ifx\csname\exfs@base@family @orn\@roman#1\endcsname\relax
+ \PackageWarning{nfssext}{%
+ Ornament #1 undefined for font family '\exfs@base@family'\MessageBreak
+ Setting debug mark}%
+ \rule{1ex}{1ex}%
+ \else
+ \begingroup
+ \edef\exfs@tempb{\csname\exfs@base@family @orn\@roman#1\endcsname}%
+ \expandafter\expandafter\expandafter\exfs@split@orndef
+ \expandafter\string\exfs@tempb\@nil
+ \selectfont\char\exfs@tempa
+ \endgroup
+ \fi}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\nfssextcfr@MT@Hook,\Microtype@Hook}
+% BEGIN add \lpack{microtype} hooks
+% Partly from \lpack{microtype} docs; partly from \lpack{MinionPro} package
+% \changes{2010-07-17}{2015/06/19}{%
+% Add \lpack{microtype} support for variants.}
+% \begin{macrocode}
+\def\nfssextcfr@MT@Hook{%
+% \end{macrocode}
+%^^A \DeclareMicrotypeVariants{x,j,w,a,d,0,1}% this is the default declaration according to the docs
+%^^A \DeclareMicrotypeVariants*{2,e,h,l}% this should *append* the variants (what do I use 'f' for? better take it out...)
+% \begin{macrocode}
+ \DeclareMicrotypeVariants*{2,2d,2dj,2j,dj,e,h,l}% is this necessary or would the previous line be enough?
+}
+\@ifpackageloaded{microtype}{%
+ \PackageWarning{nfssext-cfr}{%
+ You have loaded me (or a font support package which loads me)\MessageBreak
+ after loading microtype, but microtype should be loaded after\MessageBreak
+ all font defaults have been setup}%
+ \nfssextcfr@MT@Hook
+}{%
+ \@ifundefined{Microtype@Hook}{%
+ \let\Microtype@Hook\nfssextcfr@MT@Hook}{% MinionPro has \global before this
+ \g@addto@macro\Microtype@Hook{\nfssextcfr@MT@Hook}}}
+% \end{macrocode}
+% \end{macro}
+% END
+% \end{package}
+% \iffalse
+%</sty>
+% \fi
+%
+% \subsection{NNFSS}\label{subsec:sty-nnfss}
+%
+%
+% This code was written for the \emph{current} (New) New Font Selection Scheme (2020--).
+% It should not generally be loaded on older kernels.
+%
+%
+% \iffalse
+%<*sty-nnfss>
+% \fi
+% \begin{package}{nfssext-cfr-nnfss}
+% \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}
+\RequirePackage{svn-prov}
+\ProvidesPackageSVN[\filebase-nnfss.sty]{$Id: nfssext-cfr.dtx 10366 2024-09-18 14:25:21Z cfrees $}[v1.0 \revinfo{} extended New New Font Selection Scheme (NNFSS) based on 2003/03/14 v1.2 Experimental NFSS Extensions]
+\DefineFileInfoSVN
+% \end{macrocode}
+% ^^A Paid â defnyddio \GetFileInfoSVN*/\GetFileInfoSVN{} yn y fan hon!!
+% END added
+% \begin{macro}{\exfs@tempa,\exfs@tempb,\exfs@tempf}
+% Scratch variables.
+% \begin{macrocode}
+\newcommand*{\exfs@tempa}{}
+\newcommand*{\exfs@tempb}{}
+% \end{macrocode}
+%:end-added
+% BEGIN added (cfr): extra variable (\cs{exfs@tempf})
+% \begin{macrocode}
+\newcommand*{\exfs@tempf}{}
+% \end{macrocode}
+% \end{macro}
+% We want to track cases where missing fonts get defined into existence.
+% To do this we define an additional macro each time \cs{wrong@fontshape} is called.
+% This is based on two proposals by Max Chernoff, but the implementation is different.
+% \begin{macrocode}
+\ExplSyntaxOn
+\hook_gput_code:nnn { cmd/wrong@fontshape/before } { . }
+{
+ \global\expandafter\expandafter\expandafter\let
+ \expandafter \csname exfs@fake@ \curr@fontshape\endcsname\relax
+}
+\ExplSyntaxOff
+% \end{macrocode}
+% \begin{macro}{\exfs@info}
+% Custom logging
+% \begin{macrocode}
+\newcommand \exfs@info[2][nfssext-cfr]{%
+ \ifexfs@debug
+ \PackageWarning{#1}{Info: #2}%
+ \else
+ \PackageInfo{#1}{#2}%
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% END added
+%
+% \begin{macro}{\exfs@normalise}
+% BEGIN added (cfr): normalise
+% \begin{macrocode}
+\newcommand* \exfs@normalise[1]{%
+ \ifcsname exfs@fake@\curr@fontshape\endcsname
+ \exfs@info{Current font '\curr@fontshape' is fake.\MessageBreak
+ Normalising}%
+ \expandafter\csname f@#1\endcsname{\csname #1default\endcsname}\selectfont
+ \ifcsname exfs@fake@\curr@fontshape\endcsname
+ \f@series{\seriesdefault}\f@shape{\shapedefault}\selectfont
+ \ifcsname exfs@fake@\curr@fontshape\endcsname
+% \end{macrocode}
+% This might happen, I think, if we're in a swash family or specialist encoding
+% where the default series and shape aren't available.
+% All bets are off here so try to bale out as gracefully as we can.
+% \begin{macrocode}
+ \normalfont
+ \ifcsname exfs@fake@\curr@fontshape\endcsname
+% \end{macrocode}
+% This definitely oughtn't to happen, though - things are really screwed up at
+% this point - so error.
+% \begin{macrocode}
+ \PackageError{nfssext-cfr}{Default font appears to be fake!\MessageBreak
+ Switch \textbackslash normalfont yielded '\curr@fontshape'}
+ {This is highly unlikely, so the bug is probably in the phenomena\MessageBreak
+ rather than the noumena}%
+ \fi
+ \fi
+ \fi
+ \exfs@info{Normalised to '\curr@fontshape'}%
+ \else
+ \exfs@info{Current font '\curr@fontshape' appears real}%
+ \fi
+}
+% \end{macrocode}
+% END added
+% \end{macro}
+%
+% \begin{macro}{\exfs@try@family}
+% Modified from \lpack{nfssext}?
+% Or modified from older \lpack{nfssext-cfr}?
+% \begin{macrocode}
+\newcommand*{\exfs@try@family}[2][]{%
+ \let\exfs@tempa\relax
+% \end{macrocode}
+% END added
+%
+% trans: group is requisite here else \LaTeX{} thinks the family real regardless
+% \begin{macrocode}
+ \begingroup % fel arall, bydd latex yn credu bod y family yn go iawn beth bynnag
+% \end{macrocode}
+% (o leiaf bydd latex yn dweud felly)
+% \begin{macrocode}
+ \exfs@info{Trying Font family '\f@encoding/#2'}%
+ \fontfamily{#2}\try@load@fontshape
+% \end{macrocode}
+% \cs{curr@fontshape} holds the target shape - not the current one - after an unsuccessful attempt to load **family** with \cs{try@load@fontshape}.
+% This won't work for series/shape as \cs{curr@fontshape} holds the current one in that case
+% \begin{macrocode}
+ \expandafter\ifx\csname\curr@fontshape\endcsname\relax
+ \edef\exfs@tempa{#1}%
+ \ifx\exfs@tempa\@empty
+ \PackageWarning{nfssext}{%
+ Font family '\f@encoding/#2' not available\MessageBreak
+ Ignoring font switch}%
+ \else
+ \exfs@info[nfssext]{%
+ Font family '\f@encoding/#2' not available\MessageBreak
+ Font family '\f@encoding/#1' tried instead}%
+ \exfs@try@family{#1}%
+ \fi
+ \else
+ \exfs@info{Loading font family '\f@encoding/#2'}%
+ \gdef\exfs@tempa{\fontfamily{#2}\selectfont}%
+ \fi
+ \endgroup
+ \exfs@tempa}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\exfs@try@series}
+% BEGIN added (cfr)
+% \begin{macrocode}
+\newcommand*{\exfs@try@series}[2][]{%
+% \end{macrocode}
+% We don't hand instructions to the kernel unless we know they'll succeed b/c the results are too unpredictable under \nnfss.
+%
+% Changing directly only produces usable results for series defined in the 'table' of font changes.
+% But using higher level kernel interfaces for tests doesn't work because spurious fonts get defined, which only seem to exist.
+% Theoretically, we might as well use the existing kernel's macros since we're already damned by reliance on internals anyway.
+% But then everything needs disentangling.
+% So it's easier to just adapt previous tests, even though it partially duplicates what the kernel does.
+% (But it isn't the mess swash is \dots).
+% \begin{macrocode}
+ \let\exfs@targetseries\relax
+ \edef\exfs@tempa{#2}%
+ \ifx\f@series\exfs@tempa\relax
+ \exfs@info{Current (\f@series) matches target (#2) series.\MessageBreak
+ Ignoring font switch}%
+ \else
+ \begingroup
+ \exfs@normalise{series}%
+ \edef\exfs@tempa{\f@encoding/\f@family/#2/\f@shape}%
+ \ifcsname \exfs@tempa\endcsname
+ \exfs@info{Switching series: \f@series\space -> #2}%
+ \gdef\exfs@targetseries{\fontseries{#2}\selectfont}%
+ \else
+ \edef\exfs@reserved{#1}%
+ \ifx\exfs@reserved\@empty
+ \PackageWarning{nfssext-cfr}{%
+ Font series '\f@encoding/\f@family/#2/\f@shape' not available\MessageBreak
+ Ignoring font change}%
+ \else
+ \PackageWarning{nfssext-cfr}{%
+ Font series '\f@encoding/\f@family/#2/\f@shape' not available\MessageBreak
+ Trying '\f@encoding/\f@family/#1/\f@shape'}%
+ \exfs@try@series{#1}%
+ \fi
+ \fi
+ \endgroup
+ \exfs@targetseries
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%^^A \newcommand*{\exfs@try@shape}[2][]{%
+%^^A Shapes are where the real problems start ....
+%^^A \let\exfs@targetshape\relax
+%^^A \edef\exfs@tempa{#2}%
+%^^A \ifx\f@shape\exfs@tempa\relax
+%^^A \\exfs@info{Current (\f@shape) matches target (#2) shape.\MessageBreak
+%^^A Ignoring font switch}%
+%^^A \else
+%^^A \begingroup
+%^^A \edef\exfs@tempa{\f@encoding/\f@family/\f@series/#2}%
+%^^A \ifcsname \exfs@tempa\endcsname
+%^^A \exfs@info{Switching shape: \f@shape\space -> #2}%
+%^^A \gdef\exfs@targetshape{\fontshape{#2}\selectfont}%
+%^^A \else
+%^^A \begingroup
+%^^A \exfs@normalise{shape}%
+%^^A \ifcsname \exfs@tempa\endcsname
+%^^A \exfs@info{Switching shape: \f@shape\space -> #2}%
+%^^A \gdef\exfs@targetshape{\exfs@normalise{shape}\fontshape{#2}\selectfont}%
+%^^A \endgroup
+%^^A \else
+%^^A \edef\exfs@reserved{#1}%
+%^^A \ifx\exfs@reserved\@empty
+%^^A \PackageWarning{nfssext-cfr}{%
+%^^A Font shape '\f@encoding/\f@family/\f@series/#2' not available\MessageBreak
+%^^A Ignoring font change}%
+%^^A \else
+%^^A \PackageWarning{nfssext-cfr}{%
+%^^A Font shape '\f@encoding/\f@family/\f@series/#2' not available\MessageBreak
+%^^A Trying '\f@encoding/\f@family/\f@series/#1'}%
+%^^A \exfs@try@shape{#1}%
+%^^A \fi
+%^^A \fi
+%^^A \fi
+%^^A \fi
+%^^A \endgroup
+%^^A \exfs@targetshape
+%^^A \fi}
+% \begin{macro}{\exfs@try@shapeshift}
+% Attempt to leverage kernel's mechanism.
+% \begin{macrocode}
+\def\exfs@try@shapeshift#1{%
+ \edef\exfs@targetshape{\csname #1default\endcsname}%
+ \ifx\f@shape\exfs@targetshape\relax
+ \exfs@info{Current (\f@shape) matches target (#1) shape.\MessageBreak
+ Ignoring font switch}%
+ \else
+ \not@math@alphabet\edef\exfs@targetshape\relax
+ \exfs@info{\f@shape\space -> \exfs@targetshape\MessageBreak
+ Trying \f@encoding/\f@family/\f@series/\exfs@targetshape}%
+% \end{macrocode}
+% We \emph{do} want the kernel's substitution mechanism here?
+% \begin{macrocode}
+ \fontshape{\exfs@targetshape}\selectfont
+ \fi}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\exfs@swshape}
+% Switching to swash is now far more complicated with (I presume) the attendant overhead, but the kernel's approach just won't work here\footnote{%
+% Implementing swash as a \emph{shape} isn't workable for fonts I've packaged, so I've made no attempt to follow the kernel here as I do for small-caps italic etc\@.
+% We're back to the single axis/multiple aspect problem which \nfss{} created by ignoring small-caps/italic and width/weight combinations.
+% It may, in fact, be wrong-headed to follow the kernel \emph{at all} here.
+% Perhaps it would be better to just provide the original implementation and some compatibility option for people who also need swash shapes in the same document?%
+% }.
+% This will become \cs{swshape} if \texttt{compat} isn't enabled.
+% \begin{macrocode}
+\newcommand* \exfs@swshape{%
+ \let\exfs@targetsw\relax
+ \begingroup % angen neu beidio? angen - bendant!
+% \end{macrocode}
+% Try kernel or configured default first so we get swash from current family etc.\ if available
+% \begin{macrocode}
+ \edef\exfs@tempa{\f@encoding/\f@family/\f@series/\swdefault}%
+ \edef\exfs@tempa@fake{exfs@fake@\exfs@tempa}%
+ \ifcsname \exfs@tempa\endcsname
+ \ifcsname exfs@fake@\exfs@tempa\endcsname
+ \exfs@swfamily
+ \else
+ \gdef\exfs@targetsw{\fontshape{\swdefault}\selectfont}% kernel
+ \fi
+ \else
+ \exfs@swfamily
+ \fi
+ \endgroup
+ \ifx\exfs@targetsw\relax
+ \PackageWarning{nfssext-cfr}{%
+ Cannot find any route to swash.\MessageBreak
+ Are you sure one is available?}%
+ \else
+ \exfs@targetsw
+ \exfs@info{Switch to swash resulted in '\curr@fontshape'}%
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\exfs@swfamily}
+% This is the guts of \cs{exfs@swshape}.
+% \begin{macrocode}
+\newcommand* \exfs@swfamily{%
+ \let\exfs@targetsw\relax
+ \begingroup
+% \end{macrocode}
+% ^^A \expandafter\ifx\csname\curr@fontshape\endcsname\relax
+% Try \lpack{nfssext-cfr} family switch \& our default or configured
+% \begin{macrocode}
+ \let\exfs@tempa\f@family
+ \exfs@merge@families{w}%
+ \ifx\exfs@tempa\f@family % try merge with current shape
+% \end{macrocode}
+% Try switching to upright etc.\ first
+% \begin{macrocode}
+ \fontshape{n}%
+ \exfs@merge@families{w}% up & merge
+ \if\exfs@tempa\f@family
+% \end{macrocode}
+% Try switching to \cs{swshapedefault}{} first
+% \begin{macrocode}
+ \fontshape\swshapedefault
+ \exfs@merge@families{w}% up & nfssext-cfr default/configured
+ \if\exfs@tempa\f@family
+% \end{macrocode}
+% Use \lpack{nfssext} family switch \& default or configured
+% \begin{macrocode}
+ \exf@try@family{\expandafter\exfs@get@base\f@family\@nil w}% nfssext switch
+ \if\exfs@tempa\f@family % nfssext switch
+ \fontshape\swshapedefault\exfs@try@family{%
+ \expandafter\exfs@get@base\f@family\@nil w}% nfssext switch & shape
+ \if\exfs@tempa\f@family
+ \relax % rhodd y ffidl yn y to (give up)
+ \else
+ \gdef\exfs@targetsw{%
+ \fontshape\swshapedefault\expandafter\fontfamily{%
+ \exfs@get@base\f@family\@nil w}\selectfont
+ }% nfssext switch & shape
+ \fi % nfssext switch & shape
+ \else
+ \gdef\exfs@targetsw{\expandafter\fontfamily{%
+ \exfs@get@base\f@family\@nil w}\selectfont
+ }% nfssext switch
+ \fi % nfssext switch
+ \else
+ \gdef\exfs@targetsw{%
+ \fontshape\swshapedefault\exfs@merge@families{w}%
+ }% up & nfssext-cfr default/configured
+ \fi % up & nfssext-cfr default/configured
+ \else
+ \gdef\exfs@targetsw{%
+ \fontshape{n}\exfs@merge@families{w}%
+ }% up & merge
+ \fi % up & merge
+ \else
+ \gdef\exfs@targetsw{\exfs@merge@families{w}}% merge with current shape
+ \fi % merge with current shape
+ \endgroup
+}
+% \end{macrocode}
+% \end{macro}
+% END added
+%
+% \begin{macro}{\exfs@get@base,\exfs@get@variants,\exfs@next,\exfs@shift,\exfs@first,\exfs@part,\exfs@second}
+% Utlities
+% \begin{macrocode}
+\def\exfs@get@base#1#2#3#4\@nil{#1#2#3}
+% \end{macrocode}
+% BEGIN added (cfr): more \cs{exfs@} commands (\texttt{get@variants}, \texttt{next}, \texttt{shift}, \texttt{first}, \texttt{part}, \texttt{second})
+% \begin{macrocode}
+\def\exfs@get@variants#1#2#3#4\@nil{#4}
+\def\exfs@next#1#2\@nil{#1}
+\def\exfs@shift#1#2\@nil{#2}
+\def\exfs@first#1#2\@nil{#1}
+\def\exfs@part#1#2\@nil{#2}
+\def\exfs@second#1#2#3\@nil{#2}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\exfs@series@splitter}
+% Common method for dealing with weight and width.
+% \changes{v1.0}{2024-09-16}{%
+% Rewritten as kernel no longer supports erroneous \texttt{m}.}
+% \begin{macrocode}
+\def\exfs@series@splitter#1{%
+ \edef\exfs@weight{\expandafter\exfs@first#1\@nil}%
+ \edef\exfs@width{\expandafter\exfs@shift#1\@nil}%
+% \end{macrocode}
+% Two char width only or two char weight
+% \begin{macrocode}
+ \if\exfs@weight u\exfs@check@cx{u}%
+ \else\if\exfs@weight e\exfs@check@cx{e}%
+ \else\if\exfs@weight s\exfs@check@cx{s}%
+ \else\if\exfs@weight d\exfs@check@cx{d}%
+ \else\ifx\exfs@width\@empty % m dealt with elsewhere
+% \end{macrocode}
+% Single character width
+% \begin{macrocode}
+ \if\exfs@weight c\def\exfs@width{c}\let\exfs@weight\@empty
+ \else\if\exfs@weight x\def\exfs@width{x}\let\exfs@weight\@empty
+ \fi\fi
+ \fi\fi\fi\fi\fi
+ \exfs@info{#1 -> \exfs@weight:\exfs@width;}%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\exfs@check@cx}
+% Auxiliary for \cs{exfs@check@cx}
+% \begin{macrocode}
+\def\exfs@check@cx#1{%
+ \edef\exfs@tempa{\expandafter\exfs@first\exfs@width\@nil}%
+ \if\exfs@tempa c\edef\exfs@width{#1c}\let\exfs@weight\@empty
+ \else\if\exfs@tempa x\edef\exfs@width{#1x}\let\exfs@weight\@empty
+ \else\edef\exfs@weighta{%
+ \exfs@weight\exfs@tempa
+ }\let\exfs@weight\exfs@weighta
+ \edef\exfs@widtha{%
+ \expandafter\exfs@shift\exfs@width\@nil
+ }\let\exfs@width\exfs@widtha
+ \fi\fi
+}
+% \end{macrocode}
+% \end{macro}
+% END added
+%
+% \begin{macro}{\lnstyle,\osstyle,\infstyle,\instyle,\sustyle,\swstyle}
+% Unmodified from \lpack{nfssext}.
+% Anniffiniedig -> undefined in the kernel.
+% \begin{macrocode}
+\DeclareRobustCommand{\lnstyle}{%% anniffiniedig
+ \not@math@alphabet\lnstyle\relax
+ \exfs@try@family[\expandafter\exfs@get@base\f@family\@nil]%
+ {\expandafter\exfs@get@base\f@family\@nil x}}
+\DeclareRobustCommand{\osstyle}{%% anniffiniedig
+ \not@math@alphabet\osstyle\relax
+ \exfs@try@family{\expandafter\exfs@get@base\f@family\@nil j}}
+\DeclareRobustCommand{\infstyle}{%% anniffiniedig
+ \not@math@alphabet\infstyle\relax
+ \exfs@try@family{\expandafter\exfs@get@base\f@family\@nil 0}}
+\let\instyle\infstyle
+\DeclareRobustCommand{\sustyle}{%% anniffiniedig
+ \not@math@alphabet\sustyle\relax
+ \exfs@try@family{\expandafter\exfs@get@base\f@family\@nil 1}}
+\DeclareRobustCommand{\swstyle}{%% anniffiniedig
+ \not@math@alphabet\swstyle\relax
+ \exfs@try@family{\expandafter\exfs@get@base\f@family\@nil w}}
+% \end{macrocode}
+% \end{macro}
+% BEGIN added (cfr) - merge families.
+%
+% \nnfss{} (unsurprisingly) does nothing here, so this is unproblematic.
+% The following depends **absolutely** on **complete** adherence to berry names.
+%
+% \begin{macro}{\ifexfs@added,\exfs@merge@families}
+% \cs{exfs@merge@families} is used in the macros recommended for switching the style of figures, activating swash and other variants etc.
+% \begin{macrocode}
+\newif\ifexfs@added
+\newcommand*\exfs@merge@families[1]{%
+ \edef\exfs@vartomerge{#1}%
+ \edef\exfs@variants{\expandafter\exfs@get@variants\f@family\@nil}%
+ \exfs@info{Trying to merge variants #1 and \exfs@variants}%
+ \edef\tempo{2j}%
+ \let\exfs@tempq\@empty
+ \def\exfs@tempg{}%
+ \exfs@addedfalse
+% \end{macrocode}
+% Check whether there are variants - if not just use the requested addition.
+% \begin{macrocode}
+ \ifx\exfs@variants\@empty
+ \edef\exfs@tempq{\exfs@vartomerge}%
+ \exfs@addedtrue
+ \else
+ \gdef\set{0,1,2,a,d,e,f,h,j,l,p,q,s,t,v,w}% these are the variants to consider - the order here and in the font name is crucial
+ \ifx\tempo\exfs@vartomerge
+ \@for \xx:=\set \do {%
+% \end{macrocode}
+% Check whether there are variants left - if not set the ‘next variant’ to empty
+% \begin{macrocode}
+ \ifx\exfs@variants\@empty
+ \let\exfs@nextvariant\@empty
+ \else
+% \end{macrocode}
+% O/w get the next variant
+% \begin{macrocode}
+ \edef\exfs@nextvariant{\expandafter\exfs@next\exfs@variants\@nil}%
+ \fi
+% \end{macrocode}
+%^^A \edef\tempt{2}%
+%^^A \edef\tempj{j}%
+% If the next variant is 2 or j, ignore it
+% \begin{macrocode}
+ \if\exfs@nextvariant 2%
+ \edef\exfs@variants{\expandafter\exfs@shift\exfs@variants\@nil}%
+ \fi
+ \if\exfs@nextvariant j% if the next variant is j, ignore it
+ \edef\exfs@variants{\expandafter\exfs@shift\exfs@variants\@nil}%
+ \fi
+% \end{macrocode}
+% See if the current value is either 2 or j and add it if so and if needed
+% \begin{macrocode}
+ \if\xx 2%
+ \edef\exfs@tempg{\exfs@tempg\xx}%
+ \else
+ \if\xx j% if the current value is j, we're done
+ \edef\exfs@tempq{\exfs@tempg\xx\exfs@variants}%
+ \let\exfs@variants\@empty
+ \exfs@addedtrue
+ \else
+% \end{macrocode}
+% o/w see if the current value matches the next variant
+% \begin{macrocode}
+ \ifx\xx\exfs@nextvariant
+ \edef\exfs@tempg{\exfs@tempg\xx}%
+ \edef\exfs@variants{\expandafter\exfs@shift\exfs@variants\@nil}%
+ \fi
+ \fi
+ \fi
+ }%
+ \else
+ \@for \xx:=\set \do {%
+% \end{macrocode}
+% Check whether there are variants left and, if not, add the addition if needed
+% \begin{macrocode}
+ \ifx\exfs@variants\@empty
+ \ifexfs@added
+ \else
+ \edef\exfs@tempq{\exfs@tempg\exfs@vartomerge}%
+ \exfs@addedtrue
+ \fi
+ \else
+% \end{macrocode}
+% o/w get the next variant
+% \begin{macrocode}
+ \edef\exfs@nextvariant{\expandafter\exfs@next\exfs@variants\@nil}%
+% \end{macrocode}
+% If the new token equals the next variant, combine whatever is saved in \cs{exfs@tempg} with whatever remains in \cs{exfs@variants}
+% \begin{macrocode}
+ \ifx\exfs@nextvariant\exfs@vartomerge
+ \edef\exfs@tempq{\exfs@tempg\exfs@variants}%
+ \exfs@addedtrue
+ \let\exfs@variants\@empty
+ \else
+% \end{macrocode}
+% o/w, if the current value matches the requested addition, add it in
+% \begin{macrocode}
+ \ifx\exfs@vartomerge\xx
+ \edef\exfs@tempq{\exfs@tempg\xx\exfs@variants}%
+ \exfs@addedtrue
+ \let\exfs@variants\@empty
+ \else
+% \end{macrocode}
+% o/w, if the current value matches the next variant, shift
+% \begin{macrocode}
+ \ifx\exfs@nextvariant\xx
+ \edef\exfs@tempg{\exfs@tempg\xx}%
+ \edef\exfs@variants{\expandafter\exfs@shift\exfs@variants\@nil}%
+ \fi
+ \fi
+ \fi
+ \fi
+ }%
+ \fi
+ \fi
+ \ifx\exfs@tempq\@empty
+ \PackageError{nfssext-cfr}{Something is wrong here. Ignoring font switching command.}{}%
+ \else
+ \exfs@try@family{\expandafter\exfs@get@base\f@family\@nil \exfs@tempq}%
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pstyle,\ostyle,\postyle}
+% Commands for switching to proportional and/or oldstyle figures.
+% Compare \cs{ostyle} with \lpack{nfssext}'s \cs{osstyle} above.
+% These macros (and the block which follows) all require merging Berry names but not unmerging.
+% \begin{macrocode}
+\DeclareRobustCommand{\pstyle}{%% anniffiniedig proportional figures
+ \not@math@alphabet\pstyle\relax
+ \exfs@merge@families{2}}
+\DeclareRobustCommand{\ostyle}{%% anniffiniedig oldstyle figures (cf. original osstyle above)
+ \not@math@alphabet\ostyle\relax
+ \exfs@merge@families{j}}
+% \end{macrocode}
+% Combined command for proportional oldstyle
+% \begin{macrocode}
+\DeclareRobustCommand{\postyle}{%% anniffiniedig
+ \not@math@alphabet\postyle\relax
+ \exfs@merge@families{2j}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\tistyle,\ltstyle,\ofstyle,\altstyle,\regstyle,\embossstyle,\ornamentalstyle,\swashstyle,\shstyle,\qtstyle}
+% \changes{2010-07-17}{2015/06/19}{Improve \cs{ofstyle}.}
+% These macros again require merging, but not unmerging, names.
+% \begin{macrocode}
+\DeclareRobustCommand{\tistyle}{%% anniffiniedig titling/display
+ \not@math@alphabet\tistyle\relax
+ \exfs@merge@families{d}}
+% \end{macrocode}
+% Note that this command is for use when the light version is a separate family rather than a weight variant (e.g.\ when you've got light, light bold etc.\ as well as regular weights)
+% \begin{macrocode}
+\DeclareRobustCommand{\ltstyle}{%% anniffiniedig
+ \not@math@alphabet\ltstyle\relax
+ \exfs@merge@families{l}}
+% \end{macrocode}
+% Let's hope there aren't any fonts with a light family *and* an outline/openface/blank version
+% \begin{macrocode}
+\DeclareRobustCommand{\ofstyle}{%% anniffiniedig
+ \not@math@alphabet\ofstyle\relax
+ \exfs@merge@families{l}}
+\DeclareRobustCommand{\altstyle}{%% anniffiniedig alternative style
+ \not@math@alphabet\altstyle\relax
+ \exfs@merge@families{a}}
+\DeclareRobustCommand{\regstyle}{%% anniffiniedig 'regular' style
+ \not@math@alphabet\regstyle\relax
+ \exfs@try@family{\expandafter\exfs@get@base\f@family\@nil}}
+\DeclareRobustCommand{\embossstyle}{%% anniffiniedig
+ \not@math@alphabet\embossstyle\relax
+ \exfs@merge@families{e}}
+\DeclareRobustCommand{\ornamentalstyle}{%% anniffiniedig intended primarily for decorative initial fonts etc.
+ \not@math@alphabet\ornamentalstyle\relax
+ \exfs@merge@families{p}}
+\DeclareRobustCommand{\qtstyle}{%% anniffiniedig quotation style (assumes sans)
+ \not@math@alphabet\qtstyle\relax
+ \sffamily
+ \exfs@merge@families{q}}
+\DeclareRobustCommand{\shstyle}{%% anniffiniedig
+ \not@math@alphabet\shstyle\relax
+ \exfs@merge@families{h}}
+\DeclareRobustCommand{\swashstyle}{%% anniffiniedig an attempt to improve on \swstyle
+ \not@math@alphabet\swashstyle\relax
+ \exfs@merge@families{w}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\tmstyle,\tvstyle}
+% \changes{v6140}{2017-03-28}{Modify \cs{tmstyle} and \cs{tvstyle} to unmerge sans and other typewriter before merging appropriate variant.}
+% Macros to switch between monowidth and variable typewriter.
+% These need to unmerge before merging.
+% We need to unmerge sans as well as the other kind of typewriter.
+% \begin{macrocode}
+\DeclareRobustCommand{\tmstyle}{%% anniffiniedig monowidth typewriter
+ \not@math@alphabet\tmstyle\relax
+ \exfs@unmerge@families{s}%
+ \exfs@unmerge@families{v}%
+ \exfs@merge@families{t}}
+\DeclareRobustCommand{\tvstyle}{%% anniffiniedig variable width typewriter
+ \not@math@alphabet\tvstyle\relax
+ \exfs@unmerge@families{s}%
+ \exfs@unmerge@families{t}%
+ \exfs@merge@families{v}}
+% \end{macrocode}
+% \end{macro}
+% BEGIN added (cfr) - unmerge families
+%
+% \begin{macro}{\ifexfs@take,\exfs@unmergefamilies}
+% Define the macro needed to do the unmerges.
+% \begin{macrocode}
+\newif\ifexfs@take
+\newcommand*\exfs@unmerge@families[1]{%
+ \edef\exfs@tempf{#1}%
+ \edef\tempa{\expandafter\exfs@get@variants\f@family\@nil}%
+ \let\exfs@tempq\@empty
+ \edef\exfs@tempg{}%
+ \exfs@taketrue
+% \end{macrocode}
+% Check whether there are variants - if not do nothing
+% \begin{macrocode}
+ \ifx\tempa\@empty
+ \edef\exfs@tempq{}%
+ \else
+% \end{macrocode}
+% o/w go through the variants to find the one to delete
+% \begin{macrocode}
+ \loop
+% \end{macrocode}
+% Get the next variant
+% \begin{macrocode}
+ \edef\exfs@tempn{\expandafter\exfs@next\tempa\@nil}%
+% \end{macrocode}
+% See if the next variant is the thing we seek and, if so, eliminate it
+% \begin{macrocode}
+ \ifx\exfs@tempf\exfs@tempn
+ \edef\tempa{\expandafter\exfs@shift\tempa\@nil}%
+ \edef\exfs@tempq{\exfs@tempg\tempa}%
+ \exfs@takefalse
+% \end{macrocode}
+% o/w save the next variant and move on if any variants remain
+% \begin{macrocode}
+ \else
+ \edef\exfs@tempg{\exfs@tempg\exfs@tempn}%
+ \edef\tempa{\expandafter\exfs@shift\tempa\@nil}%
+ \ifx\tempa\@empty% if there are no variants left, we're done
+ \edef\exfs@tempq{\exfs@tempg}%
+ \exfs@takefalse
+ \fi
+ \fi
+ \ifexfs@take % \fi yn \repeat
+ \repeat
+ \fi
+ \exfs@try@family{\expandafter\exfs@get@base\f@family\@nil \exfs@tempq}%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\tstyle,\lstyle}
+% These are simple unmerges, with no merging necessary.
+% \begin{macrocode}
+\DeclareRobustCommand{\tstyle}{%% anniffiniedig tabular figures
+ \not@math@alphabet\tstyle\relax
+ \exfs@unmerge@families{2}}
+\DeclareRobustCommand{\lstyle}{%% anniffiniedig lining figures (cf. command above)
+ \not@math@alphabet\lstyle\relax
+ \exfs@unmerge@families{j}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\tlstyle,\plstyle,\tostyle}
+% Simple combinations for combined figure styles.
+%
+% Make a combined command for tabular lining
+% \begin{macrocode}
+\DeclareRobustCommand{\tlstyle}{%% anniffiniedig
+ \lstyle\tstyle}
+% \end{macrocode}
+% Proportional lining
+% \begin{macrocode}
+\DeclareRobustCommand{\plstyle}{%% anniffiniedig
+ \lstyle\pstyle}
+% \end{macrocode}
+% Tabular oldstyle {?!}
+% \begin{macrocode}
+\DeclareRobustCommand{\tostyle}{%% anniffiniedig
+ \ostyle\tstyle}
+% \end{macrocode}
+% \end{macro}
+% END added
+%
+% \begin{macro}{\sidefault,\sishape}
+% \texttt{si} is italic sc\footnote{%
+% That is, italic small-caps \emph{was} \texttt{si}.
+% These days, things are more complicated \dots.%
+% }.
+% We use the original definition for the default and then set up rules for font shape changes which try \texttt{scit} and \texttt{scsl} before falling back to \texttt{si}.
+% \begin{macrocode}
+\newcommand*{\sidefault}{si}% anniffiniedig
+% \end{macrocode}
+% Well i brofi \texttt{si} \& yna \texttt{scit} ond wn i ddim sut i wneud hon gyda'r stwff newydd \dots{}.
+% I was going to deprecate the \texttt{si} macros, but the truth is they are much nicer than having to combine macros for those cases when you really do want precisely italic small-caps.
+% They are also much more robust than somebody trying to force things with \cs{fontshape}\marg{si}\cs{selectfont}, so, on reflection, it seems better to retain the interface, even if the implementation isn't as straightforward as I'd like.
+% \begin{macrocode}
+\DeclareRobustCommand{\sishape}{%
+ \exfs@try@shapeshift{si}}
+% \end{macrocode}
+% \end{macro}
+% Kernel virtuals: ulc upper/lower case up upright.
+% \lpack{nfssext} virtuals? or \lpack{nfssext-cfr} virtuals? or?
+% It would be better to try \texttt{si}, \texttt{scit} and \texttt{scsl}, but that doesn't seem possible
+% \begin{macrocode}
+\DeclareFontShapeChangeRule {n}{si}{scit}{scsl}% current; request (& trydedd); dewisiad cyntaf; ail ddewisiad
+\DeclareFontShapeChangeRule {it}{si}{scit}{scsl}
+\DeclareFontShapeChangeRule {sl}{si}{scit}{scsl}
+\DeclareFontShapeChangeRule {sc}{si}{scit}{scsl}
+% \end{macrocode}
+% Current shape is si => font support hasn't been updated
+% \begin{macrocode}
+\DeclareFontShapeChangeRule {si}{sc} {si} {}
+\DeclareFontShapeChangeRule {si}{it} {si} {}
+\DeclareFontShapeChangeRule {si}{sl} {scsl} {si}
+\DeclareFontShapeChangeRule {si}{scit} {scit} {si}% rhag ofn?!
+\DeclareFontShapeChangeRule {si}{ulc} {it} {}
+\DeclareFontShapeChangeRule {si}{up}{sc}{}
+% \end{macrocode}
+%^^A \DeclareFontShapeChangeRule {si}{u} {it} {}
+%^^A \DeclareFontShapeChangeRule {si}{su}{sc}{}
+% \begin{macrocode}
+\ExplSyntaxOn
+% \end{macrocode}
+% The need for overwriting can be avoided by changing the \file{.fd} files, but \texttt{compat} supports packages I don't know about\footnote{%
+% Or haven't published?
+% I haven't actually tried it with those.%
+% } \dots
+% \changes{v1.0}{2024-09-16}{%
+% Conditionally override kernel rules affecting switches to upright/small-caps.italic etc.}
+% \begin{macrocode}
+\bool_if:NT \g__exfs_compat_bool
+{
+ \DeclareFontShapeChangeRule {it}{sc}{si}{scsl}
+ \DeclareFontShapeChangeRule{sl}{sc}{scsl}{si}
+% \end{macrocode}
+% Gofyn am italic etc\@. \textbar{} Ask about italic etc\@.
+% Sylwadau tebygol yma \dots{} \textbar{} Like comments here \dots{}
+% \begin{macrocode}
+ \DeclareFontShapeChangeRule {sc}{it} {si} {scsl}
+ \DeclareFontShapeChangeRule {sc}{sl} {scsl} {si}
+ \DeclareFontShapeChangeRule {scsl}{it} {si} {scsl}
+}
+\ExplSyntaxOff
+% \end{macrocode}
+%^^A Ddylai'r rhai hwn ddim yn defnyddio \texttt{scit}/\texttt{scsl} yn lle \textt{si}?
+%^^A Pam \texttt{si}??
+%^^A \verb|^| Wel, maen nhw'n gwneud felly eisoes??!!
+% \changes{v1.0}{2024-09-16}{%
+% Unconditionally add a bunch of shape change rules for shapes unsupported by the kernel - I don't *think* these should be problematic: if the current or requested shape is unsupported by the kernel, surely it can't be problematic to support that shape?}
+% \begin{macrocode}
+\DeclareFontShapeChangeRule {ui}{sc}{scit}{scsl}
+\DeclareFontShapeChangeRule {ui}{scsl}{scsl}{scit}
+\DeclareFontShapeChangeRule {ui}{it}{it}{ui}
+\DeclareFontShapeChangeRule {ui}{ri}{ri}{ui}
+\DeclareFontShapeChangeRule {ui}{up}{n}{}
+\DeclareFontShapeChangeRule {ui}{ulc}{ui}{}
+% \end{macrocode}
+%^^A \DeclareFontShapeChangeRule {ui}{u}{n}{}
+%^^A \DeclareFontShapeChangeRule {ui}{su}{sc}{}
+% \begin{macrocode}
+\DeclareFontShapeChangeRule {ri}{sc}{scit}{scsl}
+\DeclareFontShapeChangeRule {ri}{scsl}{scsl}{scit}
+\DeclareFontShapeChangeRule {ri}{it}{it}{ri}
+\DeclareFontShapeChangeRule {ri}{ui}{ui}{ri}
+% \end{macrocode}
+% Kernel virtuals: \texttt{ulc} upper/lower case up upright
+% \begin{macrocode}
+\DeclareFontShapeChangeRule {ri}{up}{n}{}
+\DeclareFontShapeChangeRule {ri}{ulc}{ri}{}
+% \end{macrocode}
+% nfssext virtuals? or nfssext-cfr virtuals? or?
+%^^A \DeclareFontShapeChangeRule {ri}{u}{n}{}
+%^^A \DeclareFontShapeChangeRule {ri}{su}{sc}{}
+%^^A \DeclareFontShapeChangeRule {sc}{ri}{scit}{scsl}
+%^^A \DeclareFontShapeChangeRule {scsl}{ri}{scsl}{scit}
+%^^A \DeclareFontShapeChangeRule {it}{ri}{ri}{it}
+%^^A \DeclareFontShapeChangeRule {ui}{ri}{ri}{it}
+%^^A \DeclareFontShapeChangeRule {n}{ri}{ri}{it}
+%^^A \DeclareFontShapeChangeRule {sl}{ri}{ri}{it}
+% \begin{macrocode}
+\DeclareFontShapeChangeRule {ol} {sc} {scol} {} % <- seiliedig ar nfssext-cfr-nfss.sty \scshape
+\DeclareFontShapeChangeRule {ol} {ulc} {ol} {}
+\DeclareFontShapeChangeRule {ol} {up} {ol} {}
+% \end{macrocode}
+%^^A \DeclareFontShapeChangeRule {ol} {u} {ol} {}
+%^^A \DeclareFontShapeChangeRule {ol} {su} {scol} {}
+% \begin{macrocode}
+\DeclareFontShapeChangeRule {scol} {sc} {scol} {}
+\DeclareFontShapeChangeRule {scol} {ulc} {ol} {}
+\DeclareFontShapeChangeRule {scol} {up} {scol} {}
+% \end{macrocode}
+% \iffalse
+%^^A \DeclareFontShapeChangeRule {scol} {u} {scol} {}
+%^^A \DeclareFontShapeChangeRule {scol} {su} {scol} {}
+%^^A \DeclareFontShapeChangeRule {sc} {sc} {sc} {} % <- ??
+% \fi
+% \begin{macrocode}
+\DeclareFontShapeChangeRule {u}{sc}{su}{} % <- seiliedig ar nfssext-cfr-nfss.sty \scshape
+\DeclareFontShapeChangeRule {su}{ulc}{u}{}
+\DeclareFontShapeChangeRule {sc}{u}{su}{}
+\DeclareFontShapeChangeRule {su}{u}{su}{}
+\DeclareFontShapeChangeRule {su}{sc}{su}{}
+% \end{macrocode}
+%^^A \DeclareFontShapeChangeRule {u} {ulc} {u} {} % <- ??
+%^^A \DeclareFontShapeChangeRule {u} {up} {u} {} % <- ??
+%^^A \DeclareFontShapeChangeRule {su} {sc} {su} {} % <- ??
+%^^A \DeclareFontShapeChangeRule {su} {ulc} {u} {} % <- ??
+%^^A \DeclareFontShapeChangeRule {su} {up} {u} {} % <- ??
+% BEGIN added (cfr)
+%
+% cfr: is this how outline shapes should be handled?
+% \begin{macro}{\oldefault,\olshape,\scoldefault,\scolshape}
+% Outline
+% \begin{macrocode}
+\newcommand*{\oldefault}{ol}% anniffiniedig
+\DeclareRobustCommand{\olshape}{%% anniffiniedig
+ \exfs@try@shapeshift{ol}}
+\newcommand*{\scoldefault}{scol}% anniffiniedig
+\DeclareRobustCommand{\scolshape}{%% anniffiniedig
+ \exfs@try@shapeshift{scol}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\udefault,\ushape,\scudefault,\scushape}
+% Underlined??
+%^^A\DeclareRobustCommand{\olshape}{%
+%^^A \not@math@alphabet\olshape\relax
+%^^A \exfs@merge@shape{\oldefault}{\scdefault}{\scoldefault}}
+% Fudge <- ??
+% \begin{macrocode}
+\newcommand*{\udefault}{u}% anniffiniedig
+\DeclareRobustCommand{\ushape}{%% anniffiniedig
+ \exfs@try@shapeshift{u}}
+\newcommand*{\scudefault}{su}% anniffiniedig
+\DeclareRobustCommand{\scushape}{%% anniffiniedig
+ \exfs@try@shapeshift{scu}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\uidefault,\uishape,\ridefault,\rishape}
+% Upright and reverse italic
+% \begin{macrocode}
+\newcommand*{\uidefault}{ui}% anniffiniedig
+\DeclareRobustCommand{\uishape}{% anniffiniedig
+ \exfs@try@shapeshift{ui}}
+% \end{macrocode}
+% Can i do this for reverse italic?
+% \begin{macrocode}
+\newcommand*{\ridefault}{ri}% anniffiniedig
+\DeclareRobustCommand{\rishape}{% anniffiniedig
+ \exfs@try@shapeshift{ri}}
+% \end{macrocode}
+% \end{macro}
+% END added
+%^^A \newcommand*{\exfs@merge@shape}[3]{%
+%^^A \edef\exfs@tempa{#1}%
+%^^A \edef\exfs@tempb{#2}%
+%^^A \ifx\f@shape\exfs@tempb
+%^^A \expandafter\ifx\csname\f@encoding/\f@family/\f@series/#3\endcsname\relax
+%^^A \else
+%^^A \edef\exfs@tempa{#3}%
+%^^A \fi
+%^^A \fi
+%^^A \fontshape{\exfs@tempa}\selectfont}
+% BEGIN added (cfr) - merge width changes into series
+%^^A \newcommand*{\exfs@font@width}{% ??
+%^^A \edef\exfs@tempf{\expandafter\exfs@first\f@series\@nil }%
+%^^A \edef\exfs@temppart{\expandafter\exfs@part\f@series\@nil }%
+%^^A \ifx\exfs@temppart\@empty
+%^^A \def\exfs@width{}
+%^^A \else
+%^^A \edef\exfs@temps{\expandafter\exfs@second\f@series\@nil }%
+%^^A \ifx\exfs@temps{b}
+%^^A \edef\exfs@width{\expandafter\exfs@part\exfs@temps\@nil }%
+%^^A \else
+%^^A \ifx\exfs@temps{l}
+%^^A \edef\exfs@width{\expandafter\exfs@part\exfs@temps\@nil }%
+%^^A \else
+%^^A \edef\exfs@width{\exfs@temppart}%
+%^^A \fi
+%^^A \fi
+%^^A \fi
+%^^A \exfs@width
+%^^A }
+%
+% \begin{macro}{\exfs@merge@width}
+% Previously dependent on incorrect series names.
+% \changes{v1.0}{2024-09-16}{Do not depend on incorrect series names, which are no longer supported.}
+% \begin{macrocode}
+\newcommand*{\exfs@merge@width}[1]{%
+% \end{macrocode}
+%^^A \edef\exfs@temph{#1}%
+%^^A \edef\exfs@tempf{\expandafter\exfs@first\f@series\@nil }%
+%^^A \edef\exfs@temppart{\expandafter\exfs@part\f@series\@nil }%
+%^^A \def\tempb{b}%
+%^^A \def\templ{l}%
+% cfr-added
+%
+% Dibynnodd y côd gwreiddiol ar *mc* etc. \& r'odd hynny'n anghywir
+%
+% Instead of merging or unmerging cyclically, which means keeping track of everything, we split the current series (which requires some juggling, but hopefully less) and use the results.
+% \begin{macrocode}
+ \exfs@series@splitter{\f@series}%
+ \edef\exfs@temph{#1}%
+ \if\exfs@temph m\ifx\exfs@weight\@empty\else\let\exfs@temph\@empty\fi\fi
+ \if\exfs@weight m\ifx\exfs@temph\@empty\else\let\exfs@weight\@empty\fi\fi
+ \edef\exfs@series{\exfs@weight\exfs@temph}%
+% \end{macrocode}
+% end cfr-added
+%^^A \ifx\exfs@tempf\tempm\edef\exfs@tempf{}\fi %
+%^^A \ifx\exfs@temppart\@empty
+%^^A \def\exfs@series{\expandafter\exfs@tempf\exfs@temph}%
+%^^A \else
+%^^A \edef\exfs@temps{\expandafter\exfs@second\f@series\@nil }%
+%^^A \ifx\exfs@temps\tempb
+%^^A \def\exfs@series{\expandafter\exfs@tempf\exfs@temps\exfs@temph}%
+%^^A \else
+%^^A \ifx\exfs@temps\templ
+%^^A \def\exfs@series{\expandafter\exfs@tempf\exfs@temps\exfs@temph}%
+%^^A \else
+%^^A \def\exfs@series{\expandafter\exfs@tempf\exfs@temph}%
+%^^A \fi
+%^^A \fi
+%^^A \fi
+%^^A \edef\tempy{\exfs@series}\show\tempy
+% \begin{macrocode}
+ \exfs@info{Trying \exfs@series}%
+ \exfs@try@series{\exfs@series}}
+% \end{macrocode}
+% \end{macro}
+%^^A \fontseries\exfs@series\selectfont}
+%^^A \newcommand*{\exfs@unmerge@width}{%
+%^^A \edef\exfs@tempf{\expandafter\exfs@first\f@series\@nil }%
+%^^A \edef\exfs@temppart{\expandafter\exfs@part\f@series\@nil }%
+%^^A \def\tempb{b}%
+%^^A \def\templ{l}%
+%^^A \def\tempe{}%
+%^^A \ifx\exfs@temppart\@empty
+%^^A \def\exfs@series{\expandafter\exfs@tempf}%
+%^^A \else
+%^^A \edef\exfs@temps{\expandafter\exfs@second\f@series\@nil }%
+%^^A \ifx\exfs@temps\tempb
+%^^A \def\exfs@series{\expandafter\exfs@tempf\exfs@temps}%
+%^^A \else
+%^^A \ifx\exfs@temps\templ
+%^^A \def\exfs@series{\expandafter\exfs@tempf\exfs@temps}%
+%^^A \else
+%^^A \def\exfs@series{\expandafter\exfs@tempf}%
+%^^A \fi
+%^^A \fi
+%^^A \fi
+%^^A \ifx\tempe\exfs@series\def\exfs@series{m}\fi % angen efaillai?
+%^^A \exfs@try@series{\exfs@series}}
+% \begin{macro}{\regwidth}
+% ‘Regular’ width requires conditionally adding ‘m’.
+% \begin{macrocode}
+\DeclareRobustCommand{\regwidth}{%% anniffiniedig
+ \not@math@alphabet\regwidth\relax
+% \end{macrocode}
+% cfr altered
+% \begin{macrocode}
+ \exfs@merge@width{m}}
+% \end{macrocode}
+%^^A \exfs@unmerge@width}
+% \end{macro}
+% \begin{macro}{\nwdefault,\nwwidth,\cddefault,\cdwidth,\ecdefault,\ecwidth,\ucdefault,\ucwidth}
+% Condensed widths.
+% \begin{macrocode}
+\newcommand*{\nwdefault}{c}% anniffiniedig
+\DeclareRobustCommand{\nwwidth}{%% anniffiniedig ond rheolau
+ \not@math@alphabet\nwwidth\relax
+ \exfs@merge@width{\nwdefault}}% neu \exfs@try@series ?
+\newcommand*{\cddefault}{c}% anniffiniedig
+\DeclareRobustCommand{\cdwidth}{% anniffiniedig ond rheolau
+ \not@math@alphabet\cdwidth\relax
+ \exfs@merge@width{\cddefault}}% neu \exfs@try@series ?
+\newcommand*{\ecdefault}{ec}% anniffiniedig
+\DeclareRobustCommand{\ecwidth}{%% anniffiniedig ond rheolau
+ \not@math@alphabet\ecwidth\relax
+ \exfs@merge@width{\ecdefault}}% neu \exfs@try@series ?
+\newcommand*{\ucdefault}{uc}% anniffiniedig
+\DeclareRobustCommand{\ucwidth}{%% anniffiniedig
+ \not@math@alphabet\ucwidth\relax
+ \exfs@merge@width{\ucdefault}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\etdefault,\etwidth,\epdefault,\epwidth,\exdefault,\exwidth,\uxdefault,\uxwidth}
+% Extended/expanded widths.
+% \begin{macrocode}
+\newcommand*{\etdefault}{x}% anniffiniedig
+\DeclareRobustCommand{\etwidth}{%% anniffiniedig
+ \not@math@alphabet\etwidth\relax
+ \exfs@merge@width{\etdefault}}% neu \exfs@try@series ?
+\newcommand*{\epdefault}{x}% anniffiniedig
+\DeclareRobustCommand{\epwidth}{%% anniffiniedig ond rheolau
+ \not@math@alphabet\epwidth\relax
+ \exfs@merge@width{\epdefault}}% neu \exfs@try@series ?
+\newcommand*{\exdefault}{ex}% anniffiniedig
+\DeclareRobustCommand{\exwidth}{%% anniffiniedig
+ \not@math@alphabet\exwidth\relax
+ \exfs@merge@width{\exdefault}}
+\newcommand*{\uxdefault}{ux}% anniffiniedig
+\DeclareRobustCommand{\uxwidth}{%% anniffiniedig
+ \not@math@alphabet\uxwidth\relax
+ \exfs@merge@width{\uxdefault}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\mdwdefault,\mdwidth}
+% Medium.
+% \begin{macrocode}
+\newcommand*\mdwdefault{m}
+\DeclareRobustCommand{\mdwidth}{%% anniffiniedig
+ \not@math@alphabet\mdwidth\relax
+ \exfs@merge@width{\mdwdefault}}
+% \end{macrocode}
+% \end{macro}
+% Posibl ond bydda i'n colli achosion yn siwr.
+% \textbar{} Possible but I'd lose cases for sure.
+% Hefyd hoffwn i ddim dyfalu pa rheolau y bydden nhw eu dewis.
+% \textbar{} Also I wouldn't like to guess which rules they'll choose.
+%^^A \DeclareFontSeriesChangeRule {bc}{ux}{bux}{bc}
+%^^A \DeclareFontSeriesChangeRule {bx}{ux}{bux}{bx}
+%^^A \DeclareFontSeriesChangeRule {b}{ux} {bux} {b}
+%^^A \DeclareFontSeriesChangeRule {c}{ux}{ux}{m}
+%^^A \DeclareFontSeriesChangeRule {ebc}{ux}{ebux}{}
+%^^A \DeclareFontSeriesChangeRule {ec}{ux}{ux}{m}
+%^^A \DeclareFontSeriesChangeRule {sc}{ux}{ux}{m}
+%^^A \DeclareFontSeriesChangeRule {ebx}{ux}{ebux}{ebx}
+%^^A \DeclareFontSeriesChangeRule {eb}{ux}{ebux}{}
+%^^A \DeclareFontSeriesChangeRule {elc}{ux}{elux}{}
+%^^A \DeclareFontSeriesChangeRule {elx}{ux}{elux}{elx}
+%^^A \DeclareFontSeriesChangeRule {el}{ux}{elux}{}
+%^^A \DeclareFontSeriesChangeRule {lc}{ux}{lux}{}
+%^^A \DeclareFontSeriesChangeRule {lx}{ux}{lux}{lx}
+%^^A \DeclareFontSeriesChangeRule {l}{ux} {lux} {l}
+%^^A \DeclareFontSeriesChangeRule {m}{ux} {ux} {m}
+%^^A \DeclareFontSeriesChangeRule {sbc}{ux}{sbux}{}
+%^^A \DeclareFontSeriesChangeRule {sbx}{ux}{sbux}{sbx}
+%^^A \DeclareFontSeriesChangeRule {sb}{ux} {sbux} {}
+%^^A \DeclareFontSeriesChangeRule {slc}{ux}{slux}{}
+%^^A \DeclareFontSeriesChangeRule {sl}{ux}{slux}{}
+%^^A \DeclareFontSeriesChangeRule {ubc}{ux}{ubux}{}
+%^^A \DeclareFontSeriesChangeRule {ubx}{ux}{ubux}{ubx}
+%^^A \DeclareFontSeriesChangeRule {ub}{ux}{ubux}{}
+%^^A \DeclareFontSeriesChangeRule {ulc}{ux}{ulux}{}
+%^^A \DeclareFontSeriesChangeRule {ulx}{ux}{ulux}{ulx}
+%^^A \DeclareFontSeriesChangeRule {ul}{x}{ulx}{}
+%^^A \DeclareFontSeriesChangeRule {x}{ul}{ulx}{}
+%^^A \DeclareFontSeriesChangeRule {ux}{m?}{ux}{}
+%^^A \DeclareFontSeriesChangeRule {ux}{?m}{m}{}
+%
+% BEGIN added (cfr) merge weight changes into series
+%
+% \begin{macro}{\exfs@merge@weight}
+% The pay off for setting up series splitting is that we can reuse the method here and, as in the case of width, the definition is greatly simplified\footnote{%
+% At least if you don't look at the splitter code.}.
+% \begin{macrocode}
+\newcommand*{\exfs@merge@weight}[1]{%
+ \exfs@series@splitter{\f@series}%
+% \end{macrocode}
+% Save current series so we can test for change
+% \begin{macrocode}
+ \let\exfs@tempg\f@series
+ \def\exfs@temph{#1}%
+ \if\exfs@temph m\relax
+ \ifx\exfs@width\@empty\relax
+ \else
+ \let\exfs@temph\@empty
+ \fi
+ \fi
+ \edef\exfs@series{\exfs@temph\exfs@width}%
+ \ifx\exfs@temph\exfs@series
+ \exfs@info{Trying \exfs@series}%
+ \exfs@try@series{\exfs@series}%
+ \else
+ \exfs@info{Trying \exfs@series, favouring \exfs@weight}%
+ \exfs@try@series[\exfs@weight]{\exfs@series}% assume user wants to change weight even if this changes back to the default width
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%^^A Meddwl bod y côd hwn yn dibynnu ar y problem 'm' eto
+%^^A Ond alla i ddim jest ychwanegu un
+%^^A \edef\exfs@tempg{#1}%
+%^^A \edef\exfs@tempf{\expandafter\exfs@first\f@series\@nil }%
+%^^A \edef\exfs@temppart{\expandafter\exfs@part\f@series\@nil }%
+%^^A \def\templ{l}%
+%^^A \def\tempb{b}%
+%^^A Case when there's no second part, so the single character must be the weight and should be replaced
+%^^A \ifx\exfs@temppart\@empty
+%^^A \def\exfs@series{\expandafter\exfs@tempg}%
+%^^A %:case when there's a second part
+%^^A \else
+%^^A %:get first character of second part
+%^^A \edef\exfs@temps{\expandafter\exfs@second\f@series\@nil }%
+%^^A \edef\exfs@tempw{\expandafter\exfs@part\exfs@temps\@nil }%
+%^^A %:is the first character b? if so, it is part of the weight and should be replaced
+%^^A \ifx\exfs@temps\tempb
+%^^A \def\exfs@series{\expandafter\exfs@tempg\exfs@tempw}%
+%^^A \else
+%^^A %:is the first character l? if so, it is part of the weight and should be replaced
+%^^A \ifx\exfs@temps\templ
+%^^A \def\exfs@series{\expandafter\exfs@tempg\exfs@tempw}%
+%^^A \else
+%^^A %:o/w the first character is part of the width and should be retained
+%^^A \def\exfs@series{\expandafter\exfs@tempg\exfs@temppart}%
+%^^A \fi
+%^^A \fi
+%^^A \fi
+%^^A %\fontseries\exfs@series\selectfont}
+%^^A \ifx\exfs@tempg\exfs@series
+%^^A \exfs@try@series{\exfs@series}%
+%^^A \else
+%^^A \exfs@try@series[\exfs@tempg]{\exfs@series}% assume user wants to change weight even if this changes back to the default width
+%^^A \fi}
+% \begin{macro}{\mbdefault,\mbweight,\bddefault,\bfweight,\bdweight}
+% Ref.: \file{sources2e.pdf} and/or stripped code in \path{base}.
+%
+% The annotation ‘anniffiniedig’ indicates the macro is \emph{not} defined by the kernel as of 2024.
+% The addition ‘ond rheolau’ means there are nonetheless relevant rules.
+% The comment ‘dim byd i'w gael eu wneud yma’ indicates that defining the default is now sufficient and no additional font switch or text command is required.
+% \begin{macrocode}
+\newcommand*{\mbdefault}{sb}% dim byd i'w gael ei wneud yma
+\DeclareRobustCommand{\mbweight}{%% anniffiniedig
+ \not@math@alphabet\mbweight\relax
+ \exfs@merge@weight{\mbdefault}}
+\newcommand*{\bddefault}{b}% dim byd i'w gael ei wneud yma
+\DeclareRobustCommand{\bfweight}{%% anniffiniedig
+ \not@math@alphabet\bfweight\relax
+ \exfs@merge@weight{\bddefault}}
+\DeclareRobustCommand{\bdweight}{%% anniffiniedig
+ \not@math@alphabet\bdweight\relax
+ \exfs@merge@weight{\bddefault}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\mwdefault,\mdweight}
+% Regular, medium, default are all irregular, exceptional, fraught.
+% \begin{macrocode}
+\newcommand*\mwdefault{m}
+\DeclareRobustCommand{\mdweight}{%% anniffiniedig
+ \not@math@alphabet\mdweight\relax
+ \exfs@merge@weight{\mwdefault}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\dbdefault,\dbweight,\sbdefault,\sbweight,\ebdefault,\ebweight,\ubdefault,\ubweight}
+% \changes{v1.0}{2024-09-16}{%
+% Make \cs{mbdefault} sb (duplicating \cs{sbdefault}) as I can't come up with anything better.}
+% Heavy weights.
+% \begin{macrocode}
+\newcommand*{\dbdefault}{db}% anniffiniedig
+\DeclareRobustCommand{\dbweight}{%% anniffiniedig
+ \not@math@alphabet\dbweight\relax
+ \exfs@merge@weight{\dbdefault}}
+\newcommand*{\sbdefault}{sb}% anniffiniedig
+\DeclareRobustCommand{\sbweight}{%% anniffiniedig ond rheolau
+ \not@math@alphabet\sbweight\relax
+ \exfs@merge@weight{\sbdefault}}% neu \exfs@try@series ?
+\newcommand*{\ebdefault}{eb}% anniffiniedig
+\DeclareRobustCommand{\ebweight}{%% anniffiniedig ond rheolau
+ \not@math@alphabet\ebweight\relax
+ \exfs@merge@weight{\ebdefault}}% neu \exfs@try@series ?
+\newcommand*{\ubdefault}{ub}% anniffiniedig
+\DeclareRobustCommand{\ubweight}{%% anniffiniedig ond rheolau
+ \not@math@alphabet\ubweight\relax
+ \exfs@merge@weight{\ubdefault}}% neu \exfs@try@series ?
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\lgdefault,\lgweight,\eldefault,\elweight,\uldefault,\ulweight}
+% Light weights.
+% \begin{macrocode}
+\newcommand*{\lgdefault}{l}% anniffiniedig
+% \end{macrocode}
+% Note - use this if light is a variant weight, rather than a separate family
+% \begin{macrocode}
+\DeclareRobustCommand{\lgweight}{%% anniffiniedig ond rheolau
+ \not@math@alphabet\lgweight\relax
+ \exfs@merge@weight{\lgdefault}}% neu \exfs@try@series ?
+\newcommand*{\eldefault}{el}% anniffiniedig
+\DeclareRobustCommand{\elweight}{%% anniffiniedig ond rheolau
+ \not@math@alphabet\elweight\relax
+ \exfs@merge@weight{\eldefault}}% neu \exfs@try@series ?
+\newcommand*{\uldefault}{ul}% anniffiniedig
+\DeclareRobustCommand{\ulweight}{%% anniffiniedig ond rheolau
+ \not@math@alphabet\ulweight\relax
+ \exfs@merge@weight{\uldefault}}% neu \exfs@try@series ?
+% \end{macrocode}
+% \end{macro}
+% END added
+%^^A \DeclareRobustCommand{\itshape}{%
+%^^A \not@math@alphabet\itshape\mathit
+%^^A \exfs@merge@shape{\itdefault}{\scdefault}{\sidefault}}
+% Original
+%^^A\DeclareRobustCommand{\scshape}{%
+%^^A \not@math@alphabet\scshape\relax
+%^^A \exfs@merge@shape{\scdefault}{\itdefault}{\sidefault}}
+%^^A BEGIN cfr-altered: \scshape
+%^^A \DeclareRobustCommand{\scshape}{%
+%^^A \not@math@alphabet\scshape\relax
+%^^A \def\tempu{u}%
+%^^A \def\tempo{ol}%
+%^^A \ifx\f@shape\tempu
+%^^A \exfs@merge@shape{\scdefault}{\udefault}{\scudefault}%
+%^^A \else
+%^^A \ifx\f@shape\tempo
+%^^A \exfs@merge@shape{\scdefault}{\oldefault}{\scoldefault}%
+%^^A \else
+%^^A \exfs@merge@shape{\scdefault}{\itdefault}{\sidefault}%
+%^^A \fi
+%^^A \fi}
+%^^A END end-altered
+%^^A \DeclareRobustCommand{\upshape}{%
+%^^A \not@math@alphabet\upshape\relax
+%^^A \exfs@merge@shape{\updefault}{\sidefault}{\scdefault}}
+% \begin{macro}{\dfshape}
+% Something simpler.
+% \begin{macrocode}
+\let\dfshape\normalshape
+% \end{macrocode}
+% \end{macro}
+%^^A \DeclareRobustCommand{\dfshape}{%
+%^^A \not@math@alphabet\dfshape\relax
+%^^A \fontshape\shapedefault\selectfont}
+% \begin{macro}{\swashapedefault}
+% cfr: be' i wneud am hwn?
+% \begin{macrocode}
+\newcommand*{\swshapedefault}{\itdefault}
+% \end{macrocode}
+% \end{macro}
+% \LaTeX{} ddim yn cynnwys \cs{swstyle} felly \dots?
+% \textbar{} \LaTeX{} doesn't include \cs{swstyle} so \dots?
+% \begin{macrocode}
+\ExplSyntaxOn
+\hook_gput_code:nnn {begindocument}{.}
+{% compatibility with original nfss \swshape
+% \end{macrocode}
+% Note this doesn't affect \cs{swashstyle} or \cs{textswash}
+% \begin{macro}{\swshape}
+% \changes{v1.0}{2024-09-16}{%
+% Conditionally overwrite \cs{swshape} to take account of default setting.
+% This is not for any package I know of on \ctan, but the original code used \cs{textsw}.%
+% }%
+% Conditional definition.
+% We overwrite the kernel's definition either way.
+% The \texttt{compat} option determines only with what we overwrite it.
+% \begin{macrocode}
+ \bool_if:NTF \g__exfs_compat_bool
+ {
+ \DeclareRobustCommand{\swshape}
+ {
+ \not@math@alphabet\swshape\relax
+ \swstyle\fontshape\swshapedefault\selectfont
+ }
+ \PackageWarning{nfssext-cfr}{
+ Overwriting ~ kernel ~ definition ~ of ~ \swshape \space (compat)
+ }
+ }{
+ \DeclareRobustCommand \swshape
+ {
+ \not@math@alphabet\swshape\relax
+ \exfs@swshape
+ }
+ \PackageWarning{nfssext-cfr}{
+ Overwriting ~ kernel ~ definition ~ of ~ \swshape \space (new)
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\textin}
+% Conditional definition.
+% \begin{macrocode}
+ \@ifpackageloaded{hyperref}{
+ \hook_gput_code:nnn { cmd/textin/before } { . }
+ {
+ \exfs@info{
+ Note ~ that ~ '\protect\textin' ~ is ~ defined ~ by ~ hyperref.\MessageBreak
+ Use ~ for ~ inferior ~ digits ~ will ~ yield ~ an\MessageBreak
+ undefined ~ command ~ error ~ in ~ document ~ font ~ encodings.\MessageBreak
+ Use ~ '\protect\textinf' ~ to ~ access ~ inferior ~ digits
+ }
+ }
+ }{
+ \DeclareTextFontCommand{\textin}{\infstyle}
+ }
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+}
+\ExplSyntaxOff
+% \end{macrocode}
+% \begin{macro}{\textln,\textos,\textinf,\textsu,\textsi,\textdf}
+% The annotation ‘anniffiniedig’ indicates the macro is \emph{not} defined by the kernel as of 2024.
+% \begin{macrocode}
+\DeclareTextFontCommand{\textln}{\lnstyle}% anniffiniedig
+\DeclareTextFontCommand{\textos}{\osstyle}% anniffiniedig
+\DeclareTextFontCommand{\textinf}{\infstyle}% anniffiniedig
+\DeclareTextFontCommand{\textsu}{\sustyle}% anniffiniedig
+\DeclareTextFontCommand{\textsi}{\sishape}% anniffiniedig
+\DeclareTextFontCommand{\textdf}{\dfshape}% anniffiniedig
+% \end{macrocode}
+% \end{macro}
+% \cs{textsw} is already defined on newer kernels with essentially the same meaning as \lpack{nfssext} originally gave it, so we remove the definition here.
+% However, the redefinition of \cs{swshape} means \cs{textsw} is effectively redefined, so the kernel definition is only technically retained.
+%
+% BEGIN added (cfr)
+%
+% \begin{macro}{\textti,\textlt,\textof,\textalt,\textreg,\emboss,\textorn,\textqt,\textsh,\texttm,\texttv}
+% Families
+% \begin{macrocode}
+\DeclareTextFontCommand{\textti}{\tistyle}% anniffiniedig
+\DeclareTextFontCommand{\textlt}{\ltstyle}% anniffiniedig
+\DeclareTextFontCommand{\textof}{\ofstyle}% anniffiniedig % open-face (or outline or blank) style
+\DeclareTextFontCommand{\textalt}{\altstyle}% anniffiniedig % alternative style
+\DeclareTextFontCommand{\textreg}{\regstyle}% anniffiniedig % `regular' style
+\DeclareTextFontCommand{\emboss}{\embossstyle}% anniffiniedig
+\DeclareTextFontCommand{\textorn}{\ornamentalstyle}% anniffiniedig % intended primarily for decorative initials etc.
+\DeclareTextFontCommand{\textqt}{\qtstyle}% anniffiniedig
+\DeclareTextFontCommand{\textsh}{\shstyle}% anniffiniedig % shadowed style
+\DeclareTextFontCommand{\texttm}{\tmstyle}% anniffiniedig
+\DeclareTextFontCommand{\texttv}{\tvstyle}% anniffiniedig
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\textl,\texto,\textp,\textt,\textpl,\textpo,\texttl,\textto}
+% Families - figures
+% \begin{macrocode}
+\DeclareTextFontCommand{\textl}{\lstyle}% anniffiniedig
+\DeclareTextFontCommand{\texto}{\ostyle}% anniffiniedig
+\DeclareTextFontCommand{\textp}{\pstyle}% anniffiniedig
+\DeclareTextFontCommand{\textt}{\tstyle}% anniffiniedig
+\DeclareTextFontCommand{\textpl}{\plstyle}% anniffiniedig
+\DeclareTextFontCommand{\textpo}{\postyle}% anniffiniedig
+\DeclareTextFontCommand{\texttl}{\tlstyle}% anniffiniedig
+\DeclareTextFontCommand{\textto}{\tostyle}% anniffiniedig
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\textol,\textswash,\textu,\textscu,\textui,\textri}
+% Shapes
+% \begin{macrocode}
+\DeclareTextFontCommand{\textol}{\olshape}% anniffiniedig % outline
+\DeclareTextFontCommand{\textswash}{\swashstyle}% anniffiniedig % an attempt to improve on \textsw
+\DeclareTextFontCommand{\textu}{\ushape}% anniffiniedig % be' yw hwn?! <_ underlined?
+\DeclareTextFontCommand{\textscu}{\scushape}% anniffiniedig
+\DeclareTextFontCommand{\textui}{\uishape}% anniffiniedig % upright italic
+\DeclareTextFontCommand{\textri}{\rishape}% anniffiniedig % reverse italic
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\textnw,\textcd,\textec,\textuc,\textet,\textep,\textex,\textux,\textrw}
+% Widths
+% \begin{macrocode}
+\DeclareTextFontCommand{\textnw}{\nwwidth}% anniffiniedig
+\DeclareTextFontCommand{\textcd}{\cdwidth}% anniffiniedig
+\DeclareTextFontCommand{\textec}{\ecwidth}% anniffiniedig
+\DeclareTextFontCommand{\textuc}{\ucwidth}% anniffiniedig
+\DeclareTextFontCommand{\textet}{\etwidth}% anniffiniedig
+\DeclareTextFontCommand{\textep}{\epwidth}% anniffiniedig
+\DeclareTextFontCommand{\textex}{\exwidth}% anniffiniedig
+\DeclareTextFontCommand{\textux}{\uxwidth}% anniffiniedig
+\DeclareTextFontCommand{\textrw}{\regwidth}% anniffiniedig
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\textmb,\textdb,\textbd,\textsb,\texteb,\textub,\textlg,\textel,\textul}
+% Weights
+% \begin{macrocode}
+\DeclareTextFontCommand{\textmb}{\mbweight}% anniffiniedig
+\DeclareTextFontCommand{\textdb}{\dbweight}% anniffiniedig
+\DeclareTextFontCommand{\textbd}{\bdweight}% new?
+\DeclareTextFontCommand{\textsb}{\sbweight}% anniffiniedig
+\DeclareTextFontCommand{\texteb}{\ebweight}% anniffiniedig
+\DeclareTextFontCommand{\textub}{\ubweight}% anniffiniedig
+\DeclareTextFontCommand{\textlg}{\lgweight}% anniffiniedig
+\DeclareTextFontCommand{\textel}{\elweight}% anniffiniedig
+\DeclareTextFontCommand{\textul}{\ulweight}% anniffiniedig
+% \end{macrocode}
+% \end{macro}
+% END added
+%
+% BEGIN patch font initialisation for Latin Modern
+%
+% Stop redefinition of bold if using Latin Modern as \texttt{clm}.
+% Kernel default only blocks redefinition for \texttt{lm}.
+% Don't rely on \lpack{cfr-lm} internal macros as they may change without notice \dots{}.
+% We don't need Dunhill, though, because it doesn't have bold of any kind.
+% \lpack{cfr-lm} doesn't support using Quotation Sans as default or using e.g.~serif as default sans, but there's nothing to stop somebody doing that so follow the kernel here even though it makes for a massive list\footnote{%
+% I know this will go off the page when typeset, but I have no idea whether I can safely insert line breaks into the patch and I shall scream if I break this again. (Pun fully intended.)%
+% }.
+% \begin{macrocode}
+\patchcmd{\init@series@setup}{cmr,cmss,cmtt,lcmss,lcmtt,lmr,lmss,lmtt}{cmr,cmss,cmtt,lcmss,lcmtt,lmr,lmss,lmtt,clm,clm2,clm2j,clmj,clm2js,clm2s,clmjs,clms,clm2jt,clm2t,clmjt,clmt,clm2jv,clm2v,clmjv,clmv,clm2jqs,clm2qs,clmjqs,clmqs}{%
+ \PackageWarning{nfssext-cfr}{%
+ Patching font initialisation macro for serif.%
+ }%
+}{%
+ \PackageWarning{nfssext-cfr}{%
+ Failed to patch font initialisation macro for serif.%
+ }%
+}
+\patchcmd{\init@series@setup}{{cmr,cmss,cmtt,lcmss,lcmtt,lmr,lmss,lmtt}}{{cmr,cmss,cmtt,lcmss,lcmtt,lmr,lmss,lmtt,clm,clm2,clm2j,clmj,clm2js,clm2s,clmjs,clms,clm2jt,clm2t,clmjt,clmt,clm2jv,clm2v,clmjv,clmv,clm2jqs,clm2qs,clmjqs,clmqs}}{%
+ \PackageWarning{nfssext-cfr}{%
+ Patching font initialisation macro for sans.%
+ }%
+}{%
+ \PackageWarning{nfssext-cfr}{%
+ Failed to patch font initialisation macro for sans.%
+ }%
+}
+\patchcmd{\init@series@setup}{{cmr,cmss,cmtt,lcmss,lcmtt,lmr,lmss,lmtt}}{{cmr,cmss,cmtt,lcmss,lcmtt,lmr,lmss,lmtt,clm,clm2,clm2j,clmj,clm2js,clm2s,clmjs,clms,clm2jt,clm2t,clmjt,clmt,clm2jv,clm2v,clmjv,clmv,clm2jqs,clm2qs,clmjqs,clmqs}}{%
+ \PackageWarning{nfssext-cfr}{%
+ Patching font initialisation macro for typewriter.%
+ }%
+}{%
+ \PackageWarning{nfssext-cfr}{%
+ Failed to patch font initialisation macro for typewriter.%
+ }%
+}
+% \end{macrocode}
+% END
+% \end{package}
+% \iffalse
+%</sty-nnfss>
+% \fi
+%
+% \subsection{NFSS}\label{subsec:sty-nfss}
+%
+% This code was written for the \emph{old} New Font Selection Scheme (\nfss).
+% It should not generally be loaded on current or recent kernels.
+%
+% \iffalse
+%<*sty-nfss>
+% \fi
+% \begin{package}{nfssext-cfr-nfss}
+% \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}
+\RequirePackage{svn-prov}
+\ProvidesPackageSVN[\filebase-nfss.sty]{$Id: nfssext-cfr.dtx 10366 2024-09-18 14:25:21Z cfrees $}[v1.0 \revinfo{} specially mangled by cfr; based on 2003/03/14 v1.2 Experimental NFSS Extensions; for old NFSS]
+\DefineFileInfoSVN
+% \end{macrocode}
+% ^^A Paid â defnyddio \GetFileInfoSVN*/\GetFileInfoSVN{} yn y fan hon!!
+%:cfr-added: use ifthen
+% \begin{macrocode}
+\RequirePackage{ifthen}
+% \end{macrocode}
+%:end-added
+% \begin{macro}{\exfs@tempa,\exfs@tempb,\exfs@tempf}
+% \begin{macrocode}
+\newcommand*{\exfs@tempa}{}
+\newcommand*{\exfs@tempb}{}
+% \end{macrocode}
+%:cfr-added: extra variable (\cs{exfs@tempf})
+% \begin{macrocode}
+\newcommand*{\exfs@tempf}{}
+% \end{macrocode}
+% \end{macro}
+%:end-added
+% \begin{macro}{\exfs@try@family}
+% \mbox{ }
+% \begin{macrocode}
+\newcommand*{\exfs@try@family}[2][]{%
+ \let\exfs@tempa\relax
+ \begingroup
+ \fontfamily{#2}\try@load@fontshape
+ \expandafter\ifx\csname\curr@fontshape\endcsname\relax
+ \edef\exfs@tempa{#1}%
+ \ifx\exfs@tempa\@empty
+ \PackageWarning{nfssext}{%
+ Font family '\f@encoding/#2' not available\MessageBreak
+ Ignoring font switch}%
+ \else
+ \PackageInfo{nfssext}{%
+ Font family '\f@encoding/#2' not available\MessageBreak
+ Font family '\f@encoding/#1' tried instead}%
+ \exfs@try@family{#1}%
+ \fi
+ \else
+ \gdef\exfs@tempa{\fontfamily{#2}\selectfont}%
+ \fi
+ \endgroup
+ \exfs@tempa}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\exfs@try@series}
+%:cfr-added \cs{exfs@try@series}
+% \begin{macrocode}
+\newcommand*{\exfs@try@series}[2][]{%
+ \let\exfs@tempa\relax
+ \begingroup
+ \fontseries{#2}\try@load@fontshape
+ \expandafter\ifx\csname\curr@fontshape\endcsname\relax
+ \edef\exfs@tempa{#1}%
+ \ifx\exfs@tempa\@empty
+ \PackageWarning{nfssext-cfr}{%
+ Font series '\f@encoding/\f@family/#2' not available\MessageBreak
+ Ignoring font switch}%
+ \else
+ \PackageInfo{nfssext-cfr}{%
+ Font family '\f@encoding/\f@family/#2' not available\MessageBreak
+ Font family '\f@encoding/\f@family/#1' tried instead}%
+ \exfs@try@series{#1}%
+ \fi
+ \else
+ \gdef\exfs@tempa{\fontseries{#2}\selectfont}%
+ \fi
+ \endgroup
+ \exfs@tempa
+}
+% \end{macrocode}
+%:end-added
+% \end{macro}
+% \begin{macro}{\exfs@get@base,\exfs@get@variants,\exfs@next,\exfs@shift,\exfs@first,\exfs@part,\exfs@second}
+% \mbox{ }
+% \begin{macrocode}
+\def\exfs@get@base#1#2#3#4\@nil{#1#2#3}
+% \end{macrocode}
+%:cfr-added:more \cs{exfs@} commands (get@variants, next, shift, first, part, second)
+% \begin{macrocode}
+\def\exfs@get@variants#1#2#3#4\@nil{#4}
+\def\exfs@next#1#2\@nil{#1}
+\def\exfs@shift#1#2\@nil{#2}
+\def\exfs@first#1#2\@nil{#1}
+\def\exfs@part#1#2\@nil{#2}
+\def\exfs@second#1#2#3\@nil{#2}
+% \end{macrocode}
+%:end-added
+% \end{macro}
+% \begin{macro}{\lnstyle,\osstyle,\infstyle,\instyle,\sustyle,\swstyle}
+% \mbox{ }
+% \begin{macrocode}
+\DeclareRobustCommand{\lnstyle}{%
+ \not@math@alphabet\lnstyle\relax
+ \exfs@try@family[\expandafter\exfs@get@base\f@family\@nil]%
+ {\expandafter\exfs@get@base\f@family\@nil x}%
+}
+\DeclareRobustCommand{\osstyle}{%
+ \not@math@alphabet\osstyle\relax
+ \exfs@try@family{\expandafter\exfs@get@base\f@family\@nil j}}
+\DeclareRobustCommand{\instyle}{%
+ \not@math@alphabet\instyle\relax
+ \exfs@try@family{\expandafter\exfs@get@base\f@family\@nil 0}}
+\DeclareRobustCommand{\sustyle}{%
+ \not@math@alphabet\sustyle\relax
+ \exfs@try@family{\expandafter\exfs@get@base\f@family\@nil 1}}
+\DeclareRobustCommand{\swstyle}{%
+ \not@math@alphabet\swstyle\relax
+ \exfs@try@family{\expandafter\exfs@get@base\f@family\@nil w}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\exfs@merge@families}
+%:cfr-added - merge families
+% \begin{macrocode}
+\newcommand*\exfs@merge@families[1]{%
+ \edef\exfs@tempf{#1}%
+ \edef\tempa{\expandafter\exfs@get@variants\f@family\@nil}%
+ \edef\tempo{2j}%
+ \let\exfs@tempq\@empty
+ \def\exfs@tempg{}%
+ \newif\ifadded
+ \addedfalse
+% \end{macrocode}
+% check whether there are variants - if not just use the requested addition
+% \begin{macrocode}
+ \ifx\tempa\@empty
+ \edef\exfs@tempq{\exfs@tempf}%
+ \addedtrue
+ \else
+ \gdef\set{0,1,2,a,d,e,f,h,j,l,p,q,s,t,v,w}% these are the variants to consider - the order here and in the font name is crucial
+ \ifx\tempo\exfs@tempf
+ \@for \xx:=\set \do {%
+% \end{macrocode}
+% check whether there are variants left - if not set the ‘next variant’ to empty
+% \begin{macrocode}
+ \ifx\tempa\@empty
+ \let\exfs@tempn\@empty
+ \else
+% \end{macrocode}
+% o/w get the next variant
+% \begin{macrocode}
+ \edef\exfs@tempn{\expandafter\exfs@next\tempa\@nil}%
+ \fi
+ \edef\tempt{2}%
+ \edef\tempj{j}%
+% \end{macrocode}
+% if the next variant is 2 or j, ignore it
+% \begin{macrocode}
+ \ifx\exfs@tempn\tempt
+ \edef\tempa{\expandafter\exfs@shift\tempa\@nil}%
+ \fi
+ \ifx\exfs@tempn\tempj % if the next variant is j, ignore it
+ \edef\tempa{\expandafter\exfs@shift\tempa\@nil}%
+ \fi
+% \end{macrocode}
+% see if the current value is either 2 or j and add it if so and if needed
+% \begin{macrocode}
+ \ifx\tempt\xx
+ \edef\exfs@tempg{\exfs@tempg\xx}%
+ \else
+ \ifx\tempj\xx % if the current value is j, we're done
+ \edef\exfs@tempq{\exfs@tempg\xx\tempa}%
+ \let\tempa\@empty
+ \addedtrue
+ \else
+% \end{macrocode}
+% o/w see if the current value matches the next variant
+% \begin{macrocode}
+ \ifx\xx\exfs@tempn
+ \edef\exfs@tempg{\exfs@tempg\xx}%
+ \edef\tempa{\expandafter\exfs@shift\tempa\@nil}%
+ \fi
+ \fi
+ \fi
+ }%
+ \else
+ \@for \xx:=\set \do {%
+% \end{macrocode}
+% check whether there are variants left and, if not, add the addition if needed
+% \begin{macrocode}
+ \ifx\tempa\@empty
+ \ifadded
+ \else
+ \edef\exfs@tempq{\exfs@tempg\exfs@tempf}%
+ \addedtrue
+ \fi
+ \else
+% \end{macrocode}
+% o/w get the next variant
+% \begin{macrocode}
+ \edef\exfs@tempn{\expandafter\exfs@next\tempa\@nil}%
+% \end{macrocode}
+% if the new token equals the next variant, combine whatever is saved in \cs{exfs@tempg} with whatever remains in \cs{tempa}
+% \begin{macrocode}
+ \ifx\exfs@tempn\exfs@tempf
+ \edef\exfs@tempq{\exfs@tempg\tempa}%
+ \addedtrue
+ \let\tempa\@empty
+ \else
+% \end{macrocode}
+% o/w, if the current value matches the requested addition, add it in
+% \begin{macrocode}
+ \ifx\exfs@tempf\xx
+ \edef\exfs@tempq{\exfs@tempg\xx\tempa}%
+ \addedtrue
+ \let\tempa\@empty
+ \else
+% \end{macrocode}
+% o/w, if the current value matches the next variant, shift
+% \begin{macrocode}
+ \ifx\exfs@tempn\xx
+ \edef\exfs@tempg{\exfs@tempg\xx}%
+ \edef\tempa{\expandafter\exfs@shift\tempa\@nil}%
+ \fi
+ \fi
+ \fi
+ \fi
+ }%
+ \fi
+ \fi
+ \ifx\exfs@tempq\@empty
+ \PackageError{nfssext-cfr}{Something is wrong here. Ignoring font switching command.}{}%
+ \else
+ \exfs@try@family{\expandafter\exfs@get@base\f@family\@nil \exfs@tempq}%
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pstyle,\ostyle,\postyle,\tistyle}
+% \begin{macrocode}
+\DeclareRobustCommand{\pstyle}{% proportional figures
+ \not@math@alphabet\pstyle\relax
+ \exfs@merge@families{2}}
+\DeclareRobustCommand{\tistyle}{% titling/display
+ \not@math@alphabet\tistyle\relax
+ \exfs@merge@families{d}}
+\DeclareRobustCommand{\ostyle}{% oldstyle figures (cf. original osstyle above)
+ \not@math@alphabet\ostyle\relax
+ \exfs@merge@families{j}}
+% \end{macrocode}
+% combined command for proportional oldstyle
+% \begin{macrocode}
+\DeclareRobustCommand{\postyle}{%
+ \not@math@alphabet\postyle\relax
+ \exfs@merge@families{2j}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ltstyle,\ofstyle,\altstyle,\regstyle,\embossstyle,\ornamentalstyle,\swashstyle,\shstyle,\qtstyle}
+%note that this command is for use when the light version is a separate family rather than a weight variant (e.g. when you've got light, light bold etc. as well as regular weights)
+% \begin{macrocode}
+\DeclareRobustCommand{\ltstyle}{%
+ \not@math@alphabet\ltstyle\relax
+ \exfs@merge@families{l}}
+% \end{macrocode}
+%let's hope there aren't any fonts with a light family *and* an outline/openface/blank version
+% \begin{macrocode}
+\DeclareRobustCommand{\ofstyle}{%
+ \not@math@alphabet\ofstyle\relax
+ \exfs@merge@families{l}}
+\DeclareRobustCommand{\altstyle}{% alternative style
+ \not@math@alphabet\altstyle\relax
+ \exfs@merge@families{a}}
+\DeclareRobustCommand{\regstyle}{% ``regular'' style
+ \not@math@alphabet\regstyle\relax
+ \exfs@try@family{\expandafter\exfs@get@base\f@family\@nil}}
+\DeclareRobustCommand{\embossstyle}{%
+ \not@math@alphabet\embossstyle\relax
+ \exfs@merge@families{e}}
+\DeclareRobustCommand{\ornamentalstyle}{% intended primarily for decorative initial fonts etc.
+ \not@math@alphabet\ornamentalstyle\relax
+ \exfs@merge@families{p}}
+\DeclareRobustCommand{\qtstyle}{% quotation style (assumes sans)
+ \not@math@alphabet\qtstyle\relax
+ \sffamily
+ \exfs@merge@families{q}}
+\DeclareRobustCommand{\shstyle}{%
+ \not@math@alphabet\shstyle\relax
+ \exfs@merge@families{h}}
+\DeclareRobustCommand{\swashstyle}{% an attempt to improve on \swstyle
+ \not@math@alphabet\swashstyle\relax
+ \exfs@merge@families{w}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\tmstyle,\tvstyle}
+% Macros to switch between monowidth and variable typewriter.
+% These need to unmerge before merging.
+% We need to unmerge sans as well as the other kind of typewriter.
+% \begin{macrocode}
+\DeclareRobustCommand{\tmstyle}{% monowidth typewriter
+ \not@math@alphabet\tmstyle\relax
+ \exfs@unmerge@families{s}%
+ \exfs@unmerge@families{v}%
+ \exfs@merge@families{t}}
+\DeclareRobustCommand{\tvstyle}{% variable width typewriter
+ \not@math@alphabet\tvstyle\relax
+ \exfs@unmerge@families{s}%
+ \exfs@unmerge@families{t}%
+ \exfs@merge@families{v}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\exfs@unmerge@families}
+%:cfr-added - unmerge families
+% \begin{macrocode}
+\newcounter{taken}%
+\newcommand*\exfs@unmerge@families[1]{%
+ \edef\exfs@tempf{#1}%
+ \edef\tempa{\expandafter\exfs@get@variants\f@family\@nil}%
+ \let\exfs@tempq\@empty
+ \edef\exfs@tempg{}%
+ \setcounter{taken}{0}%
+% \end{macrocode}
+% check whether there are variants - if not do nothing
+% \begin{macrocode}
+ \ifx\tempa\@empty
+ \edef\exfs@tempq{}%
+ \else
+% \end{macrocode}
+% o/w go through the variants to find the one to delete
+% \begin{macrocode}
+ \whiledo{\value{taken}<1}{%
+% \end{macrocode}
+% get the next variant
+% \begin{macrocode}
+ \edef\exfs@tempn{\expandafter\exfs@next\tempa\@nil}%
+% \end{macrocode}
+% see if the next variant is the thing we seek and, if so, eliminate it
+% \begin{macrocode}
+ \ifx\exfs@tempf\exfs@tempn
+ \edef\tempa{\expandafter\exfs@shift\tempa\@nil}%
+ \edef\exfs@tempq{\exfs@tempg\tempa}%
+ \stepcounter{taken}%
+% \end{macrocode}
+% o/w save the next variant and move on if any variants remain
+% \begin{macrocode}
+ \else
+ \edef\exfs@tempg{\exfs@tempg\exfs@tempn}%
+ \edef\tempa{\expandafter\exfs@shift\tempa\@nil}%
+ \ifx\tempa\@empty% if there are no variants left, we're done
+ \edef\exfs@tempq{\exfs@tempg}%
+ \stepcounter{taken}%
+ \fi
+ \fi
+ }%
+ \fi
+ \exfs@try@family{\expandafter\exfs@get@base\f@family\@nil \exfs@tempq}%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\tstyle,\lstyle}
+% \mbox{ }
+% \begin{macrocode}
+\DeclareRobustCommand{\tstyle}{% tabular figures
+ \not@math@alphabet\tstyle\relax
+ \exfs@unmerge@families{2}}
+\DeclareRobustCommand{\lstyle}{% lining figures (cf. command above)
+ \not@math@alphabet\lstyle\relax
+ \exfs@unmerge@families{j}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\tlstyle,\plstyle,\tostyle}
+% make a combined command for tabular lining
+% \begin{macrocode}
+\DeclareRobustCommand{\tlstyle}{%
+ \lstyle\tstyle}
+% \end{macrocode}
+% proportional lining
+% \begin{macrocode}
+\DeclareRobustCommand{\plstyle}{%
+ \lstyle\pstyle}
+% \end{macrocode}
+% tabular oldstyle {?!}
+% \begin{macrocode}
+\DeclareRobustCommand{\tostyle}{%
+ \ostyle\tstyle}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\sidefault,\sishape}
+%:end-added % si is italic sc
+% \begin{macrocode}
+\newcommand*{\sidefault}{si}
+\DeclareRobustCommand{\sishape}{%
+ \not@math@alphabet\sishape\relax
+ \fontshape\sidefault\selectfont}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\oldefault,\olshape,\scoldefault,\scolshape}
+%:cfr-added - is this how outline shapes should be handled?
+% \begin{macrocode}
+\newcommand*{\oldefault}{ol}
+\DeclareRobustCommand{\olshape}{%
+ \not@math@alphabet\olshape\relax
+ \fontshape\oldefault\selectfont}
+\newcommand*{\scoldefault}{scol}
+\DeclareRobustCommand{\scolshape}{%
+ \not@math@alphabet\scolshape\relax
+ \fontshape\scoldefault\selectfont}
+% \end{macrocode}
+%^^A\DeclareRobustCommand{\olshape}{%
+%^^A \not@math@alphabet\olshape\relax
+%^^A \exfs@merge@shape{\oldefault}{\scdefault}{\scoldefault}}
+% \end{macro}
+% \begin{macro}{\udefault,\ushape,\scudefault,\scushape}
+%:fudge
+% \begin{macrocode}
+\newcommand*{\udefault}{u}
+\DeclareRobustCommand{\ushape}{%
+ \not@math@alphabet\ushape\relax
+ \fontshape\udefault\selectfont}
+\newcommand*{\scudefault}{su}
+\DeclareRobustCommand{\scushape}{%
+ \not@math@alphabet\scushape\relax
+ \fontshape\scudefault\selectfont}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\uidefault,\uishape,\ridefault,\rishape}
+%:upright italic
+% \begin{macrocode}
+\newcommand*{\uidefault}{ui}
+\DeclareRobustCommand{\uishape}{%
+ \not@math@alphabet\uishape\relax
+ \fontshape\uidefault\selectfont}
+% \end{macrocode}
+%:can i do this for reverse italic?
+% \begin{macrocode}
+\newcommand*{\ridefault}{ri}
+\DeclareRobustCommand{\rishape}{%
+ \not@math@alphabet\rishape\relax
+ \fontshape\ridefault\selectfont}
+% \end{macrocode}
+% \end{macro}
+%:end-added
+% \begin{macro}{\exfs@merge@shape}
+% \mbox{ }
+% \begin{macrocode}
+\newcommand*{\exfs@merge@shape}[3]{%
+ \edef\exfs@tempa{#1}%
+ \edef\exfs@tempb{#2}%
+ \ifx\f@shape\exfs@tempb
+ \expandafter\ifx\csname\f@encoding/\f@family/\f@series/#3\endcsname\relax
+ \else
+ \edef\exfs@tempa{#3}%
+ \fi
+ \fi
+ \fontshape{\exfs@tempa}\selectfont}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\exfs@font@width}
+%:cfr-added - merge width changes into series
+% \begin{macrocode}
+\newcommand*{\exfs@font@width}{%
+ \edef\exfs@tempf{\expandafter\exfs@first\f@series\@nil }%
+ \edef\exfs@temppart{\expandafter\exfs@part\f@series\@nil }%
+ \ifx\exfs@temppart\@empty
+ \def\exfs@width{}
+ \else
+ \edef\exfs@temps{\expandafter\exfs@second\f@series\@nil }%
+ \ifx\exfs@temps{b}
+ \edef\exfs@width{\expandafter\exfs@part\exfs@temps\@nil }%
+ \else
+ \ifx\exfs@temps{l}
+ \edef\exfs@width{\expandafter\exfs@part\exfs@temps\@nil }%
+ \else
+ \edef\exfs@width{\exfs@temppart}%
+ \fi
+ \fi
+ \fi
+ \exfs@width
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\exfs@merge@width}
+% \mbox{ }
+% \begin{macrocode}
+\newcommand*{\exfs@merge@width}[1]{%
+ \edef\exfs@temph{#1}%
+ \edef\exfs@tempf{\expandafter\exfs@first\f@series\@nil }%
+ \edef\exfs@temppart{\expandafter\exfs@part\f@series\@nil }%
+ \def\tempb{b}%
+ \def\templ{l}%
+ \ifx\exfs@temppart\@empty
+ \def\exfs@series{\expandafter\exfs@tempf\exfs@temph}%
+ \else
+ \edef\exfs@temps{\expandafter\exfs@second\f@series\@nil }%
+ \ifx\exfs@temps\tempb
+ \def\exfs@series{\expandafter\exfs@tempf\exfs@temps\exfs@temph}%
+ \else
+ \ifx\exfs@temps\templ
+ \def\exfs@series{\expandafter\exfs@tempf\exfs@temps\exfs@temph}%
+ \else
+ \def\exfs@series{\expandafter\exfs@tempf\exfs@temph}%
+ \fi
+ \fi
+ \fi
+ \exfs@try@series{\exfs@series}%
+}
+%^^A \fontseries\exfs@series\selectfont}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\exfs@unmerge@width}
+% \mbox{ }
+% \begin{macrocode}
+\newcommand*{\exfs@unmerge@width}{%
+ \edef\exfs@tempf{\expandafter\exfs@first\f@series\@nil }%
+ \edef\exfs@temppart{\expandafter\exfs@part\f@series\@nil }%
+ \def\tempb{b}%
+ \def\templ{l}%
+ \ifx\exfs@temppart\@empty
+ \def\exfs@series{\expandafter\exfs@tempf}%
+ \else
+ \edef\exfs@temps{\expandafter\exfs@second\f@series\@nil }%
+ \ifx\exfs@temps\tempb
+ \def\exfs@series{\expandafter\exfs@tempf\exfs@temps}%
+ \else
+ \ifx\exfs@temps\templ
+ \def\exfs@series{\expandafter\exfs@tempf\exfs@temps}%
+ \else
+ \def\exfs@series{\expandafter\exfs@tempf}%
+ \fi
+ \fi
+ \fi
+ \exfs@try@series{\exfs@series}%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\regwidth}
+% \mbox{ }
+% \begin{macrocode}
+\DeclareRobustCommand{\regwidth}{%
+ \not@math@alphabet\regwidth\relax
+ \exfs@unmerge@width}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\nwdefault,\nwwidth,\cddefault,\cdwidth,\ecdefault,\ecwidth,\ucdefault,\ucwidth}
+% \mbox{ }
+% \begin{macrocode}
+\newcommand*{\nwdefault}{c}
+\DeclareRobustCommand{\nwwidth}{%
+ \not@math@alphabet\nwwidth\relax
+ \exfs@merge@width{\nwdefault}}
+\newcommand*{\cddefault}{c}
+\DeclareRobustCommand{\cdwidth}{%
+ \not@math@alphabet\cdwidth\relax
+ \exfs@merge@width{\cddefault}}
+\newcommand*{\ecdefault}{ec}
+\DeclareRobustCommand{\ecwidth}{%
+ \not@math@alphabet\ecwidth\relax
+ \exfs@merge@width{\ecdefault}}
+\newcommand*{\ucdefault}{uc}
+\DeclareRobustCommand{\ucwidth}{%
+ \not@math@alphabet\ucwidth\relax
+ \exfs@merge@width{\ucdefault}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\etdefault,\etwidth,\epdefault,\epwidth,\exdefault,\exwidth,\uxdefault,\uxwidth}
+% \mbox{ }
+% \begin{macrocode}
+\newcommand*{\etdefault}{x}
+\DeclareRobustCommand{\etwidth}{%
+ \not@math@alphabet\etwidth\relax
+ \exfs@merge@width{\etdefault}}
+\newcommand*{\epdefault}{x}
+\DeclareRobustCommand{\epwidth}{%
+ \not@math@alphabet\epwidth\relax
+ \exfs@merge@width{\epdefault}}
+\newcommand*{\exdefault}{ex}
+\DeclareRobustCommand{\exwidth}{%
+ \not@math@alphabet\exwidth\relax
+ \exfs@merge@width{\exdefault}}
+\newcommand*{\uxdefault}{ux}
+\DeclareRobustCommand{\uxwidth}{%
+ \not@math@alphabet\uxwidth\relax
+ \exfs@merge@width{\uxdefault}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\exfs@merge@weight}
+%:cfr-added merge weight changes into series
+% \begin{macrocode}
+\newcommand*{\exfs@merge@weight}[1]{%
+ \edef\exfs@tempg{#1}%
+ \edef\exfs@tempf{\expandafter\exfs@first\f@series\@nil }%
+ \edef\exfs@temppart{\expandafter\exfs@part\f@series\@nil }%
+ \def\templ{l}%
+ \def\tempb{b}%
+% \end{macrocode}
+% :case when there's no second part, so the single character must be the weight and should be replaced
+% \begin{macrocode}
+ \ifx\exfs@temppart\@empty
+ \def\exfs@series{\expandafter\exfs@tempg}%
+% \end{macrocode}
+% :case when there's a second part
+% \begin{macrocode}
+ \else
+% \end{macrocode}
+% :get first character of second part
+% \begin{macrocode}
+ \edef\exfs@temps{\expandafter\exfs@second\f@series\@nil }%
+ \edef\exfs@tempw{\expandafter\exfs@part\exfs@temps\@nil }%
+% \end{macrocode}
+% :is the first character b? if so, it is part of the weight and should be replaced
+% \begin{macrocode}
+ \ifx\exfs@temps\tempb
+ \def\exfs@series{\expandafter\exfs@tempg\exfs@tempw}%
+ \else
+% \end{macrocode}
+% :is the first character l? if so, it is part of the weight and should be replaced
+% \begin{macrocode}
+ \ifx\exfs@temps\templ
+ \def\exfs@series{\expandafter\exfs@tempg\exfs@tempw}%
+ \else
+% \end{macrocode}
+% :o/w the first character is part of the width and should be retained
+% \begin{macrocode}
+ \def\exfs@series{\expandafter\exfs@tempg\exfs@temppart}%
+ \fi
+ \fi
+ \fi
+% \end{macrocode}
+%^^A \fontseries\exfs@series\selectfont}
+% \begin{macrocode}
+ \ifx\exfs@tempg\exfs@series
+ \exfs@try@series{\exfs@series}%
+ \else
+ \exfs@try@series[\exfs@tempg]{\exfs@series}% assume user wants to change weight even if this changes back to the default width
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\mbdefault,\mbweight,\bddefault,\bfweight,\bdweight}
+% \begin{macrocode}
+\newcommand*{\mbdefault}{mb}
+\DeclareRobustCommand{\mbweight}{%
+ \not@math@alphabet\mbweight\relax
+ \exfs@merge@weight{\mbdefault}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\dbdefault,\dbweight,\sbdefault,\sbweight,\ebdefault,\ebweight,\ubdefault,\ubweight}
+% Heavy weights.
+% \begin{macrocode}
+\newcommand*{\dbdefault}{db}
+\DeclareRobustCommand{\dbweight}{%
+ \not@math@alphabet\dbweight\relax
+ \exfs@merge@weight{\dbdefault}}
+\newcommand*{\sbdefault}{sb}
+\DeclareRobustCommand{\sbweight}{%
+ \not@math@alphabet\sbweight\relax
+ \exfs@merge@weight{\sbdefault}}
+\newcommand*{\ebdefault}{eb}
+\DeclareRobustCommand{\ebweight}{%
+ \not@math@alphabet\ebweight\relax
+ \exfs@merge@weight{\ebdefault}}
+\newcommand*{\ubdefault}{ub}
+\DeclareRobustCommand{\ubweight}{%
+ \not@math@alphabet\ubweight\relax
+ \exfs@merge@weight{\ubdefault}}
+\newcommand*{\lgdefault}{l}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\lgdefault,\lgweight,\eldefault,\elweight,\uldefault,\ulweight}
+%note - use this if light is a variant weight, rather than a separate family
+% \begin{macrocode}
+\DeclareRobustCommand{\lgweight}{%
+ \not@math@alphabet\lgweight\relax
+ \exfs@merge@weight{\lgdefault}}
+\newcommand*{\eldefault}{el}
+\DeclareRobustCommand{\elweight}{%
+ \not@math@alphabet\elweight\relax
+ \exfs@merge@weight{\eldefault}}
+\newcommand*{\uldefault}{ul}
+\DeclareRobustCommand{\ulweight}{%
+ \not@math@alphabet\ulweight\relax
+ \exfs@merge@weight{\uldefault}}
+% \end{macrocode}
+% \end{macro}
+%:end-added
+% \begin{macro}{\itshape,\scshape,\upshape,\dfshape}
+% redefinition
+% \begin{macrocode}
+\DeclareRobustCommand{\itshape}{%
+ \not@math@alphabet\itshape\mathit
+ \exfs@merge@shape{\itdefault}{\scdefault}{\sidefault}}
+% \end{macrocode}
+% original
+%^^A\DeclareRobustCommand{\scshape}{%
+%^^A \not@math@alphabet\scshape\relax
+%^^A \exfs@merge@shape{\scdefault}{\itdefault}{\sidefault}}
+%:cfr-altered: \cs{scshape}
+% \begin{macrocode}
+\DeclareRobustCommand{\scshape}{%
+ \not@math@alphabet\scshape\relax
+ \def\tempu{u}%
+ \def\tempo{ol}%
+ \ifx\f@shape\tempu
+ \exfs@merge@shape{\scdefault}{\udefault}{\scudefault}%
+ \else
+ \ifx\f@shape\tempo
+ \exfs@merge@shape{\scdefault}{\oldefault}{\scoldefault}%
+ \else
+ \exfs@merge@shape{\scdefault}{\itdefault}{\sidefault}%
+ \fi
+ \fi
+}
+% \end{macrocode}
+%:end-altered
+% \begin{macrocode}
+\DeclareRobustCommand{\upshape}{%
+ \not@math@alphabet\upshape\relax
+ \exfs@merge@shape{\updefault}{\sidefault}{\scdefault}}
+\DeclareRobustCommand{\dfshape}{%
+ \not@math@alphabet\dfshape\relax
+ \fontshape\shapedefault\selectfont}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\swashapedefault,\swshape}
+% \begin{macrocode}
+\newcommand*{\swshapedefault}{\itdefault}
+\DeclareRobustCommand{\swshape}{%
+ \not@math@alphabet\swshape\relax
+ \swstyle\fontshape\swshapedefault\selectfont}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\textln,\textos,\textin,\textsu,\textsi,\textdf,\textsw}
+% \mbox{ }
+% \begin{macrocode}
+\DeclareTextFontCommand{\textln}{\lnstyle}
+\DeclareTextFontCommand{\textos}{\osstyle}
+\DeclareTextFontCommand{\textin}{\instyle}
+\DeclareTextFontCommand{\textsu}{\sustyle}
+\DeclareTextFontCommand{\textsi}{\sishape}
+\DeclareTextFontCommand{\textdf}{\dfshape}
+\DeclareTextFontCommand{\textsw}{\swshape}
+% \end{macrocode}
+% \end{macro}
+%:cfr-added
+% \begin{macro}{\textti,\textlt,\textof,\textalt,\textreg,\emboss,\textorn,\textqt,\textsh,\texttm,\texttv}
+% Families
+% \begin{macrocode}
+\DeclareTextFontCommand{\textti}{\tistyle}
+\DeclareTextFontCommand{\textlt}{\ltstyle}
+\DeclareTextFontCommand{\textof}{\ofstyle} % open-face (or outline or blank) style
+\DeclareTextFontCommand{\textalt}{\altstyle} % alternative style
+\DeclareTextFontCommand{\textreg}{\regstyle} % ``regular'' style
+\DeclareTextFontCommand{\emboss}{\embossstyle}
+\DeclareTextFontCommand{\textorn}{\ornamentalstyle} % intended primarily for decorative initials etc.
+\DeclareTextFontCommand{\textqt}{\qtstyle}
+\DeclareTextFontCommand{\textsh}{\shstyle} % shadowed style
+\DeclareTextFontCommand{\texttm}{\tmstyle}
+\DeclareTextFontCommand{\texttv}{\tvstyle}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\textl,\texto,\textp,\textt,\textpl,\textpo,\texttl,\textto}
+% Families - figures
+% \begin{macrocode}
+\DeclareTextFontCommand{\textl}{\lstyle}
+\DeclareTextFontCommand{\texto}{\ostyle}
+\DeclareTextFontCommand{\textp}{\pstyle}
+\DeclareTextFontCommand{\textt}{\tstyle}
+\DeclareTextFontCommand{\textpl}{\plstyle}
+\DeclareTextFontCommand{\textpo}{\postyle}
+\DeclareTextFontCommand{\texttl}{\tlstyle}
+\DeclareTextFontCommand{\textto}{\tostyle}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\textol,\textswash,\textu,\textscu,\textui,\textri}
+% Shapes
+% \begin{macrocode}
+\DeclareTextFontCommand{\textol}{\olshape} % outline
+\DeclareTextFontCommand{\textswash}{\swashstyle} % an attempt to improve on \textsw
+\DeclareTextFontCommand{\textu}{\ushape}
+\DeclareTextFontCommand{\textscu}{\scushape}
+\DeclareTextFontCommand{\textui}{\uishape} % upright italic
+\DeclareTextFontCommand{\textri}{\rishape} % reverse italic
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\textnw,\textcd,\textec,\textuc,\textet,\textep,\textex,\textux,\textrw}
+% Widths
+% \begin{macrocode}
+\DeclareTextFontCommand{\textnw}{\nwwidth}
+\DeclareTextFontCommand{\textcd}{\cdwidth}
+\DeclareTextFontCommand{\textec}{\ecwidth}
+\DeclareTextFontCommand{\textuc}{\ucwidth}
+\DeclareTextFontCommand{\textet}{\etwidth}
+\DeclareTextFontCommand{\textep}{\epwidth}
+\DeclareTextFontCommand{\textex}{\exwidth}
+\DeclareTextFontCommand{\textux}{\uxwidth}
+\DeclareTextFontCommand{\textrw}{\regwidth}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\textmb,\textdb,\textbd,\textsb,\texteb,\textub,\textlg,\textel,\textul}
+% Weights
+% \begin{macrocode}
+\DeclareTextFontCommand{\textmb}{\mbweight}
+\DeclareTextFontCommand{\textdb}{\dbweight}
+\DeclareTextFontCommand{\textsb}{\sbweight}
+\DeclareTextFontCommand{\texteb}{\ebweight}
+\DeclareTextFontCommand{\textub}{\ubweight}
+\DeclareTextFontCommand{\textlg}{\lgweight}
+\DeclareTextFontCommand{\textel}{\elweight}
+\DeclareTextFontCommand{\textul}{\ulweight}
+% \end{macrocode}
+% \end{macro}
+%end-added
+% \end{package}
+% \iffalse
+%</sty-nfss>
+% \fi
+%
+%
+%\Finale
diff --git a/macros/latex/contrib/nfssext-cfr/nfssext-cfr.ins b/macros/latex/contrib/nfssext-cfr/nfssext-cfr.ins
new file mode 100644
index 0000000000..bd6ac1448b
--- /dev/null
+++ b/macros/latex/contrib/nfssext-cfr/nfssext-cfr.ins
@@ -0,0 +1,111 @@
+%% $Id: nfssext-cfr.ins 10335 2024-09-10 16:13:03Z cfrees $
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% nfssext-cfr.ins
+%% Additions and changes Copyright (C) 2008-2024 Clea F. Rees.
+%% Code from skeleton.ins Copyright (C) 2015-2024 Scott Pakin (see below).
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3c
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% https://www.latex-project.org/lppl.txt
+%% and version 1.3c or later is part of all distributions of LaTeX
+%% version 2008-05-04 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainer of this work is Clea F. Rees.
+%%
+%% This work consists of all files listed in manifest.txt.
+%%
+%% The file nfssext-cfr.ins is a derived work under the terms of the
+%% LPPL. It is based on version 2.4 of skeleton.ins which is part of
+%% dtxtut by Scott Pakin. A copy of dtxtut, including the
+%% unmodified version of skeleton.ins is available from
+%% https://www.ctan.org/pkg/dtxtut and released under the LPPL.
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\input docstrip.tex
+\keepsilent
+
+%% ???
+\usedir{tex/latex/nfssext-cfr}
+
+\declarepreamble\safonol
+Copyright (C) 2008-2024 Clea F. Rees.
+
+This work may be distributed and/or modified under the
+conditions of the LaTeX Project Public License, either version 1.3c
+of this license or (at your option) any later version.
+The latest version of this license is in
+ https://www.latex-project.org/lppl.txt
+and version 1.3c or later is part of all distributions of LaTeX
+version 2008-05-04 or later.
+
+This work has the LPPL maintenance status `maintained'.
+
+The Current Maintainer of this work is Clea F. Rees.
+
+This file may only be distributed together with a copy of the package
+nfssext-cfr. You may however distribute the package nfssext-cfr without
+such generated files.
+
+This work consists of all files listed in manifest.txt.
+\endpreamble
+
+\def\baseFileName{nfssext.sty}
+\def\basePkgName{The Font Installation Guide}
+\def\basePkgArk{fontinstallationguide}
+\def\basePkgAuthor{Philipp Lehman}
+% \def\preChanges{%
+% - One thing or another.}
+\def\targType{The file }
+\def\targPkg{nfssext-cfr}
+
+\declarepreamble\derpreamble
+Additions and changes Copyright (C) 2008-2024 Clea F. Rees.
+Code from \basePkgArk Copyright (C) 2002-2004 \basePkgAuthor (see below)
+
+This work may be distributed and/or modified under the
+conditions of the LaTeX Project Public License, either version 1.3c
+of this license or (at your option) any later version.
+The latest version of this license is in
+ https://www.latex-project.org/lppl.txt
+and version 1.3c or later is part of all distributions of LaTeX
+version 2008-05-04 or later.
+
+This work has the LPPL maintenance status `maintained'.
+
+The Current Maintainer of this work is Clea F. Rees.
+
+This work consists of all files listed in manifest.txt.
+
+
+\targType \outFileName is a derived work under the terms of the LPPL.
+It is based on version 1.2 of \baseFileName which is supplied with
+\basePkgName by \basePkgAuthor. A copy of \basePkgName, including an
+unmodified version of \baseFileName is available from
+ https://tug.ctan.org/pkg/\basePkgArk.
+\baseFileName is part of the included archive figuide-examples.tar.gz
+which consists of examples and templates released under the LPPL.
+\baseFileName is included in the files for tutorials 3, 5 and 6.
+
+The main modifications made to this file are described in \targPkg.dtx.
+\endpreamble
+
+\askonceonly
+
+\usepreamble\safonol
+
+\generate{%
+ \usepreamble\derpreamble
+ \file{nfssext-cfr.sty}{\from{nfssext-cfr.dtx}{sty}}
+ \file{nfssext-cfr-nfss.sty}{\from{nfssext-cfr.dtx}{sty-nfss}}
+ \file{nfssext-cfr-nnfss.sty}{\from{nfssext-cfr.dtx}{sty-nnfss}}
+ % \file{??.tex}{\from{nfssext-cfr.dtx}{??}}
+ % \usepreamble\derpreamble
+ % \file{other.etx}{\from{nfssext-cfr.dtx}{other}}
+}
+
+
+\endbatchfile
diff --git a/macros/latex/contrib/nfssext-cfr/nfssext-cfr.pdf b/macros/latex/contrib/nfssext-cfr/nfssext-cfr.pdf
index 42380dd224..5088961446 100644
--- a/macros/latex/contrib/nfssext-cfr/nfssext-cfr.pdf
+++ b/macros/latex/contrib/nfssext-cfr/nfssext-cfr.pdf
Binary files differ
diff --git a/macros/latex/contrib/nfssext-cfr/nfssext-cfr.sty b/macros/latex/contrib/nfssext-cfr/nfssext-cfr.sty
deleted file mode 100644
index 03d19d2e59..0000000000
--- a/macros/latex/contrib/nfssext-cfr/nfssext-cfr.sty
+++ /dev/null
@@ -1,641 +0,0 @@
-%% nfssext-cfr.sty
-%% Additions and changes are copyright 2017 Clea F. Rees
-%% Code from nfssext.sty copyright 2003 Philipp Lehman (see below)
-%
-% 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 Clea F. Rees.
-%
-% This work consists of the file nfssext-cfr.sty.
-%
-% The file nfssext-cfr.sty is a derived work under the terms of the
-% LPPL. It is based on version 1.2 of nfssext.sty which is part of The
-% Font Installation Guide by Philipp Lehman. A copy of the The Font
-% Installation Guide, including the unmodified version of nfssext.sty
-% is available from
-% http://tug.ctan.org/cgi-bin/ctanPackageInformation.py?id=fontinstallationguide.
-% nfssext.sty is part of the included archive figuide-examples.tar.gz
-% which consists of examples and templates released under the LPPL.
-% nfssext.sty is included in the files for tutorials 3, 5 and 6.
-%
-% 2017-03-28: modify \tmstyle and \tvstyle to unmerge sans and other
-% typewriter before mergining appropriate variant
-%
-\NeedsTeXFormat{LaTeX2e}
-\RequirePackage{svn-prov}
-\ProvidesPackageSVN{$Id: nfssext-cfr.sty 6140 2017-03-28 18:07:31Z cfrees $}[\revinfo{} specially mangled by cfr; based on 2003/03/14 v1.2 Experimental NFSS Extensions]
-%:cfr-added: use ifthen
-\RequirePackage{ifthen}
-%:end-added
-\newcommand*{\exfs@tempa}{}
-\newcommand*{\exfs@tempb}{}
-%:cfr-added: extra variable (\exfs@tempf)
-\newcommand*{\exfs@tempf}{}
-%:end-added
-\newcommand*{\exfs@try@family}[2][]{%
- \let\exfs@tempa\relax
- \begingroup
- \fontfamily{#2}\try@load@fontshape
- \expandafter\ifx\csname\curr@fontshape\endcsname\relax
- \edef\exfs@tempa{#1}%
- \ifx\exfs@tempa\@empty
- \PackageWarning{nfssext}{%
- Font family '\f@encoding/#2' not available\MessageBreak
- Ignoring font switch}%
- \else
- \PackageInfo{nfssext}{%
- Font family '\f@encoding/#2' not available\MessageBreak
- Font family '\f@encoding/#1' tried instead}%
- \exfs@try@family{#1}%
- \fi
- \else
- \gdef\exfs@tempa{\fontfamily{#2}\selectfont}%
- \fi
- \endgroup
- \exfs@tempa}
-%:cfr-added exfs@try@series
-\newcommand*{\exfs@try@series}[2][]{%
- \let\exfs@tempa\relax
- \begingroup
- \fontseries{#2}\try@load@fontshape
- \expandafter\ifx\csname\curr@fontshape\endcsname\relax
- \edef\exfs@tempa{#1}%
- \ifx\exfs@tempa\@empty
- \PackageWarning{nfssext-cfr}{%
- Font series '\f@encoding/\f@family/#2' not available\MessageBreak
- Ignoring font switch}%
- \else
- \PackageInfo{nfssext-cfr}{%
- Font family '\f@encoding/\f@family/#2' not available\MessageBreak
- Font family '\f@encoding/\f@family/#1' tried instead}%
- \exfs@try@series{#1}%
- \fi
- \else
- \gdef\exfs@tempa{\fontseries{#2}\selectfont}%
- \fi
- \endgroup
- \exfs@tempa}
-%:end-added
-\def\exfs@get@base#1#2#3#4\@nil{#1#2#3}
-%:cfr-added:more \exfs@ commands (get@variants, next, shift, first, part, second)
-\def\exfs@get@variants#1#2#3#4\@nil{#4}
-\def\exfs@next#1#2\@nil{#1}
-\def\exfs@shift#1#2\@nil{#2}
-\def\exfs@first#1#2\@nil{#1}
-\def\exfs@part#1#2\@nil{#2}
-\def\exfs@second#1#2#3\@nil{#2}
-%:end-added
-\DeclareRobustCommand{\lnstyle}{%
- \not@math@alphabet\lnstyle\relax
- \exfs@try@family[\expandafter\exfs@get@base\f@family\@nil]%
- {\expandafter\exfs@get@base\f@family\@nil x}}
-\DeclareRobustCommand{\osstyle}{%
- \not@math@alphabet\osstyle\relax
- \exfs@try@family{\expandafter\exfs@get@base\f@family\@nil j}}
-\DeclareRobustCommand{\instyle}{%
- \not@math@alphabet\instyle\relax
- \exfs@try@family{\expandafter\exfs@get@base\f@family\@nil 0}}
-\DeclareRobustCommand{\sustyle}{%
- \not@math@alphabet\sustyle\relax
- \exfs@try@family{\expandafter\exfs@get@base\f@family\@nil 1}}
-\DeclareRobustCommand{\swstyle}{%
- \not@math@alphabet\swstyle\relax
- \exfs@try@family{\expandafter\exfs@get@base\f@family\@nil w}}
-%:cfr-added - merge families
-\newcommand*\exfs@merge@families[1]{%
- \edef\exfs@tempf{#1}%
- \edef\tempa{\expandafter\exfs@get@variants\f@family\@nil}%
- \edef\tempo{2j}%
- \let\exfs@tempq\@empty
- \def\exfs@tempg{}%
- \newif\ifadded
- \addedfalse
- % check whether there are variants - if not just use the requested addition
- \ifx\tempa\@empty
- \edef\exfs@tempq{\exfs@tempf}%
- \addedtrue
- \else
- \gdef\set{0,1,2,a,d,e,f,h,j,l,p,q,s,t,v,w}% these are the variants to consider - the order here and in the font name is crucial
- \ifx\tempo\exfs@tempf
- \@for \xx:=\set \do {%
- % check whether there are variants left - if not set the ``next variant'' to empty
- \ifx\tempa\@empty
- \let\exfs@tempn\@empty
- \else
- % o/w get the next variant
- \edef\exfs@tempn{\expandafter\exfs@next\tempa\@nil}%
- \fi
- \edef\tempt{2}%
- \edef\tempj{j}%
- % if the next variant is 2 or j, ignore it
- \ifx\exfs@tempn\tempt
- \edef\tempa{\expandafter\exfs@shift\tempa\@nil}%
- \fi
- \ifx\exfs@tempn\tempj % if the next variant is j, ignore it
- \edef\tempa{\expandafter\exfs@shift\tempa\@nil}%
- \fi
- % see if the current value is either 2 or j and add it if so and if needed
- \ifx\tempt\xx
- \edef\exfs@tempg{\exfs@tempg\xx}%
- \else
- \ifx\tempj\xx % if the current value is j, we're done
- \edef\exfs@tempq{\exfs@tempg\xx\tempa}%
- \let\tempa\@empty
- \addedtrue
- \else
- % o/w see if the current value matches the next variant
- \ifx\xx\exfs@tempn
- \edef\exfs@tempg{\exfs@tempg\xx}%
- \edef\tempa{\expandafter\exfs@shift\tempa\@nil}%
- \fi
- \fi
- \fi
- }%
- \else
- \@for \xx:=\set \do {%
- % check whether there are variants left and, if not, add the addition if needed
- \ifx\tempa\@empty
- \ifadded
- \else
- \edef\exfs@tempq{\exfs@tempg\exfs@tempf}%
- \addedtrue
- \fi
- \else
- % o/w get the next variant
- \edef\exfs@tempn{\expandafter\exfs@next\tempa\@nil}%
- % if the new token equals the next variant, combine whatever is saved in \exfs@tempg with whatever remains in \tempa
- \ifx\exfs@tempn\exfs@tempf
- \edef\exfs@tempq{\exfs@tempg\tempa}%
- \addedtrue
- \let\tempa\@empty
- \else
- % o/w, if the current value matches the requested addition, add it in
- \ifx\exfs@tempf\xx
- \edef\exfs@tempq{\exfs@tempg\xx\tempa}%
- \addedtrue
- \let\tempa\@empty
- \else
- % o/w, if the current value matches the next variant, shift
- \ifx\exfs@tempn\xx
- \edef\exfs@tempg{\exfs@tempg\xx}%
- \edef\tempa{\expandafter\exfs@shift\tempa\@nil}%
- \fi
- \fi
- \fi
- \fi
- }%
- \fi
- \fi
- \ifx\exfs@tempq\@empty
- \PackageError{nfssext-cfr}{Something is wrong here. Ignoring font switching command.}{}%
- \else
- \exfs@try@family{\expandafter\exfs@get@base\f@family\@nil \exfs@tempq}%
- \fi}
-\DeclareRobustCommand{\pstyle}{% proportional figures
- \not@math@alphabet\pstyle\relax
- \exfs@merge@families{2}}
-\DeclareRobustCommand{\tistyle}{% titling/display
- \not@math@alphabet\tistyle\relax
- \exfs@merge@families{d}}
-\DeclareRobustCommand{\ostyle}{% oldstyle figures (cf. original osstyle above)
- \not@math@alphabet\ostyle\relax
- \exfs@merge@families{j}}
-% combined command for proportional oldstyle
-\DeclareRobustCommand{\postyle}{%
- \not@math@alphabet\postyle\relax
- \exfs@merge@families{2j}}
-%note that this command is for use when the light version is a separate family rather than a weight variant (e.g. when you've got light, light bold etc. as well as regular weights)
-\DeclareRobustCommand{\ltstyle}{%
- \not@math@alphabet\ltstyle\relax
- \exfs@merge@families{l}}
-%let's hope there aren't any fonts with a light family *and* an outline/openface/blank version
-\DeclareRobustCommand{\ofstyle}{%
- \not@math@alphabet\ofstyle\relax
- \exfs@merge@families{l}}
-\DeclareRobustCommand{\altstyle}{% alternative style
- \not@math@alphabet\altstyle\relax
- \exfs@merge@families{a}}
-\DeclareRobustCommand{\regstyle}{% ``regular'' style
- \not@math@alphabet\regstyle\relax
- \exfs@try@family{\expandafter\exfs@get@base\f@family\@nil}}
-\DeclareRobustCommand{\embossstyle}{%
- \not@math@alphabet\embossstyle\relax
- \exfs@merge@families{e}}
-\DeclareRobustCommand{\ornamentalstyle}{% intended primarily for decorative initial fonts etc.
- \not@math@alphabet\ornamentalstyle\relax
- \exfs@merge@families{p}}
-\DeclareRobustCommand{\qtstyle}{% quotation style (assumes sans)
- \not@math@alphabet\qtstyle\relax
- \sffamily
- \exfs@merge@families{q}}
-\DeclareRobustCommand{\shstyle}{%
- \not@math@alphabet\shstyle\relax
- \exfs@merge@families{h}}
-\DeclareRobustCommand{\swashstyle}{% an attempt to improve on \swstyle
- \not@math@alphabet\swashstyle\relax
- \exfs@merge@families{w}}
-\DeclareRobustCommand{\tmstyle}{% monowidth typewriter
- \not@math@alphabet\tmstyle\relax
- \exfs@unmerge@families{s}%
- \exfs@unmerge@families{v}%
- \exfs@merge@families{t}}
-\DeclareRobustCommand{\tvstyle}{% variable width typewriter
- \not@math@alphabet\tvstyle\relax
- \exfs@unmerge@families{s}%
- \exfs@unmerge@families{t}%
- \exfs@merge@families{v}}
-%:cfr-added - unmerge families
-\newcounter{taken}%
-\newcommand*\exfs@unmerge@families[1]{%
- \edef\exfs@tempf{#1}%
- \edef\tempa{\expandafter\exfs@get@variants\f@family\@nil}%
- \let\exfs@tempq\@empty
- \edef\exfs@tempg{}%
- \setcounter{taken}{0}%
- % check whether there are variants - if not do nothing
- \ifx\tempa\@empty
- \edef\exfs@tempq{}%
- \else
- % o/w go through the variants to find the one to delete
- \whiledo{\value{taken}<1}{%
- % get the next variant
- \edef\exfs@tempn{\expandafter\exfs@next\tempa\@nil}%
- % see if the next variant is the thing we seek and, if so, eliminate it
- \ifx\exfs@tempf\exfs@tempn
- \edef\tempa{\expandafter\exfs@shift\tempa\@nil}%
- \edef\exfs@tempq{\exfs@tempg\tempa}%
- \stepcounter{taken}%
- % o/w save the next variant and move on if any variants remain
- \else
- \edef\exfs@tempg{\exfs@tempg\exfs@tempn}%
- \edef\tempa{\expandafter\exfs@shift\tempa\@nil}%
- \ifx\tempa\@empty% if there are no variants left, we're done
- \edef\exfs@tempq{\exfs@tempg}%
- \stepcounter{taken}%
- \fi
- \fi
- }%
- \fi
- \exfs@try@family{\expandafter\exfs@get@base\f@family\@nil \exfs@tempq}}
-\DeclareRobustCommand{\tstyle}{% tabular figures
- \not@math@alphabet\tstyle\relax
- \exfs@unmerge@families{2}}
-\DeclareRobustCommand{\lstyle}{% lining figures (cf. command above)
- \not@math@alphabet\lstyle\relax
- \exfs@unmerge@families{j}}
-% make a combined command for tabular lining
-\DeclareRobustCommand{\tlstyle}{%
- \lstyle\tstyle}
-% proportional lining
-\DeclareRobustCommand{\plstyle}{%
- \lstyle\pstyle}
-% tabular oldstyle {?!}
-\DeclareRobustCommand{\tostyle}{%
- \ostyle\tstyle}
-%:end-added % si is italic sc
-\newcommand*{\sidefault}{si}
-\DeclareRobustCommand{\sishape}{%
- \not@math@alphabet\sishape\relax
- \fontshape\sidefault\selectfont}
-%:cfr-added - is this how outline shapes should be handled?
-\newcommand*{\oldefault}{ol}
-\DeclareRobustCommand{\olshape}{%
- \not@math@alphabet\olshape\relax
- \fontshape\oldefault\selectfont}
-\newcommand*{\scoldefault}{scol}
-\DeclareRobustCommand{\scolshape}{%
- \not@math@alphabet\scolshape\relax
- \fontshape\scoldefault\selectfont}
-%\DeclareRobustCommand{\olshape}{%
-% \not@math@alphabet\olshape\relax
-% \exfs@merge@shape{\oldefault}{\scdefault}{\scoldefault}}
-%:fudge
-\newcommand*{\udefault}{u}
-\DeclareRobustCommand{\ushape}{%
- \not@math@alphabet\ushape\relax
- \fontshape\udefault\selectfont}
-\newcommand*{\scudefault}{su}
-\DeclareRobustCommand{\scushape}{%
- \not@math@alphabet\scushape\relax
- \fontshape\scudefault\selectfont}
-%:upright italic
-\newcommand*{\uidefault}{ui}
-\DeclareRobustCommand{\uishape}{%
- \not@math@alphabet\uishape\relax
- \fontshape\uidefault\selectfont}
-%:can i do this for reverse italic?
-\newcommand*{\ridefault}{ri}
-\DeclareRobustCommand{\rishape}{%
- \not@math@alphabet\rishape\relax
- \fontshape\ridefault\selectfont}
-%:end-added
-\newcommand*{\exfs@merge@shape}[3]{%
- \edef\exfs@tempa{#1}%
- \edef\exfs@tempb{#2}%
- \ifx\f@shape\exfs@tempb
- \expandafter\ifx\csname\f@encoding/\f@family/\f@series/#3\endcsname\relax
- \else
- \edef\exfs@tempa{#3}%
- \fi
- \fi
- \fontshape{\exfs@tempa}\selectfont}
-%:cfr-added - merge width changes into series
-\newcommand*{\exfs@font@width}{%
- \edef\exfs@tempf{\expandafter\exfs@first\f@series\@nil }%
- \edef\exfs@temppart{\expandafter\exfs@part\f@series\@nil }%
- \ifx\exfs@temppart\@empty
- \def\exfs@width{}
- \else
- \edef\exfs@temps{\expandafter\exfs@second\f@series\@nil }%
- \ifx\exfs@temps{b}
- \edef\exfs@width{\expandafter\exfs@part\exfs@temps\@nil }%
- \else
- \ifx\exfs@temps{l}
- \edef\exfs@width{\expandafter\exfs@part\exfs@temps\@nil }%
- \else
- \edef\exfs@width{\exfs@temppart}%
- \fi
- \fi
- \fi
- \exfs@width
- }
-\newcommand*{\exfs@merge@width}[1]{%
- \edef\exfs@temph{#1}%
- \edef\exfs@tempf{\expandafter\exfs@first\f@series\@nil }%
- \edef\exfs@temppart{\expandafter\exfs@part\f@series\@nil }%
- \def\tempb{b}%
- \def\templ{l}%
- \ifx\exfs@temppart\@empty
- \def\exfs@series{\expandafter\exfs@tempf\exfs@temph}%
- \else
- \edef\exfs@temps{\expandafter\exfs@second\f@series\@nil }%
- \ifx\exfs@temps\tempb
- \def\exfs@series{\expandafter\exfs@tempf\exfs@temps\exfs@temph}%
- \else
- \ifx\exfs@temps\templ
- \def\exfs@series{\expandafter\exfs@tempf\exfs@temps\exfs@temph}%
- \else
- \def\exfs@series{\expandafter\exfs@tempf\exfs@temph}%
- \fi
- \fi
- \fi
- \exfs@try@series{\exfs@series}}
-% \fontseries\exfs@series\selectfont}
-\newcommand*{\exfs@unmerge@width}{%
- \edef\exfs@tempf{\expandafter\exfs@first\f@series\@nil }%
- \edef\exfs@temppart{\expandafter\exfs@part\f@series\@nil }%
- \def\tempb{b}%
- \def\templ{l}%
- \ifx\exfs@temppart\@empty
- \def\exfs@series{\expandafter\exfs@tempf}%
- \else
- \edef\exfs@temps{\expandafter\exfs@second\f@series\@nil }%
- \ifx\exfs@temps\tempb
- \def\exfs@series{\expandafter\exfs@tempf\exfs@temps}%
- \else
- \ifx\exfs@temps\templ
- \def\exfs@series{\expandafter\exfs@tempf\exfs@temps}%
- \else
- \def\exfs@series{\expandafter\exfs@tempf}%
- \fi
- \fi
- \fi
- \exfs@try@series{\exfs@series}}
-\DeclareRobustCommand{\regwidth}{%
- \not@math@alphabet\regwidth\relax
- \exfs@unmerge@width}
-\newcommand*{\nwdefault}{c}
-\DeclareRobustCommand{\nwwidth}{%
- \not@math@alphabet\nwwidth\relax
- \exfs@merge@width{\nwdefault}}
-\newcommand*{\cddefault}{c}
-\DeclareRobustCommand{\cdwidth}{%
- \not@math@alphabet\cdwidth\relax
- \exfs@merge@width{\cddefault}}
-\newcommand*{\ecdefault}{ec}
-\DeclareRobustCommand{\ecwidth}{%
- \not@math@alphabet\ecwidth\relax
- \exfs@merge@width{\ecdefault}}
-\newcommand*{\ucdefault}{uc}
-\DeclareRobustCommand{\ucwidth}{%
- \not@math@alphabet\ucwidth\relax
- \exfs@merge@width{\ucdefault}}
-\newcommand*{\etdefault}{x}
-\DeclareRobustCommand{\etwidth}{%
- \not@math@alphabet\etwidth\relax
- \exfs@merge@width{\etdefault}}
-\newcommand*{\epdefault}{x}
-\DeclareRobustCommand{\epwidth}{%
- \not@math@alphabet\epwidth\relax
- \exfs@merge@width{\epdefault}}
-\newcommand*{\exdefault}{ex}
-\DeclareRobustCommand{\exwidth}{%
- \not@math@alphabet\exwidth\relax
- \exfs@merge@width{\exdefault}}
-\newcommand*{\uxdefault}{ux}
-\DeclareRobustCommand{\uxwidth}{%
- \not@math@alphabet\uxwidth\relax
- \exfs@merge@width{\uxdefault}}
-%:cfr-added merge weight changes into series
-\newcommand*{\exfs@merge@weight}[1]{%
- \edef\exfs@tempg{#1}%
- \edef\exfs@tempf{\expandafter\exfs@first\f@series\@nil }%
- \edef\exfs@temppart{\expandafter\exfs@part\f@series\@nil }%
- \def\templ{l}%
- \def\tempb{b}%
- %:case when there's no second part, so the single character must be the weight and should be replaced
- \ifx\exfs@temppart\@empty
- \def\exfs@series{\expandafter\exfs@tempg}%
- %:case when there's a second part
- \else
- %:get first character of second part
- \edef\exfs@temps{\expandafter\exfs@second\f@series\@nil }%
- \edef\exfs@tempw{\expandafter\exfs@part\exfs@temps\@nil }%
- %:is the first character b? if so, it is part of the weight and should be replaced
- \ifx\exfs@temps\tempb
- \def\exfs@series{\expandafter\exfs@tempg\exfs@tempw}%
- \else
- %:is the first character l? if so, it is part of the weight and should be replaced
- \ifx\exfs@temps\templ
- \def\exfs@series{\expandafter\exfs@tempg\exfs@tempw}%
- \else
- %:o/w the first character is part of the width and should be retained
- \def\exfs@series{\expandafter\exfs@tempg\exfs@temppart}%
- \fi
- \fi
- \fi
- %\fontseries\exfs@series\selectfont}
- \ifx\exfs@tempg\exfs@series
- \exfs@try@series{\exfs@series}%
- \else
- \exfs@try@series[\exfs@tempg]{\exfs@series}% assume user wants to change weight even if this changes back to the default width
- \fi}
-\newcommand*{\mbdefault}{mb}
-\DeclareRobustCommand{\mbweight}{%
- \not@math@alphabet\mbweight\relax
- \exfs@merge@weight{\mbdefault}}
-\newcommand*{\dbdefault}{db}
-\DeclareRobustCommand{\dbweight}{%
- \not@math@alphabet\dbweight\relax
- \exfs@merge@weight{\dbdefault}}
-\newcommand*{\sbdefault}{sb}
-\DeclareRobustCommand{\sbweight}{%
- \not@math@alphabet\sbweight\relax
- \exfs@merge@weight{\sbdefault}}
-\newcommand*{\ebdefault}{eb}
-\DeclareRobustCommand{\ebweight}{%
- \not@math@alphabet\ebweight\relax
- \exfs@merge@weight{\ebdefault}}
-\newcommand*{\ubdefault}{ub}
-\DeclareRobustCommand{\ubweight}{%
- \not@math@alphabet\ubweight\relax
- \exfs@merge@weight{\ubdefault}}
-\newcommand*{\lgdefault}{l}
-%note - use this if light is a variant weight, rather than a separate family
-\DeclareRobustCommand{\lgweight}{%
- \not@math@alphabet\lgweight\relax
- \exfs@merge@weight{\lgdefault}}
-\newcommand*{\eldefault}{el}
-\DeclareRobustCommand{\elweight}{%
- \not@math@alphabet\elweight\relax
- \exfs@merge@weight{\eldefault}}
-\newcommand*{\uldefault}{ul}
-\DeclareRobustCommand{\ulweight}{%
- \not@math@alphabet\ulweight\relax
- \exfs@merge@weight{\uldefault}}
-%:end-added
-\DeclareRobustCommand{\itshape}{%
- \not@math@alphabet\itshape\mathit
- \exfs@merge@shape{\itdefault}{\scdefault}{\sidefault}}
-% original
-%\DeclareRobustCommand{\scshape}{%
-% \not@math@alphabet\scshape\relax
-% \exfs@merge@shape{\scdefault}{\itdefault}{\sidefault}}
-%:cfr-altered: \scshape
-\DeclareRobustCommand{\scshape}{%
- \not@math@alphabet\scshape\relax
- \def\tempu{u}%
- \def\tempo{ol}%
- \ifx\f@shape\tempu
- \exfs@merge@shape{\scdefault}{\udefault}{\scudefault}%
- \else
- \ifx\f@shape\tempo
- \exfs@merge@shape{\scdefault}{\oldefault}{\scoldefault}%
- \else
- \exfs@merge@shape{\scdefault}{\itdefault}{\sidefault}%
- \fi
- \fi}
-%:end-altered
-\DeclareRobustCommand{\upshape}{%
- \not@math@alphabet\upshape\relax
- \exfs@merge@shape{\updefault}{\sidefault}{\scdefault}}
-\DeclareRobustCommand{\dfshape}{%
- \not@math@alphabet\dfshape\relax
- \fontshape\shapedefault\selectfont}
-\newcommand*{\swshapedefault}{\itdefault}
-\DeclareRobustCommand{\swshape}{%
- \not@math@alphabet\swshape\relax
- \swstyle\fontshape\swshapedefault\selectfont}
-\DeclareTextFontCommand{\textln}{\lnstyle}
-\DeclareTextFontCommand{\textos}{\osstyle}
-\DeclareTextFontCommand{\textin}{\instyle}
-\DeclareTextFontCommand{\textsu}{\sustyle}
-\DeclareTextFontCommand{\textsi}{\sishape}
-\DeclareTextFontCommand{\textdf}{\dfshape}
-\DeclareTextFontCommand{\textsw}{\swshape}
-%:cfr-added
-%:families
-\DeclareTextFontCommand{\textti}{\tistyle}
-\DeclareTextFontCommand{\textlt}{\ltstyle}
-\DeclareTextFontCommand{\textof}{\ofstyle} % open-face (or outline or blank) style
-\DeclareTextFontCommand{\textalt}{\altstyle} % alternative style
-\DeclareTextFontCommand{\textreg}{\regstyle} % ``regular'' style
-\DeclareTextFontCommand{\emboss}{\embossstyle}
-\DeclareTextFontCommand{\textorn}{\ornamentalstyle} % intended primarily for decorative initials etc.
-\DeclareTextFontCommand{\textqt}{\qtstyle}
-\DeclareTextFontCommand{\textsh}{\shstyle} % shadowed style
-\DeclareTextFontCommand{\texttm}{\tmstyle}
-\DeclareTextFontCommand{\texttv}{\tvstyle}
-%:families - figures
-\DeclareTextFontCommand{\textl}{\lstyle}
-\DeclareTextFontCommand{\texto}{\ostyle}
-\DeclareTextFontCommand{\textp}{\pstyle}
-\DeclareTextFontCommand{\textt}{\tstyle}
-\DeclareTextFontCommand{\textpl}{\plstyle}
-\DeclareTextFontCommand{\textpo}{\postyle}
-\DeclareTextFontCommand{\texttl}{\tlstyle}
-\DeclareTextFontCommand{\textto}{\tostyle}
-%:shapes
-\DeclareTextFontCommand{\textol}{\olshape} % outline
-\DeclareTextFontCommand{\textswash}{\swashstyle} % an attempt to improve on \textsw
-\DeclareTextFontCommand{\textu}{\ushape}
-\DeclareTextFontCommand{\textscu}{\scushape}
-\DeclareTextFontCommand{\textui}{\uishape} % upright italic
-\DeclareTextFontCommand{\textri}{\rishape} % reverse italic
-%:widths
-\DeclareTextFontCommand{\textnw}{\nwwidth}
-\DeclareTextFontCommand{\textcd}{\cdwidth}
-\DeclareTextFontCommand{\textec}{\ecwidth}
-\DeclareTextFontCommand{\textuc}{\ucwidth}
-\DeclareTextFontCommand{\textet}{\etwidth}
-\DeclareTextFontCommand{\textep}{\epwidth}
-\DeclareTextFontCommand{\textex}{\exwidth}
-\DeclareTextFontCommand{\textux}{\uxwidth}
-\DeclareTextFontCommand{\textrw}{\regwidth}
-%:weights
-\DeclareTextFontCommand{\textmb}{\mbweight}
-\DeclareTextFontCommand{\textdb}{\dbweight}
-\DeclareTextFontCommand{\textsb}{\sbweight}
-\DeclareTextFontCommand{\texteb}{\ebweight}
-\DeclareTextFontCommand{\textub}{\ubweight}
-\DeclareTextFontCommand{\textlg}{\lgweight}
-\DeclareTextFontCommand{\textel}{\elweight}
-\DeclareTextFontCommand{\textul}{\ulweight}
-%end-added
-\newcommand*{\DeclareTextOrnament}[7]{%
- \expandafter\def\csname#1@orn\@roman#2\endcsname{#3/#4/#5/#6/#7}}
-\begingroup
- \catcode`\/=12
- \gdef\exfs@split@orndef#1/#2/#3/#4/#5\@nil{%
- \def\f@encoding{#1}%
- \def\f@family{#2}%
- \def\f@series{#3}%
- \def\f@shape{#4}%
- \def\exfs@tempa{#5}}
-\endgroup
-\def\exfs@base@family{\expandafter\exfs@get@base\f@family\@nil}
-\DeclareRobustCommand{\ornament}[1]{%
- \expandafter\ifx\csname\exfs@base@family @orn\@roman#1\endcsname\relax
- \PackageWarning{nfssext}{%
- Ornament #1 undefined for font family '\exfs@base@family'\MessageBreak
- Setting debug mark}%
- \rule{1ex}{1ex}%
- \else
- \begingroup
- \edef\exfs@tempb{\csname\exfs@base@family @orn\@roman#1\endcsname}%
- \expandafter\expandafter\expandafter\exfs@split@orndef
- \expandafter\string\exfs@tempb\@nil
- \selectfont\char\exfs@tempa
- \endgroup
- \fi}
-%:add microtype hooks
-%:partly from microtype docs; partly from MinionPro package
-\def\nfssextcfr@MT@Hook{%
-% \DeclareMicrotypeVariants{x,j,w,a,d,0,1}% this is the default declaration according to the docs
-% \DeclareMicrotypeVariants*{2,e,h,l}% this should *append* the variants (what do I use 'f' for? better take it out...)
- \DeclareMicrotypeVariants*{2,2d,2dj,2j,dj,e,h,l}% is this necessary or would the previous line be enough?
- }
-\@ifpackageloaded{microtype}{%
- \nfssextcfr@MT@Hook}{%
- \@ifundefined{Microtype@Hook}{%
- \let\Microtype@Hook\nfssextcfr@MT@Hook}{% MinionPro has \global before this
- \g@addto@macro\Microtype@Hook{\nfssextcfr@MT@Hook}}}
-\endinput
diff --git a/macros/latex/contrib/nfssext-cfr/nfssext-cfr.tex b/macros/latex/contrib/nfssext-cfr/nfssext-cfr.tex
deleted file mode 100644
index 8cf5a6c788..0000000000
--- a/macros/latex/contrib/nfssext-cfr/nfssext-cfr.tex
+++ /dev/null
@@ -1,196 +0,0 @@
-% !TEX TS-program = pdflatex
-% !TEX encoding = UTF-8 Unicode
-% arara: pdflatex: { synctex: true }
-\pdfminorversion=7
-\RequirePackage{svn-prov}
-\ProvidesFileSVN{$Id: nfssext-cfr.tex 6143 2017-03-28 22:45:37Z cfrees $}[\revinfo{}]
-\documentclass[pagesize=auto, fontsize=10pt, DIV=11]{scrartcl}
-
-\usepackage{cfr-lm}
-\usepackage{textcomp,longtable,array,booktabs}
-\usepackage{microtype}
-
-\newcommand*{\mail}[1]{\texttt{#1}}
-\newcommand*{\pkg}[1]{\mbox{\textsf{#1}}}
-\newcommand*{\cs}[1]{\texttt{\textbackslash #1}}
-
-\addtokomafont{title}{\rmfamily}
-
-\title{The \pkg{nfssext-cfr} package}
-\author{Clea F. Rees\thanks{\mail{ReesC21 <at> cardiff <dot> ac <dot> uk}}}
-\date{2017/03/28}
-
-
-\begin{document}
-
-\maketitle
-
-\begin{abstract}
- \noindent \pkg{nfssext-cfr} is an extension of Philipp Lehman's \pkg{nfssext}\@.
- \pkg{nfssext} provides commands which enables one to specify font features not covered by the New Font Selection Scheme of \LaTeXe\@.
- \pkg{nfssext-cfr} provides additional commands, further extending the facilities offered by NFSS.
-\end{abstract}
-
-\section*{Introduction}
-
-\pkg{nfssext-cfr} is required by various font support packages I've written.
-It is being released separately to avoid unnecessary duplication and confusion.
-At least, I hope it will remove at least one source of unnecessary confusion.
-I have no reason to think it will avoid any of the others.
-
-The code is somewhat experimental.
-It works for me.
-So far.
-If you discover problems, please let me know.
-If you know how to fix them, even better.
-
-\section*{Caveats, Warnings and Qualifications}
-
-The actual effect of any macro depends on any changes made to the defaults for various font features, the current font and, of course, what is available.
-
-For example, \cs{itdefault} is intended to be the name of italic shape and is used by the redefined \cs{itshape} supplied by this package.
-By default, \cs{itdefault} is \texttt{it}.
-However, if you change that to, say, \texttt{sl}, then \cs{itshape} will use \texttt{sl} instead.
-
-Moreover, if the current shape is small-caps, \cs{itshape} will attempt to merge the default italic shape with the small-caps.
-That is, it will try to select small-caps italic, if possible, before resorting to plain italic.
-
-The macros operating on family names are almost entirely reliant on font names adhering strictly to the Karl Berry schema.
-This includes the stipulation that multiple variants be listed in alphabetical order.
-These macros cannot be used with fonts named in any other way.
-
-Likewise, the macros for series and shapes are unlikely to have their expected effects if fonts are not packaged in ways which both adhere to the NFSS schema and, where relevant, to the specific way that schema is extended here.
-In particular, note that italic small-caps is assumed to be coded as \texttt{si}.
-
-If a macro's attempt to enable or disable a font feature fails, a warning will generally be written to the console, but the code tries hard not to trigger errors.
-If an attempt triggers an error, that's a bug, so please let me know.
-If an attempt triggers a warning, please note that there may be no bug at all and, if there is a bug, it is probably not in this package.
-
-To be clear, there certainly are bugs.
-It is just statistically unlikely that any given warning is caused by one.
-
-{%
- \fontfamily{pzc}\fontshape{it}\fontseries{m}\selectfont\Large Caveat emptor \dots\par
-}
-
-\section*{Macros}
-
-The following table includes macros supplied by the original \pkg{nfssext} and additions available with \pkg{nfssext-cfr}.
-
-The third column lists the default letter codes for various font features.
-As explained above, if the defaults are changed, the macros will try to do something different.
-
-A \texttt{+} indicates that the macro will attempt to merge the addition into the current font's family name, series or shape.
-For example, if the current font uses oldstyle figures, the \texttt{+2} indicates that \cs{pstyle} will attempt to select a font with figures which are both proportional and oldstyle.
-
-A \textt{-} indicates that the macro will attempt to subtract from the current font's family name, series or shape.
-For example, if the current font uses oldstyle figures, the \texttt{-2} indicates that \cs{tstyle} will attempt to select a font with figures which are both tabular and oldstyle.
-
-A comma-separated list indicates consecutive additions and/or subtraction.
-
-If no \texttt{+-} is used, the macro tries to select a font with the given feature without merging.
-For example \cs{sistyle} tries to switch to \texttt{si} shape regardless of the current font shape.
-
-A \texttt{--} indicates that the macro will try to clear all relevant letter codes from the current font's family name, series or shape.
-For example, \cs{regwidth} tries to switch to a series with no letter codes indicating non-standard widths in its name.
-
-Additions, subtractions and clearances operate on font family names, series or shapes, as appropriate.
-In general, macros with \texttt{style} in their names operate on family names; those with \texttt{shape} operate on shape codes; and those with \textt{width} or \texttt{weight} operate on series codes.
-
-The letter codes correspond to those specified by the NFSS specification, unless the specification does not include the relevant feature.
-In the latter case, I tried to choose something sensible i.e.~something which made sense to me at the time.
-
-
-\begin{longtable}{lll>{\ttfamily}ll}
- \toprule\endhead
- \bottomrule\endfoot
- \multicolumn{5}{l}{\sffamily Standard macros redefined:}\\
- \cmidrule(lr){1-5}
- & \cs{itshape}\\
- & \cs{scshape}\\
- & \cs{upshape}\\
- \cmidrule(lr){1-5}
- \multicolumn{5}{l}{\sffamily Families --- Styles:}\\
- \cmidrule(lr){1-5}
- & \cs{textti} & \cs{tistyle} & +d & titling/display\\
- & \cs{textlt} & \cs{ltstyle} & +l & light (when separate family)\\
- & \cs{textof} & \cs{ofstyle} & +l & open-face (or outline or blank) style\\
- & \cs{textalt} & \cs{altstyle} & +a & alternative style\\
- & \cs{textreg} & \cs{regstyle} & -- & regular style\\
- & \cs{emboss} & \cs{embossstyle} & +e & \\
- & \cs{textorn} & \cs{ornamentalstyle} & +p & intended primarily for decorative initials etc.\\
- & \cs{ornament} & \\
- & \cs{textqt} & \cs{qtstyle} & +q & quotation style\\
- & \cs{textsh} & \cs{shstyle} & +h & shadowed style\\
- & \cs{texttm} & \cs{tmstyle} & -s,-v,+t & monowidth typewriter\\
- & \cs{texttv} & \cs{tvstyle} & -s,-t,+v & variable width typewriter\\
- & \cs{textswash} & \cs{swashstyle} & +w & an attempt to improve on \cs{textsw}\\
- \cmidrule(lr){1-5}
- \multicolumn{5}{l}{\sffamily Families --- Figures:}\\
- \cmidrule(lr){1-5}
- & \cs{textln} & \cs{lnstyle} & -- & lining figures (cf.~macro below)\\
- & \cs{textos} & \cs{osstyle} & j & oldstyle figures (cf.~macro below)\\
- & \cs{textin} & \cs{instyle} & 0 & inferior figures\\
- & \cs{textsu} & \cs{sustyle} & 1 & superior figures\\
- & \cs{textl} & \cs{lstyle} & -j & lining figures (cf.~command above)\\
- & \cs{texto} & \cs{ostyle} & +j & oldstyle figures (cf.~original \cs{osstyle} above)\\
- & \cs{textp} & \cs{pstyle} & +2 & proportional figures\\
- & \cs{textt} & \cs{tstyle} & -2 & tabular figures\\
- & \cs{textpl} & \cs{plstyle} & -j,+2 & proportional lining figures \\
- & \cs{textpo} & \cs{postyle} & +2j & proportional oldstyle figures \\
- & \cs{texttl} & \cs{tlstyle} & -j,-2 & tabular lining figures\\
- & \cs{textto} & \cs{tostyle} & +j,-2 & tabular oldstyle figures\\
- \cmidrule(lr){1-5}
- \multicolumn{5}{l}{\sffamily Shapes:}\\
- \cmidrule(lr){1-5}
- & \cs{scolshape} & & scol & \\
- & \cs{textol} & \cs{olshape} & ol & outline\\
- & \cs{textsi} & \cs{sishape} & si & italic small-caps\\
- & \cs{textu} & \cs{ushape} & u & \\
- & \cs{textscu} & \cs{scushape} & su & \\
- & \cs{textui} & \cs{uishape} & ui & upright italic\\
- & \cs{textri} & \cs{rishape} & ri & reverse italic\\
- & \cs{textdf} & \cs{dfshape} & n & default shape\\
- & \cs{textsw} & \cs{swshape} & it & swash shape (cf.~\cs{swstyle} above)\\
- & & \cs{swstyle} & \\
- \cmidrule(lr){1-5}
- \multicolumn{5}{l}{\sffamily Series --- Widths:}\\
- \cmidrule(lr){1-5}
- & \cs{textnw} & \cs{nwwidth} & +c & \\
- & \cs{textcd} & \cs{cdwidth} & +c & \\
- & \cs{textec} & \cs{ecwidth} & +ec & \\
- & \cs{textuc} & \cs{ucwidth} & +uc & \\
- & \cs{textet} & \cs{etwidth} & +x & \\
- & \cs{textep} & \cs{epwidth} & +x & \\
- & \cs{textex} & \cs{exwidth} & +ex & \\
- & \cs{textux} & \cs{uxwidth} & +ux & \\
- & \cs{textrw} & \cs{regwidth} & -- & \\
- \cmidrule(lr){1-5}
- \multicolumn{5}{l}{\sffamily Series --- Weights:}\\
- \cmidrule(lr){1-5}
- & \cs{textmb} & \cs{mbweight} & +mb & \\
- & \cs{textdb} & \cs{dbweight} & +db & \\
- & \cs{textsb} & \cs{sbweight} & +sb & \\
- & \cs{texteb} & \cs{ebweight} & +eb & \\
- & \cs{textub} & \cs{ubweight} & +ub & \\
- & \cs{textlg} & \cs{lgweight} & +l & \\
- & \cs{textel} & \cs{elweight} & +el & \\
- & \cs{textul} & \cs{ulweight} & +ul & \\
-\end{longtable}
-
-\section*{History}
-
-\subsection*{2017-03-28}
-Attempt to modify \cs{tmstyle} and \cs{tvstyle} to work as advertised.
-Extend documentation somewhat.
-
-\subsection*{2010}
-The 2010 update includes an attempt to improve the behaviour of \verb|\ofstyle|, and to add support for \pkg{microtype}.
-I didn't publish this at the time because I wanted to test it first.
-I have just discovered that I am still using a local copy.
-Insofar as one person can test something, I figure that 5 years ought to be enough to pick up the most obvious problems.
-However, your kilometres may, as always, vary.
-
-There should be no changes for the end user except that in certain cases it is possible that line-breaks may be altered if \pkg{microtype} is in use due to the enhanced support included for variant font families.
-
-\end{document}
diff --git a/macros/latex/contrib/ocgx2/ChangeLog b/macros/latex/contrib/ocgx2/ChangeLog
index 65ca63a13d..2fb1d2c57f 100644
--- a/macros/latex/contrib/ocgx2/ChangeLog
+++ b/macros/latex/contrib/ocgx2/ChangeLog
@@ -1,3 +1,17 @@
+2024-09-16
+ * v0.60: ocgx2.sty
+ * fix: typos in pkg decription (log output)
+
+2024-09-15
+ * v0.59: ocgx2.sty
+ * v0.24: ocgbase.sty
+ * fix: pdf/a compliance (issue #22); log output (issue #20)
+
+2024-08-28
+ * v0.58: ocgx2.sty
+ * v0.23: ocgbase.sty
+ * fix: OCG hierarchy shown in the viewer's Layer tab
+
2024-03-18
* v0.57: ocgx2.sty
* fix: fixed link border in pdfmanagement-testphase version
diff --git a/macros/latex/contrib/ocgx2/ocgbase.sty b/macros/latex/contrib/ocgx2/ocgbase.sty
index bf4edf432b..e182f8670d 100644
--- a/macros/latex/contrib/ocgx2/ocgbase.sty
+++ b/macros/latex/contrib/ocgx2/ocgbase.sty
@@ -100,8 +100,8 @@
%
% The Current Maintainer of this work is A. Grahn.
-\def\g@ocgbase@date@tl{2022/08/04}
-\def\g@ocgbase@version@tl{0.22}
+\def\g@ocgbase@date@tl{2024/09/15}
+\def\g@ocgbase@version@tl{0.24}
\ProvidesExplPackage{ocgbase}{\g@ocgbase@date@tl}{\g@ocgbase@version@tl}
{support package for ocgx2.sty}
@@ -167,10 +167,8 @@
%global Order list
\tl_new:N\l_ocgbase_ocgorderentry_tl
\tl_new:N\l_ocgbase_ocgorder_tl
- \tl_if_exist:cT{g_ocgbase_nd_0_chld_tl}{
- \ocgbase_build_order:Nn\l_ocgbase_ocgorder_tl{
- \tl_use:c{g_ocgbase_nd_0_chld_tl}
- }
+ \seq_if_empty:NF\g_ocgbase_order_root_seq{
+ \ocgbase_build_order:Nn\l_ocgbase_ocgorder_tl{root}
}
\tl_if_empty:NF\l_ocgbase_ocgorder_tl{
\pbs_pdfobj:nnn{}{array}{\l_ocgbase_ocgorder_tl}
@@ -228,98 +226,45 @@
\cs_new_nopar:Nn\ocgbase_last_ocg:{\g_ocgbase_last_ocg_tl}
-\int_new:N\g_ocgbase_nd_int %node id
-\seq_new:N\g_ocgbase_tree_nd_stack_seq %stack with open ocg node id
-\seq_new:N\g_ocgbase_tree_ocg_stack_seq %stack with open ocg obj number
-\seq_gpush:Nn\g_ocgbase_tree_nd_stack_seq{0} %push root node
-\seq_gpush:Nn\g_ocgbase_tree_ocg_stack_seq{null} %push root node
+\seq_new:N\g_ocgbase_open_ocg_seq %stack with open ocg ref
+\seq_new:N\g_ocgbase_order_root_seq %seq taking ocg ref /Order root
-%macro for starting OCG object (and nested children) insertion into Order
+%macro for starting OCG object (and nested children) insertion into order
%hierarchy (shown as tree structure in the viewers `Layers' tab
\cs_new_protected_nopar:Nn\ocgbase_tree_node_begin:n{ % #1: OCG obj
- %get the parent node from stack
- \seq_get:NN\g_ocgbase_tree_nd_stack_seq\l__ocgbase_prnt_tl
- \tl_if_exist:cTF{g_ocgbase_nd_\l__ocgbase_prnt_tl _chld_tl}{
- %parent has >=1 children (i. e. my older siblings), traverse them
- \tl_set:Nv\l__ocgbase_prev_sbl_tl{g_ocgbase_nd_\l__ocgbase_prnt_tl _chld_tl}
- \tl_set:Nx\l__ocgbase_cur_ocg_tl{#1}
- \ocgbase_traverse_siblings:NN\l__ocgbase_prev_sbl_tl\l__ocgbase_cur_ocg_tl
- \str_if_empty:NTF\l__ocgbase_cur_ocg_tl{
- %I am the first child of my parent to refer to OCG #1
- \int_gincr:N\g_ocgbase_nd_int
- \tl_set:Nx\l__ocgbase_cur_nd_tl{\int_use:N\g_ocgbase_nd_int}
- %set myself as my next-older sibling's `next sibling'
- \tl_gset:cV{
- g_ocgbase_nd_\l__ocgbase_prev_sbl_tl _sbl_tl}\l__ocgbase_cur_nd_tl
- }{
- %there is already a sibling referring to OCG #1; no new node needs be
- %created
- \tl_set:NV\l__ocgbase_cur_nd_tl\l__ocgbase_prev_sbl_tl
- }
- }{
- %I am the very first child of my parent
- \int_gincr:N\g_ocgbase_nd_int
- \tl_set:Nx\l__ocgbase_cur_nd_tl{\int_use:N\g_ocgbase_nd_int}
- %set myself as my parent's first child
- \tl_gset:cV{g_ocgbase_nd_\l__ocgbase_prnt_tl _chld_tl}\l__ocgbase_cur_nd_tl
+ % get parent (either currently open ocg or root)
+ \seq_get:NNF\g_ocgbase_open_ocg_seq\l__ocgbase_prnt_tl{
+ \tl_set:Nn\l__ocgbase_prnt_tl{root}
}
- %set the OCG I am referring to
- \tl_gset:cx{g_ocgbase_nd_\l__ocgbase_cur_nd_tl _ocg_tl}{#1}
- %push current node and its associated OCG obj on the stacks
- \seq_gpush:NV\g_ocgbase_tree_nd_stack_seq\l__ocgbase_cur_nd_tl
- \seq_gpush:Nx\g_ocgbase_tree_ocg_stack_seq{#1}
-}
-
-%macro that ends insertion of OCG and sub-OCGs into Order tree
-\cs_new_protected:Nn\ocgbase_tree_node_end:{
- \seq_get:NN\g_ocgbase_tree_nd_stack_seq\l_tempa_tl
- \seq_get:NN\g_ocgbase_tree_ocg_stack_seq\l_tempb_tl
- \str_if_eq:eeT{
- \cs_if_exist_use:c{g_ocgbase_nd_\l_tempa_tl _ocg_tl}
- }{
- \l_tempb_tl
- }{
- \seq_gpop:NN\g_ocgbase_tree_nd_stack_seq\g_trash_tl
- \seq_gpop:NN\g_ocgbase_tree_ocg_stack_seq\g_trash_tl
+ %push current ocg ref on stack with open ocgs
+ \seq_gpush:Nx\g_ocgbase_open_ocg_seq{#1}
+ %create seq for current ocg if not yet existing and
+ %append ocg ref to its parent seq
+ \seq_if_exist:cF{g_ocgbase_order_#1_seq}{
+ \seq_new:c{g_ocgbase_order_#1_seq}
+ \seq_gput_right:cx{g_ocgbase_order_ \l__ocgbase_prnt_tl _seq}{#1}
}
}
-% helper macro (recursive); traverses siblings to find either
-% the node which refers to the same OCG (arg #2 remains un-modified), or
-% the last sibling inserted (arg #2 is cleared);
-% the node id of the sibling found is returned in arg #1
-\cs_new_protected:Nn\ocgbase_traverse_siblings:NN{
- % #1: current node (in/out), #2: OCG obj (in/out)
- \str_if_eq:eeF{#2}{\tl_use:c{g_ocgbase_nd_#1_ocg_tl}}{
- \tl_if_exist:cTF{g_ocgbase_nd_#1_sbl_tl}{
- \tl_set:Nv#1{g_ocgbase_nd_#1_sbl_tl}
- \ocgbase_traverse_siblings:NN#1#2
- }{
- \tl_clear:N#2
- }
- }
+%macro that ends insertion of current OCG into order tree
+\cs_new_protected:Nn\ocgbase_tree_node_end:{
+ %pop top ocg ref from stack with open ocgs
+ \seq_gpop:NN\g_ocgbase_open_ocg_seq\g_trash_tl
}
+%macro that builds global ocg order from hierarchy and saves it into tl var
\cs_new_protected_nopar:Nn\ocgbase_build_order:Nn{
% (recursive macro)
% #1: tl var to which the OCG order is written (output)
- % #2: starting node id (input; usually `1')
- \tl_set:Nx\l__ocgbase_cur_nd_tl{#2}
- % first, append the OCG obj the current node is referring to
- \tl_put_right:Nx#1{~\tl_use:c{g_ocgbase_nd_\l__ocgbase_cur_nd_tl _ocg_tl}}
- % second, traverse the tree starting with the first child node
- \tl_if_exist:cT{g_ocgbase_nd_\l__ocgbase_cur_nd_tl _chld_tl}{
- \seq_gpush:NV\g_ocgbase_tree_nd_stack_seq\l__ocgbase_cur_nd_tl
- \tl_put_right:Nn#1{~[}
- \ocgbase_build_order:Nn#1{
- \tl_use:c{g_ocgbase_nd_\l__ocgbase_cur_nd_tl _chld_tl}}
- \tl_put_right:Nn#1{~]}
- \seq_gpop:NN\g_ocgbase_tree_nd_stack_seq\l__ocgbase_cur_nd_tl
- }
- % third, traverse the tree starting with the next sibling node
- \tl_if_exist:cT{g_ocgbase_nd_\l__ocgbase_cur_nd_tl _sbl_tl}{
- \ocgbase_build_order:Nn#1{
- \tl_use:c{g_ocgbase_nd_\l__ocgbase_cur_nd_tl _sbl_tl}}
+ % #2: starting node (input; usually `root')
+ \seq_map_inline:cn{g_ocgbase_order_#2_seq}{
+ % first, append ocg ref to result tl var
+ \tl_put_right:Nx#1{~##1}
+ \seq_if_empty:cF{g_ocgbase_order_##1_seq}{
+ \tl_put_right:Nn#1{~[}
+ \ocgbase_build_order:Nn#1{##1}
+ \tl_put_right:Nn#1{~]}
+ }
}
}
@@ -433,7 +378,7 @@
% \ocgbase@tree@node@end
% #1: OCG PDF object
% macro pair (begin and end) for inserting OCG object and its children
-% into Order hierarchy (shown as tree structure in the viewers `Layers' tab
+% into order hierarchy (shown as tree structure in the viewers `Layers' tab
%
% --------
%
@@ -479,8 +424,8 @@
%
% The Current Maintainer of this work is A. Grahn.
-\def\g@ocgbase@date@tl{2022/08/04}
-\def\g@ocgbase@version@tl{0.22}
+\def\g@ocgbase@date@tl{2024/09/15}
+\def\g@ocgbase@version@tl{0.24}
\ProvidesExplPackage{ocgbase}{\g@ocgbase@date@tl}{\g@ocgbase@version@tl}
{support package for ocgx2.sty}
@@ -535,25 +480,23 @@
\AddToHook{shipout/lastpage}{
\tl_if_empty:NF\g_ocgbase_ocgs_tl{
%global OCG array
- \pbs_pdfobj:nnn{}{array}{\g_ocgbase_ocgs_tl}
- \tl_set:Nx\l_ocgbase_ocgarray_tl{\pbs_pdflastobj:}
- \tl_new:N\l_ocgbase_offocgentry_tl
+ \pdf_object_unnamed_write:ne{array}{\g_ocgbase_ocgs_tl}
+ \tl_set:Nx\l_ocgbase_ocgarray_tl{\pdf_object_ref_last:}
%global OFF list
+ \tl_new:N\l_ocgbase_offocgentry_tl
\seq_if_empty:NF\g_ocgbase_offocgs_seq{
- \pbs_pdfobj:nnn{}{array}{\seq_use:Nn\g_ocgbase_offocgs_seq{~}}
- \tl_set:Nx\l_ocgbase_offocgentry_tl{/OFF~\pbs_pdflastobj:}
+ \pdf_object_unnamed_write:ne{array}{\seq_use:Nn\g_ocgbase_offocgs_seq{~}}
+ \tl_set:Nx\l_ocgbase_offocgentry_tl{/OFF~\pdf_object_ref_last:}
}
%global Order list
\tl_new:N\l_ocgbase_ocgorderentry_tl
\tl_new:N\l_ocgbase_ocgorder_tl
- \tl_if_exist:cT{g_ocgbase_nd_0_chld_tl}{
- \ocgbase_build_order:Nn\l_ocgbase_ocgorder_tl{
- \tl_use:c{g_ocgbase_nd_0_chld_tl}
- }
+ \seq_if_empty:NF\g_ocgbase_order_root_seq{
+ \ocgbase_build_order:Nn\l_ocgbase_ocgorder_tl{root}
}
\tl_if_empty:NF\l_ocgbase_ocgorder_tl{
- \pbs_pdfobj:nnn{}{array}{\l_ocgbase_ocgorder_tl}
- \tl_set:Nx\l_ocgbase_ocgorderentry_tl{/Order~\pbs_pdflastobj:}
+ \pdf_object_unnamed_write:ne{array}{\l_ocgbase_ocgorder_tl}
+ \tl_set:Nx\l_ocgbase_ocgorderentry_tl{/Order~\pdf_object_ref_last:}
}
%generate RBGroups entry (radio button groups)
\tl_new:N\l_ocgbase_rbtn_groups_tl
@@ -566,16 +509,19 @@
}
\tl_new:N\l_ocgbase_rbgroupsentry_tl
\tl_if_empty:NF\l_ocgbase_rbtn_groups_tl{
- \pbs_pdfobj:nnn{}{array}{\l_ocgbase_rbtn_groups_tl}
- \tl_set:Nx\l_ocgbase_rbgroupsentry_tl{/RBGroups~\pbs_pdflastobj:}
+ \pdf_object_unnamed_write:ne{array}{\l_ocgbase_rbtn_groups_tl}
+ \tl_set:Nx\l_ocgbase_rbgroupsentry_tl{/RBGroups~\pdf_object_ref_last:}
}
\pdfmanagement_add:nnx{Catalog/OCProperties}{OCGs}{\g_ocgbase_ocgs_tl}
\pdfmanagement_add:nnx{Catalog/OCProperties}{D}{<<
- /AS~[
- <</Event/View /Category[/View] /OCGs~\l_ocgbase_ocgarray_tl>>
- <</Event/Print /Category[/Print] /OCGs~\l_ocgbase_ocgarray_tl>>
- <</Event/Export/Category[/Export]/OCGs~\l_ocgbase_ocgarray_tl>>
- ]
+ /Name~(OC~default~configuration)
+ \pdfmeta_standard_verify:nT{Catalog_OCProperties_no_AS}{ %for pdf/a compliance
+ /AS~[
+ <</Event/View /Category[/View] /OCGs~\l_ocgbase_ocgarray_tl>>
+ <</Event/Print /Category[/Print] /OCGs~\l_ocgbase_ocgarray_tl>>
+ <</Event/Export/Category[/Export]/OCGs~\l_ocgbase_ocgarray_tl>>
+ ]
+ }
/BaseState/ON~\l_ocgbase_offocgentry_tl
\l_ocgbase_ocgorderentry_tl
\l_ocgbase_rbgroupsentry_tl
@@ -586,12 +532,10 @@
}
%macro for inserting new OCG object
-\cs_generate_variant:Nn\pdf_object_new:nn{xn}
-\cs_generate_variant:Nn\pdf_object_write:nn{xx}
\int_new:N\g_ocgbase_int
\cs_new_protected_nopar:Nn\ocgbase_new_ocg:nnn{
- \pdf_object_new:xn{g_object_\int_use:N\g_ocgbase_int _pdf}{dict}
- \pdf_object_write:xx{g_object_\int_use:N\g_ocgbase_int _pdf}{
+ \exp_args:Ne\pdf_object_new:n{g_object_\int_use:N\g_ocgbase_int _pdf}
+ \exp_args:Neee\pdf_object_write:nnn{g_object_ \int_use:N\g_ocgbase_int _pdf}{dict}{
/Type/OCG/Name~(#1)~\str_if_eq:eeF{#2}{}{/Usage<<#2>>}
}
\tl_gput_right:Nx\g_ocgbase_ocgs_tl{~\pdf_object_ref_last:}
@@ -612,98 +556,45 @@
\cs_new_nopar:Nn\ocgbase_last_ocg:{\g_ocgbase_last_ocg_tl}
-\int_new:N\g_ocgbase_nd_int %node id
-\seq_new:N\g_ocgbase_tree_nd_stack_seq %stack with open ocg node id
-\seq_new:N\g_ocgbase_tree_ocg_stack_seq %stack with open ocg obj number
-\seq_gpush:Nn\g_ocgbase_tree_nd_stack_seq{0} %push root node
-\seq_gpush:Nn\g_ocgbase_tree_ocg_stack_seq{null} %push root node
+\seq_new:N\g_ocgbase_open_ocg_seq %stack with open ocg ref
+\seq_new:N\g_ocgbase_order_root_seq %seq taking ocg ref /Order root
-%macro for starting OCG object (and nested children) insertion into Order
+%macro for starting OCG object (and nested children) insertion into order
%hierarchy (shown as tree structure in the viewers `Layers' tab
\cs_new_protected_nopar:Nn\ocgbase_tree_node_begin:n{ % #1: OCG obj
- %get the parent node from stack
- \seq_get:NN\g_ocgbase_tree_nd_stack_seq\l__ocgbase_prnt_tl
- \tl_if_exist:cTF{g_ocgbase_nd_\l__ocgbase_prnt_tl _chld_tl}{
- %parent has >=1 children (i. e. my older siblings), traverse them
- \tl_set:Nv\l__ocgbase_prev_sbl_tl{g_ocgbase_nd_\l__ocgbase_prnt_tl _chld_tl}
- \tl_set:Nx\l__ocgbase_cur_ocg_tl{#1}
- \ocgbase_traverse_siblings:NN\l__ocgbase_prev_sbl_tl\l__ocgbase_cur_ocg_tl
- \str_if_empty:NTF\l__ocgbase_cur_ocg_tl{
- %I am the first child of my parent to refer to OCG #1
- \int_gincr:N\g_ocgbase_nd_int
- \tl_set:Nx\l__ocgbase_cur_nd_tl{\int_use:N\g_ocgbase_nd_int}
- %set myself as my next-older sibling's `next sibling'
- \tl_gset:cV{
- g_ocgbase_nd_\l__ocgbase_prev_sbl_tl _sbl_tl}\l__ocgbase_cur_nd_tl
- }{
- %there is already a sibling referring to OCG #1; no new node needs be
- %created
- \tl_set:NV\l__ocgbase_cur_nd_tl\l__ocgbase_prev_sbl_tl
- }
- }{
- %I am the very first child of my parent
- \int_gincr:N\g_ocgbase_nd_int
- \tl_set:Nx\l__ocgbase_cur_nd_tl{\int_use:N\g_ocgbase_nd_int}
- %set myself as my parent's first child
- \tl_gset:cV{g_ocgbase_nd_\l__ocgbase_prnt_tl _chld_tl}\l__ocgbase_cur_nd_tl
+ % get parent (either currently open ocg or root)
+ \seq_get:NNF\g_ocgbase_open_ocg_seq\l__ocgbase_prnt_tl{
+ \tl_set:Nn\l__ocgbase_prnt_tl{root}
}
- %set the OCG I am referring to
- \tl_gset:cx{g_ocgbase_nd_\l__ocgbase_cur_nd_tl _ocg_tl}{#1}
- %push current node and its associated OCG obj on the stacks
- \seq_gpush:NV\g_ocgbase_tree_nd_stack_seq\l__ocgbase_cur_nd_tl
- \seq_gpush:Nx\g_ocgbase_tree_ocg_stack_seq{#1}
-}
-
-%macro that ends insertion of OCG and sub-OCGs into Order tree
-\cs_new_protected:Nn\ocgbase_tree_node_end:{
- \seq_get:NN\g_ocgbase_tree_nd_stack_seq\l_tempa_tl
- \seq_get:NN\g_ocgbase_tree_ocg_stack_seq\l_tempb_tl
- \str_if_eq:eeT{
- \cs_if_exist_use:c{g_ocgbase_nd_\l_tempa_tl _ocg_tl}
- }{
- \l_tempb_tl
- }{
- \seq_gpop:NN\g_ocgbase_tree_nd_stack_seq\g_trash_tl
- \seq_gpop:NN\g_ocgbase_tree_ocg_stack_seq\g_trash_tl
+ %push current ocg ref on stack with open ocgs
+ \seq_gpush:Nx\g_ocgbase_open_ocg_seq{#1}
+ %create seq for current ocg if not yet existing and
+ %append ocg ref to its parent seq
+ \seq_if_exist:cF{g_ocgbase_order_#1_seq}{
+ \seq_new:c{g_ocgbase_order_#1_seq}
+ \seq_gput_right:cx{g_ocgbase_order_ \l__ocgbase_prnt_tl _seq}{#1}
}
}
-% helper macro (recursive); traverses siblings to find either
-% the node which refers to the same OCG (arg #2 remains un-modified), or
-% the last sibling inserted (arg #2 is cleared);
-% the node id of the sibling found is returned in arg #1
-\cs_new_protected:Nn\ocgbase_traverse_siblings:NN{
- % #1: current node (in/out), #2: OCG obj (in/out)
- \str_if_eq:eeF{#2}{\tl_use:c{g_ocgbase_nd_#1_ocg_tl}}{
- \tl_if_exist:cTF{g_ocgbase_nd_#1_sbl_tl}{
- \tl_set:Nv#1{g_ocgbase_nd_#1_sbl_tl}
- \ocgbase_traverse_siblings:NN#1#2
- }{
- \tl_clear:N#2
- }
- }
+%macro that ends insertion of current OCG into order tree
+\cs_new_protected:Nn\ocgbase_tree_node_end:{
+ %pop top ocg ref from stack with open ocgs
+ \seq_gpop:NN\g_ocgbase_open_ocg_seq\g_trash_tl
}
+%macro that builds global ocg order from hierarchy and saves it into tl var
\cs_new_protected_nopar:Nn\ocgbase_build_order:Nn{
% (recursive macro)
% #1: tl var to which the OCG order is written (output)
- % #2: starting node id (input; usually `1')
- \tl_set:Nx\l__ocgbase_cur_nd_tl{#2}
- % first, append the OCG obj the current node is referring to
- \tl_put_right:Nx#1{~\tl_use:c{g_ocgbase_nd_\l__ocgbase_cur_nd_tl _ocg_tl}}
- % second, traverse the tree starting with the first child node
- \tl_if_exist:cT{g_ocgbase_nd_\l__ocgbase_cur_nd_tl _chld_tl}{
- \seq_gpush:NV\g_ocgbase_tree_nd_stack_seq\l__ocgbase_cur_nd_tl
- \tl_put_right:Nn#1{~[}
- \ocgbase_build_order:Nn#1{
- \tl_use:c{g_ocgbase_nd_\l__ocgbase_cur_nd_tl _chld_tl}}
- \tl_put_right:Nn#1{~]}
- \seq_gpop:NN\g_ocgbase_tree_nd_stack_seq\l__ocgbase_cur_nd_tl
- }
- % third, traverse the tree starting with the next sibling node
- \tl_if_exist:cT{g_ocgbase_nd_\l__ocgbase_cur_nd_tl _sbl_tl}{
- \ocgbase_build_order:Nn#1{
- \tl_use:c{g_ocgbase_nd_\l__ocgbase_cur_nd_tl _sbl_tl}}
+ % #2: starting node (input; usually `root')
+ \seq_map_inline:cn{g_ocgbase_order_#2_seq}{
+ % first, append ocg ref to result tl var
+ \tl_put_right:Nx#1{~##1}
+ \seq_if_empty:cF{g_ocgbase_order_##1_seq}{
+ \tl_put_right:Nn#1{~[}
+ \ocgbase_build_order:Nn#1{##1}
+ \tl_put_right:Nn#1{~]}
+ }
}
}
@@ -740,7 +631,7 @@
% OC-marked content
\cs_new_protected_nopar:Nn\ocgbase_oc_bdc:n{\pbs_pdfbdc:nn{OC}{#1}}
-\cs_new_protected_nopar:Nn\ocgbase_oc_emc:{\pbs_pdfemc:}
+\cs_new_eq:NN\ocgbase_oc_emc:\pbs_pdfemc:
%stack of PDF obj references of currently open OCGs
\seq_new:N\g_ocgbase_open_stack_seq
diff --git a/macros/latex/contrib/ocgx2/ocgx2.sty b/macros/latex/contrib/ocgx2/ocgx2.sty
index a1081f88ac..84d1432395 100644
--- a/macros/latex/contrib/ocgx2/ocgx2.sty
+++ b/macros/latex/contrib/ocgx2/ocgx2.sty
@@ -43,11 +43,11 @@
%
% The Current Maintainer of this work is A. Grahn.
- \def\g@ocgxii@date@tl{2024/03/18}
- \def\g@ocgxii@version@tl{0.57}
+ \def\g@ocgxii@date@tl{2024/09/16}
+ \def\g@ocgxii@version@tl{0.60}
\ProvidesExplPackage{ocgx2}{\g@ocgxii@date@tl}{\g@ocgxii@version@tl}
- {ports `ocgx' functionality to dvips+ps2pdf, xelatex and dvipdfmx}
+ {ports~`ocgx'~functionality~to~dvips+ps2pdf,~xelatex~and~dvipdfmx}
%creating global definitions
\cs_new_protected:Npn\ocgxii@newkey#1#2{\tl_gset:cx{#1}{#2}}
@@ -1579,8 +1579,8 @@
%
% The Current Maintainer of this work is A. Grahn.
-\def\g@ocgxii@date@tl{2024/03/18}
-\def\g@ocgxii@version@tl{0.57}
+\def\g@ocgxii@date@tl{2024/09/16}
+\def\g@ocgxii@version@tl{0.60}
\ProvidesExplPackage{ocgx2}{\g@ocgxii@date@tl}{\g@ocgxii@version@tl}
{ports `ocgx' functionality to dvips+ps2pdf, xelatex and dvipdfmx}
@@ -1810,8 +1810,8 @@
\cs_set_eq:NN\And \ocgxii_protected_dummy_cs:n
\cs_set_eq:NN\Or \ocgxii_protected_dummy_cs:n
\ocgxii_ocmd_read_visbility:xN{#2}\l_ocgxii_ocmd_visibility_tl
- \pdf_object_new:xn{g_object_\int_use:N\g_ocgbase_int _pdf}{dict}
- \pdf_object_write:xx{g_object_\int_use:N\g_ocgbase_int _pdf}{
+ \exp_args:Ne\pdf_object_new:n{g_object_\int_use:N\g_ocgbase_int _pdf}
+ \exp_args:Neee\pdf_object_write:nnn{g_object_\int_use:N\g_ocgbase_int _pdf}{dict}{
/Type/OCMD\l_ocgxii_ocmd_visibility_tl
}
\tl_gset:cx{g_pbs_objname_\pdf_object_ref_last: _tl}{
@@ -2385,104 +2385,132 @@
%
\bool_if:nTF{\l_ocgxii_nobreak_bool || \l_ocgxii_mouse_triggers_bool}{
\hbox_set:Nn\l_tmpa_box{#6}
- \bool_if:NTF\l_ocgxii_mouse_triggers_bool{
- % e,d,x mouse triggers require (non-breakable) /Widget annot
- \pdfannot_dict_put:nnn{link/GoTo}{Subtype}{/Widget}
- \pdfannot_dict_remove:nn{link/GoTo}{Border}
- }{
- \pdfannot_dict_put:nnn{link/GoTo}{Border}{[0~0~0]}
- }
- \pdfannot_dict_remove:nn{link/GoTo}{C}
- \pbs_pdfannot:nnnn{
- \dim_use:N\box_wd:N\l_tmpa_box}{
- \dim_use:N\box_ht:N\l_tmpa_box}{
- \dim_use:N\box_dp:N\l_tmpa_box
- }{
- \pdfannot_dict_use:n{link/GoTo}
+ % suppress annots with SetOCGState Action Subtype for pdf/a compliance
+ \pdfmeta_standard_verify:nT{annot_action_A}{
\bool_if:NTF\l_ocgxii_mouse_triggers_bool{
- /Ff~65536/FT/Btn/BS<</W~0>>
- /T~(ocgx2@\int_use:N\g_ocgxii_widcount_int)
- %treat mouse-up as mouse-click --> handle through /A dictionary
- \str_if_eq:eeF{}{
- \l_ocgxii_toswitch_u_tl\l_ocgxii_toshow_u_tl\l_ocgxii_tohide_u_tl
- }{
- /A <</S/SetOCGState/State [
- \str_if_eq:VnF\l_ocgxii_toswitch_u_tl{}{
- /Toggle~\l_ocgxii_toswitch_u_tl
- }
- \str_if_eq:VnF\l_ocgxii_toshow_u_tl{}{
- /ON~\l_ocgxii_toshow_u_tl
- }
- \str_if_eq:VnF\l_ocgxii_tohide_u_tl{}{
- /OFF~\l_ocgxii_tohide_u_tl
- }
- ]>>
- }
- % other mouse triggers need add. actions dict
- /AA <<
- %\str_if_eq:eeF{}{ % mouse-up
- % \l_ocgxii_toswitch_u_tl\l_ocgxii_toshow_u_tl\l_ocgxii_tohide_u_tl
- %}{
- % /U <</S/SetOCGState/State [
- % \str_if_eq:VnF\l_ocgxii_toswitch_u_tl{}{
- % /Toggle~\l_ocgxii_toswitch_u_tl
- % }
- % \str_if_eq:VnF\l_ocgxii_toshow_u_tl{}{
- % /ON~\l_ocgxii_toshow_u_tl
- % }
- % \str_if_eq:VnF\l_ocgxii_tohide_u_tl{}{
- % /OFF~\l_ocgxii_tohide_u_tl
- % }
- % ]>>
- %}
- \str_if_eq:eeF{}{ % mouse-down
- \l_ocgxii_toswitch_d_tl\l_ocgxii_toshow_d_tl\l_ocgxii_tohide_d_tl
- }{
- /D <</S/SetOCGState/State [
- \str_if_eq:VnF\l_ocgxii_toswitch_d_tl{}{
- /Toggle~\l_ocgxii_toswitch_d_tl
- }
- \str_if_eq:VnF\l_ocgxii_toshow_d_tl{}{
- /ON~\l_ocgxii_toshow_d_tl
- }
- \str_if_eq:VnF\l_ocgxii_tohide_d_tl{}{
- /OFF~\l_ocgxii_tohide_d_tl
- }
- ]>>
- }
- \str_if_eq:eeF{}{ % mouse-enter
- \l_ocgxii_toswitch_e_tl\l_ocgxii_toshow_e_tl\l_ocgxii_tohide_e_tl
- }{
- /E <</S/SetOCGState/State [
- \str_if_eq:VnF\l_ocgxii_toswitch_e_tl{}{
- /Toggle~\l_ocgxii_toswitch_e_tl
- }
- \str_if_eq:VnF\l_ocgxii_toshow_e_tl{}{
- /ON~\l_ocgxii_toshow_e_tl
- }
- \str_if_eq:VnF\l_ocgxii_tohide_e_tl{}{
- /OFF~\l_ocgxii_tohide_e_tl
- }
- ]>>
- }
- \str_if_eq:eeF{}{ % mouse-exit
- \l_ocgxii_toswitch_x_tl\l_ocgxii_toshow_x_tl\l_ocgxii_tohide_x_tl
+ % e,d,x mouse triggers require (non-breakable) /Widget annot
+ \pdfannot_dict_put:nnn{link/GoTo}{Subtype}{/Widget}
+ \pdfannot_dict_remove:nn{link/GoTo}{Border}
+ }{
+ \pdfannot_dict_put:nnn{link/GoTo}{Border}{[0~0~0]}
+ }
+ \pdfannot_dict_remove:nn{link/GoTo}{C}
+ \pbs_pdfannot:nnnn{
+ \dim_use:N\box_wd:N\l_tmpa_box}{
+ \dim_use:N\box_ht:N\l_tmpa_box}{
+ \dim_use:N\box_dp:N\l_tmpa_box
+ }{
+ \pdfannot_dict_use:n{link/GoTo}
+ \bool_if:NTF\l_ocgxii_mouse_triggers_bool{
+ /Ff~65536/FT/Btn/BS<</W~0>>
+ /T~(ocgx2@\int_use:N\g_ocgxii_widcount_int)
+ %treat mouse-up as mouse-click --> handle through /A dictionary
+ \str_if_eq:eeF{}{
+ \l_ocgxii_toswitch_u_tl\l_ocgxii_toshow_u_tl\l_ocgxii_tohide_u_tl
}{
- /X <</S/SetOCGState/State [
- \str_if_eq:VnF\l_ocgxii_toswitch_x_tl{}{
- /Toggle~\l_ocgxii_toswitch_x_tl
+ /A <</S/SetOCGState/State [
+ \str_if_eq:VnF\l_ocgxii_toswitch_u_tl{}{
+ /Toggle~\l_ocgxii_toswitch_u_tl
}
- \str_if_eq:VnF\l_ocgxii_toshow_x_tl{}{
- /ON~\l_ocgxii_toshow_x_tl
+ \str_if_eq:VnF\l_ocgxii_toshow_u_tl{}{
+ /ON~\l_ocgxii_toshow_u_tl
}
- \str_if_eq:VnF\l_ocgxii_tohide_x_tl{}{
- /OFF~\l_ocgxii_tohide_x_tl
+ \str_if_eq:VnF\l_ocgxii_tohide_u_tl{}{
+ /OFF~\l_ocgxii_tohide_u_tl
}
]>>
}
- >>
- }{
- %mouse-up alone
+ % other mouse triggers need add. actions dict
+ /AA <<
+ %\str_if_eq:eeF{}{ % mouse-up
+ % \l_ocgxii_toswitch_u_tl\l_ocgxii_toshow_u_tl\l_ocgxii_tohide_u_tl
+ %}{
+ % /U <</S/SetOCGState/State [
+ % \str_if_eq:VnF\l_ocgxii_toswitch_u_tl{}{
+ % /Toggle~\l_ocgxii_toswitch_u_tl
+ % }
+ % \str_if_eq:VnF\l_ocgxii_toshow_u_tl{}{
+ % /ON~\l_ocgxii_toshow_u_tl
+ % }
+ % \str_if_eq:VnF\l_ocgxii_tohide_u_tl{}{
+ % /OFF~\l_ocgxii_tohide_u_tl
+ % }
+ % ]>>
+ %}
+ \str_if_eq:eeF{}{ % mouse-down
+ \l_ocgxii_toswitch_d_tl\l_ocgxii_toshow_d_tl\l_ocgxii_tohide_d_tl
+ }{
+ /D <</S/SetOCGState/State [
+ \str_if_eq:VnF\l_ocgxii_toswitch_d_tl{}{
+ /Toggle~\l_ocgxii_toswitch_d_tl
+ }
+ \str_if_eq:VnF\l_ocgxii_toshow_d_tl{}{
+ /ON~\l_ocgxii_toshow_d_tl
+ }
+ \str_if_eq:VnF\l_ocgxii_tohide_d_tl{}{
+ /OFF~\l_ocgxii_tohide_d_tl
+ }
+ ]>>
+ }
+ \str_if_eq:eeF{}{ % mouse-enter
+ \l_ocgxii_toswitch_e_tl\l_ocgxii_toshow_e_tl\l_ocgxii_tohide_e_tl
+ }{
+ /E <</S/SetOCGState/State [
+ \str_if_eq:VnF\l_ocgxii_toswitch_e_tl{}{
+ /Toggle~\l_ocgxii_toswitch_e_tl
+ }
+ \str_if_eq:VnF\l_ocgxii_toshow_e_tl{}{
+ /ON~\l_ocgxii_toshow_e_tl
+ }
+ \str_if_eq:VnF\l_ocgxii_tohide_e_tl{}{
+ /OFF~\l_ocgxii_tohide_e_tl
+ }
+ ]>>
+ }
+ \str_if_eq:eeF{}{ % mouse-exit
+ \l_ocgxii_toswitch_x_tl\l_ocgxii_toshow_x_tl\l_ocgxii_tohide_x_tl
+ }{
+ /X <</S/SetOCGState/State [
+ \str_if_eq:VnF\l_ocgxii_toswitch_x_tl{}{
+ /Toggle~\l_ocgxii_toswitch_x_tl
+ }
+ \str_if_eq:VnF\l_ocgxii_toshow_x_tl{}{
+ /ON~\l_ocgxii_toshow_x_tl
+ }
+ \str_if_eq:VnF\l_ocgxii_tohide_x_tl{}{
+ /OFF~\l_ocgxii_tohide_x_tl
+ }
+ ]>>
+ }
+ >>
+ }{
+ %mouse-up alone
+ /A <</S/SetOCGState
+ /State [
+ \str_if_eq:VnF{\l_ocgxii_toswitch_u_tl}{}{
+ /Toggle~\l_ocgxii_toswitch_u_tl}~
+ \str_if_eq:VnF{\l_ocgxii_toshow_u_tl}{}{/ON~\l_ocgxii_toshow_u_tl}~
+ \str_if_eq:VnF{\l_ocgxii_tohide_u_tl}{}{/OFF~\l_ocgxii_tohide_u_tl}
+ ]
+ >>
+ }
+ }
+ \bool_if:NT\l_ocgxii_mouse_triggers_bool{
+ \pbs_appendtofields:n{\pbs_pdflastann:}
+ \int_gincr:N\g_ocgxii_widcount_int
+ }
+ }
+ \box_use_drop:N\l_tmpa_box
+ }{
+ % suppress annots with SetOCGState Action Subtype for pdf/a compliance
+ \pdfmeta_standard_verify:nTF{annot_action_A}{
+ \bool_if:NF\g_ocgxii_hyperref_loaded_bool{
+ \pdfannot_dict_put:nnn{link/GoTo}{Border}{[0~0~0]}
+ }
+ %line-breakable annotation
+ \pbs_pdflink:nn{
+ %look and feel of hyperref internal links
+ \pdfannot_dict_use:n{link/GoTo}
/A <</S/SetOCGState
/State [
\str_if_eq:VnF{\l_ocgxii_toswitch_u_tl}{}{
@@ -2491,33 +2519,12 @@
\str_if_eq:VnF{\l_ocgxii_tohide_u_tl}{}{/OFF~\l_ocgxii_tohide_u_tl}
]
>>
+ }{
+ \hook_use:n{pdfannot/link/GoTo/begin}
+ #6
+ \hook_use:n{pdfannot/link/GoTo/end}
}
- }\box_use_drop:N\l_tmpa_box
- \bool_if:NT\l_ocgxii_mouse_triggers_bool{
- \pbs_appendtofields:n{\pbs_pdflastann:}
- \int_gincr:N\g_ocgxii_widcount_int
- }
- }{
- \bool_if:NF\g_ocgxii_hyperref_loaded_bool{
- \pdfannot_dict_put:nnn{link/GoTo}{Border}{[0~0~0]}
- }
- %line-breakable annotation
- \pbs_pdflink:nn{
- %look and feel of hyperref internal links
- \pdfannot_dict_use:n{link/GoTo}
- /A <</S/SetOCGState
- /State [
- \str_if_eq:VnF{\l_ocgxii_toswitch_u_tl}{}{
- /Toggle~\l_ocgxii_toswitch_u_tl}~
- \str_if_eq:VnF{\l_ocgxii_toshow_u_tl}{}{/ON~\l_ocgxii_toshow_u_tl}~
- \str_if_eq:VnF{\l_ocgxii_tohide_u_tl}{}{/OFF~\l_ocgxii_tohide_u_tl}
- ]
- >>
- }{
- \hook_use:n{pdfannot/link/GoTo/begin}
- #6
- \hook_use:n{pdfannot/link/GoTo/end}
- }
+ }{#6}
}
\group_end:
}
diff --git a/macros/latex/contrib/panneauxroute/doc/PanneauxRoute-doc.pdf b/macros/latex/contrib/panneauxroute/doc/PanneauxRoute-doc.pdf
index 9234ec3596..6f09abae4e 100644
--- a/macros/latex/contrib/panneauxroute/doc/PanneauxRoute-doc.pdf
+++ b/macros/latex/contrib/panneauxroute/doc/PanneauxRoute-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/panneauxroute/doc/PanneauxRoute-doc.tex b/macros/latex/contrib/panneauxroute/doc/PanneauxRoute-doc.tex
index ae8de67450..413d7368cc 100644
--- a/macros/latex/contrib/panneauxroute/doc/PanneauxRoute-doc.tex
+++ b/macros/latex/contrib/panneauxroute/doc/PanneauxRoute-doc.tex
@@ -36,8 +36,8 @@
\usepackage[margin=1.5cm]{geometry}
\setlength{\parindent}{0pt}
-\def\TPversion{0.1.0}
-\def\TPdate{14 août 2023}
+\def\TPversion{0.1.2}
+\def\TPdate{14 septembre 2024}
\usepackage{tcolorbox}
@@ -135,6 +135,10 @@ Les panneaux sont au format \MontreCode{pdf}, obtenu à l'aide de fichiers \Mont
\subsection{Historique}
+\verb|v0.1.2|~:~~~~Nouveaux panneaux
+
+\verb|v0.1.1|~:~~~~Ajout du panneau B14 (80) pour la limitation de vitesse 80
+
\verb|v0.1.0|~:~~~~Version initiale
\subsection{Chargement}
@@ -178,12 +182,12 @@ Par défaut (dû à \MontreCode{\textbackslash includegraphics}) les \textit{ima
Pour les panneaux de (début/fin de) limitation de vitesse, la commande associée nécessite un argument obligatoire, et entre \MontreCode{\{...\}}, avec comme possibilités \MontreCode{15/30/50/70/90/110/130} :
\begin{demohigh}[language=latex/latex3,style/main=cyan!5,style/code=cyan!5,style/demo=cyan!5]
-\prLimVites{15}\prLimVites{30}\prLimVites{50}\prLimVites{70}
-\prLimVites{90}\prLimVites{110}\prLimVites{130}
+\prLimVites{15}\prLimVites{30}\prLimVites{50}\prLimVites{70}%
+\prLimVites{80}\prLimVites{90}\prLimVites{110}\prLimVites{130}
\end{demohigh}
\begin{demohigh}[language=latex/latex3,style/main=cyan!5,style/code=cyan!5,style/demo=cyan!5]
-\prFinLimVit{15}\prFinLimVit{30}\prFinLimVit{50}\prFinLimVit{70}
+\prFinLimVit{15}\prFinLimVit{30}\prFinLimVit{50}\prFinLimVit{70}%
\prFinLimVit{90}\prFinLimVit{110}\prFinLimVit{130}
\end{demohigh}
@@ -228,6 +232,24 @@ Pour les panneaux de (début/fin de) limitation de vitesse, la commande associé
\pagebreak
+\subsection{Panneaux de Danger temporaires}
+
+\begin{longtblr}[label=none,entry=none]{width=0.95\linewidth,hlines,vlines,colspec={Q[12.5mm,m,c]Q[m,c]X[l,m]Q[m,c,35mm]},row{1}={cyan!5,font=\Large\sffamily},row{2-Z}={font=\sffamily},cell{2-Z}{Z}={font=\footnotesize}}
+ Type & Panneau & Signification & Alias \\
+ AK2 & \PanneauTableau{AK2} & Dos d'âne ou cassis & \fakeverb{\prDosAneTemp} \\
+ AK3 & \PanneauTableau{AK3} & Rétrécissement de chaussée & \fakeverb{\prChausRetTemp}\\
+ AK4 & \PanneauTableau{AK4} & Chaussée glissante & \fakeverb{\prChaussGlissTemp} \\
+ AK5 & \PanneauTableau{AK5} & Travaux & \fakeverb{\prTravauxTemp} \\
+ AK14 & \PanneauTableau{AK14} & Danger & \fakeverb{\prDangerTemp} \\
+ AK17 & \PanneauTableau{AK17} & Feux temporaires & \fakeverb{\prFeuxTemp} \\
+ AK22 & \PanneauTableau{AK22} & Projection de gravillons & \fakeverb{\prGraviersTemp} \\
+ AK30 & \PanneauTableau{AK30} & Embouteillage & \fakeverb{\prBouchonTemp} \\
+ AK31 & \PanneauTableau{AK31} & Accident & \fakeverb{\prAccidentTemp} \\
+ AK32 & \PanneauTableau{AK32} & Brouillard ou fumées épaisses & \fakeverb{\prBrouillardTemp} \\
+\end{longtblr}
+
+\pagebreak
+
\subsection{Panneaux d'Interdiction et de Priorité}
\begin{longtblr}[label=none,entry=none]{width=0.95\linewidth,hlines,vlines,colspec={Q[12.5mm,m,c]Q[m,c]X[l,m]Q[m,c,35mm]},row{1}={cyan!5,font=\Large\sffamily},row{2-Z}={font=\sffamily},cell{2-Z}{Z}={font=\footnotesize}}
@@ -251,11 +273,11 @@ Pour les panneaux de (début/fin de) limitation de vitesse, la commande associé
Type & Panneau & Signification & Alias \\
B0 & \PanneauTableau{B0} & Circulation interdite à tout véhicule dans les deux sens & \fakeverb{\prCircInterd} \\
B1 & \PanneauTableau{B1} & Sens interdit à tout véhicule & \fakeverb{\prSensInterdit} \\
- %B1j & \PanneauTableau{B1j} & Répétition d'interdiction d'accès à contresens de bretelles [\ldots] \\
+ B1j & \PanneauTableau{B1j} & Répétition d'interdiction d'accès à contresens de bretelles [\ldots] & \fakeverb{\prSensInterditJ} \\
B2a & \PanneauTableau{B2a} & Interdiction de tourner à gauche à la prochaine intersection & \fakeverb{\prInterdTournG} \\
B2b & \PanneauTableau{B2b} & Interdiction de tourner à droite à la prochaine intersection & \fakeverb{\prInterdTournD} \\
B2c & \PanneauTableau{B2c} & Interdiction de faire demi-tour sur la route suivie jusqu'à la prochaine intersection & \fakeverb{\prInterdDemiTour} \\
- B3 & \PanneauTableau{B31} & Interdiction de dépasser tous les véhicules à moteur autres que ceux à deux roues sans side-car & \fakeverb{\prInterdDepass} \\
+ B3 & \PanneauTableau{B3} & Interdiction de dépasser tous les véhicules à moteur autres que ceux à deux roues sans side-car & \fakeverb{\prInterdDepass} \\
B3a & \PanneauTableau{B3a} & Interdiction aux véhicules automobiles, véhicules articulés, trains doubles ou [\ldots] & \fakeverb{\prInterdVehic} \\
B4 & \PanneauTableau{B4} & Arrêt au poste de douane & \fakeverb{\prHalteDouane} \\
B5a & \PanneauTableau{B5a} & Arrêt au poste de gendarmerie & \fakeverb{\prHalteGendarm} \\
@@ -282,7 +304,7 @@ Pour les panneaux de (début/fin de) limitation de vitesse, la commande associé
B12 & \PanneauTableau{B12} & Accès interdit aux véhicules dont la hauteur, chargement compris, est supérieure [\ldots] & \fakeverb{\prInterdHaut} \\
B13 & \PanneauTableau{B13} & Accès interdit aux véhicules, véhicules articulés, trains doubles ou ensemble de véhicules [\ldots] & \fakeverb{\prInterdPoids} \\
B13a & \PanneauTableau{B13a} & Accès interdit aux véhicules pesant sur un essieu plus que le nombre indiqué & \fakeverb{\prInterdPoidsEssieu} \\
- B14\_x & Limite de vitesse & \PanneauTableau{B14_15}\PanneauTableau{B14_30}\PanneauTableau{B14_50}\PanneauTableau{B14_70}\PanneauTableau{B14_90}\PanneauTableau{B14_110}\PanneauTableau{B14_130} & \fakeverb{\prLimVites{x}}\\
+ B14\_x & Limite de vitesse & \PanneauTableau{B14_15}\PanneauTableau{B14_30}\PanneauTableau{B14_50}\PanneauTableau{B14_70}\PanneauTableau{B14_80}\PanneauTableau{B14_90}\PanneauTableau{B14_110}\PanneauTableau{B14_130} & \fakeverb{\prLimVites{x}}\\
B15 & \PanneauTableau{B15} & Cédez le passage à la circulation venant en sens inverse & \fakeverb{\prCedezInv} \\
B16 & \PanneauTableau{B16} & Signaux sonores interdits & \fakeverb{\prInterdSons} \\
B17 & \PanneauTableau{B17} & Interdiction aux véhicules de circuler sans maintenir entre eux un intervalle [\ldots] & \fakeverb{\prDistance} \\
@@ -461,6 +483,28 @@ Pour les panneaux de (début/fin de) limitation de vitesse, la commande associé
%CE100 & \PanneauTableau{CE100} & Indication de l’enseigne de la ou des sociétés commerciales offrant un [\ldots] \\
\end{longtblr}
+\subsection{Panneaux divers}
+
+\NewDocumentCommand\AffPanneauGenerique{ m }{%
+ \raisebox{-0.2\height}{\AffPanneau[height=1.5cm]{#1}} : \texttt{#1}
+}
+\begin{multicols}{3}
+ \AffPanneauGenerique{B50a} \\
+ \AffPanneauGenerique{B50b} \\
+ \AffPanneauGenerique{B50c} \\
+ \AffPanneauGenerique{B50d} \\
+ \AffPanneauGenerique{B50e} \\
+ \raisebox{-0.2\height}{\AffPanneau[height=1.5cm]{B51_30}} : \texttt{B51\_30} \\
+ \AffPanneauGenerique{B53} \\
+ \AffPanneauGenerique{B55} \\
+ \AffPanneauGenerique{B57} \\
+ \AffPanneauGenerique{B59} \\
+ \AffPanneauGenerique{B49VL} \\
+ \AffPanneauGenerique{C24a}
+\end{multicols}
+
+\pagebreak
+
\section{Aliases, de hauteur 2.5ex}
\begin{multicols}{3}
@@ -494,6 +538,19 @@ Pour les panneaux de (début/fin de) limitation de vitesse, la commande associé
\raisebox{-0.2\height}{\prVent[height=2.5ex]} : \verb+\prVent+
\end{multicols}
+\begin{multicols}{3}%temporaire
+ \raisebox{-0.2\height}{\prDosAneTemp[height=2.5ex]} : \verb+\prDosAneTemp+ \\
+ \raisebox{-0.2\height}{\prChausRetTemp[height=2.5ex]} : \verb+\prIntersectPrio+ \\
+ \raisebox{-0.2\height}{\prChaussGlissTemp[height=2.5ex]} : \verb+\prChaussGlissTemp+ \\
+ \raisebox{-0.2\height}{\prTravauxTemp[height=2.5ex]} : \verb+\prTravauxTemp+ \\
+ \raisebox{-0.2\height}{\prDangerTemp[height=2.5ex]} : \verb+\prDangerTemp+ \\
+ \raisebox{-0.2\height}{\prFeuxTemp[height=2.5ex]} : \verb+\prFeuxTemp+ \\
+ \raisebox{-0.2\height}{\prGraviersTemp[height=2.5ex]} : \verb+\prGraviersTemp+ \\
+ \raisebox{-0.2\height}{\prBouchonTemp[height=2.5ex]} : \verb+\prBouchonTemp+ \\
+ \raisebox{-0.2\height}{\prAccidentTemp[height=2.5ex]} : \verb+\prAccidentTemp+ \\
+ \raisebox{-0.2\height}{\prBrouillardTemp[height=2.5ex]} : \verb+\prBrouillardTemp+
+\end{multicols}
+
\begin{multicols}{3}
\raisebox{-0.2\height}{\prIntersect[height=2.5ex]} : \verb+\prIntersect+ \\
\raisebox{-0.2\height}{\prIntersectPrio[height=2.5ex]} : \verb+\prIntersectPrio+ \\
@@ -509,6 +566,7 @@ Pour les panneaux de (début/fin de) limitation de vitesse, la commande associé
\begin{multicols}{3}
\raisebox{-0.2\height}{\prCircInterd[height=2.5ex]} : \verb+\prCircInterd+ \\
\raisebox{-0.2\height}{\prSensInterdit[height=2.5ex]} : \verb+\prSensInterdit+ \\
+ \raisebox{-0.2\height}{\prSensInterditJ[height=2.5ex]} : \verb+\prSensInterditJ+ \\
\raisebox{-0.2\height}{\prInterdTournG[height=2.5ex]} : \verb+\prInterdTournG+ \\
\raisebox{-0.2\height}{\prInterdTournD[height=2.5ex]} : \verb+\prInterdTournD+ \\
\raisebox{-0.2\height}{\prInterdDemiTour[height=2.5ex]} : \verb+\prInterdDemiTour+ \\
@@ -543,6 +601,7 @@ Pour les panneaux de (début/fin de) limitation de vitesse, la commande associé
\raisebox{-0.2\height}{\prLimVites[height=2.5ex]{30}} : \verb+\prLimVites{30}+ \\
\raisebox{-0.2\height}{\prLimVites[height=2.5ex]{50}} : \verb+\prLimVites{50}+ \\
\raisebox{-0.2\height}{\prLimVites[height=2.5ex]{70}} : \verb+\prLimVites{70}+ \\
+ \raisebox{-0.2\height}{\prLimVites[height=2.5ex]{80}} : \verb+\prLimVites{80}+ \\
\raisebox{-0.2\height}{\prLimVites[height=2.5ex]{90}} : \verb+\prLimVites{90}+ \\
\raisebox{-0.2\height}{\prLimVites[height=2.5ex]{110}} : \verb+\prLimVites{110}+ \\
\raisebox{-0.2\height}{\prLimVites[height=2.5ex]{130}} : \verb+\prLimVites{130}+ \\
diff --git a/macros/latex/contrib/panneauxroute/tex/Indication/PanneauRouteC24a.pdf b/macros/latex/contrib/panneauxroute/tex/Indication/PanneauRouteC24a.pdf
new file mode 100644
index 0000000000..3b5ec7e8a4
--- /dev/null
+++ b/macros/latex/contrib/panneauxroute/tex/Indication/PanneauRouteC24a.pdf
Binary files differ
diff --git a/macros/latex/contrib/panneauxroute/tex/Interdiction/PanneauRouteB14_80.pdf b/macros/latex/contrib/panneauxroute/tex/Interdiction/PanneauRouteB14_80.pdf
new file mode 100644
index 0000000000..890d68ee51
--- /dev/null
+++ b/macros/latex/contrib/panneauxroute/tex/Interdiction/PanneauRouteB14_80.pdf
Binary files differ
diff --git a/macros/latex/contrib/panneauxroute/tex/Interdiction/PanneauRouteB1j.pdf b/macros/latex/contrib/panneauxroute/tex/Interdiction/PanneauRouteB1j.pdf
new file mode 100644
index 0000000000..5a98b38672
--- /dev/null
+++ b/macros/latex/contrib/panneauxroute/tex/Interdiction/PanneauRouteB1j.pdf
Binary files differ
diff --git a/macros/latex/contrib/panneauxroute/tex/Interdiction/PanneauRouteB30_30.pdf b/macros/latex/contrib/panneauxroute/tex/Interdiction/PanneauRouteB30_30.pdf
new file mode 100644
index 0000000000..2e15811016
--- /dev/null
+++ b/macros/latex/contrib/panneauxroute/tex/Interdiction/PanneauRouteB30_30.pdf
Binary files differ
diff --git a/macros/latex/contrib/panneauxroute/tex/Interdiction/PanneauRouteB6b1.pdf b/macros/latex/contrib/panneauxroute/tex/Interdiction/PanneauRouteB6b1.pdf
new file mode 100644
index 0000000000..91952f39a8
--- /dev/null
+++ b/macros/latex/contrib/panneauxroute/tex/Interdiction/PanneauRouteB6b1.pdf
Binary files differ
diff --git a/macros/latex/contrib/panneauxroute/tex/Interdiction/PanneauRouteB6b2.pdf b/macros/latex/contrib/panneauxroute/tex/Interdiction/PanneauRouteB6b2.pdf
new file mode 100644
index 0000000000..ec8a30e437
--- /dev/null
+++ b/macros/latex/contrib/panneauxroute/tex/Interdiction/PanneauRouteB6b2.pdf
Binary files differ
diff --git a/macros/latex/contrib/panneauxroute/tex/Interdiction/PanneauRouteB6b3.pdf b/macros/latex/contrib/panneauxroute/tex/Interdiction/PanneauRouteB6b3.pdf
new file mode 100644
index 0000000000..92fd45c47f
--- /dev/null
+++ b/macros/latex/contrib/panneauxroute/tex/Interdiction/PanneauRouteB6b3.pdf
Binary files differ
diff --git a/macros/latex/contrib/panneauxroute/tex/Interdiction/PanneauRouteB6b4.pdf b/macros/latex/contrib/panneauxroute/tex/Interdiction/PanneauRouteB6b4.pdf
new file mode 100644
index 0000000000..02b47faac0
--- /dev/null
+++ b/macros/latex/contrib/panneauxroute/tex/Interdiction/PanneauRouteB6b4.pdf
Binary files differ
diff --git a/macros/latex/contrib/panneauxroute/tex/Interdiction/PanneauRouteB6b5.pdf b/macros/latex/contrib/panneauxroute/tex/Interdiction/PanneauRouteB6b5.pdf
new file mode 100644
index 0000000000..6d3a6716b7
--- /dev/null
+++ b/macros/latex/contrib/panneauxroute/tex/Interdiction/PanneauRouteB6b5.pdf
Binary files differ
diff --git a/macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB49VL.pdf b/macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB49VL.pdf
new file mode 100644
index 0000000000..d737b9b203
--- /dev/null
+++ b/macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB49VL.pdf
Binary files differ
diff --git a/macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB50a.pdf b/macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB50a.pdf
new file mode 100644
index 0000000000..a3ef5fd0ce
--- /dev/null
+++ b/macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB50a.pdf
Binary files differ
diff --git a/macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB50b.pdf b/macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB50b.pdf
new file mode 100644
index 0000000000..f5bb08180f
--- /dev/null
+++ b/macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB50b.pdf
Binary files differ
diff --git a/macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB50c.pdf b/macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB50c.pdf
new file mode 100644
index 0000000000..3fecb25982
--- /dev/null
+++ b/macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB50c.pdf
Binary files differ
diff --git a/macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB50d.pdf b/macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB50d.pdf
new file mode 100644
index 0000000000..250253b066
--- /dev/null
+++ b/macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB50d.pdf
Binary files differ
diff --git a/macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB50e.pdf b/macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB50e.pdf
new file mode 100644
index 0000000000..853cc07c53
--- /dev/null
+++ b/macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB50e.pdf
Binary files differ
diff --git a/macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB51_30.pdf b/macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB51_30.pdf
new file mode 100644
index 0000000000..08e96de617
--- /dev/null
+++ b/macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB51_30.pdf
Binary files differ
diff --git a/macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB52.pdf b/macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB52.pdf
new file mode 100644
index 0000000000..a14e1a111d
--- /dev/null
+++ b/macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB52.pdf
Binary files differ
diff --git a/macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB53.pdf b/macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB53.pdf
new file mode 100644
index 0000000000..13e4ce3ac3
--- /dev/null
+++ b/macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB53.pdf
Binary files differ
diff --git a/macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB54.pdf b/macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB54.pdf
new file mode 100644
index 0000000000..ce71fbd4b1
--- /dev/null
+++ b/macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB54.pdf
Binary files differ
diff --git a/macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB55.pdf b/macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB55.pdf
new file mode 100644
index 0000000000..099108818f
--- /dev/null
+++ b/macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB55.pdf
Binary files differ
diff --git a/macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB56.pdf b/macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB56.pdf
new file mode 100644
index 0000000000..a721b753c2
--- /dev/null
+++ b/macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB56.pdf
Binary files differ
diff --git a/macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB57.pdf b/macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB57.pdf
new file mode 100644
index 0000000000..f1b433d19b
--- /dev/null
+++ b/macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB57.pdf
Binary files differ
diff --git a/macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB58.pdf b/macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB58.pdf
new file mode 100644
index 0000000000..2f96cdbec4
--- /dev/null
+++ b/macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB58.pdf
Binary files differ
diff --git a/macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB59.pdf b/macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB59.pdf
new file mode 100644
index 0000000000..02bc961ed8
--- /dev/null
+++ b/macros/latex/contrib/panneauxroute/tex/Obligation/PanneauRouteB59.pdf
Binary files differ
diff --git a/macros/latex/contrib/panneauxroute/tex/PanneauxRoute.sty b/macros/latex/contrib/panneauxroute/tex/PanneauxRoute.sty
index d94943962b..68021ef148 100644
--- a/macros/latex/contrib/panneauxroute/tex/PanneauxRoute.sty
+++ b/macros/latex/contrib/panneauxroute/tex/PanneauxRoute.sty
@@ -5,7 +5,11 @@
% : Licence CC BY-SA 3.0 for svg source (http://sig974.free.fr/?p=1520)
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{PanneauxRoute}[2023/08/14 v0.1.0 Panneaux de signalisation fr]
+\ProvidesPackage{PanneauxRoute}[2024/09/14 v0.1.2 Panneaux de signalisation fr]
+
+%------Historique
+% 0.1.2 Ajout des panneaux divers
+% 0.1.1 Ajout du panneau B14 (80)
% 0.1.0 Version initiale
%------Packages utiles
@@ -56,8 +60,20 @@
\NewDocumentCommand\prFinRoutePrio{ O{height=1.15cm} }{\AffPanneau[#1]{AB7}}
\NewDocumentCommand\prRondPoint{ O{height=1.15cm} }{\AffPanneau[#1]{AB25}}
+\NewDocumentCommand\prDosAneTemp{ O{height=1.15cm} }{\AffPanneau[#1]{AK2}}
+\NewDocumentCommand\prChaussGlissTemp{ O{height=1.15cm} }{\AffPanneau[#1]{AK4}}
+\NewDocumentCommand\prChausRetTemp{ O{height=1.15cm} }{\AffPanneau[#1]{AK3}}
+\NewDocumentCommand\prTravauxTemp{ O{height=1.15cm} }{\AffPanneau[#1]{AK5}}
+\NewDocumentCommand\prDangerTemp{ O{height=1.15cm} }{\AffPanneau[#1]{AK14}}
+\NewDocumentCommand\prFeuxTemp{ O{height=1.15cm} }{\AffPanneau[#1]{AK17}}
+\NewDocumentCommand\prGraviersTemp{ O{height=1.15cm} }{\AffPanneau[#1]{AK22}}
+\NewDocumentCommand\prBouchonTemp{ O{height=1.15cm} }{\AffPanneau[#1]{AK30}}
+\NewDocumentCommand\prAccidentTemp{ O{height=1.15cm} }{\AffPanneau[#1]{AK31}}
+\NewDocumentCommand\prBrouillardTemp{ O{height=1.15cm} }{\AffPanneau[#1]{AK32}}
+
\NewDocumentCommand\prCircInterd{ O{height=1.15cm} }{\AffPanneau[#1]{B0}}
\NewDocumentCommand\prSensInterdit{ O{height=1.15cm} }{\AffPanneau[#1]{B1}}
+\NewDocumentCommand\prSensInterditJ{ O{height=1.15cm} }{\AffPanneau[#1]{B1j}}
\NewDocumentCommand\prInterdTournG{ O{height=1.15cm} }{\AffPanneau[#1]{B2a}}
\NewDocumentCommand\prInterdTournD{ O{height=1.15cm} }{\AffPanneau[#1]{B2b}}
\NewDocumentCommand\prInterdDemiTour{ O{height=1.15cm} }{\AffPanneau[#1]{B2c}}
diff --git a/macros/latex/contrib/panneauxroute/tex/Temporaire/PanneauRouteAK14.pdf b/macros/latex/contrib/panneauxroute/tex/Temporaire/PanneauRouteAK14.pdf
new file mode 100644
index 0000000000..8b388c78e4
--- /dev/null
+++ b/macros/latex/contrib/panneauxroute/tex/Temporaire/PanneauRouteAK14.pdf
Binary files differ
diff --git a/macros/latex/contrib/panneauxroute/tex/Temporaire/PanneauRouteAK17.pdf b/macros/latex/contrib/panneauxroute/tex/Temporaire/PanneauRouteAK17.pdf
new file mode 100644
index 0000000000..2784549080
--- /dev/null
+++ b/macros/latex/contrib/panneauxroute/tex/Temporaire/PanneauRouteAK17.pdf
Binary files differ
diff --git a/macros/latex/contrib/panneauxroute/tex/Temporaire/PanneauRouteAK2.pdf b/macros/latex/contrib/panneauxroute/tex/Temporaire/PanneauRouteAK2.pdf
new file mode 100644
index 0000000000..521f95a618
--- /dev/null
+++ b/macros/latex/contrib/panneauxroute/tex/Temporaire/PanneauRouteAK2.pdf
Binary files differ
diff --git a/macros/latex/contrib/panneauxroute/tex/Temporaire/PanneauRouteAK22.pdf b/macros/latex/contrib/panneauxroute/tex/Temporaire/PanneauRouteAK22.pdf
new file mode 100644
index 0000000000..7596e846eb
--- /dev/null
+++ b/macros/latex/contrib/panneauxroute/tex/Temporaire/PanneauRouteAK22.pdf
Binary files differ
diff --git a/macros/latex/contrib/panneauxroute/tex/Temporaire/PanneauRouteAK3.pdf b/macros/latex/contrib/panneauxroute/tex/Temporaire/PanneauRouteAK3.pdf
new file mode 100644
index 0000000000..3871b514b2
--- /dev/null
+++ b/macros/latex/contrib/panneauxroute/tex/Temporaire/PanneauRouteAK3.pdf
Binary files differ
diff --git a/macros/latex/contrib/panneauxroute/tex/Temporaire/PanneauRouteAK30.pdf b/macros/latex/contrib/panneauxroute/tex/Temporaire/PanneauRouteAK30.pdf
new file mode 100644
index 0000000000..2c0aac367a
--- /dev/null
+++ b/macros/latex/contrib/panneauxroute/tex/Temporaire/PanneauRouteAK30.pdf
Binary files differ
diff --git a/macros/latex/contrib/panneauxroute/tex/Temporaire/PanneauRouteAK31.pdf b/macros/latex/contrib/panneauxroute/tex/Temporaire/PanneauRouteAK31.pdf
new file mode 100644
index 0000000000..18e5e37d90
--- /dev/null
+++ b/macros/latex/contrib/panneauxroute/tex/Temporaire/PanneauRouteAK31.pdf
Binary files differ
diff --git a/macros/latex/contrib/panneauxroute/tex/Temporaire/PanneauRouteAK32.pdf b/macros/latex/contrib/panneauxroute/tex/Temporaire/PanneauRouteAK32.pdf
new file mode 100644
index 0000000000..7f59c16d00
--- /dev/null
+++ b/macros/latex/contrib/panneauxroute/tex/Temporaire/PanneauRouteAK32.pdf
Binary files differ
diff --git a/macros/latex/contrib/panneauxroute/tex/Temporaire/PanneauRouteAK4.pdf b/macros/latex/contrib/panneauxroute/tex/Temporaire/PanneauRouteAK4.pdf
new file mode 100644
index 0000000000..bcee3bff90
--- /dev/null
+++ b/macros/latex/contrib/panneauxroute/tex/Temporaire/PanneauRouteAK4.pdf
Binary files differ
diff --git a/macros/latex/contrib/panneauxroute/tex/Temporaire/PanneauRouteAK5.pdf b/macros/latex/contrib/panneauxroute/tex/Temporaire/PanneauRouteAK5.pdf
new file mode 100644
index 0000000000..236c455af6
--- /dev/null
+++ b/macros/latex/contrib/panneauxroute/tex/Temporaire/PanneauRouteAK5.pdf
Binary files differ
diff --git a/macros/latex/contrib/pas-tableur/README b/macros/latex/contrib/pas-tableur/README
deleted file mode 100644
index 001719afbb..0000000000
--- a/macros/latex/contrib/pas-tableur/README
+++ /dev/null
@@ -1,37 +0,0 @@
-********* README file for pas-tableur ******************
-********************* ENGLISH *****************************
-
-This package uses TikZ to imitate spreadsheet.
-
-Licence
--------
-
-This program can be redistributed and/or modified under the terms
-of the LaTeX Project Public License Distributed from CTAN
-archives in directory macros/latex/base/lppl.txt.
-
-Documentation
--------------
-
-The documentation of the package is under the
-directory /doc/ in french language.
-
-Thanks to use pas-tableur.sty.
-
-********* Fichier README pour pas-tableur ******************
-********************** FRANCAIS *******************************
-
-Cette extension utilise TikZ pour imiter les feuilles de calculs sous tableur.
-
-Licence
--------
-
-L'extension peut être redistribuée et/ou modifiée sous les termes
-de la licence LaTeX Project Public (voir macros/latex/base/lppl.txt).
-
-Documentation
--------------
-
-La documentation de l'extension se trouve dans le répertoire /doc/.
-
-Merci d'utiliser pas-tableur.sty.
diff --git a/macros/latex/contrib/pas-tableur/README.txt b/macros/latex/contrib/pas-tableur/README.txt
new file mode 100644
index 0000000000..a5e7692b4e
--- /dev/null
+++ b/macros/latex/contrib/pas-tableur/README.txt
@@ -0,0 +1,40 @@
+************* README file for pas-tableur **********************
+********************* ENGLISH *****************************
+
+This package uses TikZ to imitate spreadsheets.
+
+Licence
+-------
+
+This program can be redistributed and/or modified under the terms
+of the LaTeX Project Public License Distributed from CTAN
+archives in directory macros/latex/base/lppl.txt.
+
+Documentation
+-------------
+
+The documentation of the package is in the ZIP file or under the
+directory /doc/ in french language.
+If you don't find it, go to the URL http://get-software.net/macros/latex/contrib/pas-tableur/doc/pas-tableur.pdf
+
+Thanks to use pas-tableur.sty.
+
+************* Fichier README pour pas-tableur **********************
+********************** FRANCAIS *******************************
+
+Cette extension utilise TikZ pour imiter des tableurs.
+
+Licence
+-------
+
+L'extension peut être redistribuée et/ou modifiée sous les termes
+de la licence LaTeX Project Public (voir macros/latex/base/lppl.txt).
+
+Documentation
+-------------
+
+La documentation de l'extension se trouve dans le fichier ZIP ou
+dans dans le répertoire /doc/.
+Si vous ne trouvez pas cette documentation, allez sur la page http://get-software.net/macros/latex/contrib/pas-tableur/doc/pas-tableur.pdf
+
+Merci d'utiliser pas-tableur.sty.
diff --git a/macros/latex/contrib/pas-tableur/doc/pas-tableur.pdf b/macros/latex/contrib/pas-tableur/doc/pas-tableur.pdf
index 4482df5893..796f888472 100644
--- a/macros/latex/contrib/pas-tableur/doc/pas-tableur.pdf
+++ b/macros/latex/contrib/pas-tableur/doc/pas-tableur.pdf
Binary files differ
diff --git a/macros/latex/contrib/pas-tableur/doc/pas-tableur.tex b/macros/latex/contrib/pas-tableur/doc/pas-tableur.tex
index 89a961a1d7..ede47ac5a8 100644
--- a/macros/latex/contrib/pas-tableur/doc/pas-tableur.tex
+++ b/macros/latex/contrib/pas-tableur/doc/pas-tableur.tex
@@ -31,13 +31,15 @@
\begin{center}
\begin{tcolorbox}[head]
{\bfseries\LARGE Documentation \texttt{pas-tableur} }\\[3mm]
-{\large Version 2.05 -- \today}
+{\large Version 2.06 -- \today}
\end{tcolorbox}
{\large
\href{http://www.mathweb.fr/contact.html}{St\'ephane Pasquet}}
-{\small\emph{Thanks to Susumu Tanimura for his contribution th the improvement of this package}}
+{\small\emph{Thanks to \textbf{Susumu Tanimura} for his contribution to the improvement of this package}}
+
+{\small\emph{Thanks to \textbf{Emiel van Miltenburg} for his contribution to the improvement of this package with the \textbackslash multimultiSelect macro.}}
\end{center}
\begin{tcolorbox}[toc]
@@ -372,6 +374,33 @@ Voyons un exemple pour comprendre la syntaxe :
\end{tikzpicture}
\end{tcblisting}
+\subsection{\textbackslash multimultiSelec : pour visualiser l'\'etirement}
+
+\begin{tcblisting}{listing}
+\sffamily
+\begin{tikzpicture}
+\begin{scope}[shift={(0,0)}]
+\tableur*[7]{A/1cm, B/1cm}
+\celtxt[width=1cm,align=right]{A}{1}{1}
+\celtxt[width=1cm,align=right]{A}{2}{2}
+\celtxt[width=1cm,align=right]{A}{3}{3}
+\multimultiSelec{A-1}{A-3}{A-6}
+\end{scope}
+
+\node at (2,-2) {\Large $\Rightarrow$};
+
+\begin{scope}[shift={(4,0)}]
+\tableur*[7]{A/1cm, B/1cm}
+\celtxt[width=1cm,align=right]{A}{1}{1}
+\celtxt[width=1cm,align=right]{A}{2}{2}
+\celtxt[width=1cm,align=right]{A}{3}{3}
+\celtxt[width=1cm,align=right]{A}{4}{4}
+\celtxt[width=1cm,align=right]{A}{5}{5}
+\celtxt[width=1cm,align=right]{A}{6}{6}
+\end{scope}
+\end{tikzpicture}
+\end{tcblisting}
+
\subsection{Les couleurs par d\'efaut}
@@ -411,6 +440,8 @@ Voyons un exemple pour comprendre la syntaxe :
\hline
\texttt{\textbackslash multiSelec\{A-1\}\{C-2\}} & Simule la s\'election des cellules allant de A1 \`a C2.\\
\hline
+\texttt{\textbackslash multimultiSelec\{A-1\}\{A-3\}\{A-6\}} & Simule l'étirement des cellules allant de A1 \`a A3 jusqu'à A6.\\
+\hline
\texttt{\{\textbackslash helvbx A1\}} & Affiche : \helvbx{A1}.\\
\hline
\end{tabularx}
diff --git a/macros/latex/contrib/pas-tableur/latex/pas-tableur.sty b/macros/latex/contrib/pas-tableur/latex/pas-tableur.sty
index a2de8687f2..84928cd92d 100644
--- a/macros/latex/contrib/pas-tableur/latex/pas-tableur.sty
+++ b/macros/latex/contrib/pas-tableur/latex/pas-tableur.sty
@@ -1,6 +1,6 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
-% pas-tableur.sty v2.05 encodage : UTF8 %
+% pas-tableur.sty v2.06 encodage : UTF8 %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
@@ -8,8 +8,8 @@
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-\def\fileversion{2.04}
-\def\filedate{2023/04/16}
+\def\fileversion{2.06}
+\def\filedate{2024/09/14}
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesClass{pas-tableur}[%
\filedate\space v\fileversion\space
@@ -102,7 +102,14 @@
%
%==> Macro etoilee : \tableur*{A/<l1>,B/<l2>,...}. Tableur avec colonnes de largeurs differentes
%
-\newcommand{\tableur@star}[2][1]
+% Modifiée dans la version 2.06 sur la suggestion de Emiel van Miltenburg
+
+\newcommand{\tableur@star}[2][1]
+ {
+ \IfSubStr{#2}{,}{\tableur@star@columns[#1]{#2}}{\tableur@star@onecolumn[#1]{#2}}
+ }
+
+\newcommand{\tableur@star@columns}[2][1]
{%
\xdef\list@of@col{#2}%
% Placement de la premiere cellule en-tête
@@ -139,7 +146,39 @@
}%
}%
\fi%
- } % --> Fin de \tableur*
+ }
+
+\newcommand{\tableur@star@onecolumn}[2][1]
+ {%
+ % Placement de la premiere cellule en-tête
+ \StrBefore{#2}{/}[\first@name] % Récupère la partie avant "/"
+ \StrBehind{#2}{/}[\first@width] % Récupère la partie après "/"
+ \pastab@draw@cell{\first@width}{\first@name}{0}{}{\first@name}
+ % Placement des en-têtes de lignes
+ \pastab@draw@cell{\numline@width}{numline1}{2}{\first@name.south west}{1}
+ \ifnum#1>1%
+ \foreach \num@line [remember=\num@line as \lastnum (initially 1)] in {2,...,#1}
+ {%
+ \pastab@draw@cell{\numline@width}{numline\num@line}{3}{numline\lastnum.south east}{\num@line}%
+ }%
+ \fi%
+ % Trace de la grille
+ \foreach \name/\w in {#2}
+ {%
+ \pastableur@grid{\w}{\name}{1}{\name.south}%
+ }%
+ \ifnum#1>1%
+ \foreach\numline [remember=\numline as \lastnumline (initially 1)] in {2,...,#1}
+ {%
+ \foreach \name/\w in {#2}
+ {%
+ \pastableur@grid{\w}{\name}{\numline}{cell\name-\lastnumline.south}%
+ }%
+ }%
+ \fi%
+ }
+
+% --> Fin de \tableur*
%
%==> Macro non etoilee : \tableur{A,B,C,...} ou \tableur{A-C}
%
@@ -302,7 +341,6 @@
\newcommand*\multiSelec[2]
{%
\fill[blueSelec,opacity=0.5] ($(cell#1.north west)+(0.25pt,-0.25pt)$) rectangle ($(cell#2.south east)+(-0.25pt,0.25pt)$);%
- \draw[very thick] (cell#1.south west) rectangle (cell#1.north east);%
\fill[black] ($(cell#2.south east)+(-0.5pt,0.5pt)$) rectangle +(3pt,-3pt);%
%
%==> On colorie les en-têtes "colonnes"
@@ -328,10 +366,51 @@
\pastableur@colorcell{numline\i}{0}
\node[celhead,minimum width=\numline@width,minimum height=\line@height] at (numline\i) {\helvbx\i};%
}%
+ \draw[very thick] (cell#1.south west) rectangle (cell#1.north east);%
}% fin de \multiSelec
%
%
%
+
+%
+% Selection de plusieurs cellules : \multimultiSelec{A-1}{A-2}{A-3}
+% Proposition de Emiel van Miltenburg pour la version 2.06 le 2024/09/14
+%
+\newcommand*\multimultiSelec[3]
+{%
+ \fill[blueSelec,opacity=0.5] ($(cell#1.north west)+(0.25pt,-0.25pt)$) rectangle ($(cell#3.south east)+(-0.25pt,0.25pt)$);%
+
+ \fill[black] ($(cell#3.south east)+(-0.5pt,0.5pt)$) rectangle +(3pt,-3pt);%
+ %
+ %==> On colorie les en-têtes "colonnes"
+ %
+ \StrChar{#1}{1}[\str@start] % par exemple, "G"
+ \StrChar{#2}{1}[\str@end] % par exemple, "L"
+ \StrBetween{\col@names}{\str@start}{\str@end}[\str@col] % retourne par exemple "HIJK"
+ \edef\str@col{\str@start\str@col\str@end} % retourne alors "GHIJKL"
+ \StrLen{\str@col}[\nb@columns] % nombre d'en-têtes "colonnes" \`a colorier
+ \foreach \i in {1,...,\nb@columns}
+ {%
+ \StrChar{\str@col}{\i}[\name]%
+ \pastableur@colorcell{\name}{1}
+ \node at (\name) {\helvbx\name};%
+ }%
+ %
+ %==> On colorie les en-têtes "lignes"
+ %
+ \StrGobbleLeft{#1}{2}[\first@num]%
+ \StrGobbleLeft{#2}{2}[\second@num]%
+ \foreach \i in {\first@num,...,\second@num}
+ {%
+ \pastableur@colorcell{numline\i}{0}
+ \node[celhead,minimum width=\numline@width,minimum height=\line@height] at (numline\i) {\helvbx\i};%
+ }%
+ \draw[very thick] (cell#2.south west) rectangle (cell#1.north east);%
+}% fin de \multimultiSelec
+%
+%
+%
+
\newlength\pastableur@decal
\newcommand{\pastableur@colorcell}[2] % #1 : name, #2 : 0=en-tetes "lignes" / 1=en-tetes "colonnes"
{%
diff --git a/macros/latex/contrib/pdfmanagement-testphase/CHANGELOG.md b/macros/latex/contrib/pdfmanagement-testphase/CHANGELOG.md
index 4c4251c47e..a3369c7b74 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/CHANGELOG.md
+++ b/macros/latex/contrib/pdfmanagement-testphase/CHANGELOG.md
@@ -5,7 +5,38 @@ first release 0.95a, 2021-02-23 will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
this project uses date-based 'snapshot' version identifiers.
+## [2024-09-29]
+
+### Changed
+
+ - generic driver:
+ expand values of pdfauthor and similar to allow the use of commands
+
+### Fixed
+ - color-ltx.sty: adapted \color@endgroup to change in LaTeX format.
+
+## [2024-09-13]
+Version: 2024-09-02 v0.96l
+
+### Added
+ - ltdocinit.dtx: add \LogDocumentProperties
+ - l3pdfmeta: Support additions of external schemas like ZUGferd with
+ \pdfmeta_xmp_schema_new:nnn \pdfmeta_xmp_property_new:nnnnn
+
+### Fixed
+ - colorspace-patches-tmp-ltx.sty: fixes hook use, issue #78
+
+## [2024-09-02]
+Version: 2024-09-02 v0.96k
+
+### Added
+ - l3pdfmeta.dtx: add standard test `Catalog_no_OCProperties_AS`, (issue#77)
+
+### Fixed
+ - l3pdfmeta.dtx: remove Catalog_no_OCProperties from pdf/a-2b onwards (issue#77)
+
## [2024-08-17]
+Version: 2024-08-17 v0.96j
### Added
diff --git a/macros/latex/contrib/pdfmanagement-testphase/README.md b/macros/latex/contrib/pdfmanagement-testphase/README.md
index 9ac57108e0..7862282bf1 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/README.md
+++ b/macros/latex/contrib/pdfmanagement-testphase/README.md
@@ -1,6 +1,6 @@
# LaTeX PDF management testphase bundle
-Version: 0.96j, 2024-08-17
+Version: 0.96m, 2024-09-29
This package is used during a test phase to load the new PDF management code
of LaTeX.
diff --git a/macros/latex/contrib/pdfmanagement-testphase/color-ltx.sty b/macros/latex/contrib/pdfmanagement-testphase/color-ltx.sty
index 68272c9b16..a8ced5210e 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/color-ltx.sty
+++ b/macros/latex/contrib/pdfmanagement-testphase/color-ltx.sty
@@ -24,7 +24,7 @@
%% This file has the LPPL maintenance status "maintained".
%%
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
-\ProvidesPackage{color-ltx}[2024-08-17 v0.96j
+\ProvidesPackage{color-ltx}[2024-09-29 v0.96m
Standard LaTeX Color (patched for l3color, part of pdfmanagement-testphase, original version 2022/01/06 v1.3d) (DPC)]
\edef\Gin@codes{%
\catcode`\noexpand\^^A\the\catcode`\^^A\relax
@@ -186,7 +186,7 @@
\InputIfFileExists{mathcolor.ltx}{}{}
\def\color@setgroup{\begingroup\set@color}
\let\color@begingroup\begingroup
-\def\color@endgroup{\endgraf\endgroup}
+\def\color@endgroup{\endgraf\@endpefalse\endgroup}
\def\color@hbox{\hbox\bgroup\color@begingroup}
\def\color@vbox{\vbox\bgroup\color@begingroup}
\def\color@endbox{\color@endgroup\egroup}
diff --git a/macros/latex/contrib/pdfmanagement-testphase/colorspace-patches-tmp-ltx.sty b/macros/latex/contrib/pdfmanagement-testphase/colorspace-patches-tmp-ltx.sty
index eb3c8e4b86..8a7c2a1b32 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/colorspace-patches-tmp-ltx.sty
+++ b/macros/latex/contrib/pdfmanagement-testphase/colorspace-patches-tmp-ltx.sty
@@ -19,7 +19,7 @@
%
% for those people who are interested.
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
-\ProvidesExplPackage{colorspace-patches-tmp-ltx}{2024-08-17}{0.96j}
+\ProvidesExplPackage{colorspace-patches-tmp-ltx}{2024-09-29}{0.96m}
{temporary patches for the colorspace package to test pdfresource management ... UF}
@@ -72,7 +72,7 @@
\RemoveFromHook{begindocument}[colorspace]
-\hook_gput_code:nnn {enddocument} {pdf}
+\hook_gput_code:nnn {begindocument/end} {pdf}
{
\def\spc@elt#1#2
{
diff --git a/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.dtx b/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.dtx
index f38e8d8811..d4335140f5 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.dtx
+++ b/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.dtx
@@ -82,7 +82,7 @@
% }^^A
% }
%
-% \date{Version 0.96j, released 2024-08-17}
+% \date{Version 0.96m, released 2024-09-29}
%
% \maketitle
% \begin{documentation}
@@ -211,7 +211,7 @@
%
% \item |pdflang| is deprecated. Instead \cs{DocumentMetadata} should be used:
% \begin{verbatim}
-% \cs{DocumentMetadata}{lang=de-DE}
+% \DocumentMetadata{lang=de-DE}
% \end{verbatim}
%
% The value can be retrieved as |document/lang|.
@@ -965,7 +965,7 @@
%<@@=hyp>
% \end{macrocode}
% \begin{macrocode}
-\ProvidesFile{hgeneric-testphase.def}[2024-08-17 v0.96j %
+\ProvidesFile{hgeneric-testphase.def}[2024-09-29 v0.96m %
generic Hyperref driver for the LaTeX PDF management testphase bundle]
\RequirePackage{etoolbox} %why?
@@ -1467,7 +1467,7 @@
%\tl_set:cn {@#1}{#2}
\AddToDocumentProperties[hyperref]{#1}{#2}
}
-\cs_generate_variant:Nn \@@_store_metadata:nn {en,ne,ee}
+\cs_generate_variant:Nn \@@_store_metadata:nn {en,ne,ee,no,eo}
% \end{macrocode}
% \subsection{citecolor}
% cite is a link context. So we define a hook, and the keys in terms of this hook.
@@ -1588,6 +1588,7 @@
% \begin{variable}
% {
% \l_@@_tmpa_tl,
+% \l_@@_tmpb_tl,
% \l_@@_tmpa_seq,
% \l_@@_tmpa_int,
% \l_@@_tmpa_box,
@@ -1596,6 +1597,7 @@
% \begin{macrocode}
\box_new:N \l_@@_tmpa_box
\tl_new:N \l_@@_tmpa_tl
+\tl_new:N \l_@@_tmpb_tl
\seq_new:N \l_@@_tmpa_seq
\int_new:N \l_@@_tmpa_int
\str_new:N \l_@@_tmpa_str
@@ -1949,6 +1951,7 @@
{
\@@_text_pdfstring:noN { #1 }{ \l_@@_text_enc_info_print_tl } #2
}
+\cs_generate_variant:Nn \@@_text_pdfstring_info:nN {eN,oN}
% \end{macrocode}
% \end{macro}
%
@@ -3955,16 +3958,20 @@
% but we allow to set an empty value.
% If the value begin with an optional argument, we assume a multilanguage clist and
% use only the first value.
+% The values are expanded with \cs{text_expand:n}
% \begin{macrocode}
\regex_new:N\l_@@_optlang_regex
\regex_set:Nn\l_@@_optlang_regex {\A\[([A-Za-z\-]+)\](.*)}
+\cs_generate_variant:Nn\clist_item:nn{on}
\cs_new_protected:Npn \@@_setup_info_key:nn #1 #2
{
\keys_define:nn { hyp }
{
pdf#1 .code:n =
{
- \tl_if_blank:nTF {##1}
+ \tl_set:Ne\l_@@_tmpa_tl {\text_expand:n{##1}}
+ \@@_store_metadata:no {pdf#1}{\l_@@_tmpa_tl}
+ \tl_if_empty:NTF \l_@@_tmpa_tl
{
\str_case:nnF { #1 }
{
@@ -3984,45 +3991,44 @@
}
}
{
- \tl_set:Ne\l_@@_tmpa_tl {\clist_item:nn{##1}{1}}
+ \tl_set:Ne\l_@@_tmpb_tl {\clist_item:on{\l_@@_tmpa_tl}{1}}
\exp_args:NNV
- \regex_extract_once:NnN \l_@@_optlang_regex \l_@@_tmpa_tl\l_@@_tmpa_seq
+ \regex_extract_once:NnN \l_@@_optlang_regex \l_@@_tmpb_tl\l_@@_tmpa_seq
\seq_if_empty:NTF\l_@@_tmpa_seq
{
- \@@_text_pdfstring_info:nN {##1}\l_@@_tmpa_str
+ \@@_text_pdfstring_info:oN {\l_@@_tmpa_tl}\l_@@_tmpa_str
}
- {
- \exp_args:Ne
- \@@_text_pdfstring_info:nN {\seq_item:Nn \l_@@_tmpa_seq{3}}\l_@@_tmpa_str
+ {
+ \@@_text_pdfstring_info:eN {\seq_item:Nn \l_@@_tmpa_seq{3}}\l_@@_tmpa_str
}
\str_if_eq:VnF\l_@@_tmpa_str{<FEFF>}
{
\pdfmanagement_add:nne {Info}{#2}{\l_@@_tmpa_str}
}
- }
- \@@_store_metadata:nn {pdf#1}{##1}
+ }
}
}
\keys_define:nn { hyp / info }
{
#2 .code:n =
{
+ \tl_set:Ne\l_@@_tmpa_tl {\text_expand:n{##1}}
+ \@@_store_metadata:eo {pdf\str_lowercase:n{#1}}{\l_@@_tmpa_tl}
\tl_if_blank:nTF {##1}
{
\pdfmanagement_remove:nn {Info}{#2}
}
{
- \@@_text_pdfstring_info:nN {##1}\l_@@_tmpa_str
+ \@@_text_pdfstring_info:oN {\l_@@_tmpa_tl}\l_@@_tmpa_str
\str_if_eq:VnF\l_@@_tmpa_str{<FEFF>}
{
\pdfmanagement_add:nne {Info}{#2}{\l_@@_tmpa_str}
}
- }
- \exp_args:Ne \@@_store_metadata:nn {pdf\str_lowercase:n{#1}}{##1}
+ }
}
,unknown .code:n =
- {
- \@@_text_pdfstring_info:nN {##1}\l_@@_tmpa_str
+ {
+ \@@_text_pdfstring_info:eN {##1}\l_@@_tmpa_str
\str_if_eq:VnF\l_@@_tmpa_str{<FEFF>}
{
\exp_args:Nno
diff --git a/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.pdf b/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.pdf
index ab0f008a55..4a558b98fb 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.dtx
index 8ab7e948ac..cf42a6e22c 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.dtx
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.dtx
@@ -45,7 +45,7 @@
% }^^A
% }
%
-% \date{Version 0.96j, released 2024-08-17}
+% \date{Version 0.96m, released 2024-09-29}
%
% \maketitle
%
@@ -56,27 +56,27 @@
% \begin{macrocode}
%<drivers>\ProvidesExplFile
%<*dvipdfmx>
- {l3backend-testphase-dvipdfmx.def}{2024-08-17}{}
+ {l3backend-testphase-dvipdfmx.def}{2024-09-29}{}
{LaTeX~PDF~management~testphase~bundle~backend~support: dvipdfmx}
%</dvipdfmx>
%<*dvips>
- {l3backend-testphase-dvips.def}{2024-08-17}{}
+ {l3backend-testphase-dvips.def}{2024-09-29}{}
{LaTeX~PDF~management~testphase~bundle~backend~support: dvips}
%</dvips>
%<*dvisvgm>
- {l3backend-testphase-dvisvgm.def}{2024-08-17}{}
+ {l3backend-testphase-dvisvgm.def}{2024-09-29}{}
{LaTeX~PDF~management~testphase~bundle~backend~support: dvisvgm}
%</dvisvgm>
%<*luatex>
- {l3backend-testphase-luatex.def}{2024-08-17}{}
+ {l3backend-testphase-luatex.def}{2024-09-29}{}
{LaTeX~PDF~management~testphase~bundle~backend~support: PDF output (LuaTeX)}
%</luatex>
%<*pdftex>
- {l3backend-testphase-pdftex.def}{2024-08-17}{}
+ {l3backend-testphase-pdftex.def}{2024-09-29}{}
{LaTeX~PDF~management~testphase~bundle~backend~support: PDF output (pdfTeX)}
%</pdftex>
%<*xdvipdfmx>
- {l3backend-testphase-xetex.def}{2024-08-17}{}
+ {l3backend-testphase-xetex.def}{2024-09-29}{}
{LaTeX~PDF~management~testphase~bundle~backend~support: XeTeX}
%</xdvipdfmx>
% \end{macrocode}
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.pdf
index f15724e4d4..4be7d7fac3 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.dtx
index 59268785a4..83c96ff5f8 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.dtx
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.dtx
@@ -48,7 +48,7 @@
% }^^A
% }
%
-% \date{Version 0.96j, released 2024-08-17}
+% \date{Version 0.96m, released 2024-09-29}
%
% \maketitle
% \begin{documentation}
@@ -432,7 +432,7 @@
% \begin{macrocode}
%<@@=pdfannot>
%<*header>
-\ProvidesExplPackage{l3pdfannot}{2024-08-17}{0.96j}
+\ProvidesExplPackage{l3pdfannot}{2024-09-29}{0.96m}
{PDF-annotations}
\RequirePackage{l3pdfdict}
%</header>
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.pdf
index 568726ab7d..986283a9d5 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.dtx
index 2c297fb5c7..78a7b74bbb 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.dtx
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.dtx
@@ -49,7 +49,7 @@
% }^^A
% }
%
-% \date{Version 0.96j, released 2024-08-17}
+% \date{Version 0.96m, released 2024-09-29}
%
% \maketitle
% \begin{documentation}
@@ -208,7 +208,7 @@
% \begin{macrocode}
%<@@=pdfdict>
%<*header>
-\ProvidesExplPackage{l3pdfdict}{2024-08-17}{0.96j}
+\ProvidesExplPackage{l3pdfdict}{2024-09-29}{0.96m}
{Tools for PDF dictionaries (LaTeX PDF management testphase bundle)}
%</header>
% \end{macrocode}
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.pdf
index 37534467d5..fe89538394 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.dtx
index 7cda9b3102..07c598c9a5 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.dtx
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.dtx
@@ -49,7 +49,7 @@
% }^^A
% }
%
-% \date{Version 0.96j, released 2024-08-17}
+% \date{Version 0.96m, released 2024-09-29}
%
% \maketitle
% \begin{documentation}
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.pdf
index 1981d6c95c..b9c29679d4 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.dtx
index 8514ce7200..bc66577913 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.dtx
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.dtx
@@ -64,7 +64,7 @@
% }^^A
% }
%
-% \date{Version 0.96j, released 2024-08-17}
+% \date{Version 0.96m, released 2024-09-29}
%
% \maketitle
% \begin{documentation}
@@ -380,7 +380,7 @@
% checked.
% User appearances should have two versions and follow the naming
% module/\meta{name}/Yes and module/\meta{name}/Off.
-% \begin{macro}
+% \begin{macro}[int]
% {
% \@@_checkbox_default_appearances:,
% pdffield/checkbox/default/Yes,
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.pdf
index 1b9850003e..81718e2d11 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.dtx
index ceca7dd26f..609438b81a 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.dtx
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.dtx
@@ -49,7 +49,7 @@
% }^^A
% }
%
-% \date{Version 0.96j, released 2024-08-17}
+% \date{Version 0.96m, released 2024-09-29}
%
% \maketitle
% \begin{documentation}
@@ -152,6 +152,14 @@
% \end{syntax}
% This allows to set default keys for a choice field.
% \end{function}
+
+% \begin{function}{type}
+% \begin{syntax}
+% |type| = \texttt{combo}\verb+|+\texttt{combo-edit}\verb+|+\texttt{list}
+% \end{syntax}
+% This key is a choice key that allows to set the three types.
+% \end{function}
+
%
% \begin{function}{name,T}
% \begin{syntax}
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.pdf
index f17a26c1b8..ba209d6036 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.dtx
index 3c71dc973e..ac3f39bc1d 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.dtx
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.dtx
@@ -55,7 +55,7 @@
% }^^A
% }
%
-% \date{Version 0.96j, released 2024-08-17}
+% \date{Version 0.96m, released 2024-09-29}
%
% \maketitle
% \begin{documentation}
@@ -100,9 +100,9 @@
%^^A \group_end:%
% \bigskip
% \subsection{Commands}
-% \begin{function}{\pdffield_push:n}
+% \begin{function}{\pdffield_pushbutton:n}
% \begin{syntax}
-% \cs{pdffield_push:n}\Arg{key val list}
+% \cs{pdffield_pushbutton:n}\Arg{key val list}
% \end{syntax}
% This creates a pushbutton. Unlike radio buttons and checkboxes pushbuttons
% don't change their state and they don't store or represent a value.
@@ -422,7 +422,7 @@
% \subsection{Appearances}
% The default appearances are a rectangular frame with some text.
%
-% \begin{macro}
+% \begin{macro}[int]
% {
% \@@_pushbutton_default_appearances:,
% pdffield/pushbutton/default-n,
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.pdf
index f6a8c91e70..856c4cd135 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.dtx
index e26f875c37..d8a3e52f96 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.dtx
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.dtx
@@ -83,7 +83,7 @@
% }^^A
% }
%
-% \date{Version 0.96j, released 2024-08-17}
+% \date{Version 0.96m, released 2024-09-29}
%
% \maketitle
% \begin{documentation}
@@ -610,7 +610,7 @@
% Every appearance should have two versions and follow the naming
% module/\meta{name}/Yes and module/\meta{name}/Off.
%
-% \begin{macro}
+% \begin{macro}[int]
% {
% \@@_radio_default_appearances:,
% pdffield/radio/default/Yes,
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.pdf
index dcbce59fbf..ad0c890ad0 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.dtx
index bdd1c28ffc..3100f6efc4 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.dtx
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.dtx
@@ -49,7 +49,7 @@
% }^^A
% }
%
-% \date{Version 0.96j, released 2024-08-17}
+% \date{Version 0.96m, released 2024-09-29}
%
% \maketitle
% \begin{documentation}
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.pdf
index 1551733a91..94600e8487 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.dtx
index 27deb954c3..f26b603c8f 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.dtx
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.dtx
@@ -69,7 +69,7 @@
% }^^A
% }
%
-% \date{Version 0.96j, released 2024-08-17}
+% \date{Version 0.96m, released 2024-09-29}
%
% \maketitle
% \begin{documentation}
@@ -972,7 +972,7 @@
%<*package>
%<@@=pdffield>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesExplPackage{l3pdffield-testphase}{2024-08-17}{0.96j}%
+\ProvidesExplPackage{l3pdffield-testphase}{2024-09-29}{0.96m}%
{form fields}
% \end{macrocode}
% \subsection{hyperref specific command}
@@ -2014,7 +2014,7 @@
% PV = pagevisible, PI = pageinvisible
% \begin{macro}
% {
-% AA/Fo,onfocus, AA/Bl,onblur, AA/D,onmousedown, AA/U,onmouseup,
+% AA/*,AA/Fo,onfocus, AA/Bl,onblur, AA/D,onmousedown, AA/U,onmouseup,
% AA/E,onenter, AA/X,onexit, AA/PO,pageopen, AA/PC,pageclose,
% AA/PV,pagevisible, AA/PI,pageinvisible
% }
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.pdf
index 395c405a56..440c2a3007 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.dtx
index 68287a9d5c..431b72ff24 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.dtx
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.dtx
@@ -49,7 +49,7 @@
% }^^A
% }
%
-% \date{Version 0.96j, released 2024-08-17}
+% \date{Version 0.96m, released 2024-09-29}
%
% \maketitle
% \begin{documentation}
@@ -398,7 +398,7 @@
%
% \begin{macrocode}
%<*header>
-\ProvidesExplPackage{l3pdffile}{2024-08-17}{0.96j}
+\ProvidesExplPackage{l3pdffile}{2024-09-29}{0.96m}
{embedding and referencing files in PDF---LaTeX PDF management testphase bundle}
\RequirePackage{l3pdftools} %temporarily!!
%</header>
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.pdf
index ec0b0616e8..4d701b7694 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.dtx
index 2890995126..146c33cacd 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.dtx
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.dtx
@@ -57,7 +57,7 @@
% }^^A
% }
%
-% \date{Version 0.96j, released 2024-08-17}
+% \date{Version 0.96m, released 2024-09-29}
%
% \maketitle
% \begin{documentation}
@@ -632,7 +632,7 @@
%<@@=pdfmanagement>
%<*header>
%
-\ProvidesExplPackage{l3pdfmanagement}{2024-08-17}{0.96j}
+\ProvidesExplPackage{l3pdfmanagement}{2024-09-29}{0.96m}
{Management of core PDF dictionaries (LaTeX PDF management testphase bundle)}
%</header>
% \end{macrocode}
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.pdf
index 8f126de615..99f5ef9490 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.dtx
index a6d31a1e63..2fa800134c 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.dtx
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.dtx
@@ -49,7 +49,7 @@
% }^^A
% }
%
-% \date{Version 0.96j, released 2024-08-17}
+% \date{Version 0.96m, released 2024-09-29}
%
% \maketitle
% \begin{documentation}
@@ -190,6 +190,8 @@
% a test for at least the PDF-format will be added in future.
% \item[|Catalog_no_OCProperties|] don't add |/OCProperties| to the catalog
% {\em l3pdfmeta removes this entry at the end of the document}
+% \item[|Catalog_OCProperties_no_AS|]
+% do not use |/AS| optional content configuration dictionary.
% \item[|Catalog_EmbeddedFiles|] ensure that an |EmbeddedFiles| name tree is
% in the catalog. This is required for PDF/A-4f.
% \item[|annot_widget_no_AA|] (rule 6.6.2-1)
@@ -592,7 +594,8 @@
% \begin{syntax}
% \cs{pdfmeta_xmp_xmlns_new:nn}\Arg{prefix}\Arg{uri}
% \end{syntax}
-% With this command a xmlns name space can be added.
+% With this command a xmlns name space can be added. The \meta{uri}
+% argument is expanded, a hash can be input with |\c_hash_str|.
% \end{function}
%
% With the two following commands PDF declarations can be added to the XMP metadata
@@ -622,6 +625,38 @@
% If \cs{pdfmeta_xmp_add_declaration:nnnnn} is used twice with the same \meta{uri}
% argument the |claimData| are concatenated. There is no check if the |claimData| are identical.
% \end{function}
+%
+% The following two commands can be used to extend the schema declarations in
+% the XMP metadata. This is for example needed to implement a standard like ZUGferd/Factur X
+% for invoices. A schema declaration should be added only once but as this task
+% is probably not needed frequently only light guards are there to avoid duplicated entries.
+%
+% \begin{function}{\pdfmeta_xmp_schema_new:nnn}
+% \begin{syntax}
+% \cs{pdfmeta_xmp_schema_new:nnn}\Arg{text}\Arg{prefix}\Arg{uri}
+% \end{syntax}
+% \meta{text} is some string describing the schema, e.g. |PDF/A~Identification~Schema|,
+% \meta{prefix} is the unique prefix used by the schema. This prefix
+% must be declared first with |\pdfmeta_xmp_xmlns_new:nn|. If a schema with this prefix
+% has already been declared, it will currently be ignored with a warning.
+% The \meta{uri} is expanded, so a
+% hash can for example be given as |\c_hash_str|.
+% \end{function}
+
+% \begin{function}{\pdfmeta_xmp_property_new:nnnnn}
+% \begin{syntax}
+% \cs{pdfmeta_xmp_property_new:nnnnn}\Arg{schema prefix}\Arg{name}\Arg{type}\Arg{category}\Arg{description}
+% \end{syntax}
+% If the new property already exists in the schema
+% (as identified by the combination of \meta{schema prefix}
+% and \meta{name} the property is silently ignore.
+% \meta{schema prefix} is the prefix declared with the previous command.
+% schema, e.g. |PDF/A~Identification~Schema|,
+% \meta{name} is a short string that identifies the property, e.g. |xmpMM| or |year|. It must be
+% unique in the properties of a schema. \meta{type} is e.g. |URI| or |Integer| or |Text|,
+% \meta{category} is e.g. |internal| or |external|, \meta{description} is a free description string.
+% \end{function}
+%
% \end{documentation}
%
% \begin{implementation}
@@ -631,7 +666,7 @@
% \begin{macrocode}
%<@@=pdfmeta>
%<*header>
-\ProvidesExplPackage{l3pdfmeta}{2024-08-17}{0.96j}
+\ProvidesExplPackage{l3pdfmeta}{2024-09-29}{0.96m}
{PDF-Standards---LaTeX PDF management testphase bundle}
%</header>
% \end{macrocode}
@@ -887,7 +922,10 @@
%
%===============
% Rule 6.1.13-1 CosDocument, isOptionalContentPresent == false
- ,Catalog_no_OCProperties =
+ ,Catalog_no_OCProperties =
+ % Rule 6.9-4 The AS key shall not appear in any optional content configuration dictionary.
+ % actually only starting with A-2 but doesn't harm here either
+ ,Catalog_OCProperties_no_AS=
%===============
% Rule 6.6.1-1: PDAction, S == "GoTo" || S == "GoToR" || S == "Thread"
% || S == "URI" || S == "Named" || S == "SubmitForm"
@@ -938,6 +976,11 @@
{ g_@@_standard_pdf/A-2B_prop }{max_pdf_version}{1.7}
\prop_gput:cnn
{ g_@@_standard_pdf/A-2B_prop }{omit_CID}{}
+% OCG layers are allowed (with restrictions)
+\prop_gremove:cn
+ { g_@@_standard_pdf/A-2B_prop }
+ { Catalog_no_OCProperties }
+
%A-2u ==============
\prop_new:c { g_@@_standard_pdf/A-2U_prop }
\prop_gset_eq:cc
@@ -1023,7 +1066,8 @@
{ g_@@_standard_pdf/A-4_prop }{conformance}
\prop_gremove:cn
{ g_@@_standard_pdf/A-4_prop }{max_pdf_version}
-
+\prop_gremove:cn
+ { g_@@_standard_pdf/A-4_prop }{Catalog_OCProperties_no_AS}
%A-4f ==============
\prop_new:c { g_@@_standard_pdf/A-4F_prop }
\prop_gset_eq:cc
@@ -1427,7 +1471,8 @@
% \end{macrocode}
% \subsection{Messages}
% \begin{macrocode}
-\msg_new:nnn{pdfmeta}{namespace-defined}{The~xmlns~namespace~`#1`~is~already~declared}
+\msg_new:nnn{pdfmeta}{xmp-defined}{The~XMP~#1~`#2`~is~already~declared}
+\msg_new:nnn{pdfmeta}{xmp-undefined}{The~XMP~#1~`#2`~is~undefined}
\msg_new:nnn{pdfmeta}{colorprofile-undefined}{The~colorprofile~`#1`~is~unknown}
% \end{macrocode}
% \subsection{Some helper commands}
@@ -1959,7 +2004,7 @@
\prop_new:N \g_@@_xmp_xmlns_prop
% \end{macrocode}
% \end{variable}
-% \begin{macro}{\@@_xmp_xmlns_new:nn,\@@_xmp_xmlns_new:ne}
+% \begin{macro}{\@@_xmp_xmlns_new:nn}
% \begin{macrocode}
\cs_new_protected:Npn \@@_xmp_xmlns_new:nn #1 #2
{
@@ -1969,7 +2014,6 @@
\@@_xmp_indent:n{4} xmlns:\exp_not:n{#1="#2"}
}
}
-\cs_generate_variant:Nn \@@_xmp_xmlns_new:nn {ne}
% \end{macrocode}
% \end{macro}
% Now we fill the data. The list is more or less the same as in hyperxmp
@@ -1980,7 +2024,7 @@
\@@_xmp_xmlns_new:nn {photoshop}{http://ns.adobe.com/photoshop/1.0/}
\@@_xmp_xmlns_new:nn {xmp} {http://ns.adobe.com/xap/1.0/}
\@@_xmp_xmlns_new:nn {xmpMM} {http://ns.adobe.com/xap/1.0/mm/}
-\@@_xmp_xmlns_new:ne {stEvt}
+\@@_xmp_xmlns_new:nn {stEvt}
{http://ns.adobe.com/xap/1.0/sType/ResourceEvent\c_hash_str}
\@@_xmp_xmlns_new:nn {pdfaid} {http://www.aiim.org/pdfa/ns/id/}
\@@_xmp_xmlns_new:nn {pdfuaid} {http://www.aiim.org/pdfua/ns/id/}
@@ -1989,13 +2033,13 @@
\@@_xmp_xmlns_new:nn {prism} {http://prismstandard.org/namespaces/basic/3.0/}
%\@@_xmp_xmlns_new:nn {jav} {http://www.niso.org/schemas/jav/1.0/}
%\@@_xmp_xmlns_new:nn {xmpTPg} {http://ns.adobe.com/xap/1.0/t/pg/}
-\@@_xmp_xmlns_new:ne {stFnt} {http://ns.adobe.com/xap/1.0/sType/Font\c_hash_str}
+\@@_xmp_xmlns_new:nn {stFnt} {http://ns.adobe.com/xap/1.0/sType/Font\c_hash_str}
\@@_xmp_xmlns_new:nn {Iptc4xmpCore}{http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/}
\@@_xmp_xmlns_new:nn {pdfaExtension}{http://www.aiim.org/pdfa/ns/extension/}
-\@@_xmp_xmlns_new:ne {pdfaSchema}{http://www.aiim.org/pdfa/ns/schema\c_hash_str}
-\@@_xmp_xmlns_new:ne {pdfaProperty}{http://www.aiim.org/pdfa/ns/property\c_hash_str}
-\@@_xmp_xmlns_new:ne {pdfaType} {http://www.aiim.org/pdfa/ns/type\c_hash_str}
-\@@_xmp_xmlns_new:ne {pdfaField}{http://www.aiim.org/pdfa/ns/field\c_hash_str}
+\@@_xmp_xmlns_new:nn {pdfaSchema}{http://www.aiim.org/pdfa/ns/schema\c_hash_str}
+\@@_xmp_xmlns_new:nn {pdfaProperty}{http://www.aiim.org/pdfa/ns/property\c_hash_str}
+\@@_xmp_xmlns_new:nn {pdfaType} {http://www.aiim.org/pdfa/ns/type\c_hash_str}
+\@@_xmp_xmlns_new:nn {pdfaField}{http://www.aiim.org/pdfa/ns/field\c_hash_str}
% \end{macrocode}
% \subsection{Building the chunks: Extensions}
@@ -2022,42 +2066,61 @@
\cs_new_protected:Npn \@@_xmp_schema_new:nnn #1 #2 #3
%#1 name #2 prefix, #3 text
{
- \seq_put_right:Nn \l_@@_xmp_schema_seq { #2 }
- \tl_new:c { g_@@_xmp_schema_#2_tl }
- \tl_new:c { g_@@_xmp_schema_#2_properties_tl }
- \tl_gput_right:cn { g_@@_xmp_schema_#2_tl }
+ \tl_if_exist:cTF { g_@@_xmp_schema_#2_tl }
{
- \@@_xmp_add_packet_open_attr:nnn{rdf}{li}{rdf:parseType="Resource"}
- \@@_xmp_add_packet_line:nnn {pdfaSchema}{schema}{#1}
- \@@_xmp_add_packet_line:nnn {pdfaSchema}{prefix}{#2}
- \@@_xmp_add_packet_line:nnn {pdfaSchema}{namespaceURI}{#3}
- \@@_xmp_add_packet_open:nn {pdfaSchema}{property}
- \@@_xmp_add_packet_open:nn{rdf}{Seq}
- \tl_use:c { g_@@_xmp_schema_#2_properties_tl }
- \@@_xmp_add_packet_close:nn{rdf}{Seq}
- \@@_xmp_add_packet_close:nn {pdfaSchema}{property}
- \cs_if_exist_use:c {@@_xmp_schema_#2_additions:}
- \@@_xmp_add_packet_close:nn{rdf}{li}
+ \msg_warning:nnnn{pdfmeta}{xmp-defined}{schema}{#2}
}
+ {
+ \seq_put_right:Nn \l_@@_xmp_schema_seq { #2 }
+ \tl_new:c { g_@@_xmp_schema_#2_tl }
+ \tl_new:c { g_@@_xmp_schema_#2_properties_tl }
+ \tl_gput_right:cn { g_@@_xmp_schema_#2_tl }
+ {
+ \@@_xmp_add_packet_open_attr:nnn{rdf}{li}{rdf:parseType="Resource"}
+ \@@_xmp_add_packet_line:nnn {pdfaSchema}{schema}{#1}
+ \@@_xmp_add_packet_line:nnn {pdfaSchema}{prefix}{#2}
+ \@@_xmp_add_packet_line:nnn {pdfaSchema}{namespaceURI}{#3}
+ \@@_xmp_add_packet_open:nn {pdfaSchema}{property}
+ \@@_xmp_add_packet_open:nn{rdf}{Seq}
+ \tl_use:c { g_@@_xmp_schema_#2_properties_tl }
+ \@@_xmp_add_packet_close:nn{rdf}{Seq}
+ \@@_xmp_add_packet_close:nn {pdfaSchema}{property}
+ \cs_if_exist_use:c {@@_xmp_schema_#2_additions:}
+ \@@_xmp_add_packet_close:nn{rdf}{li}
+ }
+ }
}
% \end{macrocode}
% \end{macro}
-
-% \begin{macro}{\@@_xmp_property_new:nnn}
+%
+%
+%
+% \begin{macro}{\@@_xmp_property_new:nnnnn}
% This adds a property to a schema.
% \begin{macrocode}
+\prop_new:N\g_@@_xmp_schema_property_prop
\cs_new_protected:Npn \@@_xmp_property_new:nnnnn #1 #2 #3 #4 #5 %
%#1 schema #2 name, #3 type, #4 category #5 description
{
- \tl_gput_right:cn { g_@@_xmp_schema_#1_properties_tl }
+ \tl_if_exist:cTF { g_@@_xmp_schema_#1_properties_tl }
+ {
+ \prop_get:NeNF \g_@@_xmp_schema_property_prop {#1:#2}\l_@@_tmpa_tl
+ {
+ \prop_gput:Nee \g_@@_xmp_schema_property_prop {#1:#2}{#3}
+ \tl_gput_right:cn { g_@@_xmp_schema_#1_properties_tl }
+ {
+ \@@_xmp_add_packet_open:nn {rdf}{li~rdf:parseType="Resource"}
+ \@@_xmp_add_packet_line:nnn {pdfaProperty}{name}{#2}
+ \@@_xmp_add_packet_line:nnn {pdfaProperty}{valueType}{#3}
+ \@@_xmp_add_packet_line:nnn {pdfaProperty}{category}{#4}
+ \@@_xmp_add_packet_line:nnn {pdfaProperty}{description}{#5}
+ \@@_xmp_add_packet_close:nn{rdf}{li}
+ }
+ }
+ }
{
- \@@_xmp_add_packet_open:nn {rdf}{li~rdf:parseType="Resource"}
- \@@_xmp_add_packet_line:nnn {pdfaProperty}{name}{#2}
- \@@_xmp_add_packet_line:nnn {pdfaProperty}{valueType}{#3}
- \@@_xmp_add_packet_line:nnn {pdfaProperty}{category}{#4}
- \@@_xmp_add_packet_line:nnn {pdfaProperty}{description}{#5}
- \@@_xmp_add_packet_close:nn{rdf}{li}
- }
+ \msg_warning:nnnn{pdfmeta}{xmp-undefined}{schema}{#1}
+ }
}
% \end{macrocode}
% \end{macro}
@@ -2114,7 +2177,7 @@
% \item[pdfaid] properties part and conformance are declared by hyperxmp, but
% no here as already in http://www.aiim.org/pdfa/ns/id/. But we declare
% year so that it can be used also with older A-standards.
-% \begin{macro}{pdfaid~(schema)}
+% \begin{macro}[no-user-doc]{pdfaid~(schema)}
% \begin{macrocode}
\@@_xmp_schema_new:nnn
{PDF/A~Identification~Schema}
@@ -2136,7 +2199,7 @@
% \end{macro}
% \item[pdfuaid] here we need (?) to declare the property
% \enquote{part} and \enquote{rev}.
-% \begin{macro}{pdfuaid~(schema)}
+% \begin{macro}[no-user-doc]{pdfuaid~(schema)}
% \begin{macrocode}
\@@_xmp_schema_new:nnn
{PDF/UA~Universal~Accessibility~Schema}
@@ -2163,7 +2226,7 @@
%
% \item[pdfxid] we set this so that we
% can add the pdf/X version for pdf/X-4 and higher
-% \begin{macro}{pdfxid~(schema)}
+% \begin{macro}[no-user-doc]{pdfxid~(schema)}
% \begin{macrocode}
\@@_xmp_schema_new:nnn
{PDF/X~ID~Schema}
@@ -2179,7 +2242,7 @@
% \end{macro}
%\item[Prism]
-% \begin{macro}{prism~(schema)}
+% \begin{macro}[no-user-doc]{prism~(schema)}
% \begin{macrocode}
\@@_xmp_schema_new:nnn
{PRISM~Basic~Metadata}
@@ -2278,6 +2341,7 @@
% \end{macrocode}
% \end{macro}
% \item[iptc]
+% \begin{macro}[no-user-doc]{iptc (schema)}
% \begin{macrocode}
\@@_xmp_schema_new:nnn
{IPTC~Core~Schema}
@@ -2325,6 +2389,7 @@
\@@_xmp_add_packet_close:nn{pdfaSchema}{valueType}
}
% \end{macrocode}
+% \end{macro}
% \item[jav]: currently ignored
%
% \item[declarations] The PDF Declarations mechanism allows creation and
@@ -2341,7 +2406,7 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_xmp_schema_enable_pdfd:
{
- \@@_xmp_xmlns_new:ne {pdfd}{http://pdfa.org/declarations/}
+ \@@_xmp_xmlns_new:nn {pdfd}{http://pdfa.org/declarations/}
\@@_xmp_schema_new:nnn
{PDF~Declarations~Schema}
{pdfd}
@@ -2411,8 +2476,8 @@
% \subsubsection{pdf}
% This builds pdf related the data with the (prefix \enquote{pdf}).
%
-% \begin{macro}{\@@_xmp_build_pdf:}
-% \begin{macro}{
+% \begin{macro}[int]{\@@_xmp_build_pdf:}
+% \begin{macro}[int]{
% Producer/pdfproducer,
% PDFversion}
% \begin{macrocode}
@@ -2440,8 +2505,8 @@
% \subsubsection{xmp}
% This builds the data with the (prefix \enquote{xmp}).
%
-% \begin{macro}{\@@_xmp_build_xmp:}
-% \begin{macro}{
+% \begin{macro}[int]{\@@_xmp_build_xmp:}
+% \begin{macro}[int]{
% CreatorTool/pdfcreator,
% BaseUrl/baseurl}
% \begin{macrocode}
@@ -2635,8 +2700,8 @@
%
% \subsection{Rest of dublin Core data}
%
-% \begin{macro}{\@@_xmp_build_dc:}
-% \begin{macro}{
+% \begin{macro}[int]{\@@_xmp_build_dc:}
+% \begin{macro}[int]{
% dc:creator/pdfauthor,
% dc:subject/pdfkeywords,
% dc:type/pdftype,
@@ -2815,8 +2880,8 @@
% \end{macro}
%
% \subsection{Prism}
-% \begin{macro}{\@@_xmp_build_prism:}
-% \begin{macro}
+% \begin{macro}[int]{\@@_xmp_build_prism:}
+% \begin{macro}[int]
% {
% complianceProfile,
% prism:subtitle/pdfsubtitle,
@@ -2961,11 +3026,22 @@
\cs_new_protected:Npn \pdfmeta_xmp_xmlns_new:nn #1 #2
{
\prop_if_in:NnTF \g_@@_xmp_xmlns_prop {#1}
- {\msg_warning:nnn{pdfmeta}{namespace-defined}{#1}}
+ {\msg_warning:nnnn{pdfmeta}{xmp-defined}{xmlns~namespace}{#1}}
{\@@_xmp_xmlns_new:nn {#1}{#2}}
}
% \end{macrocode}
% \end{macro}
+% \begin{macro}{\pdfmeta_xmp_schema_new:nnn}
+% \begin{macrocode}
+\cs_set_eq:NN \pdfmeta_xmp_schema_new:nnn \@@_xmp_schema_new:nnn
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\pdfmeta_xmp_property_new:nnnnn}
+% \begin{macrocode}
+\cs_set_eq:NN \pdfmeta_xmp_property_new:nnnnn \@@_xmp_property_new:nnnnn
+% \end{macrocode}
+% \end{macro}
%
% \begin{macro}{\pdfmeta_xmp_add_declaration:n,\pdfmeta_xmp_add_declaration:e}
% \begin{macrocode}
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.pdf
index 9a5de67174..d9ad3802f7 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfoutline.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdfoutline.pdf
new file mode 100644
index 0000000000..5d40c31cf9
--- /dev/null
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfoutline.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.dtx
index e6d655c96e..4d9e6d8c3f 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.dtx
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.dtx
@@ -49,7 +49,7 @@
% }^^A
% }
%
-% \date{Version 0.96j, released 2024-08-17}
+% \date{Version 0.96m, released 2024-09-29}
%
% \maketitle
% \begin{documentation}
@@ -235,7 +235,7 @@
%
% \begin{macrocode}
%<*header>
-\ProvidesExplPackage{l3pdftools}{2024-08-17}{0.96j}
+\ProvidesExplPackage{l3pdftools}{2024-09-29}{0.96m}
{candidate commands for l3pdf---LaTeX PDF management testphase bundle}
%</header>
% \end{macrocode}
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.pdf
index 88abccd671..ddcb4d6afe 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.dtx
index 4daa9d2b83..c7be91e4b2 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.dtx
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.dtx
@@ -48,7 +48,7 @@
% }^^A
% }
%
-% \date{Version 0.96j, released 2024-08-17}
+% \date{Version 0.96m, released 2024-09-29}
%
% \maketitle
% \begin{documentation}
@@ -132,7 +132,7 @@
% \begin{macrocode}
%<@@=pdf>
%<*header>
-\ProvidesExplPackage{l3pdfxform}{2024-08-17}{0.96j}
+\ProvidesExplPackage{l3pdfxform}{2024-09-29}{0.96m}
{command to create xforms (beta)---LaTeX PDF management testphase bundle}
%</header>
% \end{macrocode}
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.pdf
index 2debc15494..d5996aa000 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.dtx b/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.dtx
index 3d29afa58b..9b5758abd4 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.dtx
+++ b/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.dtx
@@ -47,7 +47,7 @@
% }^^A
% }
%
-% \date{Version 0.96j, released 2024-08-17}
+% \date{Version 0.96m, released 2024-09-29}
%
% \maketitle
% \begin{documentation}
@@ -197,11 +197,12 @@
% stream. The \meta{token list variable} is assigned locally.
% \end{function}
%
-% \begin{function}{\ShowDocumentProperties}
+% \begin{function}{\ShowDocumentProperties,\LogDocumentProperties}
% \begin{syntax}
-% \cs{ShowDocumentProperties}
+% \cs{ShowDocumentProperties}\\
+% \cs{LogDocumentProperties}
% \end{syntax}
-% This show the current content of the container.
+% This shows/logs the current content of the container.
% \end{function}
%
% \begin{thebibliography}{9}
@@ -220,7 +221,7 @@
% \begin{macrocode}
%<@@=pdfmanagement>
%<*header>
-\ProvidesExplPackage{ltdocinit}{2024-08-17}{0.96j}
+\ProvidesExplPackage{ltdocinit}{2024-09-29}{0.96m}
{Initialize document metadata}
%</header>
% \end{macrocode}
@@ -324,6 +325,13 @@
\prop_map_function:NN \g_@@_documentproperties_prop \msg_show_item:nn
}
}
+\NewDocumentCommand\LogDocumentProperties {}
+ {
+ \msg_log:nne {pdfmanagement}{show-properties}
+ {
+ \prop_map_function:NN \g_@@_documentproperties_prop \msg_show_item:nn
+ }
+ }
% \end{macrocode}
% \end{macro}
% \begin{macrocode}
diff --git a/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.pdf b/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.pdf
index 7bfd5bb36b..0b2c81696d 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.dtx b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.dtx
index 148d15ce95..8e0b8eff42 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.dtx
+++ b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.dtx
@@ -47,7 +47,7 @@
% }^^A
% }
%
-% \date{Version 0.96j, released 2024-08-17}
+% \date{Version 0.96m, released 2024-09-29}
%
% \maketitle
% \begin{documentation}
@@ -63,7 +63,7 @@
% |debug={firstaidoff={name1,name2,...},...}|.
% \begin{macrocode}
%<*package>
-\ProvidesExplPackage{pdfmanagement-firstaid}{2024-08-17}{0.96j}
+\ProvidesExplPackage{pdfmanagement-firstaid}{2024-09-29}{0.96m}
{LaTeX PDF management testphase bundle / firstaid-patches}
%<@@=pdfmanagement>
diff --git a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.pdf b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.pdf
index 8c4d7d88cb..7a05279fa0 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.dtx b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.dtx
index af4520b433..327acd613e 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.dtx
+++ b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.dtx
@@ -47,7 +47,7 @@
% }^^A
% }
%
-% \date{Version 0.96j, released 2024-08-17}
+% \date{Version 0.96m, released 2024-09-29}
%
% \maketitle
% \begin{documentation}
@@ -394,7 +394,7 @@
% \begin{macrocode}
%<@@=pdf>
%<*package>
-\ProvidesExplPackage{pdfmanagement-testphase}{2024-08-17}{0.96j}
+\ProvidesExplPackage{pdfmanagement-testphase}{2024-09-29}{0.96m}
{LaTeX PDF management testphase bundle}
\providecommand\IfFormatAtLeastTF{\@ifl@t@r\fmtversion}
\IfFormatAtLeastTF{2020-10-01}{}{
@@ -422,7 +422,7 @@
% to allow to set it in the document.
% \begin{macrocode}
%<*header>
-\ProvidesExplFile{pdfmanagement-testphase.ltx}{2024-08-17}{0.96j}
+\ProvidesExplFile{pdfmanagement-testphase.ltx}{2024-09-29}{0.96m}
{PDF~management~code~(testphase)}
% \end{macrocode}
% We define a boolean for the new delayed shipout. This is temporary. At some
diff --git a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.pdf b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.pdf
index f2dc6282db..29e450f72a 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/xcolor-patches-tmp-ltx.sty b/macros/latex/contrib/pdfmanagement-testphase/xcolor-patches-tmp-ltx.sty
index 5fce11f19d..a429ca9754 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/xcolor-patches-tmp-ltx.sty
+++ b/macros/latex/contrib/pdfmanagement-testphase/xcolor-patches-tmp-ltx.sty
@@ -1,6 +1,6 @@
%% LaTeX2e file `xcolor-patches-tmp-ltx.sty'
%%
-\ProvidesPackage{xcolor-patches-tmp-ltx}[2024-08-17 v0.96j patch xcolor for l3color]
+\ProvidesPackage{xcolor-patches-tmp-ltx}[2024-09-29 v0.96m patch xcolor for l3color]
\@ifundefined{color_set:nn}{\RequirePackage{l3color}}{}
\ExplSyntaxOn
diff --git a/macros/latex/contrib/pdfpages/pdfpages.dtx b/macros/latex/contrib/pdfpages/pdfpages.dtx
index 5b41ae68c4..ca9ccd8b46 100644
--- a/macros/latex/contrib/pdfpages/pdfpages.dtx
+++ b/macros/latex/contrib/pdfpages/pdfpages.dtx
@@ -27,12 +27,12 @@
%<*dtx>
\makeatletter
%</dtx>
-\def\AM@fileversion{v0.6a}
+\def\AM@fileversion{v0.6b}
\def\AM@Git@Date@process$#1: #2 #3${\AM@Git@Date@process@i#2\END}
\def\AM@Git@Date@process@i#1-#2-#3\END{\def\AM@Git@Date{#1/#2/#3}}
\def\AM@Git@SHA@process$#1: #2${\def\AM@Git@SHA{#2}}
-\AM@Git@Date@process$Date: 2024-05-29 13:40:24 +0200 $
-\AM@Git@SHA@process$SHA-1: 8248eea896cba74c6d712bddc3e4ae8d4c403081 $
+\AM@Git@Date@process$Date: 2024-08-20 15:16:01 +0200 $
+\AM@Git@SHA@process$SHA-1: 8cc873330fc0863d9d32e017e64c98d9f04f579d $
%</!(example1,example2,example3,installer)>
%
%
@@ -3838,10 +3838,10 @@
% \begin{macrocode}
\def\AM@getpagecount{%
\expandafter\filename@parse\expandafter{\AM@currentdocname}%
- \edef\type@ext{%
- \noexpand\lowercase{%
- \noexpand\def\noexpand\type@ext{.\filename@ext}}}%
- \type@ext
+ \begingroup\edef\x{%
+ \lowercase{\endgroup
+ \def\noexpand\type@ext{\expandafter\scantokens\expandafter{\filename@ext\noexpand}}}}%
+ \x
\ifx\type@ext\AM@pdf@ext
\ifdefined\subfix
\let\AM@import@path\@empty
@@ -3859,7 +3859,7 @@
\def\AM@pagecount{1}%
\fi
}
-\def\AM@pdf@ext{.pdf}
+\def\AM@pdf@ext{pdf}
% \end{macrocode}
% |\XeTeXversion| has changed from time to time: 0.997, 0.997-dev,
% 0.998.1
@@ -4902,6 +4902,11 @@
% with |subfiles.sty|.
% \end{itemize}
%
+% \subsection*{2024/08/20 v0.6b}
+% \begin{itemize}
+% \item Make |\includepdf[pages=-]{\detokenize{file.pdf}}| work in xelatex.
+% \end{itemize}
+%
% \Finale
%
% \iffalse
diff --git a/macros/latex/contrib/pdfpages/pdfpages.pdf b/macros/latex/contrib/pdfpages/pdfpages.pdf
index a5ea1485bc..b4182f36df 100644
--- a/macros/latex/contrib/pdfpages/pdfpages.pdf
+++ b/macros/latex/contrib/pdfpages/pdfpages.pdf
Binary files differ
diff --git a/macros/latex/contrib/profcollege/doc/profcollege-doc.pdf b/macros/latex/contrib/profcollege/doc/profcollege-doc.pdf
index c684b9fff8..2cc561202d 100644
--- a/macros/latex/contrib/profcollege/doc/profcollege-doc.pdf
+++ b/macros/latex/contrib/profcollege/doc/profcollege-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/profcollege/latex/PfCAllumettes.tex b/macros/latex/contrib/profcollege/latex/PfCAllumettes.tex
index f603c71f96..dea7c68cb9 100644
--- a/macros/latex/contrib/profcollege/latex/PfCAllumettes.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCAllumettes.tex
@@ -1,6 +1,10 @@
%%%
% Allumettes
%%%
+\def\filedateAllu{2024/08/04}%
+\def\fileversionAllu{0.1}%
+\message{-- \filedateAllu\space v\fileversionAllu}
+%
\setKVdefault[Allumettes]{Impression=false,Echelles=false}%
\defKV[Allumettes]{Echelle=\setKV[Allumettes]{Echelles}}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCArbreCalcul.tex b/macros/latex/contrib/profcollege/latex/PfCArbreCalcul.tex
index 4113ae9a27..347c56f640 100644
--- a/macros/latex/contrib/profcollege/latex/PfCArbreCalcul.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCArbreCalcul.tex
@@ -1,6 +1,9 @@
%%%
% Arbre de calculs
%%%
+\def\filedateArbreC{2024/08/04}%
+\def\fileversionArbreC{0.1}%
+\message{-- \filedateArbreC\space v\fileversionArbreC}%
\newtoks\toklistearbre%
\newtoks\toklistearbrefractions%
\newtoks\toklistearbreexpressions%
diff --git a/macros/latex/contrib/profcollege/latex/PfCArbreChiffre.tex b/macros/latex/contrib/profcollege/latex/PfCArbreChiffre.tex
index f724c16fda..26d5cb021a 100644
--- a/macros/latex/contrib/profcollege/latex/PfCArbreChiffre.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCArbreChiffre.tex
@@ -2,6 +2,9 @@
% ArbreChiffre
%%%
% https://tex.stackexchange.com/questions/112975/how-to-print-the-permutation-of-s-u-v-a-t-with-latex
+\def\filedateArbreCh{2024/08/04}%
+\def\fileversionArbreCh{0.1}%
+\message{-- \filedateArbreCh\space v\fileversionArbreCh}%
\def\recurse#1#2#3#4\endmarker{%
\dopermute{#1#3}#2#4\endmarker
diff --git a/macros/latex/contrib/profcollege/latex/PfCAssemblagesSolides.tex b/macros/latex/contrib/profcollege/latex/PfCAssemblagesSolides.tex
index 5521dbb419..7f04a08323 100644
--- a/macros/latex/contrib/profcollege/latex/PfCAssemblagesSolides.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCAssemblagesSolides.tex
@@ -1,6 +1,10 @@
%%%
% Assemblages solides
%%%
+\def\filedateAssemblageS{2024/08/04}%
+\def\fileversionAssemblageS{0.1}%
+\message{-- \filedateAssemblageS\space v\fileversionAssemblageS}%
+%
\setKVdefault[Assemblage]{Phi=30,Theta=20,Distance=50,Anglez=0,Anglex=0,Largeur=1.5,Profondeur=0.75,Hauteur=1,RayonBoule=1,RayonCone=1,RayonCylindre=1,HauteurPrisme=1,HauteurPyramideA=1,HauteurPyramideB=1,HauteurConeA=1,HauteurConeB=1,HauteurCylindre=1,Cotes=3,Trace=false,Type=Pyramides}%
\defKV[Assemblage]{Traces=\setKV[Assemblage]{Trace}}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCAutomatismes.tex b/macros/latex/contrib/profcollege/latex/PfCAutomatismes.tex
index fbf80943d4..bb000dee6a 100644
--- a/macros/latex/contrib/profcollege/latex/PfCAutomatismes.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCAutomatismes.tex
@@ -1,6 +1,10 @@
%%%
% Automatismes
%%%
+\def\filedateAutomatismes{2024/08/04}%
+\def\fileversionAutomatismes{0.1}%
+\message{-- \filedateAutomatismes\space v\fileversionAutomatismes}%
+%
\NewDocumentCommand\ChoixAleaMixold{mmmm}{%
\ChoixAlea{1}{2}{\Autograine}%
\ifnum\Autograine=1\relax%
diff --git a/macros/latex/contrib/profcollege/latex/PfCAutonomie.tex b/macros/latex/contrib/profcollege/latex/PfCAutonomie.tex
index b75161ffcc..3e72a72575 100644
--- a/macros/latex/contrib/profcollege/latex/PfCAutonomie.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCAutonomie.tex
@@ -1,4 +1,10 @@
-%%% Autonomie %%%
+%%%
+%Autonomie
+%%%
+\def\filedateAutonomie{2024/08/04}%
+\def\fileversionAutonomie{0.1}%
+\message{-- \filedateAutonomie\space v\fileversionAutonomie}%
+%
\setKVdefault[Autonomie]{AfficheMarge=false,TitreEnigme=Enigme,TitreAtoi=\`A toi,Enigme=false,TexteCorrection=\bfseries Correction,ARemplir=false,Deux=false,Landscape=false}%
\newcommand\Autonomie[3][]{%
diff --git a/macros/latex/contrib/profcollege/latex/PfCBarreNiveaux.tex b/macros/latex/contrib/profcollege/latex/PfCBarreNiveaux.tex
index 8ee730bbfb..d56f096d7e 100644
--- a/macros/latex/contrib/profcollege/latex/PfCBarreNiveaux.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCBarreNiveaux.tex
@@ -1,6 +1,10 @@
%%%
% Barres de niveaux
%%%
+\def\filedateBarreNiveaux{2024/08/04}%
+\def\fileversionBarreNiveaux{0.1}%
+\message{-- \filedateBarreNiveaux\space v\fileversionBarreNiveaux}%
+%
\setKVdefault[ClesBarre]{Niveau=false,LimiteI=25,LimiteF=50,LimiteS=75,TexteOrigine=0,TexteReference=100,CouleurGraduation=white,CouleurFond=gray!50,CouleurBarre=black,Graduation=false,Nom=D\'efaut,Pas=10,CouleurI=red,CouleurF=orange,CouleurS=yellow,CouleurM=green}
\newlength{\barrewidth}
diff --git a/macros/latex/contrib/profcollege/latex/PfCBarresCalculs.tex b/macros/latex/contrib/profcollege/latex/PfCBarresCalculs.tex
index 12b5077025..47537abe92 100644
--- a/macros/latex/contrib/profcollege/latex/PfCBarresCalculs.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCBarresCalculs.tex
@@ -1,6 +1,9 @@
%%%
% Barres de calculs
%%%
+\def\filedateBarresCalculs{2024/08/04}%
+\def\fileversionBarresCalculs{0.1}%
+\message{-- \filedateBarresCalculs\space v\fileversionBarresCalculs}%
\setKVdefault[SuiteBarre]{Litteral=false,Perso=false,Decimaux=false}
\NewDocumentCommand\BarresCalculs{o m m}{%
diff --git a/macros/latex/contrib/profcollege/latex/PfCBillard.tex b/macros/latex/contrib/profcollege/latex/PfCBillard.tex
index 6faf803803..dc0082cef8 100644
--- a/macros/latex/contrib/profcollege/latex/PfCBillard.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCBillard.tex
@@ -1,6 +1,10 @@
%%%
% Billard
%%%
+\def\filedateBillard{2024/08/28}%
+\def\fileversionBillard{0.1a}%
+\message{-- \filedateBillard\space v\fileversionBillard}%
+%
\newtoks\tokPfCMotBillard{}%
\def\UpdateTokBillard#1\nil{\addtotok\tokPfCMotBillard{"#1"}}%
@@ -227,11 +231,9 @@
}%
\def\MPBillardSolution#1#2#3{%
- % \mplibcodeinherit{enable}%
\mplibforcehmode
\xdef\PfCNomBillard{\useKV[ClesBillard]{Nom}}
\begin{mplibcode}[\PfCNomBillard]
-% Figure(0,0,\useKV[ClesBillard]{Longueur}+2cm,\useKV[ClesBillard]{Largeur}+3cm);
trace rec;
% Tracés
drawarrow Pt[1]--(Pt[1]+1.5cm*unitvector(Pt[2]-Pt[1])) withpen pencircle scaled 1.25;
@@ -253,14 +255,16 @@
else:
dotlabel.bot(TEX(substring(0,1) of #1),Pt[1]);
fi;
+ path segmenttest;
for k=2 upto BLong:
- if (demidroite(1/1000[Pt[k-1],Pt[k]],Pt[k]) intersectiontimes cote[1])<>(-1,-1):
+ segmenttest:=(9/10)[Pt[k-1],Pt[k]]--(11/10)[Pt[k-1],Pt[k]];
+ if segmenttest intersectiontimes cote[1]<>(-1,-1):
dotlabel.bot(TEX(substring(k-1,k) of #1),Pt[k]);
- elseif (demidroite(1/1000[Pt[k-1],Pt[k]],Pt[k]) intersectiontimes cote[2])<>(-1,-1):
+ elseif segmenttest intersectiontimes cote[2]<>(-1,-1):
dotlabel.rt(TEX(substring(k-1,k) of #1),Pt[k]);
- elseif (demidroite(1/1000[Pt[k-1],Pt[k]],Pt[k]) intersectiontimes cote[3])<>(-1,-1):
+ elseif segmenttest intersectiontimes cote[3]<>(-1,-1):
dotlabel.top(TEX(substring(k-1,k) of #1),Pt[k]);
- elseif (demidroite(1/1000[Pt[k-1],Pt[k]],Pt[k]) intersectiontimes cote[4])<>(-1,-1):
+ elseif segmenttest intersectiontimes cote[4]<>(-1,-1):
dotlabel.lft(TEX(substring(k-1,k) of #1),Pt[k]);
fi;
endfor;
@@ -270,5 +274,4 @@
label.top(TEX(substring(k-1,k) of #1),((xpart(Co),5mm)-center Reponse)+(k-1)*(7mm,0)+(2.5mm,0));
endfor;
\end{mplibcode}%
-% \mplibcodeinherit{disable}%
}% \ No newline at end of file
diff --git a/macros/latex/contrib/profcollege/latex/PfCBonSortie.tex b/macros/latex/contrib/profcollege/latex/PfCBonSortie.tex
index 25408ad5fe..c783f90d8e 100644
--- a/macros/latex/contrib/profcollege/latex/PfCBonSortie.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCBonSortie.tex
@@ -1,6 +1,10 @@
%%%
% Bon de sortie
%%%
+\def\filedateBonSortie{2024/08/04}%
+\def\fileversionBonSortie{0.1}%
+\message{-- \filedateBonSortie\space v\fileversionBonSortie}%
+%
\newcommand\BonSortieBandeau{%
Nom : \hfill Date : \hspace*{3cm}
}
diff --git a/macros/latex/contrib/profcollege/latex/PfCBonbon.tex b/macros/latex/contrib/profcollege/latex/PfCBonbon.tex
index 08be71cd4f..8c897fa4de 100644
--- a/macros/latex/contrib/profcollege/latex/PfCBonbon.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCBonbon.tex
@@ -1,9 +1,13 @@
%%%
% Bonbon
%%%
+\def\filedateBonbon{2024/08/04}%
+\def\fileversionBonbon{0.1}%
+\message{-- \filedateBonbon\space v\fileversionBonbon}%
+%
\setKVdefault[Bonbon]{CouleurUn=red,Bicolore=false,Echelle=1}%
\defKV[Bonbon]{CouleurDeux=\setKV[Bonbon]{Bicolore}}%
-
+%
\NewDocumentCommand\Bonbon{o}{%
\useKVdefault[Bonbon]%
\setKV[Bonbon]{#1}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCCAN.tex b/macros/latex/contrib/profcollege/latex/PfCCAN.tex
index f77aea497a..cb8dd56fd2 100644
--- a/macros/latex/contrib/profcollege/latex/PfCCAN.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCCAN.tex
@@ -1,3 +1,10 @@
+%%%
+% CAN
+%
+\def\filedateCAN{2024/08/04}%
+\def\fileversionCAN{0.1}%
+\message{-- \filedateCAN\space v\fileversionCAN}%
+%
% Gestion de l'aléatoire (pour la CAN)
\newcommand\ChoixAlea[4][]{%
\ifx\bla#1\bla%
diff --git a/macros/latex/contrib/profcollege/latex/PfCCalculatrice.tex b/macros/latex/contrib/profcollege/latex/PfCCalculatrice.tex
index d2a189e29b..c97b32472f 100644
--- a/macros/latex/contrib/profcollege/latex/PfCCalculatrice.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCCalculatrice.tex
@@ -1,6 +1,9 @@
%%%
% Calculatrice
%%%
+\def\filedateCalculatrice{2024/08/04}%
+\def\fileversionCalculatrice{0.1}%
+\message{-- \filedateCalculatrice\space v\fileversionCalculatrice}%
%https://tex.stackexchange.com/questions/290321/mimicking-a-calculator-inputs-and-screen
\definecolor{lightorange}{rgb}{0.9,0.4,0}%
\definecolor{lightestorange}{rgb}{1,0.8,0.5}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCCalculsCroises.tex b/macros/latex/contrib/profcollege/latex/PfCCalculsCroises.tex
index d17a6c9f55..eb9b8b739d 100644
--- a/macros/latex/contrib/profcollege/latex/PfCCalculsCroises.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCCalculsCroises.tex
@@ -1,6 +1,10 @@
%%%
% Calculs Croises
%%%
+\def\filedateCalculsCroises{2024/08/04}%
+\def\fileversionCalculsCroises{0.1}%
+\message{-- \filedateCalculsCroises\space v\fileversionCalculsCroises}%
+%
\setKVdefault[CalculsCroises]{Largeur=20pt,Solution=false,Inverse=false,Creation=false,Graines=false,Vide=false,Couleur=LightGray,Negatifs=false,Aide=false,CouleurS=blue}
\defKV[CalculsCroises]{Graine=\setKV[CalculsCroises]{Graines}}%
\defKV[CalculsCroises]{ListeNombres=\setKV[CalculsCroises]{Aide}}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCCalculsDetailles.tex b/macros/latex/contrib/profcollege/latex/PfCCalculsDetailles.tex
new file mode 100644
index 0000000000..df321d523a
--- /dev/null
+++ b/macros/latex/contrib/profcollege/latex/PfCCalculsDetailles.tex
@@ -0,0 +1,147 @@
+%%%
+% Calculs détaillés
+%%%
+\def\filedateCDetailles{2024/08/24}%
+\def\fileversionCDetailles{0.1}%
+\message{-- \filedateCDetailles\space v\fileversionCDetailles}
+%
+\setKVdefault[CalculAuto]{Under=false,OverB=false,OverC=false,UnderB=false,UnderC=false,Cadre=false,Fluo=false,Evidence=false,Lettres={A,B,C,D,E},Couleur=Purple}
+
+\newcounter{PfCNbCalculs}
+\newcounter{PfCNbSousCalculs}
+\newcounter{PfCNbMarque}
+
+\NewDocumentCommand\PfCMarquePriorite{m}{%
+ \ifboolKV[CalculAuto]{OverB}{%
+ \Overbrace{#1}%
+ }{%
+ \ifboolKV[CalculAuto]{OverC}{%
+ \Overcrochet{#1}%
+ }{%
+ \ifboolKV[CalculAuto]{UnderC}{%
+ \Undercrochet{#1}%
+ }{%
+ \ifboolKV[CalculAuto]{UnderB}{%
+ \Underbrace{#1}%
+ }{%
+ \ifboolKV[CalculAuto]{Cadre}{%
+ \PfCFbox{CCalculAuto}{#1}
+ }{%
+ \ifboolKV[CalculAuto]{Fluo}{%
+ \Surligner[CCalculAuto]{#1}
+ }{%
+ \ifboolKV[CalculAuto]{Under}{%
+ \mathunderline{CCalculAuto}{#1}%
+ }{%
+ \ifboolKV[CalculAuto]{Evidence}{%
+ \mathcolor{CCalculAuto}{#1}%
+ }{%
+ #1%
+ }%
+ }%
+ }%
+ }%
+ }%
+ }%
+ }%
+ }%
+}%
+
+\NewDocumentCommand\CalculDetaille{om}{%
+ \useKVdefault[CalculAuto]%
+ \setKV[CalculAuto]{#1}%
+ \colorlet{CCalculAuto}{\useKV[CalculAuto]{Couleur}}%
+ \setcounter{PfCNbCalculs}{0}%
+ \setsepchar{§}\ignoreemptyitems%
+ \readlist*\ListeNombresCalculs{#2}%
+ \reademptyitems%
+ \xdef\PfCFooListeLettres{\useKV[CalculAuto]{Lettres}}%
+ \setsepchar{,}\ignoreemptyitems%
+ \readlist*\ListeLettres{\PfCFooListeLettres}%
+ \reademptyitems%
+ \xdef\PfCNbMaxLignesCalculs{0}%
+ \foreachitem\compteur\in\ListeNombresCalculs{%
+ \stepcounter{PfCNbCalculs}%
+ \itemtomacro\ListeNombresCalculs[\compteurcnt]\Titi%
+ \setsepchar{,}\ignoreemptyitems%
+ \readlist*\ListeNombresCalculsDetails{\Titi}%
+ \reademptyitems%
+ \expandafter\xdef\csname NbLignesCalculs\Alph{PfCNbCalculs}\endcsname{\ListeNombresCalculsDetailslen}%
+ \xdef\PfCNbMaxLignesCalculs{\fpeval{max(\PfCNbMaxLignesCalculs,\ListeNombresCalculsDetailslen)}}%
+ \setcounter{PfCNbSousCalculs}{0}%
+ \foreachitem\compteura\in\ListeNombresCalculsDetails{%
+ \stepcounter{PfCNbSousCalculs}%
+ \StrSubstitute{\compteura}{*}{\times}[\PfCCalculAutoUn]%
+ \StrSubstitute{\PfCCalculAutoUn}{:}{\div}[\PfCCalculAutoDeux]%
+ \StrCount{\PfCCalculAutoDeux}{<}[\NbInf]%
+ \ifnum\fpeval{\NbInf}=0\relax%
+ \expandafter\xdef\csname NbMarqueLigneCalcul\Alph{PfCNbCalculs}\Alph{PfCNbSousCalculs}\endcsname{1}%
+ \expandafter\xdef\csname LigneCalcul\Alph{PfCNbCalculs}\Alph{PfCNbSousCalculs}A\endcsname{\PfCCalculAutoDeux}%
+ \else%
+ \xdef\PfCExpressionDepart{\PfCCalculAutoDeux}%
+ \setcounter{PfCNbMarque}{0}%
+ \foreach\xx in{1,...,\NbInf}{%
+ \StrBefore{\PfCExpressionDepart}{<}[\PfCDevant]%
+ \StrBetween{\PfCExpressionDepart}{<}{>}[\PfCAEncadrer]%
+ \stepcounter{PfCNbMarque}%
+ \expandafter\xdef\csname LigneCalcul\Alph{PfCNbCalculs}\Alph{PfCNbSousCalculs}\Alph{PfCNbMarque}\endcsname{\PfCDevant}%
+ \stepcounter{PfCNbMarque}%
+ \expandafter\xdef\csname LigneCalcul\Alph{PfCNbCalculs}\Alph{PfCNbSousCalculs}\Alph{PfCNbMarque}\endcsname{<\PfCAEncadrer}%
+ \StrBehind{\PfCExpressionDepart}{>}[\PfCExpressionDepartA]%
+ \xdef\PfCExpressionDepart{\PfCExpressionDepartA}%
+ }%
+ \stepcounter{PfCNbMarque}%
+ \expandafter\xdef\csname LigneCalcul\Alph{PfCNbCalculs}\Alph{PfCNbSousCalculs}\Alph{PfCNbMarque}\endcsname{\PfCExpressionDepart}%
+ \expandafter\xdef\csname NbMarqueLigneCalcul\Alph{PfCNbCalculs}\Alph{PfCNbSousCalculs}\endcsname{\thePfCNbMarque}%
+ \fi
+ }%
+ }%
+ %%%%%%%%%
+ \setcounter{PfCNbSousCalculs}{0}%
+ \[%
+ \begin{aligned}
+ \xintFor* ##2 in{\xintSeq{1}{\PfCNbMaxLignesCalculs}}\do{%
+ \stepcounter{PfCNbSousCalculs}%
+ \setcounter{PfCNbCalculs}{0}%
+ \xintFor* ##1 in{\xintSeq{1}{\ListeNombresCalculslen}}\do{%
+ \stepcounter{PfCNbCalculs}%
+ \ifnum##2>\fpeval{\csname NbLignesCalculs\Alph{PfCNbCalculs}\endcsname}\relax%
+ \uppercase{&}
+ \else
+ \ListeLettres[\thePfCNbCalculs]\uppercase{&}=\xdef\Tata{\csname NbMarqueLigneCalcul\Alph{PfCNbCalculs}\Alph{PfCNbSousCalculs}\endcsname}\setcounter{PfCNbMarque}{0}\xintFor*##3 in{\xintSeq{1}{\Tata}}\do{%
+ \stepcounter{PfCNbMarque}
+ \xdef\Toto{\csname LigneCalcul\Alph{PfCNbCalculs}\Alph{PfCNbSousCalculs}\Alph{PfCNbMarque}\endcsname}\StrChar{\Toto}{1}[\PfCATester]
+ \IfStrEq{\PfCATester}{<}{\StrBehind{\Toto}{<}[\PfCAEncadrer]\PfCMarquePriorite{\PfCAEncadrer}}{\Toto}
+ }
+ \fi\xintifForLast{&}{}
+ }\\
+ }
+ \end{aligned}
+ \]
+}%
+
+\def\Underbrace#1{%
+ \ifx#1\bla\bla\else\color{CCalculAuto}\underbrace{{\color{black}#1}}\color{black}\fi%
+}%
+\def\Undercrochet#1{%
+ \ifx#1\bla\bla\else\color{CCalculAuto}\underbracket{{\color{black}#1}}\color{black}\fi%
+}%
+\def\Overbrace#1{%
+ \ifx#1\bla\bla\else\color{CCalculAuto}\overbrace{{\color{black}#1}}\color{black}\fi%
+}%
+\def\Overcrochet#1{%
+ \ifx#1\bla\bla\else\color{CCalculAuto}\overbracket{{\color{black}#1}}\color{black}\fi%
+}%
+\def\PfCFbox#1#2{%
+ \ifx#2\bla\bla\else\setlength{\fboxrule}{1pt}\fcolorbox{#1}{white}{$\displaystyle#2$}\fi%
+}%
+
+\NewDocumentCommand{\Surligner}{O{yellow}m}{%
+ \ifx#2\bla\bla\else
+ \ifmmode%
+ \colorbox{#1}{$\displaystyle#2$}%
+ \else%
+ \colorbox{#1}{#2}%
+ \fi%
+ \fi
+}% \ No newline at end of file
diff --git a/macros/latex/contrib/profcollege/latex/PfCCalculsFractions.tex b/macros/latex/contrib/profcollege/latex/PfCCalculsFractions.tex
index e3660cff1e..cc19c93e54 100644
--- a/macros/latex/contrib/profcollege/latex/PfCCalculsFractions.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCCalculsFractions.tex
@@ -1,3 +1,10 @@
+%%%
+% Calculs fractions
+%
+\def\filedateCalculsFractions{2024/08/04}%
+\def\fileversionCalculsFractions{0.1}%
+\message{-- \filedateCalculsFractions\space v\fileversionCalculsFractions}%
+%
\setKVdefault[CalculsFractions]{Couleurs=false,Negatif=false,Seul=false}%
\defKV[CalculsFractions]{Couleur=\setKV[CalculsFractions]{Couleurs}\setKV[ClesSimplification]{Couleur=#1}}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCCalisson.tex b/macros/latex/contrib/profcollege/latex/PfCCalisson.tex
index 929b1fb28e..dd2fe56db3 100644
--- a/macros/latex/contrib/profcollege/latex/PfCCalisson.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCCalisson.tex
@@ -1,6 +1,10 @@
%%%
% Calisson
%%%
+\def\filedateCalisson{2024/08/04}%
+\def\fileversionCalisson{0.1}%
+\message{-- \filedateCalisson\space v\fileversionCalisson}%
+%
\setKVdefault[Calisson]{Taille=3,Solution=false,Rayon=5cm,Couleur=red,CouleurTrace=black}%
\def\UpdatetoksCalissong#1\nil{\addtotok\tokcalissonlistetracesg{,"#1"}}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCCartesJeux.tex b/macros/latex/contrib/profcollege/latex/PfCCartesJeux.tex
index 1e2075d91a..98bb4b8b3c 100644
--- a/macros/latex/contrib/profcollege/latex/PfCCartesJeux.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCCartesJeux.tex
@@ -1,6 +1,10 @@
%%%
% Cards
%%%
+\def\filedateCartesJeux{2024/08/04}%
+\def\fileversionCartesJeux{0.1}%
+\message{-- \filedateCartesJeux\space v\fileversionCartesJeux}%
+%
\setKVdefault[Cards]{Formats=false,Largeur=165,Hauteur=250,HauteurTheme=40,Marge=12,Landscape=false,Couleur=Cornsilk,CouleurAr=Cornsilk,Theme=Th\'eor\`eme\\de
Pythagore,ThemeSol=Solution,AfficheTheme=false,Trame=false,Jointes=false,TrameVisible=false,RayonArc=5pt,Titre=false,NomTitre=Jeu 1,Loop,JaiQuia=false,Eleve=false,BackgroundAv=false,BackgroundAr=false,%ImageAv=4813762.jpg,ImageAr=4813762.jpg,
AffichageSolution=true,SolutionSeule=false,%
diff --git a/macros/latex/contrib/profcollege/latex/PfCCartesMentales.tex b/macros/latex/contrib/profcollege/latex/PfCCartesMentales.tex
index ea9b30af03..90812c7e9e 100644
--- a/macros/latex/contrib/profcollege/latex/PfCCartesMentales.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCCartesMentales.tex
@@ -1,6 +1,10 @@
%%%
% Cartes Mentales
%%%
+\def\filedateCarteMentale{2024/08/04}%
+\def\fileversionCarteMentale{0.1}%
+\message{-- \filedateCarteMentale\space v\fileversionCarteMentale}%
+%
\setKVdefault[ClesMentales]{Nom={Bulle}, Largeur=5cm, Ancre={0,0},Pointilles=false,CTrace=black,CFond=white,Epaisseur=1pt,Rayon=1}%
\newenvironment{Mind}{\begin{tikzpicture}}{\end{tikzpicture}}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCCartographie.tex b/macros/latex/contrib/profcollege/latex/PfCCartographie.tex
index e23001bbcc..4396dc6f87 100644
--- a/macros/latex/contrib/profcollege/latex/PfCCartographie.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCCartographie.tex
@@ -1,7 +1,11 @@
%%%
% Cartographie
%%%
-\setKVdefault[Cartographie]{Echelle=1,Carte=false,All=false,Europe=false,Asie=false,Amsud=false,Amnord=false,Amcentre=false,Caraibes=false,Afrique=false,AfficheEchelle=false,PaysSeul=false,VillesSup=false,VillesSupI=false,Capitales=false,Impression=false,Fleuves=false,CouleurFond=ciel,Largeur=12,Hauteur=12,Arborescence="/usr/local/texlive/2023/texmf-dist/metapost/profcollege/",Projection=false,TypeProjection="mercator",CouleurPays=Cornsilk,Pasl=2,PasL=2,Codes=false,Epaisseur=2,ModeleCouleur=5,Boussole=false,Allegee=1,Maillage=false}
+\def\filedateCartographie{2024/08/04}%
+\def\fileversionCartographie{0.1}%
+\message{-- \filedateCartographie\space v\fileversionCartographie}%
+%
+\setKVdefault[Cartographie]{Echelle=1,Carte=false,All=false,Europe=false,Asie=false,Amsud=false,Amnord=false,Amcentre=false,Caraibes=false,Afrique=false,AfficheEchelle=false,PaysSeul=false,VillesSup=false,VillesSupI=false,Capitales=false,Impression=false,Fleuves=false,CouleurFond=ciel,Largeur=12,Hauteur=12,Arborescence="/usr/local/texlive/2024/texmf-dist/metapost/profcollege/",Projection=false,TypeProjection="mercator",CouleurPays=Cornsilk,Pasl=2,PasL=2,Codes=false,Epaisseur=2,ModeleCouleur=5,Boussole=false,Allegee=1,Maillage=false}
\defKV[Cartographie]{EchelleCarte=\setKV[Cartographie]{Carte}}
\defKV[Cartographie]{Pays=\setKV[Cartographie]{PaysSeul}}
\defKV[Cartographie]{Villes=\setKV[Cartographie]{VillesSup}}
diff --git a/macros/latex/contrib/profcollege/latex/PfCCheque.tex b/macros/latex/contrib/profcollege/latex/PfCCheque.tex
new file mode 100644
index 0000000000..531af4efc1
--- /dev/null
+++ b/macros/latex/contrib/profcollege/latex/PfCCheque.tex
@@ -0,0 +1,125 @@
+%%%
+% PfCCheque
+%%%
+\def\filedateCheque{2024/09/03}%
+\def\fileversionCheque{0.1}%
+\message{-- \filedateCheque\space v\fileversionCheque}%
+\newlength{\oldbaseline}
+\newlength{\PfCTailleCursive}
+
+\setKVdefault[Cheque]{Sigle=CMF,Banque=Crédit Mathématique de France,Date=\today,Lieu={},Lire=false,Destinataire=Institut Curie,Solution=false,Longueur=15,Taille=\normalsize,Ajust=0pt}
+
+%https://tex.stackexchange.com/questions/406015/defining-macro-gsetlength-as-global-setlength-reliable
+\makeatletter
+\gdef\gsetlength#1#2{%
+ \begingroup
+ \setlength\skip@{#2}% Local assignment to a scratch register.
+ \global#1=\skip@ % Global assignement to #1;
+ % \relax is not necessary because of the following \endgroup.
+ \endgroup % \skip@ is restored by end of group.
+}
+\makeatother
+
+\NewDocumentCommand{\Cheque}{om}{%
+ \useKVdefault[Cheque]%
+ \setKV[Cheque]{#1}%
+ \setbox1=\hbox{\useKV[Cheque]{Taille}\myfontCursive abcdefghijklmnopqrstuvwxyz}%
+ {\useKV[Cheque]{Taille}\myfontCursive\gsetlength{\oldbaseline}{\baselineskip}\normalsize}%
+ \setlength{\PfCTailleCursive}{0.5\ht1+\useKV[Cheque]{Ajust}}%
+ \BuildCheque{#2}%
+}%
+
+\NewDocumentCommand{\BuildCheque}{m}{%
+ \ifluatex
+ \mplibforcehmode
+ \begin{mplibcode}
+ boolean Solution,Lire;
+ Solution=\useKV[Cheque]{Solution};
+ Lire=\useKV[Cheque]{Lire};
+ Longueur=\useKV[Cheque]{Longueur};
+ baselinecp=\fpeval{\oldbaseline};
+ %
+ pair A,B,C,D,M[],N[];
+ A=(0,0);
+ B-A=u*(Longueur,0);
+ C-B=u*(0,5);
+ D-C=A-B;
+ %
+ M1=1/3[D,A];
+ %
+ picture Payez;
+ Payez=image(
+ label.rt(TEX("Payez contre ce chèque"),M1);
+ );
+ %
+ M20=(xpart(M1),ypart(llcorner Payez));
+ M2-M20=(0,-baselinecp);
+ M3-M2=u*(0,-0.5);
+ M4-M3=M2-M1;
+ M5-M4=u*(0.4*Longueur,-0.25);
+ M6-M4=u*(0,-0.25)+u*(0.5,0);
+ M7-M6=u*(2,0);
+ %
+ A:=(xpart(M4),ypart(M6)-1u);
+ B:=A+C-D;
+ %
+ N1=1/2[M1,M2]+0.8*(B-A);
+ N2-N1=M2-M1;
+ N3-N2=0.18*(B-A);
+ N4-N3=N1-N2;
+ drawoptions(withcolor NavyBlue);
+ picture BaseLettre;
+ %%%%%%%%%%%%%%%%
+ fill polygone(A,B,C,D) withcolor 0.8[LightSteelBlue,white];
+ trace polygone(A,B,C,D);
+ draw Payez;
+ label.rt(TEX("{\sffamily \Huge \useKV[Cheque]{Sigle}}"),D+u*(0,-0.5));
+ label.rt(TEX("{\sffamily \useKV[Cheque]{Banque}}"),D+u*(0,-1));
+ trace (lrcorner Payez)--(0.75[(xpart(M1),ypart(lrcorner Payez)),(xpart(M1+B-A),ypart(lrcorner Payez))]);
+ label.rt(TEX("\tiny non endossable sauf au profit d'une banque ou d'un établissement assimilé."),M1+u*(0,-0.300));
+ trace 1/90[M2,M2+B-A]--(0.75[M2,M2+B-A]);
+ label.rt(TEX("À \useKV[Cheque]{Destinataire}"),M3);
+ trace 1/45[M3+u*(0,-0.2),M3+u*(0,-0.2)+B-A]--(0.75[M3+u*(0,-0.2),M3+u*(0,-0.2)+B-A]);
+ fill polygone(N1,N2,N3,N4) withcolor white;
+ trace polygone(N1,N2,N3,N4) withpen pencircle scaled 1.2 withcolor NavyBlue;
+ if Lire=false:
+ label.rt(TEX("\si{\EuRo}~#1"),iso(N1,N2));
+ else:
+ if Solution:
+ label.rt(TEX("\si{\EuRo}~\num{#1}"),iso(N1,N2));
+ fi;
+ fi;
+ label.rt(TEX("À~\hbox to"&decimal(Longueur/5)&"cm{\hrulefill}\quad Le~\hbox to"&decimal(Longueur/5)&"cm{\hrulefill}"),M5);
+ label.top(TEX("\Huge \si{\EuRo}uro"),iso(N4,N1)+u*(0,1));
+ label(TEX("\tiny « à régler exclusivement en euros »"),iso(N4,N1)+u*(-0.5,1));
+ label(TEX("\ChoixAlea{100000}{999999}{\numcheque}\numcheque"),iso(M6,M7));
+ trace cotationmil(M6,M7,2.5mm,25,TEX("\scriptsize chèque \no"));
+ %%
+% drawoptions(withcolor red);
+% draw (llcorner Payez)--(llcorner Payez+B-A);
+% draw M2--(M2+B-A);
+% drawoptions();
+ picture Sous;
+ Sous=image(%
+ label(TEX("\begin{minipage}{\fpeval{0.75*"&decimal(Longueur)&"}cm}
+ \hspace{"&decimal(abs(lrcorner Payez-llcorner Payez))&"pt}\myfontCursive\useKV[Cheque]{Taille}\Ecriture{#1}~euros
+ \end{minipage}"),(0,0));
+ );
+ pair PointBase,PointTest,Decalage;
+ PointBase=1/2[M20,M2+(u*0.75Longueur,0)];
+ PointTest=(0,0);%
+ if abs(llcorner Sous-ulcorner Sous)>baselinecp:
+ Decalage=(8pt,\fpeval{\PfCTailleCursive});
+ else:
+ Decalage=(8pt,2*\fpeval{\PfCTailleCursive});
+ fi;
+ if Lire:
+ draw Sous shifted (PointBase-PointTest+Decalage);
+ else:
+ if Solution:
+ draw Sous shifted (PointBase-PointTest+Decalage);
+ fi;
+ fi;
+ \end{mplibcode}
+ \fi%
+}% \ No newline at end of file
diff --git a/macros/latex/contrib/profcollege/latex/PfCCible.tex b/macros/latex/contrib/profcollege/latex/PfCCible.tex
index d29fdccf9d..91e8f28e04 100644
--- a/macros/latex/contrib/profcollege/latex/PfCCible.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCCible.tex
@@ -1,6 +1,10 @@
%%%
% Cibles
%%%
+\def\filedateCible{2024/08/04}%
+\def\fileversionCible{0.1}%
+\message{-- \filedateCible\space v\fileversionCible}%
+%
\newtoks\toklisteciblea%
\def\UpdatetoksCibleA#1\nil{\addtotok\toklisteciblea{"#1",}}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCCibleQOp.tex b/macros/latex/contrib/profcollege/latex/PfCCibleQOp.tex
index 336b10651d..c33f5242b3 100644
--- a/macros/latex/contrib/profcollege/latex/PfCCibleQOp.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCCibleQOp.tex
@@ -1,3 +1,10 @@
+%%%
+% Cible 4 opérations
+%%%
+\def\filedateCibleQOp{2024/08/04}%
+\def\fileversionCibleQOp{0.1}%
+\message{-- \filedateCibleQOp\space v\fileversionCibleQOp}%
+
\newcount\anpcqo\newcount\bnpcqo\newcount\cnpcqo%
\NewDocumentCommand\PfCCQODiviseurs{m}{%#1 : le nombre entier \`a tester
diff --git a/macros/latex/contrib/profcollege/latex/PfCColorilude.tex b/macros/latex/contrib/profcollege/latex/PfCColorilude.tex
index 33a1ef2446..9c446f6b43 100644
--- a/macros/latex/contrib/profcollege/latex/PfCColorilude.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCColorilude.tex
@@ -1,4 +1,10 @@
-%%% Colorilude %%%
+%%%
+% Colorilude
+%%%
+\def\filedateColorilude{2024/08/04}%
+\def\fileversionColorilude{0.1}%
+\message{-- \filedateColorilude\space v\fileversionColorilude}%
+%
\setKVdefault[Colorilude]{Largeur=10,Lignes=10,Legende=false,Coef=0.6,Solution=false,CartonReponse=false,Resultats=false}
\newcommand\dispogpfc[3][]{%
diff --git a/macros/latex/contrib/profcollege/latex/PfCCompteBon.tex b/macros/latex/contrib/profcollege/latex/PfCCompteBon.tex
index 1d5339b114..bbf219e431 100644
--- a/macros/latex/contrib/profcollege/latex/PfCCompteBon.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCCompteBon.tex
@@ -1,6 +1,10 @@
%%%
% Le compte est bon
%%%
+\def\filedateCompteBon{2024/08/04}%
+\def\fileversionCompteBon{0.1}%
+\message{-- \filedateCompteBon\space v\fileversionCompteBon}%
+%
\setKVdefault[CompteBon]{NombreCalculs=5,NombrePlaques=4,Solution=false,Relatifs=false,Original=false,Graines=false,Plaques=6,CDot=false}
\defKV[CompteBon]{Graine=\setKV[CompteBon]{Graines}}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCConversion.tex b/macros/latex/contrib/profcollege/latex/PfCConversion.tex
index e6ed80f012..86da03a078 100644
--- a/macros/latex/contrib/profcollege/latex/PfCConversion.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCConversion.tex
@@ -1,3 +1,10 @@
+%%%
+% Conversion
+%%%
+\def\filedateConversion{2024/08/04}%
+\def\fileversionConversion{0.1}%
+\message{-- \filedateConversion\space v\fileversionConversion}%
+
\setKVdefault[ClesConversion]{Longueur,Aire=false,Vol=false,Masses=false,Capas=false,Sans=false,Completes=false}%
\defKV[ClesConversion]{Complete=\setKV[ClesConversion]{Completes}}%
\defKV[ClesConversion]{Masse=\setKV[ClesConversion]{Longueur=false}\setKV[ClesConversion]{Masses}}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCCritere.tex b/macros/latex/contrib/profcollege/latex/PfCCritere.tex
index 34c96a9b06..4818b941c7 100644
--- a/macros/latex/contrib/profcollege/latex/PfCCritere.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCCritere.tex
@@ -1,6 +1,10 @@
%%%
% Criteres de divisibilite
%%%
+\def\filedateCritere{2024/08/04}%
+\def\fileversionCritere{0.1}%
+\message{-- \filedateCritere\space v\fileversionCritere}%
+%
\setKVdefault[Critere]{Div=2,Remarque=false,All=false,RemarqueAll=false}
\NewDocumentCommand\Critere{om}{%
diff --git a/macros/latex/contrib/profcollege/latex/PfCCryptarithme.tex b/macros/latex/contrib/profcollege/latex/PfCCryptarithme.tex
index bfa2e8c76a..1494c2adc6 100644
--- a/macros/latex/contrib/profcollege/latex/PfCCryptarithme.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCCryptarithme.tex
@@ -1,6 +1,10 @@
%%%
% Cryptarithmes
%%%
+\def\filedateCrypta{2024/08/04}%
+\def\fileversionCrypta{0.1}%
+\message{-- \filedateCrypta\space v\fileversionCrypta}%
+%
\setKVdefault[Crypta]{Solution=false,ListeLettres={A,B,C,D,E,F,G,H,I,J},Tableau=false}%
\defKV[Crypta]{Indices=\setKV[Crypta]{Tableau}}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCDecDeci.tex b/macros/latex/contrib/profcollege/latex/PfCDecDeci.tex
index b2db7fd38b..861821ce82 100644
--- a/macros/latex/contrib/profcollege/latex/PfCDecDeci.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCDecDeci.tex
@@ -1,6 +1,10 @@
%%%
% Décomposition décimale
%%
+\def\filedateDecDeci{2024/08/04}%
+\def\fileversionDecDeci{0.1}%
+\message{-- \filedateDecDeci\space v\fileversionDecDeci}%
+%
\setKVdefault[DecompDeci]{Parentheses,Colore=false,CouleurU=Blue,CouleurD=Red,CouleurC=Green,Fleches=false,Details=false,ResultatSeul=false,SansMul=false}
\newcounter{PfCNbDecDeci}
diff --git a/macros/latex/contrib/profcollege/latex/PfCDecompFracDeci.tex b/macros/latex/contrib/profcollege/latex/PfCDecompFracDeci.tex
index b045c64f63..1e627c2e3f 100644
--- a/macros/latex/contrib/profcollege/latex/PfCDecompFracDeci.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCDecompFracDeci.tex
@@ -1,7 +1,12 @@
%%%
% D\'ecomposition de fractions d\'ecimales
%%%
-\setKVdefault[ClesFracDeci]{Complete=false,SansZero=false,Remediation=false,Longueur=1cm}
+\def\filedateDecompFracDeci{2024/08/13}%
+\def\fileversionDecompFracDeci{0.1a}%
+\message{-- \filedateDecompFracDeci\space v\fileversionDecompFracDeci}%
+%
+\setKVdefault[ClesFracDeci]{Complete=false,SansZero=false,Remediation=false,Longueur=1cm,Vides=false}%
+\defKV[ClesFracDeci]{Vide=\setKV[ClesFracDeci]{Remediation}\setKV[ClesFracDeci]{Vides}}%
\newlength{\PfCLongueurP}%
\newcommand\FractionDecimale[2][]{%
@@ -26,7 +31,7 @@
\xintifboolexpr{\PartieEntiereFractionDeci == 0}{}{\ifboolKV[ClesFracDeci]{Remediation}{\pointilles[\PfCLongueurP]}{\num{\PartieEntiereFractionDeci}}+}%
\xintFor* ##1 in {\xintSeq{1}{\LongueurPartieDecimale}}\do{%
\StrMid{\PartieDecimaleFractionDeci}{##1}{##1}[\ChiffrePartieDecimale]%
- \xintifForFirst{}{\xintifboolexpr{\ChiffrePartieDecimale == 0}{}{+}}\xintifboolexpr{\ChiffrePartieDecimale == 0}{}{\frac{\ifboolKV[ClesFracDeci]{Remediation}{\pointilles[\PfCLongueurP]}{\num{\ChiffrePartieDecimale}}}{\num{\fpeval{10**(\LongueurFracDeciDeno-1-\LongueurPartieDecimale+##1)}}}}%
+ \xintifForFirst{}{\xintifboolexpr{\ChiffrePartieDecimale == 0}{}{+}}\xintifboolexpr{\ChiffrePartieDecimale == 0}{}{\frac{\ifboolKV[ClesFracDeci]{Remediation}{\pointilles[\PfCLongueurP]}{\num{\ChiffrePartieDecimale}}}{\ifboolKV[ClesFracDeci]{Vides}{\pointilles[\PfCLongueurP]}{\num{\fpeval{10**(\LongueurFracDeciDeno-1-\LongueurPartieDecimale+##1)}}}}}%
}%
}%
}{%
@@ -38,20 +43,20 @@
\StrGobbleLeft{\FractionDeciNum}{\fpeval{\LongueurPartieEntiere}}[\DecompositionFracDeciComplete]%
% on affiche la partie décimale.
\xintFor* ##1 in {\xintSeq{1}{\fpeval{\LongueurFracDeciNum-\LongueurPartieEntiere}}}\do{%
- \xintifForFirst{}{+}\StrMid{\DecompositionFracDeciComplete}{##1}{##1}[\ChiffrePartieDecimale]\frac{\ifboolKV[ClesFracDeci]{Remediation}{\pointilles[\PfCLongueurP]}{\num{\ChiffrePartieDecimale}}}{\num{\fpeval{10**##1}}}%
+ \xintifForFirst{}{+}\StrMid{\DecompositionFracDeciComplete}{##1}{##1}[\ChiffrePartieDecimale]\frac{\ifboolKV[ClesFracDeci]{Remediation}{\pointilles[\PfCLongueurP]}{\num{\ChiffrePartieDecimale}}}{\ifboolKV[ClesFracDeci]{Vides}{\pointilles[\PfCLongueurP]}{\num{\fpeval{10**##1}}}}%
}%
}%
}{%
\ensuremath{%
\xintFor* ##1 in {\xintSeq{1}{\LongueurPartieDecimale}}\do{%
\StrMid{\PartieDecimaleFractionDeci}{##1}{##1}[\ChiffrePartieDecimale]%
- \xintifForFirst{}{+}\frac{\ifboolKV[ClesFracDeci]{Remediation}{\pointilles[\PfCLongueurP]}{\num{\ChiffrePartieDecimale}}}{\num{\fpeval{10**(\LongueurFracDeciDeno-1-\LongueurPartieDecimale+##1)}}}%
+ \xintifForFirst{}{+}\frac{\ifboolKV[ClesFracDeci]{Remediation}{\pointilles[\PfCLongueurP]}{\num{\ChiffrePartieDecimale}}}{\ifboolKV[ClesFracDeci]{Vides}{\pointilles[\PfCLongueurP]}{\num{\fpeval{10**(\LongueurFracDeciDeno-1-\LongueurPartieDecimale+##1)}}}}%
}%
}%
}%
}{%
\ensuremath{%
- \xintifboolexpr{\PartieEntiereFractionDeci == 0}{}{\ifboolKV[ClesFracDeci]{Remediation}{\pointilles[\PfCLongueurP]}{\num{\PartieEntiereFractionDeci}}+}\frac{\ifboolKV[ClesFracDeci]{Remediation}{\pointilles[\PfCLongueurP]}{\num{\PartieDecimaleFractionDeci}}}{\num{\FractionDeciDeno}}%
+ \xintifboolexpr{\PartieEntiereFractionDeci == 0}{}{\ifboolKV[ClesFracDeci]{Remediation}{\pointilles[\PfCLongueurP]}{\num{\PartieEntiereFractionDeci}}+}\frac{\ifboolKV[ClesFracDeci]{Remediation}{\pointilles[\PfCLongueurP]}{\num{\PartieDecimaleFractionDeci}}}{\ifboolKV[ClesFracDeci]{Vides}{\pointilles[\PfCLongueurP]}{\num{\FractionDeciDeno}}}%
}%
}%
}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCDecomposerNombrePremier.tex b/macros/latex/contrib/profcollege/latex/PfCDecomposerNombrePremier.tex
index bf1a28e333..a741919482 100644
--- a/macros/latex/contrib/profcollege/latex/PfCDecomposerNombrePremier.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCDecomposerNombrePremier.tex
@@ -1,10 +1,19 @@
%%%
% Nombre Premier
%%%
-\setKVdefault[ClesNombrePremier]{Tableau=false,TableauVide=false,TableauVertical=false,TableauVerticalVide=false,Exposant=false,Longue=false,All=false,Arbre=false,ArbreVide=false,ArbreComplet=false,ArbreDessine=false,ArbreDessineVide=false,Entoure=false,Entourefin=false,Diviseurs=false,DiviseursT=false,Dot=\dotfill,Impose=false,ImposeAll=false,Potence=false,Decalage=10,Vide=false,CouleurFeuillage=ForestGreen,CouleurTronc=BurlyWood,CouleurFruits=Red,CouleurTexte=white}%
+\def\filedateDecompNbPremier{2024/09/01}%
+\def\fileversionDecompNbPremier{0.1a}%
+\message{-- \filedateDecompNbPremier\space v\fileversionDecompNbPremier}%
+%
+\setKVdefault[ClesNombrePremier]{Tableau=false,TableauVide=false,TableauVertical=false,TableauVerticalVide=false,Exposant=false,Longue=false,All=false,Arbre=false,ArbreVide=false,ArbreComplet=false,ArbreDessine=false,ArbreDessineVide=false,Entoure=false,Entourefin=false,Diviseurs=false,DiviseursT=false,Dot=\dotfill,Impose=false,ImposeAll=false,Potence=false,Decalage=10,Vide=false,CouleurFeuillage=ForestGreen,CouleurTronc=BurlyWood,CouleurFruits=Red,CouleurTexte=white,Poisson=false,Echelle=1cm,AngleArete=45,CouleurPoisson=white,Visible=false,Solution=false}%
\defKV[ClesNombrePremier]{Nombre=\ifboolKV[ClesNombrePremier]{ArbreDessine}{}{\ifboolKV[ClesNombrePremier]{ArbreDessineVide}{}{\setKV[ClesNombrePremier]{Impose}}}}%
\defKV[ClesNombrePremier]{AllNombre=\setKV[ClesNombrePremier]{ImposeAll}}%
-\defKV[ClesNombrePremier]{Impression=\setKV[ClesNombrePremier]{CouleurFeuillage=white,CouleurTronc=white,CouleurFruits=gris,CouleurTexte=black}}
+\defKV[ClesNombrePremier]{Impression=\setKV[ClesNombrePremier]{CouleurFeuillage=white,CouleurTronc=white,CouleurFruits=gris,CouleurTexte=black}}%
+\defKV[ClesNombrePremier]{ElementsVisibles=\setKV[ClesNombrePremier]{Visible}\setKV[ClesNombrePremier]{Vide}}%
+\defKV[ClesNombrePremier]{CouleurSolution=\setKV[ClesNombrePremier]{Solution}}%
+
+\newtoks\tokNPElementsVisibles%
+\def\UpdatetoksElementAfficher#1\nil{\addtotok\tokNPElementsVisibles{#1,}}%
\newcommand\Decomposition[2][]{%
\useKVdefault[ClesNombrePremier]%
@@ -26,6 +35,136 @@
\ifboolKV[ClesNombrePremier]{ArbreDessineVide}{\setKV[ClesNombrePremier]{Vide=true}\MPArbreDessine{#2}{\useKV[ClesNombrePremier]{Nombre}}}{}%
\ifboolKV[ClesNombrePremier]{Diviseurs}{\ListeDiviseur{#2}}{}%
\ifboolKV[ClesNombrePremier]{DiviseursT}{\ListeDiviseurT{#2}}{}%
+ \ifboolKV[ClesNombrePremier]{Poisson}{%
+ \tokNPElementsVisibles{}%
+ \PfCTousLesDiviseurs{#2}%
+ \ifboolKV[ClesNombrePremier]{Visible}{%
+ \xdef\foo{\useKV[ClesNombrePremier]{ElementsVisibles}}%
+ \readlist*\ListeElementsAAfficher{\foo}%
+ }{%
+ \xdef\foo{-1}\readlist*\ListeElementsAAfficher{\foo}%
+ }%
+ \foreachitem\compteur\in\ListeElementsAAfficher{\expandafter\UpdatetoksElementAfficher\compteur\nil}%
+ \MPFish{\PfCPileDiviseurs}{#2}{\the\tokNPElementsVisibles}%
+ }{}%
+}%
+
+\newcommand\PfCTousLesDiviseurs[1]{%
+ %#1 : le nombre entier \`a tester
+ \xdef\anpl{#1}%\relax%
+ \xdef\bnpl{2}%\relax%
+ \xdef\pilebl{2}%\relax%
+ \xdef\PfCPileDiviseurs{1}%
+ \loop
+ \ifnum\fpeval{\bnpl}<\fpeval{\anpl}\relax
+ \modulo{\fpeval{\anpl}}{\fpeval{\bnpl}}
+ \ifnum\remainder=0\relax
+ \xdef\PfCPileDiviseurs{\PfCPileDiviseurs,\fpeval{\bnpl}}%
+ \fi
+ \xdef\bnpl{\fpeval{\bnpl+1}}%
+ \repeat
+ \xdef\PfCPileDiviseurs{\PfCPileDiviseurs,#1}%
+}%%
+
+\def\MPFish#1#2#3{
+ \ifluatex
+ \mplibforcehmode%
+ \mplibnumbersystem{double}%
+ \begin{mplibcode}
+ Echelle=\useKV[ClesNombrePremier]{Echelle};
+ AngleArete=\useKV[ClesNombrePremier]{AngleArete};
+
+ boolean Vide,Visible,Solution;
+ Vide=\useKV[ClesNombrePremier]{Vide};
+ Visible=\useKV[ClesNombrePremier]{Visible};
+ Solution=\useKV[ClesNombrePremier]{Solution};
+
+ color CoulTete,CoulSol;
+ CoulTete=\useKV[ClesNombrePremier]{CouleurPoisson};
+ if Solution:
+ CoulSol=\useKV[ClesNombrePremier]{CouleurSolution};
+ fi;
+
+ numeric Diviseurs[];
+ vardef LectureDiviseurs(text t)=
+ n:=0;
+ for p_=t:
+ n:=n+1;
+ Diviseurs[n]=p_;
+ endfor;
+ enddef;
+
+ LectureDiviseurs(#1);
+ TotalDiviseurs:=n;
+
+ boolean RETOUR;
+ RETOUR=false;
+
+ vardef TestVisible(expr nrt)=
+ RETOUR:=false;
+ for p_=#3:
+ if p_=nrt:
+ RETOUR:=true;
+ fi;
+ endfor;
+ enddef;
+
+
+ pair Ah[],Ab[],O[],Ac;
+ O0=(0,0);
+ O[-1]=O0+Echelle*(0,1);
+ O[-2]=O0+Echelle*(0,-1);
+ fill (arccercle(O[-1],O[-2],O0)--cycle) withcolor CoulTete;
+ trace arccercle(O[-1],O[-2],O0)--cycle;
+ label.lft(TEX("\num{"&decimal(#2)&"}"),O0);
+ %
+ for k=1 upto (TotalDiviseurs div 2):
+ if k=1:Echelle:=Echelle/2;fi;
+ O[k]-O[k-1]=Echelle*(1,0);
+ if k=1:Echelle:=Echelle*2;fi;
+ Ah[k]-O[k]=Echelle*(cosd(AngleArete),sind(AngleArete));
+ Ab[k]-O[k]=Echelle*(cosd(AngleArete),-sind(AngleArete));
+ draw O[k-1]--O[k];
+ draw Ah[k]--O[k]--Ab[k];
+ if Vide=false:
+ label.top(TEX("\num{"&decimal(Diviseurs[k])&"}"),Ah[k]);
+ label.bot(TEX("\num{"&decimal(Diviseurs[TotalDiviseurs+1-k])&"}"),Ab[k]);
+ else:
+ if Visible:
+ TestVisible(Diviseurs[k]);
+ if RETOUR:
+ label.top(TEX("\num{"&decimal(Diviseurs[k])&"}"),Ah[k]);
+ else:
+ if Solution:
+ drawoptions(withcolor CoulSol);
+ label.top(TEX("\num{"&decimal(Diviseurs[k])&"}"),Ah[k]);
+ drawoptions();
+ fi;
+ fi;
+ TestVisible(Diviseurs[TotalDiviseurs+1-k]);
+ if RETOUR:
+ label.bot(TEX("\num{"&decimal(Diviseurs[TotalDiviseurs+1-k])&"}"),Ab[k]);
+ else:
+ if Solution:
+ drawoptions(withcolor CoulSol);
+ label.bot(TEX("\num{"&decimal(Diviseurs[TotalDiviseurs+1-k])&"}"),Ab[k]);
+ drawoptions();
+ fi;
+ fi;
+ fi;
+ fi;
+ endfor;
+ if (TotalDiviseurs mod 2)<>0:
+ Ac-O[TotalDiviseurs div 2]=Echelle*(1,0);
+ draw Ac--O[TotalDiviseurs div 2];
+ if Vide=false:
+ label.rt(TEX("\num{"&decimal(Diviseurs[(TotalDiviseurs+1) div 2])&"}"),Ac);
+ fi;
+ fi;
+ \end{mplibcode}
+ \else
+ %
+ \fi
}%
\def\MPArbre#1{%
@@ -824,13 +963,13 @@
\begin{tabular}{c|c}%
1&\num{#1}\\
\xintFor* ##1 in {\xintSeq {1}{\fpeval{(\cnpT+1)/2}}}\do{%
- \DiviseurNumero{#1}{##1}\num{\fpeval{\dnpT}}\uppercase{&}\DiviseurNumero{#1}{##1}\xintifboolexpr{\dnpT=\fpeval{#1/\dnpT}}{}{\num{\fpeval{#1/\dnpT}}}\\
+ \DiviseurNumero{#1}{##1}\num{\fpeval{\dnpT}}\uppercase{&}\DiviseurNumero{#1}{##1}\xintifboolexpr{\dnpT==\fpeval{#1/\dnpT}}{\num{\fpeval{\dnpT}}}{\num{\fpeval{#1/\dnpT}}}\\
}
\end{tabular}%
\else%
\begin{tabular}{c|c}
1&\num{#1}
- \ifnum\cnpT>2\relax\\
+ \ifnum\cnpT>1\relax\\
\xintFor* ##1 in {\xintSeq {1}{\fpeval{\cnpT/2}}}\do{%
\DiviseurNumero{#1}{##1}\num{\fpeval{\dnpT}}\uppercase{&}\DiviseurNumero{#1}{##1}\num{\fpeval{#1/\dnpT}}\\
}
diff --git a/macros/latex/contrib/profcollege/latex/PfCDefiCalc.tex b/macros/latex/contrib/profcollege/latex/PfCDefiCalc.tex
index 6d850f8012..089b51658a 100644
--- a/macros/latex/contrib/profcollege/latex/PfCDefiCalc.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCDefiCalc.tex
@@ -1,6 +1,10 @@
%%%
% Defi Calculatrice
%%%
+\def\filedateDefiCalc{2024/08/04}%
+\def\fileversionDefiCalc{0.1}%
+\message{-- \filedateDefiCalc\space v\fileversionDefiCalc}%
+%
\setKVdefault[DefiCalculatrice]{NbCasesNoires=6,ListeTouches={!},Impression=false}%
\newtoks\toktexteecran{}
diff --git a/macros/latex/contrib/profcollege/latex/PfCDefiTables.tex b/macros/latex/contrib/profcollege/latex/PfCDefiTables.tex
index 340d598e2f..79ad1064eb 100644
--- a/macros/latex/contrib/profcollege/latex/PfCDefiTables.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCDefiTables.tex
@@ -1,7 +1,10 @@
%%%
% Defi Table
%%%
-
+\def\filedateDefiTables{2024/08/04}%
+\def\fileversionDefiTables{0.1}%
+\message{-- \filedateDefiTables\space v\fileversionDefiTables}%
+%
\setKVdefault[DefiTable]{Solution=false,Math=false,LargeurT=5mm,Graines=false,Creation=false,ValeurMin=1,ValeurMax=10,Restreint=false}
\defKV[DefiTable]{Graine=\setKV[DefiTable]{Graines}}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCDessinAlgo.tex b/macros/latex/contrib/profcollege/latex/PfCDessinAlgo.tex
index 85274cac81..092aa5e825 100644
--- a/macros/latex/contrib/profcollege/latex/PfCDessinAlgo.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCDessinAlgo.tex
@@ -1,6 +1,10 @@
%%%
% Dessin Algo
%%%
+\def\filedateDessinAlgo{2024/08/04}%
+\def\fileversionDessinAlgo{0.1}%
+\message{-- \filedateDessinAlgo\space v\fileversionDessinAlgo}%
+%
\newtoks\tokDessinAlgo%
\def\UpdatetoksDA#1\nil{\addtotok\tokDessinAlgo{#1,}}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCDessinGradue.tex b/macros/latex/contrib/profcollege/latex/PfCDessinGradue.tex
index 3bfacac68c..bd83bb6240 100644
--- a/macros/latex/contrib/profcollege/latex/PfCDessinGradue.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCDessinGradue.tex
@@ -1,6 +1,10 @@
%%%
% Dessin Gradue
%%%
+\def\filedateDessinGradue{2024/08/04}%
+\def\fileversionDessinGradue{0.1}%
+\message{-- \filedateDessinGradue\space v\fileversionDessinGradue}%
+%
\setKVdefault[DessinGradue]{Lignes=10,Debut=-5,Fin=5,Pas=10,Solution=false,EcartVertical=1.5,LignesIdentiques,Longueur=10,Echelle=1,Droites=false,DemiDroites=false,OrigineVariable=false,Code=false}
\defKV[DessinGradue]{Traces=\setKV[DessinGradue]{Code}}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCDessinerRatio.tex b/macros/latex/contrib/profcollege/latex/PfCDessinerRatio.tex
index 27922bdd03..bbb24cb99c 100644
--- a/macros/latex/contrib/profcollege/latex/PfCDessinerRatio.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCDessinerRatio.tex
@@ -1,6 +1,10 @@
%%%
% Lien : ratio
%%%
+\def\filedateDessinRatio{2024/08/04}%
+\def\fileversionDessinRatio{0.1}%
+\message{-- \filedateDessinRatio\space v\fileversionDessinRatio}%
+%
\setKVdefault[ClesRatio]{FigureCours=false,Figure=false,Longueur=5cm,TexteTotal=quantit\'e,TextePart=part,Tableau=false,GrandeurA=Grandeur A,GrandeurB=Part(s),Largeur=1cm,Stretch=1,Nom=false,CouleurUn=gris,CouleurDeux=0.5gris+0.5blanc,CouleurTrois=white,CouleurTab=gray!15,ModeleCouleur=5}
\newcommand\MPTest[9][]{%
diff --git a/macros/latex/contrib/profcollege/latex/PfCDiagrammeRadar.tex b/macros/latex/contrib/profcollege/latex/PfCDiagrammeRadar.tex
index cbed30414d..70180f2a31 100644
--- a/macros/latex/contrib/profcollege/latex/PfCDiagrammeRadar.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCDiagrammeRadar.tex
@@ -1,6 +1,10 @@
%%%
% Radar
%%%
+\def\filedateRadar{2024/08/04}%
+\def\fileversionRadar{0.1}%
+\message{-- \filedateRadar\space v\fileversionRadar}%
+%
\setKVdefault[ClesRadar]{Rayon=3cm,Reference=20,MoyenneClasse=false,Disciplines=false,Pas=5}
\newtoks\toklisteradara%pour la moyenne de l'\'el\`eve
diff --git a/macros/latex/contrib/profcollege/latex/PfCDistributivite.tex b/macros/latex/contrib/profcollege/latex/PfCDistributivite.tex
index ad0dd8885d..b8a9dc57fc 100644
--- a/macros/latex/contrib/profcollege/latex/PfCDistributivite.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCDistributivite.tex
@@ -1,6 +1,9 @@
%%%
% Distributivit\'e
%%%
+\def\filedateDistributivite{2024/08/04}%
+\def\fileversionDistributivite{0.1}%
+\message{-- \filedateDistributivite\space v\fileversionDistributivite}%
% https://tex.stackexchange.com/questions/168972/draw-arrows-to-show-multiplication-pattern-distributive-property/169278?noredirect=1
\newcommand\Tikzmark[1]{%
\tikz[remember picture,baseline,inner sep=0pt]{%
diff --git a/macros/latex/contrib/profcollege/latex/PfCDobble.tex b/macros/latex/contrib/profcollege/latex/PfCDobble.tex
index 2767a20c50..c00592b393 100644
--- a/macros/latex/contrib/profcollege/latex/PfCDobble.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCDobble.tex
@@ -1,8 +1,10 @@
%%%
% dobble
%%%
+\def\filedateDobble{2024/08/04}%
+\def\fileversionDobble{0.1}%
+\message{-- \filedateDobble\space v\fileversionDobble}%
% by Maxime Chupin
-
\NewDocumentCommand\dobble{m}{%
\directlua{
require('PfCdobble.lua')
diff --git a/macros/latex/contrib/profcollege/latex/PfCDomino.tex b/macros/latex/contrib/profcollege/latex/PfCDomino.tex
index 49cf667c16..338dc07bb7 100644
--- a/macros/latex/contrib/profcollege/latex/PfCDomino.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCDomino.tex
@@ -1,6 +1,10 @@
%%%
% Domino
%%%
+\def\filedateDomino{2024/08/04}%
+\def\fileversionDomino{0.1}%
+\message{-- \filedateDomino\space v\fileversionDomino}%
+%
\newtcolorbox{MyDominoMini}[1][]{%
enhanced,
nobeforeafter,
diff --git a/macros/latex/contrib/profcollege/latex/PfCDontCountDots.tex b/macros/latex/contrib/profcollege/latex/PfCDontCountDots.tex
index e395500a3c..ea6761035e 100644
--- a/macros/latex/contrib/profcollege/latex/PfCDontCountDots.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCDontCountDots.tex
@@ -1,3 +1,9 @@
+%%%
+% Ne compte pas
+%%%
+\def\filedateDontCount{2024/08/04}%
+\def\fileversionDontCount{0.1}%
+\message{-- \filedateDontCount\space v\fileversionDontCount}%
% D'après twitter : https://twitter.com/DavidKButlerUoA/status/1700612346258002030/photo/1
\setKVdefault[NCPP]{Largeur=5,Longueur=7,Unite=5mm,Rayon=1mm,Multiple=3,Couleur=black,Solution=false,Graines=false}%
\defKV[NCPP]{Graine=\setKV[NCPP]{Graines}\PfCGraineAlea{#1}}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCEcrireunQCM.tex b/macros/latex/contrib/profcollege/latex/PfCEcrireunQCM.tex
index f39b93ea46..372efa9784 100644
--- a/macros/latex/contrib/profcollege/latex/PfCEcrireunQCM.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCEcrireunQCM.tex
@@ -1,7 +1,11 @@
%%%
% QCM
%%%
-\setKVdefault[ClesQCM]{Reponses=3,Solution=false,Stretch=1,Largeur=60pt,Couleur=gray!15,Titre=false,Nom=R\'eponse,NomV=Vrai,NomF=Faux,Alph=false,AlphT=false,VF=false,Depart=1,Alterne=false,Noms={A/B/C},Multiple=false,Parties={Yeux,Nez,Bouche},CouleurAlt=gray!15,Seul=false,ACompleter=false}%
+\def\filedateQCM{2024/08/04}%
+\def\fileversionQCM{0.1}%
+\message{-- \filedateQCM\space v\fileversionQCM}%
+%
+\setKVdefault[ClesQCM]{Reponses=3,Solution=false,Stretch=1,Largeur=60pt,Couleur=gray!15,Titre=false,Nom=R\'eponse,NomV=Vrai,NomF=Faux,Alph=false,AlphT=false,VF=false,Depart=1,Alterne=false,Noms={A/B/C},Multiple=false,Parties={Yeux,Nez,Bouche},CouleurAlt=gray!15,Seul=false,ACompleter=false,AllSeul=false}%
\newlength{\LargeurQCM}%
\newlength{\PfCLargeurQCM}%
\newcounter{QuestionQCM}%
@@ -34,6 +38,23 @@
\fi%
}%
+\NewDocumentCommand\PfCQCMSMultiChoixLabelSol{mm}{%
+ \xdef\PfCFooChoixLabel{\ListeQCM[#1,\fpeval{\NumeroReponse}]}%
+ \setsepchar{-}%
+ \readlist*\PfCSolListeReponses{\PfCFooChoixLabel}%
+ \xdef\RetiensSiSol{0}%
+ \xintFor* ##3 in{\xintSeq{1}{\PfCSolListeReponseslen}}\do{%
+ \ifnum#2=\PfCSolListeReponses[##3]\relax%
+ \xdef\RetiensSiSol{\fpeval{\RetiensSiSol+1}}%
+ \fi%
+ }%
+ \ifnum\RetiensSiSol>0\relax%
+ $\blacksquare$%
+ \else%
+ $\square$%
+ \fi%
+}%
+
\NewDocumentCommand\QCMSeul{om}{%
\useKVdefault[QCMSeul]%
\setKV[QCMSeul]{#1}%
@@ -173,6 +194,36 @@
\newcommand\QCM[2][]{%
\useKVdefault[ClesQCM]%
\setKV[ClesQCM]{#1}%
+ \ifboolKV[ClesQCM]{AllSeul}{%
+ \setKV[QCMSeul]{#1}
+ \setsepchar[*]{,*&}\ignoreemptyitems%
+ \readlist*\ListeQCM{#2}%
+ \reademptyitems%
+ \setcounter{QuestionQCM}{\fpeval{\useKV[ClesQCM]{Depart}-1}}%
+ \xdef\NumeroReponse{\fpeval{\useKV[ClesQCM]{Reponses}+2}}%
+ \begin{enumerate}
+ \xintFor* ##1 in {\xintSeq {1}{\ListeQCMlen}}\do{%
+ \item\ListeQCM[##1,1]%
+ \ifboolKV[QCMSeul]{EnColonne}{\begin{multicols}{\useKV[QCMSeul]{Colonnes}}}{}%
+ \ifboolKV[QCMSeul]{LabelLettre}{
+ \begin{enumerate}[label=\Alph{*}/]
+ }{%
+ \begin{enumerate}[label=$\square$]
+ }%
+ \xintFor* ##2 in{\xintSeq{1}{\fpeval{\NumeroReponse-2}}}\do{%
+ \xdef\Titi{##2}
+ \ifboolKV[QCMSeul]{Solution}{%
+ \item[\PfCQCMSMultiChoixLabelSol{##1}{##2}]%
+ }{%
+ \item%
+ }%
+ \ListeQCM[##1,\fpeval{##2+1}]
+ }%
+ \end{enumerate}
+ \ifboolKV[QCMSeul]{EnColonne}{\end{multicols}}{}%
+ }%
+ \end{enumerate}
+ }{%
\ifboolKV[ClesQCM]{Seul}{%
\QCMSeul[#1]{#2}%
}{%
@@ -248,6 +299,7 @@
}%
}%
}%
+}%
\NewDocumentCommand\PfCSolCellColor{mm}{%
\xdef\PfCFooSolColor{\ListeQCM[#1,\NumeroReponse]}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCEcritureLettres.tex b/macros/latex/contrib/profcollege/latex/PfCEcritureLettres.tex
index 11ae58b5b7..f80bc93866 100644
--- a/macros/latex/contrib/profcollege/latex/PfCEcritureLettres.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCEcritureLettres.tex
@@ -1,6 +1,10 @@
%%%
% Ecriture des nombres en lettres
%%%
+\def\filedateEcrireLettres{2024/08/04}%
+\def\fileversionEcrireLettres{0.1}%
+\message{-- \filedateEcrireLettres\space v\fileversionEcrireLettres}%
+%
\setKVdefault[ClesEcriture]{Math=false,Majuscule=false,E=false,Tradition=false,Zero=false}%
\newcommand\EcriturePluriel[1]{%
diff --git a/macros/latex/contrib/profcollege/latex/PfCEcritureUnites.tex b/macros/latex/contrib/profcollege/latex/PfCEcritureUnites.tex
index c4503954b3..05e593623c 100644
--- a/macros/latex/contrib/profcollege/latex/PfCEcritureUnites.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCEcritureUnites.tex
@@ -1,6 +1,10 @@
%%%
% Ecritures d'unit\'es
%%%
+\def\filedateEcrireUnites{2024/08/04}%
+\def\fileversionEcrireUnites{0.1}%
+\message{-- \filedateEcrireUnites\space v\fileversionEcrireUnites}%
+%
\setKVdefault[Unites]{m=false,km=false,hm=false,ha=false,dam=false,a=false,dm=false,cm=true,mm=false,um=false,nm=false,g=true,t=false,q=false,kg=false,hg=false,dag=false,dg=false,cg=false,mg=false,ug=false,ng=false,mmin=false,kmh=true,kms=false,ms=false,mh=false,kgm=false,gcm=true,L=true,kL=false,hL=false,daL=false,dL=false,cL=false,mL=false,l=true,kl=false,hl=false,dal=false,dl=false,cl=false,ml=false,Go=true,Mo=false,ko=false,To=false,o=false,kWh=true,C=true,K=false,F=false,Nombre,US=false,UK=false,CFA=false,CFP=false,CHF=false,Euro=false,Precision=2}%
\defKV[Unites]{Dots=\setKV[Unites]{Nombre=false}}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCEngrenagesBase.tex b/macros/latex/contrib/profcollege/latex/PfCEngrenagesBase.tex
index fc1674d37f..58553f57f8 100644
--- a/macros/latex/contrib/profcollege/latex/PfCEngrenagesBase.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCEngrenagesBase.tex
@@ -1,11 +1,14 @@
%%%
% Engrenages
%%%
+\def\filedateEngrenages{2024/08/04}%
+\def\fileversionEngrenages{0.1}%
+\message{-- \filedateEngrenages\space v\fileversionEngrenages}%
+%
\newtoks\tokPfCEngrenages%
\def\UpdatetoksEngrenages#1/#2\nil{\addtotok\tokPfCEngrenages{#1,#2,}}%
\setKVdefault[Engrenages]{Couleur=LightSteelBlue,Unite=3mm,ListeCouleurs={?}}%
-%\defKV[Engrenages]{Couleur=\setKV[Engrenages]{ListeCouleurs=#1}}%
\NewDocumentCommand\Engrenages{o m}{%
\newtoks\toklistecouleur%
@@ -24,7 +27,6 @@
\xdef\ListeAvantCouleurs{\useKV[Engrenages]{ListeCouleurs}}%
\readlist*\ListeCouleur{\ListeAvantCouleurs}%
\foreachitem\couleur\in\ListeCouleur{\expandafter\UpdateCoul\couleur\nil}%
- %\setKV[Engrenages]{Couleurs=\ListeCouleur[1]}%
\BuildEngrenages{\PfCFooEngrenages}{\the\toklistecouleur}%
}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCEnigmeAire.tex b/macros/latex/contrib/profcollege/latex/PfCEnigmeAire.tex
index 345f741656..1840d8b0e3 100644
--- a/macros/latex/contrib/profcollege/latex/PfCEnigmeAire.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCEnigmeAire.tex
@@ -1,6 +1,10 @@
%%%
% Enigme Aire
%%%
+\def\filedateEnigmeAire{2024/08/04}%
+\def\fileversionEnigmeAire{0.1}%
+\message{-- \filedateEnigmeAire\space v\fileversionEnigmeAire}%
+%
\setKVdefault[EnigmeAire]{Modele=A,Couleur=LightSteelBlue,Echelle=7mm,Etape=1,Solution=false,Graines=false}
\defKV[EnigmeAire]{Graine=\setKV[EnigmeAire]{Graines}}
diff --git a/macros/latex/contrib/profcollege/latex/PfCEnquete.tex b/macros/latex/contrib/profcollege/latex/PfCEnquete.tex
index 678b268c57..5dfc36587c 100644
--- a/macros/latex/contrib/profcollege/latex/PfCEnquete.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCEnquete.tex
@@ -1,6 +1,10 @@
%%%
% Enquête
%%%
+\def\filedateEnquete{2024/08/04}%
+\def\fileversionEnquete{0.1}%
+\message{-- \filedateEnquete\space v\fileversionEnquete}%
+%
\setKVdefault[ClesEnquete]{Perso=Qui ?,Objet=Quoi ?,Lieu=Où ?,Largeur=4.5cm}
\newcommand\Enquete[1][]{%
diff --git a/macros/latex/contrib/profcollege/latex/PfCEratosthene.tex b/macros/latex/contrib/profcollege/latex/PfCEratosthene.tex
index 192e470e66..5374c485d2 100644
--- a/macros/latex/contrib/profcollege/latex/PfCEratosthene.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCEratosthene.tex
@@ -1,3 +1,10 @@
+%%%
+% Crible Eratostene
+%%%
+\def\filedateEratos{2024/08/04}%
+\def\fileversionEratos{0.1}%
+\message{-- \filedateEratos\space v\fileversionEratos}%
+%
\setKVdefault[ClesEra]{Premier=false,Nombre=1,CouleurP=Cornsilk!50,CouleurNP=Crimson!15,Colonnes=10,Lignes=10,Hauteur=24pt}%
\NewDocumentCommand\TestPremier{m}{%
diff --git a/macros/latex/contrib/profcollege/latex/PfCFactorisation.tex b/macros/latex/contrib/profcollege/latex/PfCFactorisation.tex
index 823f203623..bdcea30d9d 100644
--- a/macros/latex/contrib/profcollege/latex/PfCFactorisation.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCFactorisation.tex
@@ -1,3 +1,10 @@
+%%%
+% Factorisation
+%%%
+\def\filedateFactorisation{2024/08/04}%
+\def\fileversionFactorisation{0.1}%
+\message{-- \filedateFactorisation\space v\fileversionFactorisation}%
+%
\setKVdefault[Facto]{Aide=false,AideMul=false,Couleur=Crimson,NomExpression=A,Lettre=x,Details,Formel=false,VariableSup=false,ParenthesesFin=false,Finale=false,Type=0}
\defKV[Facto]{Litteral=\setKV[Facto]{Details=false}}
\defKV[Facto]{AutreVariable=\setKV[Facto]{VariableSup}}
diff --git a/macros/latex/contrib/profcollege/latex/PfCFicheMemo.tex b/macros/latex/contrib/profcollege/latex/PfCFicheMemo.tex
index 511e47da2f..e2dfc25f13 100644
--- a/macros/latex/contrib/profcollege/latex/PfCFicheMemo.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCFicheMemo.tex
@@ -1,6 +1,10 @@
%%%
% Fiche m\'emorisation active
%%%
+\def\filedateFicheMemo{2024/08/04}%
+\def\fileversionFicheMemo{0.1}%
+\message{-- \filedateFicheMemo\space v\fileversionFicheMemo}%
+%
\setKVdefault[ClesFicheMemo]{TexteReponses=Réponses,TexteQuestions=Questions,Solution=false,Largeur=\linewidth}
\newcommand\FicheMemo[3][]{%
diff --git a/macros/latex/contrib/profcollege/latex/PfCFonctionAffine.tex b/macros/latex/contrib/profcollege/latex/PfCFonctionAffine.tex
index 5b95ddb02e..26777eaac0 100644
--- a/macros/latex/contrib/profcollege/latex/PfCFonctionAffine.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCFonctionAffine.tex
@@ -1,6 +1,10 @@
%%%
% Fonction Affine
%%%
+\def\filedateAffine{2024/08/04}%
+\def\fileversionAffine{0.1}%
+\message{-- \filedateAffine\space v\fileversionAffine}%
+%
\setKVdefault[ClesAffine]{Nom=f,Variable=x,CoefDir=a,OrdoOrig=b,Ligne=false,Image=false,Antecedent=false,Graphique=false,Retrouve=false,ProgCalcul=false,Unitex=1,Unitey=1,VoirCoef=false,ACoef=0,Redaction=false,Ecriture=false,Definition=false,Centre=false}%ACoefficient=false%: inutile ?
\newcommand\FonctionAffine[5][]{%
diff --git a/macros/latex/contrib/profcollege/latex/PfCFractionAireCarre.tex b/macros/latex/contrib/profcollege/latex/PfCFractionAireCarre.tex
index dbfe8109d2..8fe1993016 100644
--- a/macros/latex/contrib/profcollege/latex/PfCFractionAireCarre.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCFractionAireCarre.tex
@@ -1,6 +1,10 @@
%%%
% Fraction d'aire d'un carré
%%%
+\def\filedateFractionCarre{2024/08/04}%
+\def\fileversionFractionCarre{0.1}%
+\message{-- \filedateFractionCarre\space v\fileversionFractionCarre}%
+%
\setKVdefault[JeuAireCarre]{Couleur=LightSteelBlue,CouleurFond=Cornsilk,Perso=false,Graines=false,Parts=3,Longueur=4,NbPoints=2,Angle=0}%
\defKV[JeuAireCarre]{Graine=\setKV[JeuAireCarre]{Graines}\PfCGraineAlea{#1}}%
\defKV[JeuAireCarre]{ListeParts=\setKV[JeuAireCarre]{Perso}\xdef\PfCFooJeuAireCarre{#1}}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCFractionNombre.tex b/macros/latex/contrib/profcollege/latex/PfCFractionNombre.tex
index 52512fb83e..20d1d1e93a 100644
--- a/macros/latex/contrib/profcollege/latex/PfCFractionNombre.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCFractionNombre.tex
@@ -1,6 +1,10 @@
%%%
% Fraction Nombre
%%%
+\def\filedateFractionNombre{2024/08/04}%
+\def\fileversionFractionNombre{0.1}%
+\message{-- \filedateFractionNombre\space v\fileversionFractionNombre}%
+%
\newtoks\tokFractionNombrePerso%
\def\UpdatetoksFN#1\nil{\addtotok\tokFractionNombrePerso{"#1",}}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCFrise.tex b/macros/latex/contrib/profcollege/latex/PfCFrise.tex
index a07d2a931b..c56b2c6f4f 100644
--- a/macros/latex/contrib/profcollege/latex/PfCFrise.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCFrise.tex
@@ -1,6 +1,10 @@
%%%
% Frise temporelle
%%%
+\def\filedateFrise{2024/08/04}%
+\def\fileversionFrise{0.1}%
+\message{-- \filedateFrise\space v\fileversionFrise}%
+%
\setKVdefault[ClesFrise]{Longueur=8cm,Fleches=false,Ecart=5mm,Sup=false}%
\newtoks\toklistefrise%
diff --git a/macros/latex/contrib/profcollege/latex/PfCFubuki.tex b/macros/latex/contrib/profcollege/latex/PfCFubuki.tex
index 0ce7af2ffa..fd1f973bfd 100644
--- a/macros/latex/contrib/profcollege/latex/PfCFubuki.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCFubuki.tex
@@ -1,3 +1,10 @@
+%%%
+% Fubuki
+%%%
+\def\filedateFubuki{2024/08/04}%
+\def\fileversionFubuki{0.1}%
+\message{-- \filedateFubuki\space v\fileversionFubuki}%
+%
\setKVdefault[Fubuki]{Largeur=20pt,Solution=false,Indice=false,Sommes=false,Couleur=LightSteelBlue,Perso=false,Vierge=false}%
\defKV[Fubuki]{Graine=\PfCGraineAlea{#1}}%
\defKV[Fubuki]{Indices=\setKV[Fubuki]{Indice}\xdef\PfCFooListeIndices{#1}}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCFutoshiki.tex b/macros/latex/contrib/profcollege/latex/PfCFutoshiki.tex
index 4603265e0e..300bdd43d0 100644
--- a/macros/latex/contrib/profcollege/latex/PfCFutoshiki.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCFutoshiki.tex
@@ -1,6 +1,10 @@
%%%
% Futoshiki
%%%
+\def\filedateFutoshiki{2024/08/04}%
+\def\fileversionFutoshiki{0.1}%
+\message{-- \filedateFutoshiki\space v\fileversionFutoshiki}%
+%
\setKVdefault[Futo]{Largeur=15pt,Solution=false,CouleurSolution=Black,CouleurCase=Cornsilk,StyleTexte={}}
\newlength\PfCFutoHeight
diff --git a/macros/latex/contrib/profcollege/latex/PfCGaram.tex b/macros/latex/contrib/profcollege/latex/PfCGaram.tex
index 7e04378a93..fd5a97439c 100644
--- a/macros/latex/contrib/profcollege/latex/PfCGaram.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCGaram.tex
@@ -1,17 +1,21 @@
%%%
% Garam
%%%
-\setKVdefault[Garam]{Taille=7,Largeur=15pt,Solution=false,CouleurSolution=Black}
+\def\filedateGaram{2024/08/04}%
+\def\fileversionGaram{0.1}%
+\message{-- \filedateGaram\space v\fileversionGaram}%
+%
+\setKVdefault[Garam]{Taille=7,Largeur=15pt,Solution=false}%
+\defKV[Garam]{CouleurSolution=\setKV[Garam]{Solution}\colorlet{PfCGaramCoulSol}{#1}}%
\newlength\PfCGaramHeight
\NewDocumentCommand\Garam{o m}{%
- \useKVdefault[Garam]
+ \useKVdefault[Garam]%
\setKV[Garam]{#1}%
\setlength{\PfCGaramHeight}{\useKV[Garam]{Largeur}+\tabcolsep}%
\reademptyitems%
\setsepchar[*]{§*,*/}%
\readlist*\PfCListeGaram{#2}%
- \colorlet{PfCGaramCoulSol}{\useKV[Garam]{CouleurSolution}}%
\begin{NiceTabular}{*{\useKV[Garam]{Taille}}{m{\useKV[Garam]{Largeur}}}}
\CodeBefore
\xintFor* ##1 in{\xintSeq{2}{\fpeval{\useKV[Garam]{Taille}}}}\do{%
@@ -26,7 +30,7 @@
\rule{0pt}{\PfCGaramHeight}\xintFor* ##2 in {\xintSeq{1}{\useKV[Garam]{Taille}}}\do{%
\xintifForFirst{}{&}\StrChar{\PfCListeGaram[##1,##2,1]}{1}[\PfCCaracGaram]%
\IfStrEq{\PfCCaracGaram}{*}{\Block[draw,fill=black]{1-1}{}}{%
- \IfStrEq{\PfCCaracGaram}{!}{\Block{}{\ifboolKV[Garam]{Solution}{\StrGobbleLeft{\PfCListeGaram[##1,##2,1]}{1}}{}}}{\Block{}{\color{PfCGaramCoulSol}\PfCListeGaram[##1,##2,1]}}%
+ \IfStrEq{\PfCCaracGaram}{!}{\Block{}{\ifboolKV[Garam]{Solution}{\color{PfCGaramCoulSol}\StrGobbleLeft{\PfCListeGaram[##1,##2,1]}{1}}{}}}{\Block{}{\PfCListeGaram[##1,##2,1]}}%
}%
}\\
}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCGeometrie.tex b/macros/latex/contrib/profcollege/latex/PfCGeometrie.tex
index ad7e495f04..9bb83ad50d 100644
--- a/macros/latex/contrib/profcollege/latex/PfCGeometrie.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCGeometrie.tex
@@ -1,6 +1,10 @@
%%%
% Geometrie
%%%
+\def\filedateGeometrie{2024/08/04}%
+\def\fileversionGeometrie{0.1}%
+\message{-- \filedateGeometrie\space v\fileversionGeometrie}%
+%
\setKVdefault[Geometrie]{CoinBG={(0,0)},CoinHD={(10u,10u)},TypeTrace="Instruments",Clip,Cadres=false,Epaisseur=1,Pointilles=false,Ombre=false,Couleur=black,Ecart=2,ModeleCouleur=5}%
\defKV[Geometrie]{Cadre=\setKV[Geometrie]{Cadres}\setKV[Geometrie]{Clip=false}}%
@@ -42,6 +46,9 @@
elseif \useKV[Geometrie]{TypeTrace}="Espace":
typetrace:="3D";
typerepre:="persp";
+ elseif \useKV[Geometrie]{TypeTrace}="Schema":
+ input PfCSketch;
+ sketchypaths;
fi;
xa:=xpart(Coinbg);
xb:=xpart(Coinhd);
@@ -120,6 +127,9 @@
elseif \useKV[Geometrie]{TypeTrace}="Espace":
typetrace:="3D";
typerepre:="persp";
+ elseif \useKV[Geometrie]{TypeTrace}="Schema":
+ input PfCSketch;
+ sketchypaths;
fi;}
]%
xa:=xpart(Coinbg);
diff --git a/macros/latex/contrib/profcollege/latex/PfCGrades.tex b/macros/latex/contrib/profcollege/latex/PfCGrades.tex
index 6155c43ca1..d86c6e4e42 100644
--- a/macros/latex/contrib/profcollege/latex/PfCGrades.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCGrades.tex
@@ -1,8 +1,12 @@
%%%
% Grades
%%%
-\setKVdefault[Grades]{Solution=false,Longueur=9,Largeur=9,Echelle=8mm,Graines=false}
-\defKV[Grades]{Graine=\setKV[Grades]{Graines}}
+\def\filedateGrades{2024/08/04}%
+\def\fileversionGrades{0.1}%
+\message{-- \filedateGrades\space v\fileversionGrades}%
+%
+\setKVdefault[Grades]{Solution=false,Longueur=9,Largeur=9,Echelle=8mm,Graines=false}%
+\defKV[Grades]{Graine=\setKV[Grades]{Graines}}%
\NewDocumentCommand\Grades{o}{%
\useKVdefault[Grades]%
diff --git a/macros/latex/contrib/profcollege/latex/PfCGrimuku.tex b/macros/latex/contrib/profcollege/latex/PfCGrimuku.tex
index 81e667533a..9185b76892 100644
--- a/macros/latex/contrib/profcollege/latex/PfCGrimuku.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCGrimuku.tex
@@ -1,6 +1,10 @@
%%%
% Grimuku
%%%
+\def\filedateGrimuku{2024/08/04}%
+\def\fileversionGrimuku{0.1}%
+\message{-- \filedateGrimuku\space v\fileversionGrimuku}%
+%
\setKVdefault[Grimuku]{TLargeur=7,Solution=false,Largeur=30pt,CouleurCase=0.7white}%
\defKV[Grimuku]{CouleurSolution=\setKV[Grimuku]{Solution}}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCHiddenMessage.tex b/macros/latex/contrib/profcollege/latex/PfCHiddenMessage.tex
index f472e07844..65948f5949 100644
--- a/macros/latex/contrib/profcollege/latex/PfCHiddenMessage.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCHiddenMessage.tex
@@ -1,6 +1,10 @@
%%%
% Message caché
%%%
+\def\filedateHidden{2024/08/04}%
+\def\fileversionHidden{0.1}%
+\message{-- \filedateHidden\space v\fileversionHidden}%
+%
\setKVdefault[Hidden]{TLargeur=5,THauteur=3,Solution=false,Hauteur=70pt,Largeur=120pt,Jeu=false,Solution}
\defKV[Hidden]{Plateau=\setKV[Hidden]{Jeu}\setKV[Hidden]{Solution=false}}
diff --git a/macros/latex/contrib/profcollege/latex/PfCHorloge.tex b/macros/latex/contrib/profcollege/latex/PfCHorloge.tex
index 1133714ecd..01af381977 100644
--- a/macros/latex/contrib/profcollege/latex/PfCHorloge.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCHorloge.tex
@@ -1,7 +1,11 @@
%%%
% Horloges
%%%
-\setKVdefault[ClesHorloge]{Aiguilles,Numerique=false,Secondes,Cadre,Rayon=1,Impression=false}
+\def\filedateHorloge{2024/08/12}%
+\def\fileversionHorloge{0.1a}%
+\message{-- \filedateHorloge\space v\fileversionHorloge}%
+%
+\setKVdefault[ClesHorloge]{Aiguilles,Numerique=false,Secondes,Cadre,Rayon=1,Impression=false,Sombre=false}
\NewDocumentCommand\Horloge{ }{%On désactive les :
\begingroup
@@ -62,13 +66,19 @@
\ifluatex
\mplibforcehmode
\begin{mplibcode}
- boolean Secondes,Impression;
+ boolean Secondes,Impression,Sombre;
Secondes=\useKV[ClesHorloge]{Secondes};
Impression=\useKV[ClesHorloge]{Impression};
+ Sombre=\useKV[ClesHorloge]{Sombre};
if Impression:
+ if Sombre:
+ LightSteelBlue:=0.8*white;
+ Crimson:=black;
+ else:
LightSteelBlue:=0.9*white;
Crimson:=0.5*white;
fi;
+ fi;
u:=0.5u;
draw Afficheur(#1 div10,0);
draw Afficheur(#1 mod10,0) shifted(u*(1,0));
@@ -80,9 +90,21 @@
draw Afficheur(#3 div10,0) shifted(u*(6,0));
draw Afficheur(#3 mod10,0) shifted(u*(7,0));
fi;
+ if Sombre:
+ draw bbox currentpicture;
+ fi;
\end{mplibcode}
\else
- \begin{mpost}[mpsettings={boolean Secondes;Secondes=\useKV[ClesHorloge]{Secondes};}]
+ \begin{mpost}[mpsettings={boolean Secondes,Impression,Sombre;Secondes=\useKV[ClesHorloge]{Secondes};Impression=\useKV[ClesHorloge]{Impression};Sombre=\useKV[ClesHorloge]{Sombre};}]
+ if Impression:
+ if Sombre:
+ LightSteelBlue:=0.8*white;
+ Crimson:=black;
+ else:
+ LightSteelBlue:=0.9*white;
+ Crimson:=0.5*white;
+ fi;
+ fi;
u:=0.5u;
draw Afficheur(#1 div10,0);
draw Afficheur(#1 mod10,0) shifted(u*(1,0));
@@ -94,6 +116,9 @@
draw Afficheur(#3 div10,0) shifted(u*(6,0));
draw Afficheur(#3 mod10,0) shifted(u*(7,0));
fi;
+ if Sombre:
+ draw bbox currentpicture;
+ fi;
\end{mpost}
\fi
}
diff --git a/macros/latex/contrib/profcollege/latex/PfCJeton.tex b/macros/latex/contrib/profcollege/latex/PfCJeton.tex
index e3012070f2..68523efce5 100644
--- a/macros/latex/contrib/profcollege/latex/PfCJeton.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCJeton.tex
@@ -1,6 +1,10 @@
%%%
% Jeton
%%%
+\def\filedateJeton{2024/08/04}%
+\def\fileversionJeton{0.1}%
+\message{-- \filedateJeton\space v\fileversionJeton}%
+%
\setKVdefault[Jeton]{Diametre=5mm,Impression=false}%
\NewDocumentCommand\Jeton{om}{%
diff --git a/macros/latex/contrib/profcollege/latex/PfCJeuRangement.tex b/macros/latex/contrib/profcollege/latex/PfCJeuRangement.tex
index 6508e6cd1a..df2f709271 100644
--- a/macros/latex/contrib/profcollege/latex/PfCJeuRangement.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCJeuRangement.tex
@@ -1,3 +1,10 @@
+%%%
+% Jeu Rangement
+%%%
+\def\filedateJeuRangement{2024/08/04}%
+\def\fileversionJeuRangement{0.1}%
+\message{-- \filedateJeuRangement\space v\fileversionJeuRangement}%
+%
\setKVdefault[JeuRgt]{Creation=false,Deno=12,Graines=false,Largeur=15pt,Hauteur=20pt,Negatif=false,Decimaux=false,Solution=false,ValeurMin=2,ValeurMax=50,Exposants=false}
\defKV[JeuRgt]{Graine=\setKV[JeuRgt]{Graines}}%
\defKV[JeuRgt]{Exposant=\setKV[JeuRgt]{Exposants}\setKV[JeuRgt]{Deno=1}}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCKakurasu.tex b/macros/latex/contrib/profcollege/latex/PfCKakurasu.tex
index 944d295e8f..d608320b3e 100644
--- a/macros/latex/contrib/profcollege/latex/PfCKakurasu.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCKakurasu.tex
@@ -1,6 +1,10 @@
%%%
% Kakurasu
%%%
+\def\filedateKakurasu{2024/08/04}%
+\def\fileversionKakurasu{0.1}%
+\message{-- \filedateKakurasu\space v\fileversionKakurasu}%
+%
\setKVdefault[Kakurasu]{Solution=false,Longueur=6,Largeur=6,Echelle=8mm,Graines=false,Trace=false}
\defKV[Kakurasu]{Graine=\setKV[Kakurasu]{Graines}}
\defKV[Kakurasu]{Traces=\setKV[Kakurasu]{Trace}}
diff --git a/macros/latex/contrib/profcollege/latex/PfCKakuro.tex b/macros/latex/contrib/profcollege/latex/PfCKakuro.tex
index adf0aba7d2..b480f44275 100644
--- a/macros/latex/contrib/profcollege/latex/PfCKakuro.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCKakuro.tex
@@ -1,6 +1,10 @@
%%%
% Kakuro
%%%
+\def\filedateKakuro{2024/08/04}%
+\def\fileversionKakuro{0.1}%
+\message{-- \filedateKakuro\space v\fileversionKakuro}%
+%
\setKVdefault[Kakuro]{CouleurCase=LightGray,TLargeur=5,THauteur=5,Solution=false,Largeur=2em,Aide=false,CouleurSolution=Black,Tailles=false}%,Taille=5
\defKV[Kakuro]{ListeNombres=\setKV[Kakuro]{Aide}}%
\defKV[Kakuro]{Taille=\setKV[Kakuro]{Tailles}}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCKenKen.tex b/macros/latex/contrib/profcollege/latex/PfCKenKen.tex
index e28efc379f..21a16dbc78 100644
--- a/macros/latex/contrib/profcollege/latex/PfCKenKen.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCKenKen.tex
@@ -1,6 +1,10 @@
%%%
% KenKen
%%%
+\def\filedateKenken{2024/08/04}%
+\def\fileversionKenken{0.1}%
+\message{-- \filedateKenken\space v\fileversionKenken}%
+%
\setKVdefault[ClesKK]{Solution=false,Taille=3,Largeur=2em,Aide=false}%
\defKV[ClesKK]{Nombre=\setKV[ClesKK]{Aide}}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCLabyrintheJeu.tex b/macros/latex/contrib/profcollege/latex/PfCLabyrintheJeu.tex
index 5922748104..f60cbce35e 100644
--- a/macros/latex/contrib/profcollege/latex/PfCLabyrintheJeu.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCLabyrintheJeu.tex
@@ -1,8 +1,12 @@
%%%
% Labyrinthe
%%%
-\setKVdefault[Labyrinthe]{Lignes=6,Colonnes=3,Longueur=4,Hauteur=2,Passages=false,EcartH=1,EcartV=1,CouleurF=gray!50,Texte=\color{black},SensImpose=false,Slop}
-
+\def\filedateLabyJeu{2024/08/04}%
+\def\fileversionLabyJeu{0.1}%
+\message{-- \filedateLabyJeu\space v\fileversionLabyJeu}%
+%
+\setKVdefault[Labyrinthe]{Lignes=6,Colonnes=3,Longueur=4,Hauteur=2,Passages=false,EcartH=1,EcartV=1,CouleurF=gray!50,Texte=\color{black},SensImpose=false,Slop}%
+%
\tikzset{FDirect/.style={-stealth}}
\tikzset{FIndirect/.style={stealth-}}
\tikzset{FBidirect/.style={stealth-stealth}}
diff --git a/macros/latex/contrib/profcollege/latex/PfCLabyrintheNombre.tex b/macros/latex/contrib/profcollege/latex/PfCLabyrintheNombre.tex
index b610849ea5..769617eb90 100644
--- a/macros/latex/contrib/profcollege/latex/PfCLabyrintheNombre.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCLabyrintheNombre.tex
@@ -1,6 +1,10 @@
%%%
% Labyrinthe Nombre
%%%
+\def\filedateLabyNombre{2024/08/04}%
+\def\fileversionLabyNombre{0.1}%
+\message{-- \filedateLabyNombre\space v\fileversionLabyNombre}%
+%
\setKVdefault[ClesLabyNb]{Multiple=5,XDepart=0,YDepart=0,Longueur=7,Largeur=4,Solution=false,Echelle=1,Angle=0,Couleur=red,Murs=false,Nom=Ex1,CouleurChemin=LightSteelBlue,DoubleOperation=false,Multiplication=false,Chemin=false,EntreeSortie=false,Entree="Nord",Sortie="Sud",SortieUnique=true,Graines=false,XArrivees=false,YArrivees=false,ArriveeX=5,ArriveeY=5}
\defKV[ClesLabyNb]{Graine=\setKV[ClesLabyNb]{Graines}}
\defKV[ClesLabyNb]{XArrivee=\setKV[ClesLabyNb]{XArrivees}\setKV[ClesLabyNb]{ArriveeX=#1}}
diff --git a/macros/latex/contrib/profcollege/latex/PfCLego.tex b/macros/latex/contrib/profcollege/latex/PfCLego.tex
index 901eb0a54b..80bc5ddc1a 100644
--- a/macros/latex/contrib/profcollege/latex/PfCLego.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCLego.tex
@@ -1,6 +1,10 @@
%%%
% Lego
%%%
+\def\filedateLego{2024/09/01}%
+\def\fileversionLego{0.1a}%
+\message{-- \filedateLego\space v\fileversionLego}%
+%
\setKVdefault[Lego]{Echelle=1,Couleur=LightSteelBlue,Unite=8,Diviseur=2,Perso=false,Plaque=false,Largeura=2,Largeurb=2,Unique=false}%
\defKV[Lego]{ListePerso=\setKV[Lego]{Perso}\xdef\PfCFooLegoListePerso{#1}}%
@@ -27,10 +31,14 @@
}{%
\xdef\PfCNbCouleurs{\fpeval{floor(\useKV[Lego]{Unite}/\useKV[Lego]{Diviseur})}}%
}%
- \ChoixCouleur{\PfCNbCouleurs}%
\ifboolKV[Lego]{Perso}{%
+ \setsepchar{,}\ignoreemptyitems%
+ \readlist*\ListeAvantChoixCouleurs{\PfCFooLegoListePerso}%
+ \ChoixCouleur{\ListeAvantChoixCouleurslen}%
+ \reademptyitems%
\BuildBarreLego{\FooCouleur}{\PfCFooLegoListePerso}%
}{%
+ \ChoixCouleur{\PfCNbCouleurs}%
\BuildBarreLego{\FooCouleur}{}%
}%
}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCMentalo.tex b/macros/latex/contrib/profcollege/latex/PfCMentalo.tex
index 84176c0d1f..0c024facd2 100644
--- a/macros/latex/contrib/profcollege/latex/PfCMentalo.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCMentalo.tex
@@ -1,6 +1,10 @@
%%%
% Mentalo
%%%
+\def\filedateMentalo{2024/08/04}%
+\def\fileversionMentalo{0.1}%
+\message{-- \filedateMentalo\space v\fileversionMentalo}%
+%
\NewDocumentCommand\PfCNumold{m}{%
\xintifboolexpr{#1<0}{(\num{#1})}{\num{#1}}%
}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCMidpoint.tex b/macros/latex/contrib/profcollege/latex/PfCMidpoint.tex
index 0813f66c44..4fea05dcbb 100644
--- a/macros/latex/contrib/profcollege/latex/PfCMidpoint.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCMidpoint.tex
@@ -1,6 +1,10 @@
%%%
% Midpoint
%%%
+\def\filedateMidpoint{2024/08/04}%
+\def\fileversionMidpoint{0.1}%
+\message{-- \filedateMidpoint\space v\fileversionMidpoint}%
+%
\setKVdefault[MidPoint]{Solution=false,Graines=false,Hard=false}
\defKV[MidPoint]{Graine=\setKV[MidPoint]{Graines}}
diff --git a/macros/latex/contrib/profcollege/latex/PfCModeleBarre.tex b/macros/latex/contrib/profcollege/latex/PfCModeleBarre.tex
index a05ae0075b..e894a9ebc6 100644
--- a/macros/latex/contrib/profcollege/latex/PfCModeleBarre.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCModeleBarre.tex
@@ -1,6 +1,10 @@
%%%
% Modele en barre
%%%
+\def\filedateModeleBarre{2024/08/04}%
+\def\fileversionModeleBarre{0.1}%
+\message{-- \filedateModeleBarre\space v\fileversionModeleBarre}%
+%
\setKVdefault[ClesModeleBarre]{Hauteur=0.5cm,Largeur=1cm,Separation={0},Homogene=false,Multiplicatif=false,MultiplicatifH=false,MultiplicatifB=false}%Separation pour conserver le lien avec les équations.
\defKV[ClesModeleBarre]{Longueur=\setKV[ClesModeleBarre]{Homogene}}%
\defKV[ClesModeleBarre]{AccoladesH=\setKV[ClesModeleBarre]{MultiplicatifH}\setKV[ClesModeleBarre]{Multiplicatif}}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCMosaique.tex b/macros/latex/contrib/profcollege/latex/PfCMosaique.tex
index 91936d597b..af964995ef 100644
--- a/macros/latex/contrib/profcollege/latex/PfCMosaique.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCMosaique.tex
@@ -1,6 +1,10 @@
%%%
% Mosaique
%%%
+\def\filedateMosaique{2024/08/04}%
+\def\fileversionMosaique{0.1}%
+\message{-- \filedateMosaique\space v\fileversionMosaique}%
+%
\setKVdefault[ClesMosaique]{Largeur=2,Hauteur=2,Solution=false,Type=1,Label,Echelle=1cm}
\newcommand\DessineMosaique[2][]{%
diff --git a/macros/latex/contrib/profcollege/latex/PfCMotsCodes.tex b/macros/latex/contrib/profcollege/latex/PfCMotsCodes.tex
index 0929b76197..088f417c35 100644
--- a/macros/latex/contrib/profcollege/latex/PfCMotsCodes.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCMotsCodes.tex
@@ -1,6 +1,10 @@
%%%
% Mots Cod\'es
%%%
+\def\filedateMotsCodes{2024/08/04}%
+\def\fileversionMotsCodes{0.1}%
+\message{-- \filedateMotsCodes\space v\fileversionMotsCodes}%
+%
\setKVdefault[MotsCodes]{LargeurT=1cm,Colonnes=5,Largeur=3cm,Solution=false,Math=false}%
\newcommand\MotsCodes[2][]{%
diff --git a/macros/latex/contrib/profcollege/latex/PfCMotsCroises.tex b/macros/latex/contrib/profcollege/latex/PfCMotsCroises.tex
index 4e6734dd7b..5310516799 100644
--- a/macros/latex/contrib/profcollege/latex/PfCMotsCroises.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCMotsCroises.tex
@@ -1,6 +1,10 @@
%%%
% Mots croisés
%%%
+\def\filedateMotsCroises{2024/08/04}%
+\def\fileversionMotsCroises{0.1}%
+\message{-- \filedateMotsCroises\space v\fileversionMotsCroises}%
+%
\setKVdefault[ClesCroises]{Lignes=6,Colonnes=8,Solution=false,Croises=false,Couleur=gray,Largeur=1em}
\newcounter{PfCLettreHorizontal}
diff --git a/macros/latex/contrib/profcollege/latex/PfCMotsEmpiles.tex b/macros/latex/contrib/profcollege/latex/PfCMotsEmpiles.tex
index 1c42d433a6..c8ec37bc5d 100644
--- a/macros/latex/contrib/profcollege/latex/PfCMotsEmpiles.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCMotsEmpiles.tex
@@ -1,6 +1,10 @@
%%%
% Mots empilés
%%%
+\def\filedateMotsEmpiles{2024/08/04}%
+\def\fileversionMotsEmpiles{0.1}%
+\message{-- \filedateMotsEmpiles\space v\fileversionMotsEmpiles}%
+%
\setKVdefault[ClesMotEmpile]{Colonne=4,Solution=false,Couleur=black}
\newcounter{CompteurMotEmpile}
diff --git a/macros/latex/contrib/profcollege/latex/PfCMulArt.tex b/macros/latex/contrib/profcollege/latex/PfCMulArt.tex
index 27156c00b7..9942541873 100644
--- a/macros/latex/contrib/profcollege/latex/PfCMulArt.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCMulArt.tex
@@ -1,6 +1,10 @@
%%%
% Mulart
%%%
+\def\filedateMulArt{2024/08/04}%
+\def\fileversionMulArt{0.1}%
+\message{-- \filedateMulArt\space v\fileversionMulArt}%
+%
\setKVdefault[TabMul]{Multiple=2,Cibles=false,Largeur=20pt,Couleurs=false,Graines=false,Operations=false,Enonce=false,SchemaEnonce=false}
\defKV[TabMul]{Couleur=\setKV[TabMul]{Couleurs}}
\defKV[TabMul]{Graine=\setKV[TabMul]{Graines}\PfCGraineAlea{#1}}
diff --git a/macros/latex/contrib/profcollege/latex/PfCMulJal.tex b/macros/latex/contrib/profcollege/latex/PfCMulJal.tex
index befce7a110..3f9ba37758 100644
--- a/macros/latex/contrib/profcollege/latex/PfCMulJal.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCMulJal.tex
@@ -1,6 +1,10 @@
%%%
% Multiplication par jalousie
%%%
+\def\filedateMulJal{2024/08/04}%
+\def\fileversionMulJal{0.1}%
+\message{-- \filedateMulJal\space v\fileversionMulJal}%
+%
\setKVdefault[MulJal]{Solution=false,CouleurTab=gray!15}%
\defKV[MulJal]{CouleurSolution=\setKV[MulJal]{Solution}}%
%
diff --git a/macros/latex/contrib/profcollege/latex/PfCMulJap.tex b/macros/latex/contrib/profcollege/latex/PfCMulJap.tex
index bdb59526f0..8fdf37c5b3 100644
--- a/macros/latex/contrib/profcollege/latex/PfCMulJap.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCMulJap.tex
@@ -1,6 +1,10 @@
%%%
% Multiplication Japonaise
%%%
+\def\filedateMulJap{2024/08/04}%
+\def\fileversionMulJap{0.1}%
+\message{-- \filedateMulJap\space v\fileversionMulJap}%
+%
\setKVdefault[MulJap]{Couleur=Orange,Bloc=false,DessinSeul=false}
\defKV[MulJap]{CouleurBloc=\setKV[MulJap]{Bloc}}
diff --git a/macros/latex/contrib/profcollege/latex/PfCMulPiecesPuzzle.tex b/macros/latex/contrib/profcollege/latex/PfCMulPiecesPuzzle.tex
index 7851f36ba7..aaf98ffe6a 100644
--- a/macros/latex/contrib/profcollege/latex/PfCMulPiecesPuzzle.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCMulPiecesPuzzle.tex
@@ -1,6 +1,10 @@
%%%
% Pièces de puzzle pour multiplication
%%%
+\def\filedateMulPiecesPuzzle{2024/08/04}%
+\def\fileversionMulPiecesPuzzle{0.1}%
+\message{-- \filedateMulPiecesPuzzle\space v\fileversionMulPiecesPuzzle}%
+%
%https://mirror.gutenberg-asso.fr/tex.loria.fr/prod-graph/metafun.pdf
\newtoks\toklistepuzzlea%
diff --git a/macros/latex/contrib/profcollege/latex/PfCNombreAstral.tex b/macros/latex/contrib/profcollege/latex/PfCNombreAstral.tex
index 428cd8d37c..df1903bc0e 100644
--- a/macros/latex/contrib/profcollege/latex/PfCNombreAstral.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCNombreAstral.tex
@@ -1,6 +1,10 @@
%%%
% Nombre Astral
%%%
+\def\filedateNombreAstral{2024/08/04}%
+\def\fileversionNombreAstral{0.1}%
+\message{-- \filedateNombreAstral\space v\fileversionNombreAstral}%
+%
\setKVdefault[NombreAstral]{Solution=false,Graines=false,Echelle=1,Couleur=LightSteelBlue,Horizontal=false}
\defKV[NombreAstral]{Graine=\setKV[NombreAstral]{Graines}}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCNonogramme.tex b/macros/latex/contrib/profcollege/latex/PfCNonogramme.tex
index 8adfbd5654..d63fd9c70f 100644
--- a/macros/latex/contrib/profcollege/latex/PfCNonogramme.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCNonogramme.tex
@@ -1,3 +1,10 @@
+%%%
+% Nonogramme
+%%%
+\def\filedateNonogramme{2024/08/04}%
+\def\fileversionNonogramme{0.1}%
+\message{-- \filedateNonogramme\space v\fileversionNonogramme}%
+%
\setKVdefault[Nono]{Largeur=10pt,Taille=5,Unite=1cm,Solution=false,Enonce=true}
\newtoks\toklistenonoa%
diff --git a/macros/latex/contrib/profcollege/latex/PfCNotionFonction.tex b/macros/latex/contrib/profcollege/latex/PfCNotionFonction.tex
index 4fe05bc4d0..265beb92f9 100644
--- a/macros/latex/contrib/profcollege/latex/PfCNotionFonction.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCNotionFonction.tex
@@ -1,6 +1,10 @@
%%%
% Fonction
%%%
+\def\filedateFonction{2024/08/04}%
+\def\fileversionFonction{0.1}%
+\message{-- \filedateFonction\space v\fileversionFonction}%
+%
\setKVdefault[ClesFonction]{Nom=f,Variable=x,Calcul=x,Tableau=false,Largeur=5mm,Ecriture=false,Definition=false,Points=false,Tangentes=false,PasX=1,PasY=1,UniteX=1,UniteY=1,Prolonge=false,Trace=false,Catmull=false,Splines=false,Lagrange=false,Epaisseur=1,Couleur=black,CouleurTrace=black,PointsCourbe=true,Codes=false,Origine={(0,0)},Vide=false}
\defKV[ClesFonction]{Traces=\setKV[ClesFonction]{Codes}}%
@@ -1249,6 +1253,17 @@ vardef Lagrange(expr valeur)(text t)=
%
RetiensCouleur(\useKV[TraceG]{CouleurTrace});
%
+ numeric styletrace[];
+ vardef RetiensStyle(text t)=
+ n:=0;
+ for p_=t:
+ n:=n+1;
+ styletrace[n]=p_;
+ endfor;
+ enddef;
+ %
+ RetiensStyle(\useKV[TraceG]{StyleTrace});
+ %
pair Origine,DecalageOrigine;
Origine=(xmin,ymin)+\useKV[TraceG]{Origine};
DecalageOrigine=\useKV[TraceG]{Origine};
@@ -1305,6 +1320,19 @@ vardef Lagrange(expr valeur)(text t)=
n:=0;
for p_=texto:
n:=n+1;
+ if unknown styletrace[n]:
+ drawoptions();
+ else:
+ if styletrace[n]=1:
+ drawoptions(dashed evenly);
+ elseif styletrace[n]=2:
+ drawoptions(dashed withdots);
+ elseif styletrace[n]=3:
+ drawoptions(dashed dashpattern(on6 off3 on1.5 off3));
+ else:
+ drawoptions();
+ fi;
+ fi;
draw courbe[n](borneinf[n],bornesup[n],100)(scantokens p_) withpen (pencircle scaled Epaisseur) withcolor if unknown colortrace[n]:black else: colortrace[n] fi;
endfor;
enddef;
@@ -1419,6 +1447,9 @@ vardef Lagrange(expr valeur)(text t)=
trace u*(xmin-grillex,k)--u*(xmax+grillex,k);
endfor;
drawoptions();
+ else:
+ grillex:=0;
+ grilley:=0;
fi;
if Graduations:
for k=gradx step gradx until (((xmax-xmin)-xpart(DecalageOrigine))*pasx):
@@ -1470,11 +1501,12 @@ vardef Lagrange(expr valeur)(text t)=
else:
DessineCourbes(#1);
NommeCourbes(#2);
- if Grille:
clip currentpicture to polygone(u*(xmin-grillex,ymin-grilley),u*(xmax+grillex,ymin-grilley),u*(xmax+grillex,ymax+grilley),u*(xmin-grillex,ymax+grilley));
+ if Grille:
+ %clip currentpicture to polygone(u*(xmin-grillex,ymin-grilley),u*(xmax+grillex,ymin-grilley),u*(xmax+grillex,ymax+grilley),u*(xmin-grillex,ymax+grilley));
draw polygone(u*(xmin-grillex,ymin-grilley),u*(xmax+grillex,ymin-grilley),u*(xmax+grillex,ymax+grilley),u*(xmin-grillex,ymax+grilley)) withcolor 0.75white;
else:
- clip currentpicture to polygone(u*(xmin,ymin),u*(xmax,ymin),u*(xmax,ymax),u*(xmin,ymax));
+ %clip currentpicture to polygone(u*(xmin,ymin),u*(xmax,ymin),u*(xmax,ymax),u*(xmin,ymax));
fi;
%
if Code:
diff --git a/macros/latex/contrib/profcollege/latex/PfCNumberHive.tex b/macros/latex/contrib/profcollege/latex/PfCNumberHive.tex
index ee37a5b2f1..96019b3d83 100644
--- a/macros/latex/contrib/profcollege/latex/PfCNumberHive.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCNumberHive.tex
@@ -1,6 +1,10 @@
%%%
% Number Hive
%%%
+\def\filedateNumberHive{2024/08/04}%
+\def\fileversionNumberHive{0.1}%
+\message{-- \filedateNumberHive\space v\fileversionNumberHive}%
+%
\setKVdefault[NumberHive]{Negatif=false,Produit=false,Niveau=8,Double=false,ListeCouleurs={Cornsilk,LightSteelBlue},CouleurCase=false,Jeton=false,Graines=false,Aide=false,UniteHexa=6mm}%
\defKV[NumberHive]{Cases=\setKV[NumberHive]{CouleurCase}}%
\defKV[NumberHive]{Jetons=\setKV[NumberHive]{Jeton}}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCNumerationsAnciennes.tex b/macros/latex/contrib/profcollege/latex/PfCNumerationsAnciennes.tex
index a864165fba..b9560bb504 100644
--- a/macros/latex/contrib/profcollege/latex/PfCNumerationsAnciennes.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCNumerationsAnciennes.tex
@@ -1,3 +1,10 @@
+%%%
+% Numerations anciennes
+%%%
+\def\filedateNumAnciennes{2024/08/04}%
+\def\fileversionNumAnciennes{0.1}%
+\message{-- \filedateNumAnciennes\space v\fileversionNumAnciennes}%
+%
\setKVdefault[NumerationAncienne]{Couleur=black}%
\NewDocumentCommand\Chinoise{om}{%
diff --git a/macros/latex/contrib/profcollege/latex/PfCOperationsTrou.tex b/macros/latex/contrib/profcollege/latex/PfCOperationsTrou.tex
index 347ca499bc..ca9f72976e 100644
--- a/macros/latex/contrib/profcollege/latex/PfCOperationsTrou.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCOperationsTrou.tex
@@ -1,11 +1,11 @@
%%%
% Op\'erations pos\'es à trou
%%%
-%% D'après https://tex.stackexchange.com/questions/277246/drawing-a-circle-around-the-numbers-in-xlop-package
-
-%\begin{document}%
+\def\filedateOpTrou{2024/08/04}%
+\def\fileversionOpTrou{0.1}%
+\message{-- \filedateOpTrou\space v\fileversionOpTrou}%
%
-%\end{document}
+%% D'après https://tex.stackexchange.com/questions/277246/drawing-a-circle-around-the-numbers-in-xlop-package
\newcommand\PfCchiffre[2]{\tikz[remember picture] \node[inner sep=0pt](#1){#2};}
diff --git a/macros/latex/contrib/profcollege/latex/PfCPapiers.tex b/macros/latex/contrib/profcollege/latex/PfCPapiers.tex
index 0bb41363ec..3929600a6e 100644
--- a/macros/latex/contrib/profcollege/latex/PfCPapiers.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCPapiers.tex
@@ -1,6 +1,10 @@
%%%
% Papiers
%%%
+\def\filedatePapiers{2024/08/04}%
+\def\fileversionPapiers{0.1}%
+\message{-- \filedatePapiers\space v\fileversionPapiers}%
+%
\setKVdefault[Papiers]{Cinq=true,Seyes=false,Echelle=8,Isometrique=false,IsometriquePointe=false,Millimetre=false,Triangle=false,Largeur=5,Hauteur=4,Couleur=black,Grille=-1,GrillePointe=-1,PageEntiere=false,ZoneTexte=false,Baseline=false,CodeAfter=false}%
\defKV[Papiers]{Traces=\setKV[Papiers]{CodeAfter}}
diff --git a/macros/latex/contrib/profcollege/latex/PfCPatronPaves.tex b/macros/latex/contrib/profcollege/latex/PfCPatronPaves.tex
index 6628d3d505..904f272411 100644
--- a/macros/latex/contrib/profcollege/latex/PfCPatronPaves.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCPatronPaves.tex
@@ -1,6 +1,10 @@
%%%
% Patrons de pavés droits et cubes
%%%
+\def\filedatePatronspaves{2024/08/04}%
+\def\fileversionPatronspaves{0.1}%
+\message{-- \filedatePatronspaves\space v\fileversionPatronspaves}%
+%
\setKVdefault[ClesPatron]{Cube,Arete=1cm,ListeCouleurs={white},Pave=false,Largeur=2cm,Hauteur=1.5cm,Profondeur=1cm,Codes=false,AColorier=false}%
%EcartColorier est en nombre de parts pour le cube, en mm pour le pavé.
\defKV[ClesPatron]{EcartColorier=\setKV[ClesPatron]{AColorier}}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCPattern.tex b/macros/latex/contrib/profcollege/latex/PfCPattern.tex
index 29fa45c08f..fb6f0bf9f3 100644
--- a/macros/latex/contrib/profcollege/latex/PfCPattern.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCPattern.tex
@@ -1,6 +1,10 @@
%%%
% Visual Pattern
%%%
+\def\filedatePattern{2024/08/04}%
+\def\fileversionPattern{0.1}%
+\message{-- \filedatePattern\space v\fileversionPattern}%
+%
\setKVdefault[Pattern]{Type=1,Etape=3}
\NewDocumentCommand\VisualPattern{o}{%
diff --git a/macros/latex/contrib/profcollege/latex/PfCPavage.tex b/macros/latex/contrib/profcollege/latex/PfCPavage.tex
index 2d25df1b99..4dabb04411 100644
--- a/macros/latex/contrib/profcollege/latex/PfCPavage.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCPavage.tex
@@ -1,6 +1,10 @@
%%%
% Pavage
%%%
+\def\filedatePavage{2024/08/04}%
+\def\fileversionPavage{0.1}%
+\message{-- \filedatePavage\space v\fileversionPavage}%
+%
\setKVdefault[Pavage]{%
Before=false,
Niveau=3,
diff --git a/macros/latex/contrib/profcollege/latex/PfCPixelArt.tex b/macros/latex/contrib/profcollege/latex/PfCPixelArt.tex
index df380d48ee..503e2e1182 100644
--- a/macros/latex/contrib/profcollege/latex/PfCPixelArt.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCPixelArt.tex
@@ -1,11 +1,16 @@
%%%
% PixelArt
%%%
+\def\filedatePixelArt{2024/08/04}%
+\def\fileversionPixelArt{0.1}%
+\message{-- \filedatePixelArt\space v\fileversionPixelArt}%
+%
\newtoks\toklistePANombre%
\def\UpdatetoksPANombre#1\nil{\addtotok\toklistePANombre{"#1",}}%
-\setKVdefault[ClesPixelArt]{Largeur=29,Hauteur=29,Solution=false,Lettres=ABCDEFGHIJK,Nombres=false,ListeCouleurs={Orange,Red,LightGray,Maroon,Purple,black,black,Plum,Orange,White,White},Unite=5mm,Geant=false,HauteurD=1,LargeurD=1,Complet=false,Numero=1,Separations=false}%
+\setKVdefault[ClesPixelArt]{Largeur=29,Hauteur=29,Solution=false,Lettres=ABCDEFGHIJK,Nombres=false,ListeCouleurs={Orange,Red,LightGray,Maroon,Purple,black,black,Plum,Orange,White,White},Unite=5mm,Geant=false,HauteurD=1,LargeurD=1,Complet=false,Numero=1,Separations=false,Deforme=false,Coefx=0.25,Coefy=0.25,Borne=false,Graines=false}%
\defKV[ClesPixelArt]{ListeNombres=\setKV[ClesPixelArt]{Nombres}}%
+\defKV[ClesPixelArt]{Graine=\setKV[ClesPixelArt]{Graines}}%
\NewDocumentCommand\PixelArt{o m}{%
\toklistePANombre{}%
@@ -34,11 +39,15 @@
\BuildPixelArtGeant{#2}{\useKV[ClesPixelArt]{Lettres}}{\ListeAvantCouleurs}{\the\toklistePANombre}{\the\intquotient}{\the\remainder}%
}%
}{%
- \BuildPixelArt{#2}{\useKV[ClesPixelArt]{Lettres}}{\ListeAvantCouleurs}{\the\toklistePANombre}%
+ \ifboolKV[ClesPixelArt]{Deforme}{%
+ \BuildPixelArtDeforme{#2}{\useKV[ClesPixelArt]{Lettres}}{\ListeAvantCouleurs}{\the\toklistePANombre}%
+ }{%
+ \BuildPixelArt{#2}{\useKV[ClesPixelArt]{Lettres}}{\ListeAvantCouleurs}{\the\toklistePANombre}%
+ }%
}%
}%
-\NewDocumentCommand\BuildPixelArt{m m m m}{%
+\NewDocumentCommand\BuildPixelArtDeforme{m m m m}{%
\ifluatex
\mplibforcehmode
\begin{mplibcode}
@@ -48,6 +57,39 @@
hauteurd:=\useKV[ClesPixelArt]{HauteurD};
Unite:=\useKV[ClesPixelArt]{Unite};
+ %Deformation
+ Coefx=\useKV[ClesPixelArt]{Coefx};
+ Coefy=\useKV[ClesPixelArt]{Coefy};
+ boolean Borne,Graines;
+ Borne=\useKV[ClesPixelArt]{Borne};
+ Graines=\useKV[ClesPixelArt]{Graines};
+ if Graines:
+ randomseed:=\useKV[ClesPixelArt]{Graine};
+ fi;
+ %
+ pair M[][];
+ for l=1 upto hauteur+1:
+ for c=1 upto largeur+1:
+ if Borne:
+ if (l=1) or (l=hauteur+1):
+ M[l][c]=Unite*(c,l)+Unite*(-Coefx+uniformdeviate(2*Coefx),0);
+ if (c=1) or (c=largeur+1):
+ M[l][c]:=Unite*(c,l);
+ fi;
+ else:
+ if (c=1) or (c=largeur+1):
+ M[l][c]=Unite*(c,l-1)+Unite*(0,uniformdeviate(Coefy));
+ else:
+ M[l][c]=Unite*(c,l)+Unite*(-Coefx+uniformdeviate(2*Coefx),-Coefy+uniformdeviate(2*Coefy));
+ fi;
+ fi;
+ else:
+ M[l][c]=Unite*(c,l)+Unite*(-Coefx+uniformdeviate(2*Coefx),-Coefy+uniformdeviate(2*Coefy));
+ fi;
+ %dotlabel("",M[l][c]);
+ endfor;
+ endfor;
+
boolean Solution,Nombres,Separations;
Solution:=\useKV[ClesPixelArt]{Solution};
Nombres:=\useKV[ClesPixelArt]{Nombres};
@@ -56,7 +98,7 @@
string BaseLettres;
BaseLettres=str #2;
numeric EchelleScale;
- EchelleScale=Unite/5mm;
+ EchelleScale=Unite/10mm;
color ColorEntier[],ColFond;
n:=0;
@@ -86,11 +128,107 @@
if Nombres:
for m=0 upto (length BaseLettres-1):
if (substring(p,p+1) of p_)=substring(m,m+1) of BaseLettres:
- label(TEX(RetiensNombres[m+1]) scaled EchelleScale,((l-1)*Unite,(h-1)*Unite));
+ label(TEX(RetiensNombres[m+1]) scaled EchelleScale,iso(M[h+1][l],M[h][l],M[h][l+1],M[h+1][l+1]));
fi;
endfor;
else:
- label(TEX(substring(p,p+1) of p_) scaled EchelleScale,((l-1)*Unite,(h-1)*Unite));
+ label(TEX(substring(p,p+1) of p_) scaled EchelleScale,iso(M[h+1][l],M[h][l],M[h][l+1],M[h+1][l+1]));
+ fi;
+ if Solution:
+ for m=0 upto (length BaseLettres-1):
+ if (substring(p,p+1) of p_)=substring(m,m+1) of BaseLettres:
+ ColFond:=ColorEntier[m+1];
+ fi;
+ endfor;
+ if unknown ColFond: else: fill polygone(M[h+1][l],M[h][l],M[h][l+1],M[h+1][l+1]) withcolor ColFond fi;
+ fi;
+ trace polygone(M[h+1][l],M[h][l],M[h][l+1],M[h+1][l+1]);
+ fi;
+ endfor;
+ endfor;
+ closefrom nomfichier;
+ enddef;
+
+ Lecturecsv("#1");
+% if Separations:
+% drawoptions(withcolor Purple);
+% for k=hauteur step -hauteurd until 0:
+% draw (Unite*(-1,k-0.5)--Unite*(largeur,k-0.5)) withpen pencircle scaled 1.25;
+% endfor;
+% for k=0 step largeurd until largeur:
+% draw (Unite*(k-0.5,hauteur+0.125)--Unite*(k-0.5,-0.875)) withpen pencircle scaled 1.25;
+% endfor;
+% drawoptions();
+% fi;
+ \end{mplibcode}
+\fi
+}%
+
+\NewDocumentCommand\BuildPixelArt{m m m m}{%
+ \ifluatex
+ \mplibforcehmode
+ \begin{mplibcode}
+ largeur:=\useKV[ClesPixelArt]{Largeur};
+ hauteur:=\useKV[ClesPixelArt]{Hauteur};
+ largeurd:=\useKV[ClesPixelArt]{LargeurD};
+ hauteurd:=\useKV[ClesPixelArt]{HauteurD};
+ Unite:=\useKV[ClesPixelArt]{Unite};
+
+ boolean Solution,Nombres,Separations;
+ Solution:=\useKV[ClesPixelArt]{Solution};
+ Nombres:=\useKV[ClesPixelArt]{Nombres};
+ Separations:=\useKV[ClesPixelArt]{Separations};
+
+ string BaseLettres;
+ BaseLettres=str #2;
+ numeric EchelleScale;
+ EchelleScale=Unite/5mm;
+
+ color ColorEntier[],ColFond;
+ n:=0;
+ for p_=#3:
+ n:=n+1;
+ ColorEntier[n]:=p_;
+ endfor;
+
+ string RetiensNombres[];
+ if Nombres:
+ k:=0;
+ for p_=#4:
+ k:=k+1;
+ RetiensNombres[k]=p_;
+ endfor;
+ else:
+ m:=0;
+ for p_=0 upto n-1:
+ m:=m+1;
+ RetiensNombres[m]=substring(p_,p_+1) of BaseLettres;
+ endfor;
+ fi;
+
+ picture Etiquette[];
+ for k=1 upto n:
+ Etiquette[k]=image(
+ label(TEX(RetiensNombres[k]) scaled EchelleScale,(0,0));
+ );
+ endfor;
+
+ vardef Lecturecsv(expr nomfichier)=
+ for h=hauteur downto 1:
+ string p_;
+ p_=readfrom nomfichier;
+ l:=0;
+ for p=0 step 2 until 2*largeur-2:
+ l:=l+1;
+ if Solution=false:
+ if (substring(p,p+1) of p_)="-":
+ else:
+ for m=0 upto (length BaseLettres-1):
+ if (substring(p,p+1) of p_)=substring(m,m+1) of BaseLettres:
+ draw Etiquette[m+1] shifted((l-1)*Unite,(h-1)*Unite);
+ fi;
+ endfor;
+ fi;
fi;
if Solution:
for m=0 upto (length BaseLettres-1):
@@ -101,7 +239,6 @@
if unknown ColFond: else: fill (unitsquare scaled Unite) shifted ((l-1)*Unite-0.5*Unite,(h-1)*Unite-0.5*Unite) withcolor ColFond fi;
fi;
trace (unitsquare scaled Unite) shifted ((l-1)*Unite-0.5*Unite,(h-1)*Unite-0.5*Unite);
- fi;
endfor;
endfor;
closefrom nomfichier;
@@ -120,10 +257,12 @@
fi;
\end{mplibcode}
\else
- \begin{mpost}[mpsettings={largeur:=\useKV[ClesPixelArt]{Largeur}; hauteur:=\useKV[ClesPixelArt]{Hauteur}; Unite:=\useKV[ClesPixelArt]{Unite}; boolean Solution,Nombres; Solution:=\useKV[ClesPixelArt]{Solution}; Nombres:=\useKV[ClesPixelArt]{Nombres};}]
+ \begin{mpost}[mpsettings={largeur:=\useKV[ClesPixelArt]{Largeur}; hauteur:=\useKV[ClesPixelArt]{Hauteur}; Unite:=\useKV[ClesPixelArt]{Unite}; boolean Solution,Nombres,Separations; Solution:=\useKV[ClesPixelArt]{Solution}; Nombres:=\useKV[ClesPixelArt]{Nombres}; Separations:=\useKV[ClesPixelArt]{Separations};}]
string BaseLettres;
BaseLettres=str #2;
-
+ numeric EchelleScale;
+ EchelleScale=Unite/5mm;
+
color ColorEntier[],ColFond;
n:=0;
for p_=#3:
@@ -133,13 +272,26 @@
string RetiensNombres[];
if Nombres:
- n:=0;
+ k:=0;
for p_=#4:
- n:=n+1;
- RetiensNombres[n]=p_;
+ k:=k+1;
+ RetiensNombres[k]=p_;
+ endfor;
+ else:
+ m:=0;
+ for p_=0 upto n-1:
+ m:=m+1;
+ RetiensNombres[m]=substring(p_,p_+1) of BaseLettres;
endfor;
fi;
-
+
+ picture Etiquette[];
+ for k=1 upto n:
+ Etiquette[k]=image(
+ label(LATEX(RetiensNombres[k]) scaled EchelleScale,(0,0));
+ );
+ endfor;
+
vardef Lecturecsv(expr nomfichier)=
for h=hauteur downto 1:
string p_;
@@ -147,16 +299,15 @@
l:=0;
for p=0 step 2 until 2*largeur-2:
l:=l+1;
+ if Solution=false:
if (substring(p,p+1) of p_)="-":
else:
- if Nombres:
for m=0 upto (length BaseLettres-1):
if (substring(p,p+1) of p_)=substring(m,m+1) of BaseLettres:
- label(LATEX(RetiensNombres[m+1]),((l-1)*Unite,(h-1)*Unite));
+ draw Etiquette[m+1] shifted((l-1)*Unite,(h-1)*Unite);
fi;
endfor;
- else:
- label(LATEX(substring(p,p+1) of p_),((l-1)*Unite,(h-1)*Unite));
+ fi;
fi;
if Solution:
for m=0 upto (length BaseLettres-1):
@@ -167,21 +318,30 @@
if unknown ColFond: else: fill (unitsquare scaled Unite) shifted ((l-1)*Unite-0.5*Unite,(h-1)*Unite-0.5*Unite) withcolor ColFond fi;
fi;
trace (unitsquare scaled Unite) shifted ((l-1)*Unite-0.5*Unite,(h-1)*Unite-0.5*Unite);
- fi;
endfor;
endfor;
closefrom nomfichier;
enddef;
Lecturecsv("#1");
+ if Separations:
+ drawoptions(withcolor Purple);
+ for k=hauteur step -hauteurd until 0:
+ draw (Unite*(-1,k-0.5)--Unite*(largeur,k-0.5)) withpen pencircle scaled 1.25;
+ endfor;
+ for k=0 step largeurd until largeur:
+ draw (Unite*(k-0.5,hauteur+0.125)--Unite*(k-0.5,-0.875)) withpen pencircle scaled 1.25;
+ endfor;
+ drawoptions();
+ fi;
\end{mpost}
\fi
-}
+}%
\NewDocumentCommand\BuildPixelArtGeant{m m m m m m}{%
- \ifluatex
- \mplibforcehmode
- \begin{mplibcode}
+ \ifluatex%
+ \mplibforcehmode%
+ \begin{mplibcode}%
largeur:=\useKV[ClesPixelArt]{Largeur};
hauteur:=\useKV[ClesPixelArt]{Hauteur};
largeurd:=\useKV[ClesPixelArt]{LargeurD};
@@ -253,5 +413,5 @@
Lecturecsv("#1");
\end{mplibcode}
- \fi
-} \ No newline at end of file
+ \fi%
+}% \ No newline at end of file
diff --git a/macros/latex/contrib/profcollege/latex/PfCPourcentage.tex b/macros/latex/contrib/profcollege/latex/PfCPourcentage.tex
index 1f6f18b19b..03177d14dc 100644
--- a/macros/latex/contrib/profcollege/latex/PfCPourcentage.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCPourcentage.tex
@@ -1,6 +1,10 @@
%%%
% Application : pourcentage
%%%
+\def\filedatePourcentage{2024/08/04}%
+\def\fileversionPourcentage{0.1}%
+\message{-- \filedatePourcentage\space v\fileversionPourcentage}%
+%
\setKVdefault[ClesPourcentage]{Appliquer,Calculer=false,Augmenter=false,Reduire=false,Fractionnaire=false,Decimal,Formule=false,Concret=false,GrandeurA=Grandeur A,GrandeurB=Total,Largeur=1cm,MotReduction=diminution,AideTableau=false,ColorFill=white,CouleurTab=gray!15}
\defKV[ClesPourcentage]{Unite=\setKV[ClesPourcentage]{Concret}}
\newcommand\Pourcentage[3][]{%
diff --git a/macros/latex/contrib/profcollege/latex/PfCProbaFrequence.tex b/macros/latex/contrib/profcollege/latex/PfCProbaFrequence.tex
index dc6a39b7a5..e3a5f04b62 100644
--- a/macros/latex/contrib/profcollege/latex/PfCProbaFrequence.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCProbaFrequence.tex
@@ -1,6 +1,10 @@
%%%
% Probabilité et fréquence
%%%
+\def\filedateProbaFrequence{2024/08/04}%
+\def\fileversionProbaFrequence{0.1}%
+\message{-- \filedateProbaFrequence\space v\fileversionProbaFrequence}%
+%
\setKVdefault[PfCFrequence]{Couleur=false,Lancers=1,Legende=false}%
\defKV[PfCFrequence]{ListeCouleurs=\setKV[PfCFrequence]{Couleur}}%
\defKV[PfCFrequence]{Legendes=\setKV[PfCFrequence]{Legende}\setsepchar{,}\reademptyitems\readlist*\PfMListeLegendes{#1}\reademptyitems}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCProbabilites.tex b/macros/latex/contrib/profcollege/latex/PfCProbabilites.tex
index 7ed834a61e..73bafa9ba2 100644
--- a/macros/latex/contrib/profcollege/latex/PfCProbabilites.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCProbabilites.tex
@@ -1,7 +1,11 @@
%%%
% Proba
%%%
-\setKVdefault[ClesProba]{Echelle=false,Arbre=false,Branche=2,Angle=60,Rayon=0.25,LongueurEchelle=5,Affichage=0,Grille=1,Incline}
+\def\filedateProba{2024/08/15}%
+\def\fileversionProba{0.1a}%
+\message{-- \filedateProba\space v\fileversionProba}%
+%
+\setKVdefault[ClesProba]{Echelle=false,Arbre=false,Branche=2,Angle=60,Rayon=0.25,LongueurEchelle=5,Affichage=0,Grille=1,Incline,SansProba=false}
\def\Updatetoksproba#1/#2\nil{\addtotok\toklistepointproba{"#1","\footnotesize #2",}}
\def\Updatetoksprobapdf#1/#2\nil{\addtotok\toklistepointproba{"#1","\noexpand\footnotesize #2",}}
@@ -35,6 +39,8 @@
\ifluatex
\mplibforcehmode
\begin{mplibcode}
+ boolean SansProba;
+ SansProba=\useKV[ClesProba]{SansProba};
pair A,B,C[],D[];%les noeuds de l'arbre
%Figure(-10u,-10u,10u,10u);
A=u*(1,1);
@@ -58,8 +64,10 @@
fi;
marque_s:=marque_s*2;
labeloffset:=labeloffset*3;
+ if SansProba=false:
label.bot(btex 0 etex,A);
label.bot(btex 1 etex,B);
+ fi;
labeloffset:=labeloffset/3;
n:=1;%compter les informations
k:=1;% compter les informations noeud pour les placer
@@ -93,7 +101,7 @@
toto(#2);
\end{mplibcode}
\else
- \begin{mpost}[mpsettings={input PfCGeometrie;}]
+ \begin{mpost}[mpsettings={input PfCGeometrie;boolean SansProba;SansProba=\useKV[ClesProba]{SansProba};}]
pair A,B,C[],D[];%les noeuds de l'arbre
Figure(-10u,-10u,10u,10u);
A=u*(1,1);
@@ -117,8 +125,10 @@
fi;
marque_s:=marque_s*2;
labeloffset:=labeloffset*3;
+ if SansProba=false:
label.bot(btex 0 etex,A);
label.bot(btex 1 etex,B);
+ fi;
labeloffset:=labeloffset/3;
n:=1;%compter les informations
k:=1;% compter les informations noeud pour les placer
diff --git a/macros/latex/contrib/profcollege/latex/PfCProgrammeCalcul.tex b/macros/latex/contrib/profcollege/latex/PfCProgrammeCalcul.tex
index f1bdc0307f..871f80d650 100644
--- a/macros/latex/contrib/profcollege/latex/PfCProgrammeCalcul.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCProgrammeCalcul.tex
@@ -1,6 +1,10 @@
%%%%
% Prog de calculs "simples"
%%%%
+\def\filedateProgCalcul{2024/08/04}%
+\def\fileversionProgCalcul{0.1}%
+\message{-- \filedateProgCalcul\space v\fileversionProgCalcul}%
+%
\setKVdefault[ClesProg]{%
Ecart=2em,%
Direct,%
diff --git a/macros/latex/contrib/profcollege/latex/PfCPropor.tex b/macros/latex/contrib/profcollege/latex/PfCPropor.tex
index 1e6526f41b..1c8aba3324 100644
--- a/macros/latex/contrib/profcollege/latex/PfCPropor.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCPropor.tex
@@ -1,6 +1,10 @@
%%%
% Proportionnalit\'e
%%%
+\def\filedatePropor{2024/09/04}%
+\def\fileversionPropor{0.1a}%
+\message{-- \filedatePropor\space v\fileversionPropor}%
+%
\setKVdefault[ClesPropor]{GrandeurA=Grandeur A,GrandeurB=Grandeur B,Largeur=1cm,Math=false,Stretch=1,ColorFill=white,CouleurTab=gray!15,Vertical=false,Simple=false,Condense=false}%
\tikzstyle{FlechePropor}=[-stealth]
@@ -201,49 +205,51 @@
\NewDocumentCommand\FlechePCG{mm}{%
\begin{tikzpicture}[remember picture,overlay,node distance=\getstrut\ht]%
- \node[inner sep=0pt] (MilieuH-#1) at ($(ProporG-#1)!0.25!(ProporD-#1)$) {};%
- \node[inner sep=0pt] (MilieuH-#2) at ($(ProporG-#2)!0.25!(ProporD-#2)$) {};%
- \node[inner sep=0pt] (MilieuB-#1) at ($(ProporG-#1)!0.75!(ProporD-#1)$) {};%
- \node[inner sep=0pt] (MilieuB-#2) at ($(ProporG-#2)!0.75!(ProporD-#2)$) {};%
+ \node[inner sep=0pt] (MilieuH-#1) at ($(ProporH-#1)!\PfCCoeffH!(ProporB-#1)$) {};%
+ \node[inner sep=0pt] (MilieuH-#2) at ($(ProporH-#2)!\PfCCoeffH!(ProporB-#2)$) {};%
+ \node[inner sep=0pt] (MilieuB-#1) at ($(ProporH-#1)!\PfCCoeffB!(ProporB-#1)$) {};%
+ \node[inner sep=0pt] (MilieuB-#2) at ($(ProporH-#2)!\PfCCoeffB!(ProporB-#2)$) {};%
\xintifboolexpr{#1<#2}{%
\coordinate[right of=MilieuH-#1] (aux1);%
- \coordinate[right of=MilieuH-#2] (aux2);%
- \coordinate[left of=MilieuB-#1] (aux3);%
+ \coordinate[left of=MilieuH-#2] (aux2);%
+ \coordinate[right of=MilieuB-#1] (aux3);%
\coordinate[left of=MilieuB-#2] (aux4);%
- \draw[out=30,in=-30,gray] (aux3) to (aux4);
+ \draw[FlechePropor,gray] (aux4) -- (aux1);
+ \draw[out=-30,in=30,gray] (aux2) to (aux4);
}{%
- \coordinate[right of=MilieuH-#1] (aux1);%
+ \coordinate[left of=MilieuH-#1] (aux1);%
\coordinate[right of=MilieuH-#2] (aux2);%
\coordinate[left of=MilieuB-#1] (aux3);%
- \coordinate[left of=MilieuB-#2] (aux4);%
- \draw[out=-30,in=30,gray] (aux3) to (aux4);
+ \coordinate[right of=MilieuB-#2] (aux4);%
+ \draw[FlechePropor,gray] (aux1) -- (aux4);
+ \draw[out=30,in=-30,gray] (aux3) to (aux1);
}%
\draw[gray] (aux2) -- (aux3);
- \draw[FlechePropor,gray] (aux4) -- (aux1);
\end{tikzpicture}%
}%
\NewDocumentCommand\FlechePCD{mm}{%
\begin{tikzpicture}[remember picture,overlay,node distance=\getstrut\ht]%
- \node[inner sep=0pt] (MilieuH-#1) at ($(ProporG-#1)!0.25!(ProporD-#1)$) {};%
- \node[inner sep=0pt] (MilieuH-#2) at ($(ProporG-#2)!0.25!(ProporD-#2)$) {};%
- \node[inner sep=0pt] (MilieuB-#1) at ($(ProporG-#1)!0.75!(ProporD-#1)$) {};%
- \node[inner sep=0pt] (MilieuB-#2) at ($(ProporG-#2)!0.75!(ProporD-#2)$) {};%
+ \node[inner sep=0pt] (MilieuH-#1) at ($(ProporH-#1)!\PfCCoeffH!(ProporB-#1)$) {};%
+ \node[inner sep=0pt] (MilieuH-#2) at ($(ProporH-#2)!\PfCCoeffH!(ProporB-#2)$) {};%
+ \node[inner sep=0pt] (MilieuB-#1) at ($(ProporH-#1)!\PfCCoeffB!(ProporB-#1)$) {};%
+ \node[inner sep=0pt] (MilieuB-#2) at ($(ProporH-#2)!\PfCCoeffB!(ProporB-#2)$) {};%
\xintifboolexpr{#1<#2}{%
\coordinate[right of=MilieuH-#1] (aux1);%
- \coordinate[right of=MilieuH-#2] (aux2);%
- \coordinate[left of=MilieuB-#1] (aux3);%
+ \coordinate[left of=MilieuH-#2] (aux2);%
+ \coordinate[right of=MilieuB-#1] (aux3);%
\coordinate[left of=MilieuB-#2] (aux4);%
- \draw[out=150,in=-150,gray] (aux1) to (aux2);
+ \draw[FlechePropor,gray] (aux3) -- (aux2);
+ \draw[out=-150,in=150,gray] (aux1) to (aux3);
}{%
- \coordinate[right of=MilieuH-#1] (aux1);%
+ \coordinate[left of=MilieuH-#1] (aux1);%
\coordinate[right of=MilieuH-#2] (aux2);%
\coordinate[left of=MilieuB-#1] (aux3);%
- \coordinate[left of=MilieuB-#2] (aux4);%
- \draw[out=-150,in=150,gray] (aux1) to (aux2);
+ \coordinate[right of=MilieuB-#2] (aux4);%
+ \draw[FlechePropor,gray] (aux2) -- (aux3);
+ \draw[out=-150,in=150,gray] (aux2) to (aux4);
}%
\draw[gray] (aux4) -- (aux1);
- \draw[FlechePropor,gray] (aux2) -- (aux3);
\end{tikzpicture}%
}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCProprietesDroites.tex b/macros/latex/contrib/profcollege/latex/PfCProprietesDroites.tex
index ad9f1b0edb..fc74fea9c5 100644
--- a/macros/latex/contrib/profcollege/latex/PfCProprietesDroites.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCProprietesDroites.tex
@@ -1,6 +1,10 @@
%%%
% Ppt\'es des droites (6eme)
%%%
+\def\filedatePptesDroites{2024/08/04}%
+\def\fileversionPptesDroites{0.1}%
+\message{-- \filedatePptesDroites\space v\fileversionPptesDroites}%
+%
\setKVdefault[ClesDroites]{Brouillon=false,CitePropriete=false,Num=1,Figure=false,Remediation=false,FigureSeule=false}
\newcommand\Redaction[4][]{%
diff --git a/macros/latex/contrib/profcollege/latex/PfCPuissanceQuatre.tex b/macros/latex/contrib/profcollege/latex/PfCPuissanceQuatre.tex
index 1d8a929939..d51387cd78 100644
--- a/macros/latex/contrib/profcollege/latex/PfCPuissanceQuatre.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCPuissanceQuatre.tex
@@ -1,30 +1,40 @@
%%%
% Puissances 4
%%%
-\setKVdefault[ClesPQuatre]{Couleur=Gray,Largeur=2cm,LargeurUn=2cm,Multiplication,Entier,Nombre,Exposant=false,Libre=false,Texte=false,Echelle=2}%
+\def\filedatePquatre{2024/08/04}%
+\def\fileversionPquatre{0.1}%
+\message{-- \filedatePquatre\space v\fileversionPquatre}%
+%
+\setKVdefault[ClesPQuatre]{Couleur=Gray,Largeur=2cm,LargeurUn=2cm,Multiplication,Entier,Nombre,Exposant=false,Libre=false,Texte=false,Echelle=2,Correction=false}%
\defKV[ClesPQuatre]{Addition=\setKV[ClesPQuatre]{Multiplication=false}}%
\defKV[ClesPQuatre]{Relatif=\setKV[ClesPQuatre]{Entier=false}}%
\defKV[ClesPQuatre]{Puissance=\setKV[ClesPQuatre]{Exposant}}%
\defKV[ClesPQuatre]{Autre=\setKV[ClesPQuatre]{Nombre=false}\setKV[ClesPQuatre]{Libre}}%
\defKV[ClesPQuatre]{Consignes=\setKV[ClesPQuatre]{Texte}}%
+\defKV[ClesPQuatre]{Solution=\setKV[ClesPQuatre]{Correction}\setsepchar{,}\ignoreemptyitems\readlist*\PQuatreListeS{#1}\reademptyitems}%
+\defKV[ClesPQuatre]{Graine=\PfCGraineAlea{#1}}%
\newtoks\toklistePQuatreh%
\newtoks\toklistePQuatrev%
+\newtoks\toklistePQuatres%
\def\UpdatetoksPQuatreh#1\nil{\addtotok\toklistePQuatreh{"#1",}}%
\def\UpdatetoksPQuatrev#1\nil{\addtotok\toklistePQuatrev{"#1",}}%
+\def\UpdatetoksPQuatres#1\nil{\addtotok\toklistePQuatres{"#1",}}%
\NewDocumentCommand\PQuatre{o +m}{%
\useKVdefault[ClesPQuatre]%
\toklistePQuatreh{}%
\toklistePQuatrev{}%
+ \toklistePQuatres{}%
\setKV[ClesPQuatre]{#1}%
\ifboolKV[ClesPQuatre]{Nombre}{%
\ifboolKV[ClesPQuatre]{Exposant}{%
- \def\PQuatreListe{$10^{-10}$,$10^{-9}$,$10^{-8}$,$10^{-7}$,$10^{-6}$,$10^{-5}$,$10^{-4}$,$10^{-3}$,$10^{-2}$,$10^{2}$,$10^{3}$,$10^{4}$,$10^{5}$,$10^{6}$,$10^{7}$,$10^{8}$,$10^{9}$,$10^{10}$}%
+ \def\PQuatreListe{-10,-9,-8,-7,-6,-5,-4,-3,-2,2,3,4,5,6,7,8,9,10}%
\MelangeListe{\PQuatreListe}{7}%
- \readlist*\PQuatreListeH{\faa}%
+ \ignoreemptyitems\readlist*\PQuatreListeH{\faa}%
\MelangeListe{\PQuatreListe}{7}%
- \readlist*\PQuatreListeV{\faa}%
+ \ignoreemptyitems\readlist*\PQuatreListeV{\faa}%
+ \reademptyitems
\foreachitem\compteur\in\PQuatreListeH{\expandafter\UpdatetoksPQuatreh\compteur\nil}%
\foreachitem\compteur\in\PQuatreListeV{\expandafter\UpdatetoksPQuatrev\compteur\nil}%
}{%
@@ -39,7 +49,7 @@
\foreachitem\compteur\in\PQuatreListeV{\expandafter\UpdatetoksPQuatrev\compteur\nil}%
}{%
% On choisit aléatoirement les listes de nombres de -10 à -2 union 2 à 10 en faisant deux listes : horizontale et verticale
- \def\PQuatreListe{$-10$,$-9$,$-8$,$-7$,$-6$,$-5$,$-4$,$-3$,$-2$,2,3,4,5,6,7,8,9,10}%
+ \def\PQuatreListe{-10,-9,-8,-7,-6,-5,-4,-3,-2,2,3,4,5,6,7,8,9,10}%
\MelangeListe{\PQuatreListe}{7}%
\readlist*\PQuatreListeH{\faa}%
\MelangeListe{\PQuatreListe}{7}%
@@ -55,6 +65,10 @@
\setsepchar{,}%
\foreachitem\compteur\in\PQuatreListes[1]{\expandafter\UpdatetoksPQuatrev\compteur\nil}%
\foreachitem\compteur\in\PQuatreListes[2]{\expandafter\UpdatetoksPQuatreh\compteur\nil}%
+ % On crée éventuellement la liste des solutions
+ \ifboolKV[ClesPQuatre]{Correction}{%
+ \foreachitem\compteur\in\PQuatreListeS{\expandafter\UpdatetoksPQuatres\compteur\nil}%
+ }{}%
}%
% Une fois les listes construites, on dessine et on place les listes.
\PQuatreGrille{\the\toklistePQuatrev}{\the\toklistePQuatreh}%
@@ -69,10 +83,12 @@
PQEchelle=\useKV[ClesPQuatre]{Echelle};
color PQfond;
PQfond=\useKV[ClesPQuatre]{Couleur};
- boolean PQLibre,PQMultiplication,PQTexte;
+ boolean PQLibre,PQMultiplication,PQTexte,Correction,Exposant;
PQLibre:=\useKV[ClesPQuatre]{Libre};
PQMultiplication=\useKV[ClesPQuatre]{Multiplication};
PQTexte:=\useKV[ClesPQuatre]{Texte};
+ Correction=\useKV[ClesPQuatre]{Correction};
+ Exposant=\useKV[ClesPQuatre]{Exposant};
if PQTexte:
string PQConsignes;
@@ -111,6 +127,12 @@
if PQLibre:
if PQTexte:
label.llft(TEX("\begin{minipage}{"&decimal(PQLargeurUn)&"pt}"&PQConsignes&"\end{minipage}") scaled PQEchelle,A);
+ else:
+ if PQMultiplication:
+ label.llft(TEX("$\times$") scaled PQEchelle,A);
+ else:
+ label.llft(TEX("$+$") scaled PQEchelle,A);
+ fi;
fi;
else:
if PQMultiplication:
@@ -119,24 +141,72 @@
label.llft(TEX("$+$") scaled PQEchelle,A);
fi;
fi;
+ %
+ string Textev[];
+ string Texteh[];
labeloffset:=labeloffset/2;
vardef Vertical(text t)=
n:=0;
for p_=t:
+ if PQLibre:
label.lft(TEX(p_) scaled PQEchelle,A+(0,n*PQLargeur+PQLargeur/2));
+ else:
+ if Exposant:
+ label.lft(TEX("$10^{"&p_&"}$") scaled PQEchelle,A+(0,n*PQLargeur+PQLargeur/2));
+ else:
+ label.lft(TEX("\num{"&p_&"}") scaled PQEchelle,A+(0,n*PQLargeur+PQLargeur/2));
+ fi;
+ Textev[n]=p_;
+ fi;
n:=n+1;
endfor;
enddef;
vardef Horizontal(text t)=
n:=0;
for p_=t:
+ if PQLibre:
label.bot(TEX(p_) scaled PQEchelle,A+(n*PQLargeur+PQLargeur/2,0));
+ else:
+ if Exposant:
+ label.bot(TEX("$10^{"&p_&"}$") scaled PQEchelle,A+(n*PQLargeur+PQLargeur/2,0));
+ else:
+ label.bot(TEX("\num{"&p_&"}") scaled PQEchelle,A+(n*PQLargeur+PQLargeur/2,0));
+ fi;
+ Texteh[n]=p_;
+ fi;
n:=n+1;
endfor;
enddef;
labeloffset:=labeloffset*4;
Vertical(#1);
Horizontal(#2);
+ % on affiche la solution
+ vardef AfficheSolution(text t)=
+ n:=0;
+ for p_=t:
+ label(TEX(p_),M[n mod nclargeur][n div nchauteur]);
+ n:=n+1;
+ endfor;
+ enddef;
+ if Correction:
+ if PQLibre=false:
+ for k=0 upto (nclargeur-1):
+ for l=0 upto (nchauteur-1):
+ if Exposant:
+ label(TEX("\Large$10^{\fpeval{"&Texteh[k]&"+"&Textev[l]&"}}$"),M[k][l]);
+ else:
+ if PQMultiplication:
+ label(TEX("\Huge\num{\fpeval{"&Texteh[k]&"*"&Textev[l]&"}}"),M[k][l]);
+ else:
+ label(TEX("\Huge\num{\fpeval{"&Texteh[k]&"+"&Textev[l]&"}}"),M[k][l]);
+ fi;
+ fi;
+ endfor;
+ endfor;
+ else:
+ AfficheSolution(\the\toklistePQuatres);
+ fi;
+ fi;
\end{mplibcode}
\else%
\begin{mpost}[mpsettings={Largeur=\useKV[ClesPQuatre]{Largeur};Largeur=\useKV[ClesPQuatre]{Largeur};LargeurUn=\useKV[ClesPQuatre]{LargeurUn};Echelle=\useKV[ClesPQuatre]{Echelle};color fond;fond=\useKV[ClesPQuatre]{Couleur};boolean Libre,Multiplication,Texte;Libre:=\useKV[ClesPQuatre]{Libre};Multiplication=\useKV[ClesPQuatre]{Multiplication};Texte:=\useKV[ClesPQuatre]{Texte};if Texte:string Consignes;Consignes=\useKV[ClesPQuatre]{Consignes};fi;}]
diff --git a/macros/latex/contrib/profcollege/latex/PfCPuzzleSommePyramide.tex b/macros/latex/contrib/profcollege/latex/PfCPuzzleSommePyramide.tex
index 7f00ac287e..865982ee35 100644
--- a/macros/latex/contrib/profcollege/latex/PfCPuzzleSommePyramide.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCPuzzleSommePyramide.tex
@@ -1,6 +1,10 @@
%%%
% Puzzle Somme Pyramide
%%%
+\def\filedatePuzzleSommePyramide{2024/08/04}%
+\def\fileversionPuzzleSommePyramide{0.1}%
+\message{-- \filedatePuzzleSommePyramide\space v\fileversionPuzzleSommePyramide}%
+%
\setKVdefault[ClesPuzzleP]{Largeur=40pt,Etages=4,Graines=false,Solutions=false,Jeu,EnonceQuestion=false,NbLignes=7}
\defKV[ClesPuzzleP]{Graine=\setKV[ClesPuzzleP]{Graines}}%
\defKV[ClesPuzzleP]{Solution=\setKV[ClesPuzzleP]{Solutions}\setKV[ClesPuzzleP]{Jeu=false}}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCPyraVoca.tex b/macros/latex/contrib/profcollege/latex/PfCPyraVoca.tex
index bfda696300..983a8b1eb9 100644
--- a/macros/latex/contrib/profcollege/latex/PfCPyraVoca.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCPyraVoca.tex
@@ -1,6 +1,10 @@
%%%
% PyraVoca
%%%
+\def\filedatePyraVoca{2024/08/04}%
+\def\fileversionPyraVoca{0.1}%
+\message{-- \filedatePyraVoca\space v\fileversionPyraVoca}%
+%
\newlength{\PfCPyraVocaHauteur}
\setKVdefault[PyraVoca]{Solution=false,Largeur=15pt}
diff --git a/macros/latex/contrib/profcollege/latex/PfCPyramideCalculs.tex b/macros/latex/contrib/profcollege/latex/PfCPyramideCalculs.tex
index fdd5c7b685..0b00e0e4ac 100644
--- a/macros/latex/contrib/profcollege/latex/PfCPyramideCalculs.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCPyramideCalculs.tex
@@ -1,6 +1,10 @@
%%%
% Pyramide de calculs
%%%
+\def\filedatePyraCalc{2024/08/04}%
+\def\fileversionPyraCalc{0.1}%
+\message{-- \filedatePyraCalc\space v\fileversionPyraCalc}%
+%
\newcommand\DessinePyramideNombreMul[1]{%
\ifluatex
\mplibforcehmode
@@ -241,7 +245,7 @@
\fi
}%
-\setKVdefault[ClesPyramide]{Etages=5,Largeur=2cm,Hauteur=1cm,Vide=false,Inverse=false,Double=false,Couleur=Crimson,Multiplication=false,CouleurNombre=blue,Produit=false,Solution=false,Aide=false,Cote=4cm}%
+\setKVdefault[ClesPyramide]{ToutesOperations=false,Etages=5,Largeur=2cm,Hauteur=1cm,Vide=false,Inverse=false,Double=false,Couleur=Crimson,Multiplication=false,CouleurNombre=blue,Produit=false,Solution=false,Aide=false,Cote=4cm}%
\newtoks\toklistecaseP%
\def\UpdatetoksPyramide#1\nil{\addtotok\toklistecaseP{"#1",}}%
@@ -250,6 +254,9 @@
\NewDocumentCommand\PyramideNombre{o m}{%
\useKVdefault[ClesPyramide]%
\setKV[ClesPyramide]{#1}%
+ \ifboolKV[ClesPyramide]{ToutesOperations}{%
+ \PyramideOp[#1]{#2}%
+ }{%
\ifboolKV[ClesPyramide]{Multiplication}{%
\ifx\bla#2\bla%
\setKV[ClesPyramide]{Vide=true}%
@@ -278,4 +285,302 @@
}{Le nombre d'éléments dans la liste des propositions n'est pas compatible avec le nombre d'étages choisi.}%
\fi%
}%
+}%
+}%
+
+\setKVdefault[PyramideOp]{Rayon=5mm,Graines=false,Etages=5,Solution=false,Relatifs=false,Case=-1}
+\defKV[PyramideOp]{Graine=\setKV[PyramideOp]{Graines}}
+\defKV[PyramideOp]{CouleurSolution=\setKV[PyramideOp]{Solution}}
+
+\NewDocumentCommand\PyramideOp{om}{%
+ \useKVdefault[PyramideOp]%
+ \setKV[PyramideOp]{#1}%
+ \ifboolKV[PyramideOp]{Relatifs}{%
+ \BuildPyramideOpRelatifs{#2}%
+ }{%
+ \BuildPyramideOp{#2}%
+ }%
+}%
+
+\NewDocumentCommand\BuildPyramideOp{m}{%
+ \ifluatex
+ \mplibforcehmode
+ \mplibnumbersystem{double}
+ \begin{mplibcode}
+ Etages=\useKV[PyramideOp]{Etages};
+ Rayon=\useKV[PyramideOp]{Rayon};
+ Case=\useKV[PyramideOp]{Case};
+
+ boolean Graines,Solution,Allume[][];
+
+ Graines=\useKV[PyramideOp]{Graines};
+ if Graines:
+ randomseed:=\useKV[PyramideOp]{Graine};
+ fi;
+
+ Solution=\useKV[PyramideOp]{Solution};
+ if Solution:
+ color CouleurSolution;
+ CouleurSolution=\useKV[PyramideOp]{CouleurSolution};
+ fi;
+
+ vardef ChoixOperation(expr Nba,Nbb)=
+ if (Nba<Nbb) or (Nba=Nbb):
+ if Nba*Nbb>200:
+ ChoixOp:=ceiling(uniformdeviate(1));
+ else:
+ ChoixOp:=ceiling(uniformdeviate(2));
+ fi;
+ else:
+ if (Nba mod Nbb)<>0:
+ if Nba*Nbb>200:
+ ChoixAlea:=uniformdeviate(1);
+ if ChoixAlea<0.5:
+ ChoixOp:=1;
+ else:
+ ChoixOp:=3;
+ fi;
+ else:
+ ChoixOp:=ceiling(uniformdeviate(3));
+ fi;
+ else:
+ if Nba*Nbb>200:
+ ChoixAlea:=uniformdeviate(1);
+ if ChoixAlea<0.5:
+ ChoixOp:=1;
+ else:
+ ChoixOp:=ceiling(2+uniformdeviate(2));
+ fi;
+ else:
+ ChoixOp:=ceiling(uniformdeviate(4));
+ fi;
+ fi;
+ fi;
+ enddef;
+
+ numeric Nb[][],ChoixOp[][];
+
+ pair M[][],N[][];
+
+ for k=0 upto Etages-1:
+ for l=0 upto Etages-1-k:
+ M[k][l]=Rayon*(1,1)+2*Rayon*(l,k)+k*2*Rayon*(0.5,-1+cosd(30));
+ Allume[k][l]=false;
+ endfor;
+ endfor;
+ for k=0 upto Etages-2:
+ for l=0 upto Etages-2-k:
+ N[k][l]=Rayon*(1,1)+(Rayon,0)+2*Rayon*(l,k)+k*2*Rayon*(0.5,-1+cosd(30));
+ endfor;
+ endfor;
+
+ n:=0;
+
+ for p_=#1:
+ Nb[0][n]=p_;
+ if n=Case:
+ if n<Etages-1:
+ Allume[1][n]:=true;
+ else:
+ Allume[1][n-1]:=true;
+ fi;
+ else:
+ Allume[0][n]:=true;
+ fi;
+ n:=n+1;
+ endfor;
+
+ string Op[][];
+
+ % Détermination des opérations et des valeurs à indiquer.
+ for k=0 upto Etages-1:
+ for l=0 upto Etages-2-k:
+ ChoixOperation(Nb[k][l],Nb[k][l+1]);
+ if ChoixOp=1:
+ Op[k][l]="$+$";
+ Nb[k+1][l]=Nb[k][l]+Nb[k][l+1];
+ elseif ChoixOp=2:
+ Op[k][l]="$\times$";
+ Nb[k+1][l]=Nb[k][l]*Nb[k][l+1];
+ elseif ChoixOp=3:
+ Op[k][l]="$\_$";
+ Nb[k+1][l]=Nb[k][l]-Nb[k][l+1];
+ elseif ChoixOp=4:
+ Op[k][l]="$\div$";
+ Nb[k+1][l]=Nb[k][l]/Nb[k][l+1];
+ fi;
+ endfor;
+ endfor;
+ %Affichage
+ for k=0 upto Etages-1:
+ for l=0 upto Etages-1-k:
+ if Allume[k][l]=false:
+ if Solution:
+ fill cercles(M[k][l],Rayon) withcolor CouleurSolution;
+ label(decimal(Nb[k][l]),M[k][l]);
+ fi;
+ else:
+ label(decimal(Nb[k][l]),M[k][l]);
+ fi;
+ trace cercles(M[k][l],Rayon);
+ endfor;
+ endfor;
+ for k=0 upto Etages-2:
+ for l=0 upto Etages-2-k:
+ fill cercles(N[k][l],2mm) withcolor 0.8white;
+ trace cercles(N[k][l],2mm);
+ label(TEX(Op[k][l]),N[k][l]);
+ endfor;
+ endfor;
+ \end{mplibcode}
+ \mplibnumbersystem{scaled}
+ \fi
+}
+
+\NewDocumentCommand\BuildPyramideOpRelatifs{m}{%
+ \ifluatex
+ \mplibforcehmode
+ \mplibnumbersystem{double}
+ \begin{mplibcode}
+ Etages=\useKV[PyramideOp]{Etages};
+ Rayon=\useKV[PyramideOp]{Rayon};
+ Case=\useKV[PyramideOp]{Case};
+
+ boolean Graines,Solution,Allume[][];
+
+ Graines=\useKV[PyramideOp]{Graines};
+ if Graines:
+ randomseed:=\useKV[PyramideOp]{Graine};
+ fi;
+
+ Solution=\useKV[PyramideOp]{Solution};
+ if Solution:
+ color CouleurSolution;
+ CouleurSolution=\useKV[PyramideOp]{CouleurSolution};
+ fi;
+
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ vardef ChoixOperation(expr Nba,Nbb)=
+ if (Nba=Nbb):
+ if Nba*Nbb>200:
+ ChoixOp:=ceiling(uniformdeviate(1));
+ else:
+ ChoixOp:=ceiling(uniformdeviate(2));
+ fi;
+ elseif (Nba+Nbb=0):
+ if abs(Nba*Nbb)>200:
+ ChoixOp:=3;
+ else:
+ ChoixAlea:=uniformdeviate(1);
+ if ChoixAlea<0.5:
+ ChoixOp:=2;
+ else:
+ ChoixOp:=3;
+ fi;
+ fi;
+ else:
+ if (abs(Nba) mod abs(Nbb))<>0:
+ if abs(Nba*Nbb)>200:
+ ChoixAlea:=uniformdeviate(1);
+ if ChoixAlea<0.5:
+ ChoixOp:=1;
+ else:
+ ChoixOp:=3;
+ fi;
+ else:
+ ChoixOp:=ceiling(uniformdeviate(3));
+ fi;
+ else:
+ if abs(Nba*Nbb)>200:
+ ChoixAlea:=uniformdeviate(1);
+ if ChoixAlea<0.5:
+ ChoixOp:=1;
+ else:
+ ChoixOp:=ceiling(2+uniformdeviate(2));
+ fi;
+ else:
+ ChoixOp:=ceiling(uniformdeviate(4));
+ fi;
+ fi;
+ fi;
+ enddef;
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+ numeric Nb[][],ChoixOp[][];
+
+ pair M[][],N[][];
+
+ for k=0 upto Etages-1:
+ for l=0 upto Etages-1-k:
+ M[k][l]=Rayon*(1,1)+2*Rayon*(l,k)+k*2*Rayon*(0.5,-1+cosd(30));
+ Allume[k][l]=false;
+ endfor;
+ endfor;
+ for k=0 upto Etages-2:
+ for l=0 upto Etages-2-k:
+ N[k][l]=Rayon*(1,1)+(Rayon,0)+2*Rayon*(l,k)+k*2*Rayon*(0.5,-1+cosd(30));
+ endfor;
+ endfor;
+
+ n:=0;
+
+ for p_=#1:
+ Nb[0][n]=p_;
+ if n=Case:
+ if n<Etages-1:
+ Allume[1][n]:=true;
+ else:
+ Allume[1][n-1]:=true;
+ fi;
+ else:
+ Allume[0][n]:=true;
+ fi;
+ n:=n+1;
+ endfor;
+
+ string Op[][];
+
+ % Détermination des opérations et des valeurs à indiquer.
+ for k=0 upto Etages-1:
+ for l=0 upto Etages-2-k:
+ ChoixOperation(Nb[k][l],Nb[k][l+1]);
+ if ChoixOp=1:
+ Op[k][l]="$+$";
+ Nb[k+1][l]=Nb[k][l]+Nb[k][l+1];
+ elseif ChoixOp=2:
+ Op[k][l]="$\times$";
+ Nb[k+1][l]=Nb[k][l]*Nb[k][l+1];
+ elseif ChoixOp=3:
+ Op[k][l]="$\_$";
+ Nb[k+1][l]=Nb[k][l]-Nb[k][l+1];
+ elseif ChoixOp=4:
+ Op[k][l]="$\div$";
+ Nb[k+1][l]=Nb[k][l]/Nb[k][l+1];
+ fi;
+ endfor;
+ endfor;
+ %Affichage
+ for k=0 upto Etages-1:
+ for l=0 upto Etages-1-k:
+ if Allume[k][l]=false:
+ if Solution:
+ fill cercles(M[k][l],Rayon) withcolor CouleurSolution;
+ label(TEX("\num{"&decimal(Nb[k][l])&"}"),M[k][l]);
+ fi;
+ else:
+ label(TEX("\num{"&decimal(Nb[k][l])&"}"),M[k][l]);
+ fi;
+ trace cercles(M[k][l],Rayon);
+ endfor;
+ endfor;
+ for k=0 upto Etages-2:
+ for l=0 upto Etages-2-k:
+ fill cercles(N[k][l],2mm) withcolor 0.8white;
+ trace cercles(N[k][l],2mm);
+ label(TEX(Op[k][l]),N[k][l]);
+ endfor;
+ endfor;
+ \end{mplibcode}
+ \mplibnumbersystem{scaled}
+ \fi
}% \ No newline at end of file
diff --git a/macros/latex/contrib/profcollege/latex/PfCPythagore.tex b/macros/latex/contrib/profcollege/latex/PfCPythagore.tex
index 5c922d98b0..f5c95d91e4 100644
--- a/macros/latex/contrib/profcollege/latex/PfCPythagore.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCPythagore.tex
@@ -1,6 +1,10 @@
%%%
% Le th\'eor\`eme de Pythagore
%%%
+\def\filedatePythagore{2024/08/04}%
+\def\fileversionPythagore{0.1}%
+\message{-- \filedatePythagore\space v\fileversionPythagore}%
+%
\setKVdefault[ClesPythagore]{Exact=false,AvantRacine=false,Racine=false,Entier=false,Egalite=false,Precision=2,Soustraction=false,Figure=false,FigureSeule=false,Angle=0,Echelle=1cm,Reciproque=false,ReciColonnes=false,Faible=false,Unite=cm,EnchaineA=false,EnchaineB=false,EnchaineC=false,Perso=false,AllPerso=false,SansMots=false,Decalage=5mm,ModeleCouleur=5}%
\defKV[ClesPythagore]{ValeurA=\setKV[ClesPythagore]{EnchaineA}}%
\defKV[ClesPythagore]{ValeurB=\setKV[ClesPythagore]{EnchaineB}}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCQuestionsFlash.tex b/macros/latex/contrib/profcollege/latex/PfCQuestionsFlash.tex
index 8edee39f16..5bcf626ddc 100644
--- a/macros/latex/contrib/profcollege/latex/PfCQuestionsFlash.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCQuestionsFlash.tex
@@ -1,6 +1,10 @@
%%%
% Questions Flash
%%%
+\def\filedateQFlash{2024/08/04}%
+\def\fileversionQFlash{0.1}%
+\message{-- \filedateQFlash\space v\fileversionQFlash}%
+%
\tcbset{Expression/.style={colback=white,valign=center,left=0mm,right=0mm,top=1mm,bottom=1mm,colframe=white}}%
\tcbset{ExpressionSerie1/.style={colback=\useKV[ClesFlash]{Couleur1},left=0mm,right=0mm,top=1mm,bottom=1mm}}%
\tcbset{ExpressionSerie2/.style={colback=\useKV[ClesFlash]{Couleur2},left=0mm,right=0mm,top=1mm,bottom=1mm}}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCQuestionsRelier.tex b/macros/latex/contrib/profcollege/latex/PfCQuestionsRelier.tex
index aaf9a67f20..8aee438e62 100644
--- a/macros/latex/contrib/profcollege/latex/PfCQuestionsRelier.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCQuestionsRelier.tex
@@ -1,6 +1,10 @@
%%%
% R\'eponses \`a relier
%%%
+\def\filedateQRelier{2024/08/04}%
+\def\fileversionQRelier{0.1}%
+\message{-- \filedateQRelier\space v\fileversionQRelier}%
+%
\setKVdefault[ClesRelie]{Solution=false,LargeurG=5cm,LargeurD=2cm,Stretch=1.5,Ecart=2cm,Couleur=black}%
\defKV[ClesRelie]{Graine=\PfCGraineAlea{#1}}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCQuiSuisJe.tex b/macros/latex/contrib/profcollege/latex/PfCQuiSuisJe.tex
index aa896d1185..119b5d0944 100644
--- a/macros/latex/contrib/profcollege/latex/PfCQuiSuisJe.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCQuiSuisJe.tex
@@ -1,6 +1,10 @@
%%%
% Qui suis-je
%%%
+\def\filedateQsuisuisje{2024/08/04}%
+\def\fileversionQsuisuisje{0.1}%
+\message{-- \filedateQsuisuisje\space v\fileversionQsuisuisje}%
+%
\setKVdefault[Quisuisje]{Solution=false,Largeur=5mm,Colonnes=5,CodePerso=false,TexteA=Lettre,TexteB=R\'esultat du calcul}%
\newcommand\QuisuisjeEnonce{%
diff --git a/macros/latex/contrib/profcollege/latex/PfCRLE.tex b/macros/latex/contrib/profcollege/latex/PfCRLE.tex
index a8f035a577..8fabde9116 100644
--- a/macros/latex/contrib/profcollege/latex/PfCRLE.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCRLE.tex
@@ -1,6 +1,10 @@
%%%
% Codage RLE
%%%
+\def\filedateRLE{2024/08/04}%
+\def\fileversionRLE{0.1}%
+\message{-- \filedateRLE\space v\fileversionRLE}%
+%
\setKVdefault[RLE]{Largeur=10pt,Taille=5,Unite=1cm,Solution=false,Enonce=true}
\newtoks\toklisterle
diff --git a/macros/latex/contrib/profcollege/latex/PfCRangementNombres.tex b/macros/latex/contrib/profcollege/latex/PfCRangementNombres.tex
index 1c48ab8efc..ca58c321fd 100644
--- a/macros/latex/contrib/profcollege/latex/PfCRangementNombres.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCRangementNombres.tex
@@ -1,6 +1,10 @@
%%%
% Rangement des nombres
%%%
+\def\filedateRgtNb{2024/08/04}%
+\def\fileversionRgtNb{0.1}%
+\message{-- \filedateRgtNb\space v\fileversionRgtNb}%
+%
\setKVdefault[ClesRgt]{Croissant,Decroissant=false,Strict,Fraction=false,Details=false,Seul=false}%
\dtlexpandnewvalue%
diff --git a/macros/latex/contrib/profcollege/latex/PfCRapido.tex b/macros/latex/contrib/profcollege/latex/PfCRapido.tex
index fa3a16bf7e..cb24c2b404 100644
--- a/macros/latex/contrib/profcollege/latex/PfCRapido.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCRapido.tex
@@ -1,6 +1,10 @@
%%%
% Rapido
%%%
+\def\filedateRapido{2024/08/04}%
+\def\fileversionRapido{0.1}%
+\message{-- \filedateRapido\space v\fileversionRapido}%
+%
%% D'après https://www.facebook.com/groups/994675223903586/user/100017057226847
%% et une programmation de Laurent Lassale-Carrere
\newcounter{PfCnexo}
diff --git a/macros/latex/contrib/profcollege/latex/PfCRappelsFormules.tex b/macros/latex/contrib/profcollege/latex/PfCRappelsFormules.tex
index c2a4d95954..1d204baf90 100644
--- a/macros/latex/contrib/profcollege/latex/PfCRappelsFormules.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCRappelsFormules.tex
@@ -1,6 +1,10 @@
%%%
% Formules
%%%
+\def\filedateRapFormules{2024/08/04}%
+\def\fileversionRapFormules{0.1}%
+\message{-- \filedateRapFormules\space v\fileversionRapFormules}%
+%
\setKVdefault[ClesFormule]{Perimetre=false,Aire=false,Volume=false,Surface=carr\'e,Solide=pav\'e,Angle=0,Ancre={(0,0)},Largeur=5cm,Couleur=white,EchelleEspace=70,Echelle=1cm}
\def\MPFigureCarreCode{%
diff --git a/macros/latex/contrib/profcollege/latex/PfCRecyclage.tex b/macros/latex/contrib/profcollege/latex/PfCRecyclage.tex
index 371688f120..f99ced507f 100644
--- a/macros/latex/contrib/profcollege/latex/PfCRecyclage.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCRecyclage.tex
@@ -1,6 +1,10 @@
%%%
% Logos Recyclage
%%%
+\def\filedateRecyclage{2024/08/04}%
+\def\fileversionRecyclage{0.1}%
+\message{-- \filedateRecyclage\space v\fileversionRecyclage}%
+%
\setKVdefault[Recyclage]{Ticket,Papier=false,Verre=false,Bouteille=false,Carton=false,Couleurs}%
\defKV[Recyclage]{Couleur=\setKV[Recyclage]{Couleurs=false}}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCReperage.tex b/macros/latex/contrib/profcollege/latex/PfCReperage.tex
index 23e7bd2775..d2dec50817 100644
--- a/macros/latex/contrib/profcollege/latex/PfCReperage.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCReperage.tex
@@ -1,6 +1,10 @@
%%%
% Reperage
%%%
+\def\filedateReperage{2024/08/04}%
+\def\fileversionReperage{0.1}%
+\message{-- \filedateReperage\space v\fileversionReperage}%
+%
\setKVdefault[ClesReperage]{Unitex=1,Pasx=1,Unitey=1,Pasy=1,Unitez=1,Pasz=1,DemiDroite=false,Droite=false,Plan=false,Trace=false,ListeSegment={},Espace=false,Sphere=false,AnglePhi=30,CouleurLa=white,CouleurLon=Tomato,AffichageUnites=true,MarquePrimaire=true,AffichageNom=false,AffichageGrad=false,AffichageAbs=0,AffichageCoord=false,LectureCoord=false,ValeurUnitex=1,ValeurUnitey=1,ValeurOrigine=0,NomOrigine=O,EchelleEspace=50,CouleurCoord=black,Thermometre=false,Mercure=false,CouleurMercure=black,Celsius,Kelvin=false,Farenheit=false,ValeurMin=-4000,ValeurMax=4000,ValeurMiny=-4000,ValeurMaxy=4000,Etages=4,Code=false,Globe=false,Rho=1500,Phi=22,Theta=10,CouleurE=orange,CouleurG=green,Axes=false,TypeProj="persp",Niveaux=false,Decale=false,Tiret=false,Cadre=false,ModeleCouleur=5,EchelleCroix=1,CouleurCroix=black}
\defKV[ClesReperage]{Traces=\setKV[ClesReperage]{Code}}%
\defKV[ClesReperage]{Niveau=\setKV[ClesReperage]{Etages=#1}\setKV[ClesReperage]{Niveaux}}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCRepresentationGraphique.tex b/macros/latex/contrib/profcollege/latex/PfCRepresentationGraphique.tex
index 390c1a9caa..47ed10c376 100644
--- a/macros/latex/contrib/profcollege/latex/PfCRepresentationGraphique.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCRepresentationGraphique.tex
@@ -1,7 +1,11 @@
%%%
% Diff\'erentes représentations graphiques
%%%
-\setKVdefault[TraceG]{Millimetre=false,Grille=false,Graduations=false,PasGradX=1,PasGradY=1,PasGrilleX=1,PasGrilleY=1,Xmin=-5.5,Xmax=5.5,Xstep=1,Ymin=-5.5,Ymax=5.5,Ystep=1,Bornea=-5.5,Borneb=5.5,LabelX={},LabelY={},LegendeX=false,LegendeY=false,LabelC=0.5,NomCourbe={},Origine={(5.5,5.5)},Fonction=false,Points=false,Invisible=false,CouleurPoint=red,CouleurTrace=black,Epaisseur=1,Relie=false,RelieSegment=false,Marque=dot,Code=false,Vide=false,NbPointsCourbe=100,Tiret=false}%
+\def\filedateRepGraph{2024/08/20}%
+\def\fileversionRepGraph{0.1a}%
+\message{-- \filedateRepGraph\space v\fileversionRepGraph}%
+%
+\setKVdefault[TraceG]{Millimetre=false,Grille=false,Graduations=false,PasGradX=1,PasGradY=1,PasGrilleX=1,PasGrilleY=1,Xmin=-5.5,Xmax=5.5,Xstep=1,Ymin=-5.5,Ymax=5.5,Ystep=1,Bornea=-5.5,Borneb=5.5,LabelX={},LabelY={},LegendeX=false,LegendeY=false,LabelC=0.5,NomCourbe={},Origine={(5.5,5.5)},Fonction=false,Points=false,Invisible=false,CouleurPoint=red,CouleurTrace=black,Epaisseur=1,Relie=false,RelieSegment=false,Marque=dot,Code=false,Vide=false,NbPointsCourbe=100,Tiret=false,StyleTrace=0,Date=false}%
\defKV[TraceG]{Traces=\setKV[TraceG]{Code}}%
\defKV[TraceG]{LabelX=\setKV[TraceG]{LegendeX}}%
\defKV[TraceG]{LabelY=\setKV[TraceG]{LegendeY}}%
@@ -35,6 +39,8 @@
y.u=1cm/\useKV[TraceG]{Ystep};
grillex=\useKV[TraceG]{PasGrilleX};
grilley=\useKV[TraceG]{PasGrilleY};
+ pasgradx=\useKV[TraceG]{PasGradX};
+ pasgrady=\useKV[TraceG]{PasGradY};
pos=\useKV[TraceG]{LabelC};
marque_p:=str \useKV[TraceG]{Marque};
@@ -49,6 +55,9 @@
LegendeX:=\useKV[TraceG]{LegendeX};
LegendeY:=\useKV[TraceG]{LegendeY};
+ boolean Date;
+ Date=\useKV[TraceG]{Date};
+
boolean Relie;
Relie=\useKV[TraceG]{Relie};
@@ -73,12 +82,16 @@
fi;
if Graduations:
- for k=0 step grillex until (xmax-xmin):
+ for k=0 step pasgradx until (xmax-xmin):
trace ((0,-0.5mm)--(0,0.5mm)) shifted ((k*x.u,0) shifted Origine) withpen pencircle scaled1.25;
+ if Date:
+ label.bot(TEX(decimal(xmin+k)),(k*x.u,0) shifted Origine);
+ else:
label.bot(TEX("\num{"&decimal(xmin+k)&"}"),(k*x.u,0) shifted Origine);
+ fi;
endfor;
label.ulft(TEX("\num{"&decimal(ymin)&"}"),(0,0) shifted Origine);
- for k=grilley step grilley until (ymax-ymin):
+ for k=pasgrady step pasgrady until (ymax-ymin):
trace ((-0.5mm,0)--(0.5mm,0)) shifted ((0,k*y.u) shifted Origine) withpen pencircle scaled1.25;
label.lft(TEX("\num{"&decimal(ymin+k)&"}"),(0,k*y.u) shifted Origine);
endfor;
diff --git a/macros/latex/contrib/profcollege/latex/PfCRepresenterEntier.tex b/macros/latex/contrib/profcollege/latex/PfCRepresenterEntier.tex
index 9ab7b24341..15f6919131 100644
--- a/macros/latex/contrib/profcollege/latex/PfCRepresenterEntier.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCRepresenterEntier.tex
@@ -1,6 +1,10 @@
%%%
% Représenter un entier dans une base
%%%
+\def\filedateRepEntier{2024/08/04}%
+\def\fileversionRepEntier{0.1}%
+\message{-- \filedateRepEntier\space v\fileversionRepEntier}%
+%
\setKVdefault[ClesRBase]{Base=10,Echelle=1,Unite=false,Compact=false,Impression=false,ListeCouleurs={Tomato,LightSteelBlue,LightGreen,Cornsilk}}%
\newcommand\RepresenterEntier[2][]{%
diff --git a/macros/latex/contrib/profcollege/latex/PfCRepresenterFraction.tex b/macros/latex/contrib/profcollege/latex/PfCRepresenterFraction.tex
index 6660693348..2beb3ee5ed 100644
--- a/macros/latex/contrib/profcollege/latex/PfCRepresenterFraction.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCRepresenterFraction.tex
@@ -1,7 +1,11 @@
%%%
% Fractions
%%%
-\setKVdefault[ClesFraction]{Rayon=2cm,Disque,Regulier=false,Segment=false,Rectangle=false,Longueur=5cm,Largeur=2cm,Cotes=5,Triangle=false,Parts=3,Eprouvette=false,Couleur=green,Reponse=false,Multiple=1,Hachures=false,Epaisseur=1}
+\def\filedateRepFrac{2024/08/30}%
+\def\fileversionRepFrac{0.1a}%
+\message{-- \filedateRepFrac\space v\fileversionRepFrac}%
+%
+\setKVdefault[ClesFraction]{Rayon=2cm,Disque,Regulier=false,Segment=false,Rectangle=false,Longueur=5cm,Largeur=2cm,Cotes=5,Triangle=false,Parts=3,Eprouvette=false,Couleur=green,Reponse=false,Multiple=1,Hachures=false,Epaisseur=1,Aleatoire=false}
\def\MPFractionEprouvetteCode{%
Hauteur=\useKV[ClesFraction]{Longueur};
@@ -80,6 +84,7 @@
\ifluatex
\mplibforcehmode
\begin{mplibcode}
+ % Pas d'aléa ici : l'eau ne peut pas être en lévitation :)
\MPFractionEprouvetteCode
trace eprouvette(#2,#1);
\end{mplibcode}
@@ -90,6 +95,107 @@
\fi
}
+\def\MPFractionRegulierCodeAlea{%
+ Rayon=\useKV[ClesFraction]{Rayon};
+ Cotes=\useKV[ClesFraction]{Cotes};
+ color ColPolyReg;
+ ColPolyReg=\useKV[ClesFraction]{Couleur};
+ boolean Hachures,Reponse;
+ Reponse=\useKV[ClesFraction]{Reponse};
+ Hachures=\useKV[ClesFraction]{Hachures};
+ Epaisseur=\useKV[ClesFraction]{Epaisseur};
+ pair O,A[],B[];
+ O=u*(0,0);
+ path cc,cd;
+ cc=cercles(O,Rayon);
+ for k=0 upto Cotes:
+ A[k]=pointarc(cc,k*(360/Cotes));
+ endfor;
+ cd=polygone(A0 for k=1 upto Cotes-1:,A[k] endfor);
+ path part[];
+ vardef FractionPolyReg(expr nume,deno)=
+ for k=0 upto deno:
+ B[k]=point(k*(Cotes/deno)) of cd;
+ dotlabel("",B[k]);
+ endfor;
+ for k=0 upto deno-1:
+ part[k]=O--B[k] for l=1 upto Cotes-1:if (B[k]--B[k+1]) intersectiontimes (O--A[l])<>(-1,-1):--A[l] fi endfor --B[k+1]--cycle;%O--arccercle(B[k],B[k+1],O)--cycle;
+ endfor;
+ m=(nume div deno);
+ if (nume mod deno)=0:m:=m-1; fi;
+ picture RetourFraction;
+ RetourFraction=image(%
+ Reste=((nume div deno)+1)*deno;
+ RetiensPart=0;
+ if Reponse:
+ if m>0:
+ for l=0 upto (m-1):
+ for k=0 upto deno-1:
+ if RetiensPart<nume:
+ if Reste>(nume-RetiensPart):
+ test:=uniformdeviate(1);
+ if test>0.5:
+ RetiensPart:=RetiensPart+1;
+ if Hachures:
+ drawoptions(withpen pencircle scaled Epaisseur);
+ draw hachurage(part[k] shifted(l*(2*Rayon+0.5cm,0)),1.5*360/deno,0.25,0) withcolor ColPolyReg;
+ else:
+ fill part[k] shifted(l*(2*Rayon+0.5cm,0)) withcolor ColPolyReg;
+ fi;
+ fi;
+ else:
+ RetiensPart:=RetiensPart+1;
+ if Hachures:
+ drawoptions(withpen pencircle scaled Epaisseur);
+ draw hachurage(part[k] shifted(l*(2*Rayon+0.5cm,0)),1.5*360/deno,0.25,0) withcolor ColPolyReg;
+ else:
+ fill part[k] shifted(l*(2*Rayon+0.5cm,0)) withcolor ColPolyReg;
+ fi;
+ fi;
+ fi;
+ Reste:=Reste-1;
+ endfor;
+ endfor;
+ fi;
+ for k=0 upto deno-1:
+ if RetiensPart<nume:
+ if Reste>(nume-RetiensPart):
+ test:=uniformdeviate(1);
+ if test>0.5:
+ RetiensPart:=RetiensPart+1;
+ if Hachures:
+ drawoptions(withpen pencircle scaled Epaisseur);
+ draw hachurage(part[k] shifted(m*(2*Rayon+0.5cm,0)),1.5*360/deno,0.25,0) withcolor ColPolyReg;
+ else:
+ fill part[k] shifted(m*(2*Rayon+0.5cm,0)) withcolor ColPolyReg;
+ fi;
+ fi;
+ else:
+ RetiensPart:=RetiensPart+1;
+ if Hachures:
+ drawoptions(withpen pencircle scaled Epaisseur);
+ draw hachurage(part[k] shifted(m*(2*Rayon+0.5cm,0)),1.5*360/deno,0.25,0) withcolor ColPolyReg;
+ else:
+ fill part[k] shifted(m*(2*Rayon+0.5cm,0)) withcolor ColPolyReg;
+ fi;
+ fi;
+ fi;
+ Reste:=Reste-1;
+ endfor;
+ fi;
+ drawoptions(withpen pencircle scaled Epaisseur);
+ for l=0 upto m:
+ draw cd shifted(l*(2*Rayon+0.5cm,0));
+ for k=0 upto (deno-1):
+ draw segment(O,B[k]) shifted(l*(2*Rayon+0.5cm,0));
+ endfor;
+ endfor;
+ drawoptions();
+ );
+ RetourFraction
+ enddef;
+}%
+
\def\MPFractionRegulierCode{%
Rayon=\useKV[ClesFraction]{Rayon};
Cotes=\useKV[ClesFraction]{Cotes};
@@ -168,7 +274,13 @@
\ifluatex
\mplibforcehmode
\begin{mplibcode}
+ boolean Alea;
+ Alea=\useKV[ClesFraction]{Aleatoire};
+ if Alea:
+ \MPFractionRegulierCodeAlea;
+ else:
\MPFractionRegulierCode
+ fi;
trace FractionPolyReg(#1,#2);
\end{mplibcode}
\else
@@ -178,6 +290,122 @@
\fi
}%
+\def\MPFractionTriangleCodeAlea{%
+ Longueur:=\useKV[ClesFraction]{Longueur};
+ nbparts:=\useKV[ClesFraction]{Parts};
+ color ColTriangle;
+ ColTriangle=\useKV[ClesFraction]{Couleur};
+ boolean Hachures,Reponse;
+ Reponse=\useKV[ClesFraction]{Reponse};
+ Hachures=\useKV[ClesFraction]{Hachures};
+ Epaisseur=\useKV[ClesFraction]{Epaisseur};
+ nbtriangle=0;
+ %
+ vardef Ligne(expr longueur)=
+ for k=0 upto 2*(longueur-1):
+ nbtriangle:=nbtriangle+1;
+ if (k mod 2)=0:
+ M[nbtriangle]=(Tria shifted(0.5*k*(1/nbparts)*(B-A))) shifted((nbparts-longueur)*(1/nbparts)*(C-A));
+ else:
+ M[nbtriangle]=(Trir shifted(0.5*(k-1)*(1/nbparts)*(B-A))) shifted((nbparts-longueur)*(1/nbparts)*(C-A));
+ fi;
+ endfor;
+ enddef;
+ %
+ pair A,B,C;
+ A=u*(0.5,0.5);
+ B-A=(Longueur,0);
+ C=rotation(B,A,60);
+ %
+ path Tria,Trir,M[];
+ Tria=polygone(A,(1/nbparts)[A,B],(1/nbparts)[A,C]);
+ Trir=symetrie(Tria,(1/nbparts)[A,B],(1/nbparts)[A,C]);
+ %
+ for k=nbparts downto 1:
+ Ligne(k);
+ endfor;
+ %
+ picture FondTriangle;
+ FondTriangle=image(
+ for k=1 upto nbtriangle:
+ trace M[k];
+ endfor;
+ );
+ %
+ vardef FractionTriangle(expr nume,deno)=
+ m:=nume div deno;
+ if (nume mod deno)=0:
+ m:=m-1;
+ fi;
+ picture RetourFraction;
+ RetourFraction=image(
+ Reste=((nume div deno)+1)*deno;
+ RetiensPart=0;
+ if Reponse:
+ if m>0:
+ for l=0 upto (m-1):
+ for k=1 upto nbtriangle:
+ if RetiensPart<nume:
+ if Reste>(nume-RetiensPart):
+ test:=uniformdeviate(1);
+ if test>0.5:
+ RetiensPart:=RetiensPart+1;
+ if Hachures:
+ drawoptions(withpen pencircle scaled Epaisseur);
+ draw hachurage(M[k] shifted(l*(Longueur+1cm,0)),90,0.2,0) withcolor ColTriangle;
+ else:
+ fill M[k] shifted(l*(Longueur+1cm,0)) withcolor ColTriangle;
+ fi;
+ fi;
+ else:
+ RetiensPart:=RetiensPart+1;
+ if Hachures:
+ drawoptions(withpen pencircle scaled Epaisseur);
+ draw hachurage(M[k] shifted(l*(Longueur+1cm,0)),90,0.2,0) withcolor ColTriangle;
+ else:
+ fill M[k] shifted(l*(Longueur+1cm,0)) withcolor ColTriangle;
+ fi;
+ fi;
+ fi;
+ Reste:=Reste-1;
+ endfor;
+ endfor;
+ fi;
+ for k=1 upto nbtriangle:
+ if RetiensPart<nume:
+ if Reste>(nume-RetiensPart):
+ test:=uniformdeviate(1);
+ if test>0.5:
+ RetiensPart:=RetiensPart+1;
+ if Hachures:
+ drawoptions(withpen pencircle scaled Epaisseur);
+ draw hachurage(M[k] shifted(m*(Longueur+1cm,0)),90,0.2,0) withcolor ColTriangle;
+ else:
+ fill M[k] shifted(m*(Longueur+1cm,0)) withcolor ColTriangle;
+ fi;
+ fi;
+ else:
+ RetiensPart:=RetiensPart+1;
+ if Hachures:
+ drawoptions(withpen pencircle scaled Epaisseur);
+ draw hachurage(M[k] shifted(m*(Longueur+1cm,0)),90,0.2,0) withcolor ColTriangle;
+ else:
+ fill M[k] shifted(m*(Longueur+1cm,0)) withcolor ColTriangle;
+ fi;
+ fi;
+ fi;
+ Reste:=Reste-1;
+ endfor;
+ fi;
+ drawoptions(withpen pencircle scaled Epaisseur);
+ for l=0 upto m:
+ trace FondTriangle shifted(l*(Longueur+1cm,0));
+ endfor;
+ );
+ RetourFraction
+enddef;
+}%
+
\def\MPFractionTriangleCode{%
Longueur:=\useKV[ClesFraction]{Longueur};
nbparts:=\useKV[ClesFraction]{Parts};
@@ -241,7 +469,7 @@
trace hachurage(polygone(A,B,C) shifted(l*(Longueur+1cm,0)),90,0.2,0) withcolor ColTriangle;
drawoptions(withpen pencircle scaled Epaisseur);
else:
- remplis polygone(A,B,C) withcolor ColRectangle;
+ remplis polygone(A,B,C) withcolor ColTriangle;
fi;
fi;
for k=1 upto nbparts:
@@ -260,7 +488,13 @@
\ifluatex
\mplibforcehmode
\begin{mplibcode}
- \MPFractionTriangleCode
+ boolean Alea;
+ Alea=\useKV[ClesFraction]{Aleatoire};
+ if Alea:
+ \MPFractionTriangleCodeAlea;
+ else:
+ \MPFractionTriangleCode;
+ fi;
draw FractionTriangle(#1,#2);
\end{mplibcode}
\else
@@ -270,6 +504,117 @@
\fi
}%
+\def\MPFractionRectangleCodeAlea{%
+ Longueur=\useKV[ClesFraction]{Longueur};
+ Largeur=\useKV[ClesFraction]{Largeur};
+ color ColRectangle;
+ ColRectangle=\useKV[ClesFraction]{Couleur};
+ boolean Hachures,Reponse;
+ Reponse=\useKV[ClesFraction]{Reponse};
+ Hachures=\useKV[ClesFraction]{Hachures};
+ Epaisseur=\useKV[ClesFraction]{Epaisseur};
+ Multiple=\useKV[ClesFraction]{Multiple};
+ %
+ pair A,B,C,D,M[],N[],R[],S[];
+ A=(0,0);
+ B-A=(Longueur,0);
+ C-B=(0,Largeur);
+ D-C=A-B;
+ vardef FractionRectangle(expr nume,deno)=
+ m=nume div deno;
+ if (nume mod deno)=0:
+ m:=m-1;
+ fi;
+ numeric parts;
+ parts=(deno div Multiple);
+ for k=0 upto parts:
+ M[k]=(k/parts)[A,B];
+ N[k]=(k/parts)[D,C];
+ endfor;
+ if Multiple>1:
+ for k=0 upto Multiple:
+ R[k]=(k/Multiple)[A,D];
+ S[k]=(k/Multiple)[B,C];
+ endfor;
+ fi;
+ picture FondRectangle;
+ FondRectangle=image(%
+ path case[];
+ for k=0 upto Multiple-1:
+ for l=0 step Multiple until (deno-1):
+ case[k*(deno div Multiple)+(l div Multiple)]=(unitsquare xscaled (Multiple*abs(A-B)/deno) yscaled (abs(D-A)/Multiple)) shifted (((l/deno)[A,B]-A)+((k/Multiple)[A,D]-A));
+ trace case[k*(deno div Multiple)+(l div Multiple)];
+ endfor;
+ endfor;
+ );
+ picture RetourRectangle;
+ RetourRectangle=image(
+ Reste=((nume div deno)+1)*deno;
+ RetiensPart=0;
+ if Reponse:
+ if m>0:
+ for l=0 upto (m-1):
+ for k=0 upto deno-1:
+ if RetiensPart<nume:
+ if Reste>(nume-RetiensPart):
+ test:=uniformdeviate(1);
+ if test>0.5:
+ RetiensPart:=RetiensPart+1;
+ if Hachures:
+ drawoptions(withpen pencircle scaled Epaisseur);
+ draw hachurage(case[k] shifted(l*(Longueur+1cm,0)),45,0.25,0) withcolor ColRectangle;
+ else:
+ fill case[k] shifted(l*(Longueur+1cm,0)) withcolor ColRectangle;
+ fi;
+ fi;
+ else:
+ RetiensPart:=RetiensPart+1;
+ if Hachures:
+ drawoptions(withpen pencircle scaled Epaisseur);
+ draw hachurage(case[k] shifted(l*(Longueur+1cm,0)),45,0.25,0) withcolor ColRectangle;
+ else:
+ fill case[k] shifted(l*(Longueur+1cm,0)) withcolor ColRectangle;
+ fi;
+ fi;
+ fi;
+ Reste:=Reste-1;
+ endfor;
+ endfor;
+ fi;
+ for k=0 upto deno-1:
+ if RetiensPart<nume:
+ if Reste>(nume-RetiensPart):
+ test:=uniformdeviate(1);
+ if test>0.5:
+ RetiensPart:=RetiensPart+1;
+ if Hachures:
+ drawoptions(withpen pencircle scaled Epaisseur);
+ draw hachurage(case[k] shifted(m*(Longueur+1cm,0)),45,0.25,0) withcolor ColRectangle;
+ else:
+ fill case[k] shifted(m*(Longueur+1cm,0)) withcolor ColRectangle;
+ fi;
+ fi;
+ else:
+ RetiensPart:=RetiensPart+1;
+ if Hachures:
+ drawoptions(withpen pencircle scaled Epaisseur);
+ draw hachurage(case[k] shifted(m*(Longueur+1cm,0)),45,0.25,0) withcolor ColRectangle;
+ else:
+ fill case[k] shifted(m*(Longueur+1cm,0)) withcolor ColRectangle;
+ fi;
+ fi;
+ fi;
+ Reste:=Reste-1;
+ endfor;
+ fi;
+ for l=0 upto m:
+ trace FondRectangle shifted(l*(Longueur+1cm,0));
+ endfor;
+ );
+ RetourRectangle
+ enddef;
+}%
+
\def\MPFractionRectangleCode{%
Longueur=\useKV[ClesFraction]{Longueur};
Largeur=\useKV[ClesFraction]{Largeur};
@@ -378,7 +723,13 @@
\ifluatex%
\mplibforcehmode%
\begin{mplibcode}
- \MPFractionRectangleCode
+ boolean Alea;
+ Alea=\useKV[ClesFraction]{Aleatoire};
+ if Alea:
+ \MPFractionRectangleCodeAlea;
+ else:
+ \MPFractionRectangleCode;
+ fi;
trace FractionRectangle(#1,#2);
\end{mplibcode}
\else%
@@ -388,6 +739,101 @@
\fi%
}%
+\def\MPFractionDisqueCodeAlea{%
+ Rayon=\useKV[ClesFraction]{Rayon};
+ Epaisseur=\useKV[ClesFraction]{Epaisseur};
+ color ColDisque;
+ ColDisque=\useKV[ClesFraction]{Couleur};
+ boolean Hachures,Reponse;
+ Hachures=\useKV[ClesFraction]{Hachures};
+ Reponse:=\useKV[ClesFraction]{Reponse};
+ %
+ pair A,B[];
+ A=(0,0);
+ path cc,part[];
+ cc=cercles(A,Rayon);
+ vardef FractionDisque(expr nume,deno)=
+ for k=0 upto deno+1:
+ B[k]=pointarc(cc,(360/deno)*k);
+ endfor;
+ for k=0 upto deno-1:
+ part[k]=A--arccercle(B[k],B[k+1],A)--cycle;
+ endfor;
+ m=(nume div deno);
+ if (nume mod deno)=0:m:=m-1; fi;
+ picture RetourFraction;
+ RetourFraction=image(%
+ Reste=((nume div deno)+1)*deno;
+ RetiensPart=0;
+ if Reponse:
+ if m>0:
+ for l=0 upto (m-1):
+ for k=0 upto deno-1:
+ if RetiensPart<nume:
+ if Reste>(nume-RetiensPart):
+ test:=uniformdeviate(1);
+ if test>0.5:
+ RetiensPart:=RetiensPart+1;
+ if Hachures:
+ drawoptions(withpen pencircle scaled Epaisseur);
+ draw hachurage(part[k] shifted(l*(2*Rayon+1cm,0)),1.5*360/deno,0.25,0) withcolor ColDisque;
+ else:
+ fill part[k] shifted(l*(2*Rayon+1cm,0)) withcolor ColDisque;
+ fi;
+ fi;
+ else:
+ RetiensPart:=RetiensPart+1;
+ if Hachures:
+ drawoptions(withpen pencircle scaled Epaisseur);
+ draw hachurage(part[k] shifted(l*(2*Rayon+1cm,0)),1.5*360/deno,0.25,0) withcolor ColDisque;
+ else:
+ fill part[k] shifted(l*(2*Rayon+1cm,0)) withcolor ColDisque;
+ fi;
+ fi;
+ fi;
+ Reste:=Reste-1;
+ endfor;
+ endfor;
+ fi;
+ for k=0 upto deno-1:
+ if RetiensPart<nume:
+ if Reste>(nume-RetiensPart):
+ test:=uniformdeviate(1);
+ if test>0.5:
+ RetiensPart:=RetiensPart+1;
+ if Hachures:
+ drawoptions(withpen pencircle scaled Epaisseur);
+ draw hachurage(part[k] shifted(m*(2*Rayon+1cm,0)),1.5*360/deno,0.25,0) withcolor ColDisque;
+ else:
+ fill part[k] shifted(m*(2*Rayon+1cm,0)) withcolor ColDisque;
+ fi;
+ fi;
+ else:
+ RetiensPart:=RetiensPart+1;
+ if Hachures:
+ drawoptions(withpen pencircle scaled Epaisseur);
+ draw hachurage(part[k] shifted(m*(2*Rayon+1cm,0)),1.5*360/deno,0.25,0) withcolor ColDisque;
+ else:
+ fill part[k] shifted(m*(2*Rayon+1cm,0)) withcolor ColDisque;
+ fi;
+ fi;
+ fi;
+ Reste:=Reste-1;
+ endfor;
+ fi;
+ drawoptions(withpen pencircle scaled Epaisseur);
+ for l=0 upto m:
+ draw cc shifted(l*(2*Rayon+1cm,0));
+ for k=0 upto (deno-1):
+ draw segment(A,B[k]) shifted(l*(2*Rayon+1cm,0));
+ endfor;
+ endfor;
+ drawoptions();
+ );
+ RetourFraction
+ enddef;
+}%
+
\def\MPFractionDisqueCode{%
Rayon=\useKV[ClesFraction]{Rayon};
Epaisseur=\useKV[ClesFraction]{Epaisseur};
@@ -444,7 +890,13 @@
\ifluatex
\mplibforcehmode
\begin{mplibcode}
+ boolean Alea;
+ Alea=\useKV[ClesFraction]{Aleatoire};
+ if Alea:
+ \MPFractionDisqueCodeAlea;
+ else:
\MPFractionDisqueCode
+ fi;
trace FractionDisque(#1,#2);
\end{mplibcode}
\else
@@ -454,6 +906,115 @@
\fi
}
+\def\MPFractionSegmentCodeAlea{%
+ Longueur=\useKV[ClesFraction]{Longueur};
+ color ColSegment;
+ ColSegment=\useKV[ClesFraction]{Couleur};
+ boolean Hachures,Reponse;
+ Reponse=\useKV[ClesFraction]{Reponse};
+ Hachures=\useKV[ClesFraction]{Hachures};
+ Epaisseur=\useKV[ClesFraction]{Epaisseur};
+ %
+ pair A,C,B[];
+ A=(0,0);
+ C-A=(Longueur,0);
+ %
+ path part[];
+ %
+ vardef FractionSegment(expr nume,deno)=
+ for k=0 upto deno:
+ B[k]=(k/deno)[A,C];
+ endfor;
+ for k=0 upto deno-1:
+ part[k]=polygone(B[k]+u*(0,-0.15),B[k+1]+u*(0,-0.15),B[k+1]+u*(0,0.15),B[k]+u*(0,0.15));
+ endfor;
+ m=nume div deno;
+ picture RetourFraction;
+ RetourFraction=image(
+ Reste=((nume div deno)+1)*deno;
+ RetiensPart=0;
+ % Reponse
+ if Reponse:
+ if m>0:
+ for l=0 upto (m-1):
+ for k=0 upto deno-1:
+ if RetiensPart<nume:
+ if Reste>(nume-RetiensPart):
+ test:=uniformdeviate(1);
+ if test>0.5:
+ RetiensPart:=RetiensPart+1;
+ if Hachures:
+ drawoptions(withpen pencircle scaled Epaisseur);
+ draw hachurage(part[k] shifted(l*(Longueur+1cm,0)),120,0.2,0) withcolor ColSegment;
+ drawoptions();
+ else:
+ draw (segment(B[k],B[k+1]) shifted(l*(Longueur+1cm,0))) withpen pencircle scaled 2 withcolor ColSegment;
+ fi;
+ fi;
+ else:
+ RetiensPart:=RetiensPart+1;
+ if Hachures:
+ drawoptions(withpen pencircle scaled Epaisseur);
+ draw hachurage(part[k] shifted(l*(Longueur+1cm,0)),120,0.2,0) withcolor ColSegment;
+ drawoptions();
+ else:
+ draw (segment(B[k],B[k+1]) shifted(l*(Longueur+1cm,0))) withpen pencircle scaled 2 withcolor ColSegment;
+ fi;
+ fi;
+ fi;
+ Reste:=Reste-1;
+ endfor;
+ endfor;
+ fi;
+ for k=0 upto deno-1:
+ if RetiensPart<nume:
+ if Reste>(nume-RetiensPart):
+ test:=uniformdeviate(1);
+ if test>0.5:
+ RetiensPart:=RetiensPart+1;
+ if Hachures:
+ drawoptions(withpen pencircle scaled Epaisseur);
+ draw hachurage(part[k] shifted(m*(Longueur+1cm,0)),120,0.2,0) withcolor ColSegment;
+ drawoptions();
+ else:
+ draw (segment(B[k],B[k+1]) shifted(m*(Longueur+1cm,0))) withpen pencircle scaled 2 withcolor ColSegment;
+ fi;
+ fi;
+ else:
+ RetiensPart:=RetiensPart+1;
+ if Hachures:
+ drawoptions(withpen pencircle scaled Epaisseur);
+ draw hachurage(part[k] shifted(m*(Longueur+1cm,0)),120,0.2,0) withcolor ColSegment;
+ else:
+ draw (segment(B[k],B[k+1]) shifted(m*(Longueur+1cm,0))) withpen pencircle scaled 2 withcolor ColSegment;
+ fi;
+ fi;
+ fi;
+ Reste:=Reste-1;
+ endfor;
+ fi;
+ %fin Reponse
+ if Hachures:drawoptions(withpen pencircle scaled Epaisseur);fi;
+ % draw (segment(B[0],B[nume mod deno]) shifted(m*(Longueur+1cm,0)));
+ for l=0 upto m:
+ draw segment(A,C) shifted(l*(Longueur+1cm,0));
+ endfor;
+ marque_p:="tiretv";
+ for l=0 upto m-1:
+ for k=0 upto deno:
+ pointe(B[k] shifted(l*(Longueur+1cm,0)));
+ endfor;
+ endfor;
+ if (nume mod deno)<>0:
+ for k=0 upto deno:
+ pointe(B[k] shifted(m*(Longueur+1cm,0)));
+ endfor;
+ fi;
+ );
+ RetourFraction
+ enddef;
+}
+
\def\MPFractionSegmentCode{%
Longueur=\useKV[ClesFraction]{Longueur};
color ColSegment;
@@ -525,7 +1086,13 @@
\ifluatex
\mplibforcehmode
\begin{mplibcode}
+ boolean Alea;
+ Alea=\useKV[ClesFraction]{Aleatoire};
+ if Alea:
+ \MPFractionSegmentCodeAlea;
+ else:
\MPFractionSegmentCode
+ fi;
trace FractionSegment(#1,#2);
\end{mplibcode}
\else
diff --git a/macros/latex/contrib/profcollege/latex/PfCRepresenterTableur.tex b/macros/latex/contrib/profcollege/latex/PfCRepresenterTableur.tex
index 0e6162aa76..9b1bcaa8b1 100644
--- a/macros/latex/contrib/profcollege/latex/PfCRepresenterTableur.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCRepresenterTableur.tex
@@ -1,9 +1,15 @@
%%%
% Tableur
%%%
-\setKVdefault[Tableur]{Colonnes=4,Largeur=30pt,LargeurUn=30pt,Bandeau=true,Formule={},Cellule=A1,Ligne=0,Colonne=0,PasL=1,PasC=1,Selection=false,DebutColonnes=0,DebutLignes=0,LargeurNombre=10pt}%
+\def\filedateRepTab{2024/08/21}%
+\def\fileversionRepTab{0.1a}%
+\message{-- \filedateRepTab\space v\fileversionRepTab}%
+%
+\setKVdefault[Tableur]{Colonnes=4,Largeur=30pt,LargeurUn=30pt,Bandeau=true,Formule={},Cellule=A1,Ligne=0,Colonne=0,PasL=1,PasC=1,Selection=false,DebutColonnes=0,DebutLignes=0,LargeurNombre=10pt,Apres=false,ApresBandeau=false}%
%Idee de P. Nuns
\defKV[Tableur]{Couleur=\setKV[Tableur]{Selection}}%
+\defKV[Tableur]{CodeAfter=\setKV[Tableur]{Apres}}%
+\defKV[Tableur]{CodeAfterBandeau=\setKV[Tableur]{ApresBandeau}}%
%
%Bas\'e sur un code de Christian T\'ell\'ech\'ea.
@@ -20,6 +26,9 @@
\ifremain@lines#2\\\@nil{\addtot@b&\subst@eol#2\@nil}{\addtot@b{#2\CodeAfter\xintifboolexpr{\useKV[Tableur]{Ligne}==0 || \useKV[Tableur]{Colonne}==0}{}{%
\tikz\node at (row-\fpeval{\useKV[Tableur]{Ligne}+1+\useKV[Tableur]{PasL}}-|col-\fpeval{\useKV[Tableur]{Colonne}+1+\useKV[Tableur]{PasC}}) {\tiny$\blacksquare$};%
}%
+ \ifboolKV[Tableur]{Apres}{%
+ \useKV[Tableur]{CodeAfter}%
+ }{}%
\end{NiceTabular}}}}%
\long\def\collectcp@body#1\end{\subst@eol#1\@nil\end}%
@@ -103,6 +112,10 @@
\ifboolKV[Tableur]{Bandeau}{%
\begin{NiceTabular}{p{\PfCTableurLargeur}p{10pt}p{50pt}p{\PfCLongInter}}%
\Block[draw,l]{}{\useKV[Tableur]{Cellule}}&\Block[draw]{}{\scriptsize$\blacktriangledown$}&\Block{}{$f_x$\hfill$\sum$~\scriptsize$\blacktriangledown$\hfill$=$}&\Block[draw]{}{\useKV[Tableur]{Formule}\hfill\scriptsize$\blacktriangledown$}\\
+ \CodeAfter
+ \ifboolKV[Tableur]{ApresBandeau}{%
+ \useKV[Tableur]{CodeAfterBandeau}%
+ }{}%
\end{NiceTabular}%
\nopagebreak%
\\%
diff --git a/macros/latex/contrib/profcollege/latex/PfCReseauxSociaux.tex b/macros/latex/contrib/profcollege/latex/PfCReseauxSociaux.tex
index 996e33c026..2ccc0748f6 100644
--- a/macros/latex/contrib/profcollege/latex/PfCReseauxSociaux.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCReseauxSociaux.tex
@@ -1,6 +1,10 @@
%%%
% Twitter
%%%
+\def\filedateReseaux{2024/08/04}%
+\def\fileversionReseaux{0.1}%
+\message{-- \filedateReseaux\space v\fileversionReseaux}%
+%
\setKVdefault[Twitter]{Largeur=0.95\linewidth,Auteur=Christophe,Date=\today,Url=ViveLaTeX,EchelleLogo=0.035,Logo=DrStrange,Publie=false}%
\NewDocumentEnvironment{Twitter}{o+b}{%
diff --git a/macros/latex/contrib/profcollege/latex/PfCResoudreEquation.tex b/macros/latex/contrib/profcollege/latex/PfCResoudreEquation.tex
index a5ce8ebf63..795a79e833 100644
--- a/macros/latex/contrib/profcollege/latex/PfCResoudreEquation.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCResoudreEquation.tex
@@ -1,6 +1,10 @@
%%%
% Equations
%%%
+\def\filedateEquation{2024/08/04}%
+\def\fileversionEquation{0.1}%
+\message{-- \filedateEquation\space v\fileversionEquation}%
+%
\setKVdefault[ClesEquation]{Ecart=0.5,Fleches=false,FlecheDiv=false,Laurent=false,Decomposition=false,Terme=false,Composition=false,Symbole=false,ModeleBarre=false,Decimal=false,Entier=false,Lettre=x,Solution=false,LettreSol=true,Bloc=false,Simplification=false,CouleurTerme=black,CouleurCompo=black,CouleurSous=red,CouleurSymbole=orange,Verification=false,Nombre=0,Egalite=false,Produit=false,Facteurs=false,Carre=false,Exact=false,Pose=false,Equivalence=false}
\newcommand\rightcomment[4]{%
diff --git a/macros/latex/contrib/profcollege/latex/PfCRondeInfernale.tex b/macros/latex/contrib/profcollege/latex/PfCRondeInfernale.tex
index 9fc7f3446d..26a78fcc2f 100644
--- a/macros/latex/contrib/profcollege/latex/PfCRondeInfernale.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCRondeInfernale.tex
@@ -1,6 +1,10 @@
%%%
% Ronde infernale
%%%
+\def\filedateRondeI{2024/08/04}%
+\def\fileversionRondeI{0.1}%
+\message{-- \filedateRondeI\space v\fileversionRondeI}%
+%
\newcommand\TestNombrePremier[1]{%
% #1 le nombre \`a tester
\newcount\anp\newcount\bnp\newcount\cnp%
diff --git a/macros/latex/contrib/profcollege/latex/PfCRose.tex b/macros/latex/contrib/profcollege/latex/PfCRose.tex
index d6059cdd7e..3798a26f74 100644
--- a/macros/latex/contrib/profcollege/latex/PfCRose.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCRose.tex
@@ -1,6 +1,10 @@
%%%
% Rose
%%%
+\def\filedateRose{2024/08/04}%
+\def\fileversionRose{0.1}%
+\message{-- \filedateRose\space v\fileversionRose}%
+%
\setKVdefault[ClesRose]{Vide=false,Couleur=white,Produits=false,Solution=false,Rayon=2cm,Petales=7,Aide=false,FacteurMin=2,FacteurMax=10,ProduitVide=false,CaseVide=false,Polygone=false,Nom=Rose1,Creation=false,Addition=false,Melange=false,CDot=false}%
\defKV[ClesRose]{LesNombres=\setKV[ClesRose]{Creation}}%
\defKV[ClesRose]{LesProduits=\setKV[ClesRose]{Creation}}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCScratch.tex b/macros/latex/contrib/profcollege/latex/PfCScratch.tex
index 0315d8d3a8..778ee15174 100644
--- a/macros/latex/contrib/profcollege/latex/PfCScratch.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCScratch.tex
@@ -1,6 +1,10 @@
%%%%
% Scratch
%%%%
+\def\filedateScratch{2024/08/04}%
+\def\fileversionScratch{0.1}%
+\message{-- \filedateScratch\space v\fileversionScratch}%
+%
\newlength{\longbarreheight}
\setlength{\longbarreheight}{2.1ex+3pt}
diff --git a/macros/latex/contrib/profcollege/latex/PfCSerpent.tex b/macros/latex/contrib/profcollege/latex/PfCSerpent.tex
index cd38bd90a2..e4352613d7 100644
--- a/macros/latex/contrib/profcollege/latex/PfCSerpent.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCSerpent.tex
@@ -1,10 +1,14 @@
%%%
% Serpent
%%%
+\def\filedateSerpent{2024/08/04}%
+\def\fileversionSerpent{0.1}%
+\message{-- \filedateSerpent\space v\fileversionSerpent}%
+%
\newtoks\tokListeSerpentPerso{}%
\def\UpdatetoksSerpent#1\nil{\addtotok\tokListeSerpentPerso{"#1"}}%
-\setKVdefault[Serpent]{Cases=9,Case=1,Solution=false,PasQuad=7mm,ValeurMin=2,ValeurMax=10,Creation=false,Graines=false}
+\setKVdefault[Serpent]{Cases=9,Case=1,Solution=false,PasQuad=7mm,ValeurMin=2,ValeurMax=10,Creation=false,Graines=false,Direct=false,Disque=false,Spirale=false}
\defKV[Serpent]{CouleurSolution=\setKV[Serpent]{Solution}}%
\defKV[Serpent]{Perso=\setKV[Serpent]{Creation}\xdef\PfCFooCheminSerpent{#1}}%+Liste des déplacements
\defKV[Serpent]{Graine=\setKV[Serpent]{Graines}}%
@@ -19,7 +23,14 @@
\BuildSerpent{\the\tokListeSerpentPerso}%
\reademptyitems%
}{%
- \BuildSerpent{}%
+ \ifboolKV[Serpent]{Direct}{%
+ \BuildSerpentDirect{}%
+ }{\ifboolKV[Serpent]{Spirale}{%
+ %\BuildSerpentSpirale{}%
+ }{%
+ \BuildSerpent{}%
+ }%
+ }%
}%
}%
@@ -29,10 +40,11 @@
\mplibnumbersystem{double}%
\begin{mplibcode}
%
- boolean Solution,Perso,Graines;
+ boolean Solution,Perso,Graines,Disque;
Solution=\useKV[Serpent]{Solution};
Perso=\useKV[Serpent]{Creation};
Graines=\useKV[Serpent]{Graines};
+ Disque=\useKV[Serpent]{Disque};
%
if Graines:
randomseed:=\useKV[Serpent]{Graine};
@@ -210,7 +222,11 @@
fi;
fi;
for k=1 upto LongueurChemin:
+ if Disque:
+ trace (fullcircle scaled (2*PasQuad)) shifted (N[k]+PasQuad*(1,1));
+ else:
trace (unitsquare scaled (2*PasQuad)) shifted N[k];
+ fi;
endfor;
for k=1 upto LongueurChemin-1:
drawarrow (center (unitsquare scaled (2*PasQuad)) shifted N[k])--(center (unitsquare scaled (2*PasQuad)) shifted N[k+1]) cutbefore ((unitsquare scaled (2*PasQuad)) shifted N[k]) cutafter ((unitsquare scaled (2*PasQuad)) shifted N[k+1]);
@@ -363,4 +379,193 @@
\end{mplibcode}
\mplibnumbersystem{scaled}%
\fi
+}%
+
+\NewDocumentCommand\BuildSerpentDirect{m}{%
+ \ifluatex%
+ \mplibforcehmode%
+ \mplibnumbersystem{double}%
+ \begin{mplibcode}
+ %
+ boolean Solution,Graines,Disque;
+ Solution=\useKV[Serpent]{Solution};
+ Graines=\useKV[Serpent]{Graines};
+ Disque=\useKV[Serpent]{Disque};
+ %
+ if Graines:
+ randomseed:=\useKV[Serpent]{Graine};
+ fi;
+ %
+ color CoulSolution;
+ if Solution:
+ CoulSolution=\useKV[Serpent]{CouleurSolution};
+ fi;
+ %
+ numeric LongueurChemin,Depart;
+ LongueurChemin=\useKV[Serpent]{Cases};
+ ValeurMin=\useKV[Serpent]{ValeurMin};
+ ValeurMax=\useKV[Serpent]{ValeurMax};
+ CaseDepart=\useKV[Serpent]{Case};
+ Depart=ValeurMin+floor(uniformdeviate(ValeurMax-ValeurMin+1));
+ %
+ PasQuad=5mm;%\useKV[Serpent]{PasQuad};
+ %
+ pair N[];
+ N[1]:=4*PasQuad*(0,0);
+ for k=2 upto LongueurChemin:
+ N[k]=N[k-1]+4*PasQuad*(1,0);
+ endfor;
+ % Tracage
+ if CaseDepart=1:
+ label(TEX("\Large"&decimal(Depart)),N[1] shifted(PasQuad*(1,1)));
+ else:
+ if Solution:
+ label(TEX("\Large"&decimal(Depart)),N[1] shifted(PasQuad*(1,1))) withcolor CoulSolution;
+ fi;
+ fi;
+ for k=1 upto LongueurChemin:
+ if Disque:
+ trace (fullcircle scaled (2*PasQuad)) shifted (N[k]+PasQuad*(1,1));
+ else:
+ trace (unitsquare scaled (2*PasQuad)) shifted N[k];
+ fi;
+ endfor;
+ %
+ path cheminfleche[];
+ path CheminFlecheBase;
+ CheminFlecheBase=(0,2*PasQuad){dir45}..(4*PasQuad,2*PasQuad);
+ for k=1 upto LongueurChemin-1:
+ cheminfleche[k]=CheminFlecheBase shifted (N[k]+(PasQuad,0));
+ %cheminfleche[k]=(center (unitsquare scaled (2*PasQuad)) shifted N[k]){dir45}..(center (unitsquare scaled (2*PasQuad)) shifted N[k+1]) cutbefore ((unitsquare scaled (2*PasQuad)) shifted N[k]) cutafter ((unitsquare scaled (2*PasQuad)) shifted N[k+1]);
+ drawarrow cheminfleche[k];
+ endfor;
+ %%drawoptions();
+ boolean PremierChiffre;
+ PremierChiffre=true;
+ %% Test Premier
+ vardef TestPremier(expr nombre)=
+ nbdiviseur:=0;
+ nbdiv:=0;
+ for k=2 upto nombre:
+ if (nombre mod k)=0:
+ nbdiviseur:=nbdiviseur+1;
+ if k<11:
+ nbdiv:=nbdiv+1;
+ Diviseur[nbdiv]:=k;
+ fi;
+ fi;
+ endfor;
+ if nbdiviseur>1:
+ PremierChiffre:=false;
+ else:
+ PremierChiffre:=true;
+ fi;
+ enddef;
+ % Les opérations
+ numeric Chiffre[];
+ pair St[];
+ Chiffre[1]=Depart;
+ %
+ vardef EcrireSomme(expr tt)=
+ Somme:=5+ceiling(uniformdeviate(10));
+ Chiffre[tt]=Chiffre[tt-1]+Somme;
+ St[tt]=point(0.5*length cheminfleche[tt-1]) of cheminfleche[tt-1];
+ label.top(TEX("$+"&decimal(Somme)&"$"),St[tt]);
+ enddef;
+ %
+ vardef EcrireProduit(expr tt)=
+ Multiple:=1+ceiling(uniformdeviate(8));
+ Chiffre[tt]=Chiffre[tt-1]*Multiple;
+ St[tt]=point(0.5*length cheminfleche[tt-1]) of cheminfleche[tt-1];
+ label.top(TEX("$\PfCSymbolTimes"&decimal(Multiple)&"$"),St[tt]);
+ enddef;
+ %
+ vardef EcrireDifferenceCent(expr tt)=
+ Difference:=ceiling(Chiffre[tt-1]-15+uniformdeviate(10));
+ Chiffre[tt]=Chiffre[tt-1]-Difference;
+ St[tt]=point(0.5*length cheminfleche[tt-1]) of cheminfleche[tt-1];
+ label.top(TEX("$-"&decimal(Difference)&"$"),St[tt]);
+ enddef;
+ %
+ vardef EcrireDifference(expr tt)=
+ Difference:=if Chiffre[tt-1]<20:1+floor(uniformdeviate(Chiffre[tt-1]-1)) else: 5+ceiling(uniformdeviate(10)) fi;
+ Chiffre[tt]=Chiffre[tt-1]-Difference;
+ St[tt]=point(0.5*length cheminfleche[tt-1]) of cheminfleche[tt-1];
+ label.top(TEX("$-"&decimal(Difference)&"$"),St[tt]);
+ enddef;
+ %
+ vardef EcrireQuotient(expr tt)=
+ choixdiv:=ceiling(nbdiv);
+ Quotient:=Diviseur[choixdiv];
+ Chiffre[tt]=Chiffre[tt-1] div Quotient;
+ St[tt]=point(0.5*length cheminfleche[tt-1]) of cheminfleche[tt-1];
+ label.top(TEX("$\PfCSymbolDiv"&decimal(Quotient)&"$"),St[tt]);
+ enddef;
+ %
+ for k=2 upto LongueurChemin:
+ if (Chiffre[k-1]=1) or (Chiffre[k-1]=0):
+ % On additionne ou on multiplie si c'est un
+ if Chiffre[k-1]=1:
+ alea:=ceiling(uniformdeviate(2));
+ if alea=1:
+ EcrireSomme(k);
+ else:
+ EcrireProduit(k);
+ fi;
+ else:
+ EcrireSomme(k);
+ fi;
+ else:
+ TestPremier(Chiffre[k-1]);
+ if PremierChiffre:
+ if Chiffre[k-1]>100:
+ EcrireDifferenceCent(k);
+ else:
+ alea:=ceiling(uniformdeviate(3));
+ if alea=1:
+ EcrireSomme(k);
+ elseif alea=2:
+ EcrireDifference(k);
+ elseif alea=3:
+ EcrireProduit(k);
+ fi;
+ fi;
+ if k=CaseDepart:
+ label(TEX("\Large"&decimal(Chiffre[k])),N[k] shifted(PasQuad*(1,1)));
+ elseif Solution:
+ label(TEX("\Large"&decimal(Chiffre[k])),N[k] shifted(PasQuad*(1,1))) withcolor CoulSolution;
+ fi;
+ else:
+ if Chiffre[k-1]>100:
+ alea:=ceiling(uniformdeviate(2));
+ if alea=1:
+ EcrireDifferenceCent(k);
+ else:
+ EcrireQuotient(k);
+ fi;
+ else:
+ alea:=ceiling(uniformdeviate(4));
+ if alea=1:
+ EcrireSomme(k);
+ elseif alea=2:
+ EcrireDifference(k);
+ elseif alea=3:
+ EcrireProduit(k);
+ elseif alea=4:
+ EcrireQuotient(k);
+ fi;
+ fi;
+ fi;
+ fi;
+ if k=CaseDepart:
+ label(TEX("\Large"&decimal(Chiffre[k])),N[k] shifted(PasQuad*(1,1)));
+ else:
+ if Solution:
+ label(TEX("\Large"&decimal(Chiffre[k])),N[k] shifted(PasQuad*(1,1))) withcolor CoulSolution;
+ fi;
+ fi;
+ endfor;
+ \end{mplibcode}
+ \mplibnumbersystem{scaled}%
+ \fi
}% \ No newline at end of file
diff --git a/macros/latex/contrib/profcollege/latex/PfCShikaku.tex b/macros/latex/contrib/profcollege/latex/PfCShikaku.tex
index 04084cadca..8f6616ff3e 100644
--- a/macros/latex/contrib/profcollege/latex/PfCShikaku.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCShikaku.tex
@@ -1,6 +1,10 @@
%%%
% Shikaku
%%%
+\def\filedateShikaku{2024/08/04}%
+\def\fileversionShikaku{0.1}%
+\message{-- \filedateShikaku\space v\fileversionShikaku}%
+%
\newcounter{PfCShikakuNom}
\setcounter{PfCShikakuNom}{0}
diff --git a/macros/latex/contrib/profcollege/latex/PfCSimplifierFraction.tex b/macros/latex/contrib/profcollege/latex/PfCSimplifierFraction.tex
index 94429def36..9fb16f325d 100644
--- a/macros/latex/contrib/profcollege/latex/PfCSimplifierFraction.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCSimplifierFraction.tex
@@ -1,6 +1,10 @@
%%%
% Simplification
%%%
+\def\filedateSimpFraction{2024/08/13}%
+\def\fileversionSimpFraction{0.1a}%
+\message{-- \filedateSimpFraction\space v\fileversionSimpFraction}%
+%
\makeatletter%by christian Tellechea
% Calcul du PGCD de #1 et #2
\newcount\cnt@a\newcount\cnt@b\newcount\pgcd
@@ -160,7 +164,7 @@
\ifboolKV[ClesSimplification]{Debut}{%
\ensuremath{%
\whiledo{\PfCDivCom>1}{%
- \frac{\mathcolor{PfCSimpliCol}{\num{\the\PfCDivCom}}\times\num{\fpeval{\PfCNumerateurDiv/\the\PfCDivCom}}}{\mathcolor{PfCSimpliCol}{\num{\the\PfCDivCom}}\times\num{\fpeval{\PfCDenominateurDiv/\the\PfCDivCom}}}=\frac{\num{\fpeval{\PfCNumerateurDiv/\PfCDivCom}}}{\num{\fpeval{\PfCDenominateurDiv/\PfCDivCom}}}%
+ \frac{\mathcolor{PfCSimpliCol}{\num{\the\PfCDivCom}}\times\ifboolKV[ClesSimplification]{ACompleter}{\pointilles[20pt]}{\num{\fpeval{\PfCNumerateurDiv/\the\PfCDivCom}}}}{\mathcolor{PfCSimpliCol}{\num{\the\PfCDivCom}}\times\ifboolKV[ClesSimplification]{ACompleter}{\pointilles[20pt]}{\num{\fpeval{\PfCDenominateurDiv/\the\PfCDivCom}}}}=\frac{\ifboolKV[ClesSimplification]{ACompleter}{\pointilles[20pt]}{\num{\fpeval{\PfCNumerateurDiv/\PfCDivCom}}}}{\ifboolKV[ClesSimplification]{ACompleter}{\pointilles[20pt]}{\num{\fpeval{\PfCDenominateurDiv/\PfCDivCom}}}}%
\xdef\PfCNumerateurDiv{\fpeval{\PfCNumerateurDiv/\PfCDivCom}}%
\xdef\PfCDenominateurDiv{\fpeval{\PfCDenominateurDiv/\PfCDivCom}}%
\DiviseurCommun{\PfCNumerateurDiv}{\PfCDenominateurDiv}%
@@ -170,7 +174,7 @@
}{%
\ensuremath{%
\whiledo{\PfCDivCom>1}{%
- \frac{\num{\fpeval{\PfCNumerateurDiv/\the\PfCDivCom}}\times\mathcolor{PfCSimpliCol}{\num{\the\PfCDivCom}}}{\num{\fpeval{\PfCDenominateurDiv/\the\PfCDivCom}}\times\mathcolor{PfCSimpliCol}{\num{\the\PfCDivCom}}}=\frac{\num{\fpeval{\PfCNumerateurDiv/\PfCDivCom}}}{\num{\fpeval{\PfCDenominateurDiv/\PfCDivCom}}}%
+ \frac{\ifboolKV[ClesSimplification]{ACompleter}{\pointilles[20pt]}{\num{\fpeval{\PfCNumerateurDiv/\the\PfCDivCom}}}\times\mathcolor{PfCSimpliCol}{\num{\the\PfCDivCom}}}{\ifboolKV[ClesSimplification]{ACompleter}{\pointilles[20pt]}{\num{\fpeval{\PfCDenominateurDiv/\the\PfCDivCom}}}\times\mathcolor{PfCSimpliCol}{\num{\the\PfCDivCom}}}=\frac{\ifboolKV[ClesSimplification]{ACompleter}{\pointilles[20pt]}{\num{\fpeval{\PfCNumerateurDiv/\PfCDivCom}}}}{\ifboolKV[ClesSimplification]{ACompleter}{\pointilles[20pt]}{\num{\fpeval{\PfCDenominateurDiv/\PfCDivCom}}}}%
\xdef\PfCNumerateurDiv{\fpeval{\PfCNumerateurDiv/\PfCDivCom}}%
\xdef\PfCDenominateurDiv{\fpeval{\PfCDenominateurDiv/\PfCDivCom}}%
\DiviseurCommun{\PfCNumerateurDiv}{\PfCDenominateurDiv}%
@@ -180,7 +184,7 @@
}%
}%
-\setKVdefault[ClesSimplification]{Details=false,All=false,Longue=false,Fleches=false,Contraire=0,Couleur=black,Debut=false,Impose=false,Decomposition=false,DecompositionSeule=false}%
+\setKVdefault[ClesSimplification]{Details=false,All=false,Longue=false,Fleches=false,Contraire=0,Couleur=black,Debut=false,Impose=false,Decomposition=false,DecompositionSeule=false,ACompleter=false}%
\defKV[ClesSimplification]{Nombre=\setKV[ClesSimplification]{Impose}}%
\newcounter{NbFrac}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCSolides.tex b/macros/latex/contrib/profcollege/latex/PfCSolides.tex
index 037b80e50f..8ed8899a37 100644
--- a/macros/latex/contrib/profcollege/latex/PfCSolides.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCSolides.tex
@@ -1,6 +1,10 @@
%%%
% Solide et sections
%%%
+\def\filedateSolides{2024/08/20}%
+\def\fileversionSolides{0.1a}%
+\message{-- \filedateSolides\space v\fileversionSolides}%
+%
\setKVdefault[ClesSolides]{Nom=cube,Aretes,Sommets,Pointilles,Largeur=1.5,Hauteur=1,Profondeur=0.75,ListeSommets={A,B,C,D,E,F,G,H},Rho=1500,Phi=30,Theta=20,Distance=50,Code=false,Couleur=white,Anglex=0,Arete=1,RayonCone=1,HauteurCone=2,HauteurPrisme=2,SommetsPrisme=6,HauteurPyramide=2,SommetsPyramide=5,Reguliere=false,DecalageSommet={(0,0,0)},RayonCylindre=1,HauteurCylindre=2,RayonSphere=1,AutoLabel=true,Sections=false,CoefSection=0.3,Axes=false,PointsSection={M,N,O,P},RemplisSection=false,ObjetSection={0.5,E,H,0.25,F,G,G,B}}%
\defKV[ClesSolides]{Traces=\setKV[ClesSolides]{Code}}%
\defKV[ClesSolides]{Section=\setKV[ClesSolides]{Sections}}%
@@ -101,6 +105,7 @@
%Fc[101]:=1;Fc[102]:=2;Fc[103]:=6;Fc[104]:=5;
%endfor;
endfor;
+ DefinirSommets(#1);
DessineObjet;
% picture Depart;
% Depart=currentpicture;
@@ -108,6 +113,10 @@
% for k=1 upto 8:
% dotlabel.top(decimal(k),Projette(TS[k]));
% endfor;
+ u:=1cm;
+ if Code:
+ \useKV[ClesSolides]{Traces};
+ fi;
\end{mplibcode}
\mplibnumbersystem{scaled}
\fi
@@ -487,7 +496,6 @@
if Code:
\useKV[ClesSolides]{Traces};
fi;
-
\end{mplibcode}
\mplibnumbersystem{scaled}
\fi
@@ -729,7 +737,7 @@
% trace polygone(MSection1,MSection2,MSection3,MSection4);
color dcer,ccer;
% 1er cote -> ok
- DotLabel("",RetiensDefSection[4]);
+ %DotLabel("",RetiensDefSection[4]);
dcer:=Oeil-RetiensDefSection[4];
ccer:=Normal(RetiensDefSection[4],RetiensDefSection[2],RetiensDefSection[1]);
draw chemin(MSection1,MSection2) if (ProduitScalaire(dcer,ccer)<0):dashed evenly fi;
diff --git a/macros/latex/contrib/profcollege/latex/PfCSommeAngles.tex b/macros/latex/contrib/profcollege/latex/PfCSommeAngles.tex
index df62edfbce..f0a1e12cc9 100644
--- a/macros/latex/contrib/profcollege/latex/PfCSommeAngles.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCSommeAngles.tex
@@ -1,6 +1,10 @@
%%%
% Somme des angles
%%%
+\def\filedateSommeAngles{2024/08/04}%
+\def\fileversionSommeAngles{0.1}%
+\message{-- \filedateSommeAngles\space v\fileversionSommeAngles}%
+%
\setKVdefault[ClesSommeAngle]{Detail=true,Isocele=false,Rectangle=false,Figure=false,FigureSeule=false,Angle=0,Perso=false,Echelle=1cm}%
\def\MPFigureSommeAngle#1#2#3#4#5{%
diff --git a/macros/latex/contrib/profcollege/latex/PfCSquaro.tex b/macros/latex/contrib/profcollege/latex/PfCSquaro.tex
index 9de4a7afdf..7afe0e55fb 100644
--- a/macros/latex/contrib/profcollege/latex/PfCSquaro.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCSquaro.tex
@@ -1,10 +1,21 @@
%%%
% Squaro
%%%
-\setKVdefault[Squaro]{Solution=false,Longueur=8,Largeur=8,Echelle=8mm,Nom=Jeu1,Graines=false}
+\def\filedateSquarO{2024/08/04}%
+\def\fileversionSquarO{0.1}%
+\message{-- \filedateSquarO\space v\fileversionSquarO}%
+%
+\newtoks\tokPfCSquaro%
+\def\UpdatetoksSquaro#1\nil{\addtotok\tokPfCSquaro{#1,}}%
+
+\setKVdefault[Squaro]{Solution=false,Longueur=8,Largeur=8,Echelle=8mm,Nom=Jeu1,Graines=false,Persos=false}
\defKV[Squaro]{Graine=\setKV[Squaro]{Graines}}%
+\defKV[Squaro]{Perso=\setKV[Squaro]{Persos}\setsepchar{,}\ignoreemptyitems\readlist*\ListeSquaroPerso{#1}\reademptyitems%
+ \foreachitem\compteur\in\ListeSquaroPerso{\expandafter\UpdatetoksSquaro\compteur\nil}%
+}%
\NewDocumentCommand\SquarO{o}{%
+ \tokPfCSquaro{}%
\useKVdefault[Squaro]%
\setKV[Squaro]{#1}%
\BuildSquaro%
@@ -14,9 +25,10 @@
numeric Longueur,Largeur;
Longueur=\useKV[Squaro]{Longueur};
Largeur=\useKV[Squaro]{Largeur};
- boolean Solution,Graines;
+ boolean Solution,Graines,Persos;
Solution=\useKV[Squaro]{Solution};
Graines=\useKV[Squaro]{Graines};
+ Persos=\useKV[Squaro]{Persos};
if Graines:
randomseed:=\useKV[Squaro]{Graine};
fi;
@@ -26,13 +38,35 @@
p:=0;
pair A[];%centre des carrés.
boolean Allume[][];
-}
+ %
+ if Persos:
+ n:=0;
+ for p_=\the\tokPfCSquaro:
+ n:=n+1;
+ ligne:=(n-1) div (Largeur+2);
+ colonne:=(n-1) mod (Longueur+1);
+ Allume[ligne][colonne]=if p_=1:true else:false fi;
+ endfor;
+ else:
+ for k=0 upto Largeur:
+ for l=0 upto Longueur:
+ m:=uniformdeviate(1);
+ if m<0.5:
+ Allume[k][l]=true;
+ else:
+ Allume[k][l]=false;
+ fi;
+ endfor;
+ endfor;
+ fi;
+}%
\NewDocumentCommand\BuildSquaro{}{%
\ifluatex
\mplibforcehmode
\begin{mplibcode}
\BuildSquarobase
+ %
for k=0 upto Longueur-1:
for l=0 upto Largeur-1:
p:=p+1;
@@ -40,21 +74,18 @@
trace (unitsquare scaled u) shifted A[p];
endfor;
endfor;
-
+ %
for k=0 upto Largeur:
for l=0 upto Longueur:
- m:=uniformdeviate(1);
- if m<0.5:
- Allume[k][l]=true;
+ if Allume[k][l]:
fill cercles(u*(l,-k+1),1mm) if Solution=false:withcolor white fi;
else:
- Allume[k][l]=false;
fill cercles(u*(l,-k+1),1mm) withcolor white;
fi;
trace cercles(u*(l,-k+1),1mm);
endfor;
endfor;
-
+ %
for k=0 upto Largeur-1:
for l=0 upto Longueur-1:
Retiens:=0;
@@ -67,29 +98,28 @@
endfor;
\end{mplibcode}
\else
- \begin{mpost}[mpsettings={\BuildSquarobase}]
- for k=0 upto Longueur-1:
+ \begin{mpost}[mpsettings={\BuildSquarobase}]
+ %
+ %
+ for k=0 upto Longueur-1:
for l=0 upto Largeur-1:
p:=p+1;
A[p]=u*(k,-l);
trace (unitsquare scaled u) shifted A[p];
- endfor;
- endfor;
-
- for k=0 upto Largeur:
- for l=0 upto Longueur:
- m:=uniformdeviate(1);
- if m<0.5:
- Allume[k][l]=true;
+ endfor;
+ endfor;
+ %
+ for k=0 upto Largeur:
+ for l=0 upto Longueur:
+ if Allume[k][l]:
fill cercles(u*(l,-k+1),1mm) if Solution=false:withcolor white fi;
else:
- Allume[k][l]=false;
fill cercles(u*(l,-k+1),1mm) withcolor white;
fi;
trace cercles(u*(l,-k+1),1mm);
- endfor;
- endfor;
-
+ endfor;
+ endfor;
+ %
for k=0 upto Largeur-1:
for l=0 upto Longueur-1:
Retiens:=0;
diff --git a/macros/latex/contrib/profcollege/latex/PfCStatistiques.tex b/macros/latex/contrib/profcollege/latex/PfCStatistiques.tex
index 98566be426..5d7b786d8e 100644
--- a/macros/latex/contrib/profcollege/latex/PfCStatistiques.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCStatistiques.tex
@@ -1,6 +1,10 @@
%%%
% Statistiques
%%%
+\def\filedateStat{2024/08/04}%
+\def\fileversionStat{0.1}%
+\message{-- \filedateStat\space v\fileversionStat}%
+%
\newcommand\NbDonnees{}%
\newcommand\SommeDonnees{}%
\newcommand\EffectifTotal{}%
@@ -18,7 +22,7 @@ Tableau=false,Stretch=1,Frequence=false,EffectifTotal=false,%
Etendue=false,Moyenne=false,SET=false,ValeurExacte=false,MoyenneA,Somme,Mediane=false,DetailsMediane=false,UneMediane=false,QuartileUn=false,QuartileTrois=false,Total=false,Concret=false,%
Largeur=1cm,Precision=2,PrecisionF=0,Donnee=Valeurs,Effectif=Effectif,Grille=false,Origine=0,Angle=false,SemiAngle=false,Qualitatif=false,Classes=false,TableauVide=false,ECC=false,Coupure=10,CouleurTab=gray!15,Graphique=false,Batons=true,Centre=false,CentreVide=false,Crochets=false,%
% Pour les diags batons
-EpaisseurBatons=1,ListeCouleursB={a},Lecture=false,LectureFine=false,AideLecture=false,Reponses=false,DonneesSup=false,AbscisseRotation=false,Tiret=false,AngleRotationAbscisse=0,Pasx=1,Pasy=1,Unitex=0.5,Unitey=0.5,Depart=0,CouleurDefaut=black,Date=false,GrandNombrey=false,GrandNombrex=false,PasGrillex=1,PasGrilley=1,%
+EpaisseurBatons=1,ListeCouleursB={a},Lecture=false,LectureFine=false,AideLecture=false,Reponses=false,DonneesSup=false,AbscisseRotation=false,Tiret=false,Pasx=1,Pasy=1,Unitex=0.5,Unitey=0.5,Depart=0,CouleurDefaut=black,Date=false,GrandNombrey=false,GrandNombrex=false,PasGrillex=1,PasGrilley=1,%
% Pour les diags circulaires
Rayon=3cm,AffichageAngle=false,AffichageDonnee=false,ListeCouleurs={white},Hachures=false,ListeHachures={60},LectureInverse=false,EcartHachures=0.25,EpaisseurHachures=1,Legende,LegendeVide=false,ACompleter=false,DebutAngle=0,%on utilisera également la clé CouleurDefaut
%Pour les représentations
@@ -466,7 +470,6 @@ ModeleCouleur=5%
unitex:=\useKV[ClesStat]{Unitex}*cm;
unitey:=\useKV[ClesStat]{Unitey}*cm;
xpartorigine:=\useKV[ClesStat]{Origine};
- AngleRotation=\useKV[ClesStat]{AngleRotationAbscisse};
boolean Rotation,Lecture,LectureFine,AideLecture,DonneesSup,Reponses,Qualitatif,Tiret,LegendeVide,Retour,GrandNombrex,GrandNombrey,Date,Grille;
GrandNombrex=\useKV[ClesStat]{GrandNombrex};
GrandNombrey=\useKV[ClesStat]{GrandNombrey};
@@ -478,6 +481,11 @@ ModeleCouleur=5%
fi;
Date:=\useKV[ClesStat]{Date};
Rotation=\useKV[ClesStat]{AbscisseRotation};
+ if Rotation:
+ AngleRotation=\useKV[ClesStat]{AngleRotationAbscisse};
+ else:
+ AngleRotation=0;
+ fi;
Lecture:=\useKV[ClesStat]{Lecture};
LectureFine:=\useKV[ClesStat]{LectureFine};
AideLecture:=\useKV[ClesStat]{AideLecture};
diff --git a/macros/latex/contrib/profcollege/latex/PfCTableauDoubleEntree.tex b/macros/latex/contrib/profcollege/latex/PfCTableauDoubleEntree.tex
new file mode 100644
index 0000000000..f13fe2fad5
--- /dev/null
+++ b/macros/latex/contrib/profcollege/latex/PfCTableauDoubleEntree.tex
@@ -0,0 +1,62 @@
+%%%
+% Tableau Double Entree
+%%%
+\def\filedateTDE{2024/08/15}%
+\def\fileversionTDE{0.1a}%
+\message{-- \filedateTDE\space v\fileversionTDE}%
+
+\setKVdefault[TDE]{Colonnes=5,Lignes=4,Legende={},LegendesH={B,C,D,Total},LegendesV={1,2,Total},Couleur=Cornsilk,Vide=false,Totaux,Questions=false,Stretch=1}%
+
+\NewDocumentCommand\TableauDoubleEntree{om}{%
+ \useKVdefault[TDE]%
+ \setKV[TDE]{#1}%
+ \xdef\PfCFooH{\useKV[TDE]{LegendesH}}%
+ \xdef\PfCFooV{\useKV[TDE]{LegendesV}}%
+ \setsepchar{,}\reademptyitems%
+ \readlist*\ListeH{\PfCFooH}%
+ \readlist*\ListeV{\PfCFooV}%
+ \readlist*\ListeDonnees{#2}%
+ \ifboolKV[TDE]{Totaux}{}{%
+ % Vider les lignes du total
+ \xintFor* ##1 in{\xintSeq{1}{\fpeval{\ListeVlen-1}}}\do{%
+ \xintFor* ##2 in{\xintSeq{1}{\fpeval{\ListeHlen-0}}}\do{%
+ \modulo{\fpeval{##2+(##1-1)*(\ListeHlen-0)}}{\fpeval{\ListeHlen-0}}%
+ \ifnum\remainder=0\relax%
+ \xdef\ListeDonneesSansTotauxAv{\ListeDonneesSansTotauxAv,}%
+ \else%
+ \ifnum\fpeval{##2+(##1-1)*(\ListeHlen-0)}=1\relax%
+ \xdef\ListeDonneesSansTotauxAv{\ListeDonnees[\fpeval{##2+(##1-1)*(\ListeHlen-0)}]}%
+ \else%
+ \xdef\ListeDonneesSansTotauxAv{\ListeDonneesSansTotauxAv,\ListeDonnees[\fpeval{##2+(##1-1)*(\ListeHlen-0)}]}%
+ \fi%
+ \fi%
+ }%
+ }%
+ % On ajoute la dernière ligne qui est vide
+ \xintFor* ##2 in{\xintSeq{1}{\fpeval{\ListeHlen-0}}}\do{%
+ \xdef\ListeDonneesSansTotauxAv{\ListeDonneesSansTotauxAv,}%
+ }%
+ % On relit la liste des données.
+ \setsepchar{,}\reademptyitems%
+ \readlist*\ListeDonnees{\ListeDonneesSansTotauxAv}%
+ \reademptyitems%
+ }%
+ %
+ % Pour vider le tableau, on utilise la clé <Vide>.
+ % On choisit quelques éléments ^^ à écrire
+ \ifboolKV[TDE]{Questions}{%
+ %en réflexion (voir v5)
+ }{}%
+ %
+ \colorlet{PfCColorTDE}{\useKV[TDE]{Couleur}}%
+ \renewcommand{\arraystretch}{\useKV[TDE]{Stretch}}%
+ \begin{tabular}{|*{\fpeval{\ListeHlen+1}}{c|}}
+ \hline
+ \cellcolor{PfCColorTDE}\useKV[TDE]{Legende}\xintFor*##1 in{\xintSeq{1}{\ListeHlen}}\do{\uppercase{&}\cellcolor{PfCColorTDE}\ListeH[##1]}\\
+ \hline
+ \xintFor* ##1 in{\xintSeq{1}{\ListeVlen}}\do{
+ \cellcolor{PfCColorTDE}\ListeV[##1]\xintFor*##2 in{\xintSeq{1}{\ListeHlen}}\do{\uppercase{&}\ifboolKV[TDE]{Vide}{}{\ListeDonnees[\fpeval{(##2-0)+(##1-1)*(\ListeHlen-0)}]}}\\
+ \hline
+ }
+ \end{tabular}
+}% \ No newline at end of file
diff --git a/macros/latex/contrib/profcollege/latex/PfCTableauxUnites.tex b/macros/latex/contrib/profcollege/latex/PfCTableauxUnites.tex
index 75270180d3..933fcb80a2 100644
--- a/macros/latex/contrib/profcollege/latex/PfCTableauxUnites.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCTableauxUnites.tex
@@ -1,7 +1,11 @@
%%%
% Tableaux d'unit\'es
%%%
-\setKVdefault[ClesTableaux]{Virgule=true,Incline=false,Entiers=false,Decimaux=false,Milliards=false,Millions=false,Micro=false,Nano=false,Partie=false,CouleurG=gray!15,CouleurM=gray!15,Couleurm=gray!15,Couleuru=gray!15,Couleurd=gray!15,Classes=false,Nombres=false,Puissances=false,NbLignes=2,Metre=false,Are=false,Capacite=false,Carre=false,CarreA=false,Cube=false,Litre=false,Gramme=false,Fleches=false,FlechesB=false,FlechesH=false,Colonnes=false,Prefixes=false,Escalier=false,CubeA=false,Taille=5,Largeur=4.75em,Nom=PfCTableau,CodeAfter={},PuissancesSeules=false,Colonne=-1,Octet=false,CouleurGN=white,CadreGN=black,Tabcolsep=0.275\tabcolsep,Exterieur=false,Condense=false}%
+\def\filedateTableaux{2024/08/15}%
+\def\fileversionTableaux{0.1a}%
+\message{-- \filedateTableaux\space v\fileversionTableaux}%
+\message{`PfCTableauxUnites.tex' v\fileversionTableaux\space (\filedateTableaux)}
+\setKVdefault[ClesTableaux]{Virgule=true,Incline=false,Entiers=false,Decimaux=false,Milliards=false,Millions=false,Micro=false,Nano=false,Partie=false,CouleurG=gray!15,CouleurM=gray!15,Couleurm=gray!15,Couleuru=gray!15,Couleurd=gray!15,Classes=false,Nombres=false,Puissances=false,NbLignes=2,Metre=false,Are=false,Capacite=false,Carre=false,CarreA=false,Cube=false,Litre=false,Gramme=false,Fleches=false,FlechesB=false,FlechesH=false,Colonnes=false,Prefixes=false,Escalier=false,CubeA=false,Taille=5,Largeur=4.75em,Nom=PfCTableau,CodeAfter={},PuissancesSeules=false,Colonne=-1,Octet=false,CouleurGN=white,CadreGN=black,Tabcolsep=0.275\tabcolsep,Exterieur=false,Condense=false,DoubleEntree=false}%
\defKV[ClesTableaux]{ColonnesSup=\setKV[ClesTableaux]{Exterieur}}%
%
\newcommand\PfCTBstrut{\rule[-1.2ex]{0pt}{3.8ex}}% Top and Bottom strut
@@ -52,7 +56,10 @@
\xdef\PfCCoefConversion{10}%
}{}%
\PfCTableauIncline%
- }{%
+ }{%Fin Escalier
+ \ifboolKV[ClesTableaux]{DoubleEntree}{%
+ \TableauDoubleEntree[#1]{#2}%
+ }{}%
%
%%% Clé Octet
%
diff --git a/macros/latex/contrib/profcollege/latex/PfCTablesOperations.tex b/macros/latex/contrib/profcollege/latex/PfCTablesOperations.tex
index 3399cbecff..df109d964a 100644
--- a/macros/latex/contrib/profcollege/latex/PfCTablesOperations.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCTablesOperations.tex
@@ -1,6 +1,10 @@
%%%
% Tables Addition-Multiplication
%%%
+\def\filedateTableOp{2024/08/04}%
+\def\fileversionTableOp{0.1}%
+\message{-- \filedateTableOp\space v\fileversionTableOp}%
+%
\setKVdefault[Tables]{Addition=false,Soustraction=false,Multiplication,Seul=false,Debut=0,Fin=10,Couleur=white,Inverse=false}
% pour m\'emoire
diff --git a/macros/latex/contrib/profcollege/latex/PfCTectonic.tex b/macros/latex/contrib/profcollege/latex/PfCTectonic.tex
index df859b0453..3026bf9be0 100644
--- a/macros/latex/contrib/profcollege/latex/PfCTectonic.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCTectonic.tex
@@ -1,6 +1,10 @@
%%%
% Tectonic
%%%
+\def\filedateTectonic{2024/08/04}%
+\def\fileversionTectonic{0.1}%
+\message{-- \filedateTectonic\space v\fileversionTectonic}%
+%
\setKVdefault[ClesTectonic]{CouleurCase=LightGray,TLargeur=5,THauteur=5,Solution=false,Largeur=25pt,CouleurSolution=black,Tailles=false,Aide=false}%
\defKV[ClesTectonic]{Taille=\setKV[ClesTectonic]{Tailles}}%
\defKV[ClesTectonic]{ListeNombres=\setKV[ClesTectonic]{Aide}}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCThales.tex b/macros/latex/contrib/profcollege/latex/PfCThales.tex
index d4adb5be01..140bde3f23 100644
--- a/macros/latex/contrib/profcollege/latex/PfCThales.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCThales.tex
@@ -1,6 +1,10 @@
%%%
% Thales
%%%
+\def\filedateThales{2024/08/04}%
+\def\fileversionThales{0.1}%
+\message{-- \filedateThales\space v\fileversionThales}%
+%
\newcount\ppcm%
\newcommand\PPCM[2]{%
diff --git a/macros/latex/contrib/profcollege/latex/PfCTicketCaisse.tex b/macros/latex/contrib/profcollege/latex/PfCTicketCaisse.tex
index 1c460e3693..2286b08332 100644
--- a/macros/latex/contrib/profcollege/latex/PfCTicketCaisse.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCTicketCaisse.tex
@@ -1,8 +1,16 @@
%%%
% Ticket de caisse
%%%
+\def\filedateTicketCaisse{2024/08/04}%
+\def\fileversionTicketCaisse{0.1}%
+\message{-- \filedateTicketCaisse\space v\fileversionTicketCaisse}%
+%
\newcounter{PfCNbInsulte}%
+\newcounter{PfCChoixService}%
\setcounter{PfCNbInsulte}{0}%
+\setcounter{PfCChoixService}{0}%
+%
+\newlength\PfCTicketLarg
\NewDocumentCommand\PfCPrixInsulte{sm}{%
\setsepchar{,}\ignoreemptyitems%
@@ -67,15 +75,17 @@
}%
\makeatother
-\setKVdefault[TicketCaisse]{Largeur=222,Especes=50,Enseigne=Au comptoir des maths,DateAchat=\today,HeureAchat=15:13:34,Taches=false,Rendu,Total,UK=false,US=false,CFA=false,CFP=false,CHF=false,Euro=false,Solution=false}
+\setKVdefault[TicketCaisse]{Largeur=222pt,Especes=50,Simple=false,Taxes=false,SansRendu=false,Enseigne=Au comptoir des maths,DateAchat=\today,HeureAchat=15:13:34,Taches=false,Rendu,Total,SousTotal=false,UK=false,US=false,CFA=false,CFP=false,CHF=false,Euro=false,Solution=false}
\defKV[TicketCaisse]{Couleur=\colorlet{PfCTicketCouleurSolution}{#1}\setKV[TicketCaisse]{Solution}}
+\defKV[TicketCaisse]{Service=\setKV[TicketCaisse]{Taxes}}
-\NewDocumentCommand\TicketCaisse{om}{%
+\NewDocumentCommand\TicketCaisse{som}{%
\setcounter{PfCNbInsulte}{0}%
\useKVdefault[TicketCaisse]%
- \setKV[TicketCaisse]{#1}%
+ \setKV[TicketCaisse]{#2}%
+ \setlength{\PfCTicketLarg}{\useKV[TicketCaisse]{Largeur}}%
\setsepchar[*]{,*/}%
- \readlist*\ListeAchats{#2}%
+ \readlist*\ListeAchats{#3}%
% On fait trois listes pour les retenir
% Liste Quantités
\xdef\PfCFooQuantites{}%
@@ -122,9 +132,123 @@
\xintFor* ##1 in{\xintSeq{1}{\ListeAchatslen}}\do{%
\xdef\PfCTCTotal{\fpeval{\PfCTCTotal+\ListeQuantites[##1]*\ListePUnitaires[##1]}}%
}%
-% Le coût total est \PfCTCTotal\\
+ \ifboolKV[TicketCaisse]{Taxes}{%
+ % On décompose la clé
+ \StrChar{\useKV[TicketCaisse]{Service}}{1}[\MyLetter]%
+ % Si le premier caractère est !, il faut regarder si le deuxième caractère est une étoile
+ \IfStrEq{\MyLetter}{!}{%
+ \StrChar{\useKV[TicketCaisse]{Service}}{2}[\MyLettera]%
+ \IfStrEq{\MyLettera}{*}{%
+ \StrGobbleLeft{\useKV[TicketCaisse]{Service}}{2}[\PfCTCValeurService]
+ \setcounter{PfCChoixService}{3}%
+ }{%
+ \StrGobbleLeft{\useKV[TicketCaisse]{Service}}{1}[\PfCTCValeurService]
+ \setcounter{PfCChoixService}{1}%
+ }%
+ }{%il faut regarder si c'est une étoile
+ \StrChar{\useKV[TicketCaisse]{Service}}{1}[\MyLettera]%
+ \IfStrEq{\MyLettera}{*}{%
+ \StrGobbleLeft{\useKV[TicketCaisse]{Service}}{1}[\PfCTCValeurService]
+ \setcounter{PfCChoixService}{2}
+ }{%
+ \xdef\PfCTCValeurService{\useKV[TicketCaisse]{Service}}%
+ \setcounter{PfCChoixService}{0}
+ }%
+ }%
+ % On fait les calculs associés à la clé.
+ \xdef\PfCTCSousTotal{\PfCTCTotal}%
+ \xdef\PfCTCService{\fpeval{\PfCTCValeurService*\PfCTCSousTotal/100}}%
+ \xdef\PfCTCTotal{\fpeval{\PfCTCSousTotal+\PfCTCService}}%
+ }{}%
+ % Le coût total est \PfCTCTotal\\
+ \IfBooleanTF{#1}{%
+ \ttfamily
+ \begin{tabular}{|m{0.48\PfCTicketLarg}m{0.13\PfCTicketLarg}m{0.165\PfCTicketLarg}m{0.225\PfCTicketLarg}|}%
+ \hline
+ &&&\\%
+ \multicolumn{4}{|c|}{\Large\bfseries\useKV[TicketCaisse]{Enseigne}}\\%
+ &&&\\%
+ \hline%
+ &&&\\%
+ \footnotesize\sc Description&\centering \footnotesize\sc Qte.&\centering\footnotesize\sc P.u.&\hfill\footnotesize\sc Prix \ifboolKV[TicketCaisse]{Taxes}{H.T.}{Net}\\%
+ &&&\\%
+ \xintFor* ##1 in{\xintSeq{1}{\ListeAchatslen}}\do{%
+ \ListeElements[##1]&%
+ \centering
+ \footnotesize%
+ \StrChar{\ListeAchats[##1,1]}{1}[\MyLetter]%
+ \IfStrEq{\MyLetter}{!}{\PfCPrixInsulte*{\ListeQuantites[##1]}}{\xintifboolexpr{\fpeval{\ListeQuantites[##1]}==1}{}{\num{\ListeQuantites[##1]}}}%
+ &
+ \hfill
+ \footnotesize
+ %Savoir si le nombre d'articles est affiché
+ \StrChar{\ListeAchats[##1,1]}{1}[\MyLetter]%
+ % Si le nombre d'articles n'est pas affiché, il faut impérativement afficher le prix unitaire
+ \IfStrEq{\MyLetter}{!}{%
+ \PrixTicket{\ListePUnitaires[##1]}%
+ }{%
+ % On regarde si on affiche le prix unitaire
+ \StrChar{\ListeAchats[##1,3]}{1}[\MyLettera]%
+ % Si c'est un !, on affiche pas
+ % Sinon, on affiche
+ \IfStrEq{\MyLettera}{!}{%
+ \PfCPrixInsulte*{\PrixTicket{\ListePUnitaires[##1]}}%
+ }{%
+ \xintifboolexpr{\fpeval{\ListeQuantites[##1]}==1}{}{%
+ \PrixTicket{\ListePUnitaires[##1]}%
+ }%
+ }%
+ }%
+ &\hfill
+ \StrChar{\ListeAchats[##1,3]}{1}[\MyLetter]%
+ % Si le premier caractère est !, il faut regarder si le deuxième caractère est une étoile
+ \IfStrEq{\MyLetter}{!}{%
+ \StrChar{\ListeAchats[##1,3]}{2}[\MyLettera]%
+ \IfStrEq{\MyLettera}{*}{%
+ \PfCPrixInsulte*{\PrixTicket{\fpeval{\ListeQuantites[##1]*\ListePUnitaires[##1]}}}%
+ }{%
+ \PrixTicket{\fpeval{\ListeQuantites[##1]*\ListePUnitaires[##1]}}%
+ }%
+ }{%il faut regarder si c'est une étoile
+ \StrChar{\ListeAchats[##1,3]}{1}[\MyLettera]%
+ \IfStrEq{\MyLettera}{*}{%
+ \PfCPrixInsulte{\PrixTicket{\fpeval{\ListeQuantites[##1]*\ListePUnitaires[##1]}}}%
+ }{%
+ \PrixTicket{\fpeval{\ListeQuantites[##1]*\ListePUnitaires[##1]}}%
+ }%
+ }%
+ \\
+ }%
+ &&&\\%
+ \hline%
+ &&&\\
+ % Partie Service
+ \ifboolKV[TicketCaisse]{Taxes}{%
+ Total H.T.\uppercase{&}\uppercase{&}\uppercase{&}\hfill\ifboolKV[TicketCaisse]{SousTotal}{\ifnum\thePfCNbInsulte=0\relax\PrixTicket{\PfCTCSousTotal}\else\PfCPrixInsulte*{\PrixTicket{\PfCTCSousTotal}}\fi}{\PfCPrixInsulte*{\PrixTicket{\PfCTCSousTotal}}}
+ \\%
+ Service %
+ \ifodd\thePfCChoixService\relax \PfCPrixInsulte{\num{\PfCTCValeurService}}\else\num{\PfCTCValeurService}\fi~\si{\percent}%
+ &&&\hfill
+ \ifnum\thePfCChoixService>1\relax \PfCPrixInsulte{\PrixTicket{\PfCTCService}}\else\PrixTicket{\PfCTCService}\fi%
+ \\
+ &&&\\
+ \hline
+ &&&\\
+ }{}%
+ \ifboolKV[TicketCaisse]{Simple}{}{%
+ Total\ifboolKV[TicketCaisse]{Taxes}{ T.T.C.}{}&&&\hfill\ifboolKV[TicketCaisse]{Total}{\ifnum\thePfCNbInsulte=0\relax\PrixTicket{\PfCTCTotal}\else\PfCPrixInsulte*{\PrixTicket{\PfCTCTotal}}\fi}{\PfCPrixInsulte*{\PrixTicket{\PfCTCTotal}}}\\%
+ \ifboolKV[TicketCaisse]{SansRendu}{}{%
+ Espèces&&&\hfill\PrixTicket{\useKV[TicketCaisse]{Especes}}\\%
+ Rendu&&&\hfill\ifboolKV[TicketCaisse]{Rendu}{\PrixTicket{\fpeval{\useKV[TicketCaisse]{Especes}-\PfCTCTotal}}}{\PfCPrixInsulte*{\PrixTicket{\fpeval{\useKV[TicketCaisse]{Especes}-\PfCTCTotal}}}}\\%
+ }
+ &&&\\%
+ }%
+ \multicolumn{4}{|c|}{\footnotesize\useKV[TicketCaisse]{DateAchat}\qquad\useKV[TicketCaisse]{HeureAchat}}\\%
+ \hline
+ \end{tabular}
+ }{%
{\ttfamily%
- \begin{NiceTabular}{m{107pt}m{29pt}m{36pt}m{50pt}}%
+ \begin{NiceTabular}{m{0.48\PfCTicketLarg}m{0.13\PfCTicketLarg}m{0.165\PfCTicketLarg}m{0.225\PfCTicketLarg}}%
\CodeBefore
\tikz\node[opacity=0.2,yshift=-1.5cm] at ($(1-|1)!0.5!(1-|last)$) {\Large\bfseries\reflectbox{
\begin{tabular}{c}
@@ -148,7 +272,7 @@
\\%
\Cdots\\%
\\%
- \Block[l]{}{\footnotesize\sc Description}&\Block{}{\footnotesize\sc Qte.}&\Block{}{\footnotesize\sc P.u.}&\Block[r]{}{\footnotesize\sc Prix Net}\\%
+ \Block[l]{}{\footnotesize\sc Description}&\Block{}{\footnotesize\sc Qte.}&\Block{}{\footnotesize\sc P.u.}&\Block[r]{}{\footnotesize\sc Prix \ifboolKV[TicketCaisse]{Taxes}{H.T.}{Net}}\\%
\\%
\xintFor* ##1 in{\xintSeq{1}{\ListeAchatslen}}\do{%
\ListeElements[##1]&%
@@ -200,11 +324,28 @@
}%
\\%
\Cdots\\%
- Total&&&\Block[r]{}{\ifboolKV[TicketCaisse]{Total}{\ifnum\thePfCNbInsulte=0\relax\PrixTicket{\PfCTCTotal}\else\PfCPrixInsulte*{\PrixTicket{\PfCTCTotal}}\fi}{\PfCPrixInsulte*{\PrixTicket{\PfCTCTotal}}}}\\%
- Espèces&&&\Block[r]{}{\PrixTicket{\useKV[TicketCaisse]{Especes}}}\\%
- Rendu&&&\Block[r]{}{\ifboolKV[TicketCaisse]{Rendu}{\PrixTicket{\fpeval{\useKV[TicketCaisse]{Especes}-\PfCTCTotal}}}{\PfCPrixInsulte*{\PrixTicket{\fpeval{\useKV[TicketCaisse]{Especes}-\PfCTCTotal}}}}}\\%
+ % Partie Service
+ \ifboolKV[TicketCaisse]{Taxes}{%
+ Total H.T.&&&\Block[r]{}{\ifboolKV[TicketCaisse]{SousTotal}{\ifnum\thePfCNbInsulte=0\relax\PrixTicket{\PfCTCSousTotal}\else\PfCPrixInsulte*{\PrixTicket{\PfCTCSousTotal}}\fi}{\PfCPrixInsulte*{\PrixTicket{\PfCTCSousTotal}}}
+ }\\%
+ Service %
+ \ifodd\thePfCChoixService\relax \PfCPrixInsulte{\num{\PfCTCValeurService}}\else\num{\PfCTCValeurService}\fi~\si{\percent}%
+ &&&\Block[r]{}{%
+ \ifnum\thePfCChoixService>1\relax \PfCPrixInsulte{\PrixTicket{\PfCTCService}}\else\PrixTicket{\PfCTCService}\fi%
+ }\\
+ \Cdots\\
+ \\
+ }{}%
+ \ifboolKV[TicketCaisse]{Simple}{}{%
+ Total\ifboolKV[TicketCaisse]{Taxes}{ T.T.C.}{}&&&\Block[r]{}{\ifboolKV[TicketCaisse]{Total}{\ifnum\thePfCNbInsulte=0\relax\PrixTicket{\PfCTCTotal}\else\PfCPrixInsulte*{\PrixTicket{\PfCTCTotal}}\fi}{\PfCPrixInsulte*{\PrixTicket{\PfCTCTotal}}}}\\%
+ \ifboolKV[TicketCaisse]{SansRendu}{}{%
+ Espèces&&&\Block[r]{}{\PrixTicket{\useKV[TicketCaisse]{Especes}}}\\%
+ Rendu&&&\Block[r]{}{\ifboolKV[TicketCaisse]{Rendu}{\PrixTicket{\fpeval{\useKV[TicketCaisse]{Especes}-\PfCTCTotal}}}{\PfCPrixInsulte*{\PrixTicket{\fpeval{\useKV[TicketCaisse]{Especes}-\PfCTCTotal}}}}}\\%
+ }
\\%
- \Block{1-4}{\footnotesize\useKV[TicketCaisse]{DateAchat}\qquad\useKV[TicketCaisse]{HeureAchat}}&&&\\%
+ }%
+ \Block{1-4}{\footnotesize\useKV[TicketCaisse]{DateAchat}\qquad\useKV[TicketCaisse]{HeureAchat}}&&&\\%
\end{NiceTabular}
}%
+ }
}% \ No newline at end of file
diff --git a/macros/latex/contrib/profcollege/latex/PfCTortueBase.tex b/macros/latex/contrib/profcollege/latex/PfCTortueBase.tex
index 461a42fb71..05a6524e98 100644
--- a/macros/latex/contrib/profcollege/latex/PfCTortueBase.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCTortueBase.tex
@@ -1,6 +1,10 @@
%%%
% Tortue
%%%
+\def\filedateTortue{2024/08/04}%
+\def\fileversionTortue{0.1}%
+\message{-- \filedateTortue\space v\fileversionTortue}%
+%
\setKVdefault[Tortue]{%
Pas=0.2mm,%Déplacement,
Etapes=false,%Pour arrêter la construction à une étape particulière
diff --git a/macros/latex/contrib/profcollege/latex/PfCTrigonometrie.tex b/macros/latex/contrib/profcollege/latex/PfCTrigonometrie.tex
index 38fe05ce60..0bd7a90da6 100644
--- a/macros/latex/contrib/profcollege/latex/PfCTrigonometrie.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCTrigonometrie.tex
@@ -1,6 +1,10 @@
%%%
% Trigonom\'etrie
%%%
+\def\filedateTrigo{2024/08/04}%
+\def\fileversionTrigo{0.1}%
+\message{-- \filedateTrigo\space v\fileversionTrigo}%
+%
\def\MPFigTrigo#1#2#3#4#5#6#7#8{%
\ifluatex
% \mplibcodeinherit{enable}
diff --git a/macros/latex/contrib/profcollege/latex/PfCTrio.tex b/macros/latex/contrib/profcollege/latex/PfCTrio.tex
index 560258ff59..06c0a77e3b 100644
--- a/macros/latex/contrib/profcollege/latex/PfCTrio.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCTrio.tex
@@ -1,3 +1,10 @@
+%%%
+%Trio
+%%%
+\def\filedateTrio{2024/08/04}%
+\def\fileversionTrio{0.1}%
+\message{-- \filedateTrio\space v\fileversionTrio}%
+%
\newlength\PfCTrioHauteur%
\newcounter{PfCTrioLettre}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCTriominos.tex b/macros/latex/contrib/profcollege/latex/PfCTriominos.tex
index efc6cd24b3..b2ece6c0d4 100644
--- a/macros/latex/contrib/profcollege/latex/PfCTriominos.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCTriominos.tex
@@ -1,6 +1,10 @@
%%%
% Triominos
%%%
+\def\filedateTriominos{2024/08/04}%
+\def\fileversionTriominos{0.1}%
+\message{-- \filedateTriominos\space v\fileversionTriominos}%
+%
\setKVdefault[ClesTriomino]{Longueur=5cm,Etages=3,Ecart=0.6,AffichagePiece=false,Hexagone=false,Recapitulatif=false,Colonnes=2}%
\defKV[ClesTriomino]{Piece=\setKV[ClesTriomino]{AffichagePiece=true}}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCUrneProba.tex b/macros/latex/contrib/profcollege/latex/PfCUrneProba.tex
index 895f96136c..0d00e039c4 100644
--- a/macros/latex/contrib/profcollege/latex/PfCUrneProba.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCUrneProba.tex
@@ -1,6 +1,10 @@
%%%
% Urne et probabilités
%%%
+\def\filedateUrneProba{2024/08/04}%
+\def\fileversionUrneProba{0.1}%
+\message{-- \filedateUrneProba\space v\fileversionUrneProba}%
+%
\newtoks\tokUrneListeCouleurs%
\newtoks\tokUrneListeColonnes%
\newtoks\tokUrneListeNombres%
diff --git a/macros/latex/contrib/profcollege/latex/PfCVisualisationMulDeci.tex b/macros/latex/contrib/profcollege/latex/PfCVisualisationMulDeci.tex
index 54a1a079cc..99024a4358 100644
--- a/macros/latex/contrib/profcollege/latex/PfCVisualisationMulDeci.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCVisualisationMulDeci.tex
@@ -1,6 +1,10 @@
%%%
% Visualisation Multiplication Décimaux
%%%
+\def\filedateVisuMulDeci{2024/08/04}%
+\def\fileversionVisuMulDeci{0.1}%
+\message{-- \filedateVisuMulDeci\space v\fileversionVisuMulDeci}%
+%
\setKVdefault[VisMulDec]{Couleur=Orange,CouleurUnite=DarkGreen,Dixiemes=false,Unite=2}%
\newtoks\toksvismuldec%
diff --git a/macros/latex/contrib/profcollege/latex/PfCVueCubes.tex b/macros/latex/contrib/profcollege/latex/PfCVueCubes.tex
index 9365b7e621..196358d9bf 100644
--- a/macros/latex/contrib/profcollege/latex/PfCVueCubes.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCVueCubes.tex
@@ -1,6 +1,10 @@
%%%
% Vue Cubes
%%%
+\def\filedateVueCubes{2024/08/26}%
+\def\fileversionVueCubes{0.1a}%
+\message{-- \filedateVueCubes\space v\fileversionVueCubes}%
+%
\setKVdefault[VueCubes]{Solution=false,Hauteur=5,Profondeur=4,Largeur=3,Angle=60,Nom=Ex1,Trou=false,Echelle=0.25,CouleurCube=LightSteelBlue,CouleurFleche=LightGray,Face=false,Creation=false,Grilles=false,Seul=false,Perso=false,EclateX=0,EclateZ=0,EclateY=0}
\newtoks\toklisteVueCube%
@@ -30,9 +34,9 @@
\readlist*\PfCListeHauteursCubes{#2}%
\reademptyitems%
\foreachitem\compteur\in\PfCListeHauteursCubes{\expandafter\UpdatetoksVueCube\compteur\nil}%
- \BuildVueCubes{\useKV[VueCubes]{Angle}}{\the\toklisteVueCube}%
+ \BuildVueCubes{\useKV[VueCubes]{Angle}}{\the\toklisteVueCube}{\useKV[VueCubes]{Nom}}%
}{%
- \BuildVueCubes{\useKV[VueCubes]{Angle}}{}%
+ \BuildVueCubes{\useKV[VueCubes]{Angle}}{}{\useKV[VueCubes]{Nom}}%
}%
}%
}%
@@ -100,11 +104,13 @@
\fi
}
-\NewDocumentCommand\BuildVueCubes{m m}{%
+\NewDocumentCommand\BuildVueCubes{m m m}{%
\ifluatex
\mplibforcehmode
\xdef\PfCVueCubeNom{\useKV[VueCubes]{Nom}}%
\begin{mplibcode}[\PfCVueCubeNom]
+ string NomRetenu;
+ NomRetenu=str #3;
input PfCSolid;
intensite:=1.5;
@@ -176,6 +182,9 @@
endfor;
fi;
+ write decimal(TotalObj) to "PfCNombreCubes"&NomRetenu&".tex";%
+ write EOF to "PfCNombreCubes"&NomRetenu&".tex";%
+
% Pour la fleche
path Fleche;
color A[];
diff --git a/macros/latex/contrib/profcollege/latex/PfCYohaku.tex b/macros/latex/contrib/profcollege/latex/PfCYohaku.tex
index c710834b93..942e66c111 100644
--- a/macros/latex/contrib/profcollege/latex/PfCYohaku.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCYohaku.tex
@@ -1,6 +1,10 @@
%%%
% Yohaku
%%%
+\def\filedateYohaku{2024/08/04}%
+\def\fileversionYohaku{0.1}%
+\message{-- \filedateYohaku\space v\fileversionYohaku}%
+%
\setKVdefault[Yohaku]{Taille=2,Largeur=1cm,Hauteur=1cm,Addition,Multiplication=false,Perso=false,Limite=50,Relatif=false,Negatif=false,Pair=false,Impair=false,Premier=false,Solution=false,Visible=false,Bordure=false,CouleurResultat=gray!15,Ligne=0,Colonne=0,PasL=0,PasC=0,CouleurZone=gray!25}%
\defKV[Yohaku]{Case=\setKV[Yohaku]{Visible}}%
diff --git a/macros/latex/contrib/profcollege/latex/ProfCollege.sty b/macros/latex/contrib/profcollege/latex/ProfCollege.sty
index a6b767a3bf..df794a8d86 100644
--- a/macros/latex/contrib/profcollege/latex/ProfCollege.sty
+++ b/macros/latex/contrib/profcollege/latex/ProfCollege.sty
@@ -2,9 +2,9 @@
% licence : Released under the LaTeX Project Public License v1.3c
% or later, see http://www.latex-project.org/lppl.txtf
\NeedsTeXFormat{LaTeX2e}%
-\def\filedate{2024/07/03}%
+\def\filedate{2024/09/04}%
\let\PfCfiledate\filedate%
-\def\fileversion{0.99-A-g}%
+\def\fileversion{0.99-A-j}%
\let\PfCfileversion\fileversion%
\ProvidesPackage{ProfCollege}[\filedate\space v\fileversion\space Aide pour utiliser LaTeX au college]%
@@ -340,6 +340,37 @@
\fi
}%
+\newlength{\PfCLongueurBarreHor}
+\setKVdefault[PfCLigneCompleter]{Ecart=20pt,Couleurs=false}%
+\defKV[PfCLigneCompleter]{Couleur=\setKV[PfCLigneCompleter]{Couleurs}}%
+
+\NewDocumentCommand\ListeACompleter{som}{%
+ \useKVdefault[PfCLigneCompleter]%
+ \setKV[PfCLigneCompleter]{#2}%
+ \ifboolKV[PfCLigneCompleter]{Couleurs}{\colorlet{PfCLC}{\useKV[PfCLigneCompleter]{Couleur}}}{}%
+ \setlength{\PfCLongueurBarreHor}{\useKV[PfCLigneCompleter]{Ecart}}%
+ \setsepchar{,}\reademptyitems%
+ \readlist*\ListeTiti{#3}%
+ \foreachitem\compteur\in\ListeTiti{%
+ \itemtomacro\ListeTiti[\compteurcnt]\PfCCaractere%
+ \StrChar{\PfCCaractere}{1}[\RetiensElmt]%
+ \IfStrEq{\RetiensElmt}{!}{%
+ \IfBooleanTF{#1}{%
+ \ifboolKV[PfCLigneCompleter]{Couleurs}{\colorlet{saved}{.}\color{PfCLC}}{}\StrGobbleLeft{\PfCCaractere}{1}\ifboolKV[PfCLigneCompleter]{Couleurs}{\color{saved}}{}%
+ }{%
+ \hbox to \PfCLongueurBarreHor{\hrulefill}%
+ }
+ }{%
+ \ListeTiti[\compteurcnt]%
+ }%
+ \ifnum\compteurcnt=\ListeTitilen\relax%
+ .%
+ \else%
+ ,
+ \fi%
+ }%
+}%
+
%https://tex.stackexchange.com/questions/128991/frac-or-inference-rule-with-dotted-line
\newcommand\PfCfrac[2]{%
\ooalign{$\genfrac{}{}{0pt}{0}{#1}{#2}$\cr\PfCdotover\cr}%
@@ -825,6 +856,9 @@
\def\PfCSymbolTimes{\times}%
\def\PfCSymbolDiv{\div}%
+\input{PfCCheque}
+\input{PfCCalculsDetailles}
+\input{PfCTableauDoubleEntree}
\input{PfCUrneProba}
\input{PfCProbaFrequence}
\input{PfCVisualisationMulDeci}
@@ -975,8 +1009,5 @@
\input{PfCScratch}
\RequirePackage{PfCInfixRPN}
-%\makeatletter
-%\let\@nil\@empty
-%\makeatother
\input{PfCArbreCalcul} \ No newline at end of file
diff --git a/macros/latex/contrib/profcollege/metapost/PfCGeometrie.mp b/macros/latex/contrib/profcollege/metapost/PfCGeometrie.mp
index 7ec73e648c..dc007c3643 100644
--- a/macros/latex/contrib/profcollege/metapost/PfCGeometrie.mp
+++ b/macros/latex/contrib/profcollege/metapost/PfCGeometrie.mp
@@ -526,6 +526,8 @@ enddef;
vardef marque_para(expr dd,ee,pa)=
save im;
picture im;
+ string totem;
+ totem="//";
pair kk,ll,mn,mo;
kk=point(pa*length dd) of dd;
ll=projection(kk,point(0.25*length ee) of ee,point(0.5*length ee) of ee);
@@ -534,7 +536,8 @@ vardef marque_para(expr dd,ee,pa)=
im=image(
drawarrow mo--kk;
drawarrow symetrie(mo,mn)--ll;
- label(btex // etex,mn);
+% label(btex $//$ etex,mn);
+ label(totem,mn);
);
im
enddef;
@@ -551,13 +554,14 @@ vardef marque_Para(text totem)(expr dd,ee,pa)=
drawarrow (mn{dir(210+angle(mn-mo))}..{dir(150+angle(mn-mo))}kk) cutbefore cercles(mn,3mm);
drawarrow symetrie((mn{dir(210+angle(mn-mo))}..{dir(150+angle(mn-mo))}kk) cutbefore cercles(mn,3mm),mn);
trace cercles(mn,3mm);
- for p_=totem:
- if p_="":
- label(btex // etex ,mn);
- else:
- label(btex ? etex,mn);
- fi;
- endfor;
+% for p_=totem:
+% if p_="":
+% label(btex $//$ etex ,mn);
+% else:
+% label(btex ? etex,mn);
+ label(totem,mn);
+% fi;
+% endfor;
);
im
enddef;
diff --git a/macros/latex/contrib/profcollege/metapost/PfCScratch.mp b/macros/latex/contrib/profcollege/metapost/PfCScratch.mp
index 6e2e7beb59..a2343b5312 100644
--- a/macros/latex/contrib/profcollege/metapost/PfCScratch.mp
+++ b/macros/latex/contrib/profcollege/metapost/PfCScratch.mp
@@ -2596,12 +2596,11 @@ vardef Demander(expr nbpas)=
picture Dem,texto;
if string nbpas:
texto=ColleBoxNew("demander",OvalNb(nbpas),"et attendre");
- ColBloc:=CapteurTrois;
- Dem=Affichage(texto);
else:
- message("La commande -- Demander -- admet un argument de type string.");
- Dem=nullpicture;
+ texto=ColleBoxNew("demander",nbpas,"et attendre");
fi;
+ ColBloc:=CapteurTrois;
+ Dem=Affichage(texto);
Dem
enddef;
diff --git a/macros/latex/contrib/profcollege/metapost/PfCScratchpdf.mp b/macros/latex/contrib/profcollege/metapost/PfCScratchpdf.mp
index 9a3a650c38..c2311b1d33 100644
--- a/macros/latex/contrib/profcollege/metapost/PfCScratchpdf.mp
+++ b/macros/latex/contrib/profcollege/metapost/PfCScratchpdf.mp
@@ -2595,12 +2595,11 @@ vardef Demander(expr nbpas)=
picture Dem,texto;
if string nbpas:
texto=ColleBoxNew("demander",OvalNb(nbpas),"et attendre");
- ColBloc:=CapteurTrois;
- Dem=Affichage(texto);
else:
- message("La commande -- Demander -- admet un argument de type string.");
- Dem=nullpicture;
+ texto=ColleBoxNew("demander",nbpas,"et attendre");
fi;
+ ColBloc:=CapteurTrois;
+ Dem=Affichage(texto);
Dem
enddef;
diff --git a/macros/latex/contrib/profcollege/metapost/PfCSketch.mp b/macros/latex/contrib/profcollege/metapost/PfCSketch.mp
new file mode 100644
index 0000000000..6a634cfc4d
--- /dev/null
+++ b/macros/latex/contrib/profcollege/metapost/PfCSketch.mp
@@ -0,0 +1,195 @@
+%D'après https://tex.stackexchange.com/questions/39296/simulating-hand-drawn-lines
+
+let normaldraw = draw ;
+let normalfill = fill ;
+let normaldrawarrow = drawarrow ;
+let normaldbldrawarrow = drawdblarrow ;
+let normalarrowhead = normalarrowhead;
+
+path fullsquare;
+fullsquare := unitsquare shifted - center unitsquare ;
+
+%D The variable \type{sketch_amount} determines the amount of randomness in the
+%D drawing
+numeric sketch_amount; sketch_amount := 3;
+numeric old_sketch_amount;
+%D The macro \type{sketchdraw} randomized the path before drawing it. The
+%D \type{expr} ... \type{text} trick is copied from the definition of
+%D \type{drawarrow}
+
+def sketchdraw expr p =
+ do_sketchdraw(p if (path p): randomized sketch_amount fi)
+enddef;
+
+def do_sketchdraw(expr p) text t =
+ normaldraw p t ;
+enddef;
+
+%cp
+%%%%%%%%%%%%%%%%%%
+vardef sketcharrowhead expr p =
+ save q,e; path q; pair e;
+ e = point length p of p;
+ q = gobble(p shifted -e cutafter makepath(pencircle scaled 2ahlength))
+ cuttings;
+ ((q rotated .5ahangle & reverse q rotated -.5ahangle -- cycle) shifted e) randomized (sketch_amount/3)
+enddef;
+
+path _apth;
+def sketchdrawarrow expr p = _apth:=p randomized sketch_amount; _sketchfinarr enddef;
+def sketchdrawdblarrow expr p = _apth:=p; _sketchfindarr enddef;
+
+def _sketchfinarr text t =
+ old_sketch_amount:=sketch_amount;
+ sketch_amount:=0;
+ draw _apth t;
+ sketch_amount:=old_sketch_amount;
+ filldraw sketcharrowhead _apth t
+enddef;
+
+def _sketchfindarr text t =
+ old_sketch_amount:=sketch_amount;
+ sketch_amount:=0;
+ draw _apth t;
+ sketch_amount:=old_sketch_amount;
+ filldraw sketcharrowhead _apth withpen currentpen t;
+ filldraw sketcharrowhead reverse _apth withpen currentpen t
+enddef;
+%%%%%%%%%%%%%%%%%%
+
+%D The macro \type{sketchfill} randomizes the path before filling it.
+path _sketch_path_;
+
+def sketchfill expr p =
+ _sketch_path_ := p randomized sketch_amount;
+ do_sketchfill
+enddef ;
+
+def do_sketchfill text t =
+ normalfill _sketch_path_ t ;
+enddef ;
+
+%D The macro \type{sketchypaths} is modeled after \type{visualizepaths} from
+%D \filename{mp-tool}.
+
+def sketchypaths =
+ let draw = sketchdraw ;
+ let fill = sketchfill ;
+ %cp
+ let drawarrow = sketchdrawarrow ;
+ let drawdblarrow = sketchdrawdblarrow ;
+ let arrowhead = sketcharrowhead ;
+ %fin cp
+enddef ;
+
+%cp
+def normalpaths =
+ let draw = normaldraw ;
+ let fill = normalfill ;
+ let drawarrow = normaldrawarrow ;
+ let drawdblarrow = normaldrawdblarrow ;
+ let arrowhead = normalarrowhead;
+enddef ;
+ %fincp
+
+%By metafun
+vardef mfun_randomized_picture(expr p,s)(text rnd) =
+ save currentpicture ;
+ picture currentpicture ;
+ currentpicture := nullpicture ;
+ for i within p :
+ addto currentpicture
+ if stroked i :
+ doublepath pathpart i rnd s
+ dashed dashpart i
+ withpen penpart i
+ withcolor colorpart i
+ withprescript prescriptpart i
+ withpostscript postscriptpart i
+ elseif filled i :
+ contour pathpart i rnd s
+ withpen penpart i
+ withcolor colorpart i
+ withprescript prescriptpart i
+ withpostscript postscriptpart i
+ else :
+ also i
+ fi
+ ;
+ endfor ;
+ currentpicture
+enddef ;
+
+primarydef p randomized s = (
+ if path p :
+ for i=0 upto length(p)-1 :
+ ((point i of p) randomshifted s) .. controls
+ ((postcontrol i of p) randomshifted s) and
+ ((precontrol (i+1) of p) randomshifted s) ..
+ endfor
+ if cycle p :
+ cycle
+ else :
+ ((point length(p) of p) randomshifted s)
+ fi
+ elseif pair p :
+ p randomshifted s
+ elseif cmykcolor p :
+ if cmykcolor s :
+ ((uniformdeviate cyanpart s) * cyanpart p,
+ (uniformdeviate magentapart s) * magentapart p,
+ (uniformdeviate yellowpart s) * yellowpart p,
+ (uniformdeviate blackpart s) * blackpart p)
+ elseif pair s :
+ ((xpart s + (uniformdeviate (ypart s - xpart s))) * p)
+ else :
+ ((uniformdeviate s) * p)
+ fi
+ elseif rgbcolor p :
+ if rgbcolor s :
+ ((uniformdeviate redpart s) * redpart p,
+ (uniformdeviate greenpart s) * greenpart p,
+ (uniformdeviate bluepart s) * bluepart p)
+ elseif pair s :
+ ((xpart s + (uniformdeviate (ypart s - xpart s))) * p)
+ else :
+ ((uniformdeviate s) * p)
+ fi
+ elseif color p :
+ if color s :
+ ((uniformdeviate greypart s) * greypart p)
+ elseif pair s :
+ ((xpart s + (uniformdeviate (ypart s - xpart s))) * p)
+ else :
+ ((uniformdeviate s) * p)
+ fi
+ elseif string p :
+ (resolvedcolor(p)) randomized s
+ elseif picture p :
+ mfun_randomized_picture(p,s)(randomized)
+ else :
+ % p - s/2 + uniformdeviate s % would have been better but we want to be positive
+ p + uniformdeviate s
+ fi
+ )
+enddef ;
+
+primarydef p randomshifted s =
+ begingroup ;
+ save ss ; pair ss ;
+ ss := paired(s) ;
+ p shifted (-.5xpart ss + uniformdeviate xpart ss,-.5ypart ss + uniformdeviate ypart ss)
+ endgroup
+enddef ;
+
+def resolvedcolor(expr s) =
+ .5white
+enddef ;
+
+vardef paired primary d =
+ if pair d : d else : (d,d) fi
+enddef ;
+
+ extra_endfig := "picture retiens; retiens=currentpicture; draw (retiens randomized 1) withpen pencircle scaled 0.5 withcolor 0.25white;" & extra_endfig;
+
+endinput
diff --git a/macros/latex/contrib/proflycee/README.md b/macros/latex/contrib/proflycee/README.md
index 11502d6f77..63ddb98197 100644
--- a/macros/latex/contrib/proflycee/README.md
+++ b/macros/latex/contrib/proflycee/README.md
@@ -8,6 +8,7 @@ proflycee est un package qui pourra vous aider à utiliser LaTeX au quotidien.
----------------
-Author : Cédric Pierquet
-email : cpierquet@outlook.fr
-Licence : Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt
+Author : Cédric Pierquet
+email : cpierquet@outlook.fr
+Licences : Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt
+ CC0 for cliparts (from openclipart)
diff --git a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf
index b4802be53e..d39eb8a06f 100644
--- a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf
+++ b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/proflycee/doc/ProfLycee-exemples-pyluatex.pdf b/macros/latex/contrib/proflycee/doc/ProfLycee-exemples-pyluatex.pdf
index c3e58a2813..e9dc581cd8 100644
--- a/macros/latex/contrib/proflycee/doc/ProfLycee-exemples-pyluatex.pdf
+++ b/macros/latex/contrib/proflycee/doc/ProfLycee-exemples-pyluatex.pdf
Binary files differ
diff --git a/macros/latex/contrib/proflycee/tex/ProfLycee.sty b/macros/latex/contrib/proflycee/tex/ProfLycee.sty
index e37ce44eeb..238b07908d 100644
--- a/macros/latex/contrib/proflycee/tex/ProfLycee.sty
+++ b/macros/latex/contrib/proflycee/tex/ProfLycee.sty
@@ -1,9 +1,14 @@
-% Author : C. Pierquet
-% licence : Released under the LaTeX Project Public License v1.3c
-% or later, see http://www.latex-project.org/lppl.txtf
+% Author.............: C. Pierquet
+% licence............: Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txtf
+% licence cliparts...: CC0 from openclipart
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{ProfLycee}[2024/07/13 3.04d Aide pour l'utilisation de LaTeX en lycee]
+\ProvidesPackage{ProfLycee}[2024/09/27 3.05b Aide pour l'utilisation de LaTeX en lycee]
+% 3.05b Mise en standby des commandes liées à minted (attente de compatibilité complète avec tcblisting) + Clé [ValeursTan] pour les cercles trigo
+% 3.05a Conversions entre bases + vectorial clipart (de openclipart)
+% 3.04g Ajout de clés pour les arbres de probas
+% 3.04f Ajout de clés pour la coloration des nombres et Piton
+% 3.04e Commandes prix/angle/pourcent en lien avec siunitx
% 3.04d PitonInputFile et styles
% 3.04c Max et min pour des fonctions
% 3.04b Travail sur la loi binomiale + Ajout de clés pour les environnements graphiques
@@ -168,15 +173,15 @@
\input{proflycee-tools-espace.tex}
}%
{}%
- \IfSubStr{#1}{minted}%
- {%
- \if@build
- \RequirePackage[outputdir=build]{minted} %on charge minted avec le répertoire build
- \fi
- \tcbuselibrary{minted} %on charge minted via la librairie tcbox
- \input{proflycee-tools-minted.tex}
- }%
- {}%
+ % \IfSubStr{#1}{minted}%
+ % {%
+ % \if@build
+ % \RequirePackage[outputdir=build]{minted} %on charge minted avec le répertoire build
+ % \fi
+ % \tcbuselibrary{minted} %on charge minted via la librairie tcbox
+ % \input{proflycee-tools-minted.tex}
+ % }%
+ % {}%
\IfSubStr{#1}{pythontex}%
{%
\RequirePackage[gobble=auto]{pythontex}
@@ -233,5 +238,7 @@
\input{proflycee-tools-competences.tex}
%%------Examens
\input{proflycee-tools-exams.tex}
+%%------Cliparts
+\input{proflycee-tools-cliparts.tex}
\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-bronze-cup.pdf b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-bronze-cup.pdf
new file mode 100644
index 0000000000..3ca7af1aac
--- /dev/null
+++ b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-bronze-cup.pdf
Binary files differ
diff --git a/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-bronze-medal-flat.pdf b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-bronze-medal-flat.pdf
new file mode 100644
index 0000000000..83f7d91489
--- /dev/null
+++ b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-bronze-medal-flat.pdf
Binary files differ
diff --git a/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-bronze-medal.pdf b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-bronze-medal.pdf
new file mode 100644
index 0000000000..0e4712cece
--- /dev/null
+++ b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-bronze-medal.pdf
Binary files differ
diff --git a/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-checked.pdf b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-checked.pdf
new file mode 100644
index 0000000000..238d76df4e
--- /dev/null
+++ b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-checked.pdf
Binary files differ
diff --git a/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-crossed.pdf b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-crossed.pdf
new file mode 100644
index 0000000000..94f04537b2
--- /dev/null
+++ b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-crossed.pdf
Binary files differ
diff --git a/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-gold-cup.pdf b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-gold-cup.pdf
new file mode 100644
index 0000000000..e1b1a5fb46
--- /dev/null
+++ b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-gold-cup.pdf
Binary files differ
diff --git a/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-gold-medal-flat.pdf b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-gold-medal-flat.pdf
new file mode 100644
index 0000000000..424fc345ab
--- /dev/null
+++ b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-gold-medal-flat.pdf
Binary files differ
diff --git a/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-gold-medal.pdf b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-gold-medal.pdf
new file mode 100644
index 0000000000..3246c38693
--- /dev/null
+++ b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-gold-medal.pdf
Binary files differ
diff --git a/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-mouse-center.pdf b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-mouse-center.pdf
new file mode 100644
index 0000000000..bc03661421
--- /dev/null
+++ b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-mouse-center.pdf
Binary files differ
diff --git a/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-mouse-left.pdf b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-mouse-left.pdf
new file mode 100644
index 0000000000..40f843b864
--- /dev/null
+++ b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-mouse-left.pdf
Binary files differ
diff --git a/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-mouse-right.pdf b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-mouse-right.pdf
new file mode 100644
index 0000000000..323710e097
--- /dev/null
+++ b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-mouse-right.pdf
Binary files differ
diff --git a/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-mouse.pdf b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-mouse.pdf
new file mode 100644
index 0000000000..b8e69cd524
--- /dev/null
+++ b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-mouse.pdf
Binary files differ
diff --git a/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-notok.pdf b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-notok.pdf
new file mode 100644
index 0000000000..0fed35ca1e
--- /dev/null
+++ b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-notok.pdf
Binary files differ
diff --git a/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-ok.pdf b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-ok.pdf
new file mode 100644
index 0000000000..43cac49c38
--- /dev/null
+++ b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-ok.pdf
Binary files differ
diff --git a/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-silver-cup.pdf b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-silver-cup.pdf
new file mode 100644
index 0000000000..9ba7602d26
--- /dev/null
+++ b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-silver-cup.pdf
Binary files differ
diff --git a/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-silver-medal-flat.pdf b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-silver-medal-flat.pdf
new file mode 100644
index 0000000000..70d0ca8d8b
--- /dev/null
+++ b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-silver-medal-flat.pdf
Binary files differ
diff --git a/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-silver-medal.pdf b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-silver-medal.pdf
new file mode 100644
index 0000000000..ced83f9d17
--- /dev/null
+++ b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-silver-medal.pdf
Binary files differ
diff --git a/macros/latex/contrib/proflycee/tex/proflycee-tools-arithm.tex b/macros/latex/contrib/proflycee/tex/proflycee-tools-arithm.tex
index a021fea937..a2008c15df 100644
--- a/macros/latex/contrib/proflycee/tex/proflycee-tools-arithm.tex
+++ b/macros/latex/contrib/proflycee/tex/proflycee-tools-arithm.tex
@@ -1902,4 +1902,65 @@
}%
}
+%====CONVERSIONS ENTRE BASES
+\ExplSyntaxOn
+%commande interne (stockage ou non)
+\NewDocumentCommand\pflbasetobase{ m m m }{%
+ %1=init
+ %2=fin
+ %3=nb
+ \ifnum#2=10%
+ \int_from_base:nn {#3}{#1}%
+ \else%
+ \int_to_Base:nn {\int_from_base:nn {#3}{#1}}{#2}%
+ \fi%
+}
+
+\NewDocumentCommand\tmpresconvbases{ m m m O{\tmpconvres} }{%
+ %1=init
+ %2=fin
+ %3=nb
+ \ifnum#2=10%
+ \xdef#4{\int_from_base:nn {#3}{#1}}%
+ \else%
+ \xdef#4{\int_to_Base:nn {\int_from_base:nn {#3}{#1}}{#2}}%
+ \fi%
+}
+\ExplSyntaxOff
+
+%commande interne split adaptée de https://tex.stackexchange.com/questions/171007/split-a-character-string-n-by-n // unbonpetit // CC BY-SA 3.0
+\NewDocumentCommand\tmpStrSplit{ O{\,} m m O{\tmpsplitres} }{%
+ %1=espace / %2=nb caract / %3=chaîne / %4=macro de stockage
+ \xdef\splitstring{#3}\let\splitresult\empty%
+ \loop%
+ \StrLen\splitstring[\tempa]%
+ \StrSplit\splitstring{\number\numexpr\tempa-#2}\splitstring\tempb%
+ \xdef\splitresult{\unless\ifx\splitstring\empty#1\fi\tempb\splitresult}%
+ \unless\ifx\splitstring\empty%
+ \repeat%
+ \xdef#4{\splitresult}%
+}
+
+\NewDocumentCommand\ConversionEntreBases{ s O{\,} m m }{%
+ %calculs internes
+ \StrCut{#3}{->}{\tmpbaseinit}{\tmpbasefin}%
+ \tmpresconvbases{\tmpbaseinit}{\tmpbasefin}{#4}%\tmpconvres
+ %affichage
+ \ensuremath{%
+ \ifnum\tmpbaseinit=2%
+ \tmpStrSplit{4}{#4}%
+ {\tmpsplitres}\IfBooleanT{#1}{_{\tmpbaseinit}}%
+ \else%
+ {#4}\IfBooleanT{#1}{_{\tmpbaseinit}}%
+ \fi%
+ =%
+ \ifnum\tmpbasefin=2%
+ \tmpStrSplit[#2]{4}{\tmpconvres}%
+ {\tmpsplitres}\IfBooleanT{#1}{_{\tmpbasefin}}%
+ \else%
+ {\tmpconvres}\IfBooleanT{#1}{_{\tmpbasefin}}%
+ \fi%
+ }%
+}
+
\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/proflycee/tex/proflycee-tools-cliparts.tex b/macros/latex/contrib/proflycee/tex/proflycee-tools-cliparts.tex
new file mode 100644
index 0000000000..13645695a7
--- /dev/null
+++ b/macros/latex/contrib/proflycee/tex/proflycee-tools-cliparts.tex
@@ -0,0 +1,126 @@
+% proflycee-tools-cliparts.tex
+% Copyright 2024 Cédric Pierquet
+% Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt
+% logos from CC0 opencliparts (users Firkin & Juhele & qubodup & TzeenieWheenie & jetxee)
+
+%====DIMENSIONS
+\newlength{\tmpcharacterheightinline}
+\newlength{\tmpcharacterdepthinline}
+
+%====MACRO PRINCIPALE
+\NewDocumentCommand\InsererClipart{ s O{} m }{%
+ \IfBooleanTF{#1}%
+ {%
+ \IfFileExists{pfl-#3.pdf}{\includegraphics[#2]{pfl-#3.pdf}}{}%
+ }%
+ {%
+ \settototalheight{\tmpcharacterheightinline}{\hbox{AZERTYUIOPQSDFGHJKLMWXCVBNazertyuiopqsdfghjklmwxcvbn}}%
+ \settodepth{\tmpcharacterdepthinline}{\hbox{AZERTYUIOPQSDFGHJKLMWXCVBNazertyuiopqsdfghjklmwxcvbn}}%
+ \IfFileExists{pfl-#3.pdf}{\raisebox{-\tmpcharacterdepthinline}{\includegraphics[height=\tmpcharacterheightinline]{pfl-#3.pdf}}}{}%
+ }%
+}
+
+%====ALIASES
+\NewDocumentCommand\pflimgcoupeb{ s O{} }{%
+ \IfBooleanTF{#1}%
+ {\InsererClipart*[#2]{bronze-cup}}%
+ {\InsererClipart{bronze-cup}}%
+}
+
+\NewDocumentCommand\pflimgmedb{ s O{} }{%
+ \IfBooleanTF{#1}%
+ {\InsererClipart*[#2]{bronze-medal}}%
+ {\InsererClipart{bronze-medal}}%
+}
+
+\NewDocumentCommand\pflimgmedbp{ s O{} }{%
+ \IfBooleanTF{#1}%
+ {\InsererClipart*[#2]{bronze-medal-flat}}%
+ {\InsererClipart{bronze-medal-flat}}%
+}
+
+\NewDocumentCommand\pflimgverif{ s O{} }{%
+ \IfBooleanTF{#1}%
+ {\InsererClipart*[#2]{checked}}%
+ {\InsererClipart{checked}}%
+}
+
+\NewDocumentCommand\pflimgnonverif{ s O{} }{%
+ \IfBooleanTF{#1}%
+ {\InsererClipart*[#2]{crossed}}%
+ {\InsererClipart{crossed}}%
+}
+
+\NewDocumentCommand\pflimgcoupeo{ s O{} }{%
+ \IfBooleanTF{#1}%
+ {\InsererClipart*[#2]{gold-cup}}%
+ {\InsererClipart{gold-cup}}%
+}
+
+\NewDocumentCommand\pflimgmedo{ s O{} }{%
+ \IfBooleanTF{#1}%
+ {\InsererClipart*[#2]{gold-medal}}%
+ {\InsererClipart{gold-medal}}%
+}
+
+\NewDocumentCommand\pflimgmedop{ s O{} }{%
+ \IfBooleanTF{#1}%
+ {\InsererClipart*[#2]{gold-medal-flat}}%
+ {\InsererClipart{gold-medal-flat}}%
+}
+
+\NewDocumentCommand\pflimgsouris{ s O{} }{%
+ \IfBooleanTF{#1}%
+ {\InsererClipart*[#2]{mouse}}%
+ {\InsererClipart{mouse}}%
+}
+
+\NewDocumentCommand\pflimgsourisg{ s O{} }{%
+ \IfBooleanTF{#1}%
+ {\InsererClipart*[#2]{mouse-left}}%
+ {\InsererClipart{mouse-left}}%
+}
+
+\NewDocumentCommand\pflimgsourisc{ s O{} }{%
+ \IfBooleanTF{#1}%
+ {\InsererClipart*[#2]{mouse-center}}%
+ {\InsererClipart{mouse-center}}%
+}
+
+\NewDocumentCommand\pflimgsourisd{ s O{} }{%
+ \IfBooleanTF{#1}%
+ {\InsererClipart*[#2]{mouse-right}}%
+ {\InsererClipart{mouse-right}}%
+}
+
+\NewDocumentCommand\pflimgko{ s O{} }{%
+ \IfBooleanTF{#1}%
+ {\InsererClipart*[#2]{notok}}%
+ {\InsererClipart{notok}}%
+}
+
+\NewDocumentCommand\pflimgok{ s O{} }{%
+ \IfBooleanTF{#1}%
+ {\InsererClipart*[#2]{ok}}%
+ {\InsererClipart{ok}}%
+}
+
+\NewDocumentCommand\pflimgcoupea{ s O{} }{%
+ \IfBooleanTF{#1}%
+ {\InsererClipart*[#2]{silver-cup}}%
+ {\InsererClipart{silver-cup}}%
+}
+
+\NewDocumentCommand\pflimgmeda{ s O{} }{%
+ \IfBooleanTF{#1}%
+ {\InsererClipart*[#2]{silver-medal}}%
+ {\InsererClipart{silver-medal}}%
+}
+
+\NewDocumentCommand\pflimgmedap{ s O{} }{%
+ \IfBooleanTF{#1}%
+ {\InsererClipart*[#2]{silver-medal-flat}}%
+ {\InsererClipart{silver-medal-flat}}%
+}
+
+\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/proflycee/tex/proflycee-tools-ecritures.tex b/macros/latex/contrib/proflycee/tex/proflycee-tools-ecritures.tex
index 0a1555c4e9..f524c41cf3 100644
--- a/macros/latex/contrib/proflycee/tex/proflycee-tools-ecritures.tex
+++ b/macros/latex/contrib/proflycee/tex/proflycee-tools-ecritures.tex
@@ -10,6 +10,39 @@
\RequirePackage{mleftright} %pour une meilleure gestion des espacements avec \left \right :-)
%\RequirePackage{mathrsfs}%pour \mathscr (à voir...)
+%===UNITÉS
+
+\NewDocumentCommand\pflprix{ o m }{%
+ \IfValueTF{#1}%
+ {%
+ \num[round-mode=places,round-precision=#1]{#2}\,\text{€}%
+ }%
+ {%
+ \num{#2}\,\text{€}%
+ }%
+}
+
+\NewDocumentCommand\pflangle{ o m }{%
+ \IfValueTF{#1}%
+ {%
+ \num[round-mode=places,round-precision=#1]{#2}\text{\textdegree}%
+ }%
+ {%
+ \num{#2}\text{\textdegree}%
+ }%
+}
+
+\NewDocumentCommand\pflpcent{ o m }{%
+ \IfValueTF{#1}%
+ {%
+ \num[round-mode=places,round-precision=#1]{#2}\,\%%
+ }%
+ {%
+ \num{#2}\,\%%
+ }%
+}
+
+
%===ENSEMBLES CLASSIQUES
\ifthenelse{\isundefined{\N}}%
{%
diff --git a/macros/latex/contrib/proflycee/tex/proflycee-tools-minted.tex b/macros/latex/contrib/proflycee/tex/proflycee-tools-minted.tex
index af4aebf384..42b23be551 100644
--- a/macros/latex/contrib/proflycee/tex/proflycee-tools-minted.tex
+++ b/macros/latex/contrib/proflycee/tex/proflycee-tools-minted.tex
@@ -2,6 +2,7 @@
% Copyright 2023-2024 Cédric Pierquet
% Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt
+%3.05b En standy pour le moment...
%3.00g Modif mineure pour la marge gauche
%2.7.5 Argument optionnel pour les numéros de lignes + changement déclaration environnements
%2.7.3 Correction de la couleur des bordures
diff --git a/macros/latex/contrib/proflycee/tex/proflycee-tools-piton.tex b/macros/latex/contrib/proflycee/tex/proflycee-tools-piton.tex
index 0cb6600617..52ef738955 100644
--- a/macros/latex/contrib/proflycee/tex/proflycee-tools-piton.tex
+++ b/macros/latex/contrib/proflycee/tex/proflycee-tools-piton.tex
@@ -2,6 +2,7 @@
% Copyright 2023-2024 Cédric Pierquet
% Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt
+%3.04f Ajout de clés pour la coloration des nombres et Piton
%3.04d PitonInputFile et styles, pour compatibilité pfm
%3.03c Thonny via piton + modification clé gobble ?
%3.01f PseudoCode via piton (?)
@@ -42,7 +43,7 @@
BarreTitre=true,%
Titre={{\scriptsize\faCode}~~Code Python},%
EspacementV=0.5\baselineskip,%
- CouleurNombres=orange
+ CouleurNombres={orange!75!black}
}
%==Style Moderne
@@ -160,7 +161,7 @@
\useKVdefault[envpiton]%
\setKV[envpiton]{#1}% on paramètres les nouvelles clés et on les simplifie
%------les styles piton
- \SetPitonStyle{ Number = \color{\CODPITcolnb} }
+ \SetPitonStyle[Python]{ Number = \color{\CODPITcolnb} }
\ifboolKV[envpiton]{Lignes}%si lignes=true
{\PitonOptions{left-margin=0.75em,line-numbers={skip-empty-lines=false,label-empty-lines=true,#3}}}%left-margin=auto,
{}%
@@ -227,7 +228,7 @@
\useKVdefault[envpiton]%
\setKV[envpiton]{#1}% on paramètres les nouvelles clés et on les simplifie
%------les styles piton
- \SetPitonStyle{ Number = \color{\CODPITcolnb} }
+ \SetPitonStyle[Python]{ Number = \color{\CODPITcolnb} }
\ifboolKV[envpiton]{Lignes}%si lignes=true
{\PitonOptions{left-margin=0.75em,line-numbers,line-numbers={skip-empty-lines=false,label-empty-lines=true,#3}}}%left-margin=auto,
{}%
@@ -477,12 +478,14 @@
\defKV[consolepyluatex]{%
Largeur=\def\ConsPyluaLarg{#1},
- Alignement=\def\ConsPyluaAlign{#1}
+ Alignement=\def\ConsPyluaAlign{#1},%
+ CouleurNombres=\def\CODPITcolnb{#1}
}
\setKVdefault[consolepyluatex]{%
Logo=true,%
Largeur=\linewidth,%
- Alignement=flush left
+ Alignement=flush left,%
+ CouleurNombres={orange!75!black}
}
\NewDocumentEnvironment{ConsolePiton}{ O{} D<>{} m }%
@@ -492,6 +495,7 @@
{
\restoreKV[consolepyluatex]% revenir au valeurs par défaut
\setKV[consolepyluatex]{#2}% lit les arguments optionnels
+ \SetPitonStyle[Python]{ Number = \color{\CODPITcolnb} }
\PitonOptions{width={\ConsPyluaLarg-5mm},break-lines,end-of-broken-line={\,},continuation-symbol={\;},#1}
%\PitonOptions{width={\ConsPyluaLarg-5mm},#1}
\PyLTVerbatimEnv
@@ -524,14 +528,16 @@
NomFichier=\def\thonnypitonfilename{#1},%
NomConsole=\def\thonnypitonshellname{#1},%
IntroConsole=\def\thonnypitonintroconsole{#1},%
- Gobble=\def\thonnypitongobble{#1}
+ Gobble=\def\thonnypitongobble{#1},%
+ CouleurNombres=\def\CODPITcolnb{#1}
}
\setKVdefault[pitonthonny]{%
NomFichier=script.py,%
NomConsole=console,%
IntroConsole={Python 3.11.6 /usr/bin/python},%
- Gobble={}
+ Gobble={},%
+ CouleurNombres={orange!75!black}
}
\NewPitonEnvironment{PitonThonnyEditor}{ D<>{} O{} m }%
@@ -539,6 +545,7 @@
\restoreKV[pitonthonny]%
\setKV[pitonthonny]{#1}%
\settowidth{\LargeurNumbersThonny}{\footnotesize\texttt{00}}%
+ \SetPitonStyle[Python]{Number=\color{\CODPITcolnb}}
\PitonOptions{left-margin=\LargeurNumbersThonny+1mm,line-numbers={skip-empty-lines=false,label-empty-lines=true},break-lines,indent-broken-lines,continuation-symbol={}}%
%--gestion du gobble
\IfStrEqCase{\thonnypitongobble}{%
@@ -564,6 +571,7 @@
{\restoreKV[pitonthonny]%
\setKV[pitonthonny]{#1}%
\settowidth{\LargeurNumbersThonny}{\footnotesize\texttt{00}}%
+ \SetPitonStyle[Python]{Number=\color{\CODPITcolnb}}
\PitonOptions{left-margin=\LargeurNumbersThonny+1mm,line-numbers,line-numbers={skip-empty-lines=false,label-empty-lines=true},break-lines,indent-broken-lines,continuation-symbol={}}%
\tcbset{tcbthonnypiton/.style={title=\vphantom{pf}\thonnypitonfilename\:\textcolor{gray}{×}},before skip=0.33\baselineskip,after skip=0.33\baselineskip}%
\tcolorbox[sharp corners=all,enhanced,size=small,width=#2,colframe=gray,colback=lightgray!5,tcbthonnypiton,fonttitle=\scriptsize\sffamily,coltitle=black,
@@ -579,6 +587,7 @@
\PyLTVerbatimEnv%
\tcbset{tcbthonnypitonconsole/.style={title=\vphantom{pf}\thonnypitonshellname\:\textcolor{gray}{×}},before skip=0.33\baselineskip,after skip=0.33\baselineskip}%
\noindent%
+ \SetPitonStyle[Python]{Number=\color{\CODPITcolnb}}
%--gestion du gobble
\IfStrEqCase{\thonnypitongobble}{%
{auto}{\PitonOptions{auto-gobble}}%
diff --git a/macros/latex/contrib/proflycee/tex/proflycee-tools-probas.tex b/macros/latex/contrib/proflycee/tex/proflycee-tools-probas.tex
index 92cff33772..e80cbb4d4c 100644
--- a/macros/latex/contrib/proflycee/tex/proflycee-tools-probas.tex
+++ b/macros/latex/contrib/proflycee/tex/proflycee-tools-probas.tex
@@ -245,7 +245,10 @@
StyleTrait=\def\PLAPtypetrait{#1},%
EpaisseurTrait=\def\PLAPeptrait{#1},%
PositionProbas=\def\PLAPposprob{#1},%
- CouleurFond=\def\PLAPcolback{#1}
+ CouleurFond=\def\PLAPcolback{#1},%
+ CouleurTraits=\def\PLAPcolarc{#1},%
+ CouleurProbas=\def\PLAPcolprobas{#1},%
+ CouleurNoeuds=\def\PLAPcolnoeuds{#1}
}
\setKVdefault[PLTIKZARBRE]{%
@@ -260,7 +263,10 @@
StyleTrait={},%
EpaisseurTrait=semithick,%
PositionProbas={},%
- CouleurFond=white
+ CouleurFond=white,%
+ CouleurTraits=black,%
+ CouleurProbas=black,%
+ CouleurNoeuds=black
}
\NewDocumentCommand\IntPlaceProbasArbre{ m m m m m }{%
@@ -285,14 +291,14 @@
\readlist*\PLARBREDONNES{#2}%
\begin{tikzpicture}[x=\PLAPunite,y=\PLAPunite]
%styles
- \tikzstyle{noeud} = [font=\PLAPfont]
- \tikzstyle{probas}= [font=\PLAPfontproba]
+ \tikzstyle{noeud} = [font=\PLAPfont,text=\PLAPcolnoeuds]
+ \tikzstyle{probas}= [font=\PLAPfontproba,text=\PLAPcolprobas]
\ifboolKV[PLTIKZARBRE]{InclineProbas}
{\tikzstyle{PLetiquette}=[pos=0.525,sloped,inner sep=2pt,outer sep=2pt,rectangle]}
{\tikzstyle{PLetiquette}=[pos=0.525,inner sep=2pt,outer sep=2pt,rectangle]}
\ifboolKV[PLTIKZARBRE]{Fleche}
- {\tikzstyle{PLfleche}=[->,>=latex,\PLAPtypetrait,\PLAPeptrait]}
- {\tikzstyle{PLfleche}=[\PLAPtypetrait,\PLAPeptrait]}
+ {\tikzstyle{PLfleche}=[->,>=latex,\PLAPtypetrait,\PLAPeptrait,\PLAPcolarc]}
+ {\tikzstyle{PLfleche}=[\PLAPtypetrait,\PLAPeptrait,\PLAPcolarc]}
%arbre2x2
\IfEq{\PLAPtype}{2x2}
{%
@@ -576,14 +582,14 @@
\readlist*\PLARBREDONNES{#2}
\begin{tikzpicture}[x=\PLAPunite,y=\PLAPunite]
%styles
- \tikzstyle{noeud} = [font=\PLAPfont]
- \tikzstyle{probas}= [font=\PLAPfontproba]
+ \tikzstyle{noeud} = [font=\PLAPfont,text=\PLAPcolnoeuds]
+ \tikzstyle{probas}= [font=\PLAPfontproba,text=\PLAPcolprobas]
\ifboolKV[PLTIKZARBRE]{InclineProbas}
{\tikzstyle{PLetiquette}=[pos=0.525,sloped,inner sep=2pt,outer sep=2pt,rectangle]}
{\tikzstyle{PLetiquette}=[pos=0.525,inner sep=2pt,outer sep=2pt,rectangle]}
\ifboolKV[PLTIKZARBRE]{Fleche}
- {\tikzstyle{PLfleche}=[->,>=latex,\PLAPtypetrait,\PLAPeptrait]}
- {\tikzstyle{PLfleche}=[\PLAPtypetrait,\PLAPeptrait]}
+ {\tikzstyle{PLfleche}=[->,>=latex,\PLAPtypetrait,\PLAPeptrait,\PLAPcolarc]}
+ {\tikzstyle{PLfleche}=[\PLAPtypetrait,\PLAPeptrait,\PLAPcolarc]}
%arbre2x2
\IfEq{\PLAPtype}{2x2}
{%
diff --git a/macros/latex/contrib/proflycee/tex/proflycee-tools-trigo.tex b/macros/latex/contrib/proflycee/tex/proflycee-tools-trigo.tex
index 6efa608f73..f47c9a33bf 100644
--- a/macros/latex/contrib/proflycee/tex/proflycee-tools-trigo.tex
+++ b/macros/latex/contrib/proflycee/tex/proflycee-tools-trigo.tex
@@ -35,7 +35,8 @@
Equationsin=false,%
cos=45,%
sin=30,%
- CouleurSol=blue
+ CouleurSol=blue,%
+ ValeursTan=false
}
\newcommand\CercleTrigo[1][]{%
@@ -43,6 +44,28 @@
\setKV[cercletrigo]{#1}
\tikzset{PLval/.style={inner sep=1pt,font=\PLcerclevaleurs,fill=\PLcerclefond}}
\tikzset{PLagl/.style={inner sep=1pt,font=\PLcercleangles,fill=\PLcerclefond}}
+ %tangente ?
+ \ifboolKV[cercletrigo]{ValeursTan}%
+ {%
+ \draw[\PLcerclethick,dotted,gray] (30:\PLcerclerayon)--({\PLcerclerayon},{sqrt(3)/3*\PLcerclerayon}) ;
+ \draw[\PLcerclethick,dotted,gray] (45:\PLcerclerayon)--({\PLcerclerayon},{\PLcerclerayon}) ;
+ \draw[\PLcerclethick,dotted,gray] (60:\PLcerclerayon)--({\PLcerclerayon},{sqrt(3)*\PLcerclerayon}) ;
+ \draw[\PLcerclethick,dotted,gray] (-30:\PLcerclerayon)--({\PLcerclerayon},{-sqrt(3)/3*\PLcerclerayon}) ;
+ \draw[\PLcerclethick,dotted,gray] (-45:\PLcerclerayon)--({\PLcerclerayon},{-\PLcerclerayon}) ;
+ \draw[\PLcerclethick,dotted,gray] (-60:\PLcerclerayon)--({\PLcerclerayon},{-sqrt(3)*\PLcerclerayon}) ;
+ \draw[\PLcerclethick] ({\PLcerclerayon},{-1.8*\PLcerclerayon}) -- ({\PLcerclerayon},{1.8*\PLcerclerayon}) ;
+ \ifboolKV[cercletrigo]{AffValeurs}
+ {%
+ \draw[] ([xshift=-2pt]{\PLcerclerayon},{\PLcerclerayon})--++(4pt,0) node[right=2pt,PLval] {$1$} ;
+ \draw[] ([xshift=-2pt]{\PLcerclerayon},{-\PLcerclerayon})--++(4pt,0) node[right=2pt,PLval] {$-1$} ;
+ \draw[] ([xshift=-2pt]{\PLcerclerayon},{sqrt(3)*\PLcerclerayon})--++(4pt,0) node[right=2pt,PLval] {$\sqrt{3}$} ;
+ \draw[] ([xshift=-2pt]{\PLcerclerayon},{-sqrt(3)*\PLcerclerayon})--++(4pt,0) node[right=2pt,PLval] {$-\sqrt{3}$} ;
+ \draw[] ([xshift=-2pt]{\PLcerclerayon},{sqrt(3)/3*\PLcerclerayon})--++(4pt,0) node[right=2pt,PLval] {$\tfrac{\sqrt{3}}{3}$} ;
+ \draw[] ([xshift=-2pt]{\PLcerclerayon},{-sqrt(3)/3*\PLcerclerayon})--++(4pt,0) node[right=2pt,PLval] {$-\tfrac{\sqrt{3}}{3}$} ;
+ }%
+ {}%
+ }%
+ {}%
%valeurs remarquables
\ifboolKV[cercletrigo]{AffAngles}
{%valeursdudessus
diff --git a/macros/latex/contrib/profmaquette/doc/ProfMaquette-doc.pdf b/macros/latex/contrib/profmaquette/doc/ProfMaquette-doc.pdf
deleted file mode 100644
index 655d73fe6e..0000000000
--- a/macros/latex/contrib/profmaquette/doc/ProfMaquette-doc.pdf
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/profmaquette/doc/profmaquette-doc.pdf b/macros/latex/contrib/profmaquette/doc/profmaquette-doc.pdf
new file mode 100644
index 0000000000..dfa1dab825
--- /dev/null
+++ b/macros/latex/contrib/profmaquette/doc/profmaquette-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/profmaquette/latex/ProfMaquette.sty b/macros/latex/contrib/profmaquette/latex/ProfMaquette.sty
index 9aa462bb76..06a082376d 100644
--- a/macros/latex/contrib/profmaquette/latex/ProfMaquette.sty
+++ b/macros/latex/contrib/profmaquette/latex/ProfMaquette.sty
@@ -2,20 +2,33 @@
% licence : Released under the LaTeX Project Public License v1.3c
% or later, see http://www.latex-project.org/lppl.txtf
\NeedsTeXFormat{LaTeX2e}%
-\def\filedate{2024/05/02}%
+\def\filedate{2024/09/17}%
\let\PfMfiledate\filedate%
-\def\fileversion{0.94}%
+\def\fileversion{0.99}%
\let\PfMfileversion\fileversion%
\ProvidesPackage{ProfMaquette}[\filedate\space v\fileversion\space Maquettage de documents]%
\newif\if@Dyslexie \@Dyslexiefalse
+\newif\if@CAN \@CANfalse
+\newif\if@Revision \@Revisionfalse
+\newif\if@AssembleCorrections \@AssembleCorrectionsfalse
+\newif\if@Personnel \@Personnelfalse
\DeclareOption{Dyslexie}{\@Dyslexietrue}
+\DeclareOption{CAN}{\@CANtrue}
+\DeclareOption{Revision}{\@Revisiontrue}
+\DeclareOption{AssembleCorrections}{\@AssembleCorrectionstrue}
+\DeclareOption{Personnel}{\@Personneltrue}
\ProcessOptions\relax
+
+\if@AssembleCorrections
+ \AddToHook{env/document/end}[AC]{\PfMAffichageTousCorriges}%
+\fi
+
% packages nécessaires
\RequirePackage{verbatim}%
-
+\RequirePackage{xintexpr}
\RequirePackage{calc}%
\RequirePackage{xlop}%
@@ -34,31 +47,33 @@
\RequirePackage{modulus}%
\RequirePackage{ragged2e}%
-
+\RequirePackage{fontawesome5}
\makeatletter
\gdef\PfMFontSize{\@ptsize}
%\gdef\PfMFontSize{\f@size}
\makeatother
%définition des clés
\RequirePackage{simplekv}%
-\setKVdefault[Boulot]{Dys=false,Taille=14,Cours=false,Base=false,BaseHTML=false,CAN=false,Fiche=false,DM=false,DS=false,IE=false,Kholle=false,RecapBrevet=false,PdT=false,Parcours=false,Contrat=false,FdR=false,ParcoursPerso=false,OlympiadesAPMEP=false,CorrigeInverse=false,CorrigeSeul=false,CorrigeApres=false,CorrigeFin=false,CorrigeAll=false,Brevet=false,BaremeComplet=false,BaremeGlobal=false,CorrectionColonnes=false,Epaisseur=0pt,VersSolution=false,AvecEntrainement=false,Small=false,Footnotesize=false,Scriptsize=false,AllDirect=false,AllPouce=false}%Les deux derniers pour essayer de mettre tous les exercices d'un même fichier en mode Reponse, en mode Indice. Pas implanté, pas testé
+\setKVdefault[Boulot]{Graine=1,Dys=false,Taille=14,Cours=false,Base=false,BaseHTML=false,CAN=false,Fiche=false,DM=false,DS=false,IE=false,Kholle=false,RecapBrevet=false,PdT=false,Parcours=false,Contrat=false,FdR=false,ParcoursPerso=false,OlympiadesAPMEP=false,LivreHeros=false,CorrigeInverse=false,CorrigeSeul=false,CorrigeApres=false,CorrigeFin=false,CorrigeAll=false,Brevet=false,BaremeComplet=false,BaremeGlobal=false,CorrectionColonnes=false,EntrainementColonnes=false,Epaisseur=0pt,EEpaisseur=0pt,ESansSaut=false,VersSolution=false,AvecEntrainement=false,Small=false,Footnotesize=false,Scriptsize=false,AllDirect=false,AllPouce=false,Input=false}%Les deux derniers pour essayer de mettre tous les exercices d'un même fichier en mode Reponse, en mode Indice. Pas implanté, pas testé
\defKV[Boulot]{Colonnes=\setKV[Boulot]{CorrectionColonnes}}%
-\setKVdefault[Cours]{Couleur=Crimson,Theme=Trace écrite,NomExercice=Exercice}%
+\defKV[Boulot]{EColonnes=\setKV[Boulot]{EntrainementColonnes}}%
+\setKVdefault[Cours]{Couleur=Crimson,Theme=Trace \'ecrite,NomExercice=Exercice}%
\setKVdefault[DM]{Numero=1,Date=\today,Classe={},Niveau=3,Code=\jobname}%
\setKVdefault[DS]{Numero=1,Date=\today,Classe={},Niveau=3,Code=\jobname,Calculatrice=false,Sujet=A}%
-\setKVdefault[Fiche]{Theme=Les nombres décimaux,Date=\today,Niveau=6,Classe={},Code={},NomExercice=Exercice,}%
-\setKVdefault[PdT]{Theme=Les nombres décimaux,Date=\today,Niveau=6,Classe={},Code={},NomExercice=Exercice}%
-\setKVdefault[FdR]{Theme=Les nombres décimaux,Date=\today,Niveau=6,Classe={},Code={},NomExercice=Exercice}%
-\setKVdefault[Parcours]{Theme=Les nombres décimaux,Date=\today,Niveau=6,Classe={},Code={},NomExercice=Exercice,Vertical=false}%
-\setKVdefault[Contrat]{Theme=Les nombres décimaux,Date=\today,Niveau=6,Classe={},Code={},NomExercice=Exercice}%
+\setKVdefault[Fiche]{Theme=Les nombres d\'ecimaux,Date=\today,Niveau=6,Classe={},Code={},NomExercice=Exercice,}%
+\setKVdefault[PdT]{Theme=Les nombres d\'ecimaux,Date=\today,Niveau=6,Classe={},Code={},NomExercice=Exercice}%
+\setKVdefault[FdR]{Theme=Les nombres d\'ecimaux,Date=\today,Niveau=6,Classe={},Code={},NomExercice=Exercice}%
+\setKVdefault[Parcours]{Theme=Les nombres d\'ecimaux,Date=\today,Niveau=6,Classe={},Code={},NomExercice=Exercice,Vertical=false,Plan=false,Court=false}%
+\setKVdefault[Contrat]{Theme=Les nombres d\'ecimaux,Date=\today,Niveau=6,Classe={},Code={},NomExercice=Exercice}%
+\setKVdefault[OlympiadesAPMEP]{Theme=Les nombres d\'ecimaux}%
\setKVdefault[ParcoursPerso]{Fichier={}}%
\setKVdefault[IE]{Nom=\'Evaluation,Sujets=false,Theme={},Numero=1,Date=\today,Classe={},Niveau=3,Code=\jobname,Calculatrice=false}%
\defKV[IE]{Sujet=\setKV[IE]{Sujets}}%
-\setKVdefault[RecapBrevet]{Theme=Les nombres décimaux,Date=\today,Code={},NomExercice=Exercice}%
-\setKVdefault[Kholle]{Sujet=1,Numero=1,Date=15,Niveau=TSI-1,Code=\jobname,Lieu=Lycée
+\setKVdefault[RecapBrevet]{Theme=Les nombres d\'ecimaux,Date=\today,Code={},NomExercice=Exercice}%
+\setKVdefault[Kholle]{Sujet=1,Numero=1,Date=15,Niveau=TSI-1,Code=\jobname,Lieu=Lyc\'ee
du Hainaut (Valenciennes),NomEleve=Albert Einstein,CR=false}%
\setKVdefault[CAN]{Date=\today,Niveau=6,Duree=9,CoefQ=0.4,CoefR=0.35,CoefJ=0.1}%
-\setKVdefault[ClesExercices]{NbQuestions=1,PasTitre=false,AffichageSource=false,BaremeTotal,BaremeDetaille=false,MotPoint=point,AffichageTitre=false,Calculatrice=true,Oral=false,Difficulte=0,AffichageCompetence=false,PasCorrige=false,Direct=false,Pouce=false,Parcours=false,Contrat=false,FdR=false,Routes=false,Stops=false,Background=white,Cadre=gray!50,Numerote,Ligne=false,Doublespacing=false,Onehalfspacing=false,Cadres=false,TitreSol=false,NonUtilise=false,Profile=false,PasEntrainement=false}%
+\setKVdefault[ClesExercices]{NbQuestions=1,PasTitre=false,AffichageSource=false,BaremeTotal,BaremeDetaille=false,MotPoint=point,AffichageTitre=false,Calculatrice=true,Oral=false,Difficulte=0,AffichageCompetence=false,PasCorrige=false,Direct=false,Pouce=false,Parcours=false,Contrat=false,FdR=false,Routes=false,Stops=false,Background=white,Cadre=gray!50,Numerote,Ligne=false,Doublespacing=false,Onehalfspacing=false,Cadres=false,Grilles=false,Cinq=false,Huit=false,TitreSol=false,NonUtilise=false,Profile=false,AEntretenir=false,Fragile=false,AvecIndications=false,ACompleter=false,Aide=0,Score=0,EchelleSeyes=8,Ajout={},TitreCorrige=Corrigé de l'exercice}%
\defKV[ClesExercices]{TitreSolution=\setKV[ClesExercices]{TitreSol}}%
\defKV[ClesExercices]{Source=\setKV[ClesExercices]{AffichageSource}}%
\defKV[ClesExercices]{Titre=\setKV[ClesExercices]{AffichageTitre}}%
@@ -69,18 +84,28 @@
\defKV[ClesExercices]{Stop=\setKV[ClesExercices]{Stops}}%
\defKV[ClesExercices]{Lignes=\setKV[ClesExercices]{Ligne}}%
\defKV[ClesExercices]{Encart=\setKV[ClesExercices]{Cadres}}%
+\defKV[ClesExercices]{CinqCinq=\setKV[ClesExercices]{Grilles}\setKV[ClesExercices]{Cinq}}%
+\defKV[ClesExercices]{Seyes=\setKV[ClesExercices]{Grilles}\setKV[ClesExercices]{Huit}}%
\def\PfMTexteEncart{Indique ton travail ci-dessous.}%
-\setKVdefault[SchemaParcours]{Colonnes=100,Rayon=2.5mm,Largeur=7.5mm,Couleur=LightSteelBlue,Csv=false}%
+\setKVdefault[SchemaParcours]{Colonnes=100,Rayon=2.5mm,Largeur=7.5mm,Couleur=gray!70}%,Csv=false}%
\setKVdefault[SchemaContrat]{Ecart=7mm,Rayon=2.5mm}%
-\setKVdefault[SchemaFdR]{Ecart=7mm,Colonnes=100,Rayon=2.5mm,Largeur=7.5mm,Couleur=LightSteelBlue,Csv=false}%
+\setKVdefault[SchemaFdR]{Ecart=7mm,Colonnes=100,Rayon=2.5mm,Largeur=7.5mm,Couleur=gray!70}%,Csv=false}%
+% Commande pour retenir le nombre d'exercices par maquette.Utile seulement pour la clé AssembleCorrection
+\xdef\PfMRetiensLienExoMa{}%
+\xdef\PfMRetiensLienDefMa{}%
+% Commande pour passer des options à travers la clé Input. Elle remplace \input :)
+\NewDocumentCommand\Input{om}{%
+ \def\Relecture{\setKV[ClesExercices]{#1}}%
+ \input{#2}%
+ \def\Relecture{}%
+}%
% Sucres
\makeatletter%
\NewDocumentCommand\PfMDotfill{}{%
\leavevmode%
\cleaders\hb@xt@.44em{\hss\xleaders\hrule width0.33em\hss}\hfill%
\kern\z@}%
-
-%\makeatother%
+\makeatother%
%
\NewDocumentCommand\PfMpointilles{o}{%
\IfNoValueTF{#1}{\PfMDotfill}{\makebox[#1]{\PfMDotfill}}%
@@ -88,7 +113,15 @@
%
\NewDocumentCommand\PfMNbLignesRestantes{}{%
\edef\measurepage{\dimexpr\pagegoal-\pagetotal\relax}%
+ \edef\measurepagemax{\dimexpr\textheight\relax}%
+ % \edef\measurepage{\dimeval{\pagegoal-\pagetotal-\baselineskip}}%
\xdef\PfMResteLignes{\fpeval{trunc((\the\measurepage)/(\baselineskip),0)}}%
+ \xdef\PfMResteLignesMax{\fpeval{trunc((\the\measurepagemax)/(\baselineskip),0)}}%
+ \ifnum\PfMResteLignesMax<\PfMResteLignes\relax
+ \xdef\PfMResteLignes{\PfMResteLignesMax}
+ \fi
+ %\xdef\PfMResteLignes{\dimeval{trunc((\the\measurepage)/(\baselineskip),0)}}%
+ %Il reste \PfMResteLignes{} lignes alors que le nombre maximal de lignes sur une page est \PfMResteLignesMax{}.
}%
\NewDocumentCommand\PfMLignesFinales{}{%
@@ -123,28 +156,37 @@
\newlength\PfMLargeurJury%
\newlength\PfMEspaceAvantLignes%
\newlength\PfMEspaceApresLignes%
-\newlength\PfMLargeurComp
+\newlength\PfMLargeurComp%
\newlength\CRRHauteur%
\newlength\PfMEcartSupInterMots%
-\setlength{\CRRHauteur}{10cm}
+\newlength\PfMCoefcompetences%
+\def\PfMCoefCompetences{0.85}%
+\setlength{\CRRHauteur}{10cm}%
\setlength{\PfMHauteurAppreciation}{5cm}%
\setlength{\PfMHauteurRemarque}{5cm}%
-\setlength{\PfMEspaceAvantLignes}{1em}
-\setlength{\PfMEspaceApresLignes}{1em}
+\setlength{\PfMEspaceAvantLignes}{1em}%
+\setlength{\PfMEspaceApresLignes}{1em}%
\setlength{\PfMEcartSupInterMots}{1pt}%
+\setlength{\PfMCoefcompetences}{0.7\linewidth}%
% définition des compteurs
\newcounter{PfMMaquette}%Pour compter le nombres de "travaux"
\setcounter{PfMMaquette}{0}%
+\newcounter{PfMMaquetteSol}[PfMMaquette]%Pour compter le nombres de "travaux" dans les corrections
+\setcounter{PfMMaquetteSol}{0}%
\newcounter{PfMSection}%Pour le barème et ne pas faire obstruction à section
\setcounter{PfMSection}{0}%
\newcounter{PfMExo}[PfMMaquette]%Numéro des exercices
\setcounter{PfMExo}{0}%
-\newcounter{PfMExoSol}%Pour repérer les valeurs aléatoires construites automatiquement dans la solution
+%\newcounter{PfMExoSolAlea}%Pour repérer les valeurs aléatoires construites automatiquement dans la solution
+%\setcounter{PfMExoSolAlea}{0}%
+\newcounter{PfMExoSol}[PfMMaquette]%
\setcounter{PfMExoSol}{0}%
\newcounter{PfMExoEntrai}%Pour repérer les entrainements
\setcounter{PfMExoEntrai}{0}%
\newcounter{PfMCorrigeParcoursPerso}%affichage des solutions ou pas dans le cadre d'un parcours perso
\setcounter{PfMCorrigeParcoursPerso}{0}%
+\newcounter{PfMRetiensMapourPP}%Pour retenir le numéro de la maquette de référence pour les parcours perso
+\setcounter{PfMRetiensMapourPP}{0}%
\newcounter{PfMSOS}%Numéro des SOS dans les parcours fléchés
\setcounter{PfMSOS}{0}%
\newcounter{PfMAlea}%Pour repérer les valeurs aléatoires construites automatiquement
@@ -152,12 +194,17 @@
\newcounter{RetiensSol}%Pour l'affichage des solutions
\newcounter{RetiensRep}%Pour l'affichage des reponses.
\newcounter{RetiensInd}%Pour l'affichage des indices.
+\newcounter{RetiensIndic}%Pour l'affichage des indications.
+\newcounter{PfMRetiensQr}%Pour l'affichage des entrainements
\setcounter{RetiensSol}{0}%
\setcounter{RetiensRep}{0}%
\setcounter{RetiensInd}{0}%
+\setcounter{RetiensIndic}{0}%
+\setcounter{PfMRetiensQr}{0}%
\newcounter{PfMNbLogo}%Pour décaler les logos sur la ligne haute de tcolorbox
\setcounter{PfMNbLogo}{0}%
\newcount\Orientation%Pour le schéma des parcours
+\newcount\TotalParcoursTikz%Pour le total des exos à utiliser dans l'affichage des parcours tikz
\newcounter{PfMCNNumQ}%
\newcounter{Nbcolonnes}
@@ -166,6 +213,8 @@
\newif\ifPfMDeuxColonnes
\newif\ifPfMRectoVerso
+\newif\ifPfMRevision
+
\makeatletter
\if@twocolumn
\PfMDeuxColonnestrue
@@ -179,6 +228,11 @@
\else
\PfMRectoVersofalse
\fi
+\if@Revision
+ \PfMRevisiontrue
+\else
+ \PfMRevisionfalse
+\fi
\makeatother
% couleurs
@@ -228,6 +282,22 @@
\ifboolKV[Boulot]{CAN}{}{\end{tcolorbox}}%
}%
+\tcbset{%
+ indications/.style={
+ empty,
+ right=0pt,
+ left=0mm,
+ top=0pt,
+ bottom=0pt,
+ frame engine=path,
+ % colframe=Crimson!10,
+ frame hidden,
+ notitle,
+ sharp corners=west,
+ borderline west={3pt}{0pt}{black!50}
+ }
+}
+
%% Option french pour les mathématiques
% By CT
\NewDocumentCommand\TypoMathFrance{}{%
@@ -291,7 +361,7 @@
\NewDocumentCommand\RepartirEffectifTotal{mmm}{%
% #1 valeur de l'effectif total
% #2 nombre de valeurs à obtenir
- % #3 écart acceptable :) autour de la moyenen
+ % #3 écart acceptable :) autour de la moyenne
\xdef\PfCSLEffectifs{}%
\xdef\PfCValeurMoyenneTemp{\fpeval{floor(#1/#2)}}%
\xdef\PfCRetiensRETSomme{}%
@@ -405,7 +475,6 @@
\RenewDocumentCommand\ChoixAlea{s o m m m}{%
\IfBooleanTF{#1}{%
\stepcounter{PfMAlea}%
-% je sauvegarde la valeur \thePfMExo-\thePfMAlea
\IfNoValueTF{#2}{%
\expandafter\xdef\csname valeur\Roman{PfMExo}\roman{PfMAlea}\endcsname{\fpeval{randint(#3,#4)}}%
\expandafter\xdef\csname #5\endcsname{\csname valeur\Roman{PfMExo}\roman{PfMAlea}\endcsname}%
@@ -791,7 +860,8 @@
\setcounter{Melquestions}{0}%
\setsepchar{\item}\ignoreemptyitems%
\readlist*\ListeTest{#2}%
-% La liste des éléments retenus est \showitems*\ListeTest[]
+ \reademptyitems
+ % La liste des éléments retenus est \showitems*\ListeTest[]\par
\IfNoValueTF{#1}{%
\ChoixAleaMultiMix{\ListeTestlen}{1}{\ListeTestlen}{0}{\ListeShuffleA}%
\xdef\MelangeValeurTotale{\ListeTestlen}%
@@ -802,6 +872,8 @@
\ExporteListe{ListeShuffle}{\ListeShuffleA}%
\setsepchar{,}\ignoreemptyitems%
\readlist*\ListeNumQ{\ListeShuffleA}%
+ \reademptyitems
+ % L'ordre des questions est \ListeNumQ[]
\setcounter{Comptequestions}{1}%
\begin{enumerate}
\loop%
@@ -815,11 +887,15 @@
\NewDocumentEnvironment{Enumelangesol}{b}{%
\setcounter{Melquestions}{0}%
- \setsepchar{\item}%
+ \setsepchar{\item}\ignoreemptyitems%
\readlist*\ListeTest{#1}%
+ \reademptyitems
\RestoreListe{ListeShuffle}%
\setsepchar{,}\ignoreemptyitems%
\readlist*\ListeNumQ{\ListeShuffle}%
+ \reademptyitems
+% la liste des éléments retenus est \showitems*\ListeTest[]\par
+% L'ordre des questions est \ListeNumQ[]\par
\setcounter{Comptequestions}{1}%
\begin{enumerate}
\loop%
@@ -882,7 +958,7 @@
}
\def\buildtabcompetences{%
- \[\begin{tabular}{|p{0.70\linewidth}|*{3}{>{\centering\arraybackslash}p{0.05\linewidth}|}}
+ \[\begin{tabular}{|p{\PfMCoefcompetences}|*{3}{>{\centering\arraybackslash}p{0.05\linewidth}|}}
\cline{2-4}
\multicolumn{1}{c|}{}&\PfMCompNA&\PfMCompECA&\PfMCompA\\
\hline
@@ -892,7 +968,7 @@
}%
\def\Buildtabcompetences#1#2{%
- \setlength{\PfMLargeurComp}{\fpeval{0.85-0.05*#1}\linewidth-\fpeval{2*(#1-3)}\tabcolsep}%
+ \setlength{\PfMLargeurComp}{\fpeval{\PfMCoefCompetences-0.05*#1}\linewidth-\fpeval{2*(#1-3)}\tabcolsep}%
\[\begin{tabular}{|p{\PfMLargeurComp}|*{#1}{>{\centering\arraybackslash}p{0.05\linewidth}|}}%
\cline{2-\fpeval{1+#1}}%
\multicolumn{1}{c|}{}\xintFor* ##1 in{\xintSeq{1}{#1}}\do{%
@@ -914,7 +990,7 @@
\def\SolutionWrite{%
\setcounter{PfMAlea}{0}%
\@bsphack%
- \immediate\openout \verbatim@out "\jobname-Ex\thePfMExo.sol"%
+ \immediate\openout \verbatim@out "\jobname-Ma\thePfMMaquette-Ex\thePfMExo.sol"%
\let\do\@makeother\dospecials%
\catcode`\^^M\active%
\def\verbatim@processline{%
@@ -924,7 +1000,7 @@
\def\SolutionWritePP{%
\@bsphack
- \immediate\openout \verbatim@out "\jobname-PPEx\thePfMExo.sol" %
+ \immediate\openout \verbatim@out "\jobname-Ma\thePfMMaquette-PPEx\thePfMExo.sol" %
\let\do\@makeother\dospecials
\catcode`\^^M\active
\def\verbatim@processline{%
@@ -934,7 +1010,7 @@
\def\ReponseWrite{%
\@bsphack
- \immediate\openout \verbatim@out "\jobname-Ex\thePfMExo.rep" %
+ \immediate\openout \verbatim@out "\jobname-Ma\thePfMMaquette-Ex\thePfMExo.rep" %
\let\do\@makeother\dospecials
\catcode`\^^M\active
\def\verbatim@processline{%
@@ -944,7 +1020,7 @@
\def\IndiceWrite{%
\@bsphack
- \immediate\openout \verbatim@out "\jobname-Ex\thePfMExo.cdp" %coup de pouce
+ \immediate\openout \verbatim@out "\jobname-Ma\thePfMMaquette-Ex\thePfMExo.cdp" %coup de pouce
\let\do\@makeother\dospecials
\catcode`\^^M\active
\def\verbatim@processline{%
@@ -953,7 +1029,7 @@
\def\endIndiceWrite{\immediate\closeout\verbatim@out\@esphack}
\makeatother
-\def\SolutionNow{\textbf{Correction de l'exercice --}\par\nopagebreak\setcounter{PfMExoSol}{\thePfMExo}\setcounter{PfMAlea}{0}\PfMAffichageHideItemSolution}
+\def\SolutionNow{\textbf{\csname PfMTNomSol\Roman{PfMExo}\endcsname~--}\par\nopagebreak\setcounter{PfMExoSol}{\thePfMExo}\setcounter{PfMAlea}{0}\PfMAffichageHideItemSolution}%\setcounter{PfMExoSolAlea}{\thePfMExo}
\def\endSolutionNow{\par\goodbreak\PfMshowitems}
\def\ReponseNow{\textbf{Réponse(s) de l'exercice --}\par\nopagebreak\PfMAffichageHideItemSolution}
@@ -965,6 +1041,48 @@
\NewDocumentEnvironment{Solution}{}{}{}%
\NewDocumentEnvironment{Reponse}{}{}{}%
\NewDocumentEnvironment{Indice}{}{}{}%
+\NewDocumentEnvironment{PfMHide}{+b}{}{}%
+\NewDocumentEnvironment{PfMSeek}{+b}{#1}{}%
+
+\NewDocumentEnvironment{AideA}{+b}{%
+ \ifnum\fpeval{\useKV[ClesExercices]{Aide}}>0\relax%
+ \begin{PfMSeek}%
+ #1
+ \end{PfMSeek}%
+ \else%
+ \begin{PfMHide}%
+ #1
+ \end{PfMHide}
+ \fi%
+}{%
+}%
+
+\NewDocumentEnvironment{AideB}{+b}{%
+ \ifnum\fpeval{\useKV[ClesExercices]{Aide}}>1\relax%
+ \begin{PfMSeek}%
+ #1
+ \end{PfMSeek}
+ \else%
+ \begin{PfMHide}%
+ #1
+ \end{PfMHide}
+ \fi%
+}{%
+}%
+
+\NewDocumentEnvironment{Indications}{+b}{%
+ \ifnum\theRetiensIndic=1\relax%
+ \textbf{\PfMTexteDesIndications :}\par%
+ \else%
+ \begin{PfMHide}%
+ \fi%
+ #1
+}{%
+ \ifnum\theRetiensIndic=1\relax%
+ \else
+ \end{PfMHide}%
+ \fi%
+}%
\NewDocumentCommand\PfMChoixAffichageCorrection{}{%
\ifboolKV[Boulot]{CorrigeAll}{%
@@ -1050,28 +1168,76 @@
}%
}%
-\def\PfMTexteDuCorrige{Corrigé de l'exercice}
-\def\PfMTexteDeLEntrainement{Automatisme(s) lié(s) à l'exercice}
+\NewDocumentCommand\PfMChoixEntrainement{}{%
+ \setcounter{PfMRetiensQr}{0}%
+ \ifboolKV[ClesExercices]{AEntretenir}{\setcounter{PfMRetiensQr}{1}}{}%
+}%
+
+\NewDocumentCommand\PfMChoixAffichageEntrainement{}{%
+ \ifnum\thePfMRetiensQr=1\relax%
+ \let\Entrainement\EntrainementWrite\let\endEntrainement\endEntrainementWrite%
+ \else%
+ \let\Entrainement\comment\let\endEntrainement\endcomment
+ \fi%
+}%
+
+\def\PfMTexteDuCorrige{Corrigé de l'exercice}%
+\def\PfMTexteDeLEntrainement{Automatisme(s) lié(s) à l'exercice}%
+\def\PfMTexteDesIndications{Indications}%
\NewDocumentCommand\PfMAffichageCorrige{}{%
\ifboolKV[Boulot]{CAN}{%
\xintFor* ##1 in{\xintSeq{1}{\PfMCANTotalExo}}\do{%
\setcounter{PfMExoSol}{##1}%
\setcounter{PfMAlea}{0}%
- \IfFileExists{\jobname-Ex##1.sol}{\textbf{Question\ifnum\PfMCANTotalExo=1\relax\else~\ifboolKV[Boulot]{CorrigeSeul}{##1}{\ref{TestCAN-##1}}:\fi}~\input{\jobname-Ex##1.sol}\par\goodbreak}{}%page-\thePfMMaquette-##1
+ \IfFileExists{\jobname-Ma\thePfMMaquette-Ex##1.sol}{\textbf{Question\ifnum\PfMCANTotalExo=1\relax\else~\ifboolKV[Boulot]{CorrigeSeul}{##1}{\ref{TestCAN-##1}}:\fi}~\input{\jobname-Ma\thePfMMaquette-Ex##1.sol}\par\goodbreak}{}%
}%
}{%
\setcounter{PfMExoSol}{0}%
+ %\setcounter{PfMExoSolAlea}{0}%
\xintFor* ##1 in{\xintSeq{1}{\thePfMExo}}\do{%
- \refstepcounter{PfMExoSol}%{##1}%
- \label{pagesol-\thePfMMaquette-\thePfMExoSol}
+ \refstepcounter{PfMExoSol}%
+ %\stepcounter{PfMExoSolAlea}%
+ \label{pagesol-\thePfMMaquette-\thePfMExoSol}%
+ \setcounter{PfMAlea}{0}%
+ \def\PfMTexteDuCorrige{\csname PfMTNomSol\Roman{PfMExoSol}\endcsname}
+ \IfFileExists{\jobname-Ma\thePfMMaquette-Ex##1.sol}{\PfMAffichageHideItemSolution\textbf{\PfMTexteDuCorrige\ifnum\thePfMExo=1\relax\else~\ifboolKV[Boulot]{CorrigeSeul}{##1}{\ref{page-\thePfMMaquette-##1}}\fi\PfMAffichageTitreSolution}\par\nopagebreak\input{\jobname-Ma\thePfMMaquette-Ex##1.sol}\par\goodbreak}{\IfFileExists{\jobname-Ma\thePfMMaquette-Ex##1.rep}{\PfMAffichageHideItemSolution\textbf{Réponse(s) seule(s) de l'exercice\ifnum\thePfMExo=1\relax\else~\ifboolKV[Boulot]{CorrigeSeul}{##1}{\ref{page-\thePfMMaquette-##1}}\fi}\par\nopagebreak\input{\jobname-Ma\thePfMMaquette-Ex##1.rep}\par\goodbreak}{%
+ \IfFileExists{\jobname-Ma\thePfMMaquette-Ex##1.cdp}{\PfMAffichageHideItemSolution\textbf{Indice(s) pour l'exercice\ifnum\thePfMExo=1\relax\else~\ifboolKV[Boulot]{CorrigeSeul}{##1}{\ref{page-\thePfMMaquette-##1}}\fi}\par\nopagebreak\input{\jobname-Ma\thePfMMaquette-Ex##1.cdp}\par\goodbreak}{}%
+ }%
+ }%
+ \PfMshowitems%
+ }%
+ }%
+}%
+
+% Tous les corrigés
+\NewDocumentCommand\PfMAffichageTousCorriges{}{%
+ \setsepchar{,}\ignoreemptyitems%
+ \readlist*\ListeNombreExoMq{\PfMRetiensLienExoMa}%
+ \reademptyitems%
+ \xintFor* ##2 in{\xintSeq{1}{\thePfMMaquette}}\do{%
+ \refstepcounter{PfMMaquetteSol}%
+ \setcounter{PfMExoSol}{0}%
+ %\setcounter{PfMExoSolAlea}{0}%
+ \ifPfMRectoVerso%
+ \cleardoublepage%
+ \else%
+ \clearpage%
+ \fi%
+ \input{\jobname-DefiMq-##2}
+ \ifboolKV[Boulot]{CorrectionColonnes}{\begin{multicols}{\useKV[Boulot]{Colonnes}}}{}%
+ \xintFor* ##1 in{\xintSeq{1}{\ListeNombreExoMq[##2]}}\do{%
+ \stepcounter{PfMExoSol}%
+ %\stepcounter{PfMExoSolAlea}%
+ \label{pagesol-\thePfMMaquetteSol-\thePfMExoSol}%
\setcounter{PfMAlea}{0}%
- \IfFileExists{\jobname-Ex##1.sol}{\PfMAffichageHideItemSolution\textbf{\PfMTexteDuCorrige\ifnum\thePfMExo=1\relax\else~\ifboolKV[Boulot]{CorrigeSeul}{##1}{\ref{page-\thePfMMaquette-##1}}\fi\PfMAffichageTitreSolution}\par\nopagebreak\input{\jobname-Ex##1.sol}\par\goodbreak}{\IfFileExists{\jobname-Ex##1.rep}{\PfMAffichageHideItemSolution\textbf{Réponse(s) seule(s) de l'exercice\ifnum\thePfMExo=1\relax\else~\ifboolKV[Boulot]{CorrigeSeul}{##1}{\ref{page-\thePfMMaquette-##1}}\fi}\par\nopagebreak\input{\jobname-Ex##1.rep}\par\goodbreak}{%
- \IfFileExists{\jobname-Ex##1.cdp}{\PfMAffichageHideItemSolution\textbf{Indice(s) pour l'exercice\ifnum\thePfMExo=1\relax\else~\ifboolKV[Boulot]{CorrigeSeul}{##1}{\ref{page-\thePfMMaquette-##1}}\fi}\par\nopagebreak\input{\jobname-Ex##1.cdp}\par\goodbreak}{}%
+ \IfFileExists{\jobname-Ma##2-Ex##1.sol}{\PfMAffichageHideItemSolution\textbf{\PfMTexteDuCorrige\ifnum\thePfMExo=1\relax\else~\ifboolKV[Boulot]{CorrigeSeul}{##1}{\ref{page-##2-##1}}\fi\PfMAffichageTitreSolution}\par\nopagebreak\input{\jobname-Ma##2-Ex##1.sol}\par\goodbreak}{\IfFileExists{\jobname-Ma##2-Ex##1.rep}{\PfMAffichageHideItemSolution\textbf{Réponse(s) seule(s) de l'exercice\ifnum\thePfMExo=1\relax\else~\ifboolKV[Boulot]{CorrigeSeul}{##1}{\ref{page-##2-##1}}\fi}\par\nopagebreak\input{\jobname-Ma##2-Ex##1.rep}\par\goodbreak}{%
+ \IfFileExists{\jobname-Ma##2-Ex##1.cdp}{\PfMAffichageHideItemSolution\textbf{Indice(s) pour l'exercice\ifnum\thePfMExo=1\relax\else~\ifboolKV[Boulot]{CorrigeSeul}{##1}{\ref{page-##2-##1}}\fi}\par\nopagebreak\input{\jobname-Ma##2-Ex##1.cdp}\par\goodbreak}{}%
}%
}%
\PfMshowitems%
}%
+ \ifboolKV[Boulot]{CorrectionColonnes}{\end{multicols}}{}%
}%
}%
@@ -1080,28 +1246,40 @@
\makeatletter
\def\EntrainementWrite{%
\@bsphack%
- \immediate\openout \verbatim@out "\jobname-Ex\thePfMExo.qrc"%
+ \immediate\openout \verbatim@out "\jobname-Ma\thePfMMaquette-Ex\thePfMExo.qrc"%
\let\do\@makeother\dospecials%
\catcode`\^^M\active%
\def\verbatim@processline{%
\immediate\write\verbatim@out{\the\verbatim@line}}%
\verbatim@start}%
\def\endEntrainementWrite{\immediate\closeout\verbatim@out\@esphack}%
-
-\let\Entrainement\EntrainementWrite\let\endEntrainement\endEntrainementWrite%
\makeatother
\NewDocumentCommand\PfMAffichageEntrainement{}{%
- \clearpage
+ \ifboolKV[Boulot]{ESansSaut}{\vfill}{%
+ \ifPfMDeuxColonnes
+ \newpage
+ \else
+ \ifPfMRectoVerso
+ \cleardoublepage
+ \else
+ \clearpage
+ \fi
+ \fi
+ }%
\TikzAutomatismes
+ \setlength{\columnseprule}{\useKV[Boulot]{EEpaisseur}}%
+ \ifboolKV[Boulot]{EntrainementColonnes}{\begin{multicols}{\useKV[Boulot]{EColonnes}}}{}%
\setcounter{PfMExoEntrai}{0}%
\xintFor* ##1 in{\xintSeq{1}{\thePfMExo}}\do{%
\refstepcounter{PfMExoEntrai}%
- \IfFileExists{\jobname-Ex##1.qrc}{%
+ \IfFileExists{\jobname-Ma\thePfMMaquette-Ex##1.qrc}{%
\begin{center}
- \label{pageentrai-\thePfMMaquette-\thePfMExoEntrai}%
- \textbf{\PfMTexteDeLEntrainement\ifnum\thePfMExo=1\relax\else~\ref{page-\thePfMMaquette-##1}\fi}\par\nopagebreak\input{\jobname-Ex##1.qrc}\end{center}}{}%
+ \label{pageentrai-\thePfMMaquette-\thePfMExoEntrai}%
+ \textbf{\PfMTexteDeLEntrainement\ifnum\thePfMExo=1\relax\else~\ref{page-\thePfMMaquette-##1}\fi}\par\nopagebreak\input{\jobname-Ma\thePfMMaquette-Ex##1.qrc}\end{center}%
+ }{}%
}%
+ \ifboolKV[Boulot]{EntrainementColonnes}{\end{multicols}}{}%
}%
\NewDocumentCommand\TikzAutomatismes{}{%
@@ -1111,6 +1289,7 @@
\end{center}
\end{tcolorbox}%
}%
+
%%%%%%%% BAREME %%%%%%%%%%%
%% Bareme
\newlength{\brouillon}
@@ -1128,17 +1307,23 @@
\newcommand*\brm[1]{%
\ifboolKV[Boulot]{Fiche}{}{%
- \immediate\write\@auxout{%
- \string\opadd*{#1}%
- {total\the\c@PfMSection-\the\c@PfMExo}%
- {total\the\c@PfMSection-\the\c@PfMExo}%
- \string\opcopy{\thePfMExo}{TotalExo}%
+ \ifboolKV[Boulot]{FdR}{}{%
+ \ifboolKV[Boulot]{Contrat}{}{%
+ \ifboolKV[Boulot]{Parcours}{}{%
+ \immediate\write\@auxout{%
+ \string\opadd*{#1}%
+ {total\the\c@PfMSection-\the\c@PfMExo}%
+ {total\the\c@PfMSection-\the\c@PfMExo}%
+ \string\opcopy{\thePfMExo}{TotalExo}%
+ }%
+ \ifboolKV[ClesExercices]{BaremeDetaille}{%
+ \setlength{\brouillon}{\BaremeEspace@Marge-\linewidth+\textwidth}%
+ \makebox[0pt][r]{\footnotesize\FranPt{#1}\hspace*{\brouillon}}%
+ \ignorespaces%
+ }{}%
+ }%
+ }%
}%
- \ifboolKV[ClesExercices]{BaremeDetaille}{%
- \setlength{\brouillon}{\BaremeEspace@Marge-\linewidth+\textwidth}%
- \makebox[0pt][r]{\footnotesize\FranPt{#1}\hspace*{\brouillon}}%
- \ignorespaces%
- }{}%
}%
}%
@@ -1178,11 +1363,25 @@
\@ifundefined{Op@total#1}{recompilez}%
{%
\opunzero{total#1}% on ne sait jamais
- \opset{decimalsepsymbol={,}}
+ \opset{decimalsepsymbol={,}}%
\opprint{total#1}~%
- \opset{decimalsepsymbol={.}}
+ \opset{decimalsepsymbol={.}}%
+ \useKV[ClesExercices]{MotPoint}%
\opcmp{total#1}{2}%
- \ifopge \useKV[ClesExercices]{MotPoint}s\else \useKV[ClesExercices]{MotPoint}\fi
+ \ifopge s\fi%
+ }%
+}
+
+\newcommand\ScoreMaximal{%
+ \@ifundefined{Op@ScoreTotal\thePfMMaquette}{recompilez}%
+ {%
+ \opunzero{ScoreTotal\thePfMMaquette}% on ne sait jamais
+ \opset{decimalsepsymbol={,}}%
+ \opprint{ScoreTotal\thePfMMaquette}~%
+ \opset{decimalsepsymbol={.}}%
+ \useKV[ClesExercices]{MotPoint}%
+ \opcmp{ScoreTotal\thePfMMaquette}{2}%
+ \ifopge s\fi%
}%
}
@@ -1251,12 +1450,12 @@
\NewDocumentCommand{\PfMLienVersEntrainement}{}{%
\ifboolKV[Boulot]{AvecEntrainement}{%
- \ifboolKV[ClesExercices]{PasEntrainement}{}{%
+ \ifboolKV[ClesExercices]{AEntretenir}{%
\node[%
fill=tcbcolback,%
anchor=center,rotate=45%
] at ($(frame.north east)!0.75!(frame.south east)$){\hyperref[pageentrai-\thePfMMaquette-\thePfMExo]{\faDumbbell}};%
- }%
+ }{}%
}{}%
}%
@@ -1288,6 +1487,7 @@
colback=LightSteelBlue,
colbacklower=white,
frame hidden,
+ overlay=\useKV[ClesExercices]{Ajout}%
}%
}%
@@ -1300,6 +1500,7 @@
title=\ifboolKV[ClesExercices]{AffichageTitre}{\useKV[ClesExercices]{Titre}}{},%
coltitle=black,
frame hidden,
+ overlay=\useKV[ClesExercices]{Ajout}%
}
}
@@ -1307,7 +1508,6 @@
%%% Base des exercices DM
\tcbset{%
tikzdm/.style={%
- %lowerbox=ignored,
enhanced,
breakable,
colback=white,
@@ -1328,6 +1528,8 @@
},%
overlay unbroken and first={%
%
+ \useKV[ClesExercices]{Ajout}%
+ %
\PfMAffichageSource%
%
\ifboolKV[ClesExercices]{BaremeTotal}{%
@@ -1346,21 +1548,23 @@
}%
}%
-\NewDocumentEnvironment{exerciceDM}{so+b}{%
+\NewDocumentEnvironment{exerciceDM}{so}{%
\setcounter{PfMAlea}{0}%
+ % Mettre les indications hors-jeu
+ \setcounter{RetiensIndic}{0}
\useKVdefault[ClesExercices]%
\setKV[ClesExercices]{#2}%
+ \ifboolKV[Boulot]{Input}{\Relecture}{}%
\ifboolKV[ClesExercices]{NonUtilise}{%
% Mettre la correction hors-jeu
\setKV[ClesExercices]{PasCorrige}%
\PfMChoixCorrection%
+ \begin{PfMHide}
}{%
\IfBooleanTF{#1}{%
\setKV[ClesExercices]{Numerote=false}%
}{}%
- \refstepcounter{PfMSection}%
- \PfMChoixCorrection%
- \refstepcounter{PfMExo}%
+ \PfMAvantLesExercices%
\ifboolKV[Boulot]{CorrigeSeul}{}{%
\PfMChoixTitreSolution%
\immediate\write\@auxout{%
@@ -1376,12 +1580,11 @@
label=page-\thePfMMaquette-\thePfMExo,%
]%
\ifboolKV[Boulot]{Dys}{\raggedright}{}%
- #3
}%
}%
}{%
- \ifboolKV[ClesExercices]{NonUtilise}{}{%
- \ifboolKV[Boulot]{CorrigeSeul}{}{
+ \ifboolKV[ClesExercices]{NonUtilise}{\end{PfMHide}}{%
+ \ifboolKV[Boulot]{CorrigeSeul}{}{
\end{tcolorbox}%
\PfMApresLesExercices%
}%
@@ -1508,24 +1711,25 @@
\immediate\write\@auxout{\noexpand\expandafter\gdef\noexpand\csname \Roman{PfMMaquette}Contrat#1\endcsname{\csname \Roman{PfMMaquette}confiance#1\endcsname}}%
}%
-
-\NewDocumentEnvironment{exerciceContrat}{so+b}{%
+\NewDocumentEnvironment{exerciceContrat}{so}{%
\setcounter{PfMAlea}{0}%
\setcounter{PfMNbLogo}{1}%
+ % Mettre les indications hors-jeu
+ \setcounter{RetiensIndic}{0}
\useKVdefault[ClesExercices]%
\setKV[ClesExercices]{#2}%
+ \ifboolKV[Boulot]{Input}{\Relecture}{}%
\ifboolKV[ClesExercices]{NonUtilise}{%
% Mettre la correction hors-jeu
\setKV[ClesExercices]{PasCorrige}%
\PfMChoixCorrection%
+ \begin{PfMHide}
}{%
\IfBooleanTF{#1}{%
\setKV[ClesExercices]{Numerote=false}%
}{}%
\setKV[ClesExercices]{BaremeTotal=false,BaremeDetaille=false}%
- \refstepcounter{PfMSection}%
- \PfMChoixCorrection%
- \refstepcounter{PfMExo}%
+ \PfMAvantLesExercices%
\ifboolKV[Boulot]{CorrigeSeul}{}{%
\PfMChoixTitreSolution%
\immediate\write\@auxout{\string\opcopy{\thePfMExo}{\Roman{PfMMaquette}-ContratTotalExo}}%
@@ -1546,18 +1750,16 @@
label=page-\thePfMMaquette-\thePfMExo
]
\ifboolKV[Boulot]{Dys}{\raggedright}{}%
- #3
}%
}%
}{%
- \ifboolKV[ClesExercices]{NonUtilise}{}{%
+ \ifboolKV[ClesExercices]{NonUtilise}{\end{PfMHide}}{%
\ifboolKV[Boulot]{CorrigeSeul}{}{%
\end{tcolorbox}
\PfMApresLesExercices%
}%
}%
}%
-
%%% Contrat %%%
\tcbset{%
usercontrat/.style={%
@@ -1606,7 +1808,9 @@
anchor=west,
xshift=10pt,
] at (frame.north west){\bfseries\sffamily \useKV[Contrat]{NomExercice} \thePfMExo\ifboolKV[ClesExercices]{AffichageTitre}{ : \useKV[ClesExercices]{Titre}}{}};
- %%
+ %%
+ \useKV[ClesExercices]{Ajout}%
+ %%
\PfMAffichageLogos%
%%
\PfMAffichageCompetencesTravaillees%
@@ -1799,7 +2003,7 @@
\xdef\RetiensLeDepart{0}%
\xdef\RetiensLesReponses{0}%
\xdef\RetiensNonAffichees{0}%
- \xdef\RetiensEtage{0}
+ \xdef\RetiensEtage{0}%
\xintFor* ##1 in{\xintSeq{1}{\ListeRouteHautelen}}\do{%
\xintifboolexpr{\ListeRouteHaute[##1]==0}{%
\xdef\RetiensEtage{\fpeval{\RetiensEtage+1}}%
@@ -1814,7 +2018,7 @@
\xintifboolexpr{\fpeval{\RetiensLesReponses-1}==\RetiensNonAffichees}{%
% %
}{%
- \xintFor* ##2 in{\xintSeq{\fpeval{\RetiensLeDepart+1}}{\fpeval{\RetiensLeDepart+\RetiensLesReponses}}}\do{
+ \xintFor* ##2 in{\xintSeq{\fpeval{\RetiensLeDepart+1}}{\fpeval{\RetiensLeDepart+\RetiensLesReponses}}}\do{%
\xintifboolexpr{\ListeRouteHaute[##2]<0}{%
\draw (B-##2) to (B-\fpeval{##2+1});%
}{%
@@ -1863,24 +2067,28 @@
\fi
\immediate\write\@auxout{\noexpand\expandafter\gdef\noexpand\csname \Roman{PfMMaquette}FdR#1\endcsname{\csname \Roman{PfMMaquette}route#1\endcsname}}%
}%
-
-\NewDocumentEnvironment{exerciceFdR}{so+b}{%
+
+\def\Relecture{}%
+
+\NewDocumentEnvironment{exerciceFdR}{so}{%
\setcounter{PfMAlea}{0}%
\setcounter{PfMNbLogo}{1}%
+ % Mettre les indications hors-jeu
+ \setcounter{RetiensIndic}{0}
\useKVdefault[ClesExercices]%
\setKV[ClesExercices]{#2}%
+ \ifboolKV[Boulot]{Input}{\Relecture}{}%
\ifboolKV[ClesExercices]{NonUtilise}{%
% Mettre la correction hors-jeu
\setKV[ClesExercices]{PasCorrige}%
\PfMChoixCorrection%
+ \begin{PfMHide}
}{%
\IfBooleanTF{#1}{%
\setKV[ClesExercices]{Numerote=false}%
}{}%
\setKV[ClesExercices]{BaremeTotal=false,BaremeDetaille=false}%
- \stepcounter{PfMSection}%
- \PfMChoixCorrection%
- \refstepcounter{PfMExo}%
+ \PfMAvantLesExercices%
\ifboolKV[Boulot]{CorrigeSeul}{}{%
\PfMChoixTitreSolution%
\immediate\write\@auxout{\string\opcopy{\thePfMExo}{\Roman{PfMMaquette}-FdRTotalExo}}%
@@ -1914,11 +2122,10 @@
label=page-\thePfMMaquette-\thePfMExo
]
\ifboolKV[Boulot]{Dys}{\raggedright}{}%
- #3
}%
}%
}{%
- \ifboolKV[ClesExercices]{NonUtilise}{}{%
+ \ifboolKV[ClesExercices]{NonUtilise}{\end{PfMHide}}{%
\ifboolKV[Boulot]{CorrigeSeul}{}{%
\end{tcolorbox}
\PfMApresLesExercices%
@@ -1945,7 +2152,7 @@
\string\opcopy{\thePfMExo}{TotalExo}%
}%
\@bsphack%
- \immediate\openout \verbatim@out "\jobname-Ex\thePfMExo.can"%
+ \immediate\openout \verbatim@out "\jobname-Ma\thePfMMaquette-Ex\thePfMExo.can"%
\let\do\@makeother\dospecials%
\catcode`\^^M\active%
\def\verbatim@processline{\immediate\write\verbatim@out{\the\verbatim@line}}%
@@ -1970,7 +2177,6 @@
\tcbset{%
usercan/.style={%
enhanced,
- % spread upwards=-1cm,colback=gray!5%
frame hidden,
colback=white,
middle=24pt,
@@ -2030,7 +2236,6 @@
\Large\sffamily Course aux nombres (Correction)
\end{center}
\hfill\useKV[CAN]{Niveau}%
- %\par{\tiny\useKV[CAN]{Code}}\hfill{\scriptsize\useKV[CAN]{Date}}%
\end{tcolorbox}%
}
%%% FdR %%%
@@ -2080,7 +2285,9 @@
anchor=west,
xshift=10pt,
] at (frame.north west){\bfseries\sffamily \useKV[FdR]{NomExercice} \thePfMExo\ifboolKV[ClesExercices]{AffichageTitre}{ : \useKV[ClesExercices]{Titre}}{}};
- %%
+ %%
+ \useKV[ClesExercices]{Ajout}%
+ %%
\PfMAffichageLogos
%%
\PfMAffichageCompetencesTravaillees%
@@ -2112,19 +2319,33 @@
\reademptyitems%
\xdef\PfMFooTestA{\ListeExercicesPA[1]}%
\ifnum\ListeExercicesPAlen>1\relax%
- \xintFor* ##1 in{\xintSeq{2}{\ListeExercicesPAlen}}\do{%
- \xdef\PfMFooTestA{\PfMFooTestA,\ListeExercicesPA[##1]}%
- }%
+ \xintFor* ##1 in{\xintSeq{2}{\ListeExercicesPAlen}}\do{%
+ \xdef\PfMFooTestA{\PfMFooTestA,\ListeExercicesPA[##1]}%
+ }%
\fi%
- \ifboolKV[Parcours]{Vertical}{%
- \BuildParcoursTikzV{\ParcoursTotalExo}{\PfMFooTestA}%
+ \ifboolKV[Parcours]{Plan}{%
+ \BuildParcoursPlan{\ParcoursTotalExo}{\PfMFooTestA}%
}{%
- \BuildParcoursTikz{\ParcoursTotalExo}{\PfMFooTestA}%
+ \ifboolKV[Parcours]{Vertical}{%
+ \BuildParcoursTikzV{\ParcoursTotalExo}{\PfMFooTestA}%
+ }{%
+ \BuildParcoursTikz{\ParcoursTotalExo}{\PfMFooTestA}%
+ }%
}%
}%
}%
%\makeatother
+\NewDocumentCommand\BuildParcoursPlan{mm}{%
+ \setsepchar{,}%
+ \readlist*\ListeRetiens{#2}%
+ \begin{enumerate}
+ \foreachitem\compteur\in\ListeRetiens{%
+ \item[$\square$] Exercice \ref{page-\thePfMMaquette-\ListeRetiens[\compteurcnt]}%
+ }%
+ \end{enumerate}
+}%
+
\NewDocumentCommand\BuildParcoursTikzV{mm}{%
\setsepchar{,}%
\readlist*\ListeRetiens{#2}%
@@ -2155,8 +2376,13 @@
\begin{tikzpicture}[anchor=center,baseline=-1.25mm]
% On place les points
\Orientation=1\relax
+ \ifboolKV[Parcours]{Court}{%
+ \TotalParcoursTikz=\ListeRetienslen%
+ }{%
+ \TotalParcoursTikz=#1%
+ }%
\coordinate[anchor=base,baseline=-1.25mm] (A-1) at (0,0);%
- \xintFor* ##1 in{\xintSeq{2}{\fpeval{#1+1}}}\do{%
+ \xintFor* ##1 in{\xintSeq{2}{\fpeval{\the\TotalParcoursTikz+1}}}\do{%
\modulo{##1}{\useKV[SchemaParcours]{Colonnes}}%
\ifnum\remainder=0\relax%
\Orientation=\numexpr\Orientation*(-1)\relax%
@@ -2165,17 +2391,23 @@
\coordinate[xshift=\the\Orientation*\PfMLargeurSchemaParcours] (A-##1) at (A-\fpeval{##1-1});%
\fi%
}%
- \foreach\i in{2,...,#1}{%
- \draw[line width=1pt] (A-\fpeval{\i-1}) -- (A-\i);%
- }%
- %
- \draw[line width=1pt,>=latex,->] (A-#1)--(A-\fpeval{#1+1});
- %
- \xintFor* ##1 in{\xintSeq{1}{#1}}\do{%
- \draw[fill=white,dashed](A-##1) circle (2.5mm) node{##1};%
+ \foreach\i in{1,...,\the\TotalParcoursTikz}{%
+ \draw[line width=1pt] (A-\i) -- (A-\fpeval{\i+1});%
}%
- \foreachitem\compteur\in\ListeRetiens{%
- \draw[fill=PfMCouleurSP](A-\ListeRetiens[\compteurcnt]) circle (2.5mm) node{\ref{page-\thePfMMaquette-\ListeRetiens[\compteurcnt]}};%
+% %
+ \draw[line width=1pt,>=latex,->] (A-\the\TotalParcoursTikz)--(A-\fpeval{\the\TotalParcoursTikz+1});
+% %
+ \ifboolKV[Parcours]{Court}{%
+ \foreachitem\compteur\in\ListeRetiens{%
+ \draw[fill=PfMCouleurSP](A-\compteurcnt) circle (2.5mm) node{\ref{page-\thePfMMaquette-\ListeRetiens[\compteurcnt]}};%
+ }%
+ }{%
+ \xintFor* ##1 in{\xintSeq{1}{\the\TotalParcoursTikz}}\do{%
+ \draw[fill=white,dashed](A-##1) circle (2.5mm) node{##1};%
+ }%
+ \foreachitem\compteur\in\ListeRetiens{%
+ \draw[fill=PfMCouleurSP](A-\ListeRetiens[\compteurcnt]) circle (2.5mm) node{\ref{page-\thePfMMaquette-\ListeRetiens[\compteurcnt]}};%
+ }%
}%
\end{tikzpicture}%
}%
@@ -2195,7 +2427,7 @@
\stepcounter{PfMExo}%
\PfMChoixCorrection%
\@bsphack%
- \immediate\openout \verbatim@out "\jobname-PPEx\thePfMExo.tex" %
+ \immediate\openout \verbatim@out "\jobname-Ma\thePfMMaquette-PPEx\thePfMExo.tex" %
\immediate\write\verbatim@out{\string\begin{exercice}}
\let\do\@makeother\dospecials%
\catcode`\^^M\active%
@@ -2205,23 +2437,25 @@
\def\endexerciceParcoursPerso{\immediate\write\verbatim@out{\string\end{exercice}}\immediate\closeout\verbatim@out\@esphack}%
-\NewDocumentEnvironment{exerciceParcours}{so+b}{%
+\NewDocumentEnvironment{exerciceParcours}{so}{%
\setcounter{PfMAlea}{0}%
\setcounter{PfMNbLogo}{1}%
+ % Mettre les indications hors-jeu
+ \setcounter{RetiensIndic}{0}
\useKVdefault[ClesExercices]%
\setKV[ClesExercices]{#2}%
+ \ifboolKV[Boulot]{Input}{\Relecture}{}%
\ifboolKV[ClesExercices]{NonUtilise}{%
% Mettre la correction hors-jeu
\setKV[ClesExercices]{PasCorrige}%
\PfMChoixCorrection%
+ \begin{PfMHide}
}{%
\IfBooleanTF{#1}{%
\setKV[ClesExercices]{Numerote=false}%
}{}%
\setKV[ClesExercices]{BaremeTotal=false,BaremeDetaille=false}%
- \refstepcounter{PfMSection}%
- \PfMChoixCorrection%
- \refstepcounter{PfMExo}%
+ \PfMAvantLesExercices%
\ifboolKV[Boulot]{CorrigeSeul}{}{%
\PfMChoixTitreSolution%
\immediate\write\@auxout{\string\opcopy{\thePfMExo}{\Roman{PfMMaquette}-ParcoursTotalExo}}%
@@ -2242,11 +2476,10 @@
label=page-\thePfMMaquette-\thePfMExo
]
\ifboolKV[Boulot]{Dys}{\raggedright}{}%
- #3
}%
}%
}{%
- \ifboolKV[ClesExercices]{NonUtilise}{}{%
+ \ifboolKV[ClesExercices]{NonUtilise}{\end{PfMHide}}{%
\ifboolKV[Boulot]{CorrigeSeul}{}{%
\end{tcolorbox}
\PfMApresLesExercices%
@@ -2310,17 +2543,158 @@
}%
}%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\NewDocumentCommand\PfMScore{m}{%
+ \immediate\write\@auxout{%
+ \string\opadd*{#1}{ScoreTotal\thePfMMaquette}{ScoreTotal\thePfMMaquette}%
+ }%
+ \num{#1} pt\xintifboolexpr{#1>2 || #1==2}{s}{}%
+}%
+
+\def\PfMMPGrilleCode{%
+ PapierLargeur=floor(\mpdim{\linewidth}/(5mm));
+ color PapierCouleur;
+ PapierCouleur=0.8white;
+ %
+ vardef Papier(expr nb,score)=
+ path horizon,verticon;
+ horizon=(0,0)--(PapierLargeur*5mm,0);
+ verticon=(0,0)--(0,abs(nb)*5mm);
+ picture Papiers;
+ Papiers=image(
+ drawoptions(withcolor PapierCouleur);
+ for k=0 upto PapierLargeur:
+ draw verticon shifted((k*5mm,0));
+ endfor;
+ for k=0 upto abs(nb):
+ draw horizon shifted((0,k*5mm));
+ endfor;
+ drawoptions();
+ if nb<0:
+ path cc,cd,ce;
+ cd=(unitsquare xscaled (3*5mm) yscaled (abs(nb)*5mm)) shifted(5mm*(PapierLargeur-3,0));
+ ce=(unitsquare scaled (2*5mm)) shifted(5mm*(PapierLargeur-2.5,1));
+ cc=(unitsquare xscaled (6*5mm) yscaled (2*5mm)) shifted(5mm*(PapierLargeur-10,1));
+ fill cd withcolor PapierCouleur;
+ fill ce withcolor white;
+ fill cc withcolor white;
+ %drawoptions(withpen pencircle scaled 1);
+ draw ce;
+ draw cc;
+ draw cd;
+ draw polygone((0,0),(PapierLargeur*5mm,0),5mm*(PapierLargeur,abs(nb)),5mm*(0,abs(nb)));
+ if score>0:
+ label.bot(TEX("\PfMScore{"&decimal(score)&"}"),5mm*(PapierLargeur-1.5,1));
+ fi;
+ fi;
+ );
+ Papiers
+ enddef;
+}%
+
+\def\PfMPapierCinqCinq#1#2{%
+ \begin{center}
+ \ifluatex%
+ \mplibforcehmode%
+ \begin{mplibcode}%
+ \PfMMPGrilleCode
+ trace Papier(#1,#2);
+ \end{mplibcode}%
+ \else%
+ \begin{mpost}[mpsettings={\PfMMPGrilleCode}]
+ trace Papier(#1,#2);
+ \end{mpost}%
+ \fi%
+ \end{center}
+}%
+
+\def\PfMMPSeyesCode{%
+ u:=\useKV[ClesExercices]{EchelleSeyes}*1mm;
+ PapierLargeur=floor(\mpdim{\linewidth}/(u));
+ color PapierCouleur;
+ PapierCouleur=0.8white;%\useKV[Papiers]{Couleur};
+ vardef Seyes(expr nb,score)=
+ path horizon,verticon;
+ horizon=(0,0)--u*(PapierLargeur,0);
+ verticon=(0,0)--u*(0,abs(nb));
+ picture PapierSeyes;
+ PapierSeyes=image(
+ drawoptions(withcolor PapierCouleur);
+ for k=0 upto (PapierLargeur):
+ draw verticon shifted((k*u,0));
+ endfor;
+ for k=0 step 0.25 until abs(nb):
+ draw horizon shifted((0,k*u)) withpen pencircle scaled 0.5;
+ endfor;
+ for k=0 upto abs(nb):
+ draw horizon shifted((0,k*u)) withpen pencircle scaled 1.25;
+ endfor;
+ drawoptions();
+ if nb<0:
+ path cc,cd,ce;
+ cd=(unitsquare xscaled (2*u) yscaled (abs(nb)*u)) shifted(u*(PapierLargeur-2,0));
+ ce=(unitsquare scaled (1*u)) shifted(u*(PapierLargeur-1.5,1));
+ cc=(unitsquare xscaled (4*u) yscaled (1*u)) shifted(u*(PapierLargeur-7,1));
+ fill cd withcolor PapierCouleur;
+ fill ce withcolor white;
+ fill cc withcolor white;
+ draw cc;
+ draw cd;
+ draw ce;
+ draw polygone((0,0),(PapierLargeur*u,0),u*(PapierLargeur,abs(nb)),u*(0,abs(nb)));
+ if score>0:
+ label.bot(TEX("\PfMScore{"&decimal(score)&"}"),u*(PapierLargeur-1,1));
+ fi;
+ fi;
+ );
+ PapierSeyes
+ enddef;
+}%
+
+\def\PfMPapierSeyes#1#2{%
+ \begin{center}
+ \ifluatex%
+ \mplibforcehmode%
+ \begin{mplibcode}%
+ \PfMMPSeyesCode
+ trace Seyes(#1,#2);
+ \end{mplibcode}%
+ \else%
+ \begin{mpost}[mpsettings={\PfMMPSeyesCode}]%
+ trace Seyes(#1,#2);
+ \end{mpost}
+ \fi%
+ \end{center}
+}%
+
\NewDocumentCommand\PfMApresLesExercices{}{%
\ifboolKV[ClesExercices]{Ligne}{%
- % \vspace{\PfMEspaceAvantLignes}
- \PfMSetStretch\PfMLignespointilles{\useKV[ClesExercices]{Lignes}}%
+ \vspace*{\PfMEspaceAvantLignes}%
+ \PfMSetStretch\PfMLignespointilles{\useKV[ClesExercices]{Lignes}}%
\par\vspace*{\PfMEspaceApresLignes}\par%
}{}%
\par%
\ifboolKV[ClesExercices]{Cadres}{%
- \begin{PfMtcbEncart}%
- %
- \end{PfMtcbEncart}%
+ \begin{PfMtcbEncart}%
+ %
+ \end{PfMtcbEncart}%
+ }{}%
+ \ifboolKV[ClesExercices]{Grilles}{%
+ \ifboolKV[ClesExercices]{Cinq}{%
+ \PfMPapierCinqCinq{\useKV[ClesExercices]{CinqCinq}}{\useKV[ClesExercices]{Score}}%
+ }{}%
+ \ifboolKV[ClesExercices]{Huit}{%
+ \PfMPapierSeyes{\useKV[ClesExercices]{Seyes}}{\useKV[ClesExercices]{Score}}%
+ }{}%
+ }{}%
+ \ifboolKV[ClesExercices]{Profile}{\PfMshowitems}{}%
+ \ifboolKV[ClesExercices]{ACompleter}{%
+ \IfHookExistsTF{env/center/begin}{\RemoveFromHook{env/center/begin}[*]}{}%
+ \IfHookExistsTF{env/center/end}{\RemoveFromHook{env/center/end}[*]}{}%
+ \IfHookExistsTF{env/itemize/begin}{\RemoveFromHook{env/itemize/begin}[*]}{}%
+ \IfHookExistsTF{env/itemize/end}{\RemoveFromHook{env/itemize/end}[*]}{}%
+ \IfHookExistsTF{env/description/begin}{\RemoveFromHook{env/description/begin}[*]}{}%
+ \IfHookExistsTF{env/description/end}{\RemoveFromHook{env/description/end}[*]}{}%
}{}%
}%
@@ -2329,7 +2703,7 @@
\expandafter\xdef\csname PfMEcrireTitreSol\endcsname{\csname PfMTSol\Roman{PfMExoSol}\endcsname}%
\ifx\bla\PfMEcrireTitreSol\bla%
\else
- \PfMEcrireTitreSol%
+ ~:~\PfMEcrireTitreSol%
\fi%
}%
@@ -2342,6 +2716,10 @@
}%
}%
+\NewDocumentCommand\PfMChoixNomCorrection{}{%
+ \expandafter\xdef\csname PfMTNomSol\Roman{PfMExo}\endcsname{\useKV[ClesExercices]{TitreCorrige}}
+}%
+
\NewDocumentCommand\PfMChoixHideItemSolution{}{%
\ifboolKV[ClesExercices]{Profile}{%
% J'ai un élève à profil : Je dois me souvenir que la correction doit être profilée. Le compteur PfMExo vaut \thePfMExo
@@ -2361,68 +2739,106 @@
\fi%
}%
-\newbox\PfMBoxSauvegarde%
+\NewDocumentCommand\PfMAvantLesExercices{}{%
+ \ifboolKV[ClesExercices]{AvecIndications}{\setcounter{RetiensIndic}{1}}{}%
+ \ifboolKV[ClesExercices]{Profile}{\PfMhideitems}{}%
+ \refstepcounter{PfMSection}%
+ \PfMChoixCorrection%
+ \PfMChoixEntrainement%
+ \refstepcounter{PfMExo}%
+ \PfMChoixNomCorrection%
+ \ifboolKV[ClesExercices]{ACompleter}{%
+ \let\oldenumerate\enumerate%
+ \let\oldendenumerate\endenumerate%
+ \let\enumerate\autoenumerate%
+ \let\endenumerate\endautoenumerate%
+ \AddToHook{env/center/begin}[Bcenter]{\let\item\olditem}%
+ \AddToHook{env/center/end}[Ecenter]{\let\item\litem}%
+ \AddToHook{env/description/begin}[Bdescription]{\let\item\olditem}%
+ \AddToHook{env/description/end}[Edescription]{\let\item\litem}%
+ \AddToHook{env/itemize/begin}[Bitemize]{\let\item\olditem}%
+ \AddToHook{env/itemize/end}[Eitemize]{\let\item\litem}%
+ }{}%
+}%
-\NewDocumentEnvironment{exerciceFiche}{so+b}{%
+\NewDocumentEnvironment{exerciceFiche}{so}{%
\setcounter{PfMAlea}{0}%
\setcounter{PfMNbLogo}{1}%
+ % Mettre les indications hors-jeu
+ \setcounter{RetiensIndic}{0}
\useKVdefault[ClesExercices]%
\setKV[ClesExercices]{#2}%
+ \ifboolKV[Boulot]{Input}{\Relecture}{}%
\ifboolKV[ClesExercices]{NonUtilise}{%
% Mettre la correction hors-jeu
\setKV[ClesExercices]{PasCorrige}%
\PfMChoixCorrection%
+ \begin{PfMHide}
}{%
\IfBooleanTF{#1}{%
\setKV[ClesExercices]{Numerote=false}%
}{}%
- \ifboolKV[ClesExercices]{Profile}{\PfMhideitems}{}%
\colorlet{ColExoFiche}{\useKV[ClesExercices]{Background}}%
\colorlet{PfMCadreFiche}{\useKV[ClesExercices]{Cadre}}%
\setKV[ClesExercices]{BaremeTotal=false,BaremeDetaille=false}%
- \refstepcounter{PfMSection}%
- \PfMChoixCorrection%
- \refstepcounter{PfMExo}%
+ \PfMAvantLesExercices%
\ifboolKV[Boulot]{CorrigeSeul}{}{%
- \PfMChoixTitreSolution%
- \PfMChoixHideItemSolution%
- \begin{tcolorbox}[%
- tikzfiche,
- label is label,
- label=page-\thePfMMaquette-\thePfMExo
- ]
- \ifboolKV[Boulot]{Dys}{\raggedright}{}%
- %
- #3
+ \PfMChoixTitreSolution%
+ \PfMChoixHideItemSolution%
+ \begin{tcolorbox}[%
+ tikzfiche,
+ label is label,
+ label=page-\thePfMMaquette-\thePfMExo
+ ]
+ \ifboolKV[Boulot]{Dys}{\raggedright}{}%
}%
}%
}{%
- \ifboolKV[ClesExercices]{NonUtilise}{}{%
+ \ifboolKV[ClesExercices]{NonUtilise}{\end{PfMHide}}{%
\ifboolKV[Boulot]{CorrigeSeul}{}{
\end{tcolorbox}%
- \ifboolKV[ClesExercices]{Profile}{\PfMshowitems}{}%
+ % \ifboolKV[ClesExercices]{Profile}{\PfMshowitems}{}%
\PfMApresLesExercices%
}%
}%
}%
+%\makeatletter
+\NewDocumentCommand\TikzOlympiadesAPMEPCor{m}{%
+ \ifPfMRectoVerso%
+ \cleardoublepage%
+ \else%
+ \clearpage%
+ \fi%
+ \setKV[OlympiadesAPMEP]{#1}%
+ \begin{tcolorbox}[colback=colLogo]
+ \begin{Dispo}*{\normalsize\logoapmep{\scale@logo}}
+ \Large\sffamily \useKV[OlympiadesAPMEP]{Theme}
+
+ (Correction)%
+ \end{Dispo}
+ \end{tcolorbox}%
+}%
+%\makeatother
+
\NewDocumentEnvironment{exerciceOlympiadesAPMEP}{so}{%
\setcounter{PfMAlea}{0}%
\setcounter{PfMNbLogo}{1}%
+ % Mettre les indications hors-jeu
+ \setcounter{RetiensIndic}{0}
\useKVdefault[ClesExercices]%
\setKV[ClesExercices]{#2}%
+ \ifboolKV[Boulot]{Input}{\Relecture}{}%
\ifboolKV[ClesExercices]{NonUtilise}{%
% Mettre la correction hors-jeu
\setKV[ClesExercices]{PasCorrige}%
\PfMChoixCorrection%
+ \begin{PfMHide}
}{%
\IfBooleanTF{#1}{%
\setKV[ClesExercices]{Numerote=false}%
}{}%
- \ifboolKV[ClesExercices]{Profile}{\PfMhideitems}{}%
- \colorlet{ColExoFiche}{\useKV[ClesExercices]{Background}}%
- \colorlet{PfMCadreFiche}{\useKV[ClesExercices]{Cadre}}%
- \setKV[ClesExercices]{BaremeTotal=false,BaremeDetaille=false}%
+ \PfMAvantLesExercices%
\refstepcounter{PfMSection}%
\PfMChoixCorrection%
\refstepcounter{PfMExo}%
@@ -2438,29 +2854,30 @@
}%
}%
}{%
- \ifboolKV[ClesExercices]{NonUtilise}{}{%
+ \ifboolKV[ClesExercices]{NonUtilise}{\end{PfMHide}}{%
\end{tcolorbox}%
- \ifboolKV[ClesExercices]{Profile}{\PfMshowitems}{}%
+ %\ifboolKV[ClesExercices]{Profile}{\PfMshowitems}{}%
\PfMApresLesExercices%
- }
+ }%
}%
-\NewDocumentEnvironment{exerciceDS}{so+b}{%
+\NewDocumentEnvironment{exerciceDS}{so}{%
\setcounter{PfMAlea}{0}%
+ % Mettre les indications hors-jeu
+ \setcounter{RetiensIndic}{0}
\useKVdefault[ClesExercices]%
\setKV[ClesExercices]{#2}%
+ \ifboolKV[Boulot]{Input}{\Relecture}{}%
\ifboolKV[ClesExercices]{NonUtilise}{%
% Mettre la correction hors-jeu
\setKV[ClesExercices]{PasCorrige}%
\PfMChoixCorrection%
+ \begin{PfMHide}
}{%
\IfBooleanTF{#1}{%
\setKV[ClesExercices]{Numerote=false}%
}{}%
- \ifboolKV[ClesExercices]{Profile}{\PfMhideitems}{}%
- \refstepcounter{PfMSection}%
- \PfMChoixCorrection%
- \refstepcounter{PfMExo}%
+ \PfMAvantLesExercices
\ifboolKV[Boulot]{CorrigeSeul}{}{%
\PfMChoixTitreSolution%
\immediate\write\@auxout{%
@@ -2476,11 +2893,10 @@
label=page-\thePfMMaquette-\thePfMExo
]
\ifboolKV[Boulot]{Dys}{\raggedright}{}%
- #3
}%
}%
}{%
- \ifboolKV[ClesExercices]{NonUtilise}{}{%
+ \ifboolKV[ClesExercices]{NonUtilise}{\end{PfMHide}}{%
\ifboolKV[Boulot]{CorrigeSeul}{}{%
\end{tcolorbox}%
\PfMApresLesExercices%
@@ -2490,8 +2906,11 @@
\NewDocumentEnvironment{ExerciceRecapBrevet}{so}{%
\setcounter{PfMAlea}{0}%
+ % Mettre les indications hors-jeu
+ \setcounter{RetiensIndic}{0}
\useKVdefault[ClesExercices]%
\setKV[ClesExercices]{#2}%
+ \ifboolKV[Boulot]{Input}{\Relecture}{}%
\IfBooleanTF{#1}{%
\setKV[ClesExercices]{Numerote=false}%
}{}%
@@ -2518,6 +2937,7 @@
}%
\makeatother
+
%%% Recap Brevet
%%% Style Brevet
\tcbset{%
@@ -2575,6 +2995,7 @@
at (frame.north east)%
{\footnotesize\sffamily \total{\the\c@PfMSection-\the\c@PfMExo}};%
}{}%
+ \useKV[ClesExercices]{Ajout}%
}%
}%
}%
@@ -2608,6 +3029,8 @@
xshift=10pt,
] at (frame.north west){\bfseries\sffamily \useKV[PdT]{NomExercice} \thePfMExo\ifboolKV[ClesExercices]{AffichageTitre}{ : \useKV[ClesExercices]{Titre}}{}};
}
+ %%
+ \useKV[ClesExercices]{Ajout}%
%%
\PfMAffichageLogos%
%
@@ -2655,8 +3078,11 @@
\newenvironment{exercicePdT}[1][]{%
\setcounter{PfMAlea}{0}%
\setcounter{PfMNbLogo}{1}
+ % Mettre les indications hors-jeu
+ \setcounter{RetiensIndic}{0}
\useKVdefault[ClesExercices]%
\setKV[ClesExercices]{#1}%
+ \ifboolKV[Boulot]{Input}{\Relecture}{}%
\setKV[ClesExercices]{BaremeTotal=false,BaremeDetaille=false}%
\refstepcounter{PfMSection}%
\PfMChoixCorrection%
@@ -2704,6 +3130,17 @@
\end{tikzpicture}%
}%
+\NewDocumentCommand\CheminNeutre{m}{%
+ \setsepchar[*]{,*/}%
+ \readlist*\ListeCheminVrai{#1}%
+ \setsepchar{,}%
+ \begin{tikzpicture}[remember picture,overlay]%
+ \foreachitem\compteur\in\ListeCheminVrai{%
+ \draw[cheminPdT] (\ListeCheminVrai[\compteurcnt,1]) to (\ListeCheminVrai[\compteurcnt,2]);%
+ }%
+ \end{tikzpicture}%
+}%
+
\NewDocumentCommand\CheminFaux{m}{%
\setsepchar[*]{,*/}%
\readlist*\ListeCheminVrai{#1}%
@@ -2785,8 +3222,11 @@
}%
\NewDocumentEnvironment{exerciceKholle}{o}{%
+ % Mettre les indications hors-jeu
+ \setcounter{RetiensIndic}{0}
\useKVdefault[ClesExercices]%
\setKV[ClesExercices]{#1}%
+ \ifboolKV[Boulot]{Input}{\Relecture}{}%
\setKV[ClesExercices]{BaremeTotal=false,BaremeDetaille=false}%
\PfMChoixCorrection%
\refstepcounter{PfMExo}%
@@ -2803,8 +3243,11 @@
\newenvironment{exerciceBase}[1][]{%
\setcounter{PfMAlea}{0}%
\setcounter{PfMNbLogo}{1}
+ % Mettre les indications hors-jeu
+ \setcounter{RetiensIndic}{0}
\useKVdefault[ClesExercices]
\setKV[ClesExercices]{#1}
+ \ifboolKV[Boulot]{Input}{\Relecture}{}%
\setKV[ClesExercices]{BaremeTotal=false,BaremeDetaille=false}
\refstepcounter{PfMExo}
\tcolorbox[%
@@ -2816,8 +3259,11 @@
\newenvironment{exerciceBaseHTML}[1][]{%
\setcounter{PfMAlea}{0}%
\setcounter{PfMNbLogo}{1}
+ % Mettre les indications hors-jeu
+ \setcounter{RetiensIndic}{0}
\useKVdefault[ClesExercices]
\setKV[ClesExercices]{#1}
+ \ifboolKV[Boulot]{Input}{\Relecture}{}%
\setKV[ClesExercices]{BaremeTotal=false,BaremeDetaille=false}
\refstepcounter{PfMExo}
\tcolorbox[%
@@ -3056,6 +3502,8 @@
anchor=west,
xshift=\kvtcb@leftlower,
] at (frame.north west){\bfseries\sffamily\useKV[Fiche]{NomExercice}\ifboolKV[ClesExercices]{Numerote}{ \thePfMExo}{}\ifboolKV[ClesExercices]{AffichageTitre}{\ifboolKV[ClesExercices]{Numerote}{~:~}{\xdef\PfMTitiLgNE{\useKV[Fiche]{NomExercice}}\IfStrEq{\PfMTitiLgNE}{}{}{~:~}}\useKV[ClesExercices]{Titre}}{}};
+ %%
+ \useKV[ClesExercices]{Ajout}%
%%
\PfMAffichageLogos%
%
@@ -3083,14 +3531,16 @@
% colframe=PfMCadreFiche,
frame hidden,
overlay unbroken and first={%
- \draw[colLogo,line width=1pt] ([yshift=-10pt]frame.north west)--([yshift=-10pt]frame.north east);
+ \draw[colLogo,line width=1pt] ([yshift=-12pt]frame.north west)--([yshift=-12pt]frame.north east);
\node[%
name=A,
fill=ColExoFiche,
anchor=west,
xshift=\kvtcb@leftlower,
] at (frame.north west){\color{colLogo}\resizebox{1em}{!}{\carreEntoure{}}~\Large\bfseries\sffamily\useKV[Fiche]{NomExercice}\ifboolKV[ClesExercices]{Numerote}{ \thePfMExo}{}\ifboolKV[ClesExercices]{AffichageTitre}{\ifboolKV[ClesExercices]{Numerote}{.~}{\xdef\PfMTitiLgNE{\useKV[Fiche]{NomExercice}}\IfStrEq{\PfMTitiLgNE}{}{}{.~}}\useKV[ClesExercices]{Titre}}{}};
- %%
+ %%
+ \useKV[ClesExercices]{Ajout}%
+ %%
\PfMAffichageLogos%
%
\PfMAffichageCompetencesTravaillees%
@@ -3149,7 +3599,9 @@
anchor=west,
xshift=10pt,
] at (frame.north west){\bfseries\sffamily \useKV[Parcours]{NomExercice} \thePfMExo\ifboolKV[ClesExercices]{AffichageTitre}{ : \useKV[ClesExercices]{Titre}}{}};
- %%
+ %%
+ \useKV[ClesExercices]{Ajout}%
+ %%
\PfMAffichageLogos%
%%
\PfMAffichageCompetencesTravaillees%
@@ -3230,6 +3682,8 @@
title=Exercice\ifboolKV[ClesExercices]{Numerote}{ \thePfMExo}{}\ifboolKV[ClesExercices]{AffichageTitre}{ : \useKV[ClesExercices]{Titre}}{},
overlay unbroken and first={%
%
+ \useKV[ClesExercices]{Ajout}%
+ %
\PfMAffichageSource%
%
\ifboolKV[ClesExercices]{BaremeTotal}{%
@@ -3274,7 +3728,7 @@
\clearpage
\begin{minipage}{0.6\linewidth}
\begin{tcolorbox}[userie]%
- \sffamily \useKV[IE]{Nom} \useKV[IE]{Numero} : \useKV[IE]{Theme} \ifboolKV[IE]{Sujets}{\scriptsize(Sujet \useKV[IE]{Sujet})}{}
+ \sffamily \useKV[IE]{Nom} \useKV[IE]{Numero} : \useKV[IE]{Theme} \ifboolKV[IE]{Sujets}{{\scriptsize(Sujet \useKV[IE]{Sujet})}}{}
\vspace{1em}
\par{\tiny\useKV[IE]{Code}}\hfill{\scriptsize\useKV[IE]{Date}}
\end{tcolorbox}%
@@ -3299,42 +3753,39 @@
\end{tcolorbox}%
}%
-\NewDocumentCommand\Recapitulatif{mm}{%
- \setKV[Boulot]{#1}%
- \DTLforeach*{dataperso}{\Prenom=PrenomEleve,\Nom=NomEleve,\RecapListeExo=ListeExo}{%
- \ifboolKV[Boulot]{Dys}{%
- \begin{Maquette}[Fiche,Dys]{#2,Code=\normalsize\Prenom~\Nom}%
- }{%
- \begin{Maquette}[Fiche]{#2,Code=\normalsize\Prenom~\Nom}%
- }%
+\NewDocumentCommand\PfMRecapitulatif{mm}{%
+ \setKV[Boulot]{#1}%
+ \setcounter{PfMRetiensMapourPP}{\thePfMMaquette}%
+ \DTLforeach*{dataperso}{\Prenom=PrenomEleve,\Nom=NomEleve,\RecapListeExo=ListeExo}{%
+ \ifboolKV[Boulot]{Dys}{%
+ \begin{Maquette}[Fiche,Dys]{#2,Code=\normalsize\Prenom~\Nom}%
+ }{%
+ \begin{Maquette}[Fiche]{#2,Code=\normalsize\Prenom~\Nom}%
+ }%
+ \readlist*\ListeExercices{\RecapListeExo}%
+ \ifnum\fpeval{\ListeExerciceslen}=1\relax{}
+ \setKVdefault[ClesExercices]{Numerote=false}
+ \input{\jobname-Ma\thePfMRetiensMapourPP-PPEx\ListeExercices[1].tex}%
+ \setKVdefault[ClesExercices]{Numerote}
+ \else
+ \foreach\i in{1,...,\ListeExerciceslen}{%
+ \input{\jobname-Ma\thePfMRetiensMapourPP-PPEx\ListeExercices[\i].tex}%
+ }
+ \fi
+ \ifnum\thePfMCorrigeParcoursPerso=1\relax%
+ % \RecapitulatifCorrection{#2}%
+ \clearpage
+ \TikzFicheCor{#1,Code=\normalsize\Prenom~\Nom}%
\readlist*\ListeExercices{\RecapListeExo}%
\ifnum\fpeval{\ListeExerciceslen}=1\relax{}
- \setKVdefault[ClesExercices]{Numerote=false}
-% \begin{exercice}*
- \input{\jobname-PPEx\ListeExercices[1].tex}%
- % \end{exercice}%
- \setKVdefault[ClesExercices]{Numerote}
+ \textbf{Corrigé de l'exercice} : \input{\jobname-Ma\thePfMMaquette-PPEx\ListeExercices[1].sol}\par\goodbreak%
\else
\foreach\i in{1,...,\ListeExerciceslen}{%
- % \begin{exercice}
- \input{\jobname-PPEx\ListeExercices[\i].tex}%
- % \end{exercice}%
- }
- \fi
- \ifnum\thePfMCorrigeParcoursPerso=1\relax%
- % \RecapitulatifCorrection{#2}%
- \clearpage
- \TikzFicheCor{#1,Code=\normalsize\Prenom~\Nom}%
- \readlist*\ListeExercices{\RecapListeExo}%
- \ifnum\fpeval{\ListeExerciceslen}=1\relax{}
- \textbf{Corrigé de l'exercice} : \input{\jobname-PPEx\ListeExercices[1].sol}\par\goodbreak%
- \else
- \foreach\i in{1,...,\ListeExerciceslen}{%
- \textbf{Corrigé de l'exercice \i} : \input{\jobname-PPEx\ListeExercices[\i].sol}\par\goodbreak%
- }%
- \fi%
+ \textbf{Corrigé de l'exercice \i} : \input{\jobname-Ma\thePfMMaquette-PPEx\ListeExercices[\i].sol}\par\goodbreak%
+ }%
\fi%
- \end{Maquette}%
+ \fi%
+ \end{Maquette}%
}%
}%
@@ -3344,7 +3795,7 @@
\TikzFicheCor{#1,Code=\normalsize\Prenom~\Nom}%
\readlist*\ListeExercices{\RecapListeExo}%
\foreach\i in{1,...,\ListeExerciceslen}{%
- \IfFileExists{\jobname-PPEx\ListeExercices[\i].sol}{\textbf{Corrigé de l'exercice \i} : \input{\jobname-PPEx\ListeExercices[\i].sol}\par\goodbreak}{}%
+ \IfFileExists{\jobname-PPEx\ListeExercices[\i].sol}{\textbf{Corrigé de l'exercice \i} : \input{\jobname-Ma\thePfMMaquette-PPEx\ListeExercices[\i].sol}\par\goodbreak}{}%
}%
}%
}%
@@ -3363,14 +3814,6 @@
}{%
\ifnum\thePfMMaquette=1\relax%
\else%
- %\ifnum\PfMFontSize=0\relax%
- % \fontsize{10}{\fpeval{1.2*10}}%
- %\else\ifnum\PfMFontSize=1\relax%
- % \fontsize{11}{\fpeval{1.2*11}}%
- % \else%
- % \fontsize{12}{\fpeval{1.2*12}}%
- % \fi%
- %\fi%
\fontsize{\fpeval{10+\PfMFontSize}}{\fpeval{1.2*(10+\PfMFontSize)}}%
\selectfont%
\renewcommand{\JustifyingParindent}{\parindent}
@@ -3395,9 +3838,17 @@
}%
%% Pour factoriser l'appel aux corrections dans l'environnement Maquette
+\makeatletter
\NewDocumentCommand\PfMPrepareCorrection{m}{%
\useKVdefault[Boulot]%
\setKV[Boulot]{#1}%
+ \if@CAN
+ \ifnum\thepage<5\relax
+ \xintFor* ##1 in{\xintSeq{1}{\fpeval{5-\thepage}}}\do{%
+ ~\clearpage%
+ }%
+ \fi%
+ \fi%
\if@Dyslexie%
\setKV[Boulot]{Dys}%
\fi%
@@ -3405,6 +3856,7 @@
\setlength{\columnseprule}{\useKV[Boulot]{Epaisseur}}%
\PfMChangerTailleCorrection%
}%
+\makeatother
\NewDocumentCommand\PfMAffichageCorrectionColonnes{}{%
\ifboolKV[Boulot]{CorrectionColonnes}{\begin{multicols}{\useKV[Boulot]{Colonnes}}}{}%
@@ -3418,9 +3870,95 @@
\ifboolKV[Boulot]{CorrectionColonnes}{\end{multicols}}{}%
}%
+% GameBook
+\tcbset{%
+ userlivreheros/.style={%
+ spread upwards=-1cm,colback=Ivory,colframe=black!25!Ivory%
+ }%
+}%
+
+\setKVdefault[LivreHeros]{Theme=Les nombres d\'ecimaux}
+
+\NewDocumentCommand\vaen{m}{\ref{#1}}%
+
+\NewDocumentCommand\TikzLivreHeros{}{%
+ \begin{tcolorbox}[userlivreheros]%
+ \begin{center}
+ \Large\sffamily \useKV[LivreHeros]{Theme}
+ \end{center}
+ \end{tcolorbox}%
+}%
+
+\tcbset{%
+ tikzLH/.style={%
+ before skip=1em,
+ enhanced,
+ coltitle=black,
+ colbacktitle=black!10!Ivory,
+ colframe=white,
+ colback=white,
+ attach boxed title to top center={yshift=-2mm},
+ label is label
+ }%
+}%
+
+\newcounter{PfMGameBook}[PfMMaquette]
+\setcounter{PfMGameBook}{0}
+
+\makeatletter
+\def\ExoGBWrite{%
+ \setcounter{PfMAlea}{0}%
+ \PfMChoixCorrection%
+ \stepcounter{PfMExo}%
+ \immediate\write\@auxout{%
+ \string\opcopy{\thePfMExo}{TotalExo}%
+ }%
+ \@bsphack%
+ \immediate\openout \verbatim@out "\jobname-Ma\thePfMMaquette-Ex\thePfMExo.gb"%
+ \let\do\@makeother\dospecials%
+ \catcode`\^^M\active%
+ \def\verbatim@processline{\immediate\write\verbatim@out{\the\verbatim@line}}%
+ \verbatim@start}%
+\def\endExoGBWrite{\immediate\closeout\verbatim@out\@esphack}%
+\makeatother
+%%%%
+
%%%%%%%%%%%%%%% Debut Maquette %%%%%%%
% Environnement englobant le tout.
\makeatletter
+\newwrite\PfMfile@out%
+
+\IfClassLoadedTF{beamer}{%
+ %-> tex.stackexchange.com/questions/605282/beamer-custom-frame-environment-with-options
+ \NewDocumentEnvironment{Maquette}{om}{%
+ \setcounter{RetiensSol}{0}%
+ \setcounter{RetiensRep}{0}%
+ \setcounter{RetiensInd}{0}%
+ % on remet à zéro le compteur des exercices
+ %\setcounter{PfMExo}{0}%
+ \setcounter{PfMSOS}{0}%
+ % nouvelles valeurs.
+ \stepcounter{PfMMaquette}%
+ \IfHookExistsTF{env/exercice/after}{\RemoveFromHook{env/exercice/after}[*]\AddToHook{env/exercice/after}[ChoixExo]{\PfMChoixAffichageCorrection\PfMChoixAffichageEntrainement}}{\AddToHook{env/exercice/after}[ChoixExo]{\PfMChoixAffichageCorrection\PfMChoixAffichageEntrainement}}%
+ \useKVdefault[FdR]%
+ \setKV[FdR]{#1}%
+ \let\exercice\exerciceBeamer\let\endexercice\endexerciceBeamer%
+ \begin{frame}[environment=Maquette,fragile]
+ \setcounter{PfMExo}{10}%
+ \PfCGraineAlea{\useKV[Boulot]{Graine}}%
+ \frametitle{\useKV[FdR]{Theme}\hfill\raisebox{-0.25\height}{\mplibforcehmode\begin{mplibcode}
+ labeloffset:=1pt;
+ fill cercle((0,0),4mm) withcolor white;
+ trace cercle((0,0),4mm) withcolor \mpcolor{Evidence!50};
+ drawoptions(withcolor 0.5white);
+ label.top(TEX("\tiny alea\TeX"),(0,0));
+ drawoptions(withcolor \mpcolor{Evidence});
+ label.bot(TEX("\tiny SL \& CP$^2$"),(0,0));
+ \end{mplibcode}}~\phantom{t}}
+ }{%
+ \end{frame}
+ }
+}{
\NewDocumentEnvironment{Maquette}{om}{%
% on remet à zéro les compteurs de solutions : inutile ?
\setcounter{RetiensSol}{0}%
@@ -3431,43 +3969,58 @@
\setcounter{PfMSOS}{0}%
% nouvelles valeurs.
\stepcounter{PfMMaquette}%
+ \immediate\write\@auxout{%
+ \string\opcopy{0}{ScoreTotal\thePfMMaquette}
+ }%
+ %%\opadd*{#1}{ScoreTotal\thePfMMaquette}{ScoreTotal\thePfMMaquette}%
+ \if@AssembleCorrections
+ \immediate\openout\PfMfile@out \jobname-DefiMq-\thePfMMaquette.tex%
+ \immediate\write\PfMfile@out{\unexpanded{\useKVdefault[Boulot]}}%
+ \immediate\write\PfMfile@out{\unexpanded{\setKV[Boulot]{#1}}}%
+ \immediate\write\PfMfile@out{\TikzFicheCor{\unexpanded{#2}}}%
+ \immediate\closeout\PfMfile@out%
+ \fi
% options de boulot
\IfHookExistsTF{env/Maquette/after}{\RemoveFromHook{env/Maquette/after}[*]}{}%
- %\IfHookExistsTF{env/exercice/after}{\RemoveFromHook{env/exercice/after}[*]}{}%
- % \AddToHook{env/exercice/after}[ChoixExo]{\PfMChoixAffichageCorrection}%
+ \AddToHook{env/Maquette/after}[RetiensExo]{\xdef\PfMRetiensLienExoMa{\PfMRetiensLienExoMa,\thePfMExo}}
+ %--------------
\useKVdefault[Boulot]%
\setKV[Boulot]{#1}%
\ifboolKV[Boulot]{CorrigeSeul}{\setKV[Boulot]{CorrigeFin}}{}%
- \if@Dyslexie
- \setKV[Boulot]{Dys}
- \fi
+ \if@Dyslexie%
+ \setKV[Boulot]{Dys}%
+ \fi%
\PfMBasculeDys%
- \IfHookExistsTF{env/exercice/after}{\RemoveFromHook{env/exercice/after}[*]\AddToHook{env/exercice/after}[ChoixExo]{\PfMChoixAffichageCorrection}}{\AddToHook{env/exercice/after}[ChoixExo]{\PfMChoixAffichageCorrection}}%
+ \IfHookExistsTF{env/exercice/after}{\RemoveFromHook{env/exercice/after}[*]\AddToHook{env/exercice/after}[ChoixExo]{\PfMChoixAffichageCorrection\PfMChoixAffichageEntrainement}}{\AddToHook{env/exercice/after}[ChoixExo]{\PfMChoixAffichageCorrection\PfMChoixAffichageEntrainement}}%
% Test
\IfHookExistsTF{env/exercice/begin}{\RemoveFromHook{env/exercice/begin}[*]}{}%
\IfHookExistsTF{env/Maquette/end}{\RemoveFromHook{env/Maquette/end}[*]}{}%
+% \ifboolKV[Boulot]{Diaporama}{%
+% }{%
\ifboolKV[Boulot]{OlympiadesAPMEP}{%
- \setKV[OlympiadesAPMEP]{#2}%\TikzOlympiadesAPMEP%
- \let\exercice\exerciceOlympiadesAPMEP\let\endexercice\endexerciceOlympiadesAPMEP%
- \ifboolKV[Boulot]{CorrigeFin}{%
- \AddToHook{env/Maquette/after}[Correction]{%
- \PfMPrepareCorrection{#1}%
- \PfMAffichageCorrectionColonnes%
- }%
- }{}%
- }{%
- \ifboolKV[Boulot]{CAN}{%
+ % \input{PfMMaquetteOlympAPMEP}%
+ \setKV[OlympiadesAPMEP]{#2}%\TikzOlympiadesAPMEP%
+ \let\exercice\exerciceOlympiadesAPMEP\let\endexercice\endexerciceOlympiadesAPMEP%
+ \ifboolKV[Boulot]{CorrigeFin}{%
+ \AddToHook{env/Maquette/after}[Correction]{%
+ \PfMPrepareCorrection{#1}%
+ \TikzOlympiadesAPMEPCor{#2}%
+ \PfMAffichageCorrectionColonnes%
+ }%
+ }{}%
+ }{%
+ \ifboolKV[Boulot]{CAN}{%
+ % \input{PfMMaquetteCAN.tex}
\setKV[CAN]{#2}%
- %\ifboolKV[Boulot]{CorrigeSeul}{}{\TikzCAN}%
\setcounter{PfMCNNumQ}{0}%
\setlength{\PfMLargeurQuestion}{\useKV[CAN]{CoefQ}\linewidth}\setlength{\PfMLargeurReponse}{\useKV[CAN]{CoefR}\linewidth}\setlength{\PfMLargeurJury}{\useKV[CAN]{CoefJ}\linewidth}%
\let\exercice\ExoCANWrite\let\endexercice\endExoCANWrite%
\AddToHook{env/exercice/begin}{\setcounter{PfMAlea}{0}}%
\AddToHook{env/Maquette/end}{%
- \xdef\PfMAncienneGraine{\PfMChoisisGraineAlea{123456789}}
+ \xdef\PfMAncienneGraine{\PfMChoisisGraineAlea{123456789}}%
\xdef\PfMCANTotalExo{\thePfMExo}%
\setbox\PfMSauvegardeBox\vbox{%
- \PfMGraineAlea{\thePfMMaquette}
+ \PfMGraineAlea{\thePfMMaquette}%
\setcounter{PfMExo}{0}%
\renewcommand{\arraystretch}{2}%
\begin{longtable}{|c|m{\PfMLargeurQuestion}|>{\centering\arraybackslash}m{\PfMLargeurReponse}|m{\PfMLargeurJury}|}%
@@ -3476,21 +4029,21 @@
\hline%
\endhead%
\xintFor* ##1 in {\xintSeq{1}{\PfMCANTotalExo}}\do{%
- \refstepcounter{PfMCNNumQ}\ttfamily{\thePfMCNNumQ}\label{TestCAN-\thePfMCNNumQ}&\Complement{}\stepcounter{PfMExo}\setcounter{PfMAlea}{0}\input{\jobname-Ex##1.can}&\CNReponse&\\
+ \refstepcounter{PfMCNNumQ}\ttfamily{\thePfMCNNumQ}\label{TestCAN-\thePfMCNNumQ}&\Complement{}\stepcounter{PfMExo}\setcounter{PfMAlea}{0}\input{\jobname-Ma\thePfMMaquette-Ex##1.can}&\CNReponse&\\
\hline%
}%
\end{longtable}%
\renewcommand{\arraystretch}{1}%
- }
+ }%
\ifboolKV[Boulot]{CorrigeInverse}{%
- \PfMPrepareCorrection{#1}%
- \TikzCANCor{#2}%
- \PfMAffichageCorrectionColonnes%
- \clearpage
- \normalsize%
- \TikzCAN%
- \PfMGraineAlea{\thePfMMaquette}%
- \setcounter{PfMCNNumQ}{0}%
+ \PfMPrepareCorrection{#1}%
+ \TikzCANCor{#2}%
+ \PfMAffichageCorrectionColonnes%
+ \clearpage
+ \normalsize%
+ \TikzCAN%
+ \PfMGraineAlea{\thePfMMaquette}%
+ \setcounter{PfMCNNumQ}{0}%
\setcounter{PfMExo}{0}%
\renewcommand{\arraystretch}{2}%
\begin{longtable}{|c|m{\PfMLargeurQuestion}|>{\centering\arraybackslash}m{\PfMLargeurReponse}|m{\PfMLargeurJury}|}%
@@ -3499,7 +4052,7 @@
\hline%
\endhead%
\xintFor* ##1 in {\xintSeq{1}{\PfMCANTotalExo}}\do{%
- \refstepcounter{PfMCNNumQ}\ttfamily{\thePfMCNNumQ}\label{TestCAN-\thePfMCNNumQ}&\Complement{}\stepcounter{PfMExo}\setcounter{PfMAlea}{0}\input{\jobname-Ex##1.can}&\CNReponse&\\
+ \refstepcounter{PfMCNNumQ}\ttfamily{\thePfMCNNumQ}\label{TestCAN-\thePfMCNNumQ}&\Complement{}\stepcounter{PfMExo}\setcounter{PfMAlea}{0}\input{\jobname-Ma\thePfMMaquette-Ex##1.can}&\CNReponse&\\
\hline%
}%
\end{longtable}%
@@ -3508,7 +4061,7 @@
\PfMGraineAlea{\PfMAncienneGraine}%
\TikzCAN%
\setcounter{PfMCNNumQ}{0}%
- \setcounter{PfMExo}{0}%
+ \setcounter{PfMExo}{0}%
\renewcommand{\arraystretch}{2}%
\begin{longtable}{|c|m{\PfMLargeurQuestion}|>{\centering\arraybackslash}m{\PfMLargeurReponse}|m{\PfMLargeurJury}|}%
\hhline{~---}%
@@ -3516,233 +4069,279 @@
\hline%
\endhead%
\xintFor* ##1 in {\xintSeq{1}{\PfMCANTotalExo}}\do{%
- \refstepcounter{PfMCNNumQ}\ttfamily{\thePfMCNNumQ}\label{TestCAN-\thePfMCNNumQ}&\Complement{}\stepcounter{PfMExo}\setcounter{PfMAlea}{0}\input{\jobname-Ex##1.can}&\CNReponse&\\
+ \refstepcounter{PfMCNNumQ}\ttfamily{\thePfMCNNumQ}\label{TestCAN-\thePfMCNNumQ}&\Complement{}\stepcounter{PfMExo}\setcounter{PfMAlea}{0}\input{\jobname-Ma\thePfMMaquette-Ex##1.can}&\CNReponse&\\
\hline%
}%
\end{longtable}%
\renewcommand{\arraystretch}{1}%
- \ifboolKV[Boulot]{CorrigeFin}{\ifboolKV[Boulot]{CorrigeInverse}{}{\clearpage
- \PfMPrepareCorrection{#1}%
- \TikzCANCor{#2}%
- \PfMAffichageCorrectionColonnes%
- }
- }{}
- }
+ \ifboolKV[Boulot]{CorrigeFin}{%
+ \ifboolKV[Boulot]{CorrigeInverse}{}{%
+ \clearpage
+ \PfMPrepareCorrection{#1}%
+ \TikzCANCor{#2}%
+ \PfMAffichageCorrectionColonnes%
+ }%
+ }{}%
+ }%
}%
}{%
\ifboolKV[Boulot]{FdR}{%
- \ifboolKV[Boulot]{CorrigeSeul}{}{%
- \setKV[FdR]{#2}\TikzFdR%
- }
- \let\exercice\exerciceFdR\let\endexercice\endexerciceFdR%
- \ifboolKV[Boulot]{AvecEntrainement}{%
- \AddToHook{env/Maquette/end}[Haltere]{%
- \PfMAffichageEntrainementColonnes%
- }%
- }{}%
- \ifboolKV[Boulot]{CorrigeFin}{%
- \AddToHook{env/Maquette/after}[Correction]{%
- \PfMPrepareCorrection{#1}%
- \TikzFdRCor{#2}%
- \PfMAffichageCorrectionColonnes
+ % \input{PfMMaquetteFdR.tex}%
+ \ifboolKV[Boulot]{CorrigeSeul}{}{%
+ \setKV[FdR]{#2}\TikzFdR%
}%
- }{}%
- }{%
- \ifboolKV[Boulot]{Contrat}{%
- \ifboolKV[Boulot]{CorrigeSeul}{}{%
- \setKV[Contrat]{#2}\TikzContrat%
- }
- \let\exercice\exerciceContrat\let\endexercice\endexerciceContrat%
- \ifboolKV[Boulot]{AvecEntrainement}{%
- \AddToHook{env/Maquette/end}[Haltere]{%
- \PfMAffichageEntrainementColonnes%
- }%
- }{}%
- \ifboolKV[Boulot]{CorrigeFin}{%
+ \let\exercice\exerciceFdR\let\endexercice\endexerciceFdR%
+ \ifboolKV[Boulot]{AvecEntrainement}{%
+ \AddToHook{env/Maquette/end}[Haltere]{%
+ \PfMAffichageEntrainementColonnes%
+ }%
+ }{}%
+ \ifboolKV[Boulot]{CorrigeFin}{%
\AddToHook{env/Maquette/after}[Correction]{%
\PfMPrepareCorrection{#1}%
- \TikzContratCor{#2}%
- \PfMAffichageCorrectionColonnes%
- }%
- }{}%
- }{%
- \ifboolKV[Boulot]{Cours}{%
- \setKV[Cours]{#2}%
- \TikzCours%
- \let\exercice\exerciceFiche\let\endexercice\endexerciceFiche%
- \ifboolKV[Boulot]{CorrigeFin}{%
- \AddToHook{env/Maquette/after}[Correction]{%
- \PfMPrepareCorrection{#1}%
- \TikzFicheCor{#2}%
- \PfMAffichageCorrectionColonnes
- }%
- }{}%
- }{%
- \ifboolKV[Boulot]{RecapBrevet}{%
- \setKV[RecapBrevet]{#2}%
- \TikzRecapBrevet%
- \let\exercice\ExerciceRecapBrevet\let\endexercice\endExerciceRecapBrevet%
- \ifboolKV[Boulot]{CorrigeFin}{%
- \AddToHook{env/Maquette/after}[Correction]{%
- \PfMPrepareCorrection{#1}%
- \TikzRecapBrevetCor{#2}%
- \PfMAffichageCorrectionColonnes%
- }%
- }{}%
- }{%
- \ifboolKV[Boulot]{ParcoursPerso}{%
- \setKV[ParcoursPerso]{#2}%
- \DTLloaddb[noheader,keys={PrenomEleve,NomEleve,ListeExo}]{dataperso}{\useKV[ParcoursPerso]{Fichier}.csv}%
- \let\exercice\exerciceParcoursPerso\let\endexercice\endexerciceParcoursPerso%
- \ifboolKV[Boulot]{CorrigeFin}{\setcounter{PfMCorrigeParcoursPerso}{1}}{}%
- \setcounter{PfMExo}{0}%
- \AtEndDocument{%
- \Recapitulatif{#1}{#2}%
- }%
- }{%
- \ifboolKV[Boulot]{Parcours}{%
- \ifboolKV[Boulot]{CorrigeSeul}{}{%
- \setKV[Parcours]{#2}\TikzParcours%
- }
- \let\exercice\exerciceParcours\let\endexercice\endexerciceParcours%
- \ifboolKV[Boulot]{AvecEntrainement}{%
- \AddToHook{env/Maquette/end}[Haltere]{%
- \PfMAffichageEntrainementColonnes%
- }%
- }{}%
- \ifboolKV[Boulot]{CorrigeFin}{%
- \AddToHook{env/Maquette/after}[Correction]{%
- \PfMPrepareCorrection{#1}%
- \TikzParcoursCor{#2}
- \PfMAffichageCorrectionColonnes
- }%
+ \TikzFdRCor{#2}%
+ \PfMAffichageCorrectionColonnes%
+ }%
}{}%
}{%
- \ifboolKV[Boulot]{PdT}{%
- \ifboolKV[Boulot]{CorrigeSeul}{}{%
- \setKV[PdT]{#2}\TikzPdT%
- }
- \let\exercice\exercicePdT\let\endexercice\endexercicePdT%
+ \ifboolKV[Boulot]{Contrat}{%
+ % \input{PfMMaquetteContrat.tex}%
+ \ifboolKV[Boulot]{CorrigeSeul}{}{%
+ \setKV[Contrat]{#2}\TikzContrat%
+ }%
+ \let\exercice\exerciceContrat\let\endexercice\endexerciceContrat%
+ \ifboolKV[Boulot]{AvecEntrainement}{%
+ \AddToHook{env/Maquette/end}[Haltere]{%
+ \PfMAffichageEntrainementColonnes%
+ }%
+ }{}%
\ifboolKV[Boulot]{CorrigeFin}{%
- \AddToHook{env/Maquette/after}[Correction]{%
- \PfMPrepareCorrection{#1}%
- \TikzPdTCor{#2}%
- \PfMAffichageCorrectionColonnes%
+ \AddToHook{env/Maquette/after}[Correction]{%
+ \PfMPrepareCorrection{#1}%
+ \TikzContratCor{#2}%
+ \PfMAffichageCorrectionColonnes%
}%
}{}%
}{%
- \ifboolKV[Boulot]{DM}{%
- \ifboolKV[Boulot]{CorrigeSeul}{}{%
- \setKV[DM]{#2}\TikzDM%
- }
- \let\exercice\exerciceDM\let\endexercice\endexerciceDM%
+ \ifboolKV[Boulot]{Cours}{%
+ % \input{PfMMaquetteCours.tex}%
+ \setKV[Cours]{#2}%
+ \TikzCours%
+ \let\exercice\exerciceFiche\let\endexercice\endexerciceFiche%
\ifboolKV[Boulot]{CorrigeFin}{%
- \AddToHook{env/Maquette/after}[Correction]{%
- \PfMPrepareCorrection{#1}%
- \TikzDMCor{#2}%
- \PfMAffichageCorrectionColonnes%
+ \AddToHook{env/Maquette/after}[Correction]{%
+ \PfMPrepareCorrection{#1}%
+ \TikzFicheCor{#2}%
+ \PfMAffichageCorrectionColonnes%
}%
}{}%
}{%
- \ifboolKV[Boulot]{Fiche}{%
- \ifboolKV[Boulot]{CorrigeSeul}{}{%
- \setKV[Fiche]{#2}%
- \TikzFiche%
+ \ifboolKV[Boulot]{RecapBrevet}{%
+ % \input{PfMMaquetteRecapBrevet.tex}%
+ \setKV[RecapBrevet]{#2}%
+ \TikzRecapBrevet%
+ \let\exercice\ExerciceRecapBrevet\let\endexercice\endExerciceRecapBrevet%
+ \ifboolKV[Boulot]{CorrigeFin}{%
+ \AddToHook{env/Maquette/after}[Correction]{%
+ \PfMPrepareCorrection{#1}%
+ \TikzRecapBrevetCor{#2}%
+ \PfMAffichageCorrectionColonnes%
}%
- \let\exercice\exerciceFiche\let\endexercice\endexerciceFiche%
- \ifboolKV[Boulot]{AvecEntrainement}{%
+ }{}%
+ }{%
+ \ifboolKV[Boulot]{ParcoursPerso}{%
+ % \input{PfMMaquetteParcoursPerso.tex}%
+ \setKV[ParcoursPerso]{#2}%
+ \DTLloaddb[noheader,keys={PrenomEleve,NomEleve,ListeExo}]{dataperso}{\useKV[ParcoursPerso]{Fichier}.csv}%
+ \let\exercice\exerciceParcoursPerso\let\endexercice\endexerciceParcoursPerso%
+ \ifboolKV[Boulot]{CorrigeFin}{\setcounter{PfMCorrigeParcoursPerso}{1}}{}%
+ \setcounter{PfMExo}{0}%
+ \AtEndDocument{%
+ \PfMRecapitulatif{#1}{#2}%
+ }%
+ }{%
+ \ifboolKV[Boulot]{Parcours}{%
+ % \input{PfMMaquetteParcours.tex}%
+ \ifboolKV[Boulot]{CorrigeSeul}{}{%
+ \setKV[Parcours]{#2}\TikzParcours%
+ }%
+ \let\exercice\exerciceParcours\let\endexercice\endexerciceParcours%
+ \ifboolKV[Boulot]{AvecEntrainement}{%
\AddToHook{env/Maquette/end}[Haltere]{%
\PfMAffichageEntrainementColonnes%
}%
}{}%
- \ifboolKV[Boulot]{CorrigeFin}{%
- \ifboolKV[Boulot]{CorrigeAll}{%
- \AddToHook{env/Maquette/after}[Correction]{%
- \PfMPrepareCorrection{#1}%
- \TikzFicheCor{#2}%
- \ifboolKV[Boulot]{CorrectionColonnes}{\begin{multicols}{\useKV[Boulot]{Colonnes}}}{}%
- \xintFor* ##1 in{\xintSeq{1}{\thePfMExo}}\do{%
- \IfFileExists{\jobname-Ex##1.sol}{\textbf{Corrigé de l'exercice ##1}\par\nopagebreak\input{\jobname-Ex##1.sol}\par\goodbreak}{}%
- }%
- \ifboolKV[Boulot]{CorrectionColonnes}{\end{multicols}}{}%
- \TikzFicheCorRep{#2}%
- \ifboolKV[Boulot]{CorrectionColonnes}{\begin{multicols}{\useKV[Boulot]{Colonnes}}}{}%
- \xintFor* ##1 in{\xintSeq{1}{\thePfMExo}}\do{%
- \IfFileExists{\jobname-Ex##1.rep}{\textbf{Réponse(s) de l'exercice ##1}\par\nopagebreak\input{\jobname-Ex##1.rep}\par\goodbreak}{}%
- }%
- \ifboolKV[Boulot]{CorrectionColonnes}{\end{multicols}}{}%
- \TikzFicheCorInd{#2}%
- \ifboolKV[Boulot]{CorrectionColonnes}{\begin{multicols}{\useKV[Boulot]{Colonnes}}}{}%
- \xintFor* ##1 in{\xintSeq{1}{\thePfMExo}}\do{%
- \IfFileExists{\jobname-Ex##1.cdp}{\textbf{Indice(s) pour l'exercice ##1}\par\nopagebreak\input{\jobname-Ex##1.cdp}\par\goodbreak}{}%
- }%
- \ifboolKV[Boulot]{CorrectionColonnes}{\end{multicols}}{}%
- }%
- }{%
- \AddToHook{env/Maquette/after}[Correction]{%
- \useKVdefault[Boulot]%
- \setKV[Boulot]{#1}%
- %%
- \if@Dyslexie
- \setKV[Boulot]{Dys}
- \fi
- \PfMBasculeDys%
- \setlength{\columnseprule}{\useKV[Boulot]{Epaisseur}}%
- \TikzFicheCor{#2}%
- \PfMChangerTailleCorrection%
- \ifboolKV[Boulot]{CorrectionColonnes}{\begin{multicols}{\useKV[Boulot]{Colonnes}}}{}%
- \PfMAffichageCorrige%
- \ifboolKV[Boulot]{CorrectionColonnes}{\end{multicols}}{}%
- }%
- }%
- }{}%
- }{%
- \ifboolKV[Boulot]{DS}{%
- \ifboolKV[Boulot]{CorrigeSeul}{}{%
- \setKV[DS]{#2}\TikzDS%
- }%
- \let\exercice\exerciceDS\let\endexercice\endexerciceDS%
- \ifboolKV[Boulot]{BaremeComplet}{%
- \begin{center}
- \TableauRecapitulatif
- \end{center}
- }{}%
- \ifboolKV[Boulot]{CorrigeFin}{%
+ \ifboolKV[Boulot]{CorrigeFin}{%
\AddToHook{env/Maquette/after}[Correction]{%
- \PfMPrepareCorrection{#1}
- \TikzDSCor{#2}%
+ \PfMPrepareCorrection{#1}%
+ \TikzParcoursCor{#2}%
\PfMAffichageCorrectionColonnes%
- }%
- }{}%
- }{%
- \ifboolKV[Boulot]{IE}{%
- \ifboolKV[Boulot]{CorrigeSeul}{}{%
- \setKV[IE]{#2}\TikzIE%
- }
- \let\exercice\exerciceDS\let\endexercice\endexerciceDS%On garde exerciceDS
- \ifboolKV[Boulot]{CorrigeFin}{%
- \AddToHook{env/Maquette/after}[Correction]{%
- \PfMPrepareCorrection{#1}
- \TikzIECor{#2}%
- \PfMAffichageCorrectionColonnes
}%
}{}%
}{%
- \ifboolKV[Boulot]{Kholle}{%
- \setKV[Kholle]{#2}%
- \TikzKholle%
- \let\exercice\exerciceKholle\let\endexercice\endexerciceKholle%
- \ifboolKV[Kholle]{CR}{}{%
+ \ifboolKV[Boulot]{PdT}{%
+ % \input{PfMMaquettePdT.tex}%
+ \ifboolKV[Boulot]{CorrigeSeul}{}{%
+ \setKV[PdT]{#2}\TikzPdT%
+ }%
+ \let\exercice\exercicePdT\let\endexercice\endexercicePdT%
+ \ifboolKV[Boulot]{CorrigeFin}{%
+ \AddToHook{env/Maquette/after}[Correction]{%
+ \PfMPrepareCorrection{#1}%
+ \TikzPdTCor{#2}%
+ \PfMAffichageCorrectionColonnes%
+ }%
+ }{}%
+ }{%
+ \ifboolKV[Boulot]{DM}{%
+ % \input{PfMMaquetteDM.tex}%
+ \ifboolKV[Boulot]{CorrigeSeul}{}{%
+ \setKV[DM]{#2}\TikzDM%
+ }%
+ \let\exercice\exerciceDM\let\endexercice\endexerciceDM%
\ifboolKV[Boulot]{CorrigeFin}{%
\AddToHook{env/Maquette/after}[Correction]{%
- \TikzKholleCor{#2}%
- \TikzKholleCor{#2}%
- \TikzKholleCor{#2}%
- \PfMAffichageCorrige%
+ \PfMPrepareCorrection{#1}%
+ \TikzDMCor{#2}%
+ \PfMAffichageCorrectionColonnes%
}%
}{}%
+ }{%
+ \ifboolKV[Boulot]{Fiche}{%
+ \ifboolKV[Boulot]{CorrigeSeul}{}{%
+ \setKV[Fiche]{#2}%
+ \TikzFiche%
+ }%
+ \let\exercice\exerciceFiche\let\endexercice\endexerciceFiche%
+ \ifboolKV[Boulot]{AvecEntrainement}{%
+ \AddToHook{env/Maquette/end}[Haltere]{%
+ \PfMAffichageEntrainementColonnes%
+ }%
+ }{}%
+ \ifboolKV[Boulot]{CorrigeFin}{%
+ \ifboolKV[Boulot]{CorrigeAll}{%
+ \AddToHook{env/Maquette/after}[Correction]{%
+ \PfMPrepareCorrection{#1}%
+ \TikzFicheCor{#2}%
+ \ifboolKV[Boulot]{CorrectionColonnes}{\begin{multicols}{\useKV[Boulot]{Colonnes}}}{}%
+ \xintFor* ##1 in{\xintSeq{1}{\thePfMExo}}\do{%
+ \IfFileExists{\jobname-Ma\thePfMMaquette-Ex##1.sol}{\textbf{Corrigé de l'exercice ##1}\par\nopagebreak\input{\jobname-Ma\thePfMMaquette-Ex##1.sol}\par\goodbreak}{}%
+ }%
+ \ifboolKV[Boulot]{CorrectionColonnes}{\end{multicols}}{}%
+ \TikzFicheCorRep{#2}%
+ \ifboolKV[Boulot]{CorrectionColonnes}{\begin{multicols}{\useKV[Boulot]{Colonnes}}}{}%
+ \xintFor* ##1 in{\xintSeq{1}{\thePfMExo}}\do{%
+ \IfFileExists{\jobname-Ma\thePfMMaquette-Ex##1.rep}{\textbf{Réponse(s) de l'exercice ##1}\par\nopagebreak\input{\jobname-Ma\thePfMMaquette-Ex##1.rep}\par\goodbreak}{}%
+ }%
+ \ifboolKV[Boulot]{CorrectionColonnes}{\end{multicols}}{}%
+ \TikzFicheCorInd{#2}%
+ \ifboolKV[Boulot]{CorrectionColonnes}{\begin{multicols}{\useKV[Boulot]{Colonnes}}}{}%
+ \xintFor* ##1 in{\xintSeq{1}{\thePfMExo}}\do{%
+ \IfFileExists{\jobname-Ma\thePfMMaquette-Ex##1.cdp}{\textbf{Indice(s) pour l'exercice ##1}\par\nopagebreak\input{\jobname-Ma\thePfMMaquette-Ex##1.cdp}\par\goodbreak}{}%
+ }%
+ \ifboolKV[Boulot]{CorrectionColonnes}{\end{multicols}}{}%
+ }%
+ }{%
+ \AddToHook{env/Maquette/after}[Correction]{%
+% \useKVdefault[Boulot]%
+% \setKV[Boulot]{#1}%
+% %%
+% \if@Dyslexie
+% \setKV[Boulot]{Dys}%
+% \fi
+% \PfMBasculeDys%
+% \setlength{\columnseprule}{\useKV[Boulot]{Epaisseur}}%
+ \if@AssembleCorrections
+ \else
+ \PfMPrepareCorrection{#1}%
+ \TikzFicheCor{#2}%
+ \PfMAffichageCorrectionColonnes%
+ \fi%
+ }%
+ }%
+ }{}%
+ }{%
+ \ifboolKV[Boulot]{DS}{%
+ % \input{PfMMaquetteDS.tex}%
+ \ifboolKV[Boulot]{CorrigeSeul}{}{%
+ \setKV[DS]{#2}\TikzDS%
+ }%
+ \let\exercice\exerciceDS\let\endexercice\endexerciceDS%
+ \ifboolKV[Boulot]{BaremeComplet}{%
+ \begin{center}
+ \TableauRecapitulatif
+ \end{center}
+ }{}%
+ \ifboolKV[Boulot]{CorrigeFin}{%
+ \AddToHook{env/Maquette/after}[Correction]{%
+ \PfMPrepareCorrection{#1}%
+ \TikzDSCor{#2}%
+ \PfMAffichageCorrectionColonnes%
+ }%
+ }{}%
+ }{%
+ \ifboolKV[Boulot]{IE}{%
+ % \input{PfMMaquetteIE.tex}%
+ \ifboolKV[Boulot]{CorrigeSeul}{}{%
+ \setKV[IE]{#2}\TikzIE%
+ }%
+ \let\exercice\exerciceDS\let\endexercice\endexerciceDS%On garde exerciceDS
+ \ifboolKV[Boulot]{CorrigeFin}{%
+ \AddToHook{env/Maquette/after}[Correction]{%
+ \PfMPrepareCorrection{#1}%
+ \TikzIECor{#2}%
+ \PfMAffichageCorrectionColonnes%
+ }%
+ }{}%
+ }{%
+ \ifboolKV[Boulot]{Kholle}{%
+ % \input{PfMMaquetteKholle.tex}%
+ \setKV[Kholle]{#2}%
+ \TikzKholle%
+ \let\exercice\exerciceKholle\let\endexercice\endexerciceKholle%
+ \ifboolKV[Kholle]{CR}{}{%
+ \ifboolKV[Boulot]{CorrigeFin}{%
+ \AddToHook{env/Maquette/after}[Correction]{%
+ \TikzKholleCor{#2}%
+ \TikzKholleCor{#2}%
+ \TikzKholleCor{#2}%
+ \PfMAffichageCorrige%
+ }%
+ }{}%
+ }%
+ }{%
+ \ifboolKV[Boulot]{LivreHeros}{%
+ \setKV[LivreHeros]{#2}%
+ \TikzLivreHeros%
+ \let\exercice\ExoGBWrite\let\endexercice\endExoGBWrite%
+ \AddToHook{env/Maquette/end}{%
+ \xdef\PfMListeExoGB{}%
+ \xintFor* ##1 in{\xintSeq{2}{\thePfMExo}}\do{%
+ \xdef\PfMListeExoGB{\PfMListeExoGB,##1}%
+ }%
+ \MelangeListe{\PfMListeExoGB}{\fpeval{\thePfMExo-1}}%
+ \xdef\PfMFooMelange{1,\faa}%
+ \setsepchar{,}\ignoreemptyitems\readlist*\ListePerm{\PfMFooMelange}\reademptyitems%
+ \phantomsection{}
+ \addcontentsline{toc}{section}{\useKV[LivreHeros]{Theme}}%
+ \setlength{\columnseprule}{\useKV[Boulot]{Epaisseur}}%
+ \ifboolKV[Boulot]{CorrectionColonnes}{\begin{multicols}{\useKV[Boulot]{Colonnes}}}{}%
+ \xintFor* ##1 in{\xintSeq{1}{\thePfMExo}}\do{%
+ \itemtomacro\ListePerm[##1]\PfMPermute%
+ \begin{tcolorbox}[tikzLH,title=##1]%
+ \refstepcounter{PfMGameBook}%
+ \input{\jobname-Ma\thePfMMaquette-Ex\PfMPermute.gb}%
+ \end{tcolorbox}%
+ }%
+ \ifboolKV[Boulot]{CorrectionColonnes}{\end{multicols}}{}%
+ }%
+ }{}%
+ }%
+ }%
+ }%
+ }%
}%
- }{}%
+ }%
}%
}%
}%
@@ -3751,11 +4350,7 @@
}%
}%
}%
-}%
-}%
-}%
-}%
-}%
+}
}{}%
\makeatother
%D'après JCC
@@ -4391,8 +4986,9 @@
\BaremeEspaceMarge{-82pt}
}
-\AddToHook{env/multicols/begin}{\setcounter{Nbcolonnes}{2}}%
-\AddToHook{env/multicols/after}{\setcounter{Nbcolonnes}{4}}%
+%\AddToHook{env/multicols/begin}{\setcounter{Nbcolonnes}{2}}%
+%\AddToHook{env/multicols/after}{\setcounter{Nbcolonnes}{4}}%
+
\NewDocumentEnvironment{Dispo}{sm+b}{%
\ifPfMDeuxColonnes
\IfBooleanTF{#1}{%
@@ -4468,4 +5064,117 @@
}%
\fi%
\end{align*}
-}{}% \ No newline at end of file
+}{}%
+
+\def\RetiensEchelle{1cm}
+\def\ChoixNbQuestions{3}
+\makeatletter
+\if@CAN
+ \AddToHook{env/document/before}{%
+ \ProvidesPackage{ProfMaquette}[Mode CAN (CP)]%
+ \RequirePackage{pgfmorepages}
+ \pgfmorepagesloadextralayouts
+ \pgfpagesuselayout{4 on 2, book format}[a4paper,landscape]
+ }
+\fi
+
+\if@Revision
+ \AddToHook{env/document/before}{%
+ \ProvidesPackage{ProfMaquette}[Mode Revision (CP)]%
+ \setcounter{Nbcolonnes}{2}%
+ \def\RetiensEchelle{0.5cm}
+ \RequirePackage{pgfmorepages}
+ \pgfmorepagesloadextralayouts
+ \pgfpagesuselayout{4 on 2, book format}[a4paper]
+ }
+\fi
+
+\if@Personnel
+ \input{PfMPerso.cfg}
+\fi
+\makeatother
+
+\IfClassLoadedTF{beamer}{}{%
+ % enumitem obligatoire ^^
+% mais pas compatible beamer
+\RequirePackage{enumitem}
+% d'après https://tex.stackexchange.com/questions/164613/adding-code-at-the-end-of-each-list-item
+\newif\iffirstlegal\firstlegalfalse% We need a toggle to track whether the item is first in the list or not
+
+\newlist{Test}{enumerate}{3}
+
+\def\PfMPar{\par}
+
+\NewDocumentCommand\litem{}{}
+
+\let\olditem\item% save the standard definition of \item in a macro, \olditem
+
+\setlist[Test,1]{%
+ leftmargin=*,
+ label=\arabic*.,
+ before={%
+ \setcounter{PfMProfondeur}{1}%
+ \setcounter{PfMNbLignesFinitem}{0}
+ \firstlegaltrue% set the toggle for first item in the list to true
+ \def\Primeitem{\iffirstlegal\olditem\stepcounter{PfMNbLignesFinitem}%
+ \firstlegalfalse
+ \else
+ \ifnum\PfMListeDesAjoutsdeLignes[\thePfMNbLignesFinitem]>1\relax\PfMPar\Lignespointilles{\PfMListeDesAjoutsdeLignes[\thePfMNbLignesFinitem]}\else\ifnum\PfMListeDesAjoutsdeLignes[\thePfMNbLignesFinitem]=1\relax\PfMPar\pointilles\fi\fi%
+ \olditem\stepcounter{PfMNbLignesFinitem}%
+ \fi
+ }% new, temporary defition of \item
+ \let\litem\Primeitem
+ \let\item\litem
+ },
+ after={%
+ \ifnum\PfMListeDesAjoutsdeLignes[\thePfMNbLignesFinitem]>0\relax\PfMPar\Lignespointilles{\PfMListeDesAjoutsdeLignes[\thePfMNbLignesFinitem]}\else\ifnum\PfMListeDesAjoutsdeLignes[\thePfMNbLignesFinitem]=1\relax\PfMPar\pointilles\fi\fi%
+ % fill for final item in list
+ \let\litem\olditem% restore standard definition of \item
+ \let\item\olditem
+ \setcounter{PfMProfondeur}{0}%
+ }%
+}%
+
+\setlist[Test,2]{%
+ leftmargin=*,
+ label=(\alph*),
+ before={%
+ \setcounter{PfMProfondeur}{2}%
+ \setcounter{PfMNbLignesFinitemi}{0}
+ \firstlegaltrue%
+ \def\Seconditem{\iffirstlegal\olditem\stepcounter{PfMNbLignesFinitemi}\firstlegalfalse\else%
+ \ifnum\PfMListeDesAjoutsdeLignesi[\thePfMNbLignesFinitemi]>1\relax\PfMPar\Lignespointilles{\PfMListeDesAjoutsdeLignesi[\thePfMNbLignesFinitemi]}\else\ifnum\PfMListeDesAjoutsdeLignesi[\thePfMNbLignesFinitemi]=1\relax\PfMPar\pointilles\fi
+ \fi%
+ \olditem\stepcounter{PfMNbLignesFinitemi}
+ \fi
+ }% new, temporary defition of \item
+ \let\litem\Seconditem
+ \let\item\litem
+ },
+ after={%
+ \ifnum\PfMListeDesAjoutsdeLignesi[\thePfMNbLignesFinitemi]>1\relax\PfMPar\Lignespointilles{\PfMListeDesAjoutsdeLignesi[\thePfMNbLignesFinitemi]}\else\ifnum\PfMListeDesAjoutsdeLignesi[\thePfMNbLignesFinitemi]=1\relax\PfMPar\pointilles\fi
+ \fi%
+% % fill for final item in list
+ \let\litem\Primeitem%
+ \let\item\litem
+ \setcounter{PfMProfondeur}{1}%
+ }%
+}
+
+\newcounter{PfMNbLignesFinitem}
+\newcounter{PfMNbLignesFinitemi}
+\newcounter{PfMProfondeur}
+\setcounter{PfMProfondeur}{0}%
+
+\NewDocumentEnvironment{autoenumerate}{O{}m +b}{%
+ \setsepchar{,}\ignoreemptyitems%
+ \ifnum\thePfMProfondeur=0\relax%
+ \readlist*\PfMListeDesAjoutsdeLignes{#2}%
+ \else%
+ \readlist*\PfMListeDesAjoutsdeLignesi{#2}%
+ \fi%
+ \begin{Test}[#1]%
+ #3
+ \end{Test}%
+}{}%
+} \ No newline at end of file
diff --git a/macros/latex/contrib/quizztex/doc/quizztex-doc-fr.pdf b/macros/latex/contrib/quizztex/doc/quizztex-doc-fr.pdf
index 3e23a4d227..3769f87f68 100644
--- a/macros/latex/contrib/quizztex/doc/quizztex-doc-fr.pdf
+++ b/macros/latex/contrib/quizztex/doc/quizztex-doc-fr.pdf
Binary files differ
diff --git a/macros/latex/contrib/quizztex/doc/quizztex-doc-fr.tex b/macros/latex/contrib/quizztex/doc/quizztex-doc-fr.tex
index 431958ee1f..d75019352d 100644
--- a/macros/latex/contrib/quizztex/doc/quizztex-doc-fr.tex
+++ b/macros/latex/contrib/quizztex/doc/quizztex-doc-fr.tex
@@ -4,8 +4,8 @@
\documentclass[french,a4paper,11pt]{article}
\usepackage[margin=2cm,includefoot]{geometry}
-\def\TPversion{0.1.2}
-\def\TPdate{5 novembre 2023}
+\def\TPversion{0.1.4}
+\def\TPdate{10 septembre 2024}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath,amssymb}
@@ -85,7 +85,7 @@
keywordstyle={\color{violet}},%
classoffset=2,%
alsoletter={-},%
- morekeywords={\QuizzMillions,\QuizzPrendrePlace},%
+ morekeywords={\QuizzMillions,\QuizzPrendrePlace,\SetDefautPrendrePlace,\SetDefautMillions},%
keywordstyle={\color{green!50!black}},%
classoffset=3,%
morekeywords={Largeur,Marge,Hauteurs,Couleur,CouleurFond,CouleurLettre,CouleurTexte,Bonne,Mauvaise,Choix,CoulBonne,CoulChoix,CoulMauvaise,Affichage,EspacementV,OffsetV,Decorations,AffChoix,Jokers,AffJokers,CodeAvant,Offset,Theme,Type,Effet,PositionJokers,Points},%
@@ -205,6 +205,10 @@
\section{Historique}
+\verb|v0.1.4|~:~~~~Ajout d'une commande pour forcer, de manière globale, des paramètres par défaut.
+
+\verb|v0.1.3|~:~~~~Annulation du chargement de \textsf{tikz.babel}.
+
\verb|v0.1.2|~:~~~~Migration de \textsf{\textbackslash tikzstyle} à \textsf{\textbackslash tikzset}.
\verb|v0.1.1|~:~~~~Amélioration de la gestion des hauteurs + modification de la clé \Cle{CodeAvant}.
@@ -255,7 +259,7 @@ Il n'existe pas d'option pour le package, et \packagetex!xcolor! n'est pas charg
\item \packagetex!tikz.calc!
\item \packagetex!tikz.positioning! ;
\item \packagetex!tikz.shapes.geometric! ;
- \item \packagetex!tikz.babel! ;
+ %\item \packagetex!tikz.babel! ;
\item \packagetex!tikz.fadings!.
\end{itemize}
\end{itemize}
@@ -629,4 +633,26 @@ Les cinq arguments obligatoires correspondent à la question et aux réponses, s
{$\mathtt{f'(x)=\dfrac{1}{x}}$}
\end{DemoCode}
+\pagebreak
+
+\section{Modification globale des valeurs par défaut}
+
+\subsection{À la manière de \og Qui veut gagner des Millions ? \fg}
+
+La commande \motcletex!\SetDefautMillions! permet de modifier, de manière globale l'un ou plusieurs des paramètres par défaut.
+
+\begin{DemoCode}[listing only]
+%permet d'enlever les Jokers pour tous les environnements \QuizzMillions
+\SetDefautMillions{Jokers=false}
+\end{DemoCode}
+
+\subsection{À la manière de \og Tout le monde veut prendre sa place \fg}
+
+La commande \motcletex!\SetDefautPrendrePlace! permet de modifier, de manière globale l'un ou plusieurs des paramètres par défaut.
+
+\begin{DemoCode}[listing only]
+%permet d'enlever les effets pour tous les environnements \QuizzPrendrePlace
+\SetDefautPrendrePlace{Effet=false}
+\end{DemoCode}
+
\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/quizztex/tex/quizztex.sty b/macros/latex/contrib/quizztex/tex/quizztex.sty
index ee18c46d0d..fc199309ae 100644
--- a/macros/latex/contrib/quizztex/tex/quizztex.sty
+++ b/macros/latex/contrib/quizztex/tex/quizztex.sty
@@ -4,7 +4,9 @@
% : 'Tout le monde veut prendre sa place' is a Tradematk from Air Productions.
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{quizztex}[2023/11/05 0.1.2 Construire des quizz 'comme dans les jeux' ]
+\ProvidesPackage{quizztex}[2024/09/10 0.1.4 Construire des quizz 'comme dans les jeux' ]
+%0.1.4 Macro pour modifier les paramètres par défaut des clés
+%0.1.3 Annulation du chargement de tikz.babel
%0.1.2 Passage \tikzstyle vers \tikzset (merci à Sam C.)
%0.1.1 Amélioration de la gestion des réponses dans WWTBAM + Position des Jokers (cc P. Bideault ;-))
%0.1.0 Version initiale
@@ -18,7 +20,8 @@
\RequirePackage{calc}
\RequirePackage{varwidth}
%------Librairies
-\usetikzlibrary{calc,positioning,shapes.geometric,babel,fadings}
+\usetikzlibrary{calc,positioning,shapes.geometric,fadings}
+%\usetikzlibrary{babel}
%------Longueurs globales
\newlength{\HauteurQuest}
@@ -120,6 +123,8 @@
PositionJokers=centre
}
+\newcommand\SetDefautMillions[1]{\setKVdefault[wwtbam]{#1}}
+
\NewDocumentCommand\LettreChoixMillions{ m }{%
\textcolor{\CouleurLettreWWTBAM}{\large\sffamily\bfseries{\vphantom{Q}#1}\,:}%
}
@@ -565,6 +570,8 @@
EchellePoints=1
}
+\newcommand\SetDefautPlace[1]{\setKVdefault[TLMVPSP]{#1}}
+
\NewDocumentCommand\QuizzPrendrePlace{ O{} m m m m m }{%clés + questions + 4 réponses
\useKVdefault[TLMVPSP]%
\setKV[TLMVPSP]{#1}%
diff --git a/macros/latex/contrib/randintlist/README.md b/macros/latex/contrib/randintlist/README.md
new file mode 100644
index 0000000000..4cd0c34356
--- /dev/null
+++ b/macros/latex/contrib/randintlist/README.md
@@ -0,0 +1,6 @@
+This package (like luarandom, but without the obligation to use lualatex) provides some macros for creating random integer number lists between a and b.
+This list can have multiple numbers or not, and this list can be sorted or not.
+--------------------------------------------------------------------------------------------------------------------------------------------------------
+Author..: Cédric Pierquet
+email...: cpierquet@outlook.fr
+Licence.: Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt \ No newline at end of file
diff --git a/macros/latex/contrib/randintlist/doc/randintlist-doc.pdf b/macros/latex/contrib/randintlist/doc/randintlist-doc.pdf
new file mode 100644
index 0000000000..373177badb
--- /dev/null
+++ b/macros/latex/contrib/randintlist/doc/randintlist-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/randintlist/doc/randintlist-doc.tex b/macros/latex/contrib/randintlist/doc/randintlist-doc.tex
new file mode 100644
index 0000000000..d08d3edbb6
--- /dev/null
+++ b/macros/latex/contrib/randintlist/doc/randintlist-doc.tex
@@ -0,0 +1,351 @@
+% !TeX TXS-program:compile = txs:///arara
+% arara: pdflatex: {shell: no, synctex: no, interaction: batchmode}
+% arara: pdflatex: {shell: no, synctex: no, interaction: batchmode}
+
+\documentclass[11pt,a4paper]{ltxdoc}
+\usepackage{bera}
+\usepackage{inconsolata}
+\usepackage[T1]{fontenc}
+\usepackage[scale=0.875]{cabin}
+\usepackage{randintlist}
+\usepackage{fancyvrb}
+\usepackage{fancyhdr}
+\usepackage{tabularray}
+\usepackage{fontawesome5}
+\fancyhf{}
+\renewcommand{\headrulewidth}{0pt}
+\lfoot{\sffamily\small [randintlist]}
+\cfoot{\sffamily\small - \thepage{} -}
+\rfoot{\hyperlink{matoc}{\small\faArrowAltCircleUp[regular]}}
+\usepackage{hologo}
+\providecommand\tikzlogo{Ti\textit{k}Z}
+\providecommand\TeXLive{\TeX{}Live\xspace}
+\let\TikZ\tikzlogo
+
+\usepackage{hyperref}
+\urlstyle{same}
+\hypersetup{pdfborder=0 0 0}
+\usepackage[margin=2cm]{geometry}
+\setlength{\parindent}{0pt}
+\def\TPversion{0.1.1}
+\def\TPdate{24/09/2024}
+\usepackage{tcolorbox}
+\usepackage{pgffor}
+\tcbuselibrary{breakable,skins,hooks,listingsutf8}
+%\usepackage{soul}
+%\sethlcolor{lightgray!25}
+
+\lstset{
+ language=[LaTeX]TeX,%
+ basicstyle=\ttfamily,%
+ keywordstyle={\color{blue}},%
+ classoffset=0,%
+ keywords={},%
+ alsoletter={-},%
+ keywordstyle={\color{blue}},%
+ classoffset=1,%
+ alsoletter={-},%
+ morekeywords={euromoney},%
+ keywordstyle={\color{violet}},%
+ classoffset=2,%
+ alsoletter={-},%
+ morekeywords={\randintlist,\getitemfromrandintlist},%
+ keywordstyle={\color{green!50!black}},%
+ classoffset=3,%
+ morekeywords={min,max,nb,seed,sort,sep,repeat,exclude},%
+ keywordstyle={\color{orange}}
+}
+
+\newtcblisting{DemoCode}[1]{%
+ enhanced,width=\linewidth,%
+ bicolor,size=title,%
+ colback=cyan!10!white,%
+ colbacklower=cyan!5!white,%
+ colframe=cyan!75!black,%
+ listing options={%
+ breaklines=true,%
+ breakatwhitespace=true,%
+ style=tcblatex,basicstyle=\small\ttfamily,%
+ tabsize=4,%
+ commentstyle={\itshape\color{gray}},
+ keywordstyle={\color{blue}},%
+ classoffset=0,%
+ keywords={\usepackage,\includegraphics,xstring,listofitems,tikz,calc,simplekv,graphicx,\readlist,\showitems,\xintFor,\xintSeq},%
+ alsoletter={-},%
+ keywordstyle={\color{blue}},%
+ classoffset=1,%
+ alsoletter={-},%
+ morekeywords={euromoney},%
+ keywordstyle={\color{violet}},%
+ classoffset=2,%
+ alsoletter={-},%
+ morekeywords={\randintlist,\getitemfromrandintlist,\ListeRandint,\ExtraireEltListeRandint},%
+ keywordstyle={\color{green!50!black}},%
+ classoffset=3,%
+ morekeywords={min,max,nb,seed,sort,sep,repeat,Min,Max,Nb,Graine,Sep,Tri,Repet,exclude,Exclure},%
+ keywordstyle={\color{orange}}
+ },%
+ #1
+}
+
+\newtcbinputlisting\DemoCodeFile[1]{%
+ enhanced,width=\linewidth,%
+ bicolor,size=title,%
+ colback=lightgray!10!white,%
+ colbacklower=lightgray!5!white,%
+ colframe=lightgray!75!black,%
+ listing options={%
+ breaklines=true,%
+ breakatwhitespace=true,%
+ style=tcblatex,
+ basicstyle=\scriptsize\ttfamily,%
+ tabsize=4,%
+ commentstyle={\itshape\color{gray}},%
+ lastline=148
+ },%
+ breakable,
+ listing only,%
+ listing file={#1}
+}
+
+\NewDocumentCommand\ShowCode{ m }{%
+ \lstinline{#1}%
+}
+
+\begin{document}
+
+\thispagestyle{empty}
+
+\begin{center}
+ \begin{minipage}{0.88\linewidth}
+ \begin{tcolorbox}[colframe=yellow,colback=yellow!15]
+ \begin{center}
+ \renewcommand{\arraystretch}{1.25}%
+ \begin{tabular}{c}
+ {\Huge \texttt{randintlist}}\\
+ \\
+ {\LARGE Creating random integer number lists,} \\
+ {\LARGE with multiple numbers or not,} \\
+ {\LARGE sorted or not.} \\
+ \\
+ {\small \texttt{Version \TPversion{} -- \TPdate}}
+ \end{tabular}
+ \end{center}
+ \end{tcolorbox}
+ \end{minipage}
+\end{center}
+
+\begin{center}
+ \begin{tabular}{c}
+ \texttt{Cédric Pierquet}\\
+ {\ttfamily c pierquet -- at -- outlook . fr}\\
+ \texttt{\url{https://github.com/cpierquet/randintlist}} \\
+ \end{tabular}
+\end{center}
+
+\hrule
+
+\vfill
+
+\begin{tcolorbox}[colframe=lightgray,colback=lightgray!5]
+10 numbers, between 1 and 100, without repetition :
+
+\hfill\randintlist[min=1,max=100,nb=10]{\mylist}\textcolor{red}{\mylist}\hfill~
+
+The 5th value is :
+
+\hfill\textcolor{blue}{\getitemfromrandintlist{\mylist}{5}}\hfill~
+\end{tcolorbox}
+
+\begin{tcolorbox}[colframe=lightgray,colback=lightgray!5]
+10 numbers, between 1 and 100, without multiples of 5 :
+
+\hfill\randintlist[min=1,max=100,nb=10,exclude={5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100}]{\mylist}\textcolor{olive}{\mylist}\hfill~
+
+The 9th value is :
+
+\hfill\textcolor{purple}{\getitemfromrandintlist{\mylist}{9}}\hfill~
+\end{tcolorbox}
+
+\begin{tcolorbox}[colframe=lightgray,colback=lightgray!5]
+15 numbers, between 1 and 20, with repetition :
+
+\hfill\randintlist[min=1,max=20,nb=15,repeat]{\mylist}\textcolor{red}{\mylist}\hfill~
+
+The last value is :
+
+\hfill\textcolor{blue}{\getitemfromrandintlist{\mylist}{-1}}\hfill~
+\end{tcolorbox}
+
+\begin{tcolorbox}[colframe=lightgray,colback=lightgray!5]
+6 sorted numbers, between 1 and 51, without repetition :
+
+\hfill\randintlist[min=1,max=51,nb=6,sort=asc]{\mylist}ascending : \textcolor{red}{\mylist}\hfill~
+
+\hfill\randintlist[min=1,max=51,nb=6,sort=des,sep=>]{\mylist}descending : \textcolor{red}{\mylist}\hfill~
+\end{tcolorbox}
+
+\vfill~
+
+\hrule
+
+\medskip
+
+\emph{%
+ The \textsf{luarandom} package do the same things, but with the obligation to compile with \hologo{LuaLaTeX}.
+}
+
+\medskip
+
+\hrule
+
+\vspace*{5mm}
+
+\pagebreak
+
+\phantomsection
+
+\hypertarget{matoc}{}
+
+\tableofcontents
+
+\vspace*{5mm}
+
+%\hrule
+
+\pagebreak
+
+\section{Loading, useful packages}
+
+In order to load \texttt{randintlist}, simply use :
+
+\begin{DemoCode}{listing only}
+\usepackage{randintlist}
+\end{DemoCode}
+
+Loaded packages are \texttt{ifthen}, \texttt{simplekv}, \texttt{listofitems}, \texttt{randomlist}, \texttt{xintexpr} and \texttt{xstring}
+
+\section{The Macros}
+
+\subsection{Global usage}
+
+Package \texttt{randintlist} supports the creation of random integer number lists where a number will appear only once or multiple times. Generated lists can te used with \texttt{listofitems}.
+
+\hfill\textbf{All engines \TeX\ are compatible with this package.}\hfill~
+
+\subsection{Generate the list}
+
+\begin{DemoCode}{listing only}
+%generate list
+\randintlist[keys]{\macro}
+\end{DemoCode}
+
+Available keys are :
+
+\begin{itemize}
+ \item \ShowCode{min} : minimum value (default \ShowCode{1}) ;
+ \item \ShowCode{max} : maximum value (default \ShowCode{50}) ;
+ \item \ShowCode{nb} : number of values (default \ShowCode{6}) ;
+ \item \ShowCode{sep} : separator for the list (default \ShowCode{,}) ;
+ \item \ShowCode{sort} : sorting options, within \ShowCode{no/asc/dec} (default \ShowCode{no}) ;
+ \item \ShowCode{repeat} : boolean to authorize repeating values (default \ShowCode{false}) ;
+ \item \ShowCode{exclude} : list of excluded values (default \ShowCode{empty}) ;
+ \item \ShowCode{seed} : random seed value according to used packages (default \ShowCode{-}).
+\end{itemize}
+
+\begin{DemoCode}{}
+%default values
+\randintlist{\mylistA}\mylistA
+\end{DemoCode}
+
+\begin{DemoCode}{}
+%10 between 1 and 50, with ascending
+\randintlist[sort=asc,min=1,max=50,nb=10]{\mylistB}\mylistB
+\end{DemoCode}
+
+\begin{DemoCode}{}
+%15 between 1 and 50, with ascending and repetitions allowed
+\randintlist[sort=asc,min=1,max=50,nb=15,repeat]{\mylistC}\mylistC
+\end{DemoCode}
+
+\begin{DemoCode}{}
+%15 between 1 and 50, without multiples of 5
+\randintlist[%
+ sort=asc,min=1,max=50,nb=15,repeat,%
+ exclude={5,10,15,20,25,30,35,40,45,50}]%
+ {\mylistC}\mylistC
+\end{DemoCode}
+
+\begin{DemoCode}{}
+%list used with listofitems
+\randintlist{\mylistD}\mylistD\par
+\readlist*\mylistused{\mylistD}\showitems{\mylistused}\par
+\mylistused[1] ; \mylistused[-1]
+\end{DemoCode}
+
+\subsection{Accessing elements}
+
+\begin{DemoCode}{listing only}
+%accessing item
+\getitemfromrandintlist[separator]{\macro}{index}
+\end{DemoCode}
+
+\begin{DemoCode}{}
+%with default keys
+\randintlist{\mylistE}raw list : \mylistE\par
+items list :\par
+\xintFor* #1 in {\xintSeq{1}{6}}\do{\getitemfromrandintlist{\mylistE}{#1}\par}
+first element : \getitemfromrandintlist{\mylistE}{1}
+\end{DemoCode}
+
+\subsection{Version française}
+
+Voilà les commandes en version française, la syntaxe et les clés ne seront pas explicitées.
+
+\begin{DemoCode}{listing only}
+%obtenir la liste
+\ListeRandint[Min=..,Max=..,Nb=..,Repet=..,Graine=..,Tri=..,Sep=..,Exclure=..]{\macro}
+
+%extraire un élément
+\ExtraireEltListeRandint[sep]{\macro}{position}
+\end{DemoCode}
+
+\begin{DemoCode}{}
+%liste
+\ListeRandint[Min=5,Max=15,Nb=7,Repet,Tri=croiss,Sep={/}]{\maliste}\maliste\\
+%élément
+\ExtraireEltListeRandint[/]{\maliste}{4}
+\end{DemoCode}
+
+\pagebreak
+
+\section{Example}
+
+The following example uses \TikZ, and comes from \texttt{luarandom}'s documentation.
+
+\begin{DemoCode}{}
+\begin{tikzpicture}[scale=0.75]
+ \randintlist[min=1,max=100,nb=100]{\mylistsquare}
+ \draw[thin,gray] (0,0) grid (10,10) ;
+ \foreach \i in {1,...,100}{%
+ \xdef\tmpnumber{\getitemfromrandintlist{\mylistsquare}{\i}}%
+ \xdef\tmpnumberrow{\xinteval{\xintiiRem{\i-1}{10}}}%
+ \xdef\tmpnumbercol{\xinteval{\xintiiQuo{\i-1}{10}}}%
+ \draw ({0.5+\tmpnumbercol},{0.5+\tmpnumberrow}) node {\tmpnumber} ;
+ }%
+\end{tikzpicture}
+\end{DemoCode}
+
+\pagebreak
+
+\section{History}
+
+\texttt{0.1.1 : Possibility to exclude values}
+
+\texttt{0.1.0 : Initial version}
+
+\section{The code}
+
+\DemoCodeFile{randintlist.sty}
+
+\end{document}
diff --git a/macros/latex/contrib/randintlist/tex/randintlist.sty b/macros/latex/contrib/randintlist/tex/randintlist.sty
new file mode 100644
index 0000000000..4c15af336e
--- /dev/null
+++ b/macros/latex/contrib/randintlist/tex/randintlist.sty
@@ -0,0 +1,246 @@
+% Author : C. Pierquet
+% licence : Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txtf
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{randintlist}[2024/09/24 0.1.1 Create a list of random numbers with or without multiple values]
+
+%------History
+% 0.1.1 Possibility to exclude values
+% 0.1.0 Initial version
+
+%------Packages
+\RequirePackage{simplekv}
+\RequirePackage{listofitems}
+\RequirePackage{randomlist}
+\RequirePackage{xintexpr}
+\RequirePackage{xstring}
+\RequirePackage{ifthen}
+
+%-----Macros (latex3) for sorting and seed
+\ExplSyntaxOn
+\cs_new_eq:NN \randintseed \sys_gset_rand_seed:n
+\NewDocumentCommand\intascsortlist{m}
+{
+ \clist_sort:Nn #1
+ {
+ \fp_compare:nNnTF {##1} > {##2}
+ { \sort_return_swapped: }
+ { \sort_return_same: }
+ }
+}
+\NewDocumentCommand\intdessortlist{m}
+{
+ \clist_sort:Nn #1
+ {
+ \fp_compare:nNnTF {##1} < {##2}
+ { \sort_return_swapped: }
+ { \sort_return_same: }
+ }
+}
+\ExplSyntaxOff
+
+%----Internal macro (latex2) for testing if element is in list
+\newcommand\ifintvalueinlist[2]{\IfSubStr{,#2,}{,#1,}}
+
+\newcommand\boolvalueinlist[2]{\IfSubStr{,#2,}{,#1,}{\def\resisinlist{1}}{\def\resisinlist{0}}}
+
+\newcommand\xintifintvalueinlist[4]{%
+ \IfSubStr{,#2,}{,#1,}{\xdef\RESTMPVALUE{1}}{\xdef\RESTMPVALUE{0}}%
+ \xintifboolexpr{ \RESTMPVALUE == 1}{#3}{#4}%
+}
+
+%----Macro for generating
+\defKV[randomlistintegers]{%
+ min=\def\TAEEmin{#1},%
+ max=\def\TAEEmax{#1},%
+ nb=\def\TAEEnb{#1},%
+ sep=\def\TAEEsep{#1},%
+ sort=\def\TAEEtri{#1},%
+ seed=\def\TAEEseed{#1},%
+ exclude=\def\TAEEexcluded{#1}
+}
+
+\setKVdefault[randomlistintegers]{%
+ min=1,%
+ max=50,%
+ nb=6,%
+ sep={,},%
+ sort=no,%
+ repeat=false,%
+ seed={-},%
+ exclude={}
+}
+
+\NewList{tmprandintlist}
+
+\NewDocumentCommand\randintlist{ O{} m }{%1=keys,2=listname
+ \useKVdefault[randomlistintegers]%
+ \setKV[randomlistintegers]{#1}%
+ \ifboolKV[randomlistintegers]{repeat}%repeat or not
+ {%repeat allowed
+ \IfStrEq{\TAEEseed}{-}%
+ {}%
+ {%
+ \randintseed{\TAEEseed}%
+ }%
+ %list creation of first element
+ \def\resisinlist{1}%
+ \whiledo{\resisinlist=1}{%
+ \xdef\tmpresrandint{\fpeval{randint(\TAEEmin,\TAEEmax)}}%
+ \boolvalueinlist{\tmpresrandint}{\TAEEexcluded}%
+ }%
+ \xdef#2{\tmpresrandint}%
+ %list creation of other elements
+ \xintFor* ##1 in {\xintSeq{2}{\TAEEnb}}%
+ \do{%
+ \def\resisinlist{1}%
+ \whiledo{\resisinlist=1}{%
+ \xdef\tmpresrandint{\fpeval{randint(\TAEEmin,\TAEEmax)}}%
+ \boolvalueinlist{\tmpresrandint}{\TAEEexcluded}%
+ }%
+ \xdef#2{#2,\tmpresrandint}%
+ }%
+ }%
+ {%no repeating
+ %randomize numbers
+ \IfStrEq{\TAEEseed}{-}%
+ {}%
+ {%
+ \RLsetrandomseed{\TAEEseed}%
+ }%
+ \ClearList{tmprandintlist}%clearing the list
+ \xintFor* ##1 in {\xintSeq{\TAEEmin}{\TAEEmax}}%
+ \do{%
+ \ifintvalueinlist{##1}{\TAEEexcluded}%
+ {}%
+ {%
+ \InsertRandomItem{tmprandintlist}{##1}%
+ }%
+ }%
+ %list creation (first then other)
+ \xdef#2{\tmprandintlist[0]}%
+ \xintFor* ##1 in {\xintSeq{1}{\TAEEnb-1}}%
+ \do{%
+ \xdef#2{#2,\tmprandintlist[##1]}%
+ }%
+ }%
+ %sorting
+ \IfStrEq{\TAEEtri}{asc}%if ascending
+ {\intascsortlist{#2}}%
+ {}%
+ \IfStrEq{\TAEEtri}{des}%if descending
+ {\intdessortlist{#2}}%
+ {}%
+ \StrSubstitute{#2}{,}{\TAEEsep}[#2]%swipping separator if necessary
+}
+
+%-----Macro for extracting
+\NewDocumentCommand\getitemfromrandintlist{ O{,} m m }{%
+ \IfEq{#1}{/}%
+ {%
+ \setsepchar[.]{#1}%
+ }%
+ {%
+ \setsepchar{#1}%
+ }%
+ \readlist*\TMPLISTRANDINT{#2}%
+ \TMPLISTRANDINT[#3]%
+}
+
+%-----french version
+\defKV[randomlisteentiers]{%
+ Min=\def\TAEEmin{#1},%
+ Max=\def\TAEEmax{#1},%
+ Nb=\def\TAEEnb{#1},%
+ Sep=\def\TAEEsep{#1},%
+ Tri=\def\TAEEtri{#1},%
+ Graine=\def\TAEEseed{#1},%
+ Exclure=\def\TAEEexcluded{#1}
+}
+
+\setKVdefault[randomlisteentiers]{%
+ Min=1,%
+ Max=50,%
+ Nb=6,%
+ Sep={,},%
+ Tri=non,%
+ Repet=false,%
+ Graine={-},%
+ Exclure={}
+}
+
+\NewDocumentCommand\ListeRandint{ O{} m }{%1=keys,2=listname
+ \useKVdefault[randomlisteentiers]%
+ \setKV[randomlisteentiers]{#1}%
+ \ifboolKV[randomlisteentiers]{Repet}%repeat or not
+ {%repeat allowed
+ \IfStrEq{\TAEEseed}{-}%
+ {}%
+ {%
+ \randintseed{\TAEEseed}%
+ }%
+ %list creation of first element
+ \def\resisinlist{1}%
+ \whiledo{\resisinlist=1}{%
+ \xdef\tmpresrandint{\fpeval{randint(\TAEEmin,\TAEEmax)}}%
+ \boolvalueinlist{\tmpresrandint}{\TAEEexcluded}%
+ }%
+ \xdef#2{\tmpresrandint}%
+ %list creation of other elements
+ \xintFor* ##1 in {\xintSeq{2}{\TAEEnb}}%
+ \do{%
+ \def\resisinlist{1}%
+ \whiledo{\resisinlist=1}{%
+ \xdef\tmpresrandint{\fpeval{randint(\TAEEmin,\TAEEmax)}}%
+ \boolvalueinlist{\tmpresrandint}{\TAEEexcluded}%
+ }%
+ \xdef#2{#2,\tmpresrandint}%
+ }%
+ }%
+ {%no repeating
+ %randomize numbers
+ \IfStrEq{\TAEEseed}{-}%
+ {}%
+ {%
+ \RLsetrandomseed{\TAEEseed}%
+ }%
+ \ClearList{tmprandintlist}%clearing the list
+ \xintFor* ##1 in {\xintSeq{\TAEEmin}{\TAEEmax}}%
+ \do{%
+ \ifintvalueinlist{##1}{\TAEEexcluded}%
+ {}%
+ {%
+ \InsertRandomItem{tmprandintlist}{##1}%
+ }%
+ }%
+ %list creation (first then other)
+ \xdef#2{\tmprandintlist[0]}%
+ \xintFor* ##1 in {\xintSeq{1}{\TAEEnb-1}}%
+ \do{%
+ \xdef#2{#2,\tmprandintlist[##1]}%
+ }%
+ }%
+ %sorting
+ \IfStrEq{\TAEEtri}{croiss}%if ascending
+ {\intascsortlist{#2}}%
+ {}%
+ \IfStrEq{\TAEEtri}{decroiss}%if descending
+ {\intdessortlist{#2}}%
+ {}%
+ \StrSubstitute{#2}{,}{\TAEEsep}[#2]%swipping separator if necessary
+}
+
+%-----Macro for extracting
+\NewDocumentCommand\ExtraireEltListeRandint{ O{,} m m }{%
+ \IfEq{#1}{/}%
+ {%
+ \setsepchar[.]{#1}%
+ }%
+ {%
+ \setsepchar{#1}%
+ }%
+ \readlist*\TMPLISTRANDINT{#2}%
+ \TMPLISTRANDINT[#3]%
+}
+
+\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/regulatory/README.md b/macros/latex/contrib/regulatory/README.md
index ec9a283dc9..55a5e0f4bf 100644
--- a/macros/latex/contrib/regulatory/README.md
+++ b/macros/latex/contrib/regulatory/README.md
@@ -1,4 +1,5 @@
# Regulatory
+![CTAN Version](https://img.shields.io/ctan/v/regulatory)
A LaTeX package which provides macro's for crafting regulatory documents.
diff --git a/macros/latex/contrib/regulatory/doc/example1-en.pdf b/macros/latex/contrib/regulatory/doc/example1-en.pdf
index 7bac5e0c9b..2c679dbcb1 100644
--- a/macros/latex/contrib/regulatory/doc/example1-en.pdf
+++ b/macros/latex/contrib/regulatory/doc/example1-en.pdf
Binary files differ
diff --git a/macros/latex/contrib/regulatory/doc/example1-en.tex b/macros/latex/contrib/regulatory/doc/example1-en.tex
index eeb17acc99..ae903d7ef0 100644
--- a/macros/latex/contrib/regulatory/doc/example1-en.tex
+++ b/macros/latex/contrib/regulatory/doc/example1-en.tex
@@ -19,7 +19,7 @@
% example1-nl.tex, example2-nl.tex,
% example1-en.tex, example2-en.tex,
% md-example.tex, example.md,
-% fc-dutch.def and regulatory.sty
+% regulatory.sty
\documentclass[12pt,english]{article}
\usepackage{babel}
\usepackage[alldefs]{regulatory}
diff --git a/macros/latex/contrib/regulatory/doc/example1-nl.pdf b/macros/latex/contrib/regulatory/doc/example1-nl.pdf
index bc3f8b1d53..5bcb030bd8 100644
--- a/macros/latex/contrib/regulatory/doc/example1-nl.pdf
+++ b/macros/latex/contrib/regulatory/doc/example1-nl.pdf
Binary files differ
diff --git a/macros/latex/contrib/regulatory/doc/example1-nl.tex b/macros/latex/contrib/regulatory/doc/example1-nl.tex
index df01669786..513c9bce6e 100644
--- a/macros/latex/contrib/regulatory/doc/example1-nl.tex
+++ b/macros/latex/contrib/regulatory/doc/example1-nl.tex
@@ -19,7 +19,7 @@
% example1-nl.tex, example2-nl.tex,
% example1-en.tex, example2-en.tex,
% md-example.tex, example.md,
-% fc-dutch.def and regulatory.sty
+% regulatory.sty
\documentclass[12pt,dutch]{article}
\usepackage{babel}
\usepackage[alldefs]{regulatory}
diff --git a/macros/latex/contrib/regulatory/doc/example2-en.pdf b/macros/latex/contrib/regulatory/doc/example2-en.pdf
index e7fdc77178..3362320b7f 100644
--- a/macros/latex/contrib/regulatory/doc/example2-en.pdf
+++ b/macros/latex/contrib/regulatory/doc/example2-en.pdf
Binary files differ
diff --git a/macros/latex/contrib/regulatory/doc/example2-en.tex b/macros/latex/contrib/regulatory/doc/example2-en.tex
index f47f7d0d9e..c800c7672f 100644
--- a/macros/latex/contrib/regulatory/doc/example2-en.tex
+++ b/macros/latex/contrib/regulatory/doc/example2-en.tex
@@ -19,7 +19,7 @@
% example1-nl.tex, example2-nl.tex,
% example1-en.tex, example2-en.tex,
% md-example.tex, example.md,
-% fc-dutch.def and regulatory.sty
+% regulatory.sty
\documentclass[12pt,english]{article}
\usepackage{babel}
\usepackage{regulatory}
diff --git a/macros/latex/contrib/regulatory/doc/example2-nl.pdf b/macros/latex/contrib/regulatory/doc/example2-nl.pdf
index 6342318259..e2606186ca 100644
--- a/macros/latex/contrib/regulatory/doc/example2-nl.pdf
+++ b/macros/latex/contrib/regulatory/doc/example2-nl.pdf
Binary files differ
diff --git a/macros/latex/contrib/regulatory/doc/example2-nl.tex b/macros/latex/contrib/regulatory/doc/example2-nl.tex
index 071cce4a00..6713495658 100644
--- a/macros/latex/contrib/regulatory/doc/example2-nl.tex
+++ b/macros/latex/contrib/regulatory/doc/example2-nl.tex
@@ -19,7 +19,7 @@
% example1-nl.tex, example2-nl.tex,
% example1-en.tex, example2-en.tex,
% md-example.tex, example.md,
-% fc-dutch.def and regulatory.sty
+% regulatory.sty
\documentclass[12pt,dutch]{article}
\usepackage{babel}
\usepackage{regulatory}
diff --git a/macros/latex/contrib/regulatory/doc/regulatory-en.pdf b/macros/latex/contrib/regulatory/doc/regulatory-en.pdf
index ac592a4989..c65752a189 100644
--- a/macros/latex/contrib/regulatory/doc/regulatory-en.pdf
+++ b/macros/latex/contrib/regulatory/doc/regulatory-en.pdf
Binary files differ
diff --git a/macros/latex/contrib/regulatory/doc/regulatory-en.tex b/macros/latex/contrib/regulatory/doc/regulatory-en.tex
index 55d4290753..e497d27fd8 100644
--- a/macros/latex/contrib/regulatory/doc/regulatory-en.tex
+++ b/macros/latex/contrib/regulatory/doc/regulatory-en.tex
@@ -19,7 +19,7 @@
% example1-nl.tex, example2-nl.tex,
% example1-en.tex, example2-en.tex,
% md-example.tex, example.md,
-% fc-dutch.def and regulatory.sty
+% regulatory.sty
\documentclass[10pt,english]{ltxdoc}
%! suppress = InclusionLoop
diff --git a/macros/latex/contrib/regulatory/doc/regulatory-nl.pdf b/macros/latex/contrib/regulatory/doc/regulatory-nl.pdf
index 9d4832ce44..d8ff64100b 100644
--- a/macros/latex/contrib/regulatory/doc/regulatory-nl.pdf
+++ b/macros/latex/contrib/regulatory/doc/regulatory-nl.pdf
Binary files differ
diff --git a/macros/latex/contrib/regulatory/doc/regulatory-nl.tex b/macros/latex/contrib/regulatory/doc/regulatory-nl.tex
index f5c9f47259..c8048c9025 100644
--- a/macros/latex/contrib/regulatory/doc/regulatory-nl.tex
+++ b/macros/latex/contrib/regulatory/doc/regulatory-nl.tex
@@ -19,7 +19,7 @@
% example1-nl.tex, example2-nl.tex,
% example1-en.tex, example2-en.tex,
% md-example.tex, example.md,
-% fc-dutch.def and regulatory.sty
+% regulatory.sty
\documentclass[10pt,dutch]{ltxdoc}
%! suppress = InclusionLoop
diff --git a/macros/latex/contrib/regulatory/doc/regulatory-preamble.tex b/macros/latex/contrib/regulatory/doc/regulatory-preamble.tex
index 50c6db1bee..0325d5aacf 100644
--- a/macros/latex/contrib/regulatory/doc/regulatory-preamble.tex
+++ b/macros/latex/contrib/regulatory/doc/regulatory-preamble.tex
@@ -19,7 +19,7 @@
% example1-nl.tex, example2-nl.tex,
% example1-en.tex, example2-en.tex,
% md-example.tex, example.md,
-% fc-dutch.def and regulatory.sty
+% regulatory.sty
\usepackage{gitinfo-lua}
\usepackage{listings}
diff --git a/macros/latex/contrib/regulatory/doc/regulatory.tex b/macros/latex/contrib/regulatory/doc/regulatory.tex
index fbd5d35c3d..55bcbe8c6a 100644
--- a/macros/latex/contrib/regulatory/doc/regulatory.tex
+++ b/macros/latex/contrib/regulatory/doc/regulatory.tex
@@ -19,7 +19,7 @@
% example1-nl.tex, example2-nl.tex,
% example1-en.tex, example2-en.tex,
% md-example.tex, example.md,
-% fc-dutch.def and regulatory.sty
+% regulatory.sty
\translation{%
\title{Package \package{regulatory}\thanks{This document corresponds to \textsf{regulatory}~\packageversion, written on \packagedate.}}
}{%
@@ -176,16 +176,14 @@ lualatex main
}{, voor onderdelen.}
\translation{%
For ``subparagraphs'', \cmd{\abalpnum} from the \package{fmtcount}\footnote{%
- The Dutch language definition is currently in progress within the \href{https://github.com/vincentb1/fmtcount/pull/51}{\package{fmtcount}} package.
- In the meantime, this package includes the correct configuration for it.%
- } package is used to enumerate multiple subparagraphs.
+ The Dutch language definition is now included into package \href{https://github.com/Xerdi/fmtcount}{\package{fmtcount}} itself.
+ Be sure to update the package if \texttt{fc-dutch.def} is missing} package is used to enumerate multiple subparagraphs.
Suppose \cmd{\alph} were used; in that case, \option{paras} (second level) would be limited to 26 subparagraphs.
With \cmd{\abalphnum}, for example, with a value of 125, the result is `\texttt{du}'.
}{%
Voor onderdelen wordt er gebruik gemaakt van \cmd{\abalpnum} uit pakket \package{fmtcount}\footnote{%
- De Nederlandse taal definitie is momenteel nog in behandeling bij pakket \href{https://github.com/vincentb1/fmtcount/pull/51}{\package{fmtcount}}.
- In de tussentijd levert dit pakket daarvoor de juist configuratie mee.%
- } om meerdere onderdelen te kunnen opsommen.
+ De Nederlandse taal definitie is nu inbegrepen in pakket \href{https://github.com/Xerdi/fmtcount}{\package{fmtcount}} zelf.
+ Zorg ervoor dat het pakket up to date is als \texttt{fc-dutch.def} mist.} om meerdere onderdelen te kunnen opsommen.
Stel er zou gebruik gemaakt worden van \cmd{\alph}, dan is \option{paras} beperkt tot 26 onderdelen.
Bij \cmd{\abalphnum} met b\ij{}voorbeeld een waarde van 125 is `\texttt{du}' de uitkomst.
}
diff --git a/macros/latex/contrib/regulatory/tex/fc-dutch.def b/macros/latex/contrib/regulatory/tex/fc-dutch.def
deleted file mode 100644
index ee86d49a48..0000000000
--- a/macros/latex/contrib/regulatory/tex/fc-dutch.def
+++ /dev/null
@@ -1,327 +0,0 @@
-%% fc-dutch.def
-%% Copyright 2024 E. Nijenhuis
-%
-% This work may be distributed and/or modified under the
-% conditions of the LaTeX Project Public License, either version 1.3c
-% 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.3c 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 E. Nijenhuis.
-%
-% This work consists of the files regulatory.tex,
-% regulatory-preamble.tex, regulatory-nl.tex, regulatory-en.tex,
-% example1.bib, example2.bib,
-% example1-nl.tex, example2-nl.tex,
-% example1-en.tex, example2-en.tex,
-% md-example.tex, example.md,
-% fc-dutch.def and regulatory.sty
-\ProvidesFCLanguage{dutch}[2024/01/27]%
-\newcommand{\@ordinalMdutch}[2]{\edef#2{\number#1\relax.}}%
-\global\let\@ordinalMdutch\@ordinalMdutch
-\global\let\@ordinalFdutch\@ordinalMdutch
-\global\let\@ordinalNdutch\@ordinalMdutch
-\newcommand*\@@unitstringdutch[1]{%
- \ifcase#1%
- nul%
- \or een%
- \or twee%
- \or drie%
- \or vier%
- \or vijf%
- \or zes%
- \or zeven%
- \or acht%
- \or negen%
- \fi
-}%
-\global\let\@@unitstringdutch\@@unitstringdutch
-\global\let\@@unitstringdutch\@@unitstringdutch
-\newcommand*\@@tenstringdutch[1]{%
- \ifcase#1%
- \or tien%
- \or twintig%
- \or dertig%
- \or veertig%
- \or vijftig%
- \or zestig%
- \or zeventig%
- \or tachtig%
- \or negentig%
- \or honderd%
- \fi
-}%
-\global\let\@@tenstringdutch\@@tenstringdutch
-\newcommand*\@@teenstringdutch[1]{%
- \ifcase#1%
- tien%
- \or elf%
- \or twaalf%
- \or dertien%
- \or veertien%
- \or vijftien%
- \or zestien%
- \or zeventien%
- \or achttien%
- \or negentien%
- \fi
-}%
-\global\let\@@teenstringdutch\@@teenstringdutch
-\providecommand*{\honderd}{honderd}%
-\providecommand*{\duizend}{duizend}%
-\global\let\honderd\honderd
-\global\let\duizend\duizend
-\newcommand*\@@numberstringdutch[2]{%
- \ifnum#1>99999\relax
- \PackageError{fmtcount}{Out of range}%
- {This macro only works for values less than 100000}%
- \else
- \ifnum#1<0\relax
- \PackageError{fmtcount}{Negative numbers not permitted}%
- {This macro does not work for negative numbers, however
- you can try typing "minus" first, and then pass the modulus of
- this number}%
- \fi
- \fi
- \def#2{}%
- \@strctr=#1\relax \divide\@strctr by 1000\relax
- \ifnum\@strctr>1\relax
- \@@numberunderhundreddutch{\@strctr}{#2}%
- \appto#2{duizend}%
- \else
- \ifnum\@strctr=1\relax
- \eappto#2{\duizend}%
- \fi
- \fi
- \@strctr=#1\relax
- \@FCmodulo{\@strctr}{1000}%
- \divide\@strctr by 100\relax
- \ifnum\@strctr>1\relax
- \eappto#2{\@unitstring{\@strctr}honderd}%
- \else
- \ifnum\@strctr=1\relax
- \ifnum#1>1000\relax
- \appto#2{honderd}%
- \else
- \eappto#2{\honderd}%
- \fi
- \fi
- \fi
- \@strctr=#1\relax
- \@FCmodulo{\@strctr}{100}%
- \ifnum#1=0\relax
- \def#2{null}%
- \else
- \ifnum\@strctr=1\relax
- \appto#2{een}%
- \else
- \@@numberunderhundreddutch{\@strctr}{#2}%
- \fi
- \fi
-}%
-\global\let\@@numberstringdutch\@@numberstringdutch
-\newcommand*{\@numberstringMdutch}[2]{%
- \let\@unitstring=\@@unitstringdutch%
- \let\@teenstring=\@@teenstringdutch%
- \let\@tenstring=\@@tenstringdutch%
- \def\@hundred{honderd}\def\@thousand{duizend}%
- \def\@andname{en}%
- \@@numberstringdutch{#1}{#2}%
-}%
-\global\let\@numberstringMdutch\@numberstringMdutch
-\global\let\@numberstringFdutch=\@numberstringMdutch
-\global\let\@numberstringNdutch=\@numberstringMdutch
-\newcommand*{\@NumberstringMdutch}[2]{%
- \@numberstringMdutch{#1}{\@@num@str}%
- \edef#2{\noexpand\MakeUppercase\expandonce\@@num@str}%
-}%
-\global\let\@NumberstringMdutch\@NumberstringMdutch
-\global\let\@NumberstringFdutch=\@NumberstringMdutch
-\global\let\@NumberstringNdutch=\@NumberstringMdutch
-\newcommand*\@@unitthstringdutch[1]{%
- \ifcase#1%
- nulde%
- \or eerste%
- \or tweede%
- \or derde%
- \or vierde%
- \or vijfde%
- \or zesde%
- \or zevende%
- \or achtste%
- \or negende%
- \fi
-}%
-\global\let\@@unitthstringdutch\@@unitthstringdutch
-\newcommand*\@@tenthstringdutch[1]{%
- \ifcase#1%
- \or tiende%
- \or twintigste%
- \or dertigste%
- \or veertigste%
- \or vijftigste%
- \or zestigste%
- \or zeventigste%
- \or tachtigste%
- \or negentigste%
- \fi
-}%
-\global\let\@@tenthstringdutch\@@tenthstringdutch
-\newcommand*\@@teenthstringdutch[1]{%
- \ifcase#1%
- tiende%
- \or elfde%
- \or twaalfde%
- \or dertiende%
- \or veertiende%
- \or vijftiende%
- \or zestiende%
- \or zeventiende%
- \or achttiende%
- \or negentiende%
- \fi
-}%
-\global\let\@@teenthstringdutch\@@teenthstringdutch
-\newcommand*\@@ordinalstringdutch[2]{%
- \@orgargctr=#1\relax
- \ifnum\@orgargctr>99999\relax
- \PackageError{fmtcount}{Out of range}%
- {This macro only works for values less than 100000}%
- \else
- \ifnum\@orgargctr<0\relax
- \PackageError{fmtcount}{Negative numbers not permitted}%
- {This macro does not work for negative numbers, however
- you can try typing "minus" first, and then pass the modulus of
- this number}%
- \fi
- \fi
- \def#2{}%
- \@strctr=\@orgargctr\divide\@strctr by 1000\relax
- \ifnum\@strctr>1\relax
- \@@numberunderhundreddutch{\@strctr}{#2}%
- \@tmpstrctr=\@orgargctr\@FCmodulo{\@tmpstrctr}{1000}%
- \ifnum\@tmpstrctr=0\relax
- \eappto#2{\@thousandth}%
- \else
- \appto#2{duizend}%
- \fi
- \else
- \ifnum\@strctr=1\relax
- \ifnum\@orgargctr=1000\relax
- \eappto#2{\@thousandth}%
- \else
- \eappto#2{\duizend}%
- \fi
- \fi
- \fi
- \@strctr=\@orgargctr%
- \@FCmodulo{\@strctr}{1000}%
- \divide\@strctr by 100\relax
- \ifnum\@strctr>1\relax
- \@tmpstrctr=\@orgargctr \@FCmodulo{\@tmpstrctr}{100}%
- \ifnum\@tmpstrctr=0\relax
- \ifnum\@strctr=1\relax
- \eappto#2{\@hundredth}%
- \else
- \eappto#2{\@unitstring{\@strctr}\@hundredth}%
- \fi
- \else
- \eappto#2{\@unitstring{\@strctr}honderd}%
- \fi
- \else
- \ifnum\@strctr=1\relax
- \@tmpstrctr=\@orgargctr \@FCmodulo{\@tmpstrctr}{100}%
- \ifnum\@tmpstrctr=0\relax
- \eappto#2{\@hundredth}%
- \else
- \ifnum\@orgargctr>1000\relax
- \appto#2{honderd}%
- \else
- \eappto#2{\honderd}%
- \fi
- \fi
- \fi
- \fi
- \@strctr=\@orgargctr%
- \@FCmodulo{\@strctr}{100}%
- \ifthenelse{\@strctr=0 \and \@orgargctr>0 }{}{%
- \@@numberunderhundredthdutch{\@strctr}{#2}%
- }%
-}%
-\global\let\@@ordinalstringdutch\@@ordinalstringdutch
-\newcommand*{\@ordinalstringMdutch}[2]{%
- \let\@unitthstring=\@@unitthstringdutch%
- \let\@teenthstring=\@@teenthstringdutch%
- \let\@tenthstring=\@@tenthstringdutch%
- \let\@unitstring=\@@unitstringdutch%
- \let\@teenstring=\@@teenstringdutch%
- \let\@tenstring=\@@tenstringdutch%
- \def\@thousandth{duizendste}%
- \def\@hundredth{honderdste}%
- \@@ordinalstringdutch{#1}{#2}%
-}%
-\global\let\@ordinalstringMdutch\@ordinalstringMdutch
-\global\let\@ordinalstringFdutch=\@ordinalstringMdutch
-\global\let\@ordinalstringNdutch=\@ordinalstringMdutch
-\newcommand*{\@OrdinalstringMdutch}[2]{%
- \@ordinalstringMdutch{#1}{\@@num@str}%
- \def\@andname{en}%
- \def\@hundred{Honderd}\def\@thousand{Duizend}%
- \def\@hundredth{Honderdste}\def\@thousandth{Duizendste}%
- \edef#2{\noexpand\MakeUppercase\expandonce\@@num@str}%
-}%
-\global\let\@OrdinalstringMdutch\@OrdinalstringMdutch
-\global\let\@OrdinalstringFdutch=\@OrdinalstringMdutch
-\global\let\@OrdinalstringNdutch=\@OrdinalstringMdutch
-\newcommand*{\@@numberunderhundreddutch}[2]{%
- \ifnum#1<10\relax
- \ifnum#1>0\relax
- \eappto#2{\@unitstring{#1}}%
- \fi
- \else
- \@tmpstrctr=#1\relax
- \@FCmodulo{\@tmpstrctr}{10}%
- \ifnum#1<20\relax
- \eappto#2{\@teenstring{\@tmpstrctr}}%
- \else
- \ifnum\@tmpstrctr=0\relax
- \else
- \eappto#2{\@unitstring{\@tmpstrctr}en}%
- \fi
- \@tmpstrctr=#1\relax
- \divide\@tmpstrctr by 10\relax
- \eappto#2{\@tenstring{\@tmpstrctr}}%
- \fi
- \fi
-}%
-\global\let\@@numberunderhundreddutch\@@numberunderhundreddutch
-\newcommand*{\@@numberunderhundredthdutch}[2]{%
- \ifnum#1<10\relax
- \eappto#2{\@unitthstring{#1}}%
- \else
- \@tmpstrctr=#1\relax
- \@FCmodulo{\@tmpstrctr}{10}%
- \ifnum#1<20\relax
- \eappto#2{\@teenthstring{\@tmpstrctr}}%
- \else
- \ifnum\@tmpstrctr=0\relax
- \else
- \eappto#2{\@unitstring{\@tmpstrctr}-en-}%
- \fi
- \@tmpstrctr=#1\relax
- \divide\@tmpstrctr by 10\relax
- \eappto#2{\@tenthstring{\@tmpstrctr}}%
- \fi
- \fi
-}%
-\global\let\@@numberunderhundredthdutch\@@numberunderhundredthdutch
-\iffalse Local variables: \fi
-\iffalse mode: docTeX \fi
-\iffalse End: \fi
-\endinput
-%%
-%% End of file `fc-dutch.def'.
diff --git a/macros/latex/contrib/regulatory/tex/regulatory.sty b/macros/latex/contrib/regulatory/tex/regulatory.sty
index 2e89a19a37..2755a8ac9b 100644
--- a/macros/latex/contrib/regulatory/tex/regulatory.sty
+++ b/macros/latex/contrib/regulatory/tex/regulatory.sty
@@ -19,9 +19,9 @@
% example1-nl.tex, example2-nl.tex,
% example1-en.tex, example2-en.tex,
% md-example.tex, example.md,
-% fc-dutch.def and regulatory.sty
+% regulatory.sty
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{regulatory}[2024/01/27 0.0.3 Xerdi's Regulatory Package]
+\ProvidesPackage{regulatory}[2024/09/04 0.0.4 Xerdi's Regulatory Package]
\RequirePackage{pgfopts}
\RequirePackage{xifthen}
diff --git a/macros/latex/contrib/reptheorem/reptheorem.dtx b/macros/latex/contrib/reptheorem/reptheorem.dtx
index b0f537af97..e26daf2f5a 100644
--- a/macros/latex/contrib/reptheorem/reptheorem.dtx
+++ b/macros/latex/contrib/reptheorem/reptheorem.dtx
@@ -89,7 +89,7 @@ License: [LPPL1.3c](https://www.latex-project.org/lppl.txt)
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: reptheorem 2024-08-12 v1.1}
+\Msg{* Package: reptheorem 2024-09-22 v1.2}
\Msg{************************************************************************}
\keepsilent
@@ -199,7 +199,7 @@ colorlinks,
% \date{\filedate}
%
% \maketitle
-%
+%^^A
% \begin{abstract}
% \noindent When writing a large manuscript, it is sometimes
% beneficial to repeat a theorem (or lemma or \dots) at
@@ -211,21 +211,21 @@ colorlinks,
% of the |.aux| file, and also introduces its own file
% extension, |.thm|, to replicate theorems in other files.
% \end{abstract}
-%
+%^^A
% \tableofcontents
-%
+%^^A
%\changes{v1.0}{2024-03-27}{First public release}
-%
-%
-%
+%^^A
+%^^A
+%^^A
%\StopEventually{^^A
% \PrintChanges
% \PrintIndex
%}
-%
-%
-%
-%
+%^^A
+%^^A
+%^^A
+%^^A
% \section{Repeating theorems}
% Let's say we define a theorem as follows:
% \begin{verbatim}
@@ -257,24 +257,21 @@ colorlinks,
% difference is that we have saved the theorem for later use.\par
% The |makethm| environment takes two mandatory arguments
% and one optional one. The first mandatory argument is the
-% type of theorem environment, like |theorem|, |lemma|,
+% type of theorem environment as defined in \textsf{amsthm}, like |theorem|, |lemma|,
% |definition|, etc. The second is the theorem's label.
-% The label is mandatory because to replicate the theorem,
+% The label is mandatory since, to replicate the theorem,
% we need to have a ``name'' attached to it. |makethm|
% automatically attaches a |\label|, as well, so |\ref{thm:Yoneda}|
% becomes \ref{thm:Yoneda}. The optional argument is passed
% right to the optional argument of the theorem environment,
-% giving the name of a theorem\par
-%
+% giving the theorem a name.\par
+%^^A
% Now let's say we want to replicate the theorem later
% or earlier in the text. This may be done if, for example,
% the theorem is proven at a later point, or we want to
% ``tease'' the reader with a powerful theorem that will be
% proven later in the chapter. To do this, we use the
-% \DescribeMacro{\repthm} command, as follows.
-% \begin{verbatim}
-% \repthm{thm:Yoneda}
-% \end{verbatim}
+% \DescribeMacro{\repthm} |\repthm| command: |\repthm{thm:Yoneda}|.
% This outputs the theorem again.
% \repthm{thm:Yoneda}
% The label of this theorem is a |\ref|, and automatically
@@ -285,27 +282,30 @@ colorlinks,
% only displays if the theorem is undefined. For example,
% |\repthm{thm:foo}[bar]| returns
% \repthm{thm:foo}[bar]
-% If we do the same without providing an alt text, we get
+% \noindent If we do the same without providing an alt text, we get
% \repthm{thm:foo}
-% together with a warning.\par
+% \noindent together with a warning: ``Package \textsf{reptheorem}: Theorem |thm:foo|
+% not defined; rebuild your project. If the issue persists, create the theorem
+% using |\begin{makethm}| or consider adding alt text to |\repthm| using the optional
+% parameter.''\par
% Since we're using the |.aux| file, it is possible
% to replicate a theorem before it is stated. For example,
% \begin{verbatim}
% \repthm{thm:later}
-% \begin{makethm}{theorem}{thm:later}[Later]
+% \begin{makethm}{theorem}{thm:later}
% Alligator!
% \end{makethm}
% \end{verbatim}
% returns
% \repthm{thm:later}
-% \begin{makethm}{theorem}{thm:later}[Later]
+% \begin{makethm}{theorem}{thm:later}
% Alligator
% \end{makethm}
% Note that it is necessary to run a |.tex| file twice
% to replicate theorems ahead of time, similarly to
% how one has to run a file twice to make sure the
% references are correct.\par
-%
+%^^A
% \section{Replicating theorems between files}
% Let's say we have the following files for our project:
% \begin{verbatim}
@@ -328,7 +328,7 @@ colorlinks,
% In our example, if we also defined a |thm:baz| in |foo.tex|,
% loading |bar.thm| into |foo.tex| will not overwrite the local
% |thm:baz|.
-%
+%^^A
% \subsection{Replicating theorems to subfiles}
% Replicating theorems to different files is particularly
% useful when working in big documents with multiple subfiles.
@@ -346,15 +346,14 @@ colorlinks,
% |foo.tex| and |bar.tex|. This will allow us to
% use all theorems in the final |main.tex| in each of
% the subfiles.
-%
-%
-%
+%^^A
+%^^A
+%^^A
% \section{Source code}
% \begin{macrocode}
%<*package>
-\ProvidesPackage{reptheorem}[2024-08-12 v1.1 Reptheorem package]
+\ProvidesPackage{reptheorem}[2024-09-22 v1.2 Reptheorem package]
% \end{macrocode}
-%
% \begin{macro}{\theoremfile}
% Using |\theoremfile| will output all saved theorems into an output file.
% By default, if your \LaTeX file is |foo.tex|, the output file is |foo.thm|.
@@ -369,7 +368,6 @@ colorlinks,
}
% \end{macrocode}
% \end{macro}
-%
% \begin{macro}{\loadtheorems}
% If you have exported saved theorems to a file, you can load them
% into another file using the macro |\loadtheorems|.
@@ -385,9 +383,11 @@ colorlinks,
}
% \end{macrocode}
% \end{macro}
-%
% \begin{environment}{makethm}
% \changes{v1.1}{2024/05/03}{Now saves theorem environment type, breaking backwards compatibility}
+% \changes{v1.2}{2024/09/21}{Environment end moved to fix vertical spacing.}
+% \changes{v1.2}{2024/09/22}{Theorem name is only saved if it exists.}
+% \changes{v1.2}{2024/09/22}{Renamed theorem output variable to be unique for each theorem.}
% On to defining the actual theorems to be saved.
% \begin{macrocode}
\NewDocumentEnvironment{makethm}{ m m o +b }
@@ -402,39 +402,42 @@ colorlinks,
}{
\begin{#1}\label{#2}
}
- #4
+ % \begin{theorem}
+ #4
+ \expandafter\gdef\csname thmtype@#2\endcsname{#1}%
+ \expandafter\long\expandafter\gdef\csname thm@#2\endcsname{#4}%
+ \IfValueT{#3}{% Only save theorem name if it exists
+ \expandafter\gdef\csname thmdesc@#2\endcsname{#3}%
+ }
+ % Saving parameters to aux file
+ \expandafter\long\expandafter\gdef\csname thmoutput@#2\endcsname{%
+ \string\expandafter\string\gdef\noexpand%
+ \csname thmtype@#2\string\endcsname{#1}%
+ ^^J%
+ \string\expandafter\string\long\string\expandafter%
+ \string\gdef\noexpand\csname thm@#2\string\endcsname{#4}%
+ \IfValueT{#3}{
+ ^^J%
+ \string\expandafter\string\gdef\noexpand%
+ \csname thmdesc@#2\string\endcsname{#3}%
+ }
+ }
+ \write\@auxout{\csname thmoutput@#2\endcsname}
+ \if\reptheorem@theoremfile\relax
+ % No file has been set
+ \else
+ % We have a theorem file
+ % Saving parameters to theorem file
+ \write\@thmlist{\csname thmoutput@#2\endcsname}
+ \fi
\end{#1}
- \expandafter\gdef\csname thmtype@#2\endcsname{#1}
- \expandafter\long\expandafter\gdef\csname thm@#2\endcsname{#4}%
- \expandafter\gdef\csname thmdesc@#2\endcsname{#3}%
- % Saving parameters to aux file
- \long\gdef\@thmoutput{%
- \string\expandafter\string\gdef\noexpand%
- \csname thmtype@#2\string\endcsname{#1}%
- ^^J%
- \string\expandafter\string\long\string\expandafter%
- \string\gdef\noexpand\csname thm@#2\string\endcsname{#4}%
- ^^J%
- \string\expandafter\string\gdef\noexpand%
- \csname thmdesc@#2\string\endcsname{#3}%
- }
- \write\@auxout{\@thmoutput}
- \if\reptheorem@theoremfile\relax
- % No file has been set
- \else
- % We have a theorem file
- % Saving parameters to theorem file
- \write\@thmlist{\@thmoutput}
- \fi
}{}
% \end{macrocode}
% \end{environment}
-%
% \begin{macro}{\repthm}
% \changes{v1.1}{2024/05/03}{Now saves theorem environment type, breaking backwards compatibility}
+% \changes{v1.2}{2024/09/22}{Fixed bug where theorems got a name even if undefined.}
% To repeat a theorem, use the |\repthm| command.
-% The type of theorem is not saved, so it is necessary to
-% respecify it each time a theorem is repeated.
% \begin{macrocode}
\newcounter{old@counter}
\NewDocumentCommand{\repthm}{ m +o }{
@@ -455,18 +458,17 @@ colorlinks,
%
\ifcsname thm@#1\endcsname% Check if theorem is even defined
% Theorem is defined
- \expandafter\edef\expandafter\@@thmdesc{\csname thmdesc@#1\endcsname}%
\expandafter\let\expandafter\@@thm\csname thm@#1\endcsname
% Output theorem
- \IfValueTF{\@@thmdesc}{% Check if theorem has name
- \begin{\@@thmtype}[\@@thmdesc]
+ \ifcsname thmdesc@#1\endcsname % Check if theorem has name
+ \begin{\@@thmtype}[\csname thmdesc@#1\endcsname]
\@@thm
\end{\@@thmtype}
- }{% No optionals
+ \else % No optionals
\begin{\@@thmtype}
\@@thm
\end{\@@thmtype}
- }
+ \fi
\else
% Theorem undefined
\IfValueTF{#2}{
@@ -490,8 +492,6 @@ colorlinks,
}
% \end{macrocode}
% \end{macro}
-
-
% \begin{macrocode}
%</package>
% \end{macrocode}
diff --git a/macros/latex/contrib/reptheorem/reptheorem.ins b/macros/latex/contrib/reptheorem/reptheorem.ins
index be179b4d9a..cf6d514b27 100644
--- a/macros/latex/contrib/reptheorem/reptheorem.ins
+++ b/macros/latex/contrib/reptheorem/reptheorem.ins
@@ -18,7 +18,7 @@
%%
%% This work has the LPPL maintenance status `maintained'.
%%
-%% The Current Maintainer of this work is Jesse Sraat.
+%% The Current Maintainer of this work is Jesse Straat.
%%
%% This work consists of the main file reptheorem.dtx
%% and the derived files
@@ -27,7 +27,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: reptheorem 2024-08-12 v1.1}
+\Msg{* Package: reptheorem 2024-09-22 v1.2}
\Msg{************************************************************************}
\keepsilent
@@ -47,7 +47,7 @@ version 2008 or later.
This work has the LPPL maintenance status `maintained'.
-The Current Maintainer of this work is Jesse Sraat.
+The Current Maintainer of this work is Jesse Straat.
This work consists of the main file reptheorem.dtx
and the derived files
diff --git a/macros/latex/contrib/reptheorem/reptheorem.pdf b/macros/latex/contrib/reptheorem/reptheorem.pdf
index cb574aa07c..55b369d620 100644
--- a/macros/latex/contrib/reptheorem/reptheorem.pdf
+++ b/macros/latex/contrib/reptheorem/reptheorem.pdf
Binary files differ
diff --git a/macros/latex/contrib/rub-kunstgeschichte/rub-kunstgeschichte-example.pdf b/macros/latex/contrib/rub-kunstgeschichte/rub-kunstgeschichte-example.pdf
index 891c9e8e97..0cbc015c8a 100644
--- a/macros/latex/contrib/rub-kunstgeschichte/rub-kunstgeschichte-example.pdf
+++ b/macros/latex/contrib/rub-kunstgeschichte/rub-kunstgeschichte-example.pdf
Binary files differ
diff --git a/macros/latex/contrib/rub-kunstgeschichte/rub-kunstgeschichte.dtx b/macros/latex/contrib/rub-kunstgeschichte/rub-kunstgeschichte.dtx
index 5423d5babe..d41d99379d 100644
--- a/macros/latex/contrib/rub-kunstgeschichte/rub-kunstgeschichte.dtx
+++ b/macros/latex/contrib/rub-kunstgeschichte/rub-kunstgeschichte.dtx
@@ -29,10 +29,15 @@
%<class>\NeedsTeXFormat{LaTeX2e}[2022-06-01]
%<class>\ProvidesClass{rub-kunstgeschichte}
%<*class>
- [2024-05-26 v0.1.0 RUB KGI class]
+ [2024-09-06 v0.2.0 RUB Kunstgeschichte class]
%</class>
%<*driver>
\documentclass{ltxdoc}
+
+%^^A Load packages needed for the documentation
+\usepackage{dtxdescribe}
+\fvset{commandchars={|()}}
+
\EnableCrossrefs
\CodelineIndex
\RecordChanges
@@ -51,16 +56,15 @@
%
% \DoNotIndex{\newcommand,\newenvironment}
% \DoNotIndex{\begin,\end}
+% \DoNotIndex{\fi}
+% \DoNotIndex{\section,\subsection,\subsubsection}
+% \DoNotIndex{\title,\author,\tableofcontents}
+% \DoNotIndex{\LaTeX,\verb}
%
%^^A define helper commands for consistent typesetting in the documentation
-% \def\env{\texttt}
-% \def\opt{\texttt}
-% \def\cls{\textsf}
-% \def\pkg{\textsf}
-% \def\prg{\textsf}
% \DeclareDocumentCommand\email{m}{\href{mailto:#1}{\nolinkurl{#1}}}
%
-% \title{The \cls{\jobname} class^^A
+% \title{The \pkg{\jobname} class^^A
% \thanks{This document corresponds to \pkg{\jobname}~\fileversion,
% dated \filedate.}}
% \author{\copyright{} Joran Schneyer^^A
@@ -70,6 +74,7 @@
% \date{\filedate}
%
% \maketitle
+% \tableofcontents
%
% \section{Introduction}\label{sec:introduction}
%
@@ -84,9 +89,64 @@
%
% To use this class, simply specify it as the document class.^^A
% \footnote{You can also find a complete example usage of this class in \autoref{sec:example}.}
-% \begin{verbatim}
+% \begin{sourceverb}
% \documentclass{rub-kunstgeschichte}
-% \end{verbatim}
+% \end{sourceverb}
+%
+% \subsection{Caveats}
+% When using this class, some packages are loaded automatically with options (see also \autoref{sec:implementation:package-loading}).
+% That means that you can't reload the same package with different options without risking an option clash error.
+% The relevant packages offer other ways to change their options in the preamble:
+%
+% \DescribePackage{biblatex}
+% Customize citations and bibliography.
+%
+% \verb|\ExecuteBibliographyOptions|\oarg{entrytype}\marg{options} can be used to set most options,
+% but some can only be set at the time of loading the \pkg{biblatex} package.
+% Those can be set in the class options using the \optn{biblatex} key (see also \autoref{sec:usage:class-options}).
+%
+% \DescribePackage{hyperref}
+% Customize behavior of clickable elements and pdf meta-data.
+%
+% \verb|\hypersetup|\marg{options} should be used for nearly all options.
+% The few options that can only be given at load time of the package have to be passed along using the \optn{hyperref} class option (see also \autoref{sec:usage:class-options}).
+%
+% \DescribePackage{setspace}
+% Overwrite the 1.5 line-spacing setting.
+%
+% Either \verb|\singlespacing|,
+% \verb|\doublespacing|
+% or for custom spacing factors also
+% \verb|\setstretch|\marg{baselinestretch}.
+%
+% \DescribePackage{geometry}
+% Overwrite geometry options such as the page margin settings.
+%
+% \verb|\geometry|\marg{options}
+%
+% \subsection{Class options}\label{sec:usage:class-options}
+% You can pass several \meta{options} to the class by using
+% \begin{sourceverb}
+% \documentclass|oarg(options){rub-kunstgeschichte}
+% \end{sourceverb}
+% The \meta{options} are key/value pairs that sometimes defer to a default value when only the key is given.
+%
+% \DescribeOption{biblatex}
+% Pass along options to the \pkg{biblatex} package. They overwrite default options set by this class.
+%
+% \DescribeOption{hyperref}
+% Pass along options to the \pkg{biblatex} package. They do \textbf{not} overwrite default options set by this class as they are set after loading the package using the \verb|\hypersetup| command.
+% To overwrite them, use \verb|\hypersetup|\marg{options} in the preamble.
+%
+% \DescribeOption{parskip}
+% \DescribeDefault{\optn{true}}
+% Specify wether to load the \pkg{parskip} package to remove indentation at the start of paragraphs.
+%
+% \DescribeOption{noparskip}
+% \DescribeDefault{\optn{true}}
+% The complementary option to the \optn{parskip} option.
+%
+% If neither \optn{parksip} nor \optn{noparskip} are given, the \pkg{parskip} package is automatically loaded by default.
%
% \StopEventually{}
%
@@ -99,8 +159,73 @@
%<*class>
% \fi
%
+% \subsection{Class options}\label{sec:implementation:class-options}
+% \iffalse
+%% Class options
+% \fi
+% The class options are defined as keyval options for great flexibility.
+% They toggle some of the class features or customize their behavior.
+%
+% \begin{option}{biblatex}
+% The \optn{biblatex} option stores its content in a macro until it is later passed along to the \pkg{biblatex} package after specifying the default options (see \autoref{sec:implementation:package-loading:bibliography}).
+% Therefore, options provided with this key overwrite the ones set per default by this class.
+% \begin{macrocode}
+\DeclareKeys[rubkgi]{
+ biblatex.store = \@rubkgi@biblatexOptions,
+ biblatex.usage = load
+}
+% \end{macrocode}
+% \end{option}
+%
+% \begin{option}{hyperref}
+% The \optn{hyperref} option passes its content along immediately, to be used as options when the \pkg{hyperref} package is loaded.
+% This will \textbf{not} overwrite default options set by this class as they are set after loading the package using \verb|\hypersetup|\marg{options} (see also \autoref{sec:implementation:package-loading:others}).
+% \begin{macrocode}
+\DeclareKeys[rubkgi]{
+ hyperref.code = \PassOptionsToPackage{#1}{hyperref},
+ hyperref.usage = load
+}
+% \end{macrocode}
+% \end{option}
+%
+% \paragraph{Paragraph indentation}
+% First we define a TeX switch which is later used (see \autoref{sec:implementation:package-loading}) to check wether to load the \pkg{parskip} package to remove the indentation at the start of paragraphs.
+% \iffalse
+%% TeX switch to decide wether to load the parskip package
+% \fi
+% \begin{macrocode}
+\newif\if@rubkgi@parskip
+% \end{macrocode}
+% By default we set the switch to true, so the parskip package is normally loaded when using this class.
+% \begin{macrocode}
+\@rubkgi@parskiptrue
+% \end{macrocode}
+% \begin{option}{parskip}
+% Then we declare the key so the switch can be turned on and off by the user in the class options.
+% \begin{macrocode}
+\DeclareKeys[rubkgi]{
+ parskip.if = @rubkgi@parskip,
+ parskip.usage = load,
+% \end{macrocode}
+% \end{option}
+% \begin{option}{noparskip}
+% Finally we define the complementary key for easier disabling of the parskip feature.
+% \begin{macrocode}
+ noparskip.ifnot = @rubkgi@parskip,
+ noparskip.usage = load
+}
+% \end{macrocode}
+% \end{option}
+%
+% \paragraph{Process options}
+% After defining the class options it is necessary to process them too in order to actually make use of them.
+% \begin{macrocode}
+\ProcessKeyOptions[rubkgi]
+% \end{macrocode}
+%
% \subsection{Base class}\label{sec:implementation:base-class}
-% The \cls{\jobname} class is based on the \cls{article} class.
+% \DescribeClass{article}
+% The \pkg{\jobname} class is based on the \pkg{article} class.
% When loading the class we specify \texttt{12pt} as the base font size, as required by the guidelines.
% \iffalse
%% Load base class with 12pt base font size
@@ -111,9 +236,95 @@
%
% \subsection{Loading packages}\label{sec:implementation:package-loading}
%
-% \paragraph{Line spacing}
+% \subsubsection{Bibliography}\label{sec:implementation:package-loading:bibliography}
+%
+% \DescribePackage{biblatex}
+% \changes{v0.2.0}{2024-09-06}{Use biblatex with authortitle-dw style from biblatex-dw package.}^^A
+% To support bibliography facilities out of the box, the \pkg{biblatex} package is loaded. To customize the behavior, a few options are passed to the package.
+% \iffalse
+%% biblatex options
+% \fi
+% \begin{macrocode}
+\PassOptionsToPackage{
+% \end{macrocode}
+%
+% \DescribeOption[biblatex]{backend}
+% Defines the backend program. To use all features of \pkg{biblatex}, the \prog{biber} backend must be used.
+% \begin{macrocode}
+ backend=biber,
+% \end{macrocode}
+%
+% \DescribeOption[biblatex]{singletitle}
+% Prints the title of a cited work in short citations only if there is more than one work of the same author.
+% \begin{macrocode}
+ singletitle=true,
+% \end{macrocode}
+%
+% \DescribeOption[biblatex]{autocite}
+% Defines the behavior of the \cs{autocite} command, which in this case will behave like the \cs{footcite} command and will print citations in the footnotes instead of directly in the text.
+% \begin{macrocode}
+ autocite=footnote,
+% \end{macrocode}
+%
+% \DescribeOption[biblatex]{autopunct}
+% Controls whether the citation commands scan ahead for punctuation marks.
+% \begin{macrocode}
+ autopunct=false
+}{biblatex}
+% \end{macrocode}
+%
+% \DescribePackage{biblatex-dw}
+% \iffalse
+%% biblatex-dw package
+% \fi
+% Further approximation of the suggested bibliography and citation styles in the guidelines is achieved by using the \pkg{biblatex-dw} package.
+% To use it, a few more options are passed to \pkg{biblatex}:
+% \begin{macrocode}
+\PassOptionsToPackage{
+% \end{macrocode}
+%
+% \DescribeOption[biblatex]{style}
+% The \optn{authortitle-dw} provided by the \pkg{biblatex-dw} package is probably the closest style to the one suggested in the guidelines.
+% \begin{macrocode}
+ style=authortitle-dw,
+% \end{macrocode}
+%
+% The following options are provided by the \pkg{biblatex-dw} package:
+%
+% \DescribeOption[biblatex]{firstfull}
+% Delivers a full citation for the first occurence of an entry.
+% \begin{macrocode}
+ firstfull=true,
+% \end{macrocode}
+%
+% \DescribeOption[biblatex]{addyear}
+% Adds the year of the publication after the title.
+% \begin{macrocode}
+ addyear=true
+}{biblatex}
+% \end{macrocode}
+%
+% After specifying the default options, we pass along the ones that might have been set in the class options.
+% \iffalse
+%% pass biblatex class options along
+% \fi
+% \begin{macrocode}
+\PassOptionsToPackage{\@rubkgi@biblatexOptions}{biblatex}
+% \end{macrocode}
+%
+% And finally the \pkg{biblatex} package is loaded.
+% \iffalse
+%% load biblatex
+% \fi
+% \begin{macrocode}
+\RequirePackage{biblatex}
+% \end{macrocode}
+%
+% \subsubsection{Document format}
+%
+% \DescribePackage{setspace}
% To achieve 1.5 times line spacing as required by the guidelines,
-% we simply load the package \pkg{setspace} with the \opt{onehalfspacing} option.
+% we simply load the package \pkg{setspace} with the \optn{onehalfspacing} option.
% \iffalse
%% Set 1.5 times line spacing
% \fi
@@ -121,7 +332,8 @@
\RequirePackage[onehalfspacing]{setspace}
% \end{macrocode}
%
-% \paragraph{Margins}
+% \DescribePackage{geometry}
+% Used to set page size and margins.
% The guidelines require 2cm top, left and bottom margins as well as a 4cm correction margin on the right side.
% Furthermore A4 paper is the standard page size here.
% \iffalse
@@ -134,22 +346,48 @@
]{geometry}
% \end{macrocode}
%
+% \DescribePackage{parskip}
+% \changes{v0.2.0}{2024-09-06}{Use parskip to avoid paragraph indentation}^^A
+% To avoid indentation at the start of paragraphs, the \pkg{parskip} package is loaded if the corresponding switch is set to true. See also \autoref{sec:implementation:class-options}.
+% \iffalse
+%% Avoid paragraph indentation
+% \fi
+% \begin{macrocode}
+\if@rubkgi@parskip
+ \RequirePackage{parskip}
+\fi
+% \end{macrocode}
+%
+% \subsubsection{Other useful packages}\label{sec:implementation:package-loading:others}
+%
+% \DescribePackage{hyperref}
+% \changes{v0.2.0}{2024-09-06}{Use hyperref for clickable links and references.}^^A
+% Makes links and references clickable.
% \iffalse
+%% Hyperref
+% \fi
+% \begin{macrocode}
+\RequirePackage{hyperref}
+% \end{macrocode}
+% By default, we configure it to not highlight clickable elements.
+% \begin{macrocode}
+\hypersetup{hidelinks=true}
+% \end{macrocode}
+% \iffalse
+
%</class>
%<*example>
% \fi
+% \clearpage
%
% \section{Example}\label{sec:example}
%
% To further exemplify the use of this class,
-% we create an example .tex file.
-% The full \texttt{rub-kunstgeschichte-example.tex} and the corresponding \texttt{rub-kunstgeschichte-example.pdf} are available on GitHub.^^A
+% we create an example \filenm{.tex} file.
+% The full \filenm{rub-kunstgeschichte-example.tex} and the corresponding \PDF{} are available on GitHub.^^A
% \footnote{\url{https://github.com/rub-kgi/rub-kunstgeschichte-latex/releases}}
%
-% Let's examine the contents of this example .tex file step by step
-% to highlight features of this class that were used.
-%
-% First, the \cls{rub-kunstgeschichte} class is loaded
+% First, the \pkg{rub-kunstgeschichte} class is loaded
% \iffalse
%% Load the rub-kunstgeschichte class
% \fi
@@ -160,33 +398,142 @@
% \fi
%
-% and then the information needed to typeset a title is given:
+% followed by the information that is needed to typeset a title:
% \begin{macrocode}
\title{Example usage of the \textsf{rub-kunstgeschichte} class}
\author{Joran Schneyer}
% \end{macrocode}
%
-% Naturally, we begin the document environment and typeset the title
+% For citations, the bibtex entries are usually written to a seperate \filenm{.bib} file.
+% For the sake of this example we keep everything in one \filenm{.tex} file and use the \env{filecontents} environment instead.
+% \iffalse
+
+%% bibliography file (usually you would put this in a seperate .bib file)
+% \fi
+% \begin{macrocode}
+\begin{filecontents}{rub-kunstgeschichte-example.bib}
+@article{exampleArticle,
+ author = {Maxi Mustermann},
+ title = {A very interesting article},
+ year = {2001},
+ journal = {Important example journal}
+}
+@book{exampleBook,
+ author = {John Smith},
+ title = {A long example book},
+ year = {2024}
+}
+@online{exampleWebsite,
+ author = {{Example consortium}},
+ title = {The truth about example documents},
+ year = {2020},
+ note = {Internet forum article},
+ url = {https://example.com},
+ urldate = {2100-04-01}
+}
+@manual{biblatexDocs,
+ author = {Philip Kime and Moritz Wemheuer and Philipp Lehman},
+ title = {The biblatex Package},
+ subtitle = {Programmable Bibliographies and Citations},
+ year = {2024},
+ url = {https://ctan.org/pkg/biblatex},
+ urldate = {2024-06-25}
+}
+@online{biblatexCheatsheet,
+ title = {Biblatex Cheat Sheet},
+ author = {Clea F. Rees},
+ year = {2017},
+ url = {https://ctan.org/pkg/biblatex-cheatsheet},
+ urldate = {2024-06-25}
+}
+\end{filecontents}
+% \end{macrocode}
+% \iffalse
+
+% \fi
+% After that, we need to load the bibliography to use it with biblatex.
+% \begin{macrocode}
+\addbibresource{rub-kunstgeschichte-example.bib}
+% \end{macrocode}
+%
+% Having finished the preamble, we begin the document, typeset the title and include a table of contents.
% \begin{macrocode}
\begin{document}
\maketitle
+ \tableofcontents
% \end{macrocode}
+% \iffalse
+
+% \fi
%
-% Next we need some text to show some features.
-% The text in the example itself will explain the features used.
+% Next we add different sections that explain common usage and some features of this class.
% \begin{macrocode}
- Here is some text.
- Note, how the typeset text has 12pt font size as specified
- and there is a 1.5 times line-spacing present.
+ \section{Introduction}
+ The \textsf{rub-kunstgeschichte} class aims to implement
+ the guidelines on scientific writing of the art history institute
+ ``KGI'' (\textit{Kunstgeschichtliches Institut})
+ at Ruhr University Bochum.
+
+ This example document showcases a typical use
+ of the \textsf{rub-kunstgeschichte} class.
+ Just by using the class, the page is already formatted
+ so that the typeset text has 12pt font size,
+ there is a 1.5 times line-spacing present
+ and the page size is A4 with 2cm margins at top, left and bottom,
+ as well as a 4cm margin on the right.
+
+ Also, paragraphs don't have an indentation
+ in the first line by default,
+ contrary to typical \LaTeX{} documents.
+ Furthermore the \texttt{hyperref} package
+ is automatically loaded to enable clickable
+ links and references.
+
+ \section{How to cite sources}
+ This class automatically loads the \texttt{biblatex} package
+ for sophisticated bibliography and citations.
+ The class also sets some options by default
+ that make \texttt{biblatex} behave closer to the
+ suggested citation style in the guidelines of the institute.
+
+ You can cite sources using the \verb|\autocite| command,
+ which is configured by this class to use footnotes
+ \autocite{exampleArticle}.
+ Page numbers can be added in the optional argument
+ \autocite[394]{exampleBook}
+ and citation signals in a second one
+ that comes before the one for page numbers
+ \autocite[see][]{exampleWebsite}.
+ You can even cite multiple sources at once
+ using the \verb|\autocites| command
+ \autocites[111]{exampleBook}[see also][13]{exampleArticle}.
+
+ For more information refer to the documentation
+ of the \texttt{biblatex} package
+ \autocite{biblatexDocs}
+ or the biblatex cheatsheet
+ \autocite{biblatexCheatsheet}.
+
+ At the end of the document we can include a bibliography
+ containing all cited sources with \verb|\printbibliography|.
+% \end{macrocode}
+% \iffalse
+
+% \fi
+%
+% As suggested in the example document itself, we include the bibliography.
+% \begin{macrocode}
+ \printbibliography
% \end{macrocode}
%
% Finally we end the document environment
% \begin{macrocode}
\end{document}
% \end{macrocode}
+% \clearpage
% \iffalse
%</example>
% \fi
%
-% \Finale \ No newline at end of file
+% \Finale
diff --git a/macros/latex/contrib/rub-kunstgeschichte/rub-kunstgeschichte.pdf b/macros/latex/contrib/rub-kunstgeschichte/rub-kunstgeschichte.pdf
index 98614bb733..e62e392a4b 100644
--- a/macros/latex/contrib/rub-kunstgeschichte/rub-kunstgeschichte.pdf
+++ b/macros/latex/contrib/rub-kunstgeschichte/rub-kunstgeschichte.pdf
Binary files differ
diff --git a/macros/latex/contrib/scrhack/LICENSE.md b/macros/latex/contrib/scrhack/LICENSE.md
new file mode 100644
index 0000000000..1863f2f61a
--- /dev/null
+++ b/macros/latex/contrib/scrhack/LICENSE.md
@@ -0,0 +1,19 @@
+----------------------------------------------------------------------------
+
+This work may be distributed and/or modified under the conditions of the
+LaTeX Project Public License, version 1.3c of the license. The latest
+version of this license is in http://www.latex-project.org/lppl.txt and
+version 1.3c or later is part of all distributions of LaTeX 2005/12/01
+or later. This work has the LPPL maintenance status “maintained”.
+The current maintainer and author of this work is Markus Kohm.
+
+----------------------------------------------------------------------------
+
+Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz
+in der Version 1.3c, verteilt und/oder verändert werden. Die aktuelle
+Version dieser Lizenz ist http://www.latex-project.org/lppl.txt und
+Version 1.3c oder später ist Teil aller Verteilungen von LaTeX 2005/12/01
+oder später. Dieses Werk hat den LPPL-Verwaltungs-Status „maintained”.
+Der aktuelle Verwalter und Autor dieses Werks ist Markus Kohm.
+
+----------------------------------------------------------------------------
diff --git a/macros/latex/contrib/scrhack/README.md b/macros/latex/contrib/scrhack/README.md
new file mode 100644
index 0000000000..b85195ab54
--- /dev/null
+++ b/macros/latex/contrib/scrhack/README.md
@@ -0,0 +1,207 @@
+# Package `scrhack`
+
+Copyright © 2008–2024 Markus Kohm
+
+Release: 2024-09-04 v3.42
+
+License: LPPL 1.3c
+
+KOMA presents the compatibility package to emulate the former
+[KOMA-Script](https://www.ctan.org/pkg/koma-script) package `scrhack` as part
+of the *third-party enhancements* project.
+
+------------------------------------------------------------------------------
+
+This work may be distributed and/or modified under the conditions of
+the LaTeX Project Public License, version 1.3c of the license.
+The latest version of this license is in
+ http://www.latex-project.org/lppl.txt
+and version 1.3c 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 and author of this work is Markus Kohm.
+
+------------------------------------------------------------------------------
+
+# Abstract
+
+For several years
+[KOMA-Script](https://www.sourceforge.net/project/koma-script) provided a
+package `scrhack`, that has been made not only to improve the compatibility of
+third-party packages with [KOMA-Script](https://www.ctan.org/pkg/koma-script)
+classes, but also to generally improve third-party packages. The package
+consisted not only in the package file `scrhack.sty` but also in several so
+called hacks as separate files with extension `.hak`. In the course of
+splitting off former [KOMA-Script](https://www.ctan.org/pkg/koma-script)
+packages from the [KOMA-Script](https://www.ctan.org/pkg/koma-script)
+collection, it was decided to create independent packages from the individual
+hacks. These new independent packages then serve as replacements for the
+original packages they were intended to improve. In addition, to preserve the
+functionality of loading the enhancements only when the corresponding original
+package is loaded, a new `scrhack` was created to do just that.
+
+# Installation for Users
+
+If you are a user, you should wait until all the packages of the third-party
+enhancement project have been added to your preferred TeX distribution. Then
+you can use the package manager of your TeX distribution to install all the
+packages at once.
+
+Note: If you have installed a
+ [KOMA-Script](https://www.ctan.org/pkg/koma-script) before version 3.42,
+ you should also update
+ [KOMA-Script](https://www.ctan.org/pkg/koma-script) using the package
+ manager of your TeX distribution as soon as such an update is
+ availiabe. Otherwise it could happen, that the old integrated `scrhack`
+ of [KOMA-Script](https://www.ctan.org/pkg/koma-script) is used instead
+ of the new installed version. On the one hand, KOMA-Script 3.41 works
+ with both the integrated `scrhack` and the new standalone `scrhack`. On
+ the other hand, KOMA-Script from version 3.42 does not provide an
+ integrated `scrhack`. So installing the new standalone `scrhack` before
+ or at least with KOMA-Script version 3.42 is the best option.
+
+# Unpacking for Distributors
+
+Distributors should download [the distribution from
+CTAN](https://www.ctan.org/pkg/scrhack). This consists in:
+
+* `scrhack.dtx`
+* `scrhack-2023-07-07.dtx`
+* `README.md`
+* `LICENSE.md`
+* `scrhack.pdf`
+* `scrhack-2023-07-07.pdf`
+
+If distributors also want to distribute `scrhack.sty`,
+`scrhack-2023-07-07.sty`, `float.hak`, `floatrow.hak`, `hyperref.hak`,
+`listings.hak`, `lscape.hak`, `nomencl.hak`, `setspace.hak`, and
+`standardsectioning.hak` they can unpack these using:
+
+ tex scrhack.dtx
+ tex scrhack-2023-07-07.dtx
+
+Note, that you have to use `tex` not `latex`, `pdflatex`, `xelatex` or
+`lualatex`!
+
+Note also, that a legal distribution consists at least in:
+
+* `scrhack.dtx`
+* `scrhack-2023-07-07.dtx`
+* `README.md`
+
+The following files are optionally, but must not be distributed without the
+previous ones:
+
+* `LICENSE.md`
+* `scrhack.sty`
+* `scrhack.pdf`
+* `scrhack-2023-07-07.sty`
+* `scrhack-2023-07-07.pdf`
+* `float.hak`
+* `floatrow.hak`
+* `hyperref.hak`
+* `listings.hak`
+* `lscape.hak`
+* `nomencl.hak`
+* `setspace.hak`
+* `standardsectioning.hak`
+
+
+# Unpacking and Installation for Developers
+
+Developers who want the current developer version of the code to be installed
+for testing, should clone [the `third-party-enhancements`
+repository](https://github.com/komascript/third-party-enhancements), e.g.,
+using
+
+ git clone https://github.com/komascript/third-party-enhancements.git
+
+You can than either unpack and install all the third-party enhancements using:
+
+ l3build install --full
+
+from within the main directory of the cloned respository. For installation of
+`scrhack` only you could run the same command from within the
+`scrhack` subdirectory. For installation without the manual omit
+option `--full`, but this is not recommended for developers.
+
+Note: Installation of `scrhack` does make sense only if all other packages of
+ the third-party enhancement project are also installed. The new
+ `scrhack` does not work without these packages.
+
+Note: If you have already an installation of
+ [KOMA-Script](https://www.ctan.org/pkg/koma-script) before version 3.42
+ in the user's texmf tree (`TEXMFHOME`), kpathsearch will usually find
+ the old integrated version of `scrhack`. Therefore LaTeX also will use
+ that old integrated version of `scrhack`. To prioritize the new
+ standalone version of `scrhack`, you would either have to remove
+ [KOMA-Script](https://www.ctan.org/pkg/koma-script) from the user's
+ texmf tree or copy `scrhack.sty` to the working directory from within
+ you are running LaTeX. Instead of the
+ [KOMA-Script](https://www.ctan.org/pkg/koma-script) version before 3.42
+ you can, after removing that installation, also install a
+ [KOMA-Script](https://www.ctan.org/pkg/koma-script) version from 3.42,
+ e.g., [the current pre-release](https://komascript.de/current) or [the
+ developer version from
+ SourceForge](https://sourceforge.net/p/koma-script/code/HEAD/tree/trunk/).
+
+# How to get the Manual
+
+After installation you should get the user manual using:
+
+ texdoc scrhack
+
+See the manual of your TeX distribution for more information.
+
+Developers or distributors can also build the manual from the source using:
+
+ l3build doc
+
+# How to Contribute
+
+To become a contributor, e.g., do heavy testing. If you find an issue, please
+report it using [the issue
+tracker](https://github.com/komascript/third-party-enhancements/issues).
+
+You can also become a developer and, e.g., make new test files to the
+packages. See the [`l3build`](https://ctan.org/pkg/l3build) manual for more
+information about tests. If you've created a new test and think that it would
+be useful. Please either do a pull request or [add a new
+issue](https://github.com/komascript/third-party-enhancements/issues/new/choose)
+and include your test file.
+
+Another kind of contribution would be to contact an author of one of the
+third-party packages and convince her or him to integrate the code of the
+corresponding enhancement package from this project into her or his package.
+
+# How to Report Issues
+
+If you think you have found a bug (or another kind of issue) using
+`scrhack` you should use [the issue
+tracker](https://github.com/komascript/third-party-enhancements/issues). Please
+first search for similar issues already reported and maybe also already fixed
+and closed. Maybe the replies to such a similar report would help you too.
+
+If your issue is new, you should report it also using [the issue
+tracker](https://github.com/komascript/third-party-enhancements/issues). Please
+be kind, not only when writing the report but also when reading replies and
+commenting or answering. And please always add a minimal working example and
+usually the relevant parts of the `log`-file to your report. Please use the
+[markdown for
+code](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks)
+to add such files into the text of your report. The correct language
+identifier for LaTeX code would be `latex`. For `log`-files you won't need any
+language identifier. Usually you should not use attachments for code or
+`log`-files unless you've been asked to do so. And please note, reports should
+always be self-containing. External links often break and so the report become
+useles.
+
+# How to Say Thank You for my Work
+
+Hey, I'm doing this as a hobby. So no need to say thank you. But I'm a vain
+fop, so I'm certainly up for a quick thank you by email. On komascript.de you
+can find an [explanation of my wishes](https://komascript.de/wunschliste) if
+you want to give more. If you don't understand German, just click to links at
+that page.
diff --git a/macros/latex/contrib/scrhack/scrhack-2023-07-07.dtx b/macros/latex/contrib/scrhack/scrhack-2023-07-07.dtx
new file mode 100644
index 0000000000..332c388e62
--- /dev/null
+++ b/macros/latex/contrib/scrhack/scrhack-2023-07-07.dtx
@@ -0,0 +1,2057 @@
+% \iffalse meta-comment
+% ======================================================================
+% scrhack-2023-07-07.dtx
+% Copyright © 2008–2023 Markus Kohm
+%
+% This work is a KOMA-Script spin-off. For the original sources of
+% KOMA-Script's `scrhack.sty' see file `scrhack.dtx' in the KOMA-Script
+% sources at <https://sourceforge.net/p/koma-script/code/>.
+%
+% Development is taking place as part of `scrhack' at
+% <https://github.com/komascript/third-party-enhancements>. New issues
+% should be reported there as well as known issues can be found.
+%
+% This work may be distributed and/or modified under the conditions of
+% the LaTeX Project Public License, version 1.3c of the license.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.<3c or later is part of all distributions of LaTeX
+% version 2005/12/01 or later and of this work.
+%
+% This work has the LPPL maintenance status "author-maintained".
+%
+% The Current Maintainer and author of this work is Markus Kohm.
+%
+% This work consists of the file `scrhack.dtx',
+% `scrhack-2023-07-07,dtx', and `README.md'.
+%
+% The recommended way to install `scrhack' is to use
+% the package manager of your TeX distribution.
+% ======================================================================
+%
+%<package&identify>%%% using: package,identify
+%<package&option>%%% using: package,option
+%<package&body>%%% using: package,body
+%<package&identity>\NeedsTeXFormat{LaTeX2e}[1995/06/01]
+%<*dtx>
+\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
+\begingroup
+ \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}}
+ \filedate$Date: 2023-06-28 10:28:26 +0200 (Mi, 28 Jun 2023) $
+ \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
+ \filerevision$Revision: 4063 $
+\endgroup
+\ProvidesFile{scrhack-2023-07-07.dtx}[\filedate\space\filerevision\space
+%</dtx>
+%<package&identify>\ProvidesPackage{scrhack}[%
+%<hyperref&identify>\ProvidesFile{hyperref.hak}[%
+%<float&identify>\ProvidesFile{float.hak}[%
+%<floatrow&identify>\ProvidesFile{floatrow.hak}[%
+%<listings&identify>\ProvidesFile{listings.hak}[%
+%<setspace&identify>\ProvidesFile{setspace.hak}[%
+%<lscape&identify>\ProvidesFile{lscape.hak}[%
+%<nomencl&identify>\ProvidesFile{nomencl.hak}[%
+%<standardsections&identify>\ProvidesFile{standardsections.hak}[%
+%<*dtx|identify>
+ 2024-04-17 v3.42
+%<*dtx>
+ source of
+%</dtx>
+%<*dtx|package>
+ legacy version of package scrhack%
+%</dtx|package>
+%<*hack>
+%<hack> scrhack part
+%<!standardsections> (hacking package
+%<hyperref&identify> hyperref)%
+%<float&identify> float)%
+%<floatrow&identify> floatrow)%
+%<listings&identify> listings)%
+%<setspace&identify> setspace)%
+%<lscape&identify> lscape)%
+%<nomencl&identify> nomencl)%
+%<standardsections&identify> (defining standard LaTeX class section headings)%
+%</hack>
+]
+%</dtx|identify>
+%<*dtx>
+\ifx\documentclass\undefined
+ \input docstrip.tex
+ \generate{%
+ \file{scrhack-2023-07-07.sty}{%
+ \from{scrhack-2023-07-07.dtx}{package,identify}%
+ \from{scrhack-2023-07-07.dtx}{package,option}%
+ \from{scrhack-2023-07-07.dtx}{package,body}%
+ }%
+ \file{hyperref.hak}{%
+ \from{scrhack-2023-07-07.dtx}{hack,hyperref,identify}%
+ \from{scrhack-2023-07-07.dtx}{hack,hyperref,body}%
+ }%
+ \file{float.hak}{%
+ \from{scrhack-2023-07-07.dtx}{hack,float,identify}%
+ \from{scrhack-2023-07-07.dtx}{hack,float,body}%
+ }%
+ \file{floatrow.hak}{%
+ \from{scrhack-2023-07-07.dtx}{hack,floatrow,identify}%
+ \from{scrhack-2023-07-07.dtx}{hack,floatrow,body}%
+ }%
+ \file{listings.hak}{%
+ \from{scrhack-2023-07-07.dtx}{hack,listings,identify}%
+ \from{scrhack-2023-07-07.dtx}{hack,listings,body}%
+ }%
+ \file{setspace.hak}{%
+ \from{scrhack-2023-07-07.dtx}{hack,setspace,identify}%
+ \from{scrhack-2023-07-07.dtx}{hack,setspace,body}%
+ }%
+ \file{lscape.hak}{%
+ \from{scrhack-2023-07-07.dtx}{hack,lscape,identify}%
+ \from{scrhack-2023-07-07.dtx}{hack,lscape,body}%
+ }%
+ \file{nomencl.hak}{%
+ \from{scrhack-2023-07-07.dtx}{hack,nomencl,identify}%
+ \from{scrhack-2023-07-07.dtx}{hack,nomencl,body}%
+ }%
+ \file{standardsections.hak}{%
+ \from{scrhack-2023-07-07.dtx}{hack,standardsections,identify}%
+ \from{scrhack-2023-07-07.dtx}{hack,standardsections,body}%
+ }%
+ }
+\else
+ \let\endbatchfile\relax
+\fi
+\endbatchfile
+\documentclass[USenglish]{koma-script-source-doc}
+\usepackage{babel}
+\setcounter{StandardModuleDepth}{2}
+\begin{document}
+ \DocInput{scrhack-2023-07-07.dtx}
+\end{document}
+%</dtx>
+%\fi
+%
+% \changes{v3.03}{2009/03/12}{first version ever}
+% \changes{v3.36}{2022/02/08}{switch over from \cls*{scrdoc} to
+% \cls*{koma-script-source-doc}}
+% \changes{v3.36}{2022/02/08}{require package \pkg*{scrlogo} instead of
+% defining \cs{KOMAScript}}
+% \changes{v3.36}{2022/02/08}{whole implementation documentation in English}
+% \changes{v3.40}{2023/04/17}{guide names changed}
+%
+% \GetFileInfo{scrhack.dtx}
+% \title{Legacy Version of Package \pkg*{scrhack}}
+% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}}
+% \date{2023-07-15}
+% \maketitle
+% \tableofcontents
+%
+% \section{User Manual}
+%
+% You can find the user manual of the legacy version in
+% \href{file:scrhack.pdf}{the manual of \pkg*{scrhack}}.
+%
+% \MaybeStop{\PrintIndex}
+%
+% \section{Implementation of the Legacy Version of
+% \texorpdfstring{\pkg*{scrhack}}{scrhack}}
+%
+% \changes{v3.04b}{2009/08/05}{order of commands/macros and options changed}
+%
+% \subsection{Options}
+%
+% The package uses \cs{KOMAoptions} of \pkg*{scrkbase} and needs at least the
+% one of \KOMAScript{} v3.39:
+% \begin{macrocode}
+%<*package&option>
+\RequirePackage{scrkbase}[2022-11-11]
+\@ifpackagelater{scrkbase}{2023-07-14}{%
+ \PackageInfo{scrhack}{KOMA-Script >= 3.42 detected.\MessageBreak
+ In this case you should not use this legacy version of\MessageBreak
+ scrhack, but should be able to use the current version\MessageBreak
+ or even replace loading scrhack by loading really\MessageBreak
+ needed third-party patches, e.g., floatbytocbasic.\MessageBreak
+ But you are the boss ..}%
+}{%
+ \@ifpackagelater{scrkbase}{2022-11-11}{%
+ \PackageWarningNoLine{scrhack}{KOMA-Script < 3.42 detected.\MessageBreak
+ In this case the original scrhack of that version\MessageBreak
+ should also be installed and used instead of this\MessageBreak
+ legacy package}%
+ }{%
+ \PackageError{scrhack}{incompatible KOMA-Script < v3.39 detected}{%
+ This error is fatal!\MessageBreak
+ Loading of scrhack will be aborted!}%
+ \expandafter\let\csname ver@scrhack.sty\endcsname\undefined
+ \endinput
+ }%
+}
+%</package&option>
+% \end{macrocode}
+% The options allow the selection of the used manipulations of other
+% packages. But all these options are valid only until both \pkg*{scrhack} and
+% the other package has been loaded. Later settings are invalid.
+%
+%
+% \subsection{Used Macros and Commands}
+% \label{sec:macros}
+% \begin{macrocode}
+%<*package&body>
+% \end{macrocode}
+%
+% \begin{macro}{\scr@ifexpected}
+% Mentioned to do (re)definitions only, if local execution of code does not
+% change a command. Concrete, if (local) execution of \marg{test code} of
+% \begin{quote}
+% \cs{scr@ifexpected}\marg{command}\marg{test code}\marg{then
+% code}\marg{else code}
+% \end{quote}
+% would not result in a change of \cs{\meta{command}}, the \marg{then code}
+% will be executed, otherwise the \marg{else code}.
+% \begin{description}\item[Note:] \meta{test code} must not have any global
+% side effect!\end{description}
+% \begin{macrocode}
+\newcommand{\scr@ifexpected}[2]{%
+ \begingroup
+ \let\@tempa#1
+ #2
+ \ifx\@tempa#1
+ \aftergroup\@firstoftwo
+ \else
+ \aftergroup\@secondoftwo
+ \fi
+ \endgroup
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\scr@hack@load}
+% Conditionally loading of a hack file.
+% \begin{quote}
+% \cs{scr@hack@load}\marg{extension}\marg{basename}\marg{hack}%
+% \marg{true code}\marg{false code}
+% \end{quote}
+% The first two arguments \marg{} and \marg{extension} and \marg{basename} are
+% same to the internal\LaTeX{} kernel command \cs{@ifl@aded}. With \LaTeX{}
+% from 2021/11/15 we even could use \cs{@ifl@aded} for the test, because it is
+% not restricted to the preamble any more. But because it is restricted with
+% older \LaTeX{} kernels, we test the definition of
+% \cs{ver@}\meta{basename}\texttt{.}\meta{extension}. If it is defined, we
+% also test the definition of \cs{ver@}\meta{basename}\texttt{.hak}. If this
+% is not defined, \file{\meta{hack}.hak} is loaded and \meta{true code} is
+% executed. Otherwise \meta{false code} is executed. This means: A hack file
+% is only loaded, if a class or package (or other file with version) has
+% already been loaded, but the hack file has not already been loaded.
+% \begin{macrocode}
+\newcommand*{\scr@hack@load}[2]{%
+ \expandafter\ifx\csname ver@#2.#1\endcsname\relax
+ \expandafter\@secondoftwo
+ \else
+% \end{macrocode}
+% Load a hack only once.
+% \begin{macrocode}
+ \expandafter\ifx\csname ver@#2.hak\endcsname\relax
+ \expandafter\expandafter\expandafter\@firstoftwo
+ \else
+ \expandafter\expandafter\expandafter\@secondoftwo
+ \fi
+ \fi
+ {%
+ \PackageInfo{scrhack}{loading #2 hack}%
+ \edef\reserved@a{%
+ \noexpand\makeatletter\noexpand\input{#2.hak}%
+ \noexpand\catcode`\noexpand\@\the\catcode`\@\relax
+ }\reserved@a
+ }{%
+ \PackageInfo{scrhack}{ignorring #2 hack}%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%</package&body>
+% \end{macrocode}
+%
+% \subsection{The \texorpdfstring{\pkg*{hyperref}}{hyperref} hack}
+%
+% Package \pkg{hyperref} places the anchor of the star variant of a heading
+% after the heading, but the anchor of the normal variant before the heading
+% even if the heading is not numbered because of the value of
+% \cnt{secnumdepth}. The hack changes this to more consistent placing always
+% before the heading.
+%
+% \begin{option}{hyperref}
+% \changes{v3.12}{2013/03/05}{using \cs{FamilyKeyStateProcessed}}
+% \changes{v3.17}{2015/03/09}{defaults by \cs{KOMAExecuteOptions}}
+% \begin{macrocode}
+%<*package&option>
+\KOMA@ifkey{hyperref}{@scrhack@hyperref}%
+\KOMAExecuteOptions{hyperref=true}%
+%</package&option>
+% \end{macrocode}
+% \changes{v3.04b}{2009/11/09}{loading \pkg{hyperref} hack earlier}
+% \changes{v3.17}{2015/03/09}{auto deactivation for newer versions of
+% \pkg{hyperref}}
+% \changes{v3.18}{2015/05/22}{newer versions of \KOMAScript{} classes also
+% deactivate the the hack}
+% \changes{v3.39}{2022/11/11}{initial dot in member argument of \cs{KOMA@key}
+% and \cs{KOMAExecuteOptions} removed}
+% This is a little bit tricky, because \pkg{hyperref} loads the driver file
+% via \cs{AtEndOfPackage} and the hack cannot be loaded before loading the
+% driver file. Using \cs{AfterPackage*} would not be good enough therefore,
+% because it would load the hack before the driver file. But using
+% \cs{AtEndOfPackage} inside \cs{AfterPackage*} should delay the loading
+% enough. This also works, if \pkg{hyperref} has already been loaded. In this
+% case the code will be executed at the end of \pkg*{scrhack} instead of
+% \pkg{hyperref}. This is no problem.
+% \begin{macrocode}
+%<*package&body>
+\BeforePackage{hyperref}{%
+ \scr@ifundefinedorrelax{hy@insteadofrefstepcounter}{}{%
+ \PackageInfo{scrhack}{hyperref hack deactivated because of\MessageBreak
+ detection of KOMA-Script class, that doesn't\MessageBreak
+ need that hack,}%
+ \KOMAExecuteOptions[scrhack.sty]{hyperref=false}%
+ }%
+}
+\AfterPackage*{hyperref}{%
+ \if@scrhack@hyperref
+ \@ifpackagelater{hyperref}{2009/11/24}{%
+ \PackageInfo{scrhack}{hyperref hack deactivated because of\MessageBreak
+ detection of hyperref version, that doesn't\MessageBreak
+ need that hack,}%
+ \KOMAExecuteOptions[scrhack.sty]{hyperref=false}%
+ }{%
+ \AtEndOfPackage{%
+ \KOMA@key[scrhack.sty]{hyperref}[true]{%
+ \PackageWarning{scrhack}{option `hyperref=#1' ignored}%
+ \FamilyKeyStateProcessed
+ }%
+ \if@scrhack@hyperref\scr@hack@load\@pkgextension{hyperref}\fi
+ }%
+ }%
+ \fi
+}
+%</package&body>
+% \end{macrocode}
+% \end{option}
+%
+%
+% \begin{macro}{\@schapter,\@spart,\@ssect}
+% We do not hack \pkg{hyperref} itself, but the driver files. After loading
+% \pkg{hyperref} the driver file is also loaded. Moreover, all driver files
+% that re-define these commands have to be patched also. So the patch is
+% related to the loading of \pkg{hyperref} instead of every single driver
+% file. This have already been tested by \cs{scr@hack@load}. So we just have
+% to test, whether the definition of these commands are the expected one.
+% derzeit den erwarteten Inhalt haben.
+% \begin{macrocode}
+%<*hyperref&body>
+\scr@ifexpected\@schapter{%
+ \def\@schapter#1{%
+ \H@old@schapter{#1}%
+ \begingroup
+ \let\@mkboth\@gobbletwo
+ \Hy@GlobalStepCount\Hy@linkcounter
+ \xdef\@currentHref{\Hy@chapapp*.\the\Hy@linkcounter}%
+ \Hy@raisedlink{%
+ \hyper@anchorstart{\@currentHref}\hyper@anchorend
+ }%
+ \endgroup
+ }%
+}{%
+ \PackageInfo{scrhack}{redefining \string\@schapter}%
+ \def\@schapter#1{%
+ \begingroup
+ \let\@mkboth\@gobbletwo
+ \Hy@GlobalStepCount\Hy@linkcounter
+ \xdef\@currentHref{\Hy@chapapp*.\the\Hy@linkcounter}%
+ \Hy@raisedlink{%
+ \hyper@anchorstart{\@currentHref}\hyper@anchorend
+ }%
+ \endgroup
+ \H@old@schapter{#1}%
+ }%
+}{%
+ \scr@ifexpected\@schapter{%
+ \def\@schapter#1{%
+ \begingroup
+ \let\@mkboth\@gobbletwo
+ \Hy@GlobalStepCount\Hy@linkcounter
+ \xdef\@currentHref{\Hy@chapapp*.\the\Hy@linkcounter}%
+ \Hy@raisedlink{%
+ \hyper@anchorstart{\@currentHref}\hyper@anchorend
+ }%
+ \endgroup
+ \H@old@schapter{#1}%
+ }%
+ }{}{%
+ \PackageWarningNoLine{scrhack}{unknown \string\@schapter\space
+ definition found!\MessageBreak
+ Maybe you are using a unsupported hyperref version}%
+ }%
+}
+\scr@ifexpected\@spart{%
+ \def\@spart#1{%
+ \H@old@spart{#1}%
+ \Hy@GlobalStepCount\Hy@linkcounter
+ \xdef\@currentHref{part*.\the\Hy@linkcounter}%
+ \Hy@raisedlink{%
+ \hyper@anchorstart{\@currentHref}\hyper@anchorend
+ }%
+ }%
+}{%
+ \PackageInfo{scrhack}{redefining \string\@spart}%
+ \def\@spart#1{%
+ \Hy@GlobalStepCount\Hy@linkcounter
+ \xdef\@currentHref{part*.\the\Hy@linkcounter}%
+ \Hy@raisedlink{%
+ \hyper@anchorstart{\@currentHref}\hyper@anchorend
+ }%
+ \H@old@spart{#1}%
+ }%
+}{%
+ \scr@ifexpected\@spart{%
+ \def\@spart#1{%
+ \Hy@GlobalStepCount\Hy@linkcounter
+ \xdef\@currentHref{part*.\the\Hy@linkcounter}%
+ \Hy@raisedlink{%
+ \hyper@anchorstart{\@currentHref}\hyper@anchorend
+ }%
+ \H@old@spart{#1}%
+ }%
+ }{}{%
+ \PackageWarningNoLine{scrhack}{unknown \string\@spart\space
+ definition found!\MessageBreak
+ Maybe you are using a unsupported hyperref version}%
+ }%
+}
+\scr@ifexpected\@ssect{%
+ \def\@ssect#1#2#3#4#5{%
+ \H@old@ssect{#1}{#2}{#3}{#4}{#5}%
+ \phantomsection
+ }%
+}{%
+ \PackageInfo{scrhack}{redefining \string\@ssect}%
+ \def\@ssect#1#2#3#4#5{%
+ \H@old@ssect{#1}{#2}{#3}{#4}{\phantomsection\ignorespaces#5}%
+ }%
+}{%
+ \scr@ifexpected\@ssect{%
+ \def\@ssect#1#2#3#4#5{%
+ \H@old@ssect{#1}{#2}{#3}{#4}{\phantomsection\ignorespaces#5}%
+ }%
+ }{}{%
+ \PackageWarningNoLine{scrhack}{unknown \string\@ssect\space
+ definition found!\MessageBreak
+ Maybe you are using a unsupported hyperref version}%
+ }%
+}
+%</hyperref&body>
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \subsection{The \texorpdfstring{\pkg*{floatrow}}{floatrow} hack}
+%
+% Package \pkg{floatrow} insists in using \cs{float@listhead} for the setting
+% of the headings. This is not recommended any longer since \KOMAScript~2.95
+% from July 2006! The \KOMAScript{} classes will remove the support for
+% this very limited approach. Recommended is the usage of \pkg*{tocbasic}. The
+% effort to do so, it very small and I do not understand, why package authors
+% are not willing to use it. Because the benefit would be a lot.
+%
+% This hack adds \pkg*{tocbasic} usage to \pkg{floatrow}. Nevertheless it is
+% more complicated than adding \pkg*{tocbasic} support into \pkg{floatrow}.
+%
+% \begin{option}{floatrow}
+% \changes{v3.12}{2013/03/05}{using \cs{FamilyKeyStateProcessed}}
+% \changes{v3.17}{2015/03/09}{using \cs{KOMAExecuteOptions}}
+% \changes{v3.34}{2021/06/03}{deactivation of the \pkg{float} hack}
+% \changes{v3.39}{2022/11/11}{initial dot in member argument of \cs{KOMA@key}
+% removed}
+% \begin{macrocode}
+%<*package&option>
+\KOMA@ifkey{floatrow}{@scrhack@floatrow}
+\KOMAExecuteOptions{floatrow=true}
+%</package&option>
+%<*package&body>
+\AfterPackage*{floatrow}{%
+ \KOMAoptions{float=false}%
+ \PackageInfo{scrhack}{option `float' deactivated}%
+ \KOMA@key[scrhack.sty]{floatrow}{%
+ \PackageWarning{scrhack}{option `floatrow' ignored}%
+ \FamilyKeyStateProcessed
+ }%
+ \if@scrhack@floatrow\scr@hack@load\@pkgextension{floatrow}\fi
+}
+%</package&body>
+% \end{macrocode}
+% \end{option}
+%
+%
+% \begin{command}{\DeclareNewFloatType,\listof}
+% \changes{v3.25}{2018/03/16}{using \cs{DeclareTOCStyleEntry}}
+% Command \cs{DeclareNewFloatType} is used to define a new float
+% environment. We have to add registration of the file extension (third
+% argument) with \pkg*{tocbasic}.
+% Command \cs{listof} outputs the list of the float environments. Here we
+% just use the corresponding macro of \pkg*{tocbasic}.
+% \begin{macro}{\float@addtolists}
+% The deprecated macro \cs{float@addtolists} is not needed any longer an will
+% be reset to the original definition.
+% \begin{macrocode}
+%<*floatrow&body>
+\scr@ifexpected{\DeclareNewFloatType}{%
+ \long\def\DeclareNewFloatType#1#2{\def\FB@captype{#1}%
+ \expandafter\edef\csname ftype@#1\endcsname{\the\c@float@type}%
+ \addtocounter{float@type}{\value{float@type}}%
+ \@namedef{#1name}{#1}\newcounter{#1}%
+ \expandafter\edef\csname fnum@#1\endcsname
+ {\expandafter\noexpand\csname #1name\endcsname\nobreakspace
+ \expandafter\noexpand\csname the#1\endcsname}%
+ \@namedef{the#1}{\arabic{#1}}\flnew@ext{lo#1}\@namedef{fps@#1}{tbp}%
+ \@namedef{l@#1}{\@dottedtocline{1}{1.5em}{2.3em}}%
+ \caption@setkeys[floatrow]{newfloat}{#2}\let\FR@tmp=\relax
+ \xdef\@tempa{\noexpand\flrow@types{\the\flrow@types \FR@tmp{#1}}}%
+ \@tempa}%
+}{%
+ \scr@ifexpected{\listof}{%
+ \def\listof#1#2{%
+ \@ifundefined{ext@#1}{\flrow@error{Unknown float style `#1'}}{%
+ \expandafter\providecommand\csname l@#1\endcsname
+ {\@dottedtocline{1}{1.5em}{2.3em}}%
+ \float@listhead{#2}%
+ \begingroup\setlength{\parskip}{\z@}%
+ \@starttoc{\@nameuse{ext@#1}}%
+ \endgroup}}%
+ }{%
+ \RequirePackage{tocbasic}%
+ \PackageInfo{scrhack}{redefining \string\DeclareNewFloatType}%
+% \end{macrocode}
+% \begin{description}
+% \item[Note:] It would be better to first test, if the new extension is
+% already in use like done at the \pkg{float} hack. But I don't know the
+% \pkg{floatrow} code good enough to make such a change!
+% \end{description}
+% \begin{macrocode}
+ \renewcommand\DeclareNewFloatType[2]{\def\FB@captype{#1}%
+ \expandafter\edef\csname ftype@#1\endcsname{\the\c@float@type}%
+ \addtocounter{float@type}{\value{float@type}}%
+ \@namedef{#1name}{#1}\newcounter{#1}%
+ \expandafter\edef\csname fnum@#1\endcsname
+ {\expandafter\noexpand\csname #1name\endcsname\nobreakspace
+ \expandafter\noexpand\csname the#1\endcsname}%
+ \@namedef{the#1}{\arabic{#1}}\flnew@ext{lo#1}\@namedef{fps@#1}{tbp}%
+ \DeclareTOCStyleEntry[level=1,numwidth=2.3em,indent=1.5em]{default}{#1}%
+ \caption@setkeys[floatrow]{newfloat}{#2}\let\FR@tmp=\relax
+ \xdef\@tempa{\noexpand\flrow@types{\the\flrow@types \FR@tmp{#1}}}%
+ \@tempa
+ \xdef\@tempa{\noexpand\addtotoclist[float]{\@nameuse{ext@\FB@captype}}%
+ \noexpand\setuptoc{\@nameuse{ext@\FB@captype}}{chapteratlist}%
+ }%
+ \@tempa
+ }%
+ \PackageInfo{scrhack}{redefining \string\listof}%
+ \renewcommand*\listof[2]{%
+ \@ifundefined{ext@#1}{\flrow@error{Unknown float style `#1'}}{%
+ \@ifundefined{l@#1}{\expandafter\let\csname l@#1\endcsname\l@figure
+ \@ifundefined{l@#1}{%
+ \DeclareTOCStyleEntry[level=1,numwidth=2.3em,indent=1.5em]
+ {default}{#1}%
+ }{}%
+ }{}%
+ \listoftoc[{#2}]{\csname ext@#1\endcsname}%
+ }%
+ }%
+ \scr@ifexpected{\float@addtolists}{%
+ \long\def\float@addtolists#1{%
+ \def\float@do##1{\addtocontents{##1}{#1}} \the\float@exts}%
+ }{%
+ \PackageInfo{scrhack}{undefining \string\float@addtolists}%
+ \let\float@addtolists\relax
+ }{%
+ \PackageWarningNoLine{scrhack}{unkown \string\float@addtolists\space
+ definition found!\MessageBreak
+ Maybe you are using a unsupported floatrow version}%
+ }%
+ }{%
+ \PackageWarningNoLine{scrhack}{unknown \string\listof\space
+ definition found!\MessageBreak
+ Maybe you are using a unsupported floatrow version}%
+ }%
+}{%
+ \PackageWarningNoLine{scrhack}{unknown \string\DeclareNewFloatType\space
+ definition found!\MessageBreak
+ Maybe you are using a unsupported floatrow version}%
+}
+%</floatrow&body>
+% \end{macrocode}
+% \end{macro}
+% \end{command}
+%
+%
+% \subsection{The \texorpdfstring{\pkg*{float}}{float} hack}
+%
+% Package \pkg{float} insists in using \cs{float@listhead} for the setting
+% of the headings. This is not recommended any longer since \KOMAScript~2.95
+% from July 2006! The \KOMAScript{} classes will remove the support for
+% this very limited approach. Recommended is the usage of \pkg*{tocbasic}. The
+% effort to do so, it very small and I do not understand, why package authors
+% are not willing to use it. Because the benefit would be a lot.
+%
+% This hack adds \pkg*{tocbasic} usage to \pkg{float}. Nevertheless it is
+% more complicated than adding \pkg*{tocbasic} support into \pkg{float}.
+%
+% \begin{option}{float}
+% \changes{v3.12}{2013/03/05}{using \cs{FamilyKeyStateProcessed}}
+% \changes{v3.17}{2015/03/09}{using \cs{KOMAExecuteOptions}}
+% \changes{v3.39}{2022/11/11}{initial dot in member argument of \cs{KOMA@key}
+% removed}
+% \begin{macrocode}
+%<*package&option>
+\KOMA@ifkey{float}{@scrhack@float}%
+\KOMAExecuteOptions{float=true}%
+%</package&option>
+%<*package&body>
+\AfterPackage*{float}{%
+ \KOMA@key[scrhack.sty]{float}{%
+ \PackageWarning{scrhack}{option `float' ignored}%
+ \FamilyKeyStateProcessed
+ }%
+ \if@scrhack@float\scr@hack@load\@pkgextension{float}\fi
+}
+%</package&body>
+% \end{macrocode}
+% \end{option}
+%
+%
+% \begin{command}{\newfloat}
+% \changes{v3.28}{2019/11/19}{\cs{ifattoclist} replaced by
+% \cs{Ifattoclist}}
+% \changes{v3.25}{2018/03/16}{using \cs{DeclareTOCStyleEntry}}
+% We have to add registration of the file extension (third argument of
+% \cs{newfloat}) with \pkg*{tocbasic}.
+% \begin{command}{\listof}
+% Command \cs{listof} outputs the list of the float environments. Here we
+% just use the corresponding macro of \pkg*{tocbasic}.
+% \begin{macro}{\float@addtolists}
+% The deprecated macro \cs{float@addtolists} is not needed any longer an will
+% be reset to the original definition.
+% \begin{macrocode}
+%<*float&body>
+\scr@ifexpected{\newfloat}{%
+ \long\def\newfloat#1#2#3{\@namedef{ext@#1}{#3}
+ \let\float@do=\relax
+ \xdef\@tempa{\noexpand\float@exts{\the\float@exts \float@do{#3}}}%
+ \@tempa
+ \floatplacement{#1}{#2}%
+ \@ifundefined{fname@#1}{\floatname{#1}{#1}}{}
+ \expandafter\edef\csname ftype@#1\endcsname{\value{float@type}}%
+ \addtocounter{float@type}{\value{float@type}}
+ \restylefloat{#1}%
+ \expandafter\edef\csname fnum@#1\endcsname%
+ {\expandafter\noexpand\csname fname@#1\endcsname{}
+ \expandafter\noexpand\csname the#1\endcsname}
+ \@ifnextchar[%]
+ {\float@newx{#1}}%
+ {\@ifundefined{c@#1}{\newcounter{#1}\@namedef{the#1}{\arabic{#1}}}%
+ {}}}%
+}{%
+ \scr@ifexpected{\listof}{%
+ \def\listof#1#2{%
+ \@ifundefined{ext@#1}{\float@error{#1}}{%
+ \@namedef{l@#1}{\@dottedtocline{1}{1.5em}{2.3em}}%
+ \float@listhead{#2}%
+ \begingroup\setlength{\parskip}{\z@}%
+ \@starttoc{\@nameuse{ext@#1}}%
+ \endgroup}}%
+ }{%
+ \RequirePackage{tocbasic}%
+ \PackageInfo{scrhack}{redefining \string\newfloat}%
+ \renewcommand\newfloat[3]{%
+ \Ifattoclist{#3}{%
+ \PackageError{scrhack}{extension `#3' already in use}{%
+ Each extension may be used only once.\MessageBreak
+ You, the class, or another package already uses extension
+ `#3'.\MessageBreak
+ \string\newfloat\space command will be ignored!}%
+ }{%
+ \addtotoclist[float]{#3}%
+ \setuptoc{#3}{chapteratlist}%
+ \@namedef{ext@#1}{#3}%
+ \let\float@do=\relax
+ \xdef\@tempa{\noexpand\float@exts{\the\float@exts \float@do{#3}}}%
+ \@tempa
+ \floatplacement{#1}{#2}%
+ \@ifundefined{fname@#1}{\floatname{#1}{#1}}{}%
+ \expandafter\edef\csname ftype@#1\endcsname{\value{float@type}}%
+ \addtocounter{float@type}{\value{float@type}}
+ \restylefloat{#1}%
+ \expandafter\edef\csname fnum@#1\endcsname%
+ {\expandafter\noexpand\csname fname@#1\endcsname{}
+ \expandafter\noexpand\csname the#1\endcsname}%
+ \@ifnextchar[%]
+ {\float@newx{#1}}%
+ {\@ifundefined{c@#1}{\newcounter{#1}\@namedef{the#1}{\arabic{#1}}}%
+ {}}}%
+ }%
+ \PackageInfo{scrhack}{redefining \string\listof}%
+ \renewcommand*\listof[2]{%
+ \@ifundefined{ext@#1}{\float@error{#1}}{%
+ \@ifundefined{l@#1}{\expandafter\let\csname l@#1\endcsname\l@figure
+ \@ifundefined{l@#1}{%
+ \DeclareTOCStyleEntry[level=1,numwidth=2.3em,indent=1.5em]
+ {default}{#1}%
+ }{}%
+ }{}%
+ \listoftoc[{#2}]{\csname ext@#1\endcsname}%
+ }%
+ }%
+ \scr@ifexpected{\float@addtolists}{%
+ \long\def\float@addtolists#1{%
+ \def\float@do##1{\addtocontents{##1}{#1}} \the\float@exts}%
+ }{%
+ \PackageInfo{scrhack}{undefining \string\float@addtolists}%
+ \let\float@addtolists\relax
+ }{%
+ \PackageWarningNoLine{scrhack}{unkown \string\float@addtolists\space
+ definition found!\MessageBreak
+ Maybe you are using a unsupported float version}%
+ }%
+ }{%
+ \PackageWarningNoLine{scrhack}{unknown \string\listof\space
+ definition found!\MessageBreak
+ Maybe you are using a unsupported float version}%
+ }%
+}{%
+ \PackageWarningNoLine{scrhack}{unknown \string\newfloat\space
+ definition found!\MessageBreak
+ Maybe you are using a unsupported float version}%
+}
+%</float&body>
+% \end{macrocode}
+% \end{macro}
+% \end{command}
+% \end{command}
+%
+%
+% \subsection{The \texorpdfstring{\pkg*{listings}}{listings} hack}
+%
+% Package \pkg{listing} insists in using \cs{float@listhead} for the setting
+% of the headings. This is not recommended any longer since \KOMAScript~2.95
+% from July 2006! The \KOMAScript{} classes will remove the support for
+% this very limited approach. Recommended is the usage of \pkg*{tocbasic}. The
+% effort to do so, it very small and I do not understand, why package authors
+% are not willing to use it. Because the benefit would be a lot.
+%
+% This hack adds \pkg*{tocbasic} usage to old versions of
+% \pkg{listings}. Nevertheless it is more complicated than adding
+% \pkg*{tocbasic} support into \pkg{listings}.
+%
+% \begin{option}{listings}
+% \changes{v3.12}{2013/03/05}{using \cs{FamilyKeyStateProcessed}}
+% \changes{v3.17}{2015/03/09}{using \cs{KOMAExecuteOptions}}
+% \changes{v3.39}{2022/11/11}{initial dot in member argument of \cs{KOMA@key}
+% removed}
+% \changes{v3.42}{2024/04/17}{automatic deactivation for new \pkg{listings}}
+% Note: The deactivation of the hack for new version of \pkg{listings} cannot
+% be done comparing the \pkg{listings} version, because \pkg{listings} version
+% 1.10 uses \cs{AtEndOfPackage} for \cs{ProvidesPackage} and therefore the
+% version is not defined when the after package hook is executed. So we test
+% instead the \pkg{lstmisc} version.
+% \begin{macrocode}
+%<*package&option>
+\KOMA@ifkey{listings}{@scrhack@listings}
+\KOMAExecuteOptions{listings=true}
+%</package&option>
+%<*package&body>
+\AfterPackage*{listings}{%
+ \@ifpackagelater{lstmisc}{2024/02/15}{%
+ \PackageInfo{scrhack}{listings hack deactivated because of\MessageBreak
+ detection of listings version, that doesn't\MessageBreak
+ need that hack,}%
+ \KOMAExecuteOptions[scrhack.sty]{listings=false}%
+ }{%
+ \if@scrhack@listings\scr@hack@load\@pkgextension{listings}\fi
+ }%
+ \KOMA@key[scrhack.sty]{listings}[true]{%
+ \PackageWarning{scrhack}{option `listings=#1' ignored}%
+ \FamilyKeyStateProcessed
+ }%
+}
+%</package&body>
+% \end{macrocode}
+% \end{option}
+%
+%
+% \begin{macro}{\scr@do@hack@listings}
+% \changes{v3.41}{2023/06/28}{patching \cs{lst@MakeCaption} to use
+% \cs{ext@lstlisting}}
+% \begin{command}{\lstlistoflistings}
+% \cs{scr@do@hack@listings} patches \pkg{listings} to use \pkg*{tocbasic} for
+% the whole output of the list of listings. This adds several new features to
+% \pkg{listings}.
+% \begin{macro}{\ext@lstlisting,\lst@MakeCaption,\float@addtolists}
+% Macro \cs{ext@lstlisting} is defined, to make \cs{captionof} work with
+% argument \texttt{lstlisting}. Additionally \cs{lst@MakeCaption} is patched
+% to use the new macro. The deprecated macro \cs{float@addtolists} is not
+% needed any longer an will be reset to the original definition. But, because
+% \pkg{listings} delays the redefinition with \cs{AtBeginDocument} we have to
+% do the same here.
+% \begin{macrocode}
+%<*listings&body>
+\newcommand*{\scr@do@hack@listings}{%
+ \RequirePackage{tocbasic}%
+ \addtotoclist[float]{lol}%
+ \setuptoc{lol}{chapteratlist}%
+ \PackageInfo{scrhack}{redefining \string\lstlistoflistings}%
+ \renewcommand*{\lstlistoflistings}{\listoftoc[{\lstlistlistingname}]{lol}}%
+ \providecommand*{\ext@lstlisting}{lol}%
+ \@tempswafalse
+ \xpatchcmd\lst@MakeCaption
+ {\addcontentsline{lol}}%
+ {\addcontentsline{\ext@lstlisting}}%
+ {\PackageInfo{scrhack}{patching \string\lst@MakeCaption}\@tempswatrue}%
+ {\PackageWarning{scrhack}{cannot patch \string\lst@MakeCaption}}%
+ \@whilesw\if@tempswa\fi{%
+ \xpatchcmd\lst@MakeCaption
+ {\addcontentsline{lol}}%
+ {\addcontentsline{\ext@lstlisting}}%
+ {}%
+ {\@tempswafalse}%
+ }%
+ \AtBeginDocument{%
+ \scr@ifexpected{\float@addtolists}{%
+ \def\float@addtolists##1{\addtocontents{lol}{##1}}%
+ }{%
+ \PackageInfo{scrhack}{undefining \string\float@addtolists}%
+ \let\float@addtolists\relax
+ }{%
+ \scr@ifexpected{\float@addtolists}{%
+ \def\float@addtolists##1{\addtocontents{lol}{##1}%
+ \orig@float@addtolists{##1}}%
+ }{%
+ \PackageInfo{scrhack}{setting \string\float@addtolists\MessageBreak
+ to \string\orig@float@addtolists}%
+ \let\float@addtolists\orig@float@addtolists
+ }{%
+ \PackageWarningNoLine{scrhack}{unkown \string\float@addtolists\space
+ definition found!\MessageBreak
+ Maybe you are using a unsupported listings version}%
+ }%
+ }%
+ }%
+% \end{macrocode}
+% \begin{macro}{\lst@makecaption}
+% \changes{v3.30}{2020/04/01}{setting of \cs{@captype} added}
+% From version~3.30 setting of \cs{@captype} to \texttt{lstlisting} is added
+% to \cs{lst@makecaption}. This adds support for usage of
+% \cs{raggedlstlistingcaption} (if the user or a package author defines
+% it). The change is a little bit dangerous, because it will break, if
+% \pkg{listings} would add an argument to \cs{lst@makecaption}.
+% \begin{macrocode}
+ \expandafter\def\expandafter\lst@makecaption\expandafter{%
+ \expandafter\def\expandafter\@captype\expandafter{%
+ \expandafter l\expandafter s\expandafter t\expandafter l%
+ \expandafter i\expandafter s\expandafter t\expandafter i%
+ \expandafter n\expandafter g\expandafter}\lst@makecaption
+ }%
+ \let\scr@do@hack@listings\relax
+}
+\scr@ifexpected{\lstlistoflistings}{%
+ \def\lstlistoflistings{\bgroup
+ \let\contentsname\lstlistlistingname
+ \let\lst@temp\@starttoc \def\@starttoc##1{\lst@temp{lol}}%
+ \tableofcontents \egroup}%
+}{%
+ \scr@do@hack@listings
+}{%
+ \scr@ifexpected{\lstlistoflistings}{%
+ \def\lstlistoflistings{%
+ \begingroup
+ \@ifundefined{@restonecoltrue}{}{%
+ \if@twocolumn
+ \@restonecoltrue\onecolumn
+ \else
+ \@restonecolfalse
+ \fi
+ }%
+ \float@listhead{\lstlistlistingname}%
+ \parskip\z@\parindent\z@\parfillskip \z@ \@plus 1fil%
+ \@starttoc{lol}%
+ \@ifundefined{@restonecoltrue}{}{%
+ \if@restonecol\twocolumn\fi
+ }%
+ \endgroup
+ }%
+ }{%
+ \scr@do@hack@listings
+ }{%
+ \PackageWarningNoLine{scrhack}{unknown \string\lstlistoflistings\space
+ definition found!\MessageBreak
+ Maybe you are using a unsupported listings version}%
+ }%
+}
+%</listings&body>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{command}
+% \end{macro}
+%
+%
+%
+% \subsection{The \texorpdfstring{\pkg*{nomencl}}{nomencl} hack}
+%
+% With package \pkg{nomencl} and the \KOMAScript{} classes there is only a
+% small disharmony between relating the ToC entry. Nevertheless the package
+% can benefit from using \pkg*{tocbasic}.
+%
+% This hack adds \pkg*{tocbasic} usage to \pkg{nomencl}. This is done using
+% \pkg{xpatch} Nevertheless it is much more complicated than adding real
+% \pkg*{tocbasic} support into \pkg{nomencl}. The mess is, that every new
+% release of \pkg{nomencl} changes the kind of ``support'' of
+% \pkg*{tocbasic}. For some versions there isn't any such support. Other
+% versions use \pkg*{tocbasic} if it has been loaded. Other versions need an
+% option to activate usage of \pkg*{tocbasic}. So don't expect that the
+% following hack does the correct thing for every version of \pkg{nomencl}!
+%
+% \begin{option}{nomencl}
+% \changes{v3.23}{2017/03/31}{added}
+% \changes{v3.39}{2022/11/11}{initial dot in member argument of \cs{KOMA@key}
+% removed}
+% \begin{macrocode}
+%<*package&option>
+\RequirePackage{xpatch}%
+\KOMA@ifkey{nomencl}{@scrhack@nomencl}
+\KOMAExecuteOptions{nomencl=true}
+%</package&option>
+%<*package&body>
+\AfterPackage*{nomencl}{%
+ \KOMA@key[scrhack.sty]{nomencl}{%
+ \PackageWarning{scrhack}{option `nomencl' ignored}%
+ \FamilyKeyStateProcessed
+ }%
+ \if@scrhack@nomencl\scr@hack@load\@pkgextension{nomencl}\fi
+}
+%</package&body>
+% \end{macrocode}
+% \end{option}^^A nomencl
+%
+% \begin{command}{\thenomenclature}
+% \changes{v3.23}{2017/03/31}{added}
+% Instead of using the several definitions by cases of the several versions of
+% \pkg{nomencl} we use a patch, that should remove all such cases and use
+% \pkg*{tocbasic} always.
+% \begin{macrocode}
+%<*nomencl&body>
+\RequirePackage{tocbasic}
+% \end{macrocode}
+% With \pkg{nomencl} > 5.0 this should be all.
+% Unfortunately is isn't, because newer versions of \pkg{nomencl} need option
+% \opt{tocbasic} to be set. Good luck: It is the default. So the chances
+% are good, that with new versions of \pkg{nomencl} usage of \pkg*{tocbasic} is
+% the default.
+% \begin{macrocode}
+\@ifpackagelater{nomencl}{2019/01/01}{%
+ \PackageInfo{scrhack}{only `tocbasic' loaded for `nomencl'}%
+ \expandafter\endinput
+}{}
+% \end{macrocode}
+% Otherwise we have to patch it.
+% \begin{macrocode}
+\addtotoclist[nomencl]{nlo}
+\addtotoclist[nomencl]{nls}
+\xpatchcmd{\thenomenclature}{%
+ \@ifundefined{chapter}%
+ {
+ \section*{\nomname}
+ \if@intoc\addcontentsline{toc}{section}{\nomname}\fi%
+ }%
+ {
+ \chapter*{\nomname}
+ \if@intoc\addcontentsline{toc}{chapter}{\nomname}\fi%
+ }%
+}{%
+ \scr@hack@nomencl@head
+}{%
+ \PackageInfo{scrhack}{\string\thenomenclature\space successfully patched}%
+}{%
+% \end{macrocode}
+% \changes{v3.26b}{2019/01/23}{new \pkg{nomencl} 5.0}
+% From \pkg{nomencl} 5.0 another code is used if the nomenclature is a
+% chapter. So we need another patch:
+% \begin{macrocode}
+ \xpatchcmd{\thenomenclature}{%
+ \@ifundefined{chapter}%
+ {
+ \section*{\nomname}
+ \if@intoc\addcontentsline{toc}{section}{\nomname}\fi%
+ }%
+ {
+ \chapter*{\nomname}
+ \markboth{\nomname}{\nomname}%
+ \if@intoc\addcontentsline{toc}{chapter}{\nomname}\fi%
+ }%
+ }{%
+ \scr@hack@nomencl@head
+ }{%
+ \PackageInfo{scrhack}{\string\thenomenclature\space successfully patched}%
+ }{%
+% \end{macrocode}
+% \changes{v3.26b}{2019/01/23}{prepared for hoply comming \pkg{nomencl}}
+% But this code is also wrong, because it breaks manual running heads, e.g.,
+% of page style \texttt{myheadings}. So I hope, there will be another code,
+% that needs a somehow different patch:
+% \begin{macrocode}
+ \xpatchcmd{\thenomenclature}{%
+ \@ifundefined{chapter}%
+ {
+ \section*{\nomname}
+ \if@intoc\addcontentsline{toc}{section}{\nomname}\fi%
+ }%
+ {
+ \chapter*{\nomname}
+ \@mkboth{\nomname}{\nomname}%
+ \if@intoc\addcontentsline{toc}{chapter}{\nomname}\fi%
+ }%
+ }{%
+ \scr@hack@nomencl@head
+ }{%
+ \PackageInfo{scrhack}{\string\thenomenclature\space successfully patched}%
+ }{%
+% \end{macrocode}
+% \changes{v3.25}{2019/01/23}{emergency patch added}
+% \changes{v3.30}{2020/02/25}{spurious space in warning message removed}
+% If this also does not work, we try an emergency patch, that could break
+% things.
+% \begin{macrocode}
+ \xpatchcmd{\thenomenclature}{%
+ \@ifundefined{chapter}%
+ }{%
+ \scr@hack@nomencl@head
+ \@gobbletwo
+ }{%
+ \PackageWarning{scrhack}{%
+ using emergency patch of \string\thenomenclature.\MessageBreak
+ This could happen if you are using an unknown\MessageBreak
+ release of package `nomencl'.\MessageBreak
+ Mostly this patch does work too, but it also could\MessageBreak
+ break `nomencl`. If this happens, please deactivate\MessageBreak
+ the `nomencl` hack of `scrhack`%
+ }%
+ }{%
+ \PackageWarning{scrhack}{%
+ cannot patch \string\thenomenclature.\MessageBreak
+ This could happen if you are using an unknown\MessageBreak
+ release of package `nomencl'%
+ }%
+ }%
+ }%
+ }%
+}
+%</nomencl&body>
+% \end{macrocode}
+% \end{command}^^A \thenomenclature
+%
+% \begin{macro}{\scr@hack@nomencl@head}
+% \changes{v3.23}{2017/03/31}{heading of \env{thenomenclature} by
+% \pkg*{tocbasic}}
+% \changes{v3.31}{2020/07/08}{internal \cs{list@fname} eliminated}
+% We don't need an extra group, because \env{thenomenclature} already adds the
+% group.
+% \begin{macrocode}
+%<*nomencl&body>
+\newcommand*{\scr@hack@nomencl@head}{%
+ \providecommand*{\listofnlsname}{\nomname}%
+ \def\@currext{nls}%
+ \tocbasic@listhead{\nomname}%
+}
+%</nomencl&body>
+% \end{macrocode}
+% \begin{description}
+% \item[Note:] Only the heading hooks of \pkg*{tocbasic} are used. The other
+% hooks can be set, but would never be used!
+% \end{description}
+% \end{macro}^^A \scr@hack@nomencl@head
+%
+% \begin{macro}{\if@intoc}
+% \changes{3.23}{2017/03/31}{support of \cs{if@intoc}}
+% Generally we have to support \pkg{nomencl}'s option \opt{intoc} and the
+% switch \cs{if@intoc}. This is done by (un-)setting \pkg*{tocbasic} feature
+% \texttt{totoc}. So additional changes of the feature can be done at first
+% after loading both, \pkg{nomencl} and \pkg*{scrhack}. Moreover, later changes
+% of \cs{if@intoc} are not recognized.
+% \begin{macrocode}
+%<*nomencl&body>
+\if@intoc
+ \setuptoc{nls}{totoc}
+\fi
+%</nomencl&body>
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \subsection{The \texorpdfstring{\pkg*{setspace}}{setspace} hack}
+%
+% Package \pkg{setspace} internally uses \cs{@ptsize} in a way, that only
+% works as long as \cs{@ptsize} is an integer. But because \KOMAScript{}
+% supports non integer font sizes, \cs{@ptsize} can also contain non-integer
+% values. Moreover for \opt{11pt}, \LaTeX{} does not use a 11\,pt font but
+% a 10.95\,pt font with a \len{baselineskip} of 13.6\,pt, the correct factor
+% for, e.g., \cs{onehalfspacing} would be:
+% \[ 10{,}95\,\mathrm{pt} \dot 1{,5} / 13{,}6\,\mathrm{pt} \equiv 1{,}208 \]
+% But \pkg{setspace} uses 1.213, which would be correct for 11\,pt. Moreover
+% the factor is always relative to the base font size and not the current font
+% size. Because of this
+% \begin{verbatim}
+% \documentclass[10pt]{article}
+% \usepackage{setspace}
+% \begin{document}
+% \large\onehalfspacing\raggedright
+% Fontsize: \csname f@size\endcsname pt\\
+% Normal baselineskip: \csname f@baselineskip\endcsname\\
+% baselineskip: \the\baselineskip
+% \end{document}
+% \end{verbatim}
+% results in another \len{baselineskip} than:
+% \begin{verbatim}
+% \documentclass[11pt]{article}
+% \usepackage{setspace}
+% \begin{document}
+% \large\onehalfspacing\raggedright
+% Fontsize: \csname f@size\endcsname pt\\
+% Normal baselineskip: \csname f@baselineskip\endcsname\\
+% baselineskip: \the\baselineskip
+% \end{document}
+% \end{verbatim}
+% despite both examples use the same font size. So, to make it absolutely
+% correct, the factor would have to change with every change of the font
+% size. But the hack also does not do so. It just calculates the factor
+% depending on the base font size an the current font size. This is enough to
+% have the same \len{baselineskip} with both of the examples above.
+%
+% \begin{option}{setspace}
+% \changes{v3.17}{2015/04/16}{added}
+% \changes{v3.39}{2022/11/11}{initial dot in member argument of \cs{KOMA@key}
+% removed}
+% \begin{macrocode}
+%<*package&option>
+\KOMA@ifkey{setspace}{@scrhack@setspace}
+\KOMAExecuteOptions{setspace=true}
+%</package&option>
+%<*package&body>
+\AfterPackage*{setspace}{%
+ \KOMA@key[scrhack.sty]{setspace}{%
+ \PackageWarning{scrhack}{option `setspace' ignored}%
+ \FamilyKeyStateProcessed
+ }%
+ \if@scrhack@setspace\scr@hack@load\@pkgextension{setspace}\fi
+}
+%</package&body>
+% \end{macrocode}
+% \end{option}
+%
+%
+% \begin{command}{\onehalfspacing}
+% \changes{v3.17}{2015/04/16}{added}
+% This selects the one half line spacing. I think, a factor with three digits
+% for the decimals should be enough.
+% \begin{macrocode}
+%<*setspace&body>
+\scr@ifexpected{\onehalfspacing}{%
+ \long\def\onehalfspacing{%
+ \setstretch{1.25}% default
+ \ifcase \@ptsize \relax % 10pt
+ \setstretch {1.25}%
+ \or % 11pt
+ \setstretch {1.213}%
+ \or % 12pt
+ \setstretch {1.241}%
+ \fi
+ }%
+}{%
+ \renewcommand*{\onehalfspacing}{%
+ \@tempdima=\dimexpr (\f@size pt)*1500/
+ (\dimexpr \f@baselineskip\relax)*\p@/1000\relax
+ \expandafter\setstretch\expandafter{\strip@pt\@tempdima}%
+ }%
+}{%
+% \end{macrocode}
+% \changes{v3.39}{2023/03/15}{support for \pkg{setspace} 6.7b added}
+% \begin{macrocode}
+ \scr@ifexpected{\onehalfspacing}{%
+ \long\def\onehalfspacing{%
+ \setstretch{1.25}% default
+% DPC 6.7b guard \@ptsize
+ \ifx\@ptsize\@undefined\else
+ \ifcase \@ptsize \relax % 10pt
+ \setstretch {1.25}%
+ \or % 11pt
+ \setstretch {1.213}%
+ \or % 12pt
+ \setstretch {1.241}%
+ \fi
+ \fi
+ }%
+ }{%
+ \renewcommand*{\onehalfspacing}{%
+ \@tempdima=\dimexpr (\f@size pt)*1500/
+ (\dimexpr \f@baselineskip\relax)*\p@/1000\relax
+ \expandafter\setstretch\expandafter{\strip@pt\@tempdima}%
+ }%
+ }{%
+ \PackageWarning{scrhack}{unknown \string\onehalfspacing\space
+ definition found!\MessageBreak
+ Maybe you are using a unsupported setpace version}%
+ }%
+}
+% \end{macrocode}
+% \end{command}
+% \begin{command}{\doublespacing}
+% \changes{v3.17}{2015/04/16}{new}
+% This selects the double line spacing. I think, a factor with three digits
+% for the decimals should be enough.
+% \begin{macrocode}
+\scr@ifexpected{\doublespacing}{%
+ \long\def\doublespacing{%
+ \setstretch{1.667}% default
+ \ifcase \@ptsize \relax % 10pt
+ \setstretch {1.667}%
+ \or % 11pt
+ \setstretch {1.618}%
+ \or % 12pt
+ \setstretch {1.655}%
+ \fi
+ }%
+}{%
+ \renewcommand*{\doublespacing}{%
+ \@tempdima=\dimexpr (\f@size pt)*2000/
+ (\dimexpr \f@baselineskip\relax)*\p@/1000\relax
+ \expandafter\setstretch\expandafter{\strip@pt\@tempdima}%
+ }%
+}{%
+% \end{macrocode}
+% \changes{v3.39}{2023/03/15}{support for \pkg{setspace} 6.7b added}
+% \begin{macrocode}
+ \scr@ifexpected{\doublespacing}{%
+ \long\def\doublespacing{%
+ \setstretch {1.667}% default
+% DPC 6.7b guard \@ptsize
+ \ifx\@ptsize\@undefined\else
+ \ifcase \@ptsize \relax % 10pt
+ \setstretch {1.667}%
+ \or % 11pt
+ \setstretch {1.618}%
+ \or % 12pt
+ \setstretch {1.655}%
+ \fi
+ \fi
+ }%
+ }{%
+ \renewcommand*{\doublespacing}{%
+ \@tempdima=\dimexpr (\f@size pt)*2000/
+ (\dimexpr \f@baselineskip\relax)*\p@/1000\relax
+ \expandafter\setstretch\expandafter{\strip@pt\@tempdima}%
+ }%
+ }{%
+ \PackageWarning{scrhack}{unknown \string\doublespacing\space
+ definition found!\MessageBreak
+ Maybe you are using a unsupported setpace version}%
+ }%
+}
+%</setspace&body>
+% \end{macrocode}
+% \end{command}
+%
+%
+% \subsection{The \texorpdfstring{\pkg*{lscape}}{lscape} hack}
+% \changes{v3.18a}{2015/07/07}{\pkg{lscape} hack added}
+%
+% The package does change \len{textheight} inside \env{landscape} to the prior
+% value of \len{textwidth}, nevertheless is does not change \len{textwidth} to
+% the prior value of \len{textheight}. This is at least inconsistent. After
+% asking him, David~Carlisle answered, that he does not change
+% \len{textwidth}, because this could result in problems. Therefore it is very
+% strange, that he does change \cs{textheight}, despite this also to problems,
+% e.g., with packages \pkg{showframe} or \pkg*{scrlayer}. So the patch here
+% also keeps \len{textheight} unchanged. This also has to take care for
+% \pkg{pdflscape}. The patches are done using \pkg{xpatch}.
+%
+%
+% \begin{option}{lscape}
+% \changes{v3.18a}{2015/07/07}{added}
+% \changes{v3.20}{2016/05/07}{loading \pkg{xpatch} in option part already}
+% \changes{v3.39}{2022/11/11}{initial dot in member argument of \cs{KOMA@key}
+% removed}
+% \begin{macrocode}
+%<*package&option>
+\RequirePackage{xpatch}%
+\KOMA@ifkey{lscape}{@scrhack@lscape}%
+\KOMAExecuteOptions{lscape=true}%
+%</package&option>
+%<*package&body>
+\AfterPackage*{lscape}{%
+ \if@scrhack@lscape\scr@hack@load\@pkgextension{lscape}\else
+ \KOMA@key[scrhack.sty]{lscape}{%
+ \PackageWarning{scrhack}{option `lscape' ignored}%
+ \FamilyKeyStateProcessed
+ }%
+ \fi
+}
+%</package&body>
+% \end{macrocode}
+% \end{option}
+%
+% \begin{command}{\landscape}
+% \changes{v3.18a}{2015/07/07}{added}
+% \changes{v3.20}{2016/05/07}{loading \pkg{xpatch} in option part already}
+% This command is the beginning of environment \env{landscape}. This has to be
+% patched using \pkg{xpatch}.
+% \begin{description}
+% \item[Note:] This is a load time option and cannot be changed after loading
+% the package!
+% \end{description}
+% \begin{macrocode}
+%<*lscape&body>
+\xpatchcmd{\landscape}{\textheight=\vsize}{%
+ \if@scrhack@lscape
+% \end{macrocode}
+% \begin{macro}{\@outputpage}
+% \changes{v3.18a}{2015/08/11}{added}
+% Here the changed value of \len{textheight} is needed for initialization of
+% \cs{@colht}. So we patch it to use the new internal \len{scr@LT@textheight}
+% instead of \len{textheight}.
+% \begin{macrocode}
+ \scrh@LT@textheight=\vsize
+ \let\scrh@LT@outputpage\@outputpage
+ \def\@outputpage{\scrh@LT@outputpage\global\@colht\scrh@LT@textheight}%
+ \else
+ \textheight=\vsize
+ \fi
+}{%
+ \PackageInfo{scrhack}{\string\landscape\space patched to make
+ \string\textheight\space change optional}%
+}{%
+ \PackageWarning{scrhack}{Cannot patch \string\landscape!\MessageBreak
+ Maybe you are using a unsupported lscape version}%
+ \@scrhack@lscapefalse
+}
+% \end{macrocode}
+% \begin{ilength}{\scrh@LT@textheight}
+% \changes{v3.18a}{2015/08/11}{new}
+% \begin{macrocode}
+\newlength{\scrh@LT@textheight}
+%</lscape&body>
+% \end{macrocode}
+% \end{ilength}^^A \scrh@LT@textheight
+% \end{macro}^^A \@outputpage
+% \end{command}^^A \landscape
+%
+%
+% \subsection{The standard classes sections hack}
+% \label{sec:standardsections}
+% The \emph{standard classes sections hack} differs from each other
+% hack. First of all it does not patch a specific package but the class
+% definitions of section commands from \cs{part} till
+% \cs{subparagraph}. Additionally it resets several internal \LaTeX{} macros
+% which are changed by \KOMAScript{} classes to their original
+% definition. Last but not least it is not activated by default, but the user
+% has to activate it, if he needs it. The hack has more potential to break
+% things than to make things better. Because of this, there is not any support
+% for using this hack and the hack shows several warning messages.
+%
+% \begin{option}{standardsections}
+% \begin{macrocode}
+%<*package&option>
+\KOMA@ifkey{standardsections}{@scrhack@standardsections}
+\KOMAExecuteOptions{standardsections=false}
+%</package&option>
+%<*package&body>
+\AtEndOfPackage{%
+ \if@scrhack@standardsections
+ \PackageInfo{scrhack}{loading standard classes sections hack}%
+ \input{standardsections.hak}%
+ \fi
+}
+%</package&body>
+% \end{macrocode}
+% \end{option}^^A standardsections
+%
+% \begin{command}{\part,\chapter,
+% \section,\subsection,\subsubsection,
+% \paragraph,\subparagraph}
+% The hack redefines all these commands to a definition copied from the
+% standard \LaTeX{} classes version v1.4i. Copyright of this code is by the
+% \LaTeX3{} Project. The complete, unmodified code can be found on
+% \url{https://ctan.org/tex-archive/macros/latex/base/classes.dtx}.
+% \begin{macrocode}
+%<*standardsections&body>
+\PackageWarningNoLine{scrhack}{%
+ You are loosing every kind of support because of\MessageBreak
+ using the dangerous standard classes sections hack!\MessageBreak
+ This hack can break several classes and packages.\MessageBreak
+ However, sometimes it is needed to make a\MessageBreak
+ package work%
+}%
+\PackageInfo{scrhack}{%
+ Using code from the standard LaTeX classes.\MessageBreak
+ For more information about this code and the\MessageBreak
+ license of this code, please see:\MessageBreak
+ https://ctan.org/tex-archive/macros/latex/base/classes.dtx
+}%
+\@ifpackageloaded{hyperref}{%
+ \PackageWarning{scrhack}{this hack should not be loaded after `hyperref'}%
+}{}
+\@ifpackageloaded{titlesec}{%
+ \PackageWarning{scrhack}{this hack should not be loaded after `titlesec'}%
+}{}
+\@ifpackageloaded{sectsty}{%
+ \PackageWarning{scrhack}{this hack should not be loaded after `sectsty'}%
+}{}
+\scr@ifundefinedorrelax{chapter}{%
+% \end{macrocode}
+% It seems to be an article class, so we use the code from
+% \href{http://mirrors.ctan.org/macros/latex/base/classes.dtx}{\cls*{article}}.
+% \begin{macrocode}
+ \scr@ifundefinedorrelax{c@part}{\newcounter{part}}{}%
+ \scr@ifundefinedorrelax{c@section}{\newcounter{section}}{}%
+ \scr@ifundefinedorrelax{c@subsection}{\newcounter{subsection}[section]}{}%
+ \scr@ifundefinedorrelax{c@subsubsection}{%
+ \newcounter{subsubsection}[subsection]}{}%
+ \scr@ifundefinedorrelax{c@paragraph}{%
+ \newcounter{paragraph}[subsubsection]}{}%
+ \scr@ifundefinedorrelax{c@subparagraph}{%
+ \newcounter{subparagraph}[paragraph]}{}%
+ \renewcommand\thepart {\@Roman\c@part}%
+ \renewcommand\thesection {\@arabic\c@section}%
+ \renewcommand\thesubsection {\thesection.\@arabic\c@subsection}%
+ \renewcommand\thesubsubsection{\thesubsection.\@arabic\c@subsubsection}%
+ \renewcommand\theparagraph {\thesubsubsection.\@arabic\c@paragraph}%
+ \renewcommand\thesubparagraph {\theparagraph.\@arabic\c@subparagraph}%
+ \def\part{%
+ \if@noskipsec \leavevmode \fi
+ \par
+ \addvspace{4ex}%
+ \@afterindentfalse
+ \secdef\@part\@spart}%
+ \def\@part[#1]#2{%
+ \ifnum \c@secnumdepth >\m@ne
+ \refstepcounter{part}%
+ \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}%
+ \else
+ \addcontentsline{toc}{part}{#1}%
+ \fi
+ {\parindent \z@ \raggedright
+ \interlinepenalty \@M
+ \normalfont
+ \ifnum \c@secnumdepth >\m@ne
+ \Large\bfseries \partname\nobreakspace\thepart
+ \par\nobreak
+ \fi
+ \huge \bfseries #2%
+ \markboth{}{}\par}%
+ \nobreak
+ \vskip 3ex
+ \@afterheading}%
+ \def\@spart#1{%
+ {\parindent \z@ \raggedright
+ \interlinepenalty \@M
+ \normalfont
+ \huge \bfseries #1\par}%
+ \nobreak
+ \vskip 3ex
+ \@afterheading}%
+ \def\section{\@startsection {section}{1}{\z@}%
+ {-3.5ex \@plus -1ex \@minus -.2ex}%
+ {2.3ex \@plus.2ex}%
+ {\normalfont\Large\bfseries}}%
+ \def\subsection{\@startsection{subsection}{2}{\z@}%
+ {-3.25ex\@plus -1ex \@minus -.2ex}%
+ {1.5ex \@plus .2ex}%
+ {\normalfont\large\bfseries}}%
+ \def\subsubsection{\@startsection{subsubsection}{3}{\z@}%
+ {-3.25ex\@plus -1ex \@minus -.2ex}%
+ {1.5ex \@plus .2ex}%
+ {\normalfont\normalsize\bfseries}}%
+ \def\paragraph{\@startsection{paragraph}{4}{\z@}%
+ {3.25ex \@plus1ex \@minus.2ex}%
+ {-1em}%
+ {\normalfont\normalsize\bfseries}}%
+ \def\subparagraph{\@startsection{subparagraph}{5}{\parindent}%
+ {3.25ex \@plus1ex \@minus .2ex}%
+ {-1em}%
+ {\normalfont\normalsize\bfseries}}%
+}{%
+% \end{macrocode}
+% It seems to be either a book or report class.
+% \begin{macrocode}
+ \scr@ifundefinedorrelax{c@part}{\newcounter{part}}{}%
+ \scr@ifundefinedorrelax{c@chapter}{\newcounter{chapter}}{}%
+ \scr@ifundefinedorrelax{c@section}{\newcounter{section}[chapter]}{}%
+ \scr@ifundefinedorrelax{c@subsection}{\newcounter{subsection}[section]}{}%
+ \scr@ifundefinedorrelax{c@subsubsection}{%
+ \newcounter{subsubsection}[subsection]}{}%
+ \scr@ifundefinedorrelax{c@paragraph}{%
+ \newcounter{paragraph}[subsubsection]}{}%
+ \scr@ifundefinedorrelax{c@subparagraph}{%
+ \newcounter{subparagraph}[paragraph]}{}%
+ \def\@chapapp{\chaptername}%
+ \scr@ifundefinedorrelax{frontmatter}{%
+% \end{macrocode}
+% It seems not to be a book class.
+% \begin{macrocode}
+ \def\part{%
+ \if@openright
+ \cleardoublepage
+ \else
+ \clearpage
+ \fi
+ \thispagestyle{plain}%
+ \if@twocolumn
+ \onecolumn
+ \@tempswatrue
+ \else
+ \@tempswafalse
+ \fi
+ \null\vfil
+ \secdef\@part\@spart}
+
+ \def\@part[#1]#2{%
+ \ifnum \c@secnumdepth >-2\relax
+ \refstepcounter{part}%
+ \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}%
+ \else
+ \addcontentsline{toc}{part}{#1}%
+ \fi
+ \markboth{}{}%
+ {\centering
+ \interlinepenalty \@M
+ \normalfont
+ \ifnum \c@secnumdepth >-2\relax
+ \huge\bfseries \partname\nobreakspace\thepart
+ \par
+ \vskip 20\p@
+ \fi
+ \Huge \bfseries #2\par}%
+ \@endpart}
+ \def\@spart#1{%
+ {\centering
+ \interlinepenalty \@M
+ \normalfont
+ \Huge \bfseries #1\par}%
+ \@endpart}
+ \def\@endpart{\vfil\newpage
+ \if@twoside
+ \if@openright
+ \null
+ \thispagestyle{empty}%
+ \newpage
+ \fi
+ \fi
+ \if@tempswa
+ \twocolumn
+ \fi}
+ \def\chapter{\if@openright\cleardoublepage\else\clearpage\fi
+ \thispagestyle{plain}%
+ \global\@topnum\z@
+ \@afterindentfalse
+ \secdef\@chapter\@schapter}
+ \def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
+ \refstepcounter{chapter}%
+ \typeout{\@chapapp\space\thechapter.}%
+ \addcontentsline{toc}{chapter}%
+ {\protect\numberline{\thechapter}#1}%
+ \else
+ \addcontentsline{toc}{chapter}{#1}%
+ \fi
+ \chaptermark{#1}%
+ \addtocontents{lof}{\protect\addvspace{10\p@}}%
+ \addtocontents{lot}{\protect\addvspace{10\p@}}%
+ \if@twocolumn
+ \@topnewpage[\@makechapterhead{#2}]%
+ \else
+ \@makechapterhead{#2}%
+ \@afterheading
+ \fi}
+ \def\@makechapterhead#1{%
+ \vspace*{50\p@}%
+ {\parindent \z@ \raggedright \normalfont
+ \ifnum \c@secnumdepth >\m@ne
+ \huge\bfseries \@chapapp\space \thechapter
+ \par\nobreak
+ \vskip 20\p@
+ \fi
+ \interlinepenalty\@M
+ \Huge \bfseries #1\par\nobreak
+ \vskip 40\p@
+ }}
+ \def\@schapter#1{\if@twocolumn
+ \@topnewpage[\@makeschapterhead{#1}]%
+ \else
+ \@makeschapterhead{#1}%
+ \@afterheading
+ \fi}
+ \def\@makeschapterhead#1{%
+ \vspace*{50\p@}%
+ {\parindent \z@ \raggedright
+ \normalfont
+ \interlinepenalty\@M
+ \Huge \bfseries #1\par\nobreak
+ \vskip 40\p@
+ }}
+ \def\section{\@startsection {section}{1}{\z@}%
+ {-3.5ex \@plus -1ex \@minus -.2ex}%
+ {2.3ex \@plus.2ex}%
+ {\normalfont\Large\bfseries}}%
+ \def\subsection{\@startsection{subsection}{2}{\z@}%
+ {-3.25ex\@plus -1ex \@minus -.2ex}%
+ {1.5ex \@plus .2ex}%
+ {\normalfont\large\bfseries}}%
+ \def\subsubsection{\@startsection{subsubsection}{3}{\z@}%
+ {-3.25ex\@plus -1ex \@minus -.2ex}%
+ {1.5ex \@plus .2ex}%
+ {\normalfont\normalsize\bfseries}}%
+ \def\paragraph{\@startsection{paragraph}{4}{\z@}%
+ {3.25ex \@plus1ex \@minus.2ex}%
+ {-1em}%
+ {\normalfont\normalsize\bfseries}}%
+ \def\subparagraph{\@startsection{subparagraph}{5}{\parindent}%
+ {3.25ex \@plus1ex \@minus .2ex}%
+ {-1em}%
+ {\normalfont\normalsize\bfseries}}%
+ }{%
+% \end{macrocode}
+% It seems to be a book class.
+% \begin{macrocode}
+ \scr@ifundefinedorrelax{if@mainmatter}{%
+ \expandafter\newif\csname if@mainmatter\endcsname
+ }{}%
+ \def\frontmatter{%
+ \cleardoublepage
+ \@mainmatterfalse
+ \pagenumbering{roman}}%
+ \def\mainmatter{%
+ \cleardoublepage
+ \@mainmattertrue
+ \pagenumbering{arabic}}%
+ \def\backmatter{%
+ \if@openright
+ \cleardoublepage
+ \else
+ \clearpage
+ \fi
+ \@mainmatterfalse}%
+ \def\part{%
+ \if@openright
+ \cleardoublepage
+ \else
+ \clearpage
+ \fi
+ \thispagestyle{plain}%
+ \if@twocolumn
+ \onecolumn
+ \@tempswatrue
+ \else
+ \@tempswafalse
+ \fi
+ \null\vfil
+ \secdef\@part\@spart}%
+
+ \def\@part[#1]#2{%
+ \ifnum \c@secnumdepth >-2\relax
+ \refstepcounter{part}%
+ \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}%
+ \else
+ \addcontentsline{toc}{part}{#1}%
+ \fi
+ \markboth{}{}%
+ {\centering
+ \interlinepenalty \@M
+ \normalfont
+ \ifnum \c@secnumdepth >-2\relax
+ \huge\bfseries \partname\nobreakspace\thepart
+ \par
+ \vskip 20\p@
+ \fi
+ \Huge \bfseries #2\par}%
+ \@endpart}%
+ \def\@spart#1{%
+ {\centering
+ \interlinepenalty \@M
+ \normalfont
+ \Huge \bfseries #1\par}%
+ \@endpart}%
+ \def\@endpart{\vfil\newpage
+ \if@twoside
+ \if@openright
+ \null
+ \thispagestyle{empty}%
+ \newpage
+ \fi
+ \fi
+ \if@tempswa
+ \twocolumn
+ \fi}%
+ \def\chapter{\if@openright\cleardoublepage\else\clearpage\fi
+ \thispagestyle{plain}%
+ \global\@topnum\z@
+ \@afterindentfalse
+ \secdef\@chapter\@schapter}%
+ \def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
+ \if@mainmatter
+ \refstepcounter{chapter}%
+ \typeout{\@chapapp\space\thechapter.}%
+ \addcontentsline{toc}{chapter}%
+ {\protect\numberline{\thechapter}#1}%
+ \else
+ \addcontentsline{toc}{chapter}{#1}%
+ \fi
+ \else
+ \addcontentsline{toc}{chapter}{#1}%
+ \fi
+ \chaptermark{#1}%
+ \addtocontents{lof}{\protect\addvspace{10\p@}}%
+ \addtocontents{lot}{\protect\addvspace{10\p@}}%
+ \if@twocolumn
+ \@topnewpage[\@makechapterhead{#2}]%
+ \else
+ \@makechapterhead{#2}%
+ \@afterheading
+ \fi}%
+ \def\@makechapterhead#1{%
+ \vspace*{50\p@}%
+ {\parindent \z@ \raggedright \normalfont
+ \ifnum \c@secnumdepth >\m@ne
+ \if@mainmatter
+ \huge\bfseries \@chapapp\space \thechapter
+ \par\nobreak
+ \vskip 20\p@
+ \fi
+ \fi
+ \interlinepenalty\@M
+ \Huge \bfseries #1\par\nobreak
+ \vskip 40\p@
+ }}%
+ \def\@schapter#1{\if@twocolumn
+ \@topnewpage[\@makeschapterhead{#1}]%
+ \else
+ \@makeschapterhead{#1}%
+ \@afterheading
+ \fi}%
+ \def\@makeschapterhead#1{%
+ \vspace*{50\p@}%
+ {\parindent \z@ \raggedright
+ \normalfont
+ \interlinepenalty\@M
+ \Huge \bfseries #1\par\nobreak
+ \vskip 40\p@
+ }}%
+ \def\section{\@startsection {section}{1}{\z@}%
+ {-3.5ex \@plus -1ex \@minus -.2ex}%
+ {2.3ex \@plus.2ex}%
+ {\normalfont\Large\bfseries}}%
+ \def\subsection{\@startsection{subsection}{2}{\z@}%
+ {-3.25ex\@plus -1ex \@minus -.2ex}%
+ {1.5ex \@plus .2ex}%
+ {\normalfont\large\bfseries}}%
+ \def\subsubsection{\@startsection{subsubsection}{3}{\z@}%
+ {-3.25ex\@plus -1ex \@minus -.2ex}%
+ {1.5ex \@plus .2ex}%
+ {\normalfont\normalsize\bfseries}}%
+ \def\paragraph{\@startsection{paragraph}{4}{\z@}%
+ {3.25ex \@plus1ex \@minus.2ex}%
+ {-1em}%
+ {\normalfont\normalsize\bfseries}}%
+ \def\subparagraph{\@startsection{subparagraph}{5}{\parindent}%
+ {3.25ex \@plus1ex \@minus .2ex}%
+ {-1em}%
+ {\normalfont\normalsize\bfseries}}%
+ }%
+}% End of the derived code.
+% \end{macrocode}
+% \end{command}
+%
+% \begin{macro}{\@startsection}
+% \KOMAScript{} classes redefine this internal \LaTeX{} kernel macro. In this
+% case \cs{scr@saved@startsection} is defined, differs from
+% \cs{@startsection} and has the definition found before redefining the
+% original macro. We do nothing else but resetting \cs{@startsection} to this
+% saved definition.
+% \begin{macrocode}
+\scr@ifundefinedorrelax{scr@saved@startsection}{}{%
+ \ifx\@startsection\scr@saved@startsection\else
+ \PackageWarningNoLine{scrhack}{%
+ Resetting \string\@startsection,\MessageBreak
+ because of loading standard classes sections hack%
+ }%
+ \let\@startsection\scr@saved@startsection
+ \fi
+}
+% \end{macrocode}
+% \end{macro}^^A \@startsection
+%
+% \begin{macro}{\@sect,\@ssect,\@xsect}
+% All these should be resetted to their original definitions stored in
+% \cs{scr@latex@\dots}.
+% \begin{macrocode}
+\scr@ifundefinedorrelax{scr@latex@sect}{}{%
+ \ifx\@sect\scr@latex@sect\else
+ \PackageWarningNoLine{scrhack}{%
+ Resetting \string\@sect,\MessageBreak
+ because of loading standard classes sections hack%
+ }%
+ \let\@sect\scr@latex@sect
+ \fi
+}
+\scr@ifundefinedorrelax{scr@latex@ssect}{}{%
+ \ifx\@ssect\scr@latex@ssect\else
+ \PackageWarningNoLine{scrhack}{%
+ Resetting \string\@ssect,\MessageBreak
+ because of loading standard classes sections hack%
+ }%
+ \let\@ssect\scr@latex@ssect
+ \fi
+}
+\scr@ifundefinedorrelax{scr@latex@xsect}{}{%
+ \ifx\@xsect\scr@latex@xsect\else
+ \PackageWarningNoLine{scrhack}{%
+ Resetting \string\@xsect,\MessageBreak
+ because of loading standard classes sections hack%
+ }%
+ \let\@xsect\scr@latex@xsect
+ \fi
+}
+% \end{macrocode}
+% \end{macro}^^A \@xsect,\@ssect,\@sect
+%
+% \begin{command}{\DeclareSectionCommand,\RedeclareSectionCommand,
+% \DeclareNewSectionCommand,\ProvideSectionCommand,
+% \DeclareSectionCommands,\RedeclareSectionCommands,
+% \DeclareNewSectionCommands,\ProvideSectionCommands}
+% These \KOMAScript{} commands do not make sense any longer after forced
+% redefinition of \cs{part} \dots{} \cs{subparagraph}. They even would not
+% work correctly after resetting, e.g., \cs{@startsection}. So best reaction
+% is to \emph{undefine} them.
+% \begin{macrocode}
+\scr@ifundefinedorrelax{DeclareSectionCommand}{}{%
+ \PackageWarningNoLine{scrhack}{%
+ \string\DeclareSectionCommand\space
+ and all derivates deactivated,\MessageBreak
+ because of loading standard classes sections hack%
+ }%
+ \let\DeclareSectionCommand\undefined
+ \let\DeclareSectionCommands\undefined
+ \let\RedeclareSectionCommand\undefined
+ \let\RedeclareSectionCommands\undefined
+ \let\DeclareNewSectionCommand\undefined
+ \let\DeclareNewSectionCommands\undefined
+ \let\ProvideSectionCommand\undefined
+ \let\ProvideSectionCommands\undefined
+}
+% \end{macrocode}
+% \begin{macro}{\scr@chapter@before@hyperref@patch,
+% \scr@chapter@after@hyperref@patch}
+% Now, definitions without respecting \pkg{hyperref} are used, so
+% \pkg{hyperref} should again be able to patch them. So the hack should
+% deactivate the patch deactivation of the \KOMAScript{} classes.
+% \begin{macrocode}
+\let\scr@chapter@before@hyperref@patch\relax
+\let\scr@chapter@after@hyperref@patch\relax
+% \end{macrocode}
+% \end{macro}
+% \end{command}
+%
+% \begin{macro}{\scr@osectarg}
+% The \KOMAScript{} classes use this macro to store how to use the optional
+% argument of section commands. But with the standard class definition the
+% only possibility is to use it as running head and write it into the table of
+% contents without any extended handling. So the only value, that makes sense
+% is 0.
+% \begin{macrocode}
+\scr@ifundefinedorrelax{scr@osectarg}{}{%
+ \def\reserved@a{0}%
+ \ifx\scr@osectarg\reserved@a\else
+ \let\scr@osectarg\reserved@a
+ \PackageWarningNoLine{scrhack}{%
+ Extended option handling for section commands deactivated,\MessageBreak
+ because of loading standard classes sections hack%
+ }%
+ \fi
+}%
+% \end{macrocode}
+% \begin{macro}{\scr@activate@xsection}
+% Further changing of the value has to be deactivated.
+% \begin{macrocode}
+\scr@ifundefinedorrelax{scr@activate@xsection}{}{%
+ \renewcommand*{\scr@activate@xsection}[1]{%
+ \edef\scr@osectarg{#1}\def\reserved@a{0}%
+ \ifx\scr@osectarg\reserved@a
+ \else
+ \let\scr@osectarg\reserved@a
+ \PackageWarning{scrhack}{%
+ Because of loading the standard classes\MessageBreak
+ sections hack, the extended option handling\MessageBreak
+ of section commands failed%
+ }%
+ \fi
+ }%
+}
+% \end{macrocode}
+% \end{macro}^^A \scr@activate@xsection
+% \end{macro}^^A \scr@osectarg
+%
+% \begin{command}{\partformat,\chapterformat}
+% Most \cs{\dots format} macros of \KOMAScript{} are still used, because of
+% the redefinition of \cs{@seccntformat}. But \cs{part} and \cs{chapter} are
+% defined without using them.
+% \begin{macrocode}
+\scr@ifundefinedorrelax{partformat}{}{%
+ \PackageWarningNoLine{scrhack}{%
+ Usage of \string\partformat\space
+ deactivated,\MessageBreak
+ because of loading the standard classes sections hack%
+ }%
+}
+\scr@ifundefinedorrelax{chapterformat}{}{%
+ \PackageWarningNoLine{scrhack}{%
+ Usage of \string\chapterformat\space
+ deactivated,\MessageBreak
+ because of loading the standard classes sections hack%
+ }%
+}
+% \end{macrocode}
+% \end{command}^^A \chapterformat,\partformat
+%
+% \begin{command}{\sectionformat,\subsectionformat,\subsubsectionformat,
+% \paragraphformat,\subparagraphformat}
+% All these commands have to be resetted to not use the automatic dot and to
+% add a \cs{quad} instead of an \cs{enskip}.
+% \begin{macrocode}
+\scr@ifundefinedorrelax{sectionformat}{}{%
+ \PackageWarningNoLine{scrhack}{%
+ \string\sectionformat\space set to
+ `\string\thesection\string\quad',\MessageBreak
+ because of loading the standard classes sections hack%
+ }%
+ \renewcommand*{\sectionformat}{\thesection\quad}%
+}
+\scr@ifundefinedorrelax{subsectionformat}{}{%
+ \PackageWarningNoLine{scrhack}{%
+ \string\subsectionformat\space set to
+ `\string\thesubsection\string\quad'\MessageBreak
+ because of loading the standard classes sections hack%
+ }%
+ \renewcommand*{\subsectionformat}{\thesubsection\quad}%
+}
+\scr@ifundefinedorrelax{subsubsectionformat}{}{%
+ \PackageWarningNoLine{scrhack}{%
+ \string\subsubsectionformat\space set to
+ `\string\thesubsubsection\string\quad'\MessageBreak
+ because of loading the standard classes sections hack%
+ }%
+ \renewcommand*{\subsubsectionformat}{\thesubsubsection\quad}%
+}
+\scr@ifundefinedorrelax{paragraphformat}{}{%
+ \PackageWarningNoLine{scrhack}{%
+ \string\paragraphformat\space set to
+ `\string\theparagraph\string\quad'\MessageBreak
+ because of loading the standard classes sections hack%
+ }%
+ \renewcommand*{\paragraphformat}{\theparagraph\quad}%
+}
+\scr@ifundefinedorrelax{subparagraphformat}{}{%
+ \PackageWarningNoLine{scrhack}{%
+ \string\subparagraphformat\space set to
+ `\string\thesubparagraph\string\quad'\MessageBreak
+ because of loading the standard classes sections hack%
+ }%
+ \renewcommand*{\subparagraphformat}{\thesubparagraph\quad}%
+}
+% \end{macrocode}
+% \end{command}
+%
+% \begin{command}{\partlineswithprefixformat,
+% \chapterlineswithprefixformat,\chapterlinesformat,
+% \sectionlinesformat,\sectioncatchphraseformat}
+% These \KOMAScript{} commands are not used any longer.
+% \begin{macrocode}
+\scr@ifundefinedorrelax{partlineswithprefixformat}{}{%
+ \PackageWarningNoLine{scrhack}{%
+ Usage of \string\partlineswithprefixformat\space deactivated,\MessageBreak
+ because of loading the standard classes sections hack%
+ }%
+}
+\scr@ifundefinedorrelax{chapterlineswithprefixformat}{}{%
+ \PackageWarningNoLine{scrhack}{%
+ Usage of \string\chapterlineswithprefixformat\space and\MessageBreak
+ \string\chapterlinesformat\space deactivated,\MessageBreak
+ because of using standard classes sections hack%
+ }%
+}
+\scr@ifundefinedorrelax{sectionlinesformat}{}{%
+ \PackageWarningNoLine{scrhack}{%
+ Usage of \string\sectionlinesformat\space and\MessageBreak
+ \string\sectioncatchphraseformat\space deactivated,\MessageBreak
+ because of using standard classes sections hack%
+ }%
+}
+% \end{macrocode}
+% \end{command}^^A \partlineswithprefixformat …
+%
+% \begin{option}{headings}
+% \changes{v3.39}{2022/11/11}{initial dot in member argument of option storage
+% commands removed}
+% The \KOMAScript{} option does not make sense any longer. So it is
+% deactivated and usage will throw an error.
+% \begin{macrocode}
+\scr@ifundefinedorrelax{KOMAClassName}{}{%
+ \PackageWarningNoLine{scrhack}{%
+ KOMA-Script option `headings' removed,\MessageBreak
+ because of loading standard classes sections hack%
+ }%
+ \RelaxFamilyKey[.\KOMAClassFileName]{KOMA}{headings}%
+ \KOMA@kav@removekey{\KOMAClassFileName}{headings}%
+}
+% \end{macrocode}
+% \end{option}^^A headings
+%
+% \begin{macro}{\scr@class@titlesec@warning}
+% The warning about loading \pkg{titlesec} has to be changes, because we do
+% not expect errors any longer.
+% \begin{macrocode}
+\def\scr@class@titlesec@warning{%
+ \PackageWarning{scrhack}{%
+ Usage of `titlesec' should work, because of\MessageBreak
+ loading the standard classes sections hack.\MessageBreak
+ However, you should know, there is not any\MessageBreak
+ support for this combination by the\MessageBreak
+ KOMA-Script author%
+ }%
+}
+%</standardsections&body>
+% \end{macrocode}
+% \end{macro}^^A \scr@class@titlesec@warning
+%
+% \subsection{Executing options}
+%
+% Last but not least the options have to be processed. In the generated
+% package this will be done before the commands of \autoref{sec:macros}.
+% \begin{macrocode}
+%<*package&option>
+\KOMAProcessOptions\relax
+%</package&option>
+% \end{macrocode}
+%
+% \Finale
+% \PrintChanges
+%
+\endinput
+% Local Variables:
+% mode: doctex
+% ispell-local-dictionary: "en_US"
+% eval: (flyspell-mode 1)
+% TeX-master: t
+% TeX-engine: luatex-dev
+% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx"))
+% End:
diff --git a/macros/latex/contrib/scrhack/scrhack-2023-07-07.pdf b/macros/latex/contrib/scrhack/scrhack-2023-07-07.pdf
new file mode 100644
index 0000000000..59ae934110
--- /dev/null
+++ b/macros/latex/contrib/scrhack/scrhack-2023-07-07.pdf
Binary files differ
diff --git a/macros/latex/contrib/scrhack/scrhack.dtx b/macros/latex/contrib/scrhack/scrhack.dtx
new file mode 100644
index 0000000000..a14d7e2e94
--- /dev/null
+++ b/macros/latex/contrib/scrhack/scrhack.dtx
@@ -0,0 +1,991 @@
+% \iffalse meta-comment
+% ======================================================================
+% scrhack.dtx
+% Copyright © 2008–2024 Markus Kohm
+%
+% This work is a KOMA-Script spin-off. For the original sources of
+% KOMA-Script's `scrhack.sty' see file `scrhack.dtx' in the KOMA-Script
+% sources at <https://sourceforge.net/p/koma-script/code/>.
+%
+% Development is taking place as part of `scrhack' at
+% <https://github.com/komascript/third-party-enhancements>. New issues
+% should be reported there as well as known issues can be found.
+%
+% This work may be distributed and/or modified under the conditions of
+% the LaTeX Project Public License, version 1.3c of the license.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.<3c or later is part of all distributions of LaTeX
+% version 2005/12/01 or later and of this work.
+%
+% This work has the LPPL maintenance status "author-maintained".
+%
+% The Current Maintainer and author of this work is Markus Kohm.
+%
+% This work consists of the file `scrhack.dtx',
+% `scrhack-2023-07-07,dtx', and `README.md'.
+%
+% The recommended way to install `scrhack' is to use
+% the package manager of your TeX distribution.
+% ======================================================================
+%
+%<*dtx>
+\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
+\ProvidesFile{scrhack.dtx}
+%</dtx>
+%<package>\providecommand\DeclareRelease[3]{}
+%<package>\providecommand\DeclareCurrentRelease[2]{}
+%<package>\DeclareRelease{v3.41}{2023-07-07}{scrhack-2023-07-07.sty}
+%<package>\DeclareCurrentRelease{}{2023-07-15}
+%<*dtx|package>
+%<package>\ProvidesPackage{scrhack}
+ [2024-09-04 v3.42
+%<dtx> sources and unpack driver of
+ scrhack emulation package]
+%</dtx|package>
+%<*dtx>
+\ifx\documentclass\undefined
+ \input docstrip.tex
+ \generate{%
+ \file{scrhack.sty}{%
+ \from{scrhack.dtx}{package}%
+ }%
+ }%
+\else
+ \let\endbatchfile\relax
+\fi
+\endbatchfile
+\documentclass[ngerman,USenglish]{koma-script-source-doc}
+\usepackage{babel}
+\usepackage{csquotes}
+\usepackage[style=alphabetic]{biblatex}
+\begin{filecontents}[force]{\jobname.bib}
+@online{pkg:koma-script,
+ author={Markus Kohm},
+ version={3.41},
+ date={2023-07-07},
+ title={{\KOMAScript} --- A bundle of versatile classes and packages},
+ url={https://ctan.org/pkg/koma-script},
+ urldate={2023-07-14},
+ note={The \KOMAScript{} bundle provides replacements for the \pkg*{article},
+ \pkg*{report}, and \pkg*{book} classes with emphasis on typography and
+ versatility. There is also a letter class.},
+}
+@manual{pkg:koma-script:manual:de,
+ author={Markus Kohm},
+ date={2023-06-16},
+ title={{\KOMAScript}},
+ subtitle={Die Anleitung},
+ url={http://mirrors.ctan.org/macros/latex/contrib/koma-script/scrguide-de.pdf},
+ urldate={2023-07-04},
+}
+@manual{pkg:koma-script:manual:en,
+ author={Markus Kohm},
+ date={2023-06-16},
+ title={{\KOMAScript}},
+ subtitle={The Guide},
+ url={http://mirrors.ctan.org/macros/latex/contrib/koma-script/scrguide-en.pdf},
+ urldate={2023-07-14},
+}
+@article{latexnews35,
+ author={{The {\LaTeX} Project Team}},
+ shortauthor={TLT},
+ year={2022},
+ month={6},
+ title={Issue 35},
+ journal={{\LaTeX} News},
+ url={http://mirrors.ctan.org/macros/latex/base/ltnews35.pdf},
+ urldate={2023-07-14},
+}
+\end{filecontents}
+\addbibresource{\jobname.bib}
+\setcounter{StandardModuleDepth}{2}
+\providecommand*{\seclabel}[1]{\label{sec:#1}}
+\begin{document}
+ \nocite{pkg:koma-script}
+ \DocInput{scrhack.dtx}
+\end{document}
+%</dtx>
+%\fi
+%
+% \changes{v0.1}{2023/07/14}{start of \KOMAScript{} spin-off}
+%
+% \GetFileInfo{scrhack.dtx}
+% \title{Emulating Former \href{https://komascript.de/}{\KOMAScript} Package
+% \pkg*{scrhack}}
+% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}}
+% \date{Version \filedate{} \fileversion}
+% \maketitle
+% \begin{abstract}
+% For several years \href{https://komascript.de/}{\KOMAScript} provided a
+% package \pkg*{scrhack}, that has been made not only to improve the
+% compatibility of third-party packages with
+% \href{https://komascript.de/}{\KOMAScript} classes, but also to generally
+% improve third-party packages. The package consisted not only in the
+% package file \file{scrhack.sty} but also in several so called \emph{hacks}
+% as separate files with extension \file{.hak}. In the course of splitting
+% off former \href{https://komascript.de/}{\KOMAScript} packages from the
+% \href{https://komascript.de/}{\KOMAScript} collection, it was decided to
+% create independent packages from the individual hacks. These new
+% independent packages then serve as replacements for the original packages
+% they were intended to improve. In addition, to preserve the functionality
+% of loading the enhancements only when the corresponding original package
+% is loaded, a new \pkg*{scrhack} was created to do just that.
+% \end{abstract}
+%
+% \tableofcontents
+%
+%\iffalse
+%<*doc>
+%\fi
+% \section{History}
+% \label{sec:history}
+Some packages from other authors do not work well with
+\href{https://komascript.de/}{\KOMAScript}. It is often very tedious for the
+author of \href{https://komascript.de/}{\KOMAScript} to convince the authors
+of these packages to make specific improvements. This also applies to packages
+whose development has been discontinued. That's why the \pkg*{scrhack} was
+created. This package alters the commands and definitions of other to work
+better with \href{https://komascript.de/}{\KOMAScript}. Some changes are also
+useful when using other classes.
+
+In the early days of \href{https://komascript.de/}{\KOMAScript}, users wanted
+to handle lists of floating environments created with the \pkg{float} package
+in the same way as the list of figures and list of tables created by
+\href{https://komascript.de/}{\KOMAScript} itself. At that time the author of
+\href{https://komascript.de/}{\KOMAScript} contacted the author of
+\pkg{float} to propose an interface to support such an enhancement. A
+somewhat modified form of that interface was implemented with the
+\cs{float@listhead} and \cs{float@addtolists} commands.
+
+Later it became apparent that these two commands were not flexible enough to
+fully support all of \href{https://komascript.de/}{\KOMAScript}'s
+capabilities. Unfortunately, the author of \pkg{float} had already ceased
+development by that point, so further changes to this package cannot be
+expected.
+
+Other package authors have also adopted these two commands, and it became
+apparent that the implementation in some packages, including \pkg{float},
+means that all these packages can only be loaded in a specific order, even
+though they are otherwise unrelated to each other.
+
+To overcome all these disadvantages and problems,
+\href{https://komascript.de/}{\KOMAScript} no longer officially supports this
+old interface. Instead, \href{https://komascript.de/}{\KOMAScript} warns if
+the old interface is used. At the same time, the \pkg{tocbasic} package has
+been designed and implemented as a central interface for managing of table of
+contents and similar content lists. This package provides many more
+advantages and features than the two old commands.
+
+Although the effort to use this package is very small, so far the authors of
+most of the packages that use the old interface have not made any adjustments.
+Therefore the \KOMAScript author designed a new
+package \pkg*{scrhack} as part of
+\href{https://komascript.de/}{\KOMAScript}. That package contained appropriate
+modifications of the packages
+\pkg{float}, \pkg{floatrow}, \pkg{listings}, and later on also for
+\pkg{nomencl} and some others not related to that interface. Merely loading
+\pkg*{scrhack} was sufficient to make these packages recognize not only the
+setting of the \href{https://komascript.de/}{\KOMAScript} option \opt{listof},
+but, e.g., also to react to the language switching features of the
+\pkg{babel} package. You can find more information
+about the features available by switching packages to \pkg{tocbasic} in
+\autocite{pkg:koma-script:manual:en} or \autocite{pkg:koma-script:manual:de}.
+
+With release of version 3.42 package \pkg*{scrhack} has been removed from
+\href{https://komascript.de/}{\KOMAScript}. The code of the former package has
+been split into several standalone packages, that can be loaded individually
+if needed. However, for compatibility and maybe for convenience there is also
+a new standalone package \pkg*{scrhack} almost compatible with the old
+one.
+
+\section{Using \texorpdfstring{\pkg*{scrhack}}{scrhack}}
+\seclabel{usage}
+
+It is recommended to load the \pkg*{scrhack} package using:
+\begin{verbatim}
+ \usepackage{scrhack}
+\end{verbatim}
+as early as possible. In particular, loading should be done before the
+affected packages. The package also provides several options, one for each
+hack. Usually the options are named identically to the package, that is
+patched by the hack. All these options are boolean options. You can switch
+such an option on assigning value \optvalue{true} or using it without
+value. You can switch off such an option assigning value
+\optvalue{false}. Switching off an option means to not automatically load the
+corresponding enhancement package after the package, that has to be
+patched. Therefore switching off an option results in not patching the
+corresponding package.
+
+\paragraph{Notes:}
+\begin{itemize}
+\item From version 3.42, you cannot use \cs{KOMAoptions} or \cs{KOMAoption}
+ any longer to change the options. Instead loading \pkg*{scrhack} again with
+ other options does not result in an option clash, but in a change of the
+ option settings.
+\item Switching off an option of an already loaded enhancement package is
+ ignored (with warning). It does not unload the enhancement package or switch
+ back to a not patched functionality.
+\item Switching on an option of a not yet loaded enhancement package would
+ result in loading the enhancement package.
+\item From version 3.42, you should no longer load package
+ \pkg*{scrhack}. Instead you can and should simply load the individual
+ enhancement package when you need it.
+\item If you need the old legacy version of \pkg*{scrhack} from
+ \href{https://komascript.de/}{\KOMAScript} 3.41 you can use:
+\begin{verbatim}
+ \usepackage{scrhack}[=2023-07-07]
+\end{verbatim}
+ or
+\begin{verbatim}
+ \usepackage{scrhack}[=v3.41]
+\end{verbatim}
+ However, this depends on internal packages of
+ \href{https://komascript.de/}{\KOMAScript}.
+\item The hacks of the legacy version have been frozen. So the
+ hacks may break with packages or \LaTeX{} versions released after
+ 2023-07-07. There is no support for such combinations!
+\item Loading the legacy version more than once with different option setting
+ still results in option clash errors.
+\end{itemize}
+
+\paragraph{Available options with \pkg*{scrhack}:}
+\begin{description}
+\item[\opt{float=\meta{boolean}}:]
+ \DescribeOption[noprint]{float=\meta{boolean}}%
+ \hfill initial: \optvalue{true}, default: \optvalue{true}\\
+ After package \pkg{float} is loaded, load also package \pkg{floatbytocbasic}
+ to fix the issue explained in \autoref{sec:history}. This also provides the
+ full functionality of \pkg{tocbasic} to \pkg{float}.
+\item[\opt{floatrow=\meta{boolean}}:]
+ \DescribeOption[noprint]{floatrow=\meta{boolean}}%
+ \hfill initial: \optvalue{true}, default: \optvalue{true}\\
+ After package \pkg{floatrow} is loaded, load also package
+ \pkg{floatbytocbasic} to fix the issue explained in
+ \autoref{sec:history}. This also provides the full functionality of
+ \pkg{tocbasic} to \pkg{floatrow}.
+\item[\opt{hyperref=\meta{boolean}}:]
+ \DescribeOption[noprint]{hyperref=\meta{boolean}}%
+ \hfill
+ \marginline{\raisebox{\dimexpr\ht\strutbox-\height\relax}{\Huge\textcolor{red}{!}}}%
+ initial: \optvalue{false}, default: \optvalue{true}\\
+ Option \opt{hyperref} is deprecated. It is implemented for compatibility
+ reasons only. Using \opt{hyperref} without value or \opt{hyperref=true}
+ results in a warning. Using \opt{hyperref=false} results in an info only.
+\item[\opt{listings=\meta{boolean}}:]
+ \DescribeOption[noprint]{listings=\meta{boolean}}%
+ \hfill
+ \marginline{\raisebox{\dimexpr\ht\strutbox-\height\relax}{\Huge\textcolor{red}{!}}}%
+ initial: \optvalue{false}, default: \optvalue{true}\\
+ Option \opt{listings} is deprecated. It is implemented for compatibility
+ reasons only. Using \opt{listings} without value or \opt{listings=true}
+ results in a warning. Using \opt{listings=false} results in an info only.
+\item[\opt{lscape=\meta{boolean}}:]
+ \DescribeOption[noprint]{lscape=\meta{boolean}}%
+ \hfill initial: \optvalue{true}, default: \optvalue{true}\\
+ After package \pkg{lscape} is loaded, load also package
+ \pkg{lscapeenhanced} to fix an issue with detection of text height for
+ some packages like \pkg{scrlayer} and \pkg{showframe}.
+\item[\opt{nomencl=\meta{boolean}}:]
+ \DescribeOption[noprint]{nomencl=\meta{boolean}}%
+ \hfill
+ \marginline{\raisebox{\dimexpr\ht\strutbox-\height\relax}{\Huge\textcolor{red}{!}}}%
+ initial: \optvalue{false}, default: \optvalue{true}\\
+ Option \opt{nomencl} is deprecated. It is implemented for compatibility
+ reasons only. Using \opt{nomencl} without value or \opt{nomencl=true}
+ results in a warning. Using \opt{nomencl=false} results in an info only.
+\item[\opt{setspace=\meta{boolean}}:]
+ \DescribeOption[noprint]{setspace=\meta{boolean}}%
+ \hfill initial: \optvalue{true}, default: \optvalue{true}\\
+ After package \pkg{setspace} is loaded, load also package
+ \pkg{setspaceenhanced} with the same options plus options \opt{byselectfont}
+ and \opt{keepfontsize}.
+\item[\opt{standardsectioning=\meta{boolean}}:]
+ \DescribeOption[noprint]{standardsectioning=\meta{boolean}}%
+ \hfill initial: \optvalue{false}, default: \optvalue{true}\\
+ Load package \pkg{standardsectioning} to (re-)define the sectioning commands
+ using the code from the standard classes. If \pkg*{scrhack} is loaded
+ \emph{before} any class\footnote{This is detected heuristic by definition of
+ \cs{normalsize}. If \cs{normalsize} contains \cs{@latex@error} no class
+ has been loaded.} the definition is delayed until a class has been loaded.
+\end{description}
+
+\paragraph{Available options with the legacy version:}
+\begin{description}
+\item[\opt{float=\meta{boolean}}:] \hfill
+ initial: \optvalue{true}, default: \optvalue{true}\\
+ After package \pkg{float} is loaded, load \file{float.hak} to fix the issue
+ explained in \autoref{sec:history}. This also provides the full
+ functionality of \pkg{tocbasic} to \pkg{float}.
+\item[\opt{floatrow=\meta{boolean}}:] \hfill
+ initial: \optvalue{true}, default: \optvalue{true}\\
+ After package \pkg{floatrow} is loaded, load \file{floatrow.hak} to fix the
+ issue explained in \autoref{sec:history}. This also provides the full
+ functionality of \pkg{tocbasic} to \pkg{floatrow}.
+\item[\opt{hyperref=\meta{boolean}}:] \hfill
+ initial: \optvalue{true}, default: \optvalue{true}\\
+ Versions of \pkg{hyperref} before 6.79h set the link anchors after the
+ heading of the starred versions of commands like \cs{part*}, \cs{chapter*},
+ etc. instead of before them. Since then, this problem has been resolved at
+ the suggestion of \KOMAScript's author. But because the change took more
+ than a year, a patch was added to \pkg*{scrhack}. Although this can also be
+ deactivated with \opt{hyperref=false}, you should instead use an up-to-date
+ \pkg{hyperref} release. In this case the legacy version of \pkg*{scrhack}
+ automatically deactivates this unnecessary patch.
+\item[\opt{listings=\meta{boolean}}:] \hfill
+ initial: \optvalue{true}, default: \optvalue{true}\\
+ After package \pkg{listings} is loaded, load \file{listings.hak} to fix the
+ issue explained in \autoref{sec:history}. This also provides the full
+ functionality of \pkg{tocbasic} to old versions of \pkg{listings}. With
+ newer versions, also the legacy version of \pkg*{scrhack} automatically
+ deactivates this unnecessary patch.
+\item[\opt{lscape=\meta{boolean}}:] \hfill
+ initial: \optvalue{true}, default: \optvalue{true}\\
+ The \pkg{lscape} package defines a \env{landscape} environment to set the
+ page contents, but not the header or footer in landscape mode. Inside this
+ environment, \len{textheight}is set to the value of \len{textwidth}, but
+ \len{textwidth} is not set to the former value of \len{textheight}. This is
+ inconsistent. As far as I know, \len{textwidth} is left unchanged because
+ setting it to \len{textheight} could interfere with other packages or user
+ commands. But changing \len{textheight} also has this potential, and indeed
+ it breaks, for example, \pkg{showframe} and \pkg{scrlayer}. Thus it would be
+ best if \len{textheight} too remained unchanged. After package \pkg{lscape}
+ is loaded, the legacy version of \pkg*{scrhack} loads \file{lscape.hak},
+ that uses the \pkg{xpatch} package to modify the \env{landscape}
+ environment's start macro \cs{landscape} appropriately.
+
+ Incidentally, the \pkg{pdflscape} package also uses \pkg{lscape}, so this
+ option affects the functioning of this package too.
+\item[\opt{nomencl=\meta{boolean}}:] \hfill
+ initial: \optvalue{true}, default: \optvalue{true}\\
+ After package \pkg{nomencl} is loaded, load \file{nomencl.hak} to fix the
+ issue explained in \autoref{sec:history}. This is a little bit more
+ complicated, because the \pkg*{nomencl} author has also adapted his
+ package to support \pkg{tocbasic}. So additional versions checks are done.
+\item[\opt{setspace=\meta{boolean}}:] \hfill
+ initial: \optvalue{true}, default: \optvalue{true}\\
+ Some packages assume that the class-internal macro \cs{@ptsize} both is
+ defined and expands to an integer. For compatibility,
+ \href{https://komascript.de/}{\KOMAScript} defines \cs{@ptsize} even if the
+ basic font size is something other than 10\,pt, 11\,pt, or 12\,pt.
+ \href{https://komascript.de/}{\KOMAScript} also allows non-integer font
+ sizes. So \cs{@ptsize} can, of course, also expand to a non-integer number.
+
+ One of the packages that cannot cope with a non-integer \cs{@ptsize} is
+ \pkg{setspace}. Additionally, the values set by this package are always
+ dependent on the basic font size, even if the setting is made in the context
+ of another font size. The legacy version of \pkg{scrhack} loads the hack
+ \file{setspace.hak} after package \pkg{setspace} to solves both problems by
+ redefining \cs{onehalfspacing} and \cs{doublespacing} to set the spacing
+ relative to the actual font size.
+
+ \textbf{Note:} if you use \pkg{setspace} with either the
+ \opt{onehalfspacing} or \opt{doublespacing} option, you must load
+ \pkg*{scrhack} first.
+\item[\opt{standardsections=\meta{boolean}}] \hfill
+ initial: \optvalue{false}, default: \optvalue{true}\\
+ Various packages assume that the sectioning commands are defined in a
+ specific way, corresponding to the definitions in the standard classes. But
+ for some classes this is not the case. For example, the
+ \href{https://komascript.de/}{\KOMAScript} classes use a completely
+ different implementation to provide many additional features. But this can
+ cause problems for packages that depend on the definition of the standard
+ classes. The legacy version of \pkg*{scrhack} offers the option to force
+ the sectioning commands \cs{part}, \cs{chapter}, \cs{section},
+ \cs{subsection}, \cs{subsubsection}, \cs{paragraph}, and \cs{subparagraph}
+ to be compatible with those in the standard classes. When \cs{chapter} is
+ defined, the definitions are based on those in \cls{book}. When \cs{chapter}
+ is undefined, the definitions of \cls{article} are used.
+
+ If you are using a \href{https://komascript.de/}{\KOMAScript} class, several
+ features of these classes are also deactivated as side effect. For example,
+ the commands to define or modify sectioning commands or option
+ \opt{headings} are no longer available, and commands like \cs{partformat}
+ have different defaults.
+
+ Because this hack has the potential to do more harm than good, it issues
+ several warnings. Also it is not activated simply by loading the legacy
+ version of \pkg*{scrhack} package. If you want to use it, you must explicitly
+ activate this option when you load the package. Late activation or
+ deactivation is not supported.
+
+ Since there are often less invasive solutions to fix the problem of package
+ incompatibilities, using this hack is not recommended. It is provided only
+ as a last resort for emergencies.
+\end{description}
+%
+% \iffalse
+%</doc>
+% \fi
+%
+% \MaybeStop{\printbibliography[heading=bibintoc]\PrintIndex}
+%
+% \iffalse
+%<*package>
+%<@@=scrhack>
+% \fi
+% \section{Implementation}
+%
+% Because \pkg*{scrhack} is not longer a
+% \href{https://komascript.de/}{\KOMAScript} package, it does not use the
+% \texttt{KOMA} family for options any longer. Instead it uses the new
+% \LaTeX{} kernel feature of key-value-options introduced in
+% \autocite{latexnews35}. So we need at least \LaTeX{} 2022-06-01:
+% \begin{macrocode}
+\ifnum 0=\ifcsname IfFormatAtLeastTF\endcsname
+ \IfFormatAtLeastTF{2022-06-01}{1}{0}%
+ \else
+ 0%
+ \fi\relax
+ \PackageError{scrhack}{LaTeX kernel too old}{%
+ The package needs at least LaTeX 2022-06-01.\MessageBreak
+ This error is fatal. Loading will be aborted.%
+ }%
+ \endinput
+\fi
+\ExplSyntaxOn
+% \end{macrocode}
+%
+% \subsection{Messages}
+%
+% We need some messages, that are not specific for only one use-case.
+% \begin{itemize}
+% \item If an option is ignored, because it cannot be handled after already
+% loading the enhancement package. \#1 is the name option, \#2 is the
+% enhancement package.
+% \end{itemize}
+% \begin{macrocode}
+\msg_new:nnn { scrhack } { option-too-late }
+ {
+ option~`#1'~after~loading~package~`#2'~ignored.
+ }
+% \end{macrocode}
+% \begin{itemize}
+% \item If an option is ignored, because it is deprecated.
+% \end{itemize}
+% \begin{macrocode}
+\msg_new:nnn { scrhack } { deprecated-option }
+ {
+ deprecated~option~`#1'~ignored.
+ }
+% \end{macrocode}
+%
+% \subsection{Emulating \file{float.hak}}
+% First we declare the options using the new key-value interface:
+% \begin{macrocode}
+\DeclareKeys{%
+ float .code = \@@_switch_float:n { #1 },
+ float .default:n = true,
+ float .usage = preamble,
+}
+% \end{macrocode}
+%
+% \ExplSyntaxOn
+% \begin{macro}{\__scrhack_switch_float:n}
+% \ExplSyntaxOff
+% This is used to switch the state and add or remove the hook if needed. A new
+% boolean is used to know, whether the hook has been put. Using
+% \opt{float=true}, if package \pkg{floatbytocbasic} already has been loaded
+% isn't a foul. So we just write an information to the \file{log}. But using
+% \opt{float=false}, if package \pkg{floatbytocbasic} already has been loaded
+% may be wrong. So we use a warning message. We also warn if a not allowed
+% value is used.
+% \begin{macrocode}
+\bool_new:N \@@_float_bool
+
+\cs_new:Nn \@@_switch_float:n
+ {
+ \str_case_e:nnF { \str_foldcase:n { #1 } }
+ {
+ {true} {
+ \@ifpackageloaded { floatbytocbasic }
+ {
+ \msg_info:nnnn { scrhack } { option-too-late }
+ { float = true } { floatbytocbasic }
+ }
+ {
+ \bool_if:NF \@@_float_bool
+ {
+ \hook_gput_code:nnn { package/float/after } { scrhack }
+ {
+ \RequirePackage { floatbytocbasic }
+ }
+ \bool_gset_true:N \@@_float_bool
+ }
+ }
+ }
+ {false} {
+ \@ifpackageloaded { floatbytocbasic }
+ {
+ \msg_warning:nnnn { scrhack } { option-too-late }
+ { float=false } { floatbytocbasic }
+ }
+ {
+ \bool_if:NT \@@_float_bool
+ {
+ \hook_gremove_code:nn { package/float/after } { scrhack }
+ }
+ \bool_gset_false:N \@s@_float_bool
+ }
+ }
+ }
+ {
+ \msg_warning:nnn { keys } { boolean-values-only } { float }
+ }
+ }
+\SetKeys{float=true}
+% \end{macrocode}
+% \end{macro}
+% \ExplSyntaxOff
+%
+% \subsection{Emulating \file{floatrow.hak}}
+% First we declare the options using the new key-value interface:
+% \begin{macrocode}
+\DeclareKeys{%
+ floatrow .code = \@@_switch_floatrow:n { #1 },
+ floatrow .default:n = true,
+ floatrow .usage = preamble,
+}
+% \end{macrocode}
+%
+% \ExplSyntaxOn
+% \begin{macro}{\__scrhack_switch_floatrow:n}
+% \ExplSyntaxOff
+% This is used to switch the state and add or remove the hook if needed. A new
+% boolean is used to know, whether the hook has been put. Using
+% \opt{floatrow=true}, if package \pkg{floatrowbytocbasic} already has been
+% loaded isn't a foul. So we just write an information to the \file{log}. But
+% using \opt{floatrow=false}, if package \pkg{floatrowbytocbasic} already has
+% been loaded may be wrong. So we use a warning message. We also warn if a not
+% allowed value is used.
+% \begin{macrocode}
+\bool_new:N \@@_floatrow_bool
+
+\cs_new:Nn \@@_switch_floatrow:n
+ {
+ \str_case_e:nnF { \str_foldcase:n { #1 } }
+ {
+ {true} {
+ \@ifpackageloaded { floatrowbytocbasic }
+ {
+ \msg_info:nnnn { scrhack } { option-too-late }
+ { floatrow = true } { floatrowbytocbasic }
+ }
+ {
+ \bool_if:NF \@@_floatrow_bool
+ {
+ \hook_gput_code:nnn { package/floatrow/after }
+ { scrhack }
+ {
+ \RequirePackage { floatrowbytocbasic }
+ }
+ \bool_gset_true:N \@@_floatrow_bool
+ }
+ }
+ }
+ {false} {
+ \@ifpackageloaded { floatrowbytocbasic }
+ {
+ \msg_warning:nnnn { scrhack } { option-too-late }
+ { floatrow=false } { floatrowbytocbasic }
+ }
+ {
+ \bool_if:NT \@@_floatrow_bool
+ {
+ \hook_gremove_code:nn { package/floatrow/after }
+ { scrhack }
+ }
+ \bool_gset_false:N \@s@_floatrow_bool
+ }
+ }
+ }
+ {
+ \msg_warning:nnn { keys } { boolean-values-only } { floatrow }
+ }
+ }
+\SetKeys{floatrow=true}
+% \end{macrocode}
+% \end{macro}
+% \ExplSyntaxOff
+%
+% \subsection{Emulating \file{hyperref.hak}}
+%
+% First we declare the options using the new key-value interface:
+% \begin{macrocode}
+\DeclareKeys{%
+ hyperref .code = \@@_switch_hyperref:n { #1 },
+ hyperref .default:n = true,
+ hyperref .usage = preamble,
+}
+% \end{macrocode}
+%
+% \ExplSyntaxOn
+% \begin{macro}{\__scrhack_switch_hyperref:n}
+% \ExplSyntaxOff
+% This is somehow special, because the hack is deprecated. It only has been
+% needed for \pkg{hyperref} versions released before 2009-11-24, which would
+% not work with the \LaTeX{} kernel version needed by this version of
+% \pkg*{scrhack}. So emulating the hack does not make sense. Instead the
+% initial value of the option is changed to implicit \optvalue{false} and
+% switching it on explicitly does result in a warning.
+% \begin{macrocode}
+\cs_new:Nn \@@_switch_hyperref:n
+ {
+ \str_case_e:nnF { \str_foldcase:n { #1 } }
+ {
+ {true} {
+ \msg_warning:nnn { scrhack } { deprecated-option }
+ { hyperref=#1 }
+ }
+ {false} {
+ \msg_info:nnn { scrhack } { deprecated-option }
+ { hyperref=#1 }
+ }
+ }
+ {
+ \msg_warning:nnn { keys } { boolean-values-only } { hyperref }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+% \ExplSyntaxOff
+%
+% \subsection{Emulating \file{listings.hak}}
+% First we declare the options using the new key-value interface:
+% \begin{macrocode}
+\DeclareKeys{%
+ listings .code = \@@_switch_listings:n { #1 },
+ listings .default:n = true,
+ listings .usage = preamble,
+}
+% \end{macrocode}
+%
+% \ExplSyntaxOn
+% \begin{macro}{\__scrhack_switch_listings:n}
+% \ExplSyntaxOff
+% This is somehow special, because the hack is deprecated. It only has
+% been needed for \pkg{listings} version released before 2024-02-15. So
+% instead of using any patch hacks, users should update \pkg{listings}. So
+% emulating the hack does not make sense. Instead the initial value of the
+% option is changed to implicit \optvalue{false} and switching it on
+% explicitly does result in a warning.
+% \begin{macrocode}
+\cs_new:Nn \@@_switch_listings:n
+ {
+ \str_case_e:nnF { \str_foldcase:n { #1 } }
+ {
+ {true} {
+ \msg_warning:nnn { scrhack } { deprecated-option }
+ { listings=#1 }
+ }
+ {false} {
+ \msg_info:nnn { scrhack } { deprecated-option }
+ { listings=#1 }
+ }
+ }
+ {
+ \msg_warning:nnn { keys } { boolean-values-only } { listings }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+% \ExplSyntaxOff
+%
+% \subsection{Emulating \file{lscape.hak}}
+% First we declare the options using the new key-value interface:
+% \begin{macrocode}
+\DeclareKeys{%
+ lscape .code = \@@_switch_lscape:n { #1 },
+ lscape .default:n = true,
+ lscape .usage = preamble,
+}
+% \end{macrocode}
+%
+% \ExplSyntaxOn
+% \begin{macro}{\__scrhack_switch_lscape:n}
+% \ExplSyntaxOff
+% This is used to switch the state and add or remove the hook if needed. A new
+% boolean is used to know, whether the hook has been put. Using
+% \opt{lscape=true}, if package \pkg{lscapeenhanced} already has been
+% loaded isn't a foul. So we just write an information to the \file{log}. But
+% using \opt{lscape=false}, if package \pkg{lscapeenhanced} already has
+% been loaded may be wrong. So we use a warning message. We also warn if a not
+% allowed value is used.
+% \begin{macrocode}
+\bool_new:N \@@_lscape_bool
+
+\cs_new:Nn \@@_switch_lscape:n
+ {
+ \str_case_e:nnF { \str_foldcase:n { #1 } }
+ {
+ {true} {
+ \@ifpackageloaded { lscapeenhanced }
+ {
+ \msg_info:nnnn { scrhack } { option-too-late }
+ { lscape = true } { lscapeenhanced }
+ }
+ {
+ \bool_if:NF \@@_lscape_bool
+ {
+ \hook_gput_code:nnn { package/lscape/after }
+ { scrhack }
+ {
+ \RequirePackage { lscapeenhanced }
+ }
+ \bool_gset_true:N \@@_lscape_bool
+ }
+ }
+ }
+ {false} {
+ \@ifpackageloaded { lscapeenhanced }
+ {
+ \msg_warning:nnnn { scrhack } { option-too-late }
+ { lscape=false } { lscapeenhanced }
+ }
+ {
+ \bool_if:NT \@@_lscape_bool
+ {
+ \hook_gremove_code:nn { package/lscape/after }
+ { scrhack }
+ }
+ \bool_gset_false:N \@s@_lscape_bool
+ }
+ }
+ }
+ {
+ \msg_warning:nnn { keys } { boolean-values-only } { lscape }
+ }
+ }
+\SetKeys{lscape=true}
+% \end{macrocode}
+% \end{macro}
+% \ExplSyntaxOff
+%
+% \subsection{Emulating \file{nomencl.hak}}
+%
+% First we declare the options using the new key-value interface:
+% \begin{macrocode}
+\DeclareKeys{%
+ nomencl .code = \@@_switch_nomencl:n { #1 },
+ nomencl .default:n = true,
+ nomencl .usage = preamble,
+}
+% \end{macrocode}
+%
+% \ExplSyntaxOn
+% \begin{macro}{\__scrhack_switch_nomencl:n}
+% \ExplSyntaxOff
+% This is somehow special, because the hack is deprecated. It only has been
+% needed for \pkg{nomencl} versions released before 2019-01-23. So updating
+% the package would be the better \emph{hack}. So emulating the hack does not
+% make sense. Instead the initial value of the option is changed to implicit
+% \optvalue{false} and switching it on explicitly does result in a warning.
+% \begin{macrocode}
+\cs_new:Nn \@@_switch_nomencl:n
+ {
+ \str_case_e:nnF { \str_foldcase:n { #1 } }
+ {
+ {true} {
+ \msg_warning:nnn { scrhack } { deprecated-option }
+ { nomencl=#1 }
+ }
+ {false} {
+ \msg_info:nnn { scrhack } { deprecated-option }
+ { nomencl=#1 }
+ }
+ }
+ {
+ \msg_warning:nnn { keys } { boolean-values-only } { nomencl }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+% \ExplSyntaxOff
+%
+%
+% \subsection{Emulating \file{setspace.hak}}
+% First we declare the options using the new key-value interface:
+% \begin{macrocode}
+\DeclareKeys{%
+ setspace .code = \@@_switch_setspace:n { #1 },
+ setspace .default:n = true,
+ setspace .usage = preamble,
+}
+% \end{macrocode}
+%
+% \ExplSyntaxOn
+% \begin{macro}{\__scrhack_switch_setspace:n}
+% \ExplSyntaxOff
+% This is used to switch the state and add or remove the hook if needed. A new
+% boolean is used to know, whether the hook has been put. Using
+% \opt{setspace=true}, if package \pkg{setspaceenhanced} already has been loaded
+% isn't a foul. So we just write an information to the \file{log}. But using
+% \opt{setspace=false}, if package \pkg{setspaceenhanced} already has been loaded
+% may be wrong. So we use a warning message. We also warn if a not allowed
+% value is used.
+% \begin{macrocode}
+\bool_new:N \@@_setspace_bool
+
+\cs_new:Nn \@@_switch_setspace:n
+ {
+ \str_case_e:nnF { \str_foldcase:n { #1 } }
+ {
+ {true} {
+ \@ifpackageloaded { setspaceenhanced }
+ {
+ \msg_info:nnnn { scrhack } { option-too-late }
+ { setspace = true } { setspaceenhanced }
+ }
+ {
+ \bool_if:NF \@@_setspace_bool
+ {
+ \hook_gput_code:nnn { package/setspace/after } { scrhack }
+ {
+ \exp_last_unbraced:Ne \RequirePackage
+ {
+ [ \use:c { @raw@opt@setspace.sty },
+ byselectfont,
+ keepfontsize ]
+ }
+ { setspaceenhanced }
+ }
+ \bool_gset_true:N \@@_setspace_bool
+ }
+ }
+ }
+ {false} {
+ \@ifpackageloaded { setspaceenhanced }
+ {
+ \msg_warning:nnnn { scrhack } { option-too-late }
+ { setspace=false } { setspaceenhanced }
+ }
+ {
+ \bool_if:NT \@@_setspace_bool
+ {
+ \hook_gremove_code:nn { package/setspace/after } { scrhack }
+ }
+ \bool_gset_false:N \@s@_setspace_bool
+ }
+ }
+ }
+ {
+ \msg_warning:nnn { keys } { boolean-values-only } { setspace }
+ }
+ }
+\SetKeys{setspace=true}
+% \end{macrocode}
+% \end{macro}
+% \ExplSyntaxOff
+%
+% \subsection{Emulating \file{standardsectioning.hak}}
+% First we declare the options using the new key-value interface:
+% \begin{macrocode}
+\DeclareKeys{%
+ standardsections .code = \@@_switch_standardsectioning:n { #1 },
+ standardsections .default:n = true,
+ standardsections .usage = preamble,
+}
+% \end{macrocode}
+%
+% \ExplSyntaxOn
+% \begin{macro}{\__scrhack_switch_standardsectioning:n}
+% \ExplSyntaxOff
+% This is used to switch the state and add or remove the hook if needed. A new
+% boolean is used to know, whether the hook has been put. Using
+% \opt{standardsectioning=true}, if package \pkg{standardsectioning}
+% already has been loaded isn't a foul. So we just write an information to the
+% \file{log}. But using \opt{standardsectioning=false}, if package
+% \pkg{standardsectioning} already has been loaded may be wrong. So
+% we use a warning message. We also warn if a not allowed value is used.
+% \begin{macrocode}
+\bool_new:N \@@_standardsectioning_bool
+
+\cs_new:Nn \@@_switch_standardsectioning:n
+ {
+ \str_case_e:nnF { \str_foldcase:n { #1 } }
+ {
+ {true} {
+ \@ifpackageloaded { standardsectioning }
+ {
+ \msg_info:nnnn { scrhack } { option-too-late }
+ { standardsectioning = true } { standardsectioning }
+ }
+ {
+ \bool_if:NF \@@_standardsectioning_bool
+ {
+ \str_set:Nx \l_tmpa_str { \cs_meaning:N \normalsize }
+ \str_if_in:NnTF
+ \l_tmpa_str
+ { \@latex@error }
+ {
+ \hook_gput_code:nnn { class/after } { scrhack }
+ {
+ \RequirePackage { standardsectioning }
+ \exp_args:Nnnx \hook_gput_code:nnn
+ { begindocument/before } { scrhack }
+ {
+ \exp_not:N \cs_gset:Npn
+ \exp_after:wN \exp_not:N
+ \cs:w ver@standardsectioning.sty \cs_end:
+ {
+ \cs:w ver@standardsectioning.sty \cs_end:
+ }
+ }
+ \cs_undefine:c { var@standardsectioning.sty }
+ }
+ \bool_gset_true:N \@@_standardsectioning_bool
+ }
+ {
+ \RequirePackage{ standardsectioning }
+ \bool_gset_false:N \@@_standardsectioning_bool
+ }
+ }
+ }
+ }
+ {false} {
+ \@ifpackageloaded { standardsectioning }
+ {
+ \msg_warning:nnnn { scrhack } { option-too-late }
+ { standardsectioning=false } { standardsectioning }
+ }
+ {
+ \bool_if:NT \@@_standardsectioning_bool
+ {
+ \hook_gremove_code:nn { class/after } { scrhack }
+ }
+ \bool_gset_false:N \@s@_standardsectioning_bool
+ }
+ }
+ }
+ {
+ \msg_warning:nnn { keys } { boolean-values-only } { standardsectioning }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+% \ExplSyntaxOff
+%
+%
+%
+% \subsection{Processing the options}
+% Last but not least, we set the defaults and process the options.
+% \begin{macrocode}
+\ExplSyntaxOff
+\ProcessKeyOptions\relax
+% \end{macrocode}
+%
+% \iffalse
+%</package>
+% \fi
+%
+% \Finale
+% \PrintChanges
+%
+% \endinput
+% Local Variables:
+% mode: doctex
+% ispell-local-dictionary: "en_US"
+% eval: (flyspell-mode 1)
+% TeX-master: t
+% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx"))
+% End:
diff --git a/macros/latex/contrib/scrhack/scrhack.pdf b/macros/latex/contrib/scrhack/scrhack.pdf
new file mode 100644
index 0000000000..7766207b57
--- /dev/null
+++ b/macros/latex/contrib/scrhack/scrhack.pdf
Binary files differ
diff --git a/macros/latex/contrib/se2thesis/CHANGELOG.md b/macros/latex/contrib/se2thesis/CHANGELOG.md
index 2d81b57f6f..bc9d84afe9 100644
--- a/macros/latex/contrib/se2thesis/CHANGELOG.md
+++ b/macros/latex/contrib/se2thesis/CHANGELOG.md
@@ -7,6 +7,20 @@ and this project adheres to
## [Unreleased]
+## [v4.3.4] – 2024–09–19
+
+### Fixed
+
+- Align logo on the right side regardless of the logo size (#22), thanks to
+ @wolfoo2931
+
+## [v4.3.3] – 2024–09–18
+
+### Added
+
+- Load the `mismath` package before the `unicode-math` package, which is
+ recommended according to `mismath`'s documentation.
+
## [v4.3.2] – 2024–08–12
### Fixed
@@ -267,7 +281,9 @@ These changes might be breaking changes!
### Added
- First official release
-[Unreleased]: https://github.com/se2p/se2thesis/compare/v4.3.2...HEAD
+[Unreleased]: https://github.com/se2p/se2thesis/compare/v4.3.4...HEAD
+[v4.3.4]: https://github.com/se2p/se2thesis/compare/v4.3.4...v4.3.3
+[v4.3.3]: https://github.com/se2p/se2thesis/compare/v4.3.3...v4.3.2
[v4.3.2]: https://github.com/se2p/se2thesis/compare/v4.3.2...v4.3.1
[v4.3.1]: https://github.com/se2p/se2thesis/compare/v4.3.1...v4.3.0
[v4.3.0]: https://github.com/se2p/se2thesis/compare/v4.3.0...v4.2.0
diff --git a/macros/latex/contrib/se2thesis/se2colors.dtx b/macros/latex/contrib/se2thesis/se2colors.dtx
index 7b0b5d81f7..20985382c8 100644
--- a/macros/latex/contrib/se2thesis/se2colors.dtx
+++ b/macros/latex/contrib/se2thesis/se2colors.dtx
@@ -231,7 +231,7 @@
%
% Identify the package and give the overall version information.
% \begin{macrocode}
-\ProvidesExplPackage {se2colors} {2024-08-12} {4.3.2}
+\ProvidesExplPackage {se2colors} {2024-09-19} {4.3.4}
{A colour support package for the se2thesis bundle}
% \end{macrocode}
%
diff --git a/macros/latex/contrib/se2thesis/se2fonts.dtx b/macros/latex/contrib/se2thesis/se2fonts.dtx
index 5ede585b75..728998f60b 100644
--- a/macros/latex/contrib/se2thesis/se2fonts.dtx
+++ b/macros/latex/contrib/se2thesis/se2fonts.dtx
@@ -151,7 +151,7 @@
%
% Identify the package and give the overall version information.
% \begin{macrocode}
-\ProvidesExplPackage {se2fonts} {2024-08-12} {4.3.2}
+\ProvidesExplPackage {se2fonts} {2024-09-19} {4.3.4}
{A font-selection support package for the se2thesis bundle}
% \end{macrocode}
%
@@ -214,6 +214,12 @@
%
% \subsection{Font loading}
%
+% Load the \pkg{mismath} package, which itself loads \pkg{mathtools} and
+% transitively \pkg{amsmath} \emph{before} \pkg{unicode-math}.
+% \begin{macrocode}
+\RequirePackage{mismath}
+% \end{macrocode}
+%
% Depending on the engine used by the user,
% we can use \pkg{fontspec} for loading fonts.
% \begin{macrocode}
diff --git a/macros/latex/contrib/se2thesis/se2packages.dtx b/macros/latex/contrib/se2thesis/se2packages.dtx
index 3ad8d99b0a..f71e589180 100644
--- a/macros/latex/contrib/se2thesis/se2packages.dtx
+++ b/macros/latex/contrib/se2thesis/se2packages.dtx
@@ -472,7 +472,7 @@
%
% Identify the package and give the overall version information.
% \begin{macrocode}
-\ProvidesExplPackage {se2packages} {2024-08-12} {4.3.2}
+\ProvidesExplPackage {se2packages} {2024-09-19} {4.3.4}
{Supporting packages for the se2thesis bundle}
% \end{macrocode}
%
diff --git a/macros/latex/contrib/se2thesis/se2thesis-master-thesis-example.pdf b/macros/latex/contrib/se2thesis/se2thesis-master-thesis-example.pdf
index 4d224fe981..822b87ed30 100644
--- a/macros/latex/contrib/se2thesis/se2thesis-master-thesis-example.pdf
+++ b/macros/latex/contrib/se2thesis/se2thesis-master-thesis-example.pdf
Binary files differ
diff --git a/macros/latex/contrib/se2thesis/se2thesis.dtx b/macros/latex/contrib/se2thesis/se2thesis.dtx
index 6d29f97482..6129c3e6d6 100644
--- a/macros/latex/contrib/se2thesis/se2thesis.dtx
+++ b/macros/latex/contrib/se2thesis/se2thesis.dtx
@@ -654,7 +654,7 @@
%
% Identify the class and give the overall version number.
% \begin{macrocode}
-\ProvidesExplClass {se2thesis} {2024-08-12} {4.3.2}
+\ProvidesExplClass {se2thesis} {2024-09-19} {4.3.4}
{A thesis class for the Chair of Software Engineering II}
% \end{macrocode}
%
@@ -1171,10 +1171,9 @@
\DeclareNewLayer[
mode=picture,
foreground,
- align=tr,
- hoffset=\oddsidemargin+1.5in+\textwidth,
+ hoffset=\paperwidth-\coverpagerightmargin-\box_wd:N \l_@@_logo_box,
voffset=\coverpagetopmargin+1.5in+\ht\strutbox,
- width=\textwidth - \box_wd:N \l_@@_logo_box,
+ width=\box_wd:N \l_@@_logo_box,
height=\box_ht:N \l_@@_logo_box,
contents={\putUL{\box_use:N \l_@@_logo_box}},
]{title.seii.logo}
@@ -1731,7 +1730,7 @@
% We provide the following English translations.
%
% \begin{macrocode}
-\ProvideDictionaryFor{English}{se2translations}[2024/08/12]
+\ProvideDictionaryFor{English}{se2translations}[2024/09/19]
\ProvideDictTranslation{abstract}{abstract}
\ProvideDictTranslation{Abstract}{Abstract}
\ProvideDictTranslation{acknowledgement}{acknowledgement}
@@ -1782,7 +1781,7 @@
% We provide the following German translations.
%
% \begin{macrocode}
-\ProvideDictionaryFor{German}{se2translations}[2024/08/12]
+\ProvideDictionaryFor{German}{se2translations}[2024/09/19]
\ProvideDictTranslation{abstract}{Zusammenfassung}
\ProvideDictTranslation{Abstract}{Zusammenfassung}
\ProvideDictTranslation{acknowledgement}{Danksagung}
diff --git a/macros/latex/contrib/se2thesis/se2thesis.pdf b/macros/latex/contrib/se2thesis/se2thesis.pdf
index e37c07abf4..f11604c70b 100644
--- a/macros/latex/contrib/se2thesis/se2thesis.pdf
+++ b/macros/latex/contrib/se2thesis/se2thesis.pdf
Binary files differ
diff --git a/macros/latex/contrib/sidenotes/caesar_book.cls b/macros/latex/contrib/sidenotes/caesar_book.cls
index 685f736aef..c1f24a16ad 100644
--- a/macros/latex/contrib/sidenotes/caesar_book.cls
+++ b/macros/latex/contrib/sidenotes/caesar_book.cls
@@ -1,20 +1,13 @@
\NeedsTeXFormat{LaTeX2e}
-\ProvidesFile{caesar_book.cls}[2020/03/24 v1.00a Caesar book]
-% Load the amsmath and the mhchem package before loading microtype
-\RequirePackage{amsmath}% better math handling
-\RequirePackage[version=3]{mhchem}% chemical formulas
+\ProvidesFile{caesar_book.cls}[2024/09/12 v1.20 Caesar book]
\LoadClassWithOptions{book}% this is derived from the book class
\RequirePackage{sidenotes}% put annotations, tables and figures in the margin
-\captionsetup{font=footnotesize, skip=4pt}
-\RequirePackage[maxfloats=45]{morefloats}% a lot of marginals need more float 'memory'
+\captionsetup{font=footnotesize, skip=4pt} % use values matching the style
+\extrafloats{45}% a lot of marginals need more float 'memory'
\RequirePackage{marginfix}% automatically adjust the side-floats nicely
-\newcommand{\caesar@letterspace}[1]{#1}% allow LuaLaTeX, LaTeX letterspacing
\RequirePackage{microtype}% microtypography
-\@ifpackagelater{microtype}{2011/08/18}% xxx allow LaTeX and earlier microtype
-{\renewcommand{\caesar@letterspace}[1]{\textls{#1}}}%
-{\AtEndDocument{\ClassWarningNoLine{caesar_book}{Need newest microtype for letterspacing.}}}
%
-% Set page layout geometry -- default is science-book format
+% Set page layout geometry - default is science-book format
% this means a (portrait) paper size of 170mm x 240mm
%
\RequirePackage{geometry}
@@ -24,7 +17,9 @@
%
\renewcommand{\normalsize}{\fontsize{10pt}{13pt}\selectfont}%
\renewcommand{\footnotesize}{\fontsize{8pt}{10pt}\selectfont}%
-% fullwidth environment, text across textwidth+marginparsep+marginparwidth
+%
+% fullwidth environment, text across textwidth + marginparsep + marginparwidth
+%
\newlength{\overhang}
\setlength{\overhang}{\marginparwidth}
\addtolength{\overhang}{\marginparsep}
@@ -38,7 +33,9 @@
{\end{adjustwidth*}}%
{\end{adjustwidth}}%
}
+%
% set up the fonts
+%
\RequirePackage{ifluatex}
\ifluatex% in LuaLateX we use fontspec
\RequirePackage{fontspec}%
@@ -47,14 +44,15 @@
\setmainfont[Ligatures=TeX, Numbers=OldStyle]{Tex Gyre Pagella}% free Palatino clone
\setmonofont{Tex Gyre Cursor}% works okay with palatino
\setsansfont{Tex Gyre Heros}% work okay with palatino
- \mhchemoptions{textfontcommand=\addfontfeature{Numbers=Lining}} % use lining numbers for chemical formulas
\else% in LaTeX we load fonts differently
\IfFileExists{mathpazo.sty}{\RequirePackage[osf,sc]{mathpazo}}{}% palatino clone for math
\IfFileExists{helvet.sty}{\RequirePackage[scaled=0.90]{helvet}}{}% helvetica is sans serif font
\IfFileExists{beramono.sty}{\RequirePackage[scaled=0.85]{beramono}}{}% beramono is tt font
\RequirePackage[T1]{fontenc}% finally load fontenc
\fi
-% nice headings and TOC
+%
+% nice headings, TOC, page numbering ...
+%
\RequirePackage{titlesec,titletoc}% load the helper package
\setcounter{secnumdepth}{-1}% no numbering at all
\titleformat{\chapter}[display]{\relax\itshape\huge}{}{0pt}{\huge\rmfamily\itshape}[]% chapter format
@@ -75,7 +73,7 @@
\renewcommand{\headrulewidth}{0pt}% The running heads and feet do not have rules
\renewcommand{\footrulewidth}{0pt}
\fancyhf{}% set up the page numbering
-{\fancyfoot[LE,RO]{\thepage}}
+\fancyfoot[LE,RO]{\thepage}
\fancypagestyle{plain}{%
\fancyhf{}
}
@@ -87,14 +85,13 @@
\@savemarbox\@marbox{\marginparstyle#1}% marginparstyle is a prefix to the marginpar text now
\global\setbox\@currbox\copy\@marbox % the rest of the definition is taken from original LaTeX
\@xympar}
-\renewcommand*{\marginfont}{\marginparstyle}
+\@ifpackageloaded{marginnote}{\renewcommand*{\marginfont}{\marginparstyle}}{} % adjust marginnote font in the same way
% setup itemize and enumerate
\RequirePackage{enumitem}
\setlist[itemize]{leftmargin=*}
-%\renewcommand{\labelitemi}{}
-% compatibility with T-L
%
% titlepage
+%
\RequirePackage{ifthen}
\newcommand{\publisher}[1]{\gdef\caesar@publisher{#1}}
\gdef\caesar@thesis{}
@@ -106,7 +103,7 @@
% first count the number of lines in the title
\begin{fullwidth}
\raggedright%
- \setbox0\vbox{\noindent\fontsize{30}{38}\selectfont\caesar@letterspace{\MakeTextUppercase{\@title}}\par
+ \setbox0\vbox{\noindent\fontsize{30}{38}\selectfont\textls{\MakeTextUppercase{\@title}}\par
\count@\z@
\loop
\unskip\unpenalty\unskip\unpenalty\unskip
@@ -124,12 +121,12 @@
\sffamily%
%\begin{fullwidth}%
\vspace*{0em}% one line extra space
- \noindent\LARGE\caesar@letterspace{\MakeTextUppercase{\@author}}\par
+ \noindent\LARGE\textls{\MakeTextUppercase{\@author}}\par
\vfill%
- \noindent\fontsize{30}{38}\selectfont\textcolor{darkgray}{\caesar@letterspace{\MakeTextUppercase{\@title}}}\par
+ \noindent\fontsize{30}{38}\selectfont\textcolor{darkgray}{\textls{\MakeTextUppercase{\@title}}}\par
\vfill%
\vspace{\caesar@titlespace}%
- \noindent\Large\caesar@letterspace{\MakeTextUppercase{\caesar@publisher}}\par
+ \noindent\Large\textls{\MakeTextUppercase{\caesar@publisher}}\par
%\end{fullwidth}%
}%
\thispagestyle{empty}%
@@ -146,6 +143,9 @@
\section*{\caesar@thesis\@author}
%
}
+%
+% higher level macros go here
+%
\newcommand\newthought[1]{%
\addvspace{1.0\baselineskip plus 0.5ex minus 0.2ex}%
\noindent\textsc{#1}%
diff --git a/macros/latex/contrib/sidenotes/caesar_example.pdf b/macros/latex/contrib/sidenotes/caesar_example.pdf
index ddf07bf4e2..c49cb0a63d 100644
--- a/macros/latex/contrib/sidenotes/caesar_example.pdf
+++ b/macros/latex/contrib/sidenotes/caesar_example.pdf
Binary files differ
diff --git a/macros/latex/contrib/sidenotes/caesar_example.tex b/macros/latex/contrib/sidenotes/caesar_example.tex
index c0f11de77c..fd6fb8e484 100644
--- a/macros/latex/contrib/sidenotes/caesar_example.tex
+++ b/macros/latex/contrib/sidenotes/caesar_example.tex
@@ -10,24 +10,25 @@
%
\begin{filecontents}{\jobname.bib}
@book{Tufte2006,
- author = {Edward R. Tufte},
- title = {Beautiful Evidence},
- year = {2006},
- publisher = {Graphics Press, {LLC}},
- isbn = {0-9613921-7-7}
+ author = {Edward R. Tufte},
+ title = {Beautiful Evidence},
+ year = {2006},
+ publisher = {Graphics Press, {LLC}},
+ isbn = {0-9613921-7-7}
}
@book{Tufte1990,
- author = {Edward R. Tufte},
- title = {Envisioning Information},
- publisher = {Graphics Press},
- year = {1990},
- isbn = {0-9613921-1-8}
+ author = {Edward R. Tufte},
+ title = {Envisioning Information},
+ publisher = {Graphics Press},
+ year = {1990},
+ isbn = {0-9613921-1-8}
}
\end{filecontents}
% -- language: English --
%
+\usepackage{csquotes}
\usepackage[english]{babel}
% -- biblatex --
\usepackage[backend=biber,style=philosophy-classic]{biblatex} % xxx
diff --git a/macros/latex/contrib/sidenotes/sidenotes.dtx b/macros/latex/contrib/sidenotes/sidenotes.dtx
index 7c67ad4fd1..709a8a5e32 100644
--- a/macros/latex/contrib/sidenotes/sidenotes.dtx
+++ b/macros/latex/contrib/sidenotes/sidenotes.dtx
@@ -2,7 +2,7 @@
%
% sidenotes.dtx
%
-% Copyright (C) 2011-2020 by Andy Thomas <andythomas(at)web.de>
+% Copyright (C) 2011-2024 by Andy Thomas <andythomas(at)web.de>
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -11,17 +11,17 @@
% http://www.latex-project.org/lppl.txt
% and version 1.3 or later is part of all distributions of LaTeX
% version 2003/12/01 or later.
-%
+%
% The author of this work is Andy Thomas
%
%<*driver>
-\ProvidesFile{sidenotes.dtx}[2016/04/21 v1.00 rich text in the margin for LaTeX]%
+\ProvidesFile{sidenotes.dtx}[2024/09/12 v1.20 Rich text in the margin for LaTeX]%
%</driver>
%<package>\RequirePackage{l3keys2e}%
-%<package>\ProvidesExplPackage{sidenotes}{2016/04/21}{1.00}{rich text in the margin for LaTeX}
-%<package>\RequirePackage{marginnote} % provides an offset option for the marginals instead of a float
-%<package>\RequirePackage{caption} % handles the captions (in the margin)
-%<package>\RequirePackage{xparse} % new LaTeX3 syntax to define macros and environments
+%<package>\ProvidesExplPackage{sidenotes}{2024/09/12}{1.20}{Rich text in the margin for LaTeX}
+%<package>\RequirePackage{marginnote} % Provides an offset option for the marginals instead of a float
+%<package>\RequirePackage{caption} % Handles the captions (in the margin)
+%<package>\RequirePackage{xparse} % New LaTeX3 syntax to define macros and environments
%<package>\RequirePackage[strict]{changepage} % Changepage package for symmetric twoside handling
%<*driver>
\documentclass{ltxdoc}
@@ -54,10 +54,10 @@
%
%
% \GetFileInfo{sidenotes.dtx}
-%
+%
%
% \title{The \textsf{sidenotes} package\thanks{This document
-% corresponds to \textsf{sidenotes}~\fileversion, dated \filedate.
+% corresponds to \textsf{sidenotes}~\fileversion, dated \filedate.
% Earlier versions by Oliver Schebaum.}}
% \author{Andy Thomas\\ \texttt{andythomas(at)web.de}}
%
@@ -74,9 +74,9 @@
% \changes{v1.00}{2016/04/21}{no changes, tag v1.0}
%
% \begin{abstract}
-% \noindent This package allows the typesetting of rich content in the margin.
+% \noindent This package allows the typesetting of rich content in the margin.
% It includes text, but also figures, captions, tables and citations,
-% which is common in science textbooks such as Feynman's
+% which is common in science textbooks such as Feynman's
% \textit{Lectures on Physics}.
% \end{abstract}
%
@@ -91,99 +91,99 @@
% \DescribeMacro{\sidenote}
% The macro is very similar to the footnote macro and tries to emulate
% its behavior. It just puts the notes in the margin instead of the bottom
-% of the page, therefore the name \emph{sidenote}. It has the same parameters
+% of the page, therefore the name \emph{sidenote}. It has the same parameters
% as footnote as well as an additional offset:
-% \verb+\sidenote[number][offset]{text}+. All the sidenotes are subsequently
-% numbered and float in the margin to avoid overlap.
+% \verb+\sidenote[number][offset]{text}+. All the sidenotes are subsequently
+% numbered and float in the margin to avoid overlap.
% The first, optional parameter will manually change the numbering to the given
-% value. The second offset parameter will fix the text at a certain position
-% in the margin. In particular, there is a difference between not providing an
+% value. The second offset parameter will fix the text at a certain position
+% in the margin. In particular, there is a difference between not providing an
% offset (floating text) and an offset of 0 (fix text at actual position).
%
-% \DescribeMacro{\sidenotemark}
-% Sidenote tries to mimic the footnote behavior and, consequently, provides the
-% same solutions. Sometimes, it is not possible to directly call a sidenote
-% macro, e.g.\ inside of a figure caption. Then, you can use
-% \verb+\sidenotemark[number]+ and \verb+\sidenotetext[number][offset]{text}+
-% macros. \verb+\sidenotemark+ puts a mark at the current position. Afterwards,
-% outside of the environment that causes the trouble,
+% \DescribeMacro{\sidenotemark}
+% Sidenote tries to mimic the footnote behavior and, consequently, provides the
+% same solutions. Sometimes, it is not possible to directly call a sidenote
+% macro, e.g.\ inside of a figure caption. Then, you can use
+% \verb+\sidenotemark[number]+ and \verb+\sidenotetext[number][offset]{text}+
+% macros. \verb+\sidenotemark+ puts a mark at the current position. Afterwards,
+% outside of the environment that causes the trouble,
% \DescribeMacro{\sidenotetext}
-% it is possible the call \verb+\sidenotetext[number][offset]{text}+ to provide
-% the text and typeset the sidenote. The optional parameters are similar to the
-% sidenote macro. The first, optional parameter will change the numbering and
+% it is possible the call \verb+\sidenotetext[number][offset]{text}+ to provide
+% the text and typeset the sidenote. The optional parameters are similar to the
+% sidenote macro. The first, optional parameter will change the numbering and
% the offset will change the position.
%
% \changes{v0.61}{2011/10/17}{documentation of sidetext}
%
%\DescribeMacro{\sidecaption}
-% The \verb+\sidecaption[entry][offset]{text}+ macro can be used if the caption
-% of a figure or table should be in the margin. The caption has to be adjacent
-% to the figure, so a float is not an option here. Therefore, the caption might
+% The \verb+\sidecaption[entry][offset]{text}+ macro can be used if the caption
+% of a figure or table should be in the margin. The caption has to be adjacent
+% to the figure, so a float is not an option here. Therefore, the caption might
% overlap with other marginals. Then, these marginals have to be adjusted with
% offset parameters. The formatting of the caption is done by the \emph{caption}
-% package by defining a \emph{sidecaption} style. Please refer to the
+% package by defining a \emph{sidecaption} style. Please refer to the
% documentation of the caption package for information on styles. The macro can
-% be starred, which is analog to the regular starred caption (no numbering, no
+% be starred, which is analog to the regular starred caption (no numbering, no
% tof entry): \verb+\sidecaption*[offset]{text}+.
%
% \DescribeEnv{marginfigure}
-% The marginfigure environment puts a figure and its caption in the margin.
-% Instead of \verb+\begin{figure}[htbp]+ use \verb+\begin{marginfigure}[offset]+.
-% Again, using an offset value switches the behavior from float to fixed
-% position. The marginfigure has its own caption style named \emph{marginfigure}.
+% The marginfigure environment puts a figure and its caption in the margin.
+% Instead of \verb+\begin{figure}[htbp]+ use \verb+\begin{marginfigure}[offset]+.
+% Again, using an offset value switches the behavior from float to fixed
+% position. The marginfigure has its own caption style named \emph{marginfigure}.
%
% \DescribeEnv{margintable}
-% The margintable environment works similar to marginfigure, but with table
-% environments. Use \verb+\begin{margintable}[offset]+ instead of
+% The margintable environment works similar to marginfigure, but with table
+% environments. Use \verb+\begin{margintable}[offset]+ instead of
% \verb+\begin{table}[htbp]+, its caption style is named \emph{margintable}.
%
% \DescribeEnv{figure*}
-% The \verb+figure*+ environment is used to position figures across the full
+% The \verb+figure*+ environment is used to position figures across the full
% page, i.e. the text width plus the margin. The algorithm has to distinguish
% between recto and verso (left and right) pages and might need up to three
% \LaTeX{} runs to provide the desired result. The corresponding caption style
-% is called \emph{widefigure}.
+% is called \emph{widefigure}.
% \DescribeEnv{table*}
-% The sister environment for tables is \verb+table*+. Use \emph{widetable} to
-% change its caption style.
+% The sister environment for tables is \verb+table*+. Use \emph{widetable} to
+% change its caption style.
%
% \section{Technical note}
%
-% When writing the package, we tried to provide a \emph{minimum} extension to
+% When writing the package, we tried to provide a \emph{minimum} extension to
% standard \LaTeX{} for typesetting rich content in the margin. This means,
% that there are no sensible default values for most things such as page
-% geometry, fonts and font sizes. However, the \emph{caesar\textunderscore
-% book}-class accompanies this package as an example implementation as well
-% as a template we use for our theses.
-%
-% In addition, we tried to keep compatibility with
-% packages the user might want to use later. However, the following packages
-% are needed by \emph{sidenotes} and might introduce side effects with other
+% geometry, fonts and font sizes. However, the \emph{caesar\textunderscore
+% book}-class accompanies this package as an example implementation as well
+% as a template we use for our theses.
+%
+% In addition, we tried to keep compatibility with
+% packages the user might want to use later. However, the following packages
+% are needed by \emph{sidenotes} and might introduce side effects with other
% packages.
%
% \section{Required packages}
-%
+%
% \changes{v0.52}{2011/10/06}{added a section that the package needs marginnote, caption and xifthen.}
% \changes{v0.90}{2012/06/02}{added a section that the package needs twoopt and changepage.}
-% \changes{v0.94}{2014/01/22}{start using xparse}
-% \changes{v0.97}{2014/06/05}{start using l3keys2e}
+% \changes{v0.94}{2014/01/22}{start using xparse}
+% \changes{v0.97}{2014/06/05}{start using l3keys2e}
%
% \begin{description}
% \item[marginnote]
-% supports an alternative to \verb+\marginpar+ and creates notes in the
-% margin. The notes are not floats and can be shifted up or down.
-% Technically, every time an offset is provided the package uses
+% supports an alternative to \verb+\marginpar+ and creates notes in the
+% margin. The notes are not floats and can be shifted up or down.
+% Technically, every time an offset is provided the package uses
% \verb+\marginnote+ and \verb+\marginpar+ otherwise.
% \item[caption]
-% allows to set figure and table captions in the margin and allows
-% easier formatting of these captions. Please refer to the
-% \emph{caption} manual for details on styles.
+% allows to set figure and table captions in the margin and allows
+% easier formatting of these captions. Please refer to the
+% \emph{caption} manual for details on styles.
% \item[xparse] is used to take advantage of the improved \LaTeX3 syntax.
% All macros and environments are defined using this package.
-% \item[l3keys2e] provides a key/value mechanism
-% \item[changepage] is used to correctly shift figure* and table*. It has
-% to use the option [strict] to work properly. This might lead to an
-% option clash, if the same package is loaded without this option.
+% \item[l3keys2e] provides a key/value mechanism
+% \item[changepage] is used to correctly shift figure* and table*. It has
+% to use the option [strict] to work properly. This might lead to an
+% option clash, if the same package is loaded without this option.
% \end{description}%
%
% \section{Implementation}
@@ -192,39 +192,41 @@
%<*package>
% \fi
%
-% Process the package options: onside
+% Process the package options: onside
%
% \begin{macrocode}
-\ExplSyntaxOn
+\ExplSyntaxOn
%
\keys_define:nn { sidenotes }
{
- oneside .bool_set:N = \sidenotes_oneside
+ oneside .bool_set:N = \sidenotes_oneside
}
\ProcessKeysOptions { sidenotes }
% \end{macrocode}
%
% \changes{v0.91}{2012/06/03}{sidenotetextstyle is not needed any more}
-% \changes{v0.94}{2014/01/22}{change sidenote counter behavior}
+% \changes{v0.94}{2014/01/22}{change sidenote counter behavior}
%
% We need a counter similar to the footnote counter.
%
% \begin{macrocode}
-\newcounter{sidenote} % make a counter
-\setcounter{sidenote}{1} % init the counter
+\newcounter{sidenote} % make a counter
+\setcounter{sidenote}{1} % init the counter
% \end{macrocode}
-%
-% \noindent The \LaTeX3 parts concerning the optional arguments should not
-% distinguish between an empty bracket pair and no optional
-% argument. This is required to keep macros with two leading
+%
+% \noindent The \LaTeX3 parts concerning the optional arguments should not
+% distinguish between an empty bracket pair and no optional
+% argument. This is required to keep macros with two leading
% optional arguments.
%
+% \changes{v1.20}{2024/09/12}{Allow long arguments.}
+%
% \begin{macrocode}
-\DeclareExpandableDocumentCommand{\IfNoValueOrEmptyTF}{ m m m }
+\DeclareExpandableDocumentCommand{\IfNoValueOrEmptyTF}{ m +m +m }
{
\IfNoValueTF{#1}
- {#2}
- {\tl_if_empty:nTF {#1} {#2} {#3}}
+ {#2}
+ {\tl_if_empty:nTF {#1} {#2} {#3}}
}
% \end{macrocode}
%
@@ -237,28 +239,28 @@
% \begin{macrocode}
\NewDocumentCommand \@sidenotes@thesidenotemark { m }
{
- \leavevmode
- \ifhmode
+ \leavevmode
+ \ifhmode
\edef \@x@sf {\the \spacefactor }
- \nobreak
- \fi
- \hbox {\@textsuperscript {\normalfont #1 }}
- \ifhmode
- \spacefactor \@x@sf
- \fi
+ \nobreak
+ \fi
+ \hbox {\@textsuperscript {\normalfont #1 }}
+ \ifhmode
+ \spacefactor \@x@sf
+ \fi
\relax
}
%
\NewDocumentCommand \@sidenotes@multisign { } {3sp}
%
-\NewDocumentCommand \@sidenotes@multimarker { }
+\NewDocumentCommand \@sidenotes@multimarker { }
{
\kern-\@sidenotes@multisign
- \kern\@sidenotes@multisign\relax
+ \kern\@sidenotes@multisign\relax
}
%
-\NewDocumentCommand \@sidenotes@multichecker { }
-{
+\NewDocumentCommand \@sidenotes@multichecker { }
+{
\dim_compare:nNnTF \lastkern = \@sidenotes@multisign
{\@sidenotes@thesidenotemark{,}}
{}
@@ -269,33 +271,35 @@
% \changes{v0.97}{2014/05/27}{introduce an internal macro to place the marginal text}
%
% \noindent Introduce an internal macro to place the marginal text. Use
-% margin note in case an offset is given and marginpar otherwise.
+% margin note in case an offset is given and marginpar otherwise.
+%
+% \changes{v1.20}{2024/09/12}{Allow long arguments.}
%
% \begin{macrocode}
-\NewDocumentCommand \@sidenotes@placemarginal { m m }
-{
+\NewDocumentCommand \@sidenotes@placemarginal { +m +m }
+{
\IfNoValueOrEmptyTF{#1}
- {\marginpar{#2}}
- {\marginnote{#2}[#1]}
+ {\marginpar{#2}}
+ {\marginnote{#2}[#1]}
}
%
% \end{macrocode}
%
% \begin{macro}{\sidenote}
-%
-% Introduce the \verb+\sidenote+ macro with two optional
+%
+% Introduce the \verb+\sidenote+ macro with two optional
% arguments to set the number and the offset.
%
% \changes{v0.53}{2011/10/07}{bugfix, now optional number and offset possible}
% \changes{v0.80}{2011/11/10}{unstar the newcommand.}
-% \changes{v0.81}{2011/11/29}{added a comma between subsequent sidenotes}
-% \changes{v0.90}{2012/06/02}{add optional offset for sidenote}
+% \changes{v0.81}{2011/11/29}{added a comma between subsequent sidenotes}
+% \changes{v0.90}{2012/06/02}{add optional offset for sidenote}
% \changes{v0.93}{2012/04/17}{removed mandatory whitespace, new ifnextchar takes care of that}
% \changes{v0.94}{2014/01/11}{use xparse syntax}
%
% \begin{macrocode}
-\NewDocumentCommand \sidenote { o o +m }
-{
+\NewDocumentCommand \sidenote { o o +m }
+{
\sidenotemark[#1]
\sidenotetext[#1][#2]{#3}
\@sidenotes@multimarker
@@ -311,8 +315,8 @@
% \changes{v0.96}{2014/02/14}{increase the sidenote counter in sidenotetext now}
%
% \begin{macrocode}
-\NewDocumentCommand \sidenotemark { o }
-{
+\NewDocumentCommand \sidenotemark { o }
+{
\@sidenotes@multichecker
\IfNoValueOrEmptyTF{#1}
{\@sidenotes@thesidenotemark{\thesidenote}}
@@ -324,7 +328,7 @@
%
% \begin{macro}{\sidenotetext}
%
-% Sidenotetext is supposed to work similarly to footnotetext. The additional,
+% Sidenotetext is supposed to work similarly to footnotetext. The additional,
% optional argument sets the offset.
%
% \changes{v0.80}{2011/11/10}{unstar the newcommand.}
@@ -333,10 +337,10 @@
% \changes{v0.94}{2014/01/11}{use xparse syntax, change counter behavior}
%
% \begin{macrocode}
-\NewDocumentCommand \sidenotetext { o o +m }
-{
+\NewDocumentCommand \sidenotetext { o o +m }
+{
\IfNoValueOrEmptyTF{#1}
- {
+ {
\@sidenotes@placemarginal{#2}{\textsuperscript{\thesidenote}{}~#3}
\refstepcounter{sidenote}
}
@@ -348,18 +352,18 @@
% \begin{macro}{\sidecaption}
%
% \changes{v0.91}{2012/06/03}{sidecaption* accompanies sidecaption}
-% \changes{v0.94}{2014/01/22}{use xparse syntax}
+% \changes{v0.94}{2014/01/22}{use xparse syntax}
%
-% Sidecaption puts the caption in the margin. It never floats with the other
+% Sidecaption puts the caption in the margin. It never floats with the other
% text in the margin, since it has to be next to the figure.
% Sidecaption* works similarly to sidecaption, but without an entry.
%
% \begin{macrocode}
\DeclareCaptionStyle{sidecaption}{font=footnotesize}
-\NewDocumentCommand \sidecaption {s o o m}
-{
+\NewDocumentCommand \sidecaption {s o o m}
+{
\captionsetup{style=sidecaption}
- \IfBooleanTF{#1}
+ \IfBooleanTF{#1}
{ % starred
\IfNoValueOrEmptyTF{#2}
{\marginnote{\caption*{#4}}}
@@ -381,15 +385,15 @@
%
% \changes{v0.3}{2011/09/29}{define the sidefigure enviroment without the environ package}
% \changes{v0.90}{2012/06/02}{the optional offset parameter is back, renamed environment from sidefigure to marginfigure}
-% \changes{v0.94}{2014/01/22}{use xparse syntax}
+% \changes{v0.94}{2014/01/22}{use xparse syntax}
%
-% The marginfigure environment is similar to the figure environment. But the
+% The marginfigure environment is similar to the figure environment. But the
% figure is put in the margin.
%
% \begin{macrocode}
\newsavebox{\@sidenotes@marginfigurebox}
\DeclareCaptionStyle{marginfigure}{font=footnotesize}
-\NewDocumentEnvironment{marginfigure} { o }
+\NewDocumentEnvironment{marginfigure} { o }
{
\begin{lrbox}{\@sidenotes@marginfigurebox}
\begin{minipage}{\marginparwidth}
@@ -407,9 +411,9 @@
%
% \changes{v0.4}{2011/09/30}{define the sidetable enviroment without the environ package}
% \changes{v0.90}{2012/06/02}{the optional offset parameter is back, renamed environment from sidetable to margintable}
-% \changes{v0.94}{2014/01/22}{use xparse syntax}
+% \changes{v0.94}{2014/01/22}{use xparse syntax}
%
-% The margintable is similar to the table environment. But the table
+% The margintable is similar to the table environment. But the table
% is put in the margin.
%
% \begin{macrocode}
@@ -433,11 +437,12 @@
%
% \changes{v0.85}{2011/06/01}{added the figure* environment}
% \changes{v0.97}{2014/05/27}{use adjustwidth in figure* environment}
+% \changes{v1.10}{2020/04/05}{address issue with figures across the full width}
%
-% The figure* environment provides a figure environment for figures that
+% The figure* environment provides a figure environment for figures that
% span across the full page (text plus margin width).
%
-% \begin{macrocode}
+% \begin{macrocode}
\AtBeginDocument{%
\newlength{\@sidenotes@extrawidth}
\setlength{\@sidenotes@extrawidth}{\marginparwidth}
@@ -468,9 +473,11 @@
{
\begin{figure}[#1]
\begin{autoadjustwidth}{}{-\@sidenotes@extrawidth}
+ \begin{minipage}{\linewidth}
\captionsetup{style=widefigure}
}
{
+ \end{minipage}
\end{autoadjustwidth}
\end{figure}
}
@@ -481,19 +488,22 @@
%
% \changes{v0.85}{2011/06/01}{added the table* environment}
% \changes{v0.97}{2014/05/27}{use adjustwidth in table* environment}
+% \changes{v1.10}{2020/04/05}{address issue with tables across the full width}
%
-% The table* environment provides a table environment for figures across
+% The table* environment provides a table environment for figures across
% text and margin width.
%
-% \begin{macrocode}
+% \begin{macrocode}
\DeclareCaptionStyle{widetable}{font=footnotesize}
\RenewDocumentEnvironment{table*}{ O{htbp} }
{
\begin{table}[#1]
\begin{autoadjustwidth}{}{-\@sidenotes@extrawidth}
+ \begin{minipage}{\linewidth}
\captionsetup{style=widetable}
}
{
+ \end{minipage}
\end{autoadjustwidth}
\end{table}
}
diff --git a/macros/latex/contrib/sidenotes/sidenotes.ins b/macros/latex/contrib/sidenotes/sidenotes.ins
index d6b5ebd8a8..7a21aa0515 100644
--- a/macros/latex/contrib/sidenotes/sidenotes.ins
+++ b/macros/latex/contrib/sidenotes/sidenotes.ins
@@ -8,7 +8,7 @@
%% http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2003/12/01 or later.
-%%
+%%
%% The author of this work is Andy Thomas
%%
@@ -21,7 +21,7 @@
IMPORTANT NOTE:
-This is a generated file and you are not allowed to distribute it
+This is a generated file and you are not allowed to distribute it
without the source of the work. See below about more informations
about the files the work consists of.
diff --git a/macros/latex/contrib/sidenotes/sidenotes.pdf b/macros/latex/contrib/sidenotes/sidenotes.pdf
index 31e4fb443e..e0363aa442 100644
--- a/macros/latex/contrib/sidenotes/sidenotes.pdf
+++ b/macros/latex/contrib/sidenotes/sidenotes.pdf
Binary files differ
diff --git a/macros/latex/contrib/sim-os-menus/doc/sim-os-menus-doc-fr.pdf b/macros/latex/contrib/sim-os-menus/doc/sim-os-menus-doc-fr.pdf
index 530ec3542d..916164bc45 100644
--- a/macros/latex/contrib/sim-os-menus/doc/sim-os-menus-doc-fr.pdf
+++ b/macros/latex/contrib/sim-os-menus/doc/sim-os-menus-doc-fr.pdf
Binary files differ
diff --git a/macros/latex/contrib/sim-os-menus/doc/sim-os-menus-doc-fr.tex b/macros/latex/contrib/sim-os-menus/doc/sim-os-menus-doc-fr.tex
index 9793f8c7e1..e6abbcb3a7 100644
--- a/macros/latex/contrib/sim-os-menus/doc/sim-os-menus-doc-fr.tex
+++ b/macros/latex/contrib/sim-os-menus/doc/sim-os-menus-doc-fr.tex
@@ -23,8 +23,8 @@
\hypersetup{pdfborder=0 0 0}
\usepackage[margin=2cm]{geometry}
\setlength{\parindent}{0pt}
-\def\TPversion{0.1.1}
-\def\TPdate{14/11/2023}
+\def\TPversion{0.1.3}
+\def\TPdate{28/09/2024}
\usepackage{soul}
\sethlcolor{lightgray!25}
\NewDocumentCommand\MontreCode{ m }{%
@@ -135,7 +135,7 @@ Les packages utiles, et chargés sont :
\begin{itemize}
\item \MontreCode{tikz} (avec \MontreCode{calc,positioning}), \MontreCode{pgf}, \MontreCode{pgffor} ;
- \item \MontreCode{calc}, \MontreCode{fontawesome5} ;
+ \item \MontreCode{calc}, \MontreCode{fontawesome5}, \MontreCode{forest} (avec \MontreCode{edges}) ;
\item \MontreCode{simplekv}, \MontreCode{xintexpr}, \MontreCode{listofitems}, \MontreCode{xstring} ;
\item \MontreCode{settobox}, \MontreCode{tabularray} ;
\item \MontreCode{tcolorbox} (avec \MontreCode{breakable,fitting,skins,listings,listingsutf8,hooks}).
@@ -147,6 +147,8 @@ Les packages utiles, et chargés sont :
\begin{quote}
\begin{verbatim}
+0.1.2 : Arborescence type explorateur
+0.1.2 : Visionneuse 'like' de scripts
0.1.1 : Ajout des commandes en [fr]
0.1.0 : Version initiale
\end{verbatim}
@@ -320,13 +322,18 @@ Pour créer une \og fausse\fg{} visionneuse, les environnements sont :
\begin{VisionnIMG}[clés]{options tcbox}
....
\end{VisionnIMG}
+
+%----Visionneuse de script python
+\begin{VisionnPY}[clés]{options tcbox}
+ ....
+\end{VisionnPY}
\end{verbatim}
\end{quote}
Les \textsf{clés}, optionnelles et entre \MontreCode{[...]}, sont :
\begin{itemize}
- \item \MontreCode{Titre} := titre du terminal (\MontreCode{Terminal Win/UNiX/Mac} par défaut) ;
+ \item \MontreCode{Titre} := titre de la visionneuse par défaut ;
\item \MontreCode{Align} := alignement horizontal (paragraphe) de la visionneuse (\MontreCode{center} par défaut) ;
\item \MontreCode{AlignH} := alignement horizontal (du contenu) de la visionneuse (\MontreCode{center} par défaut) ;
\item \MontreCode{Largeur} := largeur de la visionneuse (\MontreCode{\textbackslash linewidth} par défaut) ;
@@ -362,4 +369,125 @@ L'argument obligatoire, entre \MontreCode{\{...\}}, correspond à des options sp
\end{VisionnIMG}
\end{tcblisting}
+\begin{tcblisting}{colframe=lightgray,colback=lightgray!5}
+%avec un environnement de présentation de codes si nécessaire
+\begin{VisionnPY}[Largeur=12cm]{}
+\begin{lstlisting}%
+ [
+ language=python,basicstyle=\ttfamily\small,
+ keywordstyle=\color{green!50!black},tabsize=4,
+ keywordstyle={[2]\color{magenta}},
+ numbers=left,numbersep=3mm,xleftmargin=5mm,
+ aboveskip=0pt,belowskip=0pt,
+ numberstyle=\footnotesize\ttfamily\color{gray}
+ ]
+nterms = int(input("Entrez un nombre: "))
+
+n1 = 0
+n2 = 1
+
+print("\n la suite Fibonacci est : ")
+print(n1, ",", n2, end=", ")
+
+for i in range(2, nterms):
+ suivant = n1 + n2
+ print(suivant, end=", ")
+
+n1 = n2
+n2 = suivant
+\end{lstlisting}
+\end{VisionnPY}
+\end{tcblisting}
+
+\pagebreak
+
+\subsection{Arborescence de dossiers/fichiers}
+
+Le package \MontreCode{forest}, et sa librairie \MontreCode{edges}, permet de présenter des arbres, à la manière d'une arborescence de fichiers.
+
+\begin{quote}
+\begin{verbatim}
+\begin{ArborDossiers}[clés]{options forest}
+ [dossier,ADdos
+ [sous-dossier,ADdos]
+ [sous-dossier,ADdos
+ [fichier1,ADfic]
+ [fichier2,ADfic]
+ ...
+ ]
+ ...
+ ]
+\end{ArborDossiers}
+\end{verbatim}
+\end{quote}
+
+Les \textsf{clés}, optionnelles et entre \MontreCode{[...]}, sont :
+
+\begin{itemize}
+ \item \MontreCode{Police} := police des labels ;
+ \item \MontreCode{CoulIcoD} := couleur des icones \textsf{dossier} (\MontreCode{gray} par défaut) ;
+ \item \MontreCode{CoulIcoF} := couleur des icones \textsf{fichier} (\MontreCode{gray} par défaut) ;
+ \item \MontreCode{AffIcoD} := booléen pour afficher les icones \textsf{dossier} ;
+ \item \MontreCode{AffIcoF} := booléen pour afficher les icones \textsf{fichier} ;
+ \item \MontreCode{EspaceV} := espace vertical entre les items (\MontreCode{0.15em} par défaut) ;
+ \item \MontreCode{IcoD} := icone par défaut \textsf{dossier} ;
+ \item \MontreCode{IcoF} := icone par défaut \textsf{fichier}.
+\end{itemize}
+
+\medskip
+
+Les \textsf{dossiers} sont à déclarer sous la forme \MontreCode{<nom\_dossier>,ADdos}.
+
+Les \textsf{fichiers} sont à déclarer sous la forme \MontreCode{<nom\_fichier>,ADfic}.
+
+\medskip
+
+L'argument obligatoire, entre \MontreCode{\{...\}}, correspond à des options spécifiques, à passer en langage \textsf{forest}.
+
+\begin{tcblisting}{colframe=lightgray,colback=lightgray!5}
+\begin{ArborDossiers}{}
+ [dossier,ADdos
+ [sous-dossier,ADdos]
+ [sous-dossier,ADdos
+ [fichier1,ADfic]
+ [fichier2,ADfic]
+ ]
+ [fichier3,ADfic]
+ ]
+\end{ArborDossiers}
+\end{tcblisting}
+
+\begin{tcblisting}{colframe=lightgray,colback=lightgray!5}
+\begin{ArborDossiers}%
+ [Police=\sffamily,CoulIcoD=yellow!50!pink,AffIcoF,CoulIcoF=teal,EspaceV=0.5em]%
+ {}
+ [dossier,ADdos
+ [sous-dossier,ADdos]
+ [sous-dossier,ADdos
+ [fichier1,ADfic]
+ [fichier2,ADfic]
+ ]
+ [fichier3,ADfic]
+ ]
+\end{ArborDossiers}
+\end{tcblisting}
+
+Les styles sont définis de manière globale, et ils peuvent être redéfinis si besoin.
+
+\begin{tcblisting}{colframe=lightgray,colback=lightgray!5}
+\tikzset{ADtrait/.style={thick,->,densely dashed,red,>=latex}}
+\begin{ArborDossiers}%
+ [Police=\sffamily,CoulIcoD=yellow!50!pink,AffIcoF,CoulIcoF=teal,EspaceV=0.5em]%
+ {l sep=2em}
+ [dossier,ADdos
+ [sous-dossier,ADdos]
+ [sous-dossier,ADdos
+ [fichier1,ADfic]
+ [fichier2,ADfic]
+ ]
+ [fichier3,ADfic]
+ ]
+\end{ArborDossiers}
+\end{tcblisting}
+
\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/sim-os-menus/doc/sim-os-menus-doc.pdf b/macros/latex/contrib/sim-os-menus/doc/sim-os-menus-doc.pdf
index 6550a4c0d5..e350684ab6 100644
--- a/macros/latex/contrib/sim-os-menus/doc/sim-os-menus-doc.pdf
+++ b/macros/latex/contrib/sim-os-menus/doc/sim-os-menus-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/sim-os-menus/doc/sim-os-menus-doc.tex b/macros/latex/contrib/sim-os-menus/doc/sim-os-menus-doc.tex
index 229d363700..ab3e44596f 100644
--- a/macros/latex/contrib/sim-os-menus/doc/sim-os-menus-doc.tex
+++ b/macros/latex/contrib/sim-os-menus/doc/sim-os-menus-doc.tex
@@ -23,8 +23,8 @@
\hypersetup{pdfborder=0 0 0}
\usepackage[margin=2cm]{geometry}
\setlength{\parindent}{0pt}
-\def\TPversion{0.1.1}
-\def\TPdate{14/11/2023}
+\def\TPversion{0.1.3}
+\def\TPdate{28/09/2024}
\usepackage{soul}
\sethlcolor{lightgray!25}
\NewDocumentCommand\MontreCode{ m }{%
@@ -122,7 +122,7 @@ Global styles are mostly fixed, but some customizations are possible.
\subsection{Loading}
-To load the package, simply use :
+To load the package, simply use:
\begin{quote}
\begin{verbatim}
@@ -130,13 +130,13 @@ To load the package, simply use :
\end{verbatim}
\end{quote}
-The package loads the packages :
+The package loads the packages:
\begin{itemize}
- \item \MontreCode{tikz} (with \MontreCode{calc,positioning}), \MontreCode{pgf}, \MontreCode{pgffor} ;
- \item \MontreCode{calc}, \MontreCode{fontawesome5} ;
- \item \MontreCode{simplekv}, \MontreCode{xintexpr}, \MontreCode{listofitems}, \MontreCode{xstring} ;
- \item \MontreCode{settobox}, \MontreCode{tabularray} ;
+ \item \MontreCode{tikz} (with \MontreCode{calc,positioning}), \MontreCode{pgf}, \MontreCode{pgffor};
+ \item \MontreCode{calc}, \MontreCode{fontawesome5};
+ \item \MontreCode{simplekv}, \MontreCode{xintexpr}, \MontreCode{listofitems}, \MontreCode{xstring};
+ \item \MontreCode{settobox}, \MontreCode{tabularray};
\item \MontreCode{tcolorbox} (with \MontreCode{breakable,fitting,skins,listings,listingsutf8,hooks}).
\end{itemize}
@@ -146,8 +146,10 @@ The package loads the packages :
\begin{quote}
\begin{verbatim}
-0.1.1 : French version of the commands
-0.1.0 : Initial version
+0.1.3: Fofders/Files like in explorer
+0.1.2: Script editor viewer 'like'
+0.1.1: French version of the commands
+0.1.0: Initial version
\end{verbatim}
\end{quote}
@@ -157,7 +159,7 @@ The package loads the packages :
\subsection{Context menu}
-I order to create a context menu, the command is :
+I order to create a context menu, the command is:
\begin{quote}
\begin{verbatim}
@@ -166,35 +168,35 @@ I order to create a context menu, the command is :
\end{verbatim}
\end{quote}
-Optional keys, between \MontreCode{[...]} are :
+Optional keys, between \MontreCode{[...]} are:
\begin{itemize}
- \item \MontreCode{ColBack} := background color ;
- \item \MontreCode{ColHL} : = highlight color ;
- \item \MontreCode{Rounded} := boolean for rounded corners (\MontreCode{true} by default) ;
- \item \MontreCode{Font} := font for the items (\MontreCode{\textbackslash normalsize\textbackslash normalfont} by default) ;
- \item \MontreCode{ColItems} := color(s) for the items (\MontreCode{black} by default) ;
- \item \MontreCode{MarginV} := vertical margin of the lines (\MontreCode{6pt} by default) ;
- \item \MontreCode{MarginH} := horizontal margin of the lines (\MontreCode{12pt} by default) ;
- \item \MontreCode{Arrow} := character for the arrow (\MontreCode{\textbackslash faCaretRight} by default) ;
- \item \MontreCode{ListSeps} := list for the possible sep lines (empty or for all the levels !) ;
- \item \MontreCode{ListIcons} := list for the possible icons (empty or for all the levels/items !) ;
- \item \MontreCode{ListOffsets} := list for the possible vertical offset of levels (from 2, \ldots !) (empty or for all the sub-levels !) ;
- \item \MontreCode{Icons} := boolean for icons (\MontreCode{false} by default) ;
- \item \MontreCode{Bar} := boolean for small vertical bar with icons (\MontreCode{true} by default) ;
- \item \MontreCode{Space} := horizontal space between levels (\MontreCode{-0.125} by default).
+ \item \MontreCode{ColBack}: background color;
+ \item \MontreCode{ColHL}: = highlight color;
+ \item \MontreCode{Rounded}: boolean for rounded corners (\MontreCode{true} by default);
+ \item \MontreCode{Font}: font for the items (\MontreCode{\textbackslash normalsize\textbackslash normalfont} by default);
+ \item \MontreCode{ColItems}: color(s) for the items (\MontreCode{black} by default);
+ \item \MontreCode{MarginV}: vertical margin of the lines (\MontreCode{6pt} by default);
+ \item \MontreCode{MarginH}: horizontal margin of the lines (\MontreCode{12pt} by default);
+ \item \MontreCode{Arrow}: character for the arrow (\MontreCode{\textbackslash faCaretRight} by default);
+ \item \MontreCode{ListSeps}: list for the possible sep lines (empty or for all the levels !);
+ \item \MontreCode{ListIcons}: list for the possible icons (empty or for all the levels/items !);
+ \item \MontreCode{ListOffsets}: list for the possible vertical offset of levels (from 2, \ldots !) (empty or for all the sub-levels !);
+ \item \MontreCode{Icons}: boolean for icons (\MontreCode{false} by default);
+ \item \MontreCode{Bar}: boolean for small vertical bar with icons (\MontreCode{true} by default);
+ \item \MontreCode{Space}: horizontal space between levels (\MontreCode{-0.125} by default).
\end{itemize}
\medskip
-The mandatory argument, between \MontreCode{\{...\}}, is given as :
+The mandatory argument, between \MontreCode{\{...\}}, is given as:
\smallskip
\hfill\MontreCode{item1A,item1B,... § item2A,itemp2B,... § ...}\hfill~
\begin{itemize}
- \item if an item ends with \MontreCode{(*)}, this is the beginning of the next level (\underline{only one} by level !) ;
+ \item if an item ends with \MontreCode{(*)}, this is the beginning of the next level (\underline{only one} by level !);
\item if an item ends with \MontreCode{(>)} (\underline{before} optional \MontreCode{(*)}), an arrow is written at the end of the line.
\end{itemize}
@@ -202,11 +204,11 @@ A correct usage of the syntax is necessary for the code !
\vspace{5mm}
-A few tips, due to \MontreCode{ListIcons}, \MontreCode{ListOffsets} and \MontreCode{ListSeps} keys, which are \textit{sensitive} :
+A few tips, due to \MontreCode{ListIcons}, \MontreCode{ListOffsets} and \MontreCode{ListSeps} keys, which are \textit{sensitive}:
\begin{itemize}
- \item \MontreCode{ListIcons} must have the same number of elements than the number of levels/items (with possible empty items) ;
- \item \MontreCode{ListSeps} must have the same number of elements than the number of levels (with possible empty items) ;
+ \item \MontreCode{ListIcons} must have the same number of elements than the number of levels/items (with possible empty items);
+ \item \MontreCode{ListSeps} must have the same number of elements than the number of levels (with possible empty items);
\item \MontreCode{ListOffsets} must have the same number of elements than the numbers of sub-levels (with 0 si no offset !).
\end{itemize}
@@ -237,7 +239,7 @@ A few tips, due to \MontreCode{ListIcons}, \MontreCode{ListOffsets} and \MontreC
\subsection{Terminal}
-In order to create a terminal (Win/UNiX/Mac), environments are :
+In order to create a terminal (Win/UNiX/Mac), environments are:
\begin{quote}
\begin{verbatim}
@@ -258,12 +260,12 @@ In order to create a terminal (Win/UNiX/Mac), environments are :
\end{verbatim}
\end{quote}
-Optional keys, between \MontreCode{[...]} are :
+Optional keys, between \MontreCode{[...]} are:
\begin{itemize}
- \item \MontreCode{Title} := title of the terminal (\MontreCode{Terminal Win/UNiX/Mac} by default) ;
- \item \MontreCode{Align} := horizontal alignment of the box (\MontreCode{center} by default) ;
- \item \MontreCode{Width} := width of the box (\MontreCode{\textbackslash linewidth} by default).
+ \item \MontreCode{Title}: title of the terminal (\MontreCode{Terminal Win/UNiX/Mac} by default);
+ \item \MontreCode{Align}: horizontal alignment of the box (\MontreCode{center} by default);
+ \item \MontreCode{Width}: width of the box (\MontreCode{\textbackslash linewidth} by default).
\end{itemize}
\medskip
@@ -275,14 +277,14 @@ The mandatory argument, between \MontreCode{\{...\}}, are options to give to the
Microsoft Windows [version 10.0.22000.493]
(c) Microsoft Corporation. Tous droits réservés.
C:\Users\test>ping ctan.org
-Envoi d'une requête 'ping' sur ctan.org [5.35.249.60] avec 32 octets de données :
-Réponse de 5.35.249.60 : octets=32 temps=35 ms TTL=51
-Réponse de 5.35.249.60 : octets=32 temps=37 ms TTL=51
-Réponse de 5.35.249.60 : octets=32 temps=35 ms TTL=51
-Réponse de 5.35.249.60 : octets=32 temps=39 ms TTL=51
+Envoi d'une requête 'ping' sur ctan.org [5.35.249.60] avec 32 octets de données:
+Réponse de 5.35.249.60: octets=32 temps=35 ms TTL=51
+Réponse de 5.35.249.60: octets=32 temps=37 ms TTL=51
+Réponse de 5.35.249.60: octets=32 temps=35 ms TTL=51
+Réponse de 5.35.249.60: octets=32 temps=39 ms TTL=51
Statistiques Ping pour 5.35.249.60:
-Paquets : envoyés = 4, reçus = 4, perdus = 0 (perte 0%),
-Durée approximative des boucles en millisecondes :
+Paquets: envoyés = 4, reçus = 4, perdus = 0 (perte 0%),
+Durée approximative des boucles en millisecondes:
Minimum = 35ms, Maximum = 39ms, Moyenne = 36ms
\end{TermWin}
\end{tcblisting}
@@ -305,7 +307,7 @@ PING ctan.org (5.35.249.60) 56(84) bytes of data.
\subsection{Viewers}
-In order to create a 'fake' viewer (for \textsf{pdf} or \textsf{img}), environments are :
+In order to create a 'fake' viewer (for \textsf{pdf} or \textsf{img}), environments are:
\begin{quote}
\begin{verbatim}
@@ -318,17 +320,22 @@ In order to create a 'fake' viewer (for \textsf{pdf} or \textsf{img}), environme
\begin{IMGViewer}[keys]{tcbox options}
....
\end{IMGViewer}
+
+%----Script editor like
+\begin{PYViewer}[keys]{tcbox options}
+ ....
+\end{PYViewer}
\end{verbatim}
\end{quote}
-Optional keys, between \MontreCode{[...]} are :
+Optional keys, between \MontreCode{[...]} are:
\begin{itemize}
- \item \MontreCode{Title} := title of the terminal (\MontreCode{Terminal Windows} by default) ;
- \item \MontreCode{Align} := horizontal alignment of the box (\MontreCode{center} by default) ;
- \item \MontreCode{Width} := width of the box (\MontreCode{\textbackslash linewidth} by default) ;
- \item \MontreCode{Halign} := horizontal alignment fot the content (\MontreCode{left} by default) ;
- \item \MontreCode{Icons} := boolean for the icons (\MontreCode{true} by default).
+ \item \MontreCode{Title}: title of the viewer;
+ \item \MontreCode{Align}: horizontal alignment of the box (\MontreCode{center} by default);
+ \item \MontreCode{Width}: width of the box (\MontreCode{\textbackslash linewidth} by default);
+ \item \MontreCode{Halign}: horizontal alignment fot the content (\MontreCode{left} by default);
+ \item \MontreCode{Icons}: boolean for the icons (\MontreCode{true} by default).
\end{itemize}
\medskip
@@ -360,4 +367,125 @@ The mandatory argument, between \MontreCode{\{...\}}, are options to give to the
\end{IMGViewer}
\end{tcblisting}
+\begin{tcblisting}{colframe=lightgray,colback=lightgray!5}
+%with listings, or piton, for example
+\begin{PYViewer}[width=12cm]{}
+\begin{lstlisting}%
+ [
+ language=python,basicstyle=\ttfamily\small,
+ keywordstyle=\color{green!50!black},tabsize=4,
+ keywordstyle={[2]\color{magenta}},
+ numbers=left,numbersep=3mm,xleftmargin=5mm,
+ aboveskip=0pt,belowskip=0pt,
+ numberstyle=\footnotesize\ttfamily\color{gray}
+ ]
+nterms = int(input("Entrez un nombre: "))
+
+n1 = 0
+n2 = 1
+
+print("\n la suite Fibonacci est: ")
+print(n1, ",", n2, end=", ")
+
+for i in range(2, nterms):
+ suivant = n1 + n2
+ print(suivant, end=", ")
+
+n1 = n2
+n2 = suivant
+\end{lstlisting}
+\end{PYViewer}
+\end{tcblisting}
+
+\pagebreak
+
+\subsection{Folders/files as in explrer}
+
+The \MontreCode{forest} package, with his library \MontreCode{edges}, can present foldertrees.
+
+\begin{quote}
+\begin{verbatim}
+\begin{ForestDirTree}[keys]{forest options}
+ [folder,FTdir
+ [subfolder1,FTdir]
+ [subfolder2,FTdir
+ [file1,FTfile]
+ [file2,FTfile]
+ ...
+ ]
+ ...
+ ]
+\end{ForestDirTree}
+\end{verbatim}
+\end{quote}
+
+Available \textsf{keys}, betweeen \MontreCode{[...]}, are:
+
+\begin{itemize}
+ \item \MontreCode{font}: font of texts;
+ \item \MontreCode{coliconfolder}: \MontreCode{gray} by default;
+ \item \MontreCode{coliconfile}: \MontreCode{gray} by default;
+ \item \MontreCode{iconfolders}: boolean for folder icons;
+ \item \MontreCode{iconfiles}: boolean for file icons;
+ \item \MontreCode{vsep}: vertical space between items (\MontreCode{0.15em} by default);
+ \item \MontreCode{iconfolder}: icon for folder;
+ \item \MontreCode{iconfile}: icone for file.
+\end{itemize}
+
+\medskip
+
+\textsf{Folders} need to be given within \MontreCode{<folder\_name>,FTdir}.
+
+\textsf{Files} need to be given within \MontreCode{<file\_name>,FTfile}.
+
+\medskip
+
+Mandatory argument, between \MontreCode{\{...\}}, corresponds to \textsf{forest} specific commands.
+
+\begin{tcblisting}{colframe=lightgray,colback=lightgray!5}
+\begin{ForestDirTree}{}
+ [folder,FTdir
+ [subfolder1,FTdir]
+ [subfolder2,FTdir
+ [file1,FTfile]
+ [file2,FTfile]
+ ]
+ [file3,FTfile]
+ ]
+\end{ForestDirTree}
+\end{tcblisting}
+
+\begin{tcblisting}{colframe=lightgray,colback=lightgray!5}
+\begin{ForestDirTree}%
+ [font=\sffamily,coliconfolder=yellow!50!pink,iconfiles,coliconfile=teal,vsep=0.5em]%
+ {}
+ [folder,FTdir
+ [subfolder1,FTdir]
+ [subfolder2,FTdir
+ [file1,FTfile]
+ [file2,FTfile]
+ ]
+ [file3,FTfile]
+ ]
+\end{ForestDirTree}
+\end{tcblisting}
+
+Styles are global, but can be locally defined.
+
+\begin{tcblisting}{colframe=lightgray,colback=lightgray!5}
+\tikzset{FTedge/.style={thick,->,densely dashed,red,>=latex}}
+\begin{ForestDirTree}%
+ [font=\sffamily,coliconfolder=yellow!50!pink,iconfiles,coliconfile=teal,vsep=0.5em]%
+ {l sep=2em}
+ [folder,FTdir
+ [subfolder1,FTdir]
+ [subfolder2,FTdir
+ [file1,FTfile]
+ [file2,FTfile]
+ ]
+ [file3,FTfile]
+ ]
+\end{ForestDirTree}
+\end{tcblisting}
+
\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/sim-os-menus/tex/sim-os-menus.sty b/macros/latex/contrib/sim-os-menus/tex/sim-os-menus.sty
index 01da065abb..ee8a15a8eb 100644
--- a/macros/latex/contrib/sim-os-menus/tex/sim-os-menus.sty
+++ b/macros/latex/contrib/sim-os-menus/tex/sim-os-menus.sty
@@ -2,7 +2,9 @@
% licence : Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txtf
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{sim-os-menus}[2023/11/14 0.1.1 Present 'context menu'/'terminal'/'windows', with TikZ or tcolorbox (en of fr commands)]
+\ProvidesPackage{sim-os-menus}[2024/09/28 0.1.3 Present 'context menu'/'terminal'/'windows', with TikZ or tcolorbox (en or fr commands)]
+% 0.1.3 DirTree avec forest
+% 0.1.2 Ajout d'une visionneuse type python
% 0.1.1 French version of the commands
% 0.1.0 Initial version
@@ -794,4 +796,180 @@
\endtcolorbox%
}
+%====PYVIEWER (OK) 0.1.2
+\tcbset{StylePYViewer/.style={%
+ enhanced,boxrule=1pt,arc=3pt,before skip=\baselineskip,after skip=\baselineskip,%
+ colframe=gray,colback=lightgray!5,colbacktitle=lightgray!15,colupper=black,coltitle=black,titlerule=0.4pt,left=3pt,top=2pt,bottom=2pt,right=2pt,middle=0pt,fonttitle=\bfseries\small\sffamily
+ }
+}
+
+\setKVdefault[PYVisionn]{Titre={Éditeur Python},Align={center},Largeur={\linewidth},AlignH={flush left},Icones=true}
+
+\NewDocumentCommand\PYVIewerTitre{ s }{%
+ \IfBooleanTF{#1}%
+ {%
+ \begin{tblr}{colsep=4pt,rowsep=0pt,width=\linewidth,colspec={l|[1pt]X[c]|[1pt]c},cells={font=\footnotesize}}
+ \vphantom{p}\useKV[PYVisionn]{Titre} && \faPython \\
+ \end{tblr}
+ }%
+ {%
+ \begin{tblr}{colsep=4pt,rowsep=0pt,width=\linewidth,colspec={l|[1pt]l|[1pt]l|[1pt]l|[1pt]X[c]|[1pt]c},cells={font=\footnotesize}}
+ \vphantom{p}\useKV[PYVisionn]{Titre} & \faFile*[regular]~~\faIcon[regular]
+ {file-code}~~\faSave&\faPlay~~\faStop&\faBug&& \faPython \\
+ \end{tblr}
+ }%
+}
+
+\NewDocumentEnvironment{VisionnPY}{ O{} m }
+{%
+ \restoreKV[PYVisionn]%
+ \setKV[PYVisionn]{#1}%
+ \tcolorbox[StylePYViewer,{\useKV[PYVisionn]{Align}},title={\ifboolKV[PYVisionn]{Icones}{\PYVIewerTitre}{\PYVIewerTitre*}},width={\useKV[PYVisionn]{Largeur}},halign={\useKV[PYVisionn]{AlignH}},#2]
+}%
+{%
+ \endtcolorbox%
+}
+
+\setKVdefault[PYViewer]{title={Python editor},align={center},width={\linewidth},halign={flush left},icons=true}
+
+\NewDocumentCommand\PYVIewerTitle{ s }{%
+ \IfBooleanTF{#1}%
+ {%
+ \begin{tblr}{colsep=4pt,rowsep=0pt,width=\linewidth,colspec={l|[1pt]X[c]|[1pt]c},cells={font=\footnotesize}}
+ \vphantom{p}\useKV[PYViewer]{title} && \faPython \\
+ \end{tblr}
+ }%
+ {%
+ \begin{tblr}{colsep=4pt,rowsep=0pt,width=\linewidth,colspec={l|[1pt]l|[1pt]l|[1pt]l|[1pt]X[c]|[1pt]c},cells={font=\footnotesize}}
+ \vphantom{p}\useKV[PYViewer]{title} & \faFile*[regular]~~\faIcon[regular]
+ {file-code}~~\faSave&\faPlay~~\faStop&\faBug&& \faPython \\
+ \end{tblr}
+ }%
+}
+
+\NewDocumentEnvironment{PYViewer}{ O{} m }
+{%
+ \restoreKV[PYViewer]%
+ \setKV[PYViewer]{#1}%
+ \tcolorbox[StylePYViewer,{\useKV[PYViewer]{align}},title={\ifboolKV[PYViewer]{icons}{\PYVIewerTitle}{\PYVIewerTitle*}},width={\useKV[PYViewer]{width}},halign={\useKV[PYViewer]{halign}},#2]
+}%
+{%
+ \endtcolorbox%
+}
+
+%====FOLDERTREEE (forest)
+\RequirePackage{forest}
+\useforestlibrary{edges}
+
+%\def\foldertreecolor{yellow!50!pink}
+%\def\filefoldertreecolor{gray}
+
+\NewDocumentCommand\dirforest{ s O{\foldertreecolor} }{%
+ \IfBooleanTF{#1}{}{\scalebox{0.85}[0.85]{\color{#2}\foldertreeiconfolder}\hspace{0.25em}}%
+}
+
+\NewDocumentCommand\fileforest{ s O{\filefoldertreecolor} }{%
+ \IfBooleanTF{#1}{}{\scalebox{0.85}[0.85]{\color{#2}\foldertreeiconfile}\hspace{0.25em}}%
+}
+
+\tikzset{FTdir/.style={inner sep=1pt,execute at begin node=\vphantom{(pL)}\dirforest}}
+\tikzset{FTfile/.style={inner sep=1pt,execute at begin node=\vphantom{(pL)}\fileforest}}
+\tikzset{FTedge/.style={semithick,darkgray}}
+
+\defKV[forestdirtree]{%
+ font=\def\forestditreefont{#1},%
+ coliconfolder=\def\foldertreecolor{#1},%
+ iconfolder=\def\foldertreeiconfolder{#1},%
+ coliconfile=\def\filefoldertreecolor{#1},%
+ vsep=\def\filefoldertreevsep{#1},%
+ iconfile=\def\foldertreeiconfile{#1}
+}
+
+\setKVdefault[forestdirtree]{%
+ font=\footnotesize\ttfamily,%
+ coliconfolder=gray,%
+ coliconfile=gray,%
+ iconfolders=true,%
+ iconfiles=false,%
+ vsep=0.15em,%
+ iconfolder={\faFolderOpen},%
+ iconfile={\faIcon*[regular]{file}}
+}
+
+\NewDocumentEnvironment{ForestDirTree}{ O{} m +b }
+{
+ \restoreKV[forestdirtree]%
+ \setKV[forestdirtree]{#1}%
+ \ifboolKV[forestdirtree]{iconfolders}%
+ {%
+ \tikzset{FTdir/.style={inner sep=1pt,execute at begin node=\vphantom{(pL)}\dirforest}}%
+ }%
+ {%
+ \tikzset{FTdir/.style={inner sep=1pt,execute at begin node=\vphantom{(pL)}\dirforest*}}%
+ }%
+ \ifboolKV[forestdirtree]{iconfiles}%
+ {%
+ \tikzset{FTfile/.style={inner sep=1pt,execute at begin node=\vphantom{(pL)}\fileforest}}%
+ }%
+ {%
+ \tikzset{FTfile/.style={inner sep=1pt,execute at begin node=\vphantom{(pL)}\fileforest*}}%
+ }%
+ \forest
+ for tree={s sep=\filefoldertreevsep,folder,grow'=0,folder indent=0.5em,fit=band,font=\forestditreefont,edge={FTedge},#2}
+ #3
+}%
+{%
+ \endforest%
+}
+
+\tikzset{ADdos/.style={inner sep=1pt,execute at begin node=\vphantom{(pL)}\dirforest}}
+\tikzset{ADfic/.style={inner sep=1pt,execute at begin node=\vphantom{(pL)}\fileforest}}
+\tikzset{ADtrait/.style={semithick,darkgray}}
+
+\defKV[forestarbor]{%
+ Police=\def\forestditreefont{#1},%
+ CoulIcoD=\def\foldertreecolor{#1},%
+ CoulIcoF=\def\filefoldertreecolor{#1},%
+ EspaceV=\def\filefoldertreevsep{#1},%
+ IcoD=\def\foldertreeiconfolder{#1},%
+ IcoF=\def\foldertreeiconfile{#1}
+}
+
+\setKVdefault[forestarbor]{%
+ Police=\footnotesize\ttfamily,%
+ CoulIcoD=gray,%
+ CoulIcoF=gray,%
+ AffIcoD=true,%
+ AffIcoF=false,%
+ EspaceV=0.15em,%
+ IcoD={\faFolderOpen},%
+ IcoF={\faIcon*[regular]{file}}
+}
+
+\NewDocumentEnvironment{ArborDossiers}{ O{} m +b }
+{
+ \restoreKV[forestarbor]%
+ \setKV[forestarbor]{#1}%
+ \ifboolKV[forestarbor]{AffIcoD}%
+ {%
+ \tikzset{ADdos/.style={inner sep=1pt,execute at begin node=\vphantom{(pL)}\dirforest}}%
+ }%
+ {%
+ \tikzset{ADdos/.style={inner sep=1pt,execute at begin node=\vphantom{(pL)}\dirforest*}}%
+ }%
+ \ifboolKV[forestarbor]{AffIcoF}%
+ {%
+ \tikzset{ADfic/.style={inner sep=1pt,execute at begin node=\vphantom{(pL)}\fileforest}}%
+ }%
+ {%
+ \tikzset{ADfic/.style={inner sep=1pt,execute at begin node=\vphantom{(pL)}\fileforest*}}%
+ }%
+ \forest
+ for tree={s sep=\filefoldertreevsep,folder,grow'=0,folder indent=0.5em,fit=band,font=\forestditreefont,edge={ADtrait},#2}
+ #3
+}%
+{%
+ \endforest%
+}
+
\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/siunitx/CHANGELOG.md b/macros/latex/contrib/siunitx/CHANGELOG.md
index 94d43ec98a..bfc2c8dbd0 100644
--- a/macros/latex/contrib/siunitx/CHANGELOG.md
+++ b/macros/latex/contrib/siunitx/CHANGELOG.md
@@ -7,6 +7,13 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
## [Unreleased]
+## [v3.3.22] - 2024-09-30
+
+### Fixed
+- Automatically set `unit-font-command` with `beamer` only when the user has
+ not manually adjusted (see issue
+ [\#748](https://github.com/josephwright/siunitx/issues/748))
+
## [v3.3.21] - 2024-08-20
### Fixed
@@ -2136,7 +2143,8 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
### Added
- First public testing release (as `si`)
-[Unreleased]: https://github.com/josephwright/siunitx/compare/v3.3.21...HEAD
+[Unreleased]: https://github.com/josephwright/siunitx/compare/v3.3.22...HEAD
+[v3.3.22]: https://github.com/josephwright/siunitx/compare/v3.3.21...v3.3.22
[v3.3.21]: https://github.com/josephwright/siunitx/compare/v3.3.20...v3.3.21
[v3.3.20]: https://github.com/josephwright/siunitx/compare/v3.3.19...v3.3.20
[v3.3.19]: https://github.com/josephwright/siunitx/compare/v3.3.18...v3.3.19
diff --git a/macros/latex/contrib/siunitx/siunitx-code.pdf b/macros/latex/contrib/siunitx/siunitx-code.pdf
index bef1e6afe6..cc2cd36afd 100644
--- a/macros/latex/contrib/siunitx/siunitx-code.pdf
+++ b/macros/latex/contrib/siunitx/siunitx-code.pdf
Binary files differ
diff --git a/macros/latex/contrib/siunitx/siunitx-compound.dtx b/macros/latex/contrib/siunitx/siunitx-compound.dtx
index ec5a680516..6bca9a8417 100644
--- a/macros/latex/contrib/siunitx/siunitx-compound.dtx
+++ b/macros/latex/contrib/siunitx/siunitx-compound.dtx
@@ -871,7 +871,6 @@
}
% \end{macrocode}
% \end{macro}
-% \end{macro}
%
% \begin{macro}{\@@_print:N}
% \begin{macro}{\@@_print:nnN, \@@_print:nVN, \@@_print:enN, \@@_print:eeN}
diff --git a/macros/latex/contrib/siunitx/siunitx-number.dtx b/macros/latex/contrib/siunitx/siunitx-number.dtx
index 4a7e2eb705..0cc2245559 100644
--- a/macros/latex/contrib/siunitx/siunitx-number.dtx
+++ b/macros/latex/contrib/siunitx/siunitx-number.dtx
@@ -4757,6 +4757,7 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \subsection{Miscellaneous tools}
%
diff --git a/macros/latex/contrib/siunitx/siunitx-unit.dtx b/macros/latex/contrib/siunitx/siunitx-unit.dtx
index 7faf5740da..6c440b8fd6 100644
--- a/macros/latex/contrib/siunitx/siunitx-unit.dtx
+++ b/macros/latex/contrib/siunitx/siunitx-unit.dtx
@@ -2997,7 +2997,10 @@
\str_if_eq:eeT
{ \exp_not:o { \familydefault } }
{ \exp_not:n { \sfdefault } }
- { \keys_set:nn { siunitx } { unit-font-command = \mathsf } }
+ {
+ \tl_if_eq:VnT \l_siunitx_unit_font_tl { \mathrm }
+ { \keys_set:nn { siunitx } { unit-font-command = \mathsf } }
+ }
}
{ }
}
diff --git a/macros/latex/contrib/siunitx/siunitx.dtx b/macros/latex/contrib/siunitx/siunitx.dtx
index eda108df6d..11bce0caf9 100644
--- a/macros/latex/contrib/siunitx/siunitx.dtx
+++ b/macros/latex/contrib/siunitx/siunitx.dtx
@@ -124,7 +124,7 @@
%
% Identify the package and give the over all version information.
% \begin{macrocode}
-\ProvidesExplPackage {siunitx} {2024-08-20} {3.3.21}
+\ProvidesExplPackage {siunitx} {2024-09-30} {3.3.22}
{A comprehensive (SI) units package}
% \end{macrocode}
%
diff --git a/macros/latex/contrib/siunitx/siunitx.pdf b/macros/latex/contrib/siunitx/siunitx.pdf
index 3454497b6f..4dd0e88018 100644
--- a/macros/latex/contrib/siunitx/siunitx.pdf
+++ b/macros/latex/contrib/siunitx/siunitx.pdf
Binary files differ
diff --git a/macros/latex/contrib/spelatex/Example/example-spel/1.0.0.0.0.m3u b/macros/latex/contrib/spelatex/Example/example-spel/1.0.0.0.0.m3u
index cc969b31f7..91ac08fda4 100644
--- a/macros/latex/contrib/spelatex/Example/example-spel/1.0.0.0.0.m3u
+++ b/macros/latex/contrib/spelatex/Example/example-spel/1.0.0.0.0.m3u
@@ -1,6 +1,6 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-1.0.0.0.0.ogg
-1.0.0.0.0-1.ogg
-1.0.0.0.0-2.ogg
-1.0.0.0.0-3.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/Example/example-spel/1.0.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/Example/example-spel/1.0.0.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/Example/example-spel/1.0.0.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/Example/example-spel/1.0.0.0.0-3.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/Example/example-spel/2.0.0.0.0-2.ogg b/macros/latex/contrib/spelatex/Example/example-spel/2.0.0.0.0-2.ogg
index f8f68b313b..02dde27b80 100644
--- a/macros/latex/contrib/spelatex/Example/example-spel/2.0.0.0.0-2.ogg
+++ b/macros/latex/contrib/spelatex/Example/example-spel/2.0.0.0.0-2.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/Example/example-spel/2.0.0.0.0.m3u b/macros/latex/contrib/spelatex/Example/example-spel/2.0.0.0.0.m3u
index 38ff0aca21..713b1fbef2 100644
--- a/macros/latex/contrib/spelatex/Example/example-spel/2.0.0.0.0.m3u
+++ b/macros/latex/contrib/spelatex/Example/example-spel/2.0.0.0.0.m3u
@@ -1,6 +1,6 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-2.0.0.0.0.ogg
-2.0.0.0.0-1.ogg
-2.0.0.0.0-2.ogg
-2.0.0.0.0-3.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/Example/example-spel/2.0.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/Example/example-spel/2.0.0.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/Example/example-spel/2.0.0.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/Example/example-spel/2.0.0.0.0-3.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/Example/example-spel/3.0.0.0.0-1.ogg b/macros/latex/contrib/spelatex/Example/example-spel/3.0.0.0.0-1.ogg
index d500956316..4eaba9ff01 100644
--- a/macros/latex/contrib/spelatex/Example/example-spel/3.0.0.0.0-1.ogg
+++ b/macros/latex/contrib/spelatex/Example/example-spel/3.0.0.0.0-1.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/Example/example-spel/3.0.0.0.0-2.ogg b/macros/latex/contrib/spelatex/Example/example-spel/3.0.0.0.0-2.ogg
deleted file mode 100644
index affd24989c..0000000000
--- a/macros/latex/contrib/spelatex/Example/example-spel/3.0.0.0.0-2.ogg
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/spelatex/Example/example-spel/3.0.0.0.0.m3u b/macros/latex/contrib/spelatex/Example/example-spel/3.0.0.0.0.m3u
index 7126037f5d..3671d80c2f 100644
--- a/macros/latex/contrib/spelatex/Example/example-spel/3.0.0.0.0.m3u
+++ b/macros/latex/contrib/spelatex/Example/example-spel/3.0.0.0.0.m3u
@@ -1,5 +1,4 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-3.0.0.0.0.ogg
-3.0.0.0.0-1.ogg
-3.0.0.0.0-2.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/Example/example-spel/3.0.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/Example/example-spel/3.0.0.0.0-1.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/Example/example-spel/3.0.0.0.0.ogg b/macros/latex/contrib/spelatex/Example/example-spel/3.0.0.0.0.ogg
index d7147b5cd6..6d927f70ee 100644
--- a/macros/latex/contrib/spelatex/Example/example-spel/3.0.0.0.0.ogg
+++ b/macros/latex/contrib/spelatex/Example/example-spel/3.0.0.0.0.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/Example/example-spel/4.0.0.0.0-1.ogg b/macros/latex/contrib/spelatex/Example/example-spel/4.0.0.0.0-1.ogg
index c5307858c7..0997141f89 100644
--- a/macros/latex/contrib/spelatex/Example/example-spel/4.0.0.0.0-1.ogg
+++ b/macros/latex/contrib/spelatex/Example/example-spel/4.0.0.0.0-1.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/Example/example-spel/4.0.0.0.0-2.ogg b/macros/latex/contrib/spelatex/Example/example-spel/4.0.0.0.0-2.ogg
index ef40bd9734..6149c8be5e 100644
--- a/macros/latex/contrib/spelatex/Example/example-spel/4.0.0.0.0-2.ogg
+++ b/macros/latex/contrib/spelatex/Example/example-spel/4.0.0.0.0-2.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/Example/example-spel/4.0.0.0.0.m3u b/macros/latex/contrib/spelatex/Example/example-spel/4.0.0.0.0.m3u
index 3eebda66de..db5793d338 100644
--- a/macros/latex/contrib/spelatex/Example/example-spel/4.0.0.0.0.m3u
+++ b/macros/latex/contrib/spelatex/Example/example-spel/4.0.0.0.0.m3u
@@ -1,5 +1,5 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-4.0.0.0.0.ogg
-4.0.0.0.0-1.ogg
-4.0.0.0.0-2.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/Example/example-spel/4.0.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/Example/example-spel/4.0.0.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/Example/example-spel/4.0.0.0.0-2.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/Example/example-spel/4.0.0.0.0.ogg b/macros/latex/contrib/spelatex/Example/example-spel/4.0.0.0.0.ogg
index 95da73a4f1..0a32402724 100644
--- a/macros/latex/contrib/spelatex/Example/example-spel/4.0.0.0.0.ogg
+++ b/macros/latex/contrib/spelatex/Example/example-spel/4.0.0.0.0.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/Example/example-spel/5.0.0.0.0-1.ogg b/macros/latex/contrib/spelatex/Example/example-spel/5.0.0.0.0-1.ogg
new file mode 100644
index 0000000000..be2515b1e1
--- /dev/null
+++ b/macros/latex/contrib/spelatex/Example/example-spel/5.0.0.0.0-1.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/Example/example-spel/5.0.0.0.0-2.ogg b/macros/latex/contrib/spelatex/Example/example-spel/5.0.0.0.0-2.ogg
new file mode 100644
index 0000000000..ab833a6d74
--- /dev/null
+++ b/macros/latex/contrib/spelatex/Example/example-spel/5.0.0.0.0-2.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/Example/example-spel/5.0.0.0.0.m3u b/macros/latex/contrib/spelatex/Example/example-spel/5.0.0.0.0.m3u
index ed93b0f718..7fa2b45726 100644
--- a/macros/latex/contrib/spelatex/Example/example-spel/5.0.0.0.0.m3u
+++ b/macros/latex/contrib/spelatex/Example/example-spel/5.0.0.0.0.m3u
@@ -1,8 +1,5 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-5.0.0.0.0.ogg
-5.1.0.0.0.ogg
-5.1.0.0.0-1.ogg
-5.2.0.0.0.ogg
-5.2.0.0.0-1.ogg
-5.2.0.0.0-star-1.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/Example/example-spel/5.0.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/Example/example-spel/5.0.0.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/Example/example-spel/5.0.0.0.0-2.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/Example/example-spel/5.0.0.0.0.ogg b/macros/latex/contrib/spelatex/Example/example-spel/5.0.0.0.0.ogg
index ba529eb4c3..46f1a90aee 100644
--- a/macros/latex/contrib/spelatex/Example/example-spel/5.0.0.0.0.ogg
+++ b/macros/latex/contrib/spelatex/Example/example-spel/5.0.0.0.0.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/Example/example-spel/5.1.0.0.0-1.ogg b/macros/latex/contrib/spelatex/Example/example-spel/5.1.0.0.0-1.ogg
deleted file mode 100644
index e987134adf..0000000000
--- a/macros/latex/contrib/spelatex/Example/example-spel/5.1.0.0.0-1.ogg
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/spelatex/Example/example-spel/5.1.0.0.0.m3u b/macros/latex/contrib/spelatex/Example/example-spel/5.1.0.0.0.m3u
deleted file mode 100644
index 69e1f4059e..0000000000
--- a/macros/latex/contrib/spelatex/Example/example-spel/5.1.0.0.0.m3u
+++ /dev/null
@@ -1,4 +0,0 @@
-#EXTM3U
-#EXTINF: section playlist generated with SpeLbox
-5.1.0.0.0.ogg
-5.1.0.0.0-1.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/Example/example-spel/5.1.0.0.0.ogg b/macros/latex/contrib/spelatex/Example/example-spel/5.1.0.0.0.ogg
deleted file mode 100644
index 8eab7ae3fb..0000000000
--- a/macros/latex/contrib/spelatex/Example/example-spel/5.1.0.0.0.ogg
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/spelatex/Example/example-spel/5.2.0.0.0-1.ogg b/macros/latex/contrib/spelatex/Example/example-spel/5.2.0.0.0-1.ogg
deleted file mode 100644
index dfa846e2fc..0000000000
--- a/macros/latex/contrib/spelatex/Example/example-spel/5.2.0.0.0-1.ogg
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/spelatex/Example/example-spel/5.2.0.0.0-star-1.ogg b/macros/latex/contrib/spelatex/Example/example-spel/5.2.0.0.0-star-1.ogg
deleted file mode 100644
index 1404701800..0000000000
--- a/macros/latex/contrib/spelatex/Example/example-spel/5.2.0.0.0-star-1.ogg
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/spelatex/Example/example-spel/5.2.0.0.0.m3u b/macros/latex/contrib/spelatex/Example/example-spel/5.2.0.0.0.m3u
deleted file mode 100644
index e5106355e4..0000000000
--- a/macros/latex/contrib/spelatex/Example/example-spel/5.2.0.0.0.m3u
+++ /dev/null
@@ -1,5 +0,0 @@
-#EXTM3U
-#EXTINF: section playlist generated with SpeLbox
-5.2.0.0.0.ogg
-5.2.0.0.0-1.ogg
-5.2.0.0.0-star-1.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/Example/example-spel/5.2.0.0.0.ogg b/macros/latex/contrib/spelatex/Example/example-spel/5.2.0.0.0.ogg
deleted file mode 100644
index 7e2bb4d502..0000000000
--- a/macros/latex/contrib/spelatex/Example/example-spel/5.2.0.0.0.ogg
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/spelatex/Example/example-spel/6.0.0.0.0.m3u b/macros/latex/contrib/spelatex/Example/example-spel/6.0.0.0.0.m3u
new file mode 100644
index 0000000000..db6a522d98
--- /dev/null
+++ b/macros/latex/contrib/spelatex/Example/example-spel/6.0.0.0.0.m3u
@@ -0,0 +1,8 @@
+#EXTM3U
+#EXTINF: section playlist generated with SpeLbox
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/Example/example-spel/6.0.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/Example/example-spel/6.1.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/Example/example-spel/6.1.0.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/Example/example-spel/6.2.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/Example/example-spel/6.2.0.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/Example/example-spel/6.2.0.0.0-star-1.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/Example/example-spel/6.0.0.0.0.ogg b/macros/latex/contrib/spelatex/Example/example-spel/6.0.0.0.0.ogg
new file mode 100644
index 0000000000..bed8f1bb03
--- /dev/null
+++ b/macros/latex/contrib/spelatex/Example/example-spel/6.0.0.0.0.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/Example/example-spel/6.1.0.0.0-1.ogg b/macros/latex/contrib/spelatex/Example/example-spel/6.1.0.0.0-1.ogg
new file mode 100644
index 0000000000..6dfbf8a509
--- /dev/null
+++ b/macros/latex/contrib/spelatex/Example/example-spel/6.1.0.0.0-1.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/Example/example-spel/6.1.0.0.0.m3u b/macros/latex/contrib/spelatex/Example/example-spel/6.1.0.0.0.m3u
new file mode 100644
index 0000000000..b43f6329ad
--- /dev/null
+++ b/macros/latex/contrib/spelatex/Example/example-spel/6.1.0.0.0.m3u
@@ -0,0 +1,4 @@
+#EXTM3U
+#EXTINF: section playlist generated with SpeLbox
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/Example/example-spel/6.1.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/Example/example-spel/6.1.0.0.0-1.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/Example/example-spel/6.1.0.0.0.ogg b/macros/latex/contrib/spelatex/Example/example-spel/6.1.0.0.0.ogg
new file mode 100644
index 0000000000..f9c2e18dcf
--- /dev/null
+++ b/macros/latex/contrib/spelatex/Example/example-spel/6.1.0.0.0.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/Example/example-spel/6.2.0.0.0-1.ogg b/macros/latex/contrib/spelatex/Example/example-spel/6.2.0.0.0-1.ogg
new file mode 100644
index 0000000000..922879ce56
--- /dev/null
+++ b/macros/latex/contrib/spelatex/Example/example-spel/6.2.0.0.0-1.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/Example/example-spel/6.2.0.0.0-star-1.ogg b/macros/latex/contrib/spelatex/Example/example-spel/6.2.0.0.0-star-1.ogg
new file mode 100644
index 0000000000..bdb2af86f5
--- /dev/null
+++ b/macros/latex/contrib/spelatex/Example/example-spel/6.2.0.0.0-star-1.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/Example/example-spel/6.2.0.0.0.m3u b/macros/latex/contrib/spelatex/Example/example-spel/6.2.0.0.0.m3u
new file mode 100644
index 0000000000..29538b4e74
--- /dev/null
+++ b/macros/latex/contrib/spelatex/Example/example-spel/6.2.0.0.0.m3u
@@ -0,0 +1,5 @@
+#EXTM3U
+#EXTINF: section playlist generated with SpeLbox
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/Example/example-spel/6.2.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/Example/example-spel/6.2.0.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/Example/example-spel/6.2.0.0.0-star-1.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/Example/example-spel/6.2.0.0.0.ogg b/macros/latex/contrib/spelatex/Example/example-spel/6.2.0.0.0.ogg
new file mode 100644
index 0000000000..4e28b44c68
--- /dev/null
+++ b/macros/latex/contrib/spelatex/Example/example-spel/6.2.0.0.0.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/Example/example-spel/date.ogg b/macros/latex/contrib/spelatex/Example/example-spel/date.ogg
index 2c8670eb1a..d69821531c 100644
--- a/macros/latex/contrib/spelatex/Example/example-spel/date.ogg
+++ b/macros/latex/contrib/spelatex/Example/example-spel/date.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/Example/example.pdf b/macros/latex/contrib/spelatex/Example/example.pdf
index 81ace4e4e3..5de7e5035b 100644
--- a/macros/latex/contrib/spelatex/Example/example.pdf
+++ b/macros/latex/contrib/spelatex/Example/example.pdf
Binary files differ
diff --git a/macros/latex/contrib/spelatex/Example/example.tex b/macros/latex/contrib/spelatex/Example/example.tex
index e7a5e8dc69..9bd4f3ca90 100644
--- a/macros/latex/contrib/spelatex/Example/example.tex
+++ b/macros/latex/contrib/spelatex/Example/example.tex
@@ -1,9 +1,12 @@
\documentclass{article}
-\usepackage[dutch,english]{babel} % load babel before spel to avoid
+\usepackage[dutch,english]{babel} % load babel before spelatex to avoid
% option clash!
\selectlanguage{english}
-\usepackage[format=ogg]{spelatex}
+\usepackage[format=ogg,
+ server=https://ctan.org/tex-archive/macros/latex/contrib/spelatex/Example
+ ]
+ {spelatex}
\newrobustcmd\CTAN{CTAN}
\spelmacad{CTAN}{see-tan}
@@ -12,7 +15,7 @@
\title{\spelatex{} Example}
\author{Walter Daems and Paul Levrie}
-\date{2011/04/12}
+\date{2024/09/09}
\setlength\parindent{0em}
\setlength\parskip{1ex}
@@ -22,10 +25,10 @@
\section{Introduction}
-\begin{spelchunk}
- This file is just a simple showcase of the features of \spelatex.
+\<<<{
+ This file is just a simple showcase of the features of \spelatex{}.
Below, you'll find examples of:
-\end{spelchunk}
+}
\begin{itemize}
\spelitem{a simple equation}
@@ -34,20 +37,25 @@
\section{A simple equation}
\label{eqn:simple}
-\begin{spelchunk}
+\<<<{
Consider the following simple definition of a polynomial function and
check its spoken version by clicking on it.
-\end{spelchunk}
-\begin{spelchunk}[arealink]
+}
+\<<<[arealink]{
\begin{equation}
- f(x) = x^{5}- x^4 + 7 x^3 + 3 x^2 - 8 x + 23
+ f(x) = x^{5}- x^4 + 7 x^3 + 3 x^2 - 8 x + 25
\end{equation}
-\end{spelchunk}
-\begin{spelchunk}
+}
+\<<<{
This seems a simple equation, however, it is not so straightforward
for an automated reader, to read it correctly.
-\end{spelchunk}
+}
+\section{Remark}
+\<<<{
+Instead of the \texttt{\textbackslash{}<<<} macro, one can also use the
+spelchunk environment. We did this in the next sections.
+}
\section{A more complex equation}
\newcommand\xx[2]{\ensuremath{#1_{#2}}}
\spelmacad{xx}[2]{#1 #2}
@@ -80,6 +88,7 @@ voorleesstem de geselecteerde taal zal volgen.
\end{spelchunk}
\selectlanguage{english}
+
\section{And some extras}
\subsection{Citations}
\begin{spelchunk}
@@ -93,6 +102,8 @@ equation. For a more complex equation, we refer the user to
section~\ref{eqn:complex}.
\end{spelchunk}
+\selectlanguage{dutch}
+
\bibliographystyle{alpha}
\begin{thebibliography}{99}
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/0.0.0.0.0-1.ogg b/macros/latex/contrib/spelatex/spelatex-spel/0.0.0.0.0-1.ogg
new file mode 100644
index 0000000000..df4aa6bb16
--- /dev/null
+++ b/macros/latex/contrib/spelatex/spelatex-spel/0.0.0.0.0-1.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/0.0.0.0.0-star-1.ogg b/macros/latex/contrib/spelatex/spelatex-spel/0.0.0.0.0-star-1.ogg
new file mode 100644
index 0000000000..880f14b74c
--- /dev/null
+++ b/macros/latex/contrib/spelatex/spelatex-spel/0.0.0.0.0-star-1.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/1.0.0.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/1.0.0.0.0.m3u
index a6c2dc392a..336bff8202 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/1.0.0.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/1.0.0.0.0.m3u
@@ -1,31 +1,30 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-1.0.0.0.0.ogg
-1.1.0.0.0.ogg
-1.1.0.0.0-1.ogg
-1.1.0.0.0-2.ogg
-1.1.0.0.0-3.ogg
-1.2.0.0.0.ogg
-1.2.1.0.0.ogg
-1.2.1.0.0-1.ogg
-1.2.1.0.0-2.ogg
-1.2.1.0.0-3.ogg
-1.2.2.0.0.ogg
-1.2.2.0.0-1.ogg
-1.2.2.0.0-2.ogg
-1.2.2.0.0-3.ogg
-1.2.2.0.0-4.ogg
-1.2.2.0.0-5.ogg
-1.3.0.0.0.ogg
-1.3.0.0.0-1.ogg
-1.3.0.0.0-2.ogg
-1.3.0.0.0-3.ogg
-1.3.0.0.0-4.ogg
-1.3.0.0.0-5.ogg
-1.3.0.0.0-6.ogg
-1.3.0.0.0-7.ogg
-1.3.0.0.0-8.ogg
-1.3.0.0.0-9.ogg
-1.3.0.0.0-10.ogg
-1.3.0.0.0-11.ogg
-1.3.0.0.0-12.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.0.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.1.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.1.0.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.1.0.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.1.0.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.2.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.2.1.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.2.1.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.2.1.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.2.1.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.2.2.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.2.2.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.2.2.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.2.2.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.2.2.0.0-4.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.2.2.0.0-5.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-4.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-5.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-6.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-7.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-8.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-9.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-10.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-11.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/1.1.0.0.0-1.ogg b/macros/latex/contrib/spelatex/spelatex-spel/1.1.0.0.0-1.ogg
index ea54ff261a..a366bca8ad 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/1.1.0.0.0-1.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/1.1.0.0.0-1.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/1.1.0.0.0-3.ogg b/macros/latex/contrib/spelatex/spelatex-spel/1.1.0.0.0-3.ogg
index 28092584ed..068f5fad07 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/1.1.0.0.0-3.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/1.1.0.0.0-3.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/1.1.0.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/1.1.0.0.0.m3u
index 4ebe5bab70..17ed4772e7 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/1.1.0.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/1.1.0.0.0.m3u
@@ -1,6 +1,6 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-1.1.0.0.0.ogg
-1.1.0.0.0-1.ogg
-1.1.0.0.0-2.ogg
-1.1.0.0.0-3.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.1.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.1.0.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.1.0.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.1.0.0.0-3.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/1.2.0.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/1.2.0.0.0.m3u
index db1dae06a9..66182bc053 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/1.2.0.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/1.2.0.0.0.m3u
@@ -1,13 +1,13 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-1.2.0.0.0.ogg
-1.2.1.0.0.ogg
-1.2.1.0.0-1.ogg
-1.2.1.0.0-2.ogg
-1.2.1.0.0-3.ogg
-1.2.2.0.0.ogg
-1.2.2.0.0-1.ogg
-1.2.2.0.0-2.ogg
-1.2.2.0.0-3.ogg
-1.2.2.0.0-4.ogg
-1.2.2.0.0-5.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.2.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.2.1.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.2.1.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.2.1.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.2.1.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.2.2.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.2.2.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.2.2.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.2.2.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.2.2.0.0-4.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.2.2.0.0-5.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/1.2.1.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/1.2.1.0.0.m3u
index b0e1e17f30..422edaa872 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/1.2.1.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/1.2.1.0.0.m3u
@@ -1,6 +1,6 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-1.2.1.0.0.ogg
-1.2.1.0.0-1.ogg
-1.2.1.0.0-2.ogg
-1.2.1.0.0-3.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.2.1.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.2.1.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.2.1.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.2.1.0.0-3.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/1.2.2.0.0-2.ogg b/macros/latex/contrib/spelatex/spelatex-spel/1.2.2.0.0-2.ogg
index a622038409..92cd2374e6 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/1.2.2.0.0-2.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/1.2.2.0.0-2.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/1.2.2.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/1.2.2.0.0.m3u
index ad74166429..fdae5dffb4 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/1.2.2.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/1.2.2.0.0.m3u
@@ -1,8 +1,8 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-1.2.2.0.0.ogg
-1.2.2.0.0-1.ogg
-1.2.2.0.0-2.ogg
-1.2.2.0.0-3.ogg
-1.2.2.0.0-4.ogg
-1.2.2.0.0-5.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.2.2.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.2.2.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.2.2.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.2.2.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.2.2.0.0-4.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.2.2.0.0-5.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-10.ogg b/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-10.ogg
index fd861c6630..c3ff365f2d 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-10.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-10.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-11.ogg b/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-11.ogg
index c19ca3750d..00c03765f7 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-11.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-11.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-12.ogg b/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-12.ogg
deleted file mode 100644
index 896cfe1e9f..0000000000
--- a/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-12.ogg
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-2.ogg b/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-2.ogg
index b2ceb636ed..ccd92eec94 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-2.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-2.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-6.ogg b/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-6.ogg
index 6432746abe..8138640c62 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-6.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-6.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-7.ogg b/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-7.ogg
index fd282fc22e..c415458583 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-7.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-7.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-8.ogg b/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-8.ogg
index 11e45178a3..5df4676bff 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-8.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-8.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-9.ogg b/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-9.ogg
index 5df4676bff..fd861c6630 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-9.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-9.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0.m3u
index d673720186..e7cfe5aa3b 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0.m3u
@@ -1,15 +1,14 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-1.3.0.0.0.ogg
-1.3.0.0.0-1.ogg
-1.3.0.0.0-2.ogg
-1.3.0.0.0-3.ogg
-1.3.0.0.0-4.ogg
-1.3.0.0.0-5.ogg
-1.3.0.0.0-6.ogg
-1.3.0.0.0-7.ogg
-1.3.0.0.0-8.ogg
-1.3.0.0.0-9.ogg
-1.3.0.0.0-10.ogg
-1.3.0.0.0-11.ogg
-1.3.0.0.0-12.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-4.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-5.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-6.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-7.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-8.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-9.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-10.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/1.3.0.0.0-11.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.0.0.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/2.0.0.0.0.m3u
index 9c053963b6..09f08f782b 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/2.0.0.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/2.0.0.0.0.m3u
@@ -1,59 +1,49 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-2.0.0.0.0.ogg
-2.1.0.0.0.ogg
-2.1.0.0.0-1.ogg
-2.1.0.0.0-2.ogg
-2.1.0.0.0-3.ogg
-2.1.0.0.0-4.ogg
-2.1.0.0.0-5.ogg
-2.1.0.0.0-6.ogg
-footnote-1.ogg
-2.2.0.0.0.ogg
-2.2.1.0.0.ogg
-2.2.1.0.0-1.ogg
-2.2.1.0.0-2.ogg
-2.2.1.0.0-3.ogg
-2.2.1.0.0-4.ogg
-2.2.2.0.0.ogg
-2.2.2.0.0-1.ogg
-2.2.2.0.0-2.ogg
-2.2.2.0.0-3.ogg
-2.2.2.0.0-4.ogg
-footnote-2.ogg
-2.2.2.0.0-5.ogg
-2.2.2.0.0-6.ogg
-2.2.2.0.0-7.ogg
-2.2.2.0.0-8.ogg
-2.2.2.0.0-9.ogg
-2.2.2.0.0-10.ogg
-2.2.2.0.0-11.ogg
-2.2.2.0.0-12.ogg
-2.2.3.0.0.ogg
-2.2.3.0.0-1.ogg
-2.2.3.0.0-2.ogg
-2.2.4.0.0.ogg
-2.2.4.0.0-1.ogg
-2.2.4.0.0-2.ogg
-2.2.4.0.0-3.ogg
-2.2.4.0.0-4.ogg
-2.2.4.0.0-5.ogg
-2.2.4.0.0-6.ogg
-2.2.5.0.0.ogg
-2.2.5.0.0-1.ogg
-2.2.5.0.0-2.ogg
-2.2.6.0.0.ogg
-2.2.6.0.0-1.ogg
-2.2.6.0.0-2.ogg
-2.2.6.0.0-3.ogg
-2.3.0.0.0.ogg
-2.3.0.0.0-1.ogg
-2.3.0.0.0-2.ogg
-2.3.0.0.0-3.ogg
-2.3.0.0.0-4.ogg
-2.4.0.0.0.ogg
-2.4.0.0.0-1.ogg
-2.4.0.0.0-2.ogg
-2.4.0.0.0-3.ogg
-2.4.0.0.0-4.ogg
-2.4.0.0.0-5.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.0.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.1.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.1.0.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.1.0.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.1.0.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.1.0.0.0-4.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.1.0.0.0-5.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.1.0.0.0-6.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/footnote-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/footnote-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-4.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-5.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-6.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-7.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-8.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-9.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-10.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-11.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0-4.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0-5.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0-6.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.4.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.4.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.4.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.4.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.3.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.3.0.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.3.0.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.3.0.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.3.0.0.0-4.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.4.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.4.0.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.4.0.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.4.0.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.4.0.0.0-4.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.1.0.0.0-6.ogg b/macros/latex/contrib/spelatex/spelatex-spel/2.1.0.0.0-6.ogg
index 8f73c2c7ca..821b83161e 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/2.1.0.0.0-6.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/2.1.0.0.0-6.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.1.0.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/2.1.0.0.0.m3u
index 639be865ec..a090328aba 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/2.1.0.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/2.1.0.0.0.m3u
@@ -1,10 +1,10 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-2.1.0.0.0.ogg
-2.1.0.0.0-1.ogg
-2.1.0.0.0-2.ogg
-2.1.0.0.0-3.ogg
-2.1.0.0.0-4.ogg
-2.1.0.0.0-5.ogg
-2.1.0.0.0-6.ogg
-footnote-1.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.1.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.1.0.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.1.0.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.1.0.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.1.0.0.0-4.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.1.0.0.0-5.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.1.0.0.0-6.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/footnote-1.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.2.0.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/2.2.0.0.0.m3u
index 6fba59dcf3..6c5d7a2f5c 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/2.2.0.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/2.2.0.0.0.m3u
@@ -1,39 +1,30 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-2.2.0.0.0.ogg
-2.2.1.0.0.ogg
-2.2.1.0.0-1.ogg
-2.2.1.0.0-2.ogg
-2.2.1.0.0-3.ogg
-2.2.1.0.0-4.ogg
-2.2.2.0.0.ogg
-2.2.2.0.0-1.ogg
-2.2.2.0.0-2.ogg
-2.2.2.0.0-3.ogg
-2.2.2.0.0-4.ogg
-footnote-2.ogg
-2.2.2.0.0-5.ogg
-2.2.2.0.0-6.ogg
-2.2.2.0.0-7.ogg
-2.2.2.0.0-8.ogg
-2.2.2.0.0-9.ogg
-2.2.2.0.0-10.ogg
-2.2.2.0.0-11.ogg
-2.2.2.0.0-12.ogg
-2.2.3.0.0.ogg
-2.2.3.0.0-1.ogg
-2.2.3.0.0-2.ogg
-2.2.4.0.0.ogg
-2.2.4.0.0-1.ogg
-2.2.4.0.0-2.ogg
-2.2.4.0.0-3.ogg
-2.2.4.0.0-4.ogg
-2.2.4.0.0-5.ogg
-2.2.4.0.0-6.ogg
-2.2.5.0.0.ogg
-2.2.5.0.0-1.ogg
-2.2.5.0.0-2.ogg
-2.2.6.0.0.ogg
-2.2.6.0.0-1.ogg
-2.2.6.0.0-2.ogg
-2.2.6.0.0-3.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/footnote-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-4.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-5.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-6.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-7.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-8.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-9.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-10.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-11.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0-4.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0-5.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0-6.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.4.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.4.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.4.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.4.0.0-3.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-1.ogg b/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-1.ogg
index 6bf77572b9..a8a29d2801 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-1.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-1.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-10.ogg b/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-10.ogg
new file mode 100644
index 0000000000..c7bb7a1b33
--- /dev/null
+++ b/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-10.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-11.ogg b/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-11.ogg
new file mode 100644
index 0000000000..162c3226cf
--- /dev/null
+++ b/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-11.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-2.ogg b/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-2.ogg
index fde009a238..a4eb2eb9cc 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-2.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-2.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-3.ogg b/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-3.ogg
index 0c47ef1f1c..3d2bc129e6 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-3.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-3.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-4.ogg b/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-4.ogg
index ede30fbdfe..0fb3364544 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-4.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-4.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-5.ogg b/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-5.ogg
new file mode 100644
index 0000000000..6abfabbd7f
--- /dev/null
+++ b/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-5.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-6.ogg b/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-6.ogg
new file mode 100644
index 0000000000..782ef82610
--- /dev/null
+++ b/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-6.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-7.ogg b/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-7.ogg
new file mode 100644
index 0000000000..af192260ab
--- /dev/null
+++ b/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-7.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0-9.ogg b/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-8.ogg
index 69f1ac6701..69f1ac6701 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0-9.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-8.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0-10.ogg b/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-9.ogg
index 437bbfb2fa..437bbfb2fa 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0-10.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-9.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0.m3u
index 98183521d8..d13d4ba944 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0.m3u
@@ -1,7 +1,15 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-2.2.1.0.0.ogg
-2.2.1.0.0-1.ogg
-2.2.1.0.0-2.ogg
-2.2.1.0.0-3.ogg
-2.2.1.0.0-4.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/footnote-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-4.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-5.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-6.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-7.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-8.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-9.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-10.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0-11.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0.ogg b/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0.ogg
index d62c585ba2..61e1c17229 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/2.2.1.0.0.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0-1.ogg b/macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0-1.ogg
index a8a29d2801..95cc730494 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0-1.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0-1.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0-11.ogg b/macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0-11.ogg
deleted file mode 100644
index 9770b89c6e..0000000000
--- a/macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0-11.ogg
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0-12.ogg b/macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0-12.ogg
deleted file mode 100644
index 3f7983f7c5..0000000000
--- a/macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0-12.ogg
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0-2.ogg b/macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0-2.ogg
index 472d803099..16a86de311 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0-2.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0-2.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0-3.ogg b/macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0-3.ogg
deleted file mode 100644
index 375c547c08..0000000000
--- a/macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0-3.ogg
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0-4.ogg b/macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0-4.ogg
deleted file mode 100644
index cc8c361025..0000000000
--- a/macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0-4.ogg
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0-5.ogg b/macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0-5.ogg
deleted file mode 100644
index 72e05ea116..0000000000
--- a/macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0-5.ogg
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0-6.ogg b/macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0-6.ogg
deleted file mode 100644
index 9a79083394..0000000000
--- a/macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0-6.ogg
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0-7.ogg b/macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0-7.ogg
deleted file mode 100644
index f154852d0e..0000000000
--- a/macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0-7.ogg
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0-8.ogg b/macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0-8.ogg
deleted file mode 100644
index 511d94185c..0000000000
--- a/macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0-8.ogg
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0.m3u
index 319b497479..93e8f7c599 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0.m3u
@@ -1,16 +1,5 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-2.2.2.0.0.ogg
-2.2.2.0.0-1.ogg
-2.2.2.0.0-2.ogg
-2.2.2.0.0-3.ogg
-2.2.2.0.0-4.ogg
-footnote-2.ogg
-2.2.2.0.0-5.ogg
-2.2.2.0.0-6.ogg
-2.2.2.0.0-7.ogg
-2.2.2.0.0-8.ogg
-2.2.2.0.0-9.ogg
-2.2.2.0.0-10.ogg
-2.2.2.0.0-11.ogg
-2.2.2.0.0-12.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0-2.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0.ogg b/macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0.ogg
index 74ae517fa6..54e0e30302 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/2.2.2.0.0.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0-1.ogg b/macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0-1.ogg
index 95cc730494..6bba254cb3 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0-1.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0-1.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0-2.ogg b/macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0-2.ogg
index 85b092fa09..1d2baebe89 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0-2.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0-2.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0-3.ogg b/macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0-3.ogg
new file mode 100644
index 0000000000..c57aca5312
--- /dev/null
+++ b/macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0-3.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0-4.ogg b/macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0-4.ogg
new file mode 100644
index 0000000000..23fdf04612
--- /dev/null
+++ b/macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0-4.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0-5.ogg b/macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0-5.ogg
new file mode 100644
index 0000000000..757700d843
--- /dev/null
+++ b/macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0-5.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0-6.ogg b/macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0-6.ogg
new file mode 100644
index 0000000000..ebe78112d3
--- /dev/null
+++ b/macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0-6.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0.m3u
index db806b06e6..cc10b81b71 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0.m3u
@@ -1,5 +1,9 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-2.2.3.0.0.ogg
-2.2.3.0.0-1.ogg
-2.2.3.0.0-2.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0-4.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0-5.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0-6.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0.ogg b/macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0.ogg
index a1832ce2db..6704b231fd 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/2.2.3.0.0.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.2.4.0.0-1.ogg b/macros/latex/contrib/spelatex/spelatex-spel/2.2.4.0.0-1.ogg
index 6bba254cb3..f557268e9a 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/2.2.4.0.0-1.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/2.2.4.0.0-1.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.2.4.0.0-2.ogg b/macros/latex/contrib/spelatex/spelatex-spel/2.2.4.0.0-2.ogg
index be39c9b098..949ad1f84f 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/2.2.4.0.0-2.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/2.2.4.0.0-2.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.2.4.0.0-3.ogg b/macros/latex/contrib/spelatex/spelatex-spel/2.2.4.0.0-3.ogg
index 19449c3761..123857bab7 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/2.2.4.0.0-3.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/2.2.4.0.0-3.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.2.4.0.0-4.ogg b/macros/latex/contrib/spelatex/spelatex-spel/2.2.4.0.0-4.ogg
deleted file mode 100644
index c83f2d5cae..0000000000
--- a/macros/latex/contrib/spelatex/spelatex-spel/2.2.4.0.0-4.ogg
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.2.4.0.0-5.ogg b/macros/latex/contrib/spelatex/spelatex-spel/2.2.4.0.0-5.ogg
deleted file mode 100644
index 550e0e4712..0000000000
--- a/macros/latex/contrib/spelatex/spelatex-spel/2.2.4.0.0-5.ogg
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.2.4.0.0-6.ogg b/macros/latex/contrib/spelatex/spelatex-spel/2.2.4.0.0-6.ogg
deleted file mode 100644
index a725418127..0000000000
--- a/macros/latex/contrib/spelatex/spelatex-spel/2.2.4.0.0-6.ogg
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.2.4.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/2.2.4.0.0.m3u
index 5d6b37fe95..c27985f67b 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/2.2.4.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/2.2.4.0.0.m3u
@@ -1,9 +1,6 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-2.2.4.0.0.ogg
-2.2.4.0.0-1.ogg
-2.2.4.0.0-2.ogg
-2.2.4.0.0-3.ogg
-2.2.4.0.0-4.ogg
-2.2.4.0.0-5.ogg
-2.2.4.0.0-6.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.4.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.4.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.4.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.2.4.0.0-3.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.2.4.0.0.ogg b/macros/latex/contrib/spelatex/spelatex-spel/2.2.4.0.0.ogg
index ee37616991..9157c8ce9e 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/2.2.4.0.0.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/2.2.4.0.0.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.2.5.0.0-1.ogg b/macros/latex/contrib/spelatex/spelatex-spel/2.2.5.0.0-1.ogg
deleted file mode 100644
index f557268e9a..0000000000
--- a/macros/latex/contrib/spelatex/spelatex-spel/2.2.5.0.0-1.ogg
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.2.5.0.0-2.ogg b/macros/latex/contrib/spelatex/spelatex-spel/2.2.5.0.0-2.ogg
deleted file mode 100644
index 949ad1f84f..0000000000
--- a/macros/latex/contrib/spelatex/spelatex-spel/2.2.5.0.0-2.ogg
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.2.5.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/2.2.5.0.0.m3u
deleted file mode 100644
index 1a186d15de..0000000000
--- a/macros/latex/contrib/spelatex/spelatex-spel/2.2.5.0.0.m3u
+++ /dev/null
@@ -1,5 +0,0 @@
-#EXTM3U
-#EXTINF: section playlist generated with SpeLbox
-2.2.5.0.0.ogg
-2.2.5.0.0-1.ogg
-2.2.5.0.0-2.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.2.5.0.0.ogg b/macros/latex/contrib/spelatex/spelatex-spel/2.2.5.0.0.ogg
deleted file mode 100644
index d2195a26cc..0000000000
--- a/macros/latex/contrib/spelatex/spelatex-spel/2.2.5.0.0.ogg
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.2.6.0.0-1.ogg b/macros/latex/contrib/spelatex/spelatex-spel/2.2.6.0.0-1.ogg
deleted file mode 100644
index cb6ebd1183..0000000000
--- a/macros/latex/contrib/spelatex/spelatex-spel/2.2.6.0.0-1.ogg
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.2.6.0.0-2.ogg b/macros/latex/contrib/spelatex/spelatex-spel/2.2.6.0.0-2.ogg
deleted file mode 100644
index 8ae2cccab1..0000000000
--- a/macros/latex/contrib/spelatex/spelatex-spel/2.2.6.0.0-2.ogg
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.2.6.0.0-3.ogg b/macros/latex/contrib/spelatex/spelatex-spel/2.2.6.0.0-3.ogg
deleted file mode 100644
index c93a3c6d6c..0000000000
--- a/macros/latex/contrib/spelatex/spelatex-spel/2.2.6.0.0-3.ogg
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.2.6.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/2.2.6.0.0.m3u
deleted file mode 100644
index ae39555217..0000000000
--- a/macros/latex/contrib/spelatex/spelatex-spel/2.2.6.0.0.m3u
+++ /dev/null
@@ -1,6 +0,0 @@
-#EXTM3U
-#EXTINF: section playlist generated with SpeLbox
-2.2.6.0.0.ogg
-2.2.6.0.0-1.ogg
-2.2.6.0.0-2.ogg
-2.2.6.0.0-3.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.2.6.0.0.ogg b/macros/latex/contrib/spelatex/spelatex-spel/2.2.6.0.0.ogg
deleted file mode 100644
index 8c82713973..0000000000
--- a/macros/latex/contrib/spelatex/spelatex-spel/2.2.6.0.0.ogg
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.3.0.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/2.3.0.0.0.m3u
index 8652268b66..e86420bb63 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/2.3.0.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/2.3.0.0.0.m3u
@@ -1,7 +1,7 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-2.3.0.0.0.ogg
-2.3.0.0.0-1.ogg
-2.3.0.0.0-2.ogg
-2.3.0.0.0-3.ogg
-2.3.0.0.0-4.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.3.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.3.0.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.3.0.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.3.0.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.3.0.0.0-4.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.4.0.0.0-2.ogg b/macros/latex/contrib/spelatex/spelatex-spel/2.4.0.0.0-2.ogg
index d137101e04..d343820cf4 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/2.4.0.0.0-2.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/2.4.0.0.0-2.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.4.0.0.0-3.ogg b/macros/latex/contrib/spelatex/spelatex-spel/2.4.0.0.0-3.ogg
index b5feb6b9ce..76bf1a7659 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/2.4.0.0.0-3.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/2.4.0.0.0-3.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.4.0.0.0-4.ogg b/macros/latex/contrib/spelatex/spelatex-spel/2.4.0.0.0-4.ogg
index a585c2e035..130726016c 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/2.4.0.0.0-4.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/2.4.0.0.0-4.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.4.0.0.0-5.ogg b/macros/latex/contrib/spelatex/spelatex-spel/2.4.0.0.0-5.ogg
deleted file mode 100644
index 59f9b5a3c6..0000000000
--- a/macros/latex/contrib/spelatex/spelatex-spel/2.4.0.0.0-5.ogg
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/2.4.0.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/2.4.0.0.0.m3u
index ee754a4627..ab915e0fa1 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/2.4.0.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/2.4.0.0.0.m3u
@@ -1,8 +1,7 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-2.4.0.0.0.ogg
-2.4.0.0.0-1.ogg
-2.4.0.0.0-2.ogg
-2.4.0.0.0-3.ogg
-2.4.0.0.0-4.ogg
-2.4.0.0.0-5.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.4.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.4.0.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.4.0.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.4.0.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/2.4.0.0.0-4.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/3.0.0.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/3.0.0.0.0.m3u
index 8f2c49d9e4..5af0ee212b 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/3.0.0.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/3.0.0.0.0.m3u
@@ -1,26 +1,27 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-3.0.0.0.0.ogg
-3.1.0.0.0.ogg
-3.1.0.0.0-1.ogg
-3.1.0.0.0-2.ogg
-3.1.0.0.0-3.ogg
-3.2.0.0.0.ogg
-3.2.1.0.0.ogg
-3.2.1.0.0-1.ogg
-3.2.1.0.0-2.ogg
-3.2.1.0.0-3.ogg
-3.2.1.0.0-4.ogg
-3.2.1.0.0-5.ogg
-3.2.2.0.0.ogg
-3.2.2.0.0-1.ogg
-3.2.2.0.0-2.ogg
-3.2.2.0.0-3.ogg
-3.2.2.0.0-4.ogg
-3.2.2.0.0-5.ogg
-3.2.2.0.0-6.ogg
-3.3.0.0.0.ogg
-3.3.0.0.0-1.ogg
-3.4.0.0.0.ogg
-3.4.0.0.0-1.ogg
-3.4.0.0.0-2.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.0.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.1.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.1.0.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.1.0.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.1.0.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.2.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.2.1.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.2.1.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.2.1.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.2.1.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.2.1.0.0-4.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.2.1.0.0-5.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.2.2.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.2.2.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.2.2.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.2.2.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.2.2.0.0-4.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.2.2.0.0-5.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.2.2.0.0-6.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.3.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.3.0.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.4.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.4.0.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.4.0.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.4.0.0.0-3.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/3.1.0.0.0-2.ogg b/macros/latex/contrib/spelatex/spelatex-spel/3.1.0.0.0-2.ogg
index 181c6ce4df..ba55e226a0 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/3.1.0.0.0-2.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/3.1.0.0.0-2.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/3.1.0.0.0-3.ogg b/macros/latex/contrib/spelatex/spelatex-spel/3.1.0.0.0-3.ogg
index 374e4a19ed..a6cfbe479f 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/3.1.0.0.0-3.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/3.1.0.0.0-3.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/3.1.0.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/3.1.0.0.0.m3u
index 841095e90f..82dc86d9fb 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/3.1.0.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/3.1.0.0.0.m3u
@@ -1,6 +1,6 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-3.1.0.0.0.ogg
-3.1.0.0.0-1.ogg
-3.1.0.0.0-2.ogg
-3.1.0.0.0-3.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.1.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.1.0.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.1.0.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.1.0.0.0-3.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/3.2.0.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/3.2.0.0.0.m3u
index 925bdb7d03..d4e62a851b 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/3.2.0.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/3.2.0.0.0.m3u
@@ -1,16 +1,16 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-3.2.0.0.0.ogg
-3.2.1.0.0.ogg
-3.2.1.0.0-1.ogg
-3.2.1.0.0-2.ogg
-3.2.1.0.0-3.ogg
-3.2.1.0.0-4.ogg
-3.2.1.0.0-5.ogg
-3.2.2.0.0.ogg
-3.2.2.0.0-1.ogg
-3.2.2.0.0-2.ogg
-3.2.2.0.0-3.ogg
-3.2.2.0.0-4.ogg
-3.2.2.0.0-5.ogg
-3.2.2.0.0-6.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.2.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.2.1.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.2.1.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.2.1.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.2.1.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.2.1.0.0-4.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.2.1.0.0-5.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.2.2.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.2.2.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.2.2.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.2.2.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.2.2.0.0-4.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.2.2.0.0-5.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.2.2.0.0-6.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/3.2.1.0.0-4.ogg b/macros/latex/contrib/spelatex/spelatex-spel/3.2.1.0.0-4.ogg
index 9765dbb2c6..caeeff5108 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/3.2.1.0.0-4.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/3.2.1.0.0-4.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/3.2.1.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/3.2.1.0.0.m3u
index 4dca129e2c..df234b6cf6 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/3.2.1.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/3.2.1.0.0.m3u
@@ -1,8 +1,8 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-3.2.1.0.0.ogg
-3.2.1.0.0-1.ogg
-3.2.1.0.0-2.ogg
-3.2.1.0.0-3.ogg
-3.2.1.0.0-4.ogg
-3.2.1.0.0-5.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.2.1.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.2.1.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.2.1.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.2.1.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.2.1.0.0-4.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.2.1.0.0-5.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/3.2.2.0.0-1.ogg b/macros/latex/contrib/spelatex/spelatex-spel/3.2.2.0.0-1.ogg
index 02fd558b14..85cb0c8561 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/3.2.2.0.0-1.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/3.2.2.0.0-1.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/3.2.2.0.0-2.ogg b/macros/latex/contrib/spelatex/spelatex-spel/3.2.2.0.0-2.ogg
index 83c9a9a5f4..75df933995 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/3.2.2.0.0-2.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/3.2.2.0.0-2.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/3.2.2.0.0-5.ogg b/macros/latex/contrib/spelatex/spelatex-spel/3.2.2.0.0-5.ogg
index 0c554f69ba..e3c179b56a 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/3.2.2.0.0-5.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/3.2.2.0.0-5.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/3.2.2.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/3.2.2.0.0.m3u
index f748017144..b72666c7b5 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/3.2.2.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/3.2.2.0.0.m3u
@@ -1,9 +1,9 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-3.2.2.0.0.ogg
-3.2.2.0.0-1.ogg
-3.2.2.0.0-2.ogg
-3.2.2.0.0-3.ogg
-3.2.2.0.0-4.ogg
-3.2.2.0.0-5.ogg
-3.2.2.0.0-6.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.2.2.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.2.2.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.2.2.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.2.2.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.2.2.0.0-4.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.2.2.0.0-5.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.2.2.0.0-6.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/3.3.0.0.0-1.ogg b/macros/latex/contrib/spelatex/spelatex-spel/3.3.0.0.0-1.ogg
index bcee2491e1..58de83b9fb 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/3.3.0.0.0-1.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/3.3.0.0.0-1.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/3.3.0.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/3.3.0.0.0.m3u
index 6fc1783bde..7245ad8b24 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/3.3.0.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/3.3.0.0.0.m3u
@@ -1,4 +1,4 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-3.3.0.0.0.ogg
-3.3.0.0.0-1.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.3.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.3.0.0.0-1.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/3.4.0.0.0-3.ogg b/macros/latex/contrib/spelatex/spelatex-spel/3.4.0.0.0-3.ogg
new file mode 100644
index 0000000000..4ed46f984a
--- /dev/null
+++ b/macros/latex/contrib/spelatex/spelatex-spel/3.4.0.0.0-3.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/3.4.0.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/3.4.0.0.0.m3u
index 6839de2f60..0d0461c9a9 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/3.4.0.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/3.4.0.0.0.m3u
@@ -1,5 +1,6 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-3.4.0.0.0.ogg
-3.4.0.0.0-1.ogg
-3.4.0.0.0-2.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.4.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.4.0.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.4.0.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/3.4.0.0.0-3.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/4.0.0.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/4.0.0.0.0.m3u
index 9d5aff05d5..06c90ea851 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/4.0.0.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/4.0.0.0.0.m3u
@@ -1,53 +1,55 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-4.0.0.0.0.ogg
-4.1.0.0.0.ogg
-4.1.0.0.0-1.ogg
-4.1.0.0.0-2.ogg
-4.1.0.0.0-3.ogg
-4.1.0.0.0-4.ogg
-4.1.0.0.0-5.ogg
-4.1.0.0.0-6.ogg
-4.1.0.0.0-7.ogg
-4.1.0.0.0-8.ogg
-4.1.1.0.0.ogg
-4.1.1.0.0-1.ogg
-4.1.1.0.0-2.ogg
-4.1.1.0.0-3.ogg
-4.1.1.0.0-4.ogg
-4.1.2.0.0.ogg
-4.1.2.0.0-1.ogg
-4.1.2.0.0-2.ogg
-4.1.3.0.0.ogg
-4.1.3.0.0-1.ogg
-4.1.3.0.0-2.ogg
-4.1.3.0.0-3.ogg
-4.1.3.0.0-4.ogg
-4.1.3.0.0-5.ogg
-4.1.4.0.0.ogg
-4.1.4.0.0-1.ogg
-4.1.4.0.0-2.ogg
-4.1.4.0.0-3.ogg
-4.1.4.0.0-4.ogg
-4.1.5.0.0.ogg
-4.1.5.0.0-1.ogg
-4.1.5.0.0-2.ogg
-4.1.5.0.0-3.ogg
-4.1.5.0.0-4.ogg
-4.1.6.0.0.ogg
-4.1.6.0.0-1.ogg
-4.1.6.0.0-2.ogg
-4.1.6.0.0-3.ogg
-4.1.6.0.0-4.ogg
-4.1.6.0.0-5.ogg
-4.1.7.0.0.ogg
-4.1.7.0.0-1.ogg
-4.1.7.0.0-2.ogg
-4.1.7.0.0-3.ogg
-4.1.7.0.0-4.ogg
-4.2.0.0.0.ogg
-4.2.0.0.0-1.ogg
-4.2.0.0.0-2.ogg
-4.2.0.0.0-3.ogg
-4.2.0.0.0-4.ogg
-4.2.0.0.0-5.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.0.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0-4.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0-5.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0-6.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0-7.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.1.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.1.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.1.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.1.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.1.0.0-4.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.2.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.2.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.2.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.3.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.3.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.3.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.3.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.3.0.0-4.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.3.0.0-5.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.4.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.4.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.4.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.5.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.5.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.5.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.5.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.5.0.0-4.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.6.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.6.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.6.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.6.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.6.0.0-4.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.7.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.7.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.7.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.7.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.7.0.0-4.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.7.0.0-5.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.8.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.8.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.8.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.8.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.8.0.0-4.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.2.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.2.0.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.2.0.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.2.0.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.2.0.0.0-4.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.2.0.0.0-5.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0-1.ogg b/macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0-1.ogg
index 58dc04068d..027bdbfb28 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0-1.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0-1.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0-2.ogg b/macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0-2.ogg
index a1483cea12..8096fce85c 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0-2.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0-2.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0-3.ogg b/macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0-3.ogg
index 44ca72ba64..6390a5734f 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0-3.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0-3.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0-4.ogg b/macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0-4.ogg
index 39a304fb03..2a775460b4 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0-4.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0-4.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0-5.ogg b/macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0-5.ogg
index 67fa7fce21..bb3d00426a 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0-5.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0-5.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0-6.ogg b/macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0-6.ogg
index 8fd82f60d0..bc3c565f52 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0-6.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0-6.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0-7.ogg b/macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0-7.ogg
index 159cc44e6a..a9a40c62a0 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0-7.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0-7.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0-8.ogg b/macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0-8.ogg
deleted file mode 100644
index d70d6468e8..0000000000
--- a/macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0-8.ogg
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0.m3u
index 3a01c842f0..199a809943 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0.m3u
@@ -1,46 +1,48 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-4.1.0.0.0.ogg
-4.1.0.0.0-1.ogg
-4.1.0.0.0-2.ogg
-4.1.0.0.0-3.ogg
-4.1.0.0.0-4.ogg
-4.1.0.0.0-5.ogg
-4.1.0.0.0-6.ogg
-4.1.0.0.0-7.ogg
-4.1.0.0.0-8.ogg
-4.1.1.0.0.ogg
-4.1.1.0.0-1.ogg
-4.1.1.0.0-2.ogg
-4.1.1.0.0-3.ogg
-4.1.1.0.0-4.ogg
-4.1.2.0.0.ogg
-4.1.2.0.0-1.ogg
-4.1.2.0.0-2.ogg
-4.1.3.0.0.ogg
-4.1.3.0.0-1.ogg
-4.1.3.0.0-2.ogg
-4.1.3.0.0-3.ogg
-4.1.3.0.0-4.ogg
-4.1.3.0.0-5.ogg
-4.1.4.0.0.ogg
-4.1.4.0.0-1.ogg
-4.1.4.0.0-2.ogg
-4.1.4.0.0-3.ogg
-4.1.4.0.0-4.ogg
-4.1.5.0.0.ogg
-4.1.5.0.0-1.ogg
-4.1.5.0.0-2.ogg
-4.1.5.0.0-3.ogg
-4.1.5.0.0-4.ogg
-4.1.6.0.0.ogg
-4.1.6.0.0-1.ogg
-4.1.6.0.0-2.ogg
-4.1.6.0.0-3.ogg
-4.1.6.0.0-4.ogg
-4.1.6.0.0-5.ogg
-4.1.7.0.0.ogg
-4.1.7.0.0-1.ogg
-4.1.7.0.0-2.ogg
-4.1.7.0.0-3.ogg
-4.1.7.0.0-4.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0-4.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0-5.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0-6.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.0.0.0-7.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.1.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.1.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.1.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.1.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.1.0.0-4.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.2.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.2.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.2.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.3.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.3.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.3.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.3.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.3.0.0-4.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.3.0.0-5.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.4.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.4.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.4.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.5.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.5.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.5.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.5.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.5.0.0-4.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.6.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.6.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.6.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.6.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.6.0.0-4.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.7.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.7.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.7.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.7.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.7.0.0-4.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.7.0.0-5.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.8.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.8.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.8.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.8.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.8.0.0-4.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/4.1.1.0.0-4.ogg b/macros/latex/contrib/spelatex/spelatex-spel/4.1.1.0.0-4.ogg
index f05f6410f6..e0e77fd44c 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/4.1.1.0.0-4.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/4.1.1.0.0-4.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/4.1.1.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/4.1.1.0.0.m3u
index c456177811..8b980c2b5f 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/4.1.1.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/4.1.1.0.0.m3u
@@ -1,7 +1,7 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-4.1.1.0.0.ogg
-4.1.1.0.0-1.ogg
-4.1.1.0.0-2.ogg
-4.1.1.0.0-3.ogg
-4.1.1.0.0-4.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.1.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.1.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.1.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.1.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.1.0.0-4.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/4.1.2.0.0-1.ogg b/macros/latex/contrib/spelatex/spelatex-spel/4.1.2.0.0-1.ogg
index 34c7209ae5..793d67f67e 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/4.1.2.0.0-1.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/4.1.2.0.0-1.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/4.1.2.0.0-2.ogg b/macros/latex/contrib/spelatex/spelatex-spel/4.1.2.0.0-2.ogg
index d20e2c57c3..3421acb64e 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/4.1.2.0.0-2.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/4.1.2.0.0-2.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/4.1.2.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/4.1.2.0.0.m3u
index a00d94f72f..b9158f1120 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/4.1.2.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/4.1.2.0.0.m3u
@@ -1,5 +1,5 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-4.1.2.0.0.ogg
-4.1.2.0.0-1.ogg
-4.1.2.0.0-2.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.2.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.2.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.2.0.0-2.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/4.1.3.0.0-3.ogg b/macros/latex/contrib/spelatex/spelatex-spel/4.1.3.0.0-3.ogg
index d20e2c57c3..a867f6c0a9 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/4.1.3.0.0-3.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/4.1.3.0.0-3.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/4.1.3.0.0-5.ogg b/macros/latex/contrib/spelatex/spelatex-spel/4.1.3.0.0-5.ogg
index d20e2c57c3..11a6de0fdc 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/4.1.3.0.0-5.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/4.1.3.0.0-5.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/4.1.3.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/4.1.3.0.0.m3u
index 6a3684a7b3..1e3af2b0b3 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/4.1.3.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/4.1.3.0.0.m3u
@@ -1,8 +1,8 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-4.1.3.0.0.ogg
-4.1.3.0.0-1.ogg
-4.1.3.0.0-2.ogg
-4.1.3.0.0-3.ogg
-4.1.3.0.0-4.ogg
-4.1.3.0.0-5.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.3.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.3.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.3.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.3.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.3.0.0-4.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.3.0.0-5.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/4.1.4.0.0-1.ogg b/macros/latex/contrib/spelatex/spelatex-spel/4.1.4.0.0-1.ogg
index 6052ee961a..bd0f1cedf2 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/4.1.4.0.0-1.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/4.1.4.0.0-1.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/4.1.4.0.0-2.ogg b/macros/latex/contrib/spelatex/spelatex-spel/4.1.4.0.0-2.ogg
index 362145b403..ea8b480d22 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/4.1.4.0.0-2.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/4.1.4.0.0-2.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/4.1.4.0.0-3.ogg b/macros/latex/contrib/spelatex/spelatex-spel/4.1.4.0.0-3.ogg
deleted file mode 100644
index 9d0007377d..0000000000
--- a/macros/latex/contrib/spelatex/spelatex-spel/4.1.4.0.0-3.ogg
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/4.1.4.0.0-4.ogg b/macros/latex/contrib/spelatex/spelatex-spel/4.1.4.0.0-4.ogg
deleted file mode 100644
index e6633a1efc..0000000000
--- a/macros/latex/contrib/spelatex/spelatex-spel/4.1.4.0.0-4.ogg
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/4.1.4.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/4.1.4.0.0.m3u
index e9a7ce2db1..f0c36d4b42 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/4.1.4.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/4.1.4.0.0.m3u
@@ -1,7 +1,5 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-4.1.4.0.0.ogg
-4.1.4.0.0-1.ogg
-4.1.4.0.0-2.ogg
-4.1.4.0.0-3.ogg
-4.1.4.0.0-4.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.4.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.4.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.4.0.0-2.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/4.1.4.0.0.ogg b/macros/latex/contrib/spelatex/spelatex-spel/4.1.4.0.0.ogg
index e7b7866591..50e602af5e 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/4.1.4.0.0.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/4.1.4.0.0.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/4.1.5.0.0-1.ogg b/macros/latex/contrib/spelatex/spelatex-spel/4.1.5.0.0-1.ogg
index 1949056128..f5279d44f1 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/4.1.5.0.0-1.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/4.1.5.0.0-1.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/4.1.5.0.0-2.ogg b/macros/latex/contrib/spelatex/spelatex-spel/4.1.5.0.0-2.ogg
index 247c35c3a4..75a529af86 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/4.1.5.0.0-2.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/4.1.5.0.0-2.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/4.1.5.0.0-3.ogg b/macros/latex/contrib/spelatex/spelatex-spel/4.1.5.0.0-3.ogg
index 7f3d1fb857..5bb4d35977 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/4.1.5.0.0-3.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/4.1.5.0.0-3.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/4.1.5.0.0-4.ogg b/macros/latex/contrib/spelatex/spelatex-spel/4.1.5.0.0-4.ogg
index 3f1990e971..e6633a1efc 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/4.1.5.0.0-4.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/4.1.5.0.0-4.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/4.1.5.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/4.1.5.0.0.m3u
index 46999ff035..13d65b54fa 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/4.1.5.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/4.1.5.0.0.m3u
@@ -1,7 +1,7 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-4.1.5.0.0.ogg
-4.1.5.0.0-1.ogg
-4.1.5.0.0-2.ogg
-4.1.5.0.0-3.ogg
-4.1.5.0.0-4.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.5.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.5.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.5.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.5.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.5.0.0-4.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/4.1.5.0.0.ogg b/macros/latex/contrib/spelatex/spelatex-spel/4.1.5.0.0.ogg
index 2e17823934..c170b1b3b6 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/4.1.5.0.0.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/4.1.5.0.0.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/4.1.6.0.0-1.ogg b/macros/latex/contrib/spelatex/spelatex-spel/4.1.6.0.0-1.ogg
index a3f5673c63..43bdb9bdd1 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/4.1.6.0.0-1.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/4.1.6.0.0-1.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/4.1.6.0.0-2.ogg b/macros/latex/contrib/spelatex/spelatex-spel/4.1.6.0.0-2.ogg
index e4469c62f8..3790ef30ca 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/4.1.6.0.0-2.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/4.1.6.0.0-2.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/4.1.6.0.0-3.ogg b/macros/latex/contrib/spelatex/spelatex-spel/4.1.6.0.0-3.ogg
index 2a89c9e2af..6c8c396609 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/4.1.6.0.0-3.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/4.1.6.0.0-3.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/4.1.6.0.0-4.ogg b/macros/latex/contrib/spelatex/spelatex-spel/4.1.6.0.0-4.ogg
index da6ed1a16f..e471ee012c 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/4.1.6.0.0-4.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/4.1.6.0.0-4.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/4.1.6.0.0-5.ogg b/macros/latex/contrib/spelatex/spelatex-spel/4.1.6.0.0-5.ogg
deleted file mode 100644
index 575d63530a..0000000000
--- a/macros/latex/contrib/spelatex/spelatex-spel/4.1.6.0.0-5.ogg
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/4.1.6.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/4.1.6.0.0.m3u
index 1b21289bb0..de9a5bcd55 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/4.1.6.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/4.1.6.0.0.m3u
@@ -1,8 +1,7 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-4.1.6.0.0.ogg
-4.1.6.0.0-1.ogg
-4.1.6.0.0-2.ogg
-4.1.6.0.0-3.ogg
-4.1.6.0.0-4.ogg
-4.1.6.0.0-5.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.6.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.6.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.6.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.6.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.6.0.0-4.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/4.1.6.0.0.ogg b/macros/latex/contrib/spelatex/spelatex-spel/4.1.6.0.0.ogg
index e417d4427f..339b70bca8 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/4.1.6.0.0.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/4.1.6.0.0.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/4.1.7.0.0-1.ogg b/macros/latex/contrib/spelatex/spelatex-spel/4.1.7.0.0-1.ogg
index cc6324a68b..1fbd011b3f 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/4.1.7.0.0-1.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/4.1.7.0.0-1.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/4.1.7.0.0-2.ogg b/macros/latex/contrib/spelatex/spelatex-spel/4.1.7.0.0-2.ogg
index d913b6722b..57e5ebb711 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/4.1.7.0.0-2.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/4.1.7.0.0-2.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/4.1.7.0.0-3.ogg b/macros/latex/contrib/spelatex/spelatex-spel/4.1.7.0.0-3.ogg
index 8049b4c6f2..5ae829e7fc 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/4.1.7.0.0-3.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/4.1.7.0.0-3.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/4.1.7.0.0-4.ogg b/macros/latex/contrib/spelatex/spelatex-spel/4.1.7.0.0-4.ogg
index 4b2aa15351..64e02ba828 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/4.1.7.0.0-4.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/4.1.7.0.0-4.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/4.1.7.0.0-5.ogg b/macros/latex/contrib/spelatex/spelatex-spel/4.1.7.0.0-5.ogg
new file mode 100644
index 0000000000..13c1a3a17d
--- /dev/null
+++ b/macros/latex/contrib/spelatex/spelatex-spel/4.1.7.0.0-5.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/4.1.7.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/4.1.7.0.0.m3u
index 59d35f8864..34a94046e0 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/4.1.7.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/4.1.7.0.0.m3u
@@ -1,7 +1,8 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-4.1.7.0.0.ogg
-4.1.7.0.0-1.ogg
-4.1.7.0.0-2.ogg
-4.1.7.0.0-3.ogg
-4.1.7.0.0-4.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.7.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.7.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.7.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.7.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.7.0.0-4.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.7.0.0-5.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/4.1.7.0.0.ogg b/macros/latex/contrib/spelatex/spelatex-spel/4.1.7.0.0.ogg
index 5023aa141e..bee00142be 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/4.1.7.0.0.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/4.1.7.0.0.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/4.1.8.0.0-1.ogg b/macros/latex/contrib/spelatex/spelatex-spel/4.1.8.0.0-1.ogg
new file mode 100644
index 0000000000..8049b4c6f2
--- /dev/null
+++ b/macros/latex/contrib/spelatex/spelatex-spel/4.1.8.0.0-1.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/4.1.8.0.0-2.ogg b/macros/latex/contrib/spelatex/spelatex-spel/4.1.8.0.0-2.ogg
new file mode 100644
index 0000000000..d913b6722b
--- /dev/null
+++ b/macros/latex/contrib/spelatex/spelatex-spel/4.1.8.0.0-2.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/4.1.8.0.0-3.ogg b/macros/latex/contrib/spelatex/spelatex-spel/4.1.8.0.0-3.ogg
new file mode 100644
index 0000000000..4c6963eb49
--- /dev/null
+++ b/macros/latex/contrib/spelatex/spelatex-spel/4.1.8.0.0-3.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/4.1.8.0.0-4.ogg b/macros/latex/contrib/spelatex/spelatex-spel/4.1.8.0.0-4.ogg
new file mode 100644
index 0000000000..4b2aa15351
--- /dev/null
+++ b/macros/latex/contrib/spelatex/spelatex-spel/4.1.8.0.0-4.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/4.1.8.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/4.1.8.0.0.m3u
new file mode 100644
index 0000000000..7f7325a046
--- /dev/null
+++ b/macros/latex/contrib/spelatex/spelatex-spel/4.1.8.0.0.m3u
@@ -0,0 +1,7 @@
+#EXTM3U
+#EXTINF: section playlist generated with SpeLbox
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.8.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.8.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.8.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.8.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.1.8.0.0-4.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/4.1.8.0.0.ogg b/macros/latex/contrib/spelatex/spelatex-spel/4.1.8.0.0.ogg
new file mode 100644
index 0000000000..407a19cbf3
--- /dev/null
+++ b/macros/latex/contrib/spelatex/spelatex-spel/4.1.8.0.0.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/4.2.0.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/4.2.0.0.0.m3u
index dc99929f4a..a8548a72e8 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/4.2.0.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/4.2.0.0.0.m3u
@@ -1,8 +1,8 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-4.2.0.0.0.ogg
-4.2.0.0.0-1.ogg
-4.2.0.0.0-2.ogg
-4.2.0.0.0-3.ogg
-4.2.0.0.0-4.ogg
-4.2.0.0.0-5.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.2.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.2.0.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.2.0.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.2.0.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.2.0.0.0-4.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/4.2.0.0.0-5.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/5.0.0.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/5.0.0.0.0.m3u
index 270a6f6c2b..0019e5b083 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/5.0.0.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/5.0.0.0.0.m3u
@@ -1,4 +1,4 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-5.0.0.0.0.ogg
-5.0.0.0.0-1.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/5.0.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/5.0.0.0.0-1.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/6.0.0.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/6.0.0.0.0.m3u
index 1e0e8f0664..f9a6c25aed 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/6.0.0.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/6.0.0.0.0.m3u
@@ -1,48 +1,49 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-6.0.0.0.0.ogg
-6.0.0.0.0-1.ogg
-6.1.0.0.0.ogg
-6.1.0.0.0-1.ogg
-6.2.0.0.0.ogg
-6.2.1.0.0.ogg
-6.2.1.0.0-1.ogg
-6.2.2.0.0.ogg
-6.2.2.0.0-1.ogg
-6.3.0.0.0.ogg
-6.3.1.0.0.ogg
-6.3.1.0.0-1.ogg
-6.3.2.0.0.ogg
-6.3.2.0.0-1.ogg
-6.3.2.0.0-2.ogg
-6.3.2.0.0-3.ogg
-6.3.2.0.0-4.ogg
-6.3.2.0.0-5.ogg
-6.3.2.0.0-6.ogg
-6.3.3.0.0.ogg
-6.3.3.0.0-1.ogg
-6.4.0.0.0.ogg
-6.4.0.0.0-1.ogg
-6.4.0.0.0-2.ogg
-6.5.0.0.0.ogg
-6.5.0.0.0-1.ogg
-6.5.0.0.0-2.ogg
-6.6.0.0.0.ogg
-6.6.1.0.0.ogg
-6.6.1.0.0-1.ogg
-6.6.1.0.0-2.ogg
-6.6.1.0.0-3.ogg
-6.6.2.0.0.ogg
-6.6.2.0.0-1.ogg
-6.7.0.0.0.ogg
-6.7.0.0.0-1.ogg
-6.7.0.0.0-2.ogg
-6.7.0.0.0-3.ogg
-6.7.0.0.0-4.ogg
-6.7.0.0.0-5.ogg
-6.7.0.0.0-6.ogg
-6.7.0.0.0-7.ogg
-6.7.0.0.0-8.ogg
-6.7.0.0.0-9.ogg
-6.7.0.0.0-10.ogg
-6.7.0.0.0-11.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.0.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.0.0.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.1.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.1.0.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.2.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.2.1.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.2.1.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.2.2.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.2.2.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.3.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.3.1.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.3.1.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.3.2.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.3.2.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.3.2.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.3.2.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.3.2.0.0-4.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.3.2.0.0-5.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.3.2.0.0-6.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.3.3.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.3.3.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.4.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.4.0.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.4.0.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.5.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.5.0.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.5.0.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.6.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.6.1.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.6.1.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.6.1.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.6.1.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.6.2.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.6.2.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.6.2.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.7.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.7.0.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.7.0.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.7.0.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.7.0.0.0-4.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.7.0.0.0-5.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.7.0.0.0-6.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.7.0.0.0-7.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.7.0.0.0-8.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.7.0.0.0-9.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.7.0.0.0-10.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.7.0.0.0-11.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/6.1.0.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/6.1.0.0.0.m3u
index 523f40cae3..079a63c2ab 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/6.1.0.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/6.1.0.0.0.m3u
@@ -1,4 +1,4 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-6.1.0.0.0.ogg
-6.1.0.0.0-1.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.1.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.1.0.0.0-1.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/6.2.0.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/6.2.0.0.0.m3u
index e204a3185c..d579c3b2d3 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/6.2.0.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/6.2.0.0.0.m3u
@@ -1,7 +1,7 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-6.2.0.0.0.ogg
-6.2.1.0.0.ogg
-6.2.1.0.0-1.ogg
-6.2.2.0.0.ogg
-6.2.2.0.0-1.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.2.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.2.1.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.2.1.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.2.2.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.2.2.0.0-1.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/6.2.1.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/6.2.1.0.0.m3u
index a5741a63f1..bf4f91e94d 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/6.2.1.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/6.2.1.0.0.m3u
@@ -1,4 +1,4 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-6.2.1.0.0.ogg
-6.2.1.0.0-1.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.2.1.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.2.1.0.0-1.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/6.2.2.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/6.2.2.0.0.m3u
index 47a9259f45..2f98a47e39 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/6.2.2.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/6.2.2.0.0.m3u
@@ -1,4 +1,4 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-6.2.2.0.0.ogg
-6.2.2.0.0-1.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.2.2.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.2.2.0.0-1.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/6.3.0.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/6.3.0.0.0.m3u
index 5f1ab83f22..f8150e99d5 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/6.3.0.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/6.3.0.0.0.m3u
@@ -1,14 +1,14 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-6.3.0.0.0.ogg
-6.3.1.0.0.ogg
-6.3.1.0.0-1.ogg
-6.3.2.0.0.ogg
-6.3.2.0.0-1.ogg
-6.3.2.0.0-2.ogg
-6.3.2.0.0-3.ogg
-6.3.2.0.0-4.ogg
-6.3.2.0.0-5.ogg
-6.3.2.0.0-6.ogg
-6.3.3.0.0.ogg
-6.3.3.0.0-1.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.3.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.3.1.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.3.1.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.3.2.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.3.2.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.3.2.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.3.2.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.3.2.0.0-4.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.3.2.0.0-5.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.3.2.0.0-6.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.3.3.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.3.3.0.0-1.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/6.3.1.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/6.3.1.0.0.m3u
index 03c58738cd..dbf894e332 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/6.3.1.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/6.3.1.0.0.m3u
@@ -1,4 +1,4 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-6.3.1.0.0.ogg
-6.3.1.0.0-1.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.3.1.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.3.1.0.0-1.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/6.3.2.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/6.3.2.0.0.m3u
index 9932c5cbfc..e940e2e5c1 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/6.3.2.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/6.3.2.0.0.m3u
@@ -1,9 +1,9 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-6.3.2.0.0.ogg
-6.3.2.0.0-1.ogg
-6.3.2.0.0-2.ogg
-6.3.2.0.0-3.ogg
-6.3.2.0.0-4.ogg
-6.3.2.0.0-5.ogg
-6.3.2.0.0-6.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.3.2.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.3.2.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.3.2.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.3.2.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.3.2.0.0-4.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.3.2.0.0-5.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.3.2.0.0-6.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/6.3.3.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/6.3.3.0.0.m3u
index c4fd845f5b..0a57cf270b 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/6.3.3.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/6.3.3.0.0.m3u
@@ -1,4 +1,4 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-6.3.3.0.0.ogg
-6.3.3.0.0-1.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.3.3.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.3.3.0.0-1.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/6.4.0.0.0-2.ogg b/macros/latex/contrib/spelatex/spelatex-spel/6.4.0.0.0-2.ogg
index 201f087a7e..0fd28ae22a 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/6.4.0.0.0-2.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/6.4.0.0.0-2.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/6.4.0.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/6.4.0.0.0.m3u
index ef2790eb3c..b93568e7ca 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/6.4.0.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/6.4.0.0.0.m3u
@@ -1,5 +1,5 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-6.4.0.0.0.ogg
-6.4.0.0.0-1.ogg
-6.4.0.0.0-2.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.4.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.4.0.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.4.0.0.0-2.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/6.5.0.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/6.5.0.0.0.m3u
index 92cb21e03c..e3cdf57ec0 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/6.5.0.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/6.5.0.0.0.m3u
@@ -1,5 +1,5 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-6.5.0.0.0.ogg
-6.5.0.0.0-1.ogg
-6.5.0.0.0-2.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.5.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.5.0.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.5.0.0.0-2.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/6.6.0.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/6.6.0.0.0.m3u
index a3e705a5a5..089d4134ec 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/6.6.0.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/6.6.0.0.0.m3u
@@ -1,9 +1,10 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-6.6.0.0.0.ogg
-6.6.1.0.0.ogg
-6.6.1.0.0-1.ogg
-6.6.1.0.0-2.ogg
-6.6.1.0.0-3.ogg
-6.6.2.0.0.ogg
-6.6.2.0.0-1.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.6.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.6.1.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.6.1.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.6.1.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.6.1.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.6.2.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.6.2.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.6.2.0.0-2.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/6.6.1.0.0-2.ogg b/macros/latex/contrib/spelatex/spelatex-spel/6.6.1.0.0-2.ogg
index 5200b6e405..6194ef0906 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/6.6.1.0.0-2.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/6.6.1.0.0-2.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/6.6.1.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/6.6.1.0.0.m3u
index e45e6c3453..1c7be9ab2e 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/6.6.1.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/6.6.1.0.0.m3u
@@ -1,6 +1,6 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-6.6.1.0.0.ogg
-6.6.1.0.0-1.ogg
-6.6.1.0.0-2.ogg
-6.6.1.0.0-3.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.6.1.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.6.1.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.6.1.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.6.1.0.0-3.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/6.6.2.0.0-1.ogg b/macros/latex/contrib/spelatex/spelatex-spel/6.6.2.0.0-1.ogg
index 5eae47cfde..b4e28cff5c 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/6.6.2.0.0-1.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/6.6.2.0.0-1.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/6.6.2.0.0-2.ogg b/macros/latex/contrib/spelatex/spelatex-spel/6.6.2.0.0-2.ogg
new file mode 100644
index 0000000000..8e706e6e98
--- /dev/null
+++ b/macros/latex/contrib/spelatex/spelatex-spel/6.6.2.0.0-2.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/6.6.2.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/6.6.2.0.0.m3u
index fbb664ca1e..2a760f5e51 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/6.6.2.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/6.6.2.0.0.m3u
@@ -1,4 +1,5 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-6.6.2.0.0.ogg
-6.6.2.0.0-1.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.6.2.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.6.2.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.6.2.0.0-2.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/6.7.0.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/6.7.0.0.0.m3u
index 81788dd3a9..7f9d1ac9c2 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/6.7.0.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/6.7.0.0.0.m3u
@@ -1,14 +1,14 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-6.7.0.0.0.ogg
-6.7.0.0.0-1.ogg
-6.7.0.0.0-2.ogg
-6.7.0.0.0-3.ogg
-6.7.0.0.0-4.ogg
-6.7.0.0.0-5.ogg
-6.7.0.0.0-6.ogg
-6.7.0.0.0-7.ogg
-6.7.0.0.0-8.ogg
-6.7.0.0.0-9.ogg
-6.7.0.0.0-10.ogg
-6.7.0.0.0-11.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.7.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.7.0.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.7.0.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.7.0.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.7.0.0.0-4.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.7.0.0.0-5.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.7.0.0.0-6.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.7.0.0.0-7.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.7.0.0.0-8.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.7.0.0.0-9.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.7.0.0.0-10.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/6.7.0.0.0-11.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.0.0.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/7.0.0.0.0.m3u
index 59c209eb26..0075539685 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/7.0.0.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/7.0.0.0.0.m3u
@@ -1,27 +1,28 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-7.0.0.0.0.ogg
-7.0.0.0.0-1.ogg
-7.1.0.0.0.ogg
-7.2.0.0.0.ogg
-7.3.0.0.0.ogg
-7.4.0.0.0.ogg
-7.5.0.0.0.ogg
-7.6.0.0.0.ogg
-7.7.0.0.0.ogg
-7.8.0.0.0.ogg
-7.8.1.0.0.ogg
-7.8.2.0.0.ogg
-7.8.3.0.0.ogg
-7.8.4.0.0.ogg
-7.8.5.0.0.ogg
-7.8.6.0.0.ogg
-7.9.0.0.0.ogg
-7.9.1.0.0.ogg
-7.9.2.0.0.ogg
-7.10.0.0.0.ogg
-7.10.1.0.0.ogg
-7.10.2.0.0.ogg
-7.10.3.0.0.ogg
-7.10.4.0.0.ogg
-7.11.0.0.0.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.0.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.0.0.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.1.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.2.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.3.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.4.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.5.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.6.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.7.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.8.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.9.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.9.1.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.9.2.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.9.3.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.9.4.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.9.5.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.9.6.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.10.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.10.1.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.10.2.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.11.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.11.1.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.11.2.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.11.3.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.11.4.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.12.0.0.0.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.1.0.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/7.1.0.0.0.m3u
index aad8452193..1a17426618 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/7.1.0.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/7.1.0.0.0.m3u
@@ -1,3 +1,3 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-7.1.0.0.0.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.1.0.0.0.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.10.0.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/7.10.0.0.0.m3u
index 4e2e99f016..0aa3114809 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/7.10.0.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/7.10.0.0.0.m3u
@@ -1,7 +1,5 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-7.10.0.0.0.ogg
-7.10.1.0.0.ogg
-7.10.2.0.0.ogg
-7.10.3.0.0.ogg
-7.10.4.0.0.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.10.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.10.1.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.10.2.0.0.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.10.0.0.0.ogg b/macros/latex/contrib/spelatex/spelatex-spel/7.10.0.0.0.ogg
index 07be005182..66dc25c269 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/7.10.0.0.0.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/7.10.0.0.0.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.10.1.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/7.10.1.0.0.m3u
index 9118733d86..8cc8424aa3 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/7.10.1.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/7.10.1.0.0.m3u
@@ -1,3 +1,3 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-7.10.1.0.0.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.10.1.0.0.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.10.1.0.0.ogg b/macros/latex/contrib/spelatex/spelatex-spel/7.10.1.0.0.ogg
index 68f3689b55..2df5d0bbdb 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/7.10.1.0.0.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/7.10.1.0.0.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.10.2.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/7.10.2.0.0.m3u
index 6eecefd465..a30eafa4af 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/7.10.2.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/7.10.2.0.0.m3u
@@ -1,3 +1,3 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-7.10.2.0.0.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.10.2.0.0.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.10.2.0.0.ogg b/macros/latex/contrib/spelatex/spelatex-spel/7.10.2.0.0.ogg
index f368c080f1..5ed4db253a 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/7.10.2.0.0.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/7.10.2.0.0.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.10.3.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/7.10.3.0.0.m3u
deleted file mode 100644
index 3adc9502ac..0000000000
--- a/macros/latex/contrib/spelatex/spelatex-spel/7.10.3.0.0.m3u
+++ /dev/null
@@ -1,3 +0,0 @@
-#EXTM3U
-#EXTINF: section playlist generated with SpeLbox
-7.10.3.0.0.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.10.3.0.0.ogg b/macros/latex/contrib/spelatex/spelatex-spel/7.10.3.0.0.ogg
deleted file mode 100644
index ffd90a79f0..0000000000
--- a/macros/latex/contrib/spelatex/spelatex-spel/7.10.3.0.0.ogg
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.10.4.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/7.10.4.0.0.m3u
deleted file mode 100644
index 552f4fbbec..0000000000
--- a/macros/latex/contrib/spelatex/spelatex-spel/7.10.4.0.0.m3u
+++ /dev/null
@@ -1,3 +0,0 @@
-#EXTM3U
-#EXTINF: section playlist generated with SpeLbox
-7.10.4.0.0.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.10.4.0.0.ogg b/macros/latex/contrib/spelatex/spelatex-spel/7.10.4.0.0.ogg
deleted file mode 100644
index c7c7756494..0000000000
--- a/macros/latex/contrib/spelatex/spelatex-spel/7.10.4.0.0.ogg
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.11.0.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/7.11.0.0.0.m3u
index d1c41b06d6..341d6b5afa 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/7.11.0.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/7.11.0.0.0.m3u
@@ -1,3 +1,7 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-7.11.0.0.0.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.11.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.11.1.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.11.2.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.11.3.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.11.4.0.0.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.11.0.0.0.ogg b/macros/latex/contrib/spelatex/spelatex-spel/7.11.0.0.0.ogg
index 8a4aa575b6..765b284d18 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/7.11.0.0.0.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/7.11.0.0.0.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.11.1.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/7.11.1.0.0.m3u
new file mode 100644
index 0000000000..981c8da8b3
--- /dev/null
+++ b/macros/latex/contrib/spelatex/spelatex-spel/7.11.1.0.0.m3u
@@ -0,0 +1,3 @@
+#EXTM3U
+#EXTINF: section playlist generated with SpeLbox
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.11.1.0.0.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.11.1.0.0.ogg b/macros/latex/contrib/spelatex/spelatex-spel/7.11.1.0.0.ogg
new file mode 100644
index 0000000000..da1feae18e
--- /dev/null
+++ b/macros/latex/contrib/spelatex/spelatex-spel/7.11.1.0.0.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.11.2.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/7.11.2.0.0.m3u
new file mode 100644
index 0000000000..7a77c23c1b
--- /dev/null
+++ b/macros/latex/contrib/spelatex/spelatex-spel/7.11.2.0.0.m3u
@@ -0,0 +1,3 @@
+#EXTM3U
+#EXTINF: section playlist generated with SpeLbox
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.11.2.0.0.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.11.2.0.0.ogg b/macros/latex/contrib/spelatex/spelatex-spel/7.11.2.0.0.ogg
new file mode 100644
index 0000000000..6f738b9552
--- /dev/null
+++ b/macros/latex/contrib/spelatex/spelatex-spel/7.11.2.0.0.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.11.3.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/7.11.3.0.0.m3u
new file mode 100644
index 0000000000..a8b4b0f8f4
--- /dev/null
+++ b/macros/latex/contrib/spelatex/spelatex-spel/7.11.3.0.0.m3u
@@ -0,0 +1,3 @@
+#EXTM3U
+#EXTINF: section playlist generated with SpeLbox
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.11.3.0.0.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.11.3.0.0.ogg b/macros/latex/contrib/spelatex/spelatex-spel/7.11.3.0.0.ogg
new file mode 100644
index 0000000000..210080edf3
--- /dev/null
+++ b/macros/latex/contrib/spelatex/spelatex-spel/7.11.3.0.0.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.11.4.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/7.11.4.0.0.m3u
new file mode 100644
index 0000000000..1b26925fec
--- /dev/null
+++ b/macros/latex/contrib/spelatex/spelatex-spel/7.11.4.0.0.m3u
@@ -0,0 +1,3 @@
+#EXTM3U
+#EXTINF: section playlist generated with SpeLbox
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.11.4.0.0.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.11.4.0.0.ogg b/macros/latex/contrib/spelatex/spelatex-spel/7.11.4.0.0.ogg
new file mode 100644
index 0000000000..c67d161bc7
--- /dev/null
+++ b/macros/latex/contrib/spelatex/spelatex-spel/7.11.4.0.0.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.12.0.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/7.12.0.0.0.m3u
new file mode 100644
index 0000000000..f94fed909c
--- /dev/null
+++ b/macros/latex/contrib/spelatex/spelatex-spel/7.12.0.0.0.m3u
@@ -0,0 +1,3 @@
+#EXTM3U
+#EXTINF: section playlist generated with SpeLbox
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.12.0.0.0.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.12.0.0.0.ogg b/macros/latex/contrib/spelatex/spelatex-spel/7.12.0.0.0.ogg
new file mode 100644
index 0000000000..5c5a0cbad3
--- /dev/null
+++ b/macros/latex/contrib/spelatex/spelatex-spel/7.12.0.0.0.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.2.0.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/7.2.0.0.0.m3u
index 65dc14045a..7e1163118f 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/7.2.0.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/7.2.0.0.0.m3u
@@ -1,3 +1,3 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-7.2.0.0.0.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.2.0.0.0.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.3.0.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/7.3.0.0.0.m3u
index 88d216c122..1958cfe612 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/7.3.0.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/7.3.0.0.0.m3u
@@ -1,3 +1,3 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-7.3.0.0.0.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.3.0.0.0.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.4.0.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/7.4.0.0.0.m3u
index 5ab8d891ca..83042a92e3 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/7.4.0.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/7.4.0.0.0.m3u
@@ -1,3 +1,3 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-7.4.0.0.0.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.4.0.0.0.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.5.0.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/7.5.0.0.0.m3u
index db3199ecb2..22ebb4cdf2 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/7.5.0.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/7.5.0.0.0.m3u
@@ -1,3 +1,3 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-7.5.0.0.0.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.5.0.0.0.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.6.0.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/7.6.0.0.0.m3u
index 2b73a9329d..eb6918c140 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/7.6.0.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/7.6.0.0.0.m3u
@@ -1,3 +1,3 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-7.6.0.0.0.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.6.0.0.0.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.7.0.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/7.7.0.0.0.m3u
index ad44439ec3..0f6cb103a6 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/7.7.0.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/7.7.0.0.0.m3u
@@ -1,3 +1,3 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-7.7.0.0.0.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.7.0.0.0.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.8.0.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/7.8.0.0.0.m3u
index 7c9bda47ee..c7288f1045 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/7.8.0.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/7.8.0.0.0.m3u
@@ -1,9 +1,3 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-7.8.0.0.0.ogg
-7.8.1.0.0.ogg
-7.8.2.0.0.ogg
-7.8.3.0.0.ogg
-7.8.4.0.0.ogg
-7.8.5.0.0.ogg
-7.8.6.0.0.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.8.0.0.0.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.8.0.0.0.ogg b/macros/latex/contrib/spelatex/spelatex-spel/7.8.0.0.0.ogg
index 804b7f66b6..af1839e85e 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/7.8.0.0.0.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/7.8.0.0.0.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.8.1.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/7.8.1.0.0.m3u
deleted file mode 100644
index 7e19147683..0000000000
--- a/macros/latex/contrib/spelatex/spelatex-spel/7.8.1.0.0.m3u
+++ /dev/null
@@ -1,3 +0,0 @@
-#EXTM3U
-#EXTINF: section playlist generated with SpeLbox
-7.8.1.0.0.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.8.1.0.0.ogg b/macros/latex/contrib/spelatex/spelatex-spel/7.8.1.0.0.ogg
deleted file mode 100644
index 9dc083b378..0000000000
--- a/macros/latex/contrib/spelatex/spelatex-spel/7.8.1.0.0.ogg
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.8.2.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/7.8.2.0.0.m3u
deleted file mode 100644
index e3b31c66bb..0000000000
--- a/macros/latex/contrib/spelatex/spelatex-spel/7.8.2.0.0.m3u
+++ /dev/null
@@ -1,3 +0,0 @@
-#EXTM3U
-#EXTINF: section playlist generated with SpeLbox
-7.8.2.0.0.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.8.2.0.0.ogg b/macros/latex/contrib/spelatex/spelatex-spel/7.8.2.0.0.ogg
deleted file mode 100644
index 706084cd9b..0000000000
--- a/macros/latex/contrib/spelatex/spelatex-spel/7.8.2.0.0.ogg
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.8.3.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/7.8.3.0.0.m3u
deleted file mode 100644
index a88f6b83c0..0000000000
--- a/macros/latex/contrib/spelatex/spelatex-spel/7.8.3.0.0.m3u
+++ /dev/null
@@ -1,3 +0,0 @@
-#EXTM3U
-#EXTINF: section playlist generated with SpeLbox
-7.8.3.0.0.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.8.3.0.0.ogg b/macros/latex/contrib/spelatex/spelatex-spel/7.8.3.0.0.ogg
deleted file mode 100644
index 427ff5ee22..0000000000
--- a/macros/latex/contrib/spelatex/spelatex-spel/7.8.3.0.0.ogg
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.8.4.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/7.8.4.0.0.m3u
deleted file mode 100644
index 35f43920c7..0000000000
--- a/macros/latex/contrib/spelatex/spelatex-spel/7.8.4.0.0.m3u
+++ /dev/null
@@ -1,3 +0,0 @@
-#EXTM3U
-#EXTINF: section playlist generated with SpeLbox
-7.8.4.0.0.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.8.4.0.0.ogg b/macros/latex/contrib/spelatex/spelatex-spel/7.8.4.0.0.ogg
deleted file mode 100644
index 09f9e2aa42..0000000000
--- a/macros/latex/contrib/spelatex/spelatex-spel/7.8.4.0.0.ogg
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.8.5.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/7.8.5.0.0.m3u
deleted file mode 100644
index a47d61bdd1..0000000000
--- a/macros/latex/contrib/spelatex/spelatex-spel/7.8.5.0.0.m3u
+++ /dev/null
@@ -1,3 +0,0 @@
-#EXTM3U
-#EXTINF: section playlist generated with SpeLbox
-7.8.5.0.0.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.8.5.0.0.ogg b/macros/latex/contrib/spelatex/spelatex-spel/7.8.5.0.0.ogg
deleted file mode 100644
index 2b206fe380..0000000000
--- a/macros/latex/contrib/spelatex/spelatex-spel/7.8.5.0.0.ogg
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.8.6.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/7.8.6.0.0.m3u
deleted file mode 100644
index fe1f3bdb65..0000000000
--- a/macros/latex/contrib/spelatex/spelatex-spel/7.8.6.0.0.m3u
+++ /dev/null
@@ -1,3 +0,0 @@
-#EXTM3U
-#EXTINF: section playlist generated with SpeLbox
-7.8.6.0.0.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.8.6.0.0.ogg b/macros/latex/contrib/spelatex/spelatex-spel/7.8.6.0.0.ogg
deleted file mode 100644
index f38ca7926f..0000000000
--- a/macros/latex/contrib/spelatex/spelatex-spel/7.8.6.0.0.ogg
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.9.0.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/7.9.0.0.0.m3u
index 92e3c5d6e3..baaf056dd6 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/7.9.0.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/7.9.0.0.0.m3u
@@ -1,5 +1,9 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-7.9.0.0.0.ogg
-7.9.1.0.0.ogg
-7.9.2.0.0.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.9.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.9.1.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.9.2.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.9.3.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.9.4.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.9.5.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.9.6.0.0.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.9.0.0.0.ogg b/macros/latex/contrib/spelatex/spelatex-spel/7.9.0.0.0.ogg
index 9650ec9582..938acd9522 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/7.9.0.0.0.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/7.9.0.0.0.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.9.1.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/7.9.1.0.0.m3u
index 5e2efd9c5f..2f6053e031 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/7.9.1.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/7.9.1.0.0.m3u
@@ -1,3 +1,3 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-7.9.1.0.0.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.9.1.0.0.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.9.1.0.0.ogg b/macros/latex/contrib/spelatex/spelatex-spel/7.9.1.0.0.ogg
index 527ae5ae02..50dd2a2633 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/7.9.1.0.0.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/7.9.1.0.0.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.9.2.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/7.9.2.0.0.m3u
index 9f4c5730bb..d0ce528ae0 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/7.9.2.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/7.9.2.0.0.m3u
@@ -1,3 +1,3 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-7.9.2.0.0.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.9.2.0.0.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.9.2.0.0.ogg b/macros/latex/contrib/spelatex/spelatex-spel/7.9.2.0.0.ogg
index ddf594575d..32e86534e8 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/7.9.2.0.0.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/7.9.2.0.0.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.9.3.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/7.9.3.0.0.m3u
new file mode 100644
index 0000000000..a10e789e16
--- /dev/null
+++ b/macros/latex/contrib/spelatex/spelatex-spel/7.9.3.0.0.m3u
@@ -0,0 +1,3 @@
+#EXTM3U
+#EXTINF: section playlist generated with SpeLbox
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.9.3.0.0.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.9.3.0.0.ogg b/macros/latex/contrib/spelatex/spelatex-spel/7.9.3.0.0.ogg
new file mode 100644
index 0000000000..0d821e4d74
--- /dev/null
+++ b/macros/latex/contrib/spelatex/spelatex-spel/7.9.3.0.0.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.9.4.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/7.9.4.0.0.m3u
new file mode 100644
index 0000000000..3dbe7e2ef6
--- /dev/null
+++ b/macros/latex/contrib/spelatex/spelatex-spel/7.9.4.0.0.m3u
@@ -0,0 +1,3 @@
+#EXTM3U
+#EXTINF: section playlist generated with SpeLbox
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.9.4.0.0.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.9.4.0.0.ogg b/macros/latex/contrib/spelatex/spelatex-spel/7.9.4.0.0.ogg
new file mode 100644
index 0000000000..0e09b58a2d
--- /dev/null
+++ b/macros/latex/contrib/spelatex/spelatex-spel/7.9.4.0.0.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.9.5.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/7.9.5.0.0.m3u
new file mode 100644
index 0000000000..47416c2485
--- /dev/null
+++ b/macros/latex/contrib/spelatex/spelatex-spel/7.9.5.0.0.m3u
@@ -0,0 +1,3 @@
+#EXTM3U
+#EXTINF: section playlist generated with SpeLbox
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.9.5.0.0.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.9.5.0.0.ogg b/macros/latex/contrib/spelatex/spelatex-spel/7.9.5.0.0.ogg
new file mode 100644
index 0000000000..e75694990e
--- /dev/null
+++ b/macros/latex/contrib/spelatex/spelatex-spel/7.9.5.0.0.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.9.6.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/7.9.6.0.0.m3u
new file mode 100644
index 0000000000..25592e95da
--- /dev/null
+++ b/macros/latex/contrib/spelatex/spelatex-spel/7.9.6.0.0.m3u
@@ -0,0 +1,3 @@
+#EXTM3U
+#EXTINF: section playlist generated with SpeLbox
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/7.9.6.0.0.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/7.9.6.0.0.ogg b/macros/latex/contrib/spelatex/spelatex-spel/7.9.6.0.0.ogg
new file mode 100644
index 0000000000..9c99c73709
--- /dev/null
+++ b/macros/latex/contrib/spelatex/spelatex-spel/7.9.6.0.0.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/8.0.0.0.0-1.ogg b/macros/latex/contrib/spelatex/spelatex-spel/8.0.0.0.0-1.ogg
index a9f226ac10..f0b68066f0 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/8.0.0.0.0-1.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/8.0.0.0.0-1.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/8.0.0.0.0-star-1.ogg b/macros/latex/contrib/spelatex/spelatex-spel/8.0.0.0.0-star-1.ogg
deleted file mode 100644
index f270038b25..0000000000
--- a/macros/latex/contrib/spelatex/spelatex-spel/8.0.0.0.0-star-1.ogg
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/8.0.0.0.0-star-2.ogg b/macros/latex/contrib/spelatex/spelatex-spel/8.0.0.0.0-star-2.ogg
index a708edd941..f270038b25 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/8.0.0.0.0-star-2.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/8.0.0.0.0-star-2.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/8.0.0.0.0-star-3.ogg b/macros/latex/contrib/spelatex/spelatex-spel/8.0.0.0.0-star-3.ogg
index 1c90a0e4b4..a708edd941 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/8.0.0.0.0-star-3.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/8.0.0.0.0-star-3.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/8.0.0.0.0-star-4.ogg b/macros/latex/contrib/spelatex/spelatex-spel/8.0.0.0.0-star-4.ogg
new file mode 100644
index 0000000000..1c90a0e4b4
--- /dev/null
+++ b/macros/latex/contrib/spelatex/spelatex-spel/8.0.0.0.0-star-4.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/8.0.0.0.0.m3u b/macros/latex/contrib/spelatex/spelatex-spel/8.0.0.0.0.m3u
index 83fe2049a4..ac5b71e655 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/8.0.0.0.0.m3u
+++ b/macros/latex/contrib/spelatex/spelatex-spel/8.0.0.0.0.m3u
@@ -1,9 +1,9 @@
#EXTM3U
#EXTINF: section playlist generated with SpeLbox
-8.0.0.0.0.ogg
-8.0.0.0.0-1.ogg
-8.0.0.0.0-2.ogg
-8.0.0.0.0-3.ogg
-8.0.0.0.0-star-1.ogg
-8.0.0.0.0-star-2.ogg
-8.0.0.0.0-star-3.ogg \ No newline at end of file
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/8.0.0.0.0.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/8.0.0.0.0-1.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/8.0.0.0.0-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/8.0.0.0.0-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/8.0.0.0.0-star-2.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/8.0.0.0.0-star-3.ogg
+https://ctan.org/tex-archive/macros/latex/contrib/spelatex/spelatex-spel/8.0.0.0.0-star-4.ogg \ No newline at end of file
diff --git a/macros/latex/contrib/spelatex/spelatex-spel/date.ogg b/macros/latex/contrib/spelatex/spelatex-spel/date.ogg
index 4bf1df7b7c..f1073936cf 100644
--- a/macros/latex/contrib/spelatex/spelatex-spel/date.ogg
+++ b/macros/latex/contrib/spelatex/spelatex-spel/date.ogg
Binary files differ
diff --git a/macros/latex/contrib/spelatex/spelatex.dtx b/macros/latex/contrib/spelatex/spelatex.dtx
index bdedc84d70..564abba5a2 100644
--- a/macros/latex/contrib/spelatex/spelatex.dtx
+++ b/macros/latex/contrib/spelatex/spelatex.dtx
@@ -20,7 +20,6 @@
% This work consists of the files spelatex.dtx, spelatex.ins,
% and any derivative file, generated from the dtx file using
% the ins driver file.
-%
% \fi
%
% \iffalse
@@ -33,17 +32,20 @@
\ProvidesFile{spelatex.dtx}
%</driver>
%<*package>
- [2024/06/21 v0.91 SpeLaTeX - Speech-enabled LaTeX (DMW and LVP)]
+ [2024/09/09 v0.92 SpeLaTeX - Speech-enabled LaTeX (DMW and LVP)]
%</package>
-\def\fileversion{0.91}
-\def\filedate{2024/06/21}
+\def\fileversion{0.92}
+\def\filedate{2024/09/09}
%<*driver>
\documentclass[10pt]{ltxdoc}
\usepackage{makeidx}
\usepackage{alltt}
\usepackage[english]{babel}
-\usepackage[extramath]{spelatex}
+\usepackage[extramath,
+ server=https://ctan.org/tex-archive/macros/latex/contrib/spelatex
+ ]{spelatex}
\usepackage{amsmath}
+\usepackage{amsfonts}
\usepackage{graphicx}
\usepackage{tikz}
\IfFileExists{tocbibind.sty}{\usepackage{tocbibind}}{}
@@ -83,6 +85,11 @@
% - avoided big active link areas\\
% - sketched bigger picture, leading to
% the three project phases.}
+% \changes{v0.92}{2024/09/09}{. Second overhaul:\\
+% - dumped orgmode export idea (too small of an audience)\\
+% - introduced markers for non-area-links\\
+% - implemented audio on server\\
+% - implemented <\kern-0.5ex<\kern-0.5ex<-macro as a shorthand}
%
% \GetFileInfo{spelatex.dtx}
%
@@ -111,41 +118,49 @@
% \maketitle
% \fvset{gobble=2}
%
+% \section*{Disclaimer}
+% \<<<{
+% Note that this is an experimental package. Its interface may change
+% considerably over subsequent versions (until v1.0).
+% }
+%
% \section{Preface}
%
% \subsection{Background}
%
-% \begin{spelchunk}
+% \<<<{
% At our institute, the University of Antwerp in Belgium, the number
% of students with reading and/or writing disorders (or at least
% aware of these disorders) is increasing. Approximately 5\% of the
-% students are registered with such a disorder. Probably there's an
-% additional number of people opting not to register their disorder.
-% \end{spelchunk}
-%
-% \begin{spelchunk}
+% students are registered with such a disorder and the number is rising
+% steadily over the past 10 years. Probably this number is an
+% underestimation as a number of people opti not to register their
+% disorder.
+% }
+
+% \<<<{
% A large portion of the study materials we offer to students is
% still written material. The authors believe that this will keep on
% being so, even given the multimedia and AI options that have
% become mainstream. Let's not go into this debate for now.\\
% However, written course texts cannot be but suboptimal for
% students with reading disorders.
-% \end{spelchunk}
+% }
%
-% \begin{spelchunk}
+% \<<<{
% For small texts, reading them out loud and recording them using a
% voice recorder to create an aid for our target group, is still
-% feasible. We have taken that route at our institute for exam
+% feasible. We have taken that in the past for exam
% assignments. However, for bigger texts (like course syllabi) this
-% is beyond the time a teacher can afford spending on this small a
+% is beyond the time a professor can afford spending on this small a
% group of students. Yes, economic laws also govern teaching!
-% \end{spelchunk}
+% }
%
% \subsection{State of the art}
%
% \subsubsection{In general}
%
-% \begin{spelchunk}
+% \<<<{
% Therefore, reverting to readily available text-to-speech software
% is an obvious choice. Nowadays, special software exists that
% provides the functionality of reading out loud the contents of
@@ -158,40 +173,40 @@
% loaded with non-trivial mathematics, the standard text-to-speech
% packages fail to meet our expectations. In addition, they cannot
% read a sensible textual description of figures or tables.
-% \end{spelchunk}
+% }
%
-% \begin{spelchunk}
+% \<<<{
% The issue with reading mathematics will be solved in the future,
% by enforcing mathematical equations to follow a specific standard
% that can be parsed and converted, not only into a visual
% representation, but also into proper text. MathML will be one of
% the candidates for that format.
-% \end{spelchunk}
+% }
%
-% \begin{spelchunk}
+% \<<<{
% The issue with figures and tables can be solved by using the tag
% infrastructure of PDF. The format provides a system of tags that
% allow you to provide extra information about the content of a
% document, in much the same way as you can specify an 'alt' key for
% an image in HTML. This tag could contain a proper textual
% description of the figure or the table.
-% \end{spelchunk}
+% }
%
% \subsubsection{For \LaTeX}
%
-% \begin{spelchunk}
-% Currently, the \LaTeX project is investing in enabling \LaTeX{} to
+% \<<<{
+% Currently, the \LaTeX{} project is investing in enabling \LaTeX{} to
% partially automate the tagging of PDFs with the \texttt{tagpdf}
% package~\cite{TAGPDF}, such that the user only has to do a minimal
% job (adding tags for figures and tables). The goal is to maximize
% the accessibility of \LaTeX-produced documents.
-% \end{spelchunk}
+% }
%
-% \begin{spelchunk}
-% So all is well? Not quite. Though I'm confident that with enough
-% time the community will solve the issue completely, there are
+% \<<<{
+% So all is well? Not quite. Though we are confident that --- with enough
+% time --- the community will solve the issue completely, there are
% still some gaps:
-% \end{spelchunk}
+% }
% \begin{itemize}
% \spelitem{The tagpdf package is still not a part of the mainstream
% \LaTeX{}-kernel.}
@@ -202,13 +217,13 @@
%
% \subsection{This package}
%
-% \begin{spelchunk}
+% \<<<{
% This package aims to overcome these problems in the meantime and
% also to contribute to the longterm goal: making perfectly tagged
% PDFs that are read by any PDF-reader.
-% \end{spelchunk}
+% }
%
-% \begin{spelchunk}
+% \<<<{
% In the \emph{first phase} of this package (i.e. the version you are
% looking at right now), this package reads your \LaTeX{} source,
% converts the text and the formulas to audio files and equips your
@@ -217,58 +232,49 @@
% The audio files are external files that should be packaged with
% your PDF to allow a reader to use the document with the available
% audio.
-% How does it read the formulas? It parses your \LaTeX{} constructs and
+% You have the choice to use local files or files that are made available on a
+% server (as holds for this text; the audio files are on the CTAN servers).\\
+% How does \spelatex{} read the formulas? It parses your \LaTeX{} constructs and
% makes the best of it. This will probably be the part that might
% survive up until the very last phase of this package.
-% \end{spelchunk}
+% }
%
-% \begin{spelchunk}
+% \<<<{
% In a \emph{second phase} of this package, the audio files will be embedded
% into the PDF. Currently, there are not enough PDF readers that
% support this feature. Therefore, we decided to keep using the
% external audio files for now.
-% \end{spelchunk}
+% }
%
-% \begin{spelchunk}
+% \<<<{
% In a \emph{third phase}, the audio files \emph{may be} abandoned
% alltogether, fully switching to tags. And we do think that this
% should be the end goal. The reasons why we say
% \emph{'may be'}, are:
-% \end{spelchunk}
+% }
% \begin{itemize}
% \spelitem{The voices of the current PDF-readers are still not of the
% same quality as the ones available online. And quality does matter.}
% \spelitem{The better voices may require cloud access, and probably
-% will not be free, therefore (me) paying for them at document creation
-% time, makes more sense to me than having my students pay
+% will not be free, therefore (us) paying for them at document creation
+% time, makes more sense to us than having our students pay
% for these voices whenever they read the document.}
% \spelitem{The industry standard Adobe reader is not easily available
% on open-source operating systems (like UNIX/BSD/Linux-derived
% platforms). You might consider using emulation using
% wine~\cite{WINE}, but in that case you can forget about audio. Free
% access to software is something we consider to be a must-have,
-% rather than a nice-to-have. In addition, Walter feels miserable when
-% he's forced to use anything else than GNU/Linux, because then he
-% keeps moaning that his productivity is ruined.}
+% rather than a nice-to-have.}
% \end{itemize}
%
-% \begin{spelchunk}
-% Admittedly, in this first phase, using the \spelatex{} package
-% causes a significant overhead in writing your text. Therefore we
-% also provide you the \spelbox{} extension for the Org-mode
-% \cite{ORGMODE} of \GNU{} Emacs \cite{EMACS}. To satisfy your
-% curiosity: \spelbox{} stands for ``Speech-Enabled \LaTeX{} By
-% Org-mode eXport''.
-% \end{spelchunk}
-%
-% \begin{spelchunk}
+% \<<<{
% Will \spelatex{} become obsolete in the future?
% Undoubtedly so. But for the time being, it answers our desire to
% provide our students with good audio support when studying their
% engineering courses. That is now, not only in five years time.
-% \end{spelchunk}
+% }
-% \begin{spelchunk}
+% \<<<{
% We hope that you enjoy
% using our software, or that --- if you are not pleased with it ---
% it triggers you to give us feedback or to come up with a better
@@ -278,32 +284,34 @@
% One of her suggestions (not to use big hyperlink-areas) was almost
% instantly implemented and has been adopted as the standard way of
% linking.
-% \end{spelchunk}
+% }
%
-% \begin{spelchunk}
+% \<<<{
% You are free to use our software but kindly ask you to provide a
% mention ``The audio materials of this text have been prepared with
-% \spelatex{}/\spelbox{}'' in the section treating copyrights,
-% bibliographic data or any other spot that is suited. We'd also
-% welcome a short mail of yours telling that you make use of the
-% package. The pleasure of receiving such an e-mail makes our day.
-% \end{spelchunk}
-%
-% \begin{spelchunk}
+% \spelatex{}'' in the section treating copyrights,
+% bibliographic data or any other spot of your text that is
+% suited. We'd also welcome a short mail of yours telling that you
+% make use of the package. The pleasure of receiving such an e-mail
+% makes our day.
+% }
+%
+% \<<<{
% You are free to modify this \LaTeX-package, keeping a reference to
% our original package intact, provided that your package is subject
% to the LPPL license, as is \spelatex{}. However, contributing to our
-% package might be a better way to go, in order to bundle the efforts
+% package or to the \LaTeX{} project in general, might be a better
+% way to go, in order to bundle the efforts
% for a better speech-enabled \LaTeX{}.
-% \end{spelchunk}
-%
+% }
+% \clearpage
% \section{Introduction}
%
% \subsection{Target audience}
-% \begin{spelchunk}
+% \<<<{
% \spelatex{} is primarily intended for persons with a reading
% disorder. This may be:
-% \end{spelchunk}
+% }
% \begin{itemize}
% \spelitem{persons suffering dyslexia}
% \spelitem{visually impaired persons}
@@ -318,177 +326,153 @@
% \end{itemize}
% \end{itemize}
%
-% \begin{spelchunk}
+% \<<<{
% But also people who want to multitask, e.g., gardening while
% listening to a technical book, can benefit from
% \spelatex{}.\footnote{Note that multitasking is not reserved for persons
% without visual impairment. Also visually impaired persons can
% benefit from listening to an audiobook while doing other
-% things.} Personally, we often use \spelatex{} to proofread texts as we
-% hear language errors more easily than we spot them while reading.
-% \end{spelchunk}
+% things.}\\ We often use \spelatex{} to proofread the texts we've
+% written ourselves as we hear language errors more easily than we
+% spot them while reading.
+% }
%
% \subsection{The magic under the hood}
%
-% \subsubsection{The \spelbox{}-ecosystem}
-%
-% \begin{spelchunk}
-% The \spelatex{}-package is one of the parts of the \spelbox{}
-% ecosystem. It consists of three components:
-% \end{spelchunk}
-% \begin{itemize}
-% \spelitem{An Org-mode exporter called \texttt{ox-spel} \cite{OXSPELATEX}}
-% \spelitem{This \LaTeX{}-package \spelatex{} \cite{SPEL}}
-% \spelitem{A script embeded in the Perl module \texttt{SpeL::Wizard} \cite{SPELWIZARD}}
-% \end{itemize}
-%
% \subsubsection{The overall picture}
%
-% \begin{spelchunk}
-% \spelatex{} equips the PDF that is generated by \LaTeX{}
-% with hyperlinks to audio files that contain the spoken
-% equivalent of the original text, equations, figures and tables
-% \end{spelchunk}
-%
-% \begin{spelchunk}
-% Let's look at this in detail in Fig.~\ref{fig:setup}.
-% For now, ignore the two top boxes, and let's assume you are
-% composing the file |text.tex| as your document. We will return
-% to the two top boxes later.
-% \end{spelchunk}
-%
-% \begin{spelchunk}
+% \<<<{
+% \spelatex{} equips the PDF that is generated by \LaTeX{}
+% with hyperlinks to audio files that contain the spoken
+% equivalent of the original text, equations, figures and tables.
+% }
+%
+% \<<<{
+% Let's start by considering the flow depicted in
+% Fig.~\ref{fig:setup} at the top of the diagram.
% By loading the |spel.sty| package in your source
-% document, \LaTeX{} will produce a PDF file that references audio
+% document (|text.tex|), \LaTeX{} will produce a PDF file that references audio
% files that will be generated later (see below). In
% addition, it generates text chunks (i.e. small portions of
% your text) in separate files (|.tex|) and a spel index file
% (|.spelidx|) referencing them in sequence.
-% \end{spelchunk}
+% }
%
-% \begin{spelchunk}
+% \<<<{
% Together with the |.aux|-file (needed by \spelatex{} for labels and
% citations), these are the inputs to the \spelatex-engine (|spel-wizard.pl|)
% that parses the text chunks, writes a full text version of them as
% spel files (with extension |.spel|) and
-% controls the text-to-speech engine to generate audio files of
+% controls the text-to-speech engine to generate audio versions of
% them.\footnote{In the figure, Ogg Vorbis has been chosen as
% format, but this can be any audio format.}
-% \end{spelchunk}
+% }
%
-% \begin{spelchunk}
+% \<<<{
% To avoid excessive text to speech conversion (i.e. an expensive step)
-% the \spelatex{} engine derives a finger print of them and compares it
+% the \spelatex{} engine derives an MD5 fingerprint of them and compares it
% to previously generated fingerprints for the chunk. If the
-% finger print has changed, the audio file is overwritten (or
+% fingerprint has changed, the audio file is overwritten (or
% created the first time), otherwise it is left untouched.
-% \end{spelchunk}
+% }
%
-% \begin{spelchunk}
-% As a cherry on top, the \spelatex-engine also creates a playlist,
+% \<<<{
+% As a cherry on top, the \spelatex-engine also creates a top-level playlist,
% such that you may use the audio files for a \POD{}cast-like
% listening experience.\\
% Something that has not been indicated on the figure, is that for
% reading out loud entire (sub)sections, the PDF-file also references
% m3u playlists that gather all chunks belonging to the (sub)section.
-% \end{spelchunk}
+% }
%
-% \begin{figure}[p]
+% \begin{figure}
% \begin{spelchunk}
% \begin{center}
% \begin{tikzpicture}
-% [scale=0.8,>=latex,
-% doc/.style={rectangle,fill=black!10,align=center,minimum
-% width=2cm,minimum height=2cm},
-% tool/.style={rectangle,draw,align=center}]
-% \node [doc] (utext) at (0,9) {text.org\\\footnotesize(unprepped
-% source)};
-% \node [tool] (instrument) at (0,6) {Org-mode exporter\\\footnotesize(\spelbox)};
-% \node [doc] (text) at (0,3) {text.tex\\\footnotesize(prepped source)};
-% \draw[->] (utext) -- (instrument);
-% \draw[->] (instrument) -- (text);
-% \node [doc] (R) at (-3,0) {spel.sty\\\footnotesize(package)};
-% \node [tool] (latex) at (0,0) {\LaTeX\\\footnotesize(compiler)};
-% \node [doc] (pdf) at (0,-3) {text.pdf\\\footnotesize(PDF with\\\footnotesize hyperlinks)};
-% \node [doc] (spelidx) at (6,-3) {text.spelidx\\\footnotesize(index file)};
-% \node [doc] (aux) at (9,-3) {text.aux\\\footnotesize(auxiliary file)};
-% \node [doc] (files) at (3,-3) {*.tex\\\footnotesize(text chunks)};
-% \draw[->] (text) -- (latex);
-% \draw[->,dotted] (text) -- (R);
-% \draw[->,dotted] (spelidx) -- (files);
-% \draw[->] (R) -- (latex);
-% \draw[->] (latex) -- (pdf);
-% \draw[->] (latex) edge[out=0,in=90] (spelidx);
-% \draw[->] (latex) edge[out=10,in=90] (aux);
-% \draw[->] (latex) edge[out=-10,in=90] (files);
-% \node [tool] (engine) at (6,-6) {\spelpl{}\\
-% \footnotesize(\spelatex{} engine)};
-% \node [tool] (t2s) at (1.5,-6) {text-to-speech\\engine};
-% \draw[->] (files) -- (engine);
-% \draw[->] (spelidx) -- (engine);
-% \draw[->] (aux) -- (engine);
-% \node[doc] (ogg) at (0,-9) {*.ogg\\\footnotesize(audio files)};
-% \node[doc] (spel) at (3,-9) {*.spel\\\footnotesize(spel files)};
-% \node[doc] (m3u) at (6,-9) {text.m3u\\\footnotesize(playlist)};
-% \node[doc] (md5) at (9,-9) {*.md5\\\footnotesize(fingerprints)};
-% \draw[->] (engine) -- (spel);
-% \draw[->] (engine) -- (m3u);
-% \draw[<->] (engine) -- (md5);
-% \draw[->,dotted] (pdf) edge[out=-115,in=115] (ogg);
-% \draw[->,dotted] (m3u) edge[out=-125,in=-55] (ogg);
-% \draw[->,dashed] (engine) -- (t2s);
-% \draw[->] (spel) -- (t2s);
-% \draw[->] (t2s) -- (ogg);
+% [scale=0.8,>=latex,
+% doc/.style={rectangle,fill=black!10,align=center,minimum
+% width=2cm,minimum height=2cm},
+% tool/.style={rectangle,draw,align=center}]
+% \node [doc] (text) at (0,3) {text.tex\\\footnotesize(source file)};
+% \node [doc] (R) at (-3,0) {spel.sty\\\footnotesize(package)};
+% \node [tool] (latex) at (0,0) {\LaTeX\\\footnotesize(compiler)};
+% \node [doc] (pdf) at (0,-3) {text.pdf\\\footnotesize(PDF with\\\footnotesize hyperlinks)};
+% \node [doc] (spelidx) at (6,-3) {text.spelidx\\\footnotesize(index file)};
+% \node [doc] (aux) at (9,-3) {text.aux\\\footnotesize(auxiliary file)};
+% \node [doc] (files) at (3,-3) {*.tex\\\footnotesize(text chunks)};
+% \draw[->] (text) -- (latex);
+% \draw[->,dotted] (text) -- (R);
+% \draw[->,dotted] (spelidx) -- (files);
+% \draw[->] (R) -- (latex);
+% \draw[->] (latex) -- (pdf);
+% \draw[->] (latex) edge[out=0,in=90] (spelidx);
+% \draw[->] (latex) edge[out=10,in=90] (aux);
+% \draw[->] (latex) edge[out=-10,in=90] (files);
+% \node [tool] (engine) at (6,-6) {\spelpl{}\\
+% \footnotesize(\spelatex{} engine)};
+% \node [tool] (t2s) at (1.5,-6) {text-to-speech\\engine};
+% \draw[->] (files) -- (engine);
+% \draw[->] (spelidx) -- (engine);
+% \draw[->] (aux) -- (engine);
+% \node[doc] (ogg) at (0,-9) {*.ogg\\\footnotesize(audio files)};
+% \node[doc] (spel) at (3,-9) {*.spel\\\footnotesize(spel files)};
+% \node[doc] (m3u) at (6,-9) {text.m3u\\\footnotesize(playlist)};
+% \node[doc] (md5) at (9,-9) {*.md5\\\footnotesize(fingerprints)};
+% \draw[->] (engine) -- (spel);
+% \draw[->] (engine) -- (m3u);
+% \draw[<->] (engine) -- (md5);
+% \draw[->,dotted] (pdf) edge[out=-115,in=115] (ogg);
+% \draw[->,dotted] (m3u) edge[out=-125,in=-55] (ogg);
+% \draw[->,dashed] (engine) -- (t2s);
+% \draw[->] (spel) -- (t2s);
+% \draw[->] (t2s) -- (ogg);
% \end{tikzpicture}
-% \end{center}
-% \end{spelchunk}
-% \begin{spelchunkad}
-% The easiest flow is to start from the top box, which represents
-% an org file that describes your text. We call this the
-% unprepped source. Read the Orgmode
-% documentation on \LaTeX{} and \spelatex{}-exporting to get to know
-% the format. The Orgmode \spelatex{} exporter, creates a fully
-% equiped \LaTeX{} file of your text. We call this the prepped source. You can
-% also start by composing this file yourself.
-% If you prepped source file uses the \spelatex{} style file, than
-% your compiler will generate a PDF file with hyperlinks, a
-% dot aawks-file and a dot spellindex-file together with a directory full of
-% dot tex files containing the text chunks to be processed by the
-% \spelpl-engine. This is a perl script that converts the chunks into
-% plain text readable spel files. The script is called spel dash
-% wizard dot pl. It also creates a playlist and audio files using a
-% text-to-speech engine. In this case, these are
-% Ogg-Vorbis files. To avoid having to call the text-to-speech
-% engine too frequently (which may incur costs), MD5-fingerprints
-% are used such that chunks that have been generated before and
-% are unchanged, can be reused. The end result is a PDF file that
-% references the audio files.
-% \end{spelchunkad}
-% \caption{Basic tool setup of \spelbox{} of which the \spelatex{} package
-% is an integral part; filled boxes indicate files,
-% outlined boxes indicate tools; solid lines indicates use or
-% creation of files, dotted lines indicate references, dashed lines
-% indicate a control relationship.}
-% \label{fig:setup}
+% \end{center}
+% \end{spelchunk}
+% \begin{spelchunkad}
+% If you load the \spelatex{} style file in your source file (at the
+% top of the figure) and prepare your source file according to the
+% instructions in this manual, than
+% your compiler will generate a PDF file with hyperlinks, a
+% dot aawks-file and a dot spellindex-file together with a directory full of
+% dot tex files containing the text chunks to be processed by the
+% \spelpl-engine. This is a perl script that converts the chunks into
+% plain text readable spel files. The script is called spel dash
+% wizard dot pl. It also creates a playlist and audio files using a
+% text-to-speech engine. In this case, these are
+% Ogg-Vorbis files. To avoid having to call the text-to-speech
+% engine too frequently (which may incur costs), MD5 fingerprints
+% are used such that chunks that have been generated before and
+% are unchanged, can be reused. The end result is a PDF file that
+% references the audio files.
+% \end{spelchunkad}
+% \caption{Basic tool setup of the \spelatex{} package; filled boxes indicate
+% files, outlined boxes indicate tools; solid lines indicates use or
+% creation of files, dotted lines indicate references, dashed lines
+% indicate a control relationship.}
+% \label{fig:setup}
% \end{figure}
%
-% \begin{spelchunk}
+% \<<<{
% You might wonder: where are the links? Well, there are three
% variants:
-% \end{spelchunk}
+% }
% \begin{itemize}
% \spelitem{\emph{area links}, which are almost exclusively
% used for equations, tables or figures. These links make an entire
% rectangle active, linking to the corresponding audio file.}
% \spelitem{\emph{group links}, indicated by small right-pointing
-% triangles next to section headers. These cause all blocks in the
-% section to be read one by one.}
-% \spelitem{\emph{hidden links}, wich are, as the name suggests,
-% hidden to avoid visual disturbance of the text; every
-% paragraph, footnote and list is activated by a link on the
-% whitespace before the first line of the chunk. Try it! Once you
+% triangles next to section headers (on the far right). These cause all
+% blocks in the section to be read one by one.\\
+% In case you specify the
+% package option \texttt{markervisibility=none} these triangles will become
+% invisible. However, the clickable areay still exists. Try!}
+% \spelitem{\emph{chunk links}, before every
+% paragraph, footnote or list, a small triangle indicates a clickable link.\\
+% If you activate the package option \texttt{markervisibility=onlygroups}, they will
+% become invisible, but still clickable. Try it! Once you
% are aware that these regions are active, you'll find them
-% easily. In addition, not using the full paragraph as an active
+% easily. Not using the full paragraph as an active
% region, allows existing hyperlinks (like for citations, references
% or URLs) to still function.}
% \end{itemize}
@@ -504,7 +488,7 @@
% \spelmacad{thanks}{the thanks macro}
% \spelmacad{item}{the item macro}
% \spelmacad{spelitem}{the spelitem macro}
-% \begin{spelchunk}
+% \<<<{
% Generating the text chunks to be read out loud requires us to use
% special \LaTeX-macros. For all pieces of text that are within
% an existing macro (e.g. |\title|, |\author|, |\section|,
@@ -512,9 +496,9 @@
% redefined by the \spelatex{}-package to
% execute the magic without any further hassle.\\
% We call these \LaTeX-fragments \emph{implicit spelchunks}.%
-% \end{spelchunk}
+% }
%
-% \begin{spelchunk}
+% \<<<{
% However, not all \LaTeX-constructs can be dealt with in an
% automatic way. This is true for any |\item| you put inside a list.
% You need to replace that with a |\spelitem| that takes the text
@@ -524,10 +508,10 @@
% spelchunks}. They should have been implicit, but we could not get
% that to work without problems. Therefore you need to mark them
% explicitly as |\spelitem| constructs.
-% \end{spelchunk}
+% }
%
% \subsubsection{Explicit spelchunks}
-% \begin{spelchunk}
+% \<<<{
% One would hope that displaymath environments are also implicit
% spelchunks. However, overriding environments in \LaTeX{} is a tricky
% business. In view of this, the \spelatex{} package keeps away from
@@ -540,12 +524,12 @@
% will have to provide a text description for tables and figures
% manually, using a subsequence |spelchunkad|
% environment (the suffix ad stands for \emph{audio description}).
-% \end{spelchunk}
+% }
%
-% \begin{spelchunk}
+% \<<<{
% To keep the terminology clear, we label them as automatic
-% and manual spelchunks respectively:
-% \end{spelchunk}
+% and manual explicit spelchunks respectively:
+% }
% \begin{itemize}
% \spelitem{automatic: \texttt{equation}, \texttt{eqnarray},
% \texttt{gather}, \texttt{align}, \texttt{alignat}, \ldots}
@@ -553,25 +537,26 @@
% \texttt{tikzpicture}, \ldots}
% \end{itemize}
%
-% \begin{spelchunk}
+% \<<<{
% The similarity between both categories is that you both embed them
% in a |spelchunk| environment, but that you provide the manual
% textual description using a |spelchunkad| environment right after
-% the chunk: in this way, the |spelchunkad| environment provides an
+% the chunk for the manual ones: in this way, the |spelchunkad| environment provides an
% alternative text for the chunk. Note that this way of working also
-% enables you to provide an overriding text for an equation, if you
-% think that \spelpl{} is doing a bad job. You do me a favor if
-% you submit this subpar behavior as a bug report to me!
-% \end{spelchunk}
+% enables you to provide an overriding text for an automatic spelchunk,
+% e.g., an equation, if you
+% think that \spelpl{} is doing a bad job. You do us a favor if
+% you submit this subpar behavior as a bug report to us!
+% }
%
-% \begin{spelchunk}
+% \<<<{
% It is worthwile to make good descriptions for a figure or a
% table. It's here that you can create true added value to your
% manuscript, even for readers without impairment!
-% \end{spelchunk}
+% }
%
% \subsubsection{Paragraphs}
-% \begin{spelchunk}
+% \<<<{
% However, there is the elephant in the room that we did not yet
% talk about, the paragraph. Indeed, it is desirable to split plain
% text according to the paragraphs in the document. Alas, paragraphs
@@ -581,63 +566,40 @@
% explicit spelchunks and need to be embedded
% in |spelchunk| environments. This environment will cause its
% contents to be hyperlinked to a separate piece of audio.
-% \end{spelchunk}
+% }
%
-% \begin{spelchunk}
+% \<<<{
% Encasing all your paragraphs with |spelchunk| environments
% manually is a pain. There is a reason why in \LaTeX{}
% paragraphs can be created by a double newline: convenience.
% The |spelchunk|-environment encasing ruins this totally!
-% \end{spelchunk}
-%
-% \subsubsection{Emacs Orgmode to the rescue!}
-% \begin{spelchunk}
-% However, we provide an exporter for the Org-mode \cite{ORGMODE} of
-% Emacs \cite{EMACS}, such
-% that you can prepare your manuscript in Org-mode and not worry
-% about all these exlicit tricks with |spelchunk| and |spelitem|
-% constructs.
-% \end{spelchunk}
-%
-% \begin{spelchunk}
-% This brings us to the two top boxes in the diagram of
-% Fig.~\ref{fig:setup}. If you prepare your manuscript in Org-mode,
-% and use the Org-mode exporter, you don't have to worry about explicit
-% spelchunks, or defunct implicit spelchunks. Therefore, we encourage
-% you to use Emacs as your editor. The learning
-% curve is steep, but the rewards regarding ease-of-use are huge.
-% In that way, you can focus on providing textual descriptions for
-% the non textual portions of your manuscript, e.g. giving a good
-% description of a graph.
-% \end{spelchunk}
-%
-% \begin{spelchunk}
-% Note that this very document has been prepared manually to make it
-% independent of Org-mode. It also shows that if you don't
-% want to use Emacs and Org-mode, you will suffer some considerable
-% pain in equipping your manuscript with an overload of |spelchunk|
-% environments. We have only one advice: don't use the \spelatex{}
-% outside \spelbox{}. Outside a proper boxed confinement,
-% spells easily become curses\ldots
-% \end{spelchunk}
+% }
+% \spelmacad{<<<}{the shorthand macro}
+% \<<<{
+% To ease the pain and in order to avoid the visual intrusiveness of the
+% spelchunk environments, you can also use the \texttt{\textbackslash{}<<<\{\}} command to
+% encase your paragraphs. In some cases the \texttt{\textbackslash{}<<<\{\}}
+% command will not work, e.g., if there is a |Verbatim| environment
+% inside. In that case you must use the |spelchunk| environment directly.
+% }
%
% \subsection{Extra math commands}
%
-% \begin{spelchunk}
+% \<<<{
% Some of the ways to specify mathematical expressions in \LaTeX{} is
% very liberal, what makes converting them to text quite
% difficult. Therefore, we also provide some
% extra constructs that make life easier for both parties: you as a
% user and \spelpl{} as a parser.
-% \end{spelchunk}
+% }
%
-% \begin{spelchunk}
+% \<<<{
% An example of this are sets. We provide two commands to define a
% set. As we want these commands to blend in with general \LaTeX{},
% we did not equip them with a prefix |spel|. Therefore, we made
% activating them conditional to specifying the package option
% |extramath|.
-% \end{spelchunk}
+% }
% \begin{description}
% \spelitem[\texttt{\textbackslash{}setenum}]{a command to define a set
% that consists of comma or semicolon separated elements}
@@ -648,14 +610,11 @@
%
% \subsection{Added value}
%
-% \begin{spelchunk}
+% \<<<{
% Why would it make sense to use \spelatex? We think there are many
% selling points. We can mention a few:
-% \end{spelchunk}
+% }
% \begin{description}
-% \spelitem[Minimal overhead]{
-% Preparing a \LaTeX{} manuscript for use with \spelatex{} requires a
-% minimal amount of work, if you are using Org-mode in Emacs.}
% \spelitem[Free for the content provider]{
% If you are using a freeware text-to-speech engine (like for
% example festival \cite{FESTIVAL} or balabolka \cite{BALABOLKA})
@@ -664,8 +623,9 @@
% the effort of preparing your manuscript. There are no license
% costs involved.\\
% You could also consider to use an online paying text-to-speech
-% service. As an example, We incorporated a connection to Amazon's
-% Polly \cite{AWSPOLLY}.\\
+% service. As an example, we incorporated a connection to Amazon's
+% Polly \cite{AWSPOLLY}. We admit, it's not free, but it doesn't
+% cost an arm and a leg either.\\
% In addition, if your user has a better-quality (maybe
% commercial) text-to-speech system, he/she can reconvert the text
% files him-/herself, equiping your document with a voice they
@@ -675,72 +635,71 @@
% \spelitem[Free for your audience]{
% In addition, the user of your audio-enabled document doesn't
% need to buy a license for text-to-speech software. Only a PDF-viewer
-% and standard audio-player program are required.}
+% and a standard audio-player program are required.}
% \spelitem[Math capable]{
-% Try some of the equations in this manuscript. We are quite
-% confident you'll be convinced fairly soon.}
+% Try some of the equations in this manuscript in
+% section~\ref{sec:demo}. We are quite confident you'll be
+% convinced fairly soon.}
% \end{description}
%
% \section{Installation}
%
% \subsection{The \spelatex{} package}
-% \begin{spelchunk}
+% \<<<{
% If you are a package manager then you'll know how to
% prepare an installation package for \spelatex.
-% \end{spelchunk}
+% }
%
-% \begin{spelchunk}
-% If you are a normal user then you have two options. First,
-% check if there is a package that your favorite \LaTeX{}
-% distributor has prepared for you. Most of the major distributions
-% (like e.g. \TexLive{} or \MikTeX{}) do so.\\
-% Second, grab the TDS package
-% from \CTAN{} \cite{CTAN} (spel.TDS.zip) and unzip it somewhere in your
-% own TDS tree, regenerate your filename database and off you go.
-% In any case, make sure that \LaTeX{} finds the file |spel.sty|.
-% \end{spelchunk}
+% \<<<{
+% If you are a normal user, check if there is a package that your
+% favorite \LaTeX{} distributor has prepared for you. Most of the
+% major distributions (like e.g. \TexLive{} or \MikTeX{}) do so.\\
+% The fallback option is to grab the |spelatex.sty| file from CTAN
+% and put it in our \TeX{} search path.
+% }
%
-% \begin{spelchunk}
+% \<<<{
% The \spelatex{} package uses a number of auxiliary packages, fetch them
% from \CTAN{} \cite{CTAN} if your \TeX{} distributor does not provide
-% them. The ones used are: |expl3|, |hyperref|, |ifthen|,
-% |fancyvrb|, |newfile|, |rotating|, |babel|, |kvoptions|.
-% \end{spelchunk}
+% them. The ones used are: |expl3|, |hyperref|, |xcolor|, |ifthen|, |verbatim|,
+% |fancyvrb|, |newfile|, |rotating|, |babel|, |kvoptions| and |xkeyval|.
+% }
%
% \subsection{The \spelpl{} speech generator}
%
% \subsubsection{The script}
-% \begin{spelchunk}
+% \<<<{
% You can install the wizard assuming you have a working Perl
% interpreter installed. Assuming you're on \GNU/Linux or MAC, you
% should be able to find an installation package using the package
% manager for your distribution. If you are on MS-Windows, look for
% Strawberry perl or ActiveState perl.
-% \end{spelchunk}
+% }
%
-% \begin{spelchunk}
+% \<<<{
% The only thing to do is to install the |SpeL::Wizard|
% module. You can do this with the perl pacakge manager for your
% interpreter.
-% \end{spelchunk}
+% }
%
-% \begin{spelchunk}
+% \<<<{
% Open a terminal or command window, and then enter on the
% command line (the dollar represents your prompt):
-% \end{spelchunk}
+% }
%
-% \begin{spelchunk}
+% \<<<{
% On \GNU/Linux and MAC: |$ cpanm SpeL::Wizard|\\
-% On Strawberry perl: |$ cpan SpeL::Wizard|\\
-% On ActiveState perl: |$ ppm install SpeL-Wizard|
-% \end{spelchunk}
+% For Strawberry perl: |$ cpan SpeL::Wizard|\\
+% For ActiveState perl: |$ ppm install SpeL-Wizard|
+% }
%
-% \begin{spelchunk}
+% \<<<{
% The script \spelpl{} will be installed on your system. Make sure
% it is on your search path.
-% \end{spelchunk}
+% }
%
% \subsubsection{The configuration file}
+%
% \begin{spelchunk}
% Finally, you need to provide \spelpl{} with an appropriate
% config-file, named |tts.conf| that sets up the text-to-speech conversion.
@@ -773,12 +732,12 @@
% \end{Verbatim}
% \end{spelchunk}
%
-% \begin{spelchunk}
+% \<<<{
% The tts configuration parameter defines the speech engine to use.
% The languagetags section defines how the babel languages are mapped to
% internationalization codes (also known as locales).
% The voices section specifies what voice to use for a specific language.
-% \end{spelchunk}
+% }
%
% \begin{spelchunk}
% An environment variable can specify where your config file is
@@ -789,12 +748,12 @@
% \end{spelchunk}
% \begin{spelchunk}
% If that variable is not set, the script will look in a subdirectory
-% |.spel_wizard| of your home-folder (or |%userprofile%| in
+% |.spel_wizard| of your home-folder (or |%userprofile%| on
% MS-Windows), or it will take the default that came with the
% |SpeL::Wizard| module.
% \end{spelchunk}
%
-% \begin{spelchunk}
+% \<<<{
% Be aware that you need to install your text-to-speech tool yourself
% according to the documentation provided by the tool provider.
% In addition, make sure it the executable is in your search path. In
@@ -802,79 +761,78 @@
% will need to get an account on their cloud platform and setup
% credentials and whatever is needed to get going. Providing
% assistance for this is beyond the aim of this manual.
-% \end{spelchunk}
+% }
%
% \subsection{The PDF viewer}
%
-% \begin{spelchunk}
-% You need to make sure you have a PDF-viewer that supports links
-% containing 'run' tags. E.g., xpdf \cite{XPDF} does not, evince
-% \cite{EVINCE} complains about security risks, but okular
-% \cite{OKULAR} and Adobe Reader \cite{ADOBEREADER} do. So does
-% PDF-XChange Viewer \cite{PDFXCHANGE}.
-% \end{spelchunk}
+% \<<<{
+% You need to make sure you have a PDF-viewer that supports file links
+% E.g., xpdf \cite{XPDF} does not, but evince \cite{EVINCE}, okular
+% \cite{OKULAR} and Adobe Reader \cite{ADOBEREADER} do.
+% }
%
% \subsection{The media player}
-% \begin{spelchunk}
+% \<<<{
% When clicking a \spelatex-enabled item in your PDF-file, your media
% player is started to play the |.ogg| or |.m3u|-file. On GNU/Linux
% most media players work fine (SoX, totem, vlc, \ldots).
-% \end{spelchunk}
+% }
%
-% \begin{spelchunk}
+% \<<<{
% On windows, we recommend using vlc. It works out of the box.
% When usign the stock Windows Media Player, you will need to add
% every folder that contains a PDF you'd like to have read, to your
% Media Player library. Search the internet to find instructions on
% that and be prepared: in line with Microsoft's standard practice it
% is well hidden in the interface.
-% \end{spelchunk}
+% }
+%
+% \<<<{
+% If you gave the |server| option to the \spelatex{} package, then your
+% favorite webbrowser will be started to download and play the file.
+% If you move it out of your way, you can avoid that it jumps in front of
+% your text every time again.
+% }
%
% \section{Usage}
%
% \subsection{Preparing your document source}
% \begin{spelchunk}
% Using the \spelatex{} package is very simple. Just load the package's
-% style file using an appropriate |\usepackage{spel}|.
+% style file using an appropriate |\usepackage{spelatex}|.
% \end{spelchunk}
%
-% \begin{spelchunk}
-% In case you are not using Org-mode, there are $5$ things to do:
-% \end{spelchunk}
+% \<<<{
+% There are $5$ things to do:
+% }
% \begin{enumerate}
-% \spelitem{Treat the defunct implicit spelchunks}
-% \spelitem{Treat the explicit spelchunks}
-% \spelitem{Manually provide text to read when needed}
+% \spelitem{Treat the defunct implicit spelchunks.}
+% \spelitem{Treat the explicit spelchunks.}
+% \spelitem{Manually provide text to read when needed.}
% \spelitem{Provide audiodescriptions or preprocessing instructions
-% for your typesetting macros}
+% for your typesetting macros.}
% \spelitem{Provide audiodescriptions or preprocessing instructions
-% for your typesetting environments}
+% for your typesetting environments.}
% \end{enumerate}
%
-% \begin{spelchunk}
-% Steps 1 and 2 can be done automatically for you by using Org-mode in
-% Emacs and using the proper |spel| exporter.
-% Steps 3, 4 and 5 are up to you. In this section, we assume you are
-% executing all 5 steps manually and therefore, we will explain all
-% required macros.
-% \end{spelchunk}
+% We will now explain all required macros.
%
% \subsubsection{Treat the implicit spelchunks}
-% \begin{spelchunk}
+% \<<<{
% The texts of chapter, (sub)section titles, a.s.o. will be formatted
% automatically such that they are hyperlinked to the appropriate
% audio file. Therefore, this step was not mentioned above. It is done
% automatically for you by using the \spelatex{} package.
-% \end{spelchunk}
+% }
%
-% \begin{spelchunk}
+% \<<<{
% You only need to cover your \emph{defunct implicit spelchunks}:\\
% \DescribeMacro{\spelitem}
% Use this macro instead of the \texttt{\textbackslash{}item} macro to make
% sure your list environments are converted to speech chunks
% appropriately.
-% \end{spelchunk}
+% }
%
% \begin{spelchunk}
% Example:
@@ -897,35 +855,36 @@
% \spelitem[orange]{an orange round fruit}
% \end{description}
% \end{Verbatim}
-% Note that the spel exporter in Org-mode takes care of all this
-% boilerplate work.
% \end{spelchunk}
%
% \subsubsection{Treat the explicit spelchunks}
-%
-% \begin{spelchunk}
+% \label{sec:explicitspelchunks}
+% \<<<{
% \DescribeEnv{spelchunk}
% Use this environment to embed the chunks of text in that you want
% to generate audio for. In case the content is an equation, a
% figure or a table, we recommend specifying |arealink| as the
% optional argument to the |spelchunk| environment. It makes the
% entire equation an active hyperlink.
-% \end{spelchunk}
+% Note that you cannot specify an |arealink| when the area to be covered is
+% vertical-mode object. In common language: put your |arealink| |spelchunk|
+% environments inside a |center| environment and not the other way around.
+% }
%
-% \begin{spelchunk}
+% \<<<{
% Example:\\
-% {\footnotesize (note: the example below is not \spelatex{}-enabled because it
-% generates internal package problems)}
-% \end{spelchunk}
+% {\footnotesize (note: the example below is not \spelatex{}-enabled
+% in this manual because it generates internal package problems)}
+% }
% \begin{Verbatim}
% \begin{spelchunk}
-% An orderinary paragraph must be embedded in this environment.
+% An ordinary paragraph must be embedded in this environment.
% The same holds for equations! However, then we recommend using
% the |arealink| option, as that makes the full area of the
% equation clickable and avoids an empty white line before the
% equation.
% \end{spelchunk}
-% \begin{spelchunk}[arealink]
+% \begin{spelchunk[arealink]
% \begin{align}
% E &= m c^2\\
% e^{j\pi} &= -1
@@ -952,12 +911,12 @@
%
% \begin{spelchunk}
% Example:\\
-% {\footnotesize (note: the example below is not \spelatex{}-enabled because it
+% {\footnotesize (note: the example below is again not \spelatex{}-enabled because it
% generates internal package problems)}
% \end{spelchunk}
% \begin{Verbatim}
% \begin{spelchunk}
-% An orderinary paragraph must be embedded in this environment.
+% An ordinary paragraph must be embedded in this environment.
% \end{spelchunk}
% \begin{spelchunkad}
% Do not forget to embed ordinary paragraphs in this environment.
@@ -975,7 +934,7 @@
%
% \begin{spelchunk}
% Example:\\
-% {\footnotesize (note: the example below is not \spelatex{}-enabled because it
+% {\footnotesize (note: the example below is for a third time not \spelatex{}-enabled because it
% generates internal package problems)}
% \end{spelchunk}
% \begin{Verbatim}
@@ -989,6 +948,39 @@
% \end{spelchunkad}
% \end{Verbatim}
%
+% \subsubsection{Use the shorthand \texttt{\textbackslash <<<}-macro}
+%
+% \<<<{
+% \DescribeMacro{\<<<}
+% This macro takes the text to be read-out loud as an
+% argument. It is a shorthand for the |spelchunk|
+% environment. Options you would have given to the |spelchunk|
+% environment can be given as an optional argument to this macro.
+% }
+%
+% \<<<{
+% Retaking the example of section~\ref{sec:explicitspelchunks},
+% using the shorthand, we obtain:\\
+% {\footnotesize (note: the example below is once again not \spelatex{}-enabled
+% in this manual because it generates internal package problems)}
+% }
+% \begin{Verbatim}
+% \<<<{
+% An ordinary paragraph must be embedded in this macro.
+% The same holds for equations! However, then we recommend using
+% the |arealink| option, as that makes the full area of the
+% equation clickable and avoids an empty white line before the
+% equation.
+% }
+% \<<<[arealink]{
+% \begin{align}
+% E &= m c^2\\
+% e^{j\pi} &= -1
+% \end{align}
+% }
+% \end{Verbatim}
+%
+%
% \subsubsection{Provide descriptions for typesetting macros}
%
% \DescribeMacro{\spelmacad}
@@ -1127,13 +1119,13 @@
%
% \DescribeMacro{\setdesc}
% \begin{spelchunk}
-% This macro typesets an enumeration set and makes sure \spelpl{}
+% This macro typesets a definition set and makes sure \spelpl{}
% can read it properly.
% \end{spelchunk}
% \begin{spelchunk}
% \begin{Verbatim}
% \begin{equation}
-% P = \setdesc{ n \in N \mid n \text{~is prime} }
+% P = \setdesc{ n \in \mathbb{N} \mid n \text{~is prime} }
% \end{equation}
% \end{Verbatim}
% \end{spelchunk}
@@ -1181,10 +1173,13 @@
% \begin{VerbatimOut}[gobble=4]{Example/example.tex}
% \documentclass{article}
%
-% \usepackage[dutch,english]{babel} % load babel before spel to avoid
+% \usepackage[dutch,english]{babel} % load babel before spelatex to avoid
% % option clash!
% \selectlanguage{english}
-% \usepackage[format=ogg]{spelatex}
+% \usepackage[format=ogg,
+% server=https://ctan.org/tex-archive/macros/latex/contrib/spelatex/Example
+% ]
+% {spelatex}
%
% \newrobustcmd\CTAN{CTAN}
% \spelmacad{CTAN}{see-tan}
@@ -1193,7 +1188,7 @@
%
% \title{\spelatex{} Example}
% \author{Walter Daems and Paul Levrie}
-% \date{2011/04/12}
+% \date{2024/09/09}
% \setlength\parindent{0em}
% \setlength\parskip{1ex}
%
@@ -1203,10 +1198,10 @@
%
% \section{Introduction}
%
-% \begin{spelchunk}
-% This file is just a simple showcase of the features of \spelatex.
+% \<<<{
+% This file is just a simple showcase of the features of \spelatex{}.
% Below, you'll find examples of:
-% \end{spelchunk}
+% }
%
% \begin{itemize}
% \spelitem{a simple equation}
@@ -1215,20 +1210,25 @@
%
% \section{A simple equation}
% \label{eqn:simple}
-% \begin{spelchunk}
+% \<<<{
% Consider the following simple definition of a polynomial function and
% check its spoken version by clicking on it.
-% \end{spelchunk}
-% \begin{spelchunk}[arealink]
+% }
+% \<<<[arealink]{
% \begin{equation}
-% f(x) = x^{5}- x^4 + 7 x^3 + 3 x^2 - 8 x + 23
+% f(x) = x^{5}- x^4 + 7 x^3 + 3 x^2 - 8 x + 25
% \end{equation}
-% \end{spelchunk}
-% \begin{spelchunk}
+% }
+% \<<<{
% This seems a simple equation, however, it is not so straightforward
% for an automated reader, to read it correctly.
-% \end{spelchunk}
+% }
%
+% \section{Remark}
+% \<<<{
+% Instead of the \texttt{\textbackslash{}<<<} macro, one can also use the
+% spelchunk environment. We did this in the next sections.
+% }
% \section{A more complex equation}
% \newcommand\xx[2]{\ensuremath{#1_{#2}}}
% \spelmacad{xx}[2]{#1 #2}
@@ -1259,8 +1259,9 @@
% y-9+\frac{t^2}{4} = -\frac{4t}{4-t^2} \cdot (x-t)
% \]
% \end{spelchunk}
-
+%
% \selectlanguage{english}
+%
% \section{And some extras}
% \subsection{Citations}
% \begin{spelchunk}
@@ -1274,6 +1275,8 @@
% section~\ref{eqn:complex}.
% \end{spelchunk}
%
+% \selectlanguage{dutch}
+%
% \bibliographystyle{alpha}
%
% \begin{thebibliography}{99}
@@ -1292,10 +1295,11 @@
%
% \end{document}
% \end{VerbatimOut}
+% \footnotesize
% \VerbatimInput[frame=lines,numbers=left,gobble=0]{Example/example.tex}
-%
+% \normalsize
% \section{Demo}
-%
+% \label{sec:demo}
% \newcommand\rd[1]{\ensuremath{\mathrm{d}#1}}
% \spelmacad{rd}[1]{d of #1}
% \newcommand\xx[2]{\ensuremath{#1_{#2}}}
@@ -1369,14 +1373,14 @@
% \begin{spelchunk}
% Euler's identity:
% \end{spelchunk}
-% \begin{spelchunk}
+% \begin{spelchunk}[arealink]
% \begin{equation}
% e^{j \pi} + 1 = 0
% \end{equation}
% \end{spelchunk}
%
% \subsubsection{A rather well-known definite integral}
-% \begin{spelchunk}
+% \begin{spelchunk}[arealink]
% \begin{equation}
% \int_{-\infty}^\infty e^{-x^2}\,\rd{x} = \sqrt{\pi}
% \end{equation}
@@ -1391,7 +1395,7 @@
% \begin{spelchunk}[arealink]
% \begin{align}
% P &= \setenum{ 2, 3, 5, 7, 11, 13, \ldots }\\
-% P &= \setdesc{ n \in N \mid n \text{~is prime}}
+% P &= \setdesc{ n \in \mathbb{N} \mid n \text{~is prime}}
% \end{align}
% \end{spelchunk}
%
@@ -1429,43 +1433,44 @@
% \end{spelchunk}
% \begin{figure}[h]
% \setlength{\unitlength}{4mm}
-% \begin{spelchunk}
% \begin{center}
+% \begin{spelchunk}[arealink]
% \begin{picture}(24,2)
% \put(0,0.8){$x[n]$}
% \put(2,1){\vector(1,0){3}}
% \put(5,0){\framebox(5,2){$H(z)$}}
% \put(10,1){\vector(1,0){3}}
-% \put(13,0){\framebox(5,2){$G(z) \ast F(z)$}}
+% \put(13,0){\framebox(5,2){$G(z) \cdot F(z)$}}
% \put(18,1){\vector(1,0){3}}
% \put(22,0.8){$y[n]$}
% \end{picture}
+% \end{spelchunk}
% \end{center}
-% \end{spelchunk}
% \begin{spelchunkad}
% The discrete-time input signal x is fed through a filter H of
% z. The intermediate output signal of the filter H of z is fed into
-% another filter whose transfer function is the convolution of G of
-% z and F of z. This resuspel in the discrete-time output signal y.
+% another filter whose transfer function is the product of G of
+% z and F of z. This results in the discrete-time output signal y.
% \end{spelchunkad}
% \caption{A block diagram of the filter system}
% \label{fig:blockdiagram}
% \end{figure}
%
% \subsubsection{Tables}
-% \begin{spelchunk}
-% \begin{center}
+% \<<<{Tables can also be equiped with a sensible description:}
+% \begin{center}
+% \begin{spelchunk}[arealink]
% \begin{tabular}{lcc}
% Food & Sweet & Bitter \\
% \hline
-% apple & $\bullet$ & \\
+% apples & $\bullet$ & \\
% unsweetened coffee & & $\bullet$\\
% cake & $\bullet$ & \\
% chocolate & $\bullet$ & $\bullet$ \\
% \hline
% \end{tabular}
-% \end{center}
-% \end{spelchunk}
+% \end{spelchunk}
+% \end{center}
% \begin{spelchunkad}
% This table indicates the sweetness and bitterness for several food
% products.
@@ -1481,50 +1486,46 @@
% to $\tan \alpha = -\frac{t}{2}$, the equation of the reflected
% ray is given by
% \end{spelchunk}
-% \begin{spelchunk}
+% \begin{spelchunk}[arealink]
% \begin{equation}
% y-9+\frac{t^2}{4} = -\frac{4t}{4-t^2} \cdot (x-t)
% \end{equation}
% \end{spelchunk}
-%
% \begin{spelchunk}
% The $x$-coordinate of the point of intersection of the reflected ray
% with a fixed line $y=u$ satisfies:
% \end{spelchunk}
-% \begin{spelchunk}
+% \begin{spelchunk}[arealink]
% \begin{equation}
% u-9+\frac{t^2}{4} = -\frac{4t}{4-t^2} \cdot (x-t)
% \label{eqn:refray}
% \end{equation}
% \end{spelchunk}
-%
% \begin{spelchunk}
% We calculate the minimal value of this $x$ for varying $t$, by
% differentiating (\ref{eqn:refray}) with respect to $t$ and assuming
% that $\frac{\rd{x}}{\rd{t}}=0$:
% \end{spelchunk}
-% \begin{spelchunk}
+% \begin{spelchunk}[arealink]
% \[
% \frac{t}{2} = -\frac{4(4+t^2)}{(4-t^2)^2} (x-t) -
% \frac{4t}{4-t^2} \cdot (-1) \ \ \ \Leftrightarrow \ \ \ x=
% 3\frac{t}{2}-\frac{t^3}{8}
% \]
% \end{spelchunk}
-%
% \begin{spelchunk}
% Inserting in the equation containing $u$ gives us the relation
% between $t$ and $u$:
% \end{spelchunk}
-% \begin{spelchunk}
+% \begin{spelchunk}[arealink]
% \[
% u = 9- 3 \frac{t^2}{4}
% \]
% \end{spelchunk}
-%
-% \begin{spelchunk}
+%% \begin{spelchunk}
% This leads to a system of parametric equations for the caustic:
% \end{spelchunk}
-% \begin{spelchunk}
+% \begin{spelchunk}[arealink]
% \[
% \left\{\begin{array}{l}
% x = 3\frac{t}{2}-\frac{t^3}{8} \\[0.3cm]
@@ -1537,7 +1538,6 @@
% \end{array} \right.
% \]
% \end{spelchunk}
-%
% \begin{spelchunk}
% It is now easy to eliminate the parameter $t$. As you can see, $t
% = \frac{6 x}{y}$. Inserting into the equation for $y$ gives us the
@@ -1583,6 +1583,7 @@
\RequirePackage{hyperref}
\RequirePackage{xcolor}
\RequirePackage{ifthen}
+\RequirePackage{verbatim}
\RequirePackage{fancyvrb}
\RequirePackage{newfile}
\RequirePackage{rotating}
@@ -1602,7 +1603,6 @@
urlcolor=black}
\RequirePackage{kvoptions}
\RequirePackage{xkeyval}
-\RequirePackage{marginnote}
% \end{macrocode}
%
% \subsection{Options}
@@ -1613,9 +1613,10 @@
prefix=spel@
}
\DeclareStringOption[ogg]{format}
+\DeclareStringOption[local]{server}
+\DeclareStringOption[full]{markervisibility}
\DeclareBoolOption[false]{disabled}
\DeclareBoolOption[false]{extramath}
-\DeclareBoolOption[false]{propermath}
\ProcessKeyvalOptions*
% \end{macrocode}
%
@@ -1627,12 +1628,6 @@
\DeclareRobustCommand{\spelatex}{S\kern-0.3ex\raisebox{-0.1ex}{\rotatebox{-15}{p}}\kern-0.25ex\raisebox{0.1ex}{\rotatebox{10}{e}}\kern-0.1ex\LaTeX}
% \end{macrocode}
% \end{macro}
-% \begin{macro}{\spelbox}
-% This is the official \spelbox{} logo.
-% \begin{macrocode}
-\DeclareRobustCommand{\spelbox}{S\kern-0.3ex\raisebox{-0.1ex}{\rotatebox{-15}{p}}\kern-0.25ex\raisebox{0.1ex}{\rotatebox{10}{e}}\kern-0.1exLbo\raisebox{-0.2ex}{x}}
-% \end{macrocode}
-% \end{macro}
% \begin{macro}{\spelpl}
% This is the official \spelpl{} logo.
% \begin{macrocode}
@@ -1674,6 +1669,10 @@
\addtostream{spelidx}{format|\spel@format}
\addtostream{spelidx}{audiodir|\audiodir}
\addtostream{spelidx}{chunkdir|\chunkdir}
+\addtostream{spelidx}{server|\spel@server}
+\ExplSyntaxOn
+\newcommand\linksdir{\str_if_eq:VnTF{\spel@server}{local}{./\audiodir}{\spel@server/\audiodir}}
+\ExplSyntaxOff
% \end{macrocode}
%
% To ease writing to the speech index stream, we define a |\spelidxwrite|
@@ -1774,7 +1773,29 @@
\AddBabelHook{informspel}{write}{\spel@idxwrite{language}{\languagename}}
\EnableBabelHook{informspel}
% \end{macrocode}
-%
+%
+% \subsection{Setting up the visibility}
+%
+% \begin{macrocode}
+\ExplSyntaxOn
+\definecolor{faintgray}{rgb}{0.9,0.9,0.9}
+\str_if_eq:VnTF{\spel@markervisibility}{none}{
+ \colorlet{spel@color@right}{white}
+ \colorlet{spel@color@left}{white}
+}{}
+\str_if_eq:VnTF{\spel@markervisibility}{onlygroups}{
+ \colorlet{spel@color@right}{black!25}
+ \colorlet{spel@color@left}{white}
+}{}
+\str_if_eq:VnTF{\spel@markervisibility}{full}{
+ \colorlet{spel@color@right}{black!25}
+ \colorlet{spel@color@left}{black!25}
+}{}
+\ExplSyntaxOff
+% \end{macrocode}
+%
+%
+%
% \subsection{Generating speech chunks --- implicitly}
% \subsubsection{Auxiliary macros}
% We define a macro to generate wrappers for single-line text elements.
@@ -1789,7 +1810,7 @@
\expandafter\let\csname spel@@#1\expandafter\endcsname\csname #1\endcsname
\expandafter\gdef\csname #1\endcsname##1{%
\spel@chunkwrite{#1}{##1}
- \csname spel@@#1\endcsname{\href{run:\audiodir/#1.\spel@format}{##1}}
+ \csname spel@@#1\endcsname{\href{\linksdir/#1.\spel@format}{##1}}
}
\expandafter\AtBeginDocument{
\spel@idxwrite{#1}{#1}
@@ -1846,7 +1867,7 @@
\let\spel@@part\@part
\def\@part[#1]#2{%
\setcounter{spel@chunk}{0}% need this because counter resetting fails
- \spel@@part[#1]{\href{run:\audiodir/\spel@@optpart.\spel@format}{#2}}%
+ \spel@@part[#1]{\href{\linksdir/\spel@@optpart.\spel@format}{#2}}%
\spel@idxwrite{part \thepart}{\spel@@optpart}%
\spel@chunkwrite{\spel@@optpart}{#2}%
}
@@ -1863,7 +1884,7 @@
\stepcounter{spel@spart}%
\setcounter{spel@chunk}{0}% need this because counter resetting fails
\spel@@spart{%
- \href{run:\audiodir/\spel@@optpart star-\thespel@spart.\spel@format}{#1}}%
+ \href{\linksdir/\spel@@optpart star-\thespel@spart.\spel@format}{#1}}%
\spel@idxwrite{part}{\spel@@optpart star-\thespel@spart}%
\spel@chunkwrite{\spel@@optpart star-\thespel@spart}{#1}%
}
@@ -1881,7 +1902,7 @@
\def\@chapter[#1]#2{%
\setcounter{spel@chunk}{0}% need this because counter resetting fails
\spel@@chapter[#1]{%
- \href{run:\audiodir/\spel@@optpart\thechapter.\spel@format}{#2}}%
+ \href{\linksdir/\spel@@optpart\thechapter.\spel@format}{#2}}%
\spel@idxwrite{chapter \thechapter}{\spel@@optpart\thechapter}%
\spel@chunkwrite{\spel@@optpart\thechapter}{#2}%
}
@@ -1901,7 +1922,7 @@
\stepcounter{spel@schapter}%
\setcounter{spel@chunk}{0}% need this because counter resetting fails
\spel@@schapter{%
- \href{run:\audiodir/\spel@@optpart star-\thespel@schapter.\spel@format}{#1}}%
+ \href{\linksdir/\spel@@optpart star-\thespel@schapter.\spel@format}{#1}}%
\spel@idxwrite{chapter}{\spel@@optpart star-\thespel@schapter}%
\spel@chunkwrite{\spel@@optpart star-\thespel@schapter}{#1}%
}
@@ -1922,8 +1943,8 @@
\fi%
\setcounter{spel@chunk}{0}% need this because counter resetting fails
\spel@@sect{#1}{#2}{#3}{#4}{#5}{#6}[#7]{%
- \href{run:\audiodir/\spel@@optpart\thesubparagraph.\spel@format}{#8}\hfill%
- \href{run:\audiodir/\spel@@optpart\thesubparagraph.m3u}{\textcolor{black!25}{$\triangleright$}}}%
+ \href{\linksdir/\spel@@optpart\thesubparagraph.\spel@format}{#8}\hfill%
+ \href{\linksdir/\spel@@optpart\thesubparagraph.m3u}{\textcolor{spel@color@right}{$\triangleright$}}}%
\def\spel@@label{\ifnum #2>\c@secnumdepth\else#1 \csname the#1\endcsname\fi}
\spel@idxwrite{\spel@@label}{\spel@@optpart\thesubparagraph}%
\spel@chunkwrite{\spel@@optpart\thesubparagraph}{#8}%
@@ -1941,7 +1962,7 @@
\stepcounter{spel@ssect}%
%\setcounter{spel@chunk}{0}% need this because counter resetting fails
\spel@@ssect{#1}{#2}{#3}{#4}{%
- \href{run:\audiodir/\spel@@optpart\thesubparagraph-star-\thespel@ssect.\spel@format}%
+ \href{\linksdir/\spel@@optpart\thesubparagraph-star-\thespel@ssect.\spel@format}%
{#5}}%
\spel@idxwrite{section}{\spel@@optpart\thesubparagraph-star-\thespel@ssect}%
\spel@chunkwrite{\spel@@optpart\thesubparagraph-star-\thespel@ssect}{#5}%
@@ -1963,7 +1984,7 @@
\stepcounter{spel@footnote}%
\settowidth\spel@mptboxwidth{\usebox\spel@mptbox}%
\spel@@fntext{%
- \hspace*{-\spel@mptboxwidth}\href{run:\audiodir/footnote-\thespel@footnote.\spel@format}{\usebox\spel@mptbox}#1}%
+ \hspace*{-\spel@mptboxwidth}\href{\linksdir/footnote-\thespel@footnote.\spel@format}{\usebox\spel@mptbox}#1}%
\spel@idxwrite{footnote}{footnote-\thespel@footnote}%
\spel@chunkwrite{footnote-\thespel@footnote}{#1}%
}
@@ -2004,7 +2025,7 @@
\settowidth\spel@mptboxwidth{\usebox\spel@mptbox}%
\spel@idxwrite{item}{\spel@@optpart\thesubparagraph-\thespel@chunk}%
\spel@chunkwrite{\spel@@optpart\thesubparagraph-\thespel@chunk}{#1}%
- \item \hspace*{-\spel@mptboxwidth}\href{run:\audiodir/\spel@@optpart\thesubparagraph-\thespel@chunk.\spel@format}{\usebox\spel@mptbox}#1}
+ \item \hspace*{-\spel@mptboxwidth}\href{\linksdir/\spel@@optpart\thesubparagraph-\thespel@chunk.\spel@format}{\usebox\spel@mptbox}#1}
% \end{macrocode}
% \end{macro}
%
@@ -2017,7 +2038,7 @@
\settowidth\spel@mptboxwidth{\usebox\spel@mptbox}%
\spel@idxwrite{item}{\spel@@optpart\thesubparagraph-\thespel@chunk}%
\spel@chunkwrite{\spel@@optpart\thesubparagraph-\thespel@chunk}{#1 . #2}%
-\item[#1] \hspace*{-\spel@mptboxwidth}\href{run:\audiodir/\spel@@optpart\thesubparagraph-\thespel@chunk.\spel@format}{\usebox\spel@mptbox}#2}
+\item[#1] \hspace*{-\spel@mptboxwidth}\href{\linksdir/\spel@@optpart\thesubparagraph-\thespel@chunk.\spel@format}{\usebox\spel@mptbox}#2}
% \end{macrocode}
% \end{macro}
%
@@ -2031,7 +2052,7 @@
\stepcounter{spel@chunk}%
\spel@idxwrite{caption}{\spel@@optpart\thesubparagraph-\thespel@chunk}%
\spel@chunkwrite{\spel@@optpart\thesubparagraph-\thespel@chunk}{#2}%
- \spel@@caption[#1]{\protect\href{run:\audiodir/\spel@@optpart\thesubparagraph-\thespel@chunk.\spel@format}{#2}}
+ \spel@@caption[#1]{\protect\href{\linksdir/\spel@@optpart\thesubparagraph-\thespel@chunk.\spel@format}{#2}}
}
\fi
% \end{macrocode}
@@ -2046,7 +2067,7 @@
% \begin{macrocode}
\newlength\spel@mptboxwidth
\newsavebox\spel@mptbox
-\savebox\spel@mptbox{\textcolor{black!25}{$\qquad$}}
+\savebox\spel@mptbox{\textcolor{spel@color@left}{\quad\strut\tiny\raisebox{0.4ex}{$\triangleright$}\,}}
\newif\ifspel@chunkarealink
\define@key{spelchunk}{arealink}[]{\spel@chunkarealinktrue}
\ifspel@disabled\def\spelchunk{}\else
@@ -2061,10 +2082,10 @@
\end{VerbatimOut}%
\catcode`\^^M=5\relax%
\ifspel@chunkarealink%
- \href{run:\audiodir/\spel@@optpart\thesubparagraph-\thespel@chunk.\spel@format}{\input{./\chunkdir/\spel@@optpart\thesubparagraph-\thespel@chunk}}%
+ \href{\linksdir/\spel@@optpart\thesubparagraph-\thespel@chunk.\spel@format}{\input{./\chunkdir/\spel@@optpart\thesubparagraph-\thespel@chunk}}%
\else%
\settowidth\spel@mptboxwidth{\usebox\spel@mptbox}%
- \hspace*{-\spel@mptboxwidth}\href{run:\audiodir/\spel@@optpart\thesubparagraph-\thespel@chunk.\spel@format}{\usebox\spel@mptbox}\input{./\chunkdir/\spel@@optpart\thesubparagraph-\thespel@chunk}%
+ \hspace*{-\spel@mptboxwidth}\href{\linksdir/\spel@@optpart\thesubparagraph-\thespel@chunk.\spel@format}{\usebox\spel@mptbox}\input{./\chunkdir/\spel@@optpart\thesubparagraph-\thespel@chunk}%
\fi%
\spel@chunkarealinkfalse%
}%
@@ -2092,6 +2113,47 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macrocode}
+\ExplSyntaxOn
+\NewDocumentCommand{\spelchunkatom}{O{}m}{
+ \stepcounter{spel@chunk}%
+ \spel@idxwrite{chunk}{\spel@@optpart\thesubparagraph-\thespel@chunk}%
+ \setkeys{spelchunk}{#1}
+ \scantokens{
+ \makeatletter
+ \begin{spelverbatimwrite}{\chunkdir/\spel@@optpart\thesubparagraph-\thespel@chunk.tex}
+ #2
+ \end{spelverbatimwrite}
+ \makeatother
+ }
+ \ifspel@chunkarealink%
+ \href{\linksdir/\spel@@optpart\thesubparagraph-\thespel@chunk.\spel@format}{\input{./\chunkdir/\spel@@optpart\thesubparagraph-\thespel@chunk}}%
+ \else%
+ \settowidth\spel@mptboxwidth{\usebox\spel@mptbox}%
+ \hspace*{-\spel@mptboxwidth}\href{\linksdir/\spel@@optpart\thesubparagraph-\thespel@chunk.\spel@format}{\usebox\spel@mptbox}\input{./\chunkdir/\spel@@optpart\thesubparagraph-\thespel@chunk}%
+ \fi%
+ \spel@chunkarealinkfalse%
+}
+
+\def\spelverbatimwrite#1{%
+ \@bsphack
+ \openoutputfile{#1}{chunk}%
+ \def\verbatim@processline{\addtostream{chunk}{\the\verbatim@line}}%
+ \let\do\@makeother\dospecials
+ \catcode`\^^M\active \catcode`\^^I=12
+ \verbatim@start}%
+\def\endspelverbatimwrite{%
+ \closeoutputstream{chunk}%
+ \@esphack%
+}
+\ifspel@disabled
+ \newcommand\<<<[2][]{#2}
+\else
+ \def\<<<{\spelchunkatom}
+\fi
+\ExplSyntaxOff
+% \end{macrocode}
+%
% \subsubsection{Explicit spelchunks}
%
% \begin{environment}{spelchunkad}
@@ -2117,6 +2179,7 @@
% \subsection{Helping the wizard to read our chunks}
%
% \subsubsection{Listing macros that are to be preprocessed}
+% \begin{macro}{\spelmacpp}
% Some \LaTeX{} or \TeX commands are only for layout purposes and are
% totally not content related. They do not contribute to what must be
% read. On the contrary, they make it hard for the \spelpl{} parser to
@@ -2130,7 +2193,6 @@
% oriented, it makes sense to provide a macro that registers them as
% pure type-setting macros and use that macro to cover the examples
% mentioned above.
-% \begin{macro}{\spelmacpp}
% \begin{macrocode}
\ExplSyntaxOn
\NewDocumentCommand{\spelmacpp}{moom}
@@ -2163,6 +2225,8 @@
\spelmacpp{textit}[1]{keep}
\spelmacpp{texttt}[1]{keep}
\spelmacpp{textbf}[1]{keep}
+\spelmacpp{mathbb}[1]{keep}
+\spelmacpp{mathcal}[1]{keep}
\spelmacpp{quad}{}
\spelmacpp{qquad}{}
\spelmacpp{displaystyle}{}
@@ -2179,6 +2243,7 @@
% \end{macrocode}
%
% \subsubsection{Listing environments that are to be ignored}
+% \begin{macro}{\spelenvpp}
% Some \LaTeX{} or \TeX environments are only for layout purposes and are
% totally not content related. They do not contribute to what must be
% read. On the contrary, they make it hard for the \spelpl{} parser to
@@ -2191,7 +2256,6 @@
% oriented, it makes sense to provide a macro that registers them as
% pure type-setting macros and use that macro to cover the examples
% mentioned above.
-% \begin{macro}{\spelenvpp}
% \begin{macrocode}
\ExplSyntaxOn
\NewDocumentCommand{\spelenvpp}{moom}
@@ -2240,7 +2304,6 @@
% ignored:
% \begin{macrocode}
\spelmacad{spelatex}{spee-lay-tech}
-\spelmacad{spelbox}{spel-box}
\spelmacad{spelpl}{spel wizzard dot pl}
\spelmacad{LaTeX}{lay-tech}
\spelmacad{TeX}{tech}
@@ -2335,7 +2398,7 @@
%
% \section{TODO}
% \begin{spelchunk}[arealink]
-% As long as there are things on my todo list, We have a reason to
+% As long as there are things on our todo list, we have a reason to
% live.
% \end{spelchunk}
% \begin{itemize}
@@ -2374,22 +2437,6 @@
% \newblock \url{https://www.winehq.org}
% \newblock online, accessed in June 2024.
%
-% \bibitem{ORGMODE}
-% Org Mode --- your life in plain text.
-% \newblock \url{https://orgmode.org/}.
-% \newblock online, accessed in May 2024.
-%
-% \bibitem{EMACS}
-% The Emacs An extensible, customizable, free text editor --- and
-% more.
-% \newblock \url{https://www.gnu.org/software/emacs/}.
-% \newblock online, accessed in May 2024.
-%
-% \bibitem{OXSPELATEX}
-% Org Mode SpeLaTeX Exporter --- SpeLaTeX made easy.
-% \newblock \url{https://www.melpa.org/#/ox-spelatex}
-% \newblock (not yet online)
-%
% \bibitem{SPEL}
% SpeL --- Speech-enabled \LaTeX.
% \newblock \url{https://ctan.org/pkg/spel}
@@ -2445,11 +2492,6 @@
% \newblock \url{https://okular.kde.org}.
% \newblock online, accessed in May 2024.
%
-% \bibitem{PDFXCHANGE}
-% PDF XChange Viewer, a PDF reader from Tracker Software.
-% \newblock \url{https://www.pdf-xchange.com/}
-% \newblock online, accessed in May 2024.
-%
% \end{thebibliography}
%
% \Finale
diff --git a/macros/latex/contrib/spelatex/spelatex.pdf b/macros/latex/contrib/spelatex/spelatex.pdf
index d68cae1950..498de5901e 100644
--- a/macros/latex/contrib/spelatex/spelatex.pdf
+++ b/macros/latex/contrib/spelatex/spelatex.pdf
Binary files differ
diff --git a/macros/latex/contrib/suanpan-l3/README.md b/macros/latex/contrib/suanpan-l3/README.md
new file mode 100644
index 0000000000..6a1df4e510
--- /dev/null
+++ b/macros/latex/contrib/suanpan-l3/README.md
@@ -0,0 +1,58 @@
+The traditional Chinese 7-bids suanpan(abacus) package based on l3draw
+=======
+
+The `suanpan-l3` package is a traditional Chinese 7-bids abacus drawing package that utilizes l3draw and TikZ and is developed with Expl3. It can effectively manage both upper and lower bids, while also considering bottom bid, top bid, and hanging bid.
+
+The `suanpan-l3` package offers a unique environment for drawing abacuses, denoted as `suanpan`. Within this environment, 8 specialized macros are available for the creation of abacuses. The `\rod` macro is used to lay out a single rod, while the `\rod*` macro draws a counting point on this rod's beam. The `\rods` macro is capable of laying out a set of rods. The `\bid` macro colors the specified bid. The `\bids` macro colors all inner bids that are near the beam, while the `\bids*` macro colors all outer bids that are far from the beam. The `\rodmark` mark the rod on beam. Lastly, the `\mkfame` macro is used to lay out the frame of an abacus.
+
+At the same time, the `suanpan-l3` package offers customization options for abacus, including line width, draw color, fill color, bid space, rod space, etc. These can be configured through package options, `suanpan` environment options, or `\suanpanset` macro.
+
+For further details and examples, please refer to the manual(in Chinese/English).
+
+Contributing
+------------
+
+1. gitee repository:
+ (1). repository: [suanpan](https://gitee.com/nwafu_nan/suan-pan)
+ (2). Issues and PR: [issue](https://gitee.com/nwafu_nan/suan-pan/issues) or [pull request](https://gitee.com/nwafu_nan/suan-pan/pulls).
+
+基于l3draw的中国传统7珠算盘LaTeX排版宏包
+=======
+
+`suanpan-l3`是一个基于l3draw和TikZ绘图宏包,用Expl3开发的中国传统7珠圆珠算盘排版宏包,它能够实现普通上珠、下珠和使用底珠、顶珠和悬珠的算盘排版。
+
+`suanpan-l3`宏包提供了唯一的一个`suanpan`排版环境用于绘制需要排版的算盘,在该环境中使用专用命令`\rod`排版一个档位,`\rod*`命令排版带计位点的档位,`\rods`命令排版一组档位,`\bid`命令为指定的算珠进行着色,`\bids`命令为指定档位的内珠进行着色,`\bids*`命令为指定的档位的外珠进行着色,`\rodmark`命令用于为档位横梁添加标记,`\mkframe`命令排版算盘边框。
+
+同时,`suanpan-l3`宏包还为算盘排版提供线宽、颜色、间距等**外观**设置选项,可以通过宏包选项、环境选项对其进行设置,也可以通过`\suanpanset`命令实现外观属性设置。
+
+可以通过阅读宏包手册以了解该宏包更多的使用细节和使用样例。
+
+## 参与贡献
+---------------------
+
+1. gitee仓库:
+ (1). 仓库地址: [suanpan](https://gitee.com/nwafu_nan/suan-pan)
+ (2). Issues and PR: [issue](https://gitee.com/nwafu_nan/suan-pan/issues) or [pull request](https://gitee.com/nwafu_nan/suan-pan/pulls).
+
+Copyright and Licence
+---------------------
+
+ Copyright (C) 2020-2024 by Nan Geng <nangeng@nwafu.edu.cn>
+ ----------------------------------------------------------------------
+
+ This work may be distributed and/or modified under the
+ conditions of the LaTeX Project Public License, either
+ version 1.3c of this license or (at your option) any later
+ version. This version of this license is in
+ http://www.latex-project.org/lppl/lppl-1-3c.txt
+ and 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 Nan Geng.
+
+ This package consists of suanpan-l3.sty, suanpan-l3.tex and README.md(this file),
+ and the derived files suanpan-l3.pdf with build.sh.
diff --git a/macros/latex/contrib/suanpan-l3/build.sh b/macros/latex/contrib/suanpan-l3/build.sh
new file mode 100755
index 0000000000..6747532dcd
--- /dev/null
+++ b/macros/latex/contrib/suanpan-l3/build.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+xelatex suanpan-l3.tex &&\
+makeindex -s gind.ist -o suanpan-l3.ind suanpan-l3.idx &&\
+makeindex -s gglo.ist -o suanpan-l3.gls suanpan-l3.glo &&\
+xelatex suanpan-l3.tex &&\
+xelatex suanpan-l3.tex &&\
+xelatex suanpan-l3.tex
diff --git a/macros/latex/contrib/suanpan-l3/suanpan-l3.pdf b/macros/latex/contrib/suanpan-l3/suanpan-l3.pdf
new file mode 100644
index 0000000000..f47e8edc2f
--- /dev/null
+++ b/macros/latex/contrib/suanpan-l3/suanpan-l3.pdf
Binary files differ
diff --git a/macros/latex/contrib/suanpan-l3/suanpan-l3.sty b/macros/latex/contrib/suanpan-l3/suanpan-l3.sty
new file mode 100644
index 0000000000..ac30c79d74
--- /dev/null
+++ b/macros/latex/contrib/suanpan-l3/suanpan-l3.sty
@@ -0,0 +1,1401 @@
+%%% ----------------------------------------------------------------------------
+%%% suanpan: draw suanpan(abacus) with LaTeX3
+%%% Author : Nan Geng <nangeng@nwafu.edu.cn>
+%%% Repository: https://gitee.com/nwafu_nan/suan-span
+%%% License : The LaTeX Project Public License 1.3c
+%%% ----------------------------------------------------------------------------
+
+\NeedsTeXFormat{LaTeX2e}[2020/10/01]
+\RequirePackage{expl3}
+% \ProvidesExplPackage{suanpan}{2024-08-20}{v1.0.0} % 初稿
+% \ProvidesExplPackage{suanpan}{2024-08-28}{v1.1.0} % 优化(统一尺寸计算,添加空白占位)
+% \ProvidesExplPackage{suanpan-l3}{2024-08-30}{v1.1.1} % 更名为suanpan-l3
+% \ProvidesExplPackage{suanpan-l3}{2024-08-31}{v1.1.2} % 添加empty不绘制空档选项
+% \ProvidesExplPackage{suanpan-l3}{2024-09-01}{v1.1.3} % 添加bid批处理及绘制颜色选项
+% % 将算珠与档杆绘制改为TikZ
+% \ProvidesExplPackage{suanpan-l3}{2024-09-04}{v1.2.0} % 添加\lab横梁文字标记命令
+% \ProvidesExplPackage{suanpan-l3}{2024-09-05}{v1.2.1} % 将草稿模式所有算珠改为圆冒
+% % 直线并取消所有高光特效
+\ProvidesExplPackage{suanpan-l3}{2024-09-07}{v1.2.2} % 为珠高、珠宽、档杆宽度和
+ % 边框宽度添加设置选项
+ {draw suanpan(abacus) with LaTeX3}
+
+\RequirePackage{l3keys2e}
+\RequirePackage{xparse}
+\RequirePackage{l3draw}
+
+\RequirePackage {tikz}
+
+\cs_new:Npn \__suanpan_error:n { \msg_error:nn { suanpan(abacus) } }
+
+% 盒子容器总高度计算函数
+\cs_new_nopar:Npn \__suanpan_coffin_ht_plus_dp:N #1
+ {
+ \coffin_ht:N #1 + \coffin_dp:N #1
+ }
+
+% =============颜色处理函数=============
+% 填充色辅助函数
+\cs_new_nopar:Nn \__suanpan_aux_color_boxfill:
+ { }
+
+% 颜色命名函数
+% #1 颜色名称
+% #2 颜色表达式
+\cs_set_nopar:Npn \__suanpan_color_select:nn #1#2
+ {
+ \colorlet { #1 } { #2 }
+ }
+\cs_generate_variant:Nn \__suanpan_color_select:nn {nx}
+
+% 颜色命名函数
+% #1 颜色名称
+% #2 颜色空间
+% #3 颜色分量值
+\cs_set_nopar:Npn \__suanpan_color_select:nnn #1#2#3
+ {
+ \definecolor { #1 } { #2 } { #3 }
+ }
+\cs_generate_variant:Nn \__suanpan_color_select:nnn {nnx}
+
+% 定义变量
+% 算盘基础尺寸
+\dim_new:N \l__suanpan_bid_h_dim
+\dim_new:N \l__suanpan_bid_d_dim
+\dim_new:N \l__suanpan_rod_d_dim
+\dim_new:N \l__suanpan_frame_b_dim
+\dim_new:N \l__suanpan_bid_sep_dim
+\dim_new:N \l__suanpan_rod_sep_dim
+
+% 算盘基础尺寸初值(参考 QBT1747-1993 算盘标准)
+\dim_set:Nn \l__suanpan_bid_h_dim { 12mm }
+\dim_set:Nn \l__suanpan_bid_d_dim { 23mm }
+\dim_set:Nn \l__suanpan_rod_d_dim { 7mm }
+\dim_set:Nn \l__suanpan_frame_b_dim { 13mm }
+\dim_set:Nn \l__suanpan_bid_sep_dim { 1.8pt }
+\dim_set:Nn \l__suanpan_rod_sep_dim { 3.0pt }
+
+% 半长度
+\dim_new:N \l__suanpan_bid_h_half_dim
+\dim_new:N \l__suanpan_bid_d_half_dim
+\dim_new:N \l__suanpan_rod_d_half_dim
+\dim_new:N \l__suanpan_frame_b_half_dim
+
+% 上珠偏移
+\dim_new:N \l__suanpan_bid_upper_offset_dim
+% 下珠偏移
+\dim_new:N \l__suanpan_bid_lower_offset_dim
+% 上档杆长度
+\dim_new:N \l__suanpan_rod_upper_h_dim
+% 下档杆长度
+\dim_new:N \l__suanpan_rod_lower_h_dim
+% 上档杆偏移
+\dim_new:N \l__suanpan_rod_upper_offset_dim
+% 下档杆偏移
+\dim_new:N \l__suanpan_rod_lower_offset_dim
+% 上档杆位置
+\dim_new:N \l__suanpan_rod_upper_dim
+% 下档杆位置
+\dim_new:N \l__suanpan_rod_lower_dim
+% 上边框内线偏移
+\dim_new:N \l__suanpan_frame_upper_inner_offset_dim
+% 下边框内线偏移
+\dim_new:N \l__suanpan_frame_lower_inner_offset_dim
+% 上边框外线偏移
+\dim_new:N \l__suanpan_frame_upper_outer_offset_dim
+% 下边框外线偏移
+\dim_new:N \l__suanpan_frame_lower_outer_offset_dim
+% 算珠上边缘
+\dim_new:N \l__suanpan_bid_upper_dim
+% 算珠下边缘
+\dim_new:N \l__suanpan_bid_lower_dim
+% 算珠绘制高度
+\dim_new:N \l__suanpan_bid_draw_h_dim
+% 算珠绘制半高度
+\dim_new:N \l__suanpan_bid_draw_h_half_dim
+% 算珠圆角半径
+\dim_new:N \l__suanpan_bid_arc_dim
+% 横梁计位点半径
+\dim_new:N \l__suanpan_frame_unit_r_dim
+% 边框外线半宽度
+\dim_new:N \l__suanpan_frame_outer_half_dim
+% 档杆总成宽度
+\dim_new:N \l__suanpan_support_d_dim
+% 档杆总成半宽度
+\dim_new:N \l__suanpan_support_d_half_dim
+% 档杆总成组装垂直偏移
+\dim_new:N \l__suanpan_support_y_offset_dim
+
+% 上边框内线位置
+\dim_new:N \l__suanpan_frame_inner_upper_dim
+% 下边框内线位置
+\dim_new:N \l__suanpan_frame_inner_lower_dim
+
+% 边框内线高度
+\dim_new:N \l__suanpan_frame_inner_h_dim
+% 边框外线高度
+\dim_new:N \l__suanpan_frame_outer_h_dim
+
+\dim_new:N \l__suanpan_frame_inner_linewidth_dim
+\dim_new:N \l__suanpan_frame_outer_linewidth_dim
+\dim_new:N \l__suanpan_rod_linewidth_dim
+\dim_new:N \l__suanpan_bid_linewidth_dim
+
+% 状态变量
+\bool_new:N \l__suanpan_support_frame_bool
+\bool_set_true:N \l__suanpan_support_frame_bool
+\bool_new:N \l__suanpan_support_unit_bool
+\bool_set_false:N \l__suanpan_support_unit_bool
+\bool_new:N \l__suanpan_draft_bool
+\bool_new:N \l__suanpan_empty_rod_bool
+
+% 容器(盒子)
+\coffin_new:N \l__suanpan_inner_bid_coffin
+\coffin_new:N \l__suanpan_outer_bid_coffin
+\coffin_new:N \l__suanpan_float_bid_coffin
+\coffin_new:N \l__suanpan_support_coffin
+\coffin_new:N \l_tmpc_coffin
+\coffin_new:N \l_tmpd_coffin
+
+% 凭据表(Token)
+\tl_new:N \l__suanpan_bid_draw_color_tl
+\tl_new:N \l__suanpan_bid_fill_color_tl
+\tl_new:N \l__suanpan_scale_tl
+\tl_new:N \l__suanpan_mark_font_tl
+
+% 档位最大值
+\int_new:N \l__suanpan_rod_max_int
+\int_zero:N \l__suanpan_rod_max_int
+
+% 档位算珠位置列表
+\clist_new:N \l__suanpan_bids_pos_clist
+
+% 档位数字与算珠位置对照属性表常量(内珠和外珠)
+% {x, y}==>x: 算珠位置(1-11, 1-7---下珠,8-10---上珠,11---悬珠)
+% y: 算珠类型(0---外珠,1---内珠)
+\prop_const_from_keyval:Nn \l__suanpan_rods_val_prop
+ {
+ 0 = {{1, 0}, {2, 0}, {3, 0}, {4, 0}, {5, 0}, {9, 0}, {10, 0}},
+ 1 = {{1, 0}, {2, 0}, {3, 0}, {4, 0}, {7, 1}, {9, 0}, {10, 0}},
+ 2 = {{1, 0}, {2, 0}, {3, 0}, {6, 1}, {7, 1}, {9, 0}, {10, 0}},
+ 3 = {{1, 0}, {2, 0}, {5, 1}, {6, 1}, {7, 1}, {9, 0}, {10, 0}},
+ 4 = {{1, 0}, {4, 1}, {5, 1}, {6, 1}, {7, 1}, {9, 0}, {10, 0}},
+ 5 = {{1, 0}, {2, 0}, {3, 0}, {4, 0}, {5, 0}, {8, 1}, {10, 0}},
+ 6 = {{1, 0}, {2, 0}, {3, 0}, {4, 0}, {7, 1}, {8, 1}, {10, 0}},
+ 7 = {{1, 0}, {2, 0}, {3, 0}, {6, 1}, {7, 1}, {8, 1}, {10, 0}},
+ 8 = {{1, 0}, {2, 0}, {5, 1}, {6, 1}, {7, 1}, {8, 1}, {10, 0}},
+ 9 = {{1, 0}, {4, 1}, {5, 1}, {6, 1}, {7, 1}, {8, 1}, {10, 0}},
+ 10 = {{3, 1}, {4, 1}, {5, 1}, {6, 1}, {7, 1}, {8, 1}, {10, 0}},
+ 11 = {{1, 0}, {2, 0}, {3, 0}, {4, 0}, {7, 1}, {8, 1}, {9 , 1}},
+ 12 = {{1, 0}, {2, 0}, {3, 0}, {6, 1}, {7, 1}, {8, 1}, {9 , 1}},
+ 13 = {{1, 0}, {2, 0}, {5, 1}, {6, 1}, {7, 1}, {8, 1}, {9 , 1}},
+ 14 = {{1, 0}, {4, 1}, {5, 1}, {6, 1}, {7, 1}, {8, 1}, {9 , 1}},
+ 15 = {{3, 1}, {4, 1}, {5, 1}, {6, 1}, {7, 1}, {8, 1}, {9 , 1}},
+ 16 = {{1, 0}, {2, 0}, {3, 0}, {4, 0}, {7, 1}, {8, 1}, {11, 1}},
+ 17 = {{1, 0}, {2, 0}, {3, 0}, {6, 1}, {7, 1}, {8, 1}, {11, 1}},
+ 18 = {{1, 0}, {2, 0}, {5, 1}, {6, 1}, {7, 1}, {8, 1}, {11, 1}},
+ 19 = {{1, 0}, {4, 1}, {5, 1}, {6, 1}, {7, 1}, {8, 1}, {11, 1}},
+ 20 = {{3, 1}, {4, 1}, {5, 1}, {6, 1}, {7, 1}, {8, 1}, {11, 1}}
+ }
+
+% 尺寸计算函数
+\cs_new:Nn \__suanpan_dim_calc:
+ {
+ % 基础尺寸半长度
+ \dim_set:Nn \l__suanpan_bid_h_half_dim { \l__suanpan_bid_h_dim / 2 }
+ \dim_set:Nn \l__suanpan_bid_d_half_dim { \l__suanpan_bid_d_dim / 2 }
+ \dim_set:Nn \l__suanpan_rod_d_half_dim { \l__suanpan_rod_d_dim / 2 }
+ \dim_set:Nn \l__suanpan_frame_b_half_dim { \l__suanpan_frame_b_dim / 2 }
+ % 上珠偏移(8号算珠)
+ \dim_set:Nn \l__suanpan_bid_upper_offset_dim
+ { \l__suanpan_frame_b_half_dim + \l__suanpan_bid_h_half_dim }
+ % 下珠偏移(1号算珠)
+ \dim_set:Nn \l__suanpan_bid_lower_offset_dim
+ { -\l__suanpan_frame_b_half_dim - \l__suanpan_bid_h_dim * 7 +
+ \l__suanpan_bid_h_half_dim }
+ % 上档杆长度
+ \dim_set:Nn \l__suanpan_rod_upper_h_dim { \l__suanpan_bid_h_dim * 3 }
+ % 下档杆长度
+ \dim_set:Nn \l__suanpan_rod_lower_h_dim { \l__suanpan_bid_h_dim * 7 }
+ % 上档杆偏移
+ \dim_set:Nn \l__suanpan_rod_upper_offset_dim { \l__suanpan_frame_b_half_dim }
+ % 下档杆偏移
+ \dim_set:Nn \l__suanpan_rod_lower_offset_dim
+ { -\l__suanpan_frame_b_half_dim - \l__suanpan_rod_lower_h_dim }
+ % 上档杆位置
+ \dim_set:Nn \l__suanpan_rod_upper_dim
+ { \l__suanpan_rod_upper_offset_dim + \l__suanpan_rod_upper_h_dim }
+ % 下档杆位置
+ \dim_set:Nn \l__suanpan_rod_lower_dim { -\l__suanpan_frame_b_half_dim }
+
+ % 上边框内线偏移
+ \dim_set:Nn \l__suanpan_frame_upper_inner_offset_dim
+ { \l__suanpan_frame_b_half_dim + \l__suanpan_rod_upper_h_dim }
+ % 下边框内线偏移
+ \dim_set:Nn \l__suanpan_frame_lower_inner_offset_dim
+ { -\l__suanpan_frame_b_half_dim - \l__suanpan_rod_lower_h_dim }
+ % 上边框外线偏移
+ \dim_set:Nn \l__suanpan_frame_upper_outer_offset_dim
+ { \l__suanpan_frame_b_dim + \l__suanpan_frame_b_half_dim +
+ \l__suanpan_rod_upper_h_dim }
+ % 下边框外线偏移
+ \dim_set:Nn \l__suanpan_frame_lower_outer_offset_dim
+ { -\l__suanpan_frame_b_dim - \l__suanpan_frame_b_half_dim -
+ \l__suanpan_rod_lower_h_dim }
+
+ % 算珠上边缘
+ \dim_set:Nn \l__suanpan_bid_upper_dim
+ { \l__suanpan_bid_h_half_dim - \l__suanpan_bid_sep_dim / 2 }
+ % 算珠上边缘
+ \dim_set:Nn \l__suanpan_bid_lower_dim
+ { -\l__suanpan_bid_h_half_dim + \l__suanpan_bid_sep_dim / 2 }
+ % 算珠绘制高度
+ \dim_set:Nn \l__suanpan_bid_draw_h_dim
+ { \l__suanpan_bid_upper_dim - \l__suanpan_bid_lower_dim }
+ % 算珠绘制半高度
+ \dim_set:Nn \l__suanpan_bid_draw_h_half_dim
+ { \l__suanpan_bid_draw_h_dim / 2 }
+ % 算珠圆角半径
+ \dim_set:Nn \l__suanpan_bid_arc_dim
+ { \l__suanpan_bid_draw_h_half_dim - 1pt}
+
+ % 横梁计位点半径
+ \dim_set:Nn \l__suanpan_frame_unit_r_dim { \l__suanpan_frame_b_dim / 4 }
+
+ % 边框外线半宽度
+ \dim_set:Nn \l__suanpan_frame_outer_half_dim
+ { \l__suanpan_frame_outer_linewidth_dim / 2 }
+
+ % 档杆总成宽度
+ \dim_set:Nn \l__suanpan_support_d_dim
+ { \l__suanpan_bid_d_dim + \l__suanpan_rod_sep_dim }
+ % 档杆总成半宽度
+ \dim_set:Nn \l__suanpan_support_d_half_dim
+ { \l__suanpan_bid_d_half_dim + \l__suanpan_rod_sep_dim / 2 }
+
+ % 档杆总成组装垂直偏移
+ \dim_set:Nn \l__suanpan_support_y_offset_dim
+ { ( \l__suanpan_frame_upper_outer_offset_dim -
+ \l__suanpan_frame_lower_outer_offset_dim +
+ \l__suanpan_frame_outer_linewidth_dim ) / 2 -
+ \l__suanpan_frame_upper_outer_offset_dim -
+ \l__suanpan_frame_outer_half_dim
+ }
+
+ % 上边框内线位置
+ \dim_set:Nn \l__suanpan_frame_inner_upper_dim
+ { \l__suanpan_frame_upper_inner_offset_dim +
+ \l__suanpan_frame_inner_linewidth_dim / 2 }
+ % 下边框内线位置
+ \dim_set:Nn \l__suanpan_frame_inner_lower_dim
+ { \l__suanpan_frame_lower_inner_offset_dim -
+ \l__suanpan_frame_inner_linewidth_dim / 2 }
+
+ % 边框内线高度
+ \dim_set:Nn \l__suanpan_frame_inner_h_dim
+ { \l__suanpan_rod_upper_h_dim +
+ \l__suanpan_rod_lower_h_dim +
+ \l__suanpan_frame_b_dim }
+ % 边框外线高度
+ \dim_set:Nn \l__suanpan_frame_outer_h_dim
+ { \l__suanpan_rod_upper_h_dim +
+ \l__suanpan_rod_lower_h_dim +
+ \l__suanpan_frame_b_dim * 3 }
+ }
+
+% 选项处理
+% ============宏包选项=================
+\keys_define:nn { suanpan }
+ {
+ % 草稿模式
+ draft .choice:,
+ draft / true .code:n = {%
+ \bool_set_true:N \l__suanpan_draft_bool
+ \bool_set_false:N \l__suanpan_empty_rod_bool
+ },
+ draft / false .code:n = {%
+ \bool_set_false:N \l__suanpan_draft_bool
+ \bool_set_true:N \l__suanpan_empty_rod_bool
+ },
+ draft .default:n = true,
+ draft .initial:n = false,
+
+ % 是否绘制档的数值为0的空档算珠
+ empty .choice:,
+ empty / true .code:n = { \bool_set_true:N \l__suanpan_empty_rod_bool },
+ empty / false .code:n = { \bool_set_false:N \l__suanpan_empty_rod_bool },
+ empty .default:n = true,
+ empty .initial:n = true,
+
+ unknown .code:n = { \msg_error:nn { suanpan } { unknown-option } }
+ }
+
+% key_value选项设计
+\keys_define:nn { suanpan }
+ {
+ % 绘图线宽
+ linewd .code:n = { % 算盘边框内线线宽
+ \dim_set:Nn \l__suanpan_frame_inner_linewidth_dim {#1}
+ % 算盘边框外线线宽
+ \dim_set:Nn \l__suanpan_frame_outer_linewidth_dim
+ {
+ \fp_to_dim:n
+ {
+ \fp_eval:n {%
+ \l__suanpan_frame_inner_linewidth_dim * 7.0 }
+ }
+ }
+ % 档杆线宽
+ \dim_set:Nn \l__suanpan_rod_linewidth_dim
+ {
+ \fp_to_dim:n
+ {
+ \fp_eval:n {%
+ \l__suanpan_frame_inner_linewidth_dim * 0.2 }
+ }
+ }
+ % 算珠线宽
+ \dim_set:Nn \l__suanpan_bid_linewidth_dim
+ {
+ \fp_to_dim:n
+ {
+ \fp_eval:n {%
+ \l__suanpan_frame_inner_linewidth_dim * 0.2 }
+ }
+ }
+ % 计算其它尺寸
+ \__suanpan_dim_calc:
+ },
+ linewd .initial:n = 2.0pt,
+
+ % 算珠高度
+ bidh .code:n = {%
+ \dim_set:Nn \l__suanpan_bid_h_dim { #1 }
+ % 计算其它尺寸
+ \__suanpan_dim_calc:
+ },
+ bidh .initial:n = 12mm,
+
+ % 算珠直径
+ bidd .code:n = {%
+ \dim_set:Nn \l__suanpan_bid_d_dim { #1 }
+ % 计算其它尺寸
+ \__suanpan_dim_calc:
+ },
+ bidd .initial:n = 23mm,
+
+ % 档杆直径(应小于算珠直径bidd)
+ rodd .code:n = {%
+ \dim_set:Nn \l__suanpan_rod_d_dim { #1 }
+ % 计算其它尺寸
+ \__suanpan_dim_calc:
+ },
+ rodd .initial:n = 7mm,
+
+ % 边框宽度
+ framew .code:n = {%
+ \dim_set:Nn \l__suanpan_frame_b_dim { #1 }
+ % 计算其它尺寸
+ \__suanpan_dim_calc:
+ },
+ framew .initial:n = 13mm,
+
+ % 档间间距
+ rodsep .code:n = {%
+ \dim_set:Nn \l__suanpan_rod_sep_dim { #1 }
+ % 计算其它尺寸
+ \__suanpan_dim_calc:
+ },
+ rodsep .initial:n = 3.0pt,
+
+ % 算珠间距
+ bidsep .code:n = {%
+ \dim_set:Nn \l__suanpan_bid_sep_dim { #1 }
+ % 计算其它尺寸
+ \__suanpan_dim_calc:
+ },
+ bidsep .initial:n = 0.0pt,
+
+ % 缩放参数
+ scale .tl_set:N = \l__suanpan_scale_tl,
+ scale .initial:n = 1.0,
+
+ % 边框绘图颜色
+ framedraw .code:n = { \__suanpan_color_select:nn { framecolor } {#1} },
+ framedraw .initial:n = black,
+ framedraw* .code:n = { \__suanpan_color_select:nnn { framecolor } #1 },
+
+ % 档杆绘图颜色
+ roddraw .code:n = { \__suanpan_color_select:nn { roddrawcolor } {#1} },
+ roddraw .initial:n = black,
+ roddraw* .code:n = { \__suanpan_color_select:nnn { roddrawcolor } #1 },
+ % 档杆填充颜色
+ rodfill .code:n = { \__suanpan_color_select:nn { rodfillcolor } {#1} },
+ rodfill .initial:n = black!20,
+ rodfill* .code:n = { \__suanpan_color_select:nnn { rodfillcolor } #1 },
+
+ % 外珠绘图颜色
+ outerdraw .code:n = { \__suanpan_color_select:nn { outerdrawcolor } {#1} },
+ outerdraw .initial:n = black,
+ outerdraw* .code:n = { \__suanpan_color_select:nnn { outerdrawcolor } #1 },
+ % 外珠填充颜色
+ outerfill .code:n = { \__suanpan_color_select:nn { outerfillcolor } {#1} },
+ outerfill .initial:n = black!40,
+ outerfill* .code:n = { \__suanpan_color_select:nnn { outerfillcolor } #1 },
+
+ % 内珠绘图颜色
+ innerdraw .code:n = { \__suanpan_color_select:nn { innerdrawcolor } {#1} },
+ innerdraw .initial:n = black,
+ innerdraw* .code:n = { \__suanpan_color_select:nnn { innerdrawcolor } #1 },
+ % 内珠填充颜色
+ innerfill .code:n = { \__suanpan_color_select:nn { innerfillcolor } {#1} },
+ innerfill .initial:n = black,
+ innerfill* .code:n = { \__suanpan_color_select:nnn { innerfillcolor } #1 },
+ innerfill .initial:n = black,
+
+ % 横梁标记字符格式
+ font .code:n = {%
+ \tl_gset:Nn \l__suanpan_mark_font_tl {#1}
+ },
+ font .initial:n = \bfseries\Large,
+
+ unknown .code:n = { \msg_error:nn { suanpan } { unknown-option } }
+ }
+
+% 出错输出信息
+\msg_new:nnn { suanpan } { unknown-option }
+ { package~ option~ "\l_keys_key_tl"~ is~ unknown. }
+
+% 选项默认值
+\keys_set:nn { suanpan }
+ {
+ linewd = 2.0pt,
+ rodsep = 3.0pt,
+ bidsep = 1.8pt,
+ scale = 1.0,
+ empty = true,
+ }
+
+% 将文档类选项传给suanpan
+\ProcessKeysOptions { suanpan }
+
+% 构建内珠(靠近横梁,参与计数)容器(盒子)
+\cs_new:Nn \__suanpan_inner_bid_construct:
+ {
+ \dim_set:Nn \l_tmpa_dim
+ { \l__suanpan_bid_d_half_dim - \l__suanpan_bid_draw_h_half_dim }
+
+ \tikzset{bid/.style = {% 内珠高光填充样式
+ inner~color = innerfillcolor!30,
+ outer~color = innerfillcolor,
+ draw = innerdrawcolor,
+ line~width = \l__suanpan_bid_linewidth_dim,
+ rounded~corners = \l__suanpan_bid_arc_dim,
+ },
+ draftline/.style = {% 内珠草稿模式绘制样式
+ draw = innerfillcolor,
+ line~cap = round,% 圆角线冒
+ line~width = \l__suanpan_bid_draw_h_dim,
+ }
+ }
+
+ \group_begin:
+ \hcoffin_gset:Nn \l__suanpan_inner_bid_coffin
+ {
+ % 判断是否为草稿模式
+ \bool_if:NTF \l__suanpan_draft_bool
+ {
+ \begin{tikzpicture}
+ \draw[draftline]
+ ( -\l_tmpa_dim, 0) -- ( \l_tmpa_dim, 0);
+ \end{tikzpicture}
+ }{
+ \begin{tikzpicture}
+ \shadedraw[bid]
+ ( -\l__suanpan_bid_d_half_dim, \l__suanpan_bid_lower_dim)
+ rectangle
+ ( \l__suanpan_bid_d_half_dim, \l__suanpan_bid_upper_dim);
+ \end{tikzpicture}
+ }
+ }
+ \group_end:
+ }
+
+% 构建外珠(远离横梁,不参与计数)容器(盒子)
+\cs_new:Nn \__suanpan_outer_bid_construct:
+ {
+ \dim_set:Nn \l_tmpa_dim
+ { \l__suanpan_bid_d_half_dim - \l__suanpan_bid_draw_h_half_dim }
+
+ \tikzset{bid/.style ={
+ inner~color = outerfillcolor!30,
+ outer~color = outerfillcolor,
+ draw = outerdrawcolor,
+ line~width = \l__suanpan_bid_linewidth_dim,
+ rounded~corners = \l__suanpan_bid_arc_dim,
+ },
+ draftline/.style = {
+ draw = outerfillcolor,
+ line~cap = round,
+ line~width = \l__suanpan_bid_draw_h_dim,
+ }
+ }
+
+ \group_begin:
+ \hcoffin_gset:Nn \l__suanpan_outer_bid_coffin
+ {
+ % 判断是否为草稿模式
+ \bool_if:NTF \l__suanpan_draft_bool
+ {
+ \begin{tikzpicture}
+ \draw[draftline]
+ ( -\l_tmpa_dim, 0) -- ( \l_tmpa_dim, 0 );
+ \end{tikzpicture}
+ }{
+ \begin{tikzpicture}
+ \shadedraw[bid]%
+ ( -\l__suanpan_bid_d_half_dim, \l__suanpan_bid_lower_dim)
+ rectangle
+ ( \l__suanpan_bid_d_half_dim, \l__suanpan_bid_upper_dim);
+ \end{tikzpicture}
+ }
+ }
+ \group_end:
+ }
+
+% 构建浮珠容器(盒子)
+% 浮珠指可以在算盘中任意布置的算珠
+% #1 绘制颜色
+% #2 填充颜色
+\cs_new:Npn \__suanpan_float_bid_construct:nn #1#2
+ {
+ \dim_set:Nn \l_tmpa_dim
+ { \l__suanpan_bid_d_half_dim - \l__suanpan_bid_draw_h_half_dim }
+
+ \tikzset{bid/.style ={
+ line~width = \l__suanpan_bid_linewidth_dim,
+ rounded~corners = \l__suanpan_bid_arc_dim,
+ },
+ draftline/.style = {
+ line~cap = round,
+ line~width = \l__suanpan_bid_draw_h_dim,
+ }
+ }
+
+ \group_begin:
+ \hcoffin_gset:Nn \l__suanpan_float_bid_coffin
+ {
+ % 判断是否为草稿模式
+ \bool_if:NTF \l__suanpan_draft_bool
+ {
+ \begin{tikzpicture}
+ \draw[draw=#2, draftline]
+ ( -\l_tmpa_dim, 0) -- ( \l_tmpa_dim, 0 );
+ \end{tikzpicture}
+ }{
+ \begin{tikzpicture}
+ \shadedraw[draw = #1,
+ inner~color=#2!30,
+ outer~color=#2,
+ bid]%
+ ( -\l__suanpan_bid_d_half_dim, \l__suanpan_bid_lower_dim)
+ rectangle
+ ( \l__suanpan_bid_d_half_dim, \l__suanpan_bid_upper_dim);
+ \end{tikzpicture}
+ }
+ }
+ \group_end:
+ }
+
+% 构建档杆容器(盒子)
+\cs_new:Nn \__suanpan_support_construct:
+ {
+ % TikZ绘图样式
+ \tikzset{%
+ rod/.style = {% 档杆
+ inner~color = rodfillcolor!30,
+ outer~color = rodfillcolor,
+ draw = roddrawcolor,
+ line~width = \l__suanpan_rod_linewidth_dim,
+ },
+ beam/.style = {% 横梁
+ bottom~color = framecolor!60,
+ top~color = framecolor!60,
+ middle~color = framecolor!5,
+ },
+ frame/.style = {% 上下梁
+ bottom~color = framecolor!95,
+ top~color = framecolor!95,
+ middle~color = framecolor!15,
+ },
+ rodline/.style = {% 档杆边线
+ draw = roddrawcolor,
+ line~width = \l__suanpan_rod_linewidth_dim,
+ },
+ frameinner/.style = {% 内边框线
+ draw = framecolor,
+ line~width = \l__suanpan_frame_inner_linewidth_dim,
+ },
+ frameouter/.style = {% 外边框线
+ draw = framecolor,
+ line~width = \l__suanpan_frame_outer_linewidth_dim,
+ },
+ }
+
+ \group_begin:
+ \hcoffin_gset:Nn \l__suanpan_support_coffin
+ {
+ % 判断是否为草稿模式
+ \bool_if:NTF \l__suanpan_draft_bool
+ {
+ \begin{tikzpicture}
+ % 绘制下杆
+ \draw[rodline]
+ ( -\l__suanpan_rod_d_half_dim, \l__suanpan_rod_lower_offset_dim )
+ rectangle
+ ( \l__suanpan_rod_d_half_dim, \l__suanpan_rod_lower_dim );
+ % 绘制上杆
+ \draw[rodline]
+ ( -\l__suanpan_rod_d_half_dim, \l__suanpan_rod_upper_offset_dim )
+ rectangle
+ ( \l__suanpan_rod_d_half_dim, \l__suanpan_rod_upper_dim );
+
+ % 绘制横梁
+ \draw[frameinner]
+ ( -\l__suanpan_support_d_half_dim, \l__suanpan_frame_b_half_dim )
+ --
+ ( \l__suanpan_support_d_half_dim, \l__suanpan_frame_b_half_dim );
+ \draw[frameinner]
+ ( -\l__suanpan_support_d_half_dim, -\l__suanpan_frame_b_half_dim )
+ --
+ ( \l__suanpan_support_d_half_dim, -\l__suanpan_frame_b_half_dim );
+
+ % 绘制上梁下边线
+ \draw[frameinner]
+ ( -\l__suanpan_support_d_half_dim,
+ \l__suanpan_frame_upper_inner_offset_dim )
+ --
+ ( \l__suanpan_support_d_half_dim,
+ \l__suanpan_frame_upper_inner_offset_dim );
+ % 绘制上梁上边线
+ \draw[frameouter]
+ ( -\l__suanpan_support_d_half_dim,
+ \l__suanpan_frame_upper_outer_offset_dim -
+ \l__suanpan_frame_outer_linewidth_dim / 2)
+ --
+ ( \l__suanpan_support_d_half_dim,
+ \l__suanpan_frame_upper_outer_offset_dim -
+ \l__suanpan_frame_outer_linewidth_dim / 2);
+
+ % 绘制下梁上边线
+ \draw[frameinner]
+ ( -\l__suanpan_support_d_half_dim,
+ \l__suanpan_frame_lower_inner_offset_dim )
+ --
+ ( \l__suanpan_support_d_half_dim,
+ \l__suanpan_frame_lower_inner_offset_dim );
+ % 绘制下梁下边线
+ \draw[frameouter]
+ ( -\l__suanpan_support_d_half_dim,
+ \l__suanpan_frame_lower_outer_offset_dim +
+ \l__suanpan_frame_outer_linewidth_dim / 2 )
+ --
+ ( \l__suanpan_support_d_half_dim,
+ \l__suanpan_frame_lower_outer_offset_dim +
+ \l__suanpan_frame_outer_linewidth_dim / 2 );
+
+ % 绘制计位点(黑色圆点)
+ \bool_if:NT \l__suanpan_support_unit_bool
+ {
+ \fill[%
+ fill=black,
+ ] (0pt, 0pt) circle
+ [radius = \l__suanpan_frame_unit_r_dim];
+ }
+ \end{tikzpicture}
+ }{
+ \begin{tikzpicture}
+ % 绘制下杆
+ \shadedraw[rod]
+ ( -\l__suanpan_rod_d_half_dim, \l__suanpan_rod_lower_offset_dim )
+ rectangle
+ ( \l__suanpan_rod_d_half_dim, \l__suanpan_rod_lower_dim );
+ % 绘制上杆
+ \shadedraw[rod]
+ ( -\l__suanpan_rod_d_half_dim, \l__suanpan_rod_upper_offset_dim )
+ rectangle
+ ( \l__suanpan_rod_d_half_dim, \l__suanpan_rod_upper_dim );
+
+ % 绘制横梁
+ \shade[beam]
+ ( -\l__suanpan_support_d_half_dim, -\l__suanpan_frame_b_half_dim )
+ rectangle
+ ( \l__suanpan_support_d_half_dim, \l__suanpan_frame_b_half_dim );
+ \draw[frameinner]
+ ( -\l__suanpan_support_d_half_dim, \l__suanpan_frame_b_half_dim )
+ --
+ ( \l__suanpan_support_d_half_dim, \l__suanpan_frame_b_half_dim );
+ \draw[frameinner]
+ ( -\l__suanpan_support_d_half_dim, -\l__suanpan_frame_b_half_dim )
+ --
+ ( \l__suanpan_support_d_half_dim, -\l__suanpan_frame_b_half_dim );
+
+ % 绘制上梁下边线
+ \draw[frameinner]
+ ( -\l__suanpan_support_d_half_dim,
+ \l__suanpan_frame_upper_inner_offset_dim )
+ --
+ ( \l__suanpan_support_d_half_dim,
+ \l__suanpan_frame_upper_inner_offset_dim );
+ % 绘制上梁上边线
+ \draw[frameouter]
+ ( -\l__suanpan_support_d_half_dim,
+ \l__suanpan_frame_upper_outer_offset_dim -
+ \l__suanpan_frame_outer_linewidth_dim / 2)
+ --
+ ( \l__suanpan_support_d_half_dim,
+ \l__suanpan_frame_upper_outer_offset_dim -
+ \l__suanpan_frame_outer_linewidth_dim / 2);
+
+ % 绘制下梁上边线
+ \draw[frameinner]
+ ( -\l__suanpan_support_d_half_dim,
+ \l__suanpan_frame_lower_inner_offset_dim )
+ --
+ ( \l__suanpan_support_d_half_dim,
+ \l__suanpan_frame_lower_inner_offset_dim );
+ % 绘制下梁下边线
+ \draw[frameouter]
+ ( -\l__suanpan_support_d_half_dim,
+ \l__suanpan_frame_lower_outer_offset_dim +
+ \l__suanpan_frame_outer_linewidth_dim / 2 )
+ --
+ ( \l__suanpan_support_d_half_dim,
+ \l__suanpan_frame_lower_outer_offset_dim +
+ \l__suanpan_frame_outer_linewidth_dim / 2 );
+
+ % 绘制计位点(黑色圆点)
+ \bool_if:NT \l__suanpan_support_unit_bool
+ {
+ \shade[%
+ inner~color=black!40,
+ outer~color=black!80,
+ ] (0pt, 0pt) circle
+ [radius = \l__suanpan_frame_unit_r_dim];
+ }
+ \end{tikzpicture}
+ }
+ }
+ \group_end:
+ }
+
+% 绘制算珠
+% #1: 算珠位置编号
+% o o o o o o o | o o o
+% 1 2 3 4 5 6 7 8 9 10
+% | o
+% 11
+% 其中,11是悬珠位置
+% #2: 算珠类型
+% 0——外珠,1——内珠,2——浮珠
+\cs_new:Npn \__suanpan_bid_layout:nn #1#2
+ {
+ % 算珠垂直偏移
+ \int_compare:nNnTF { #1 } > { 7 }
+ {
+ \int_compare:nNnTF { #1 } < { 11 }
+ {
+ % 上珠
+ \dim_set:Nn \l_tmpb_dim{ \l__suanpan_bid_upper_offset_dim +
+ \l__suanpan_bid_h_dim * (#1 - 8) }
+ }{
+ % 悬珠
+ \dim_set:Nn \l_tmpb_dim{ \l__suanpan_frame_b_half_dim +
+ \l__suanpan_bid_h_dim * 2 }
+ }
+ }{
+ % 下珠
+ \dim_set:Nn \l_tmpb_dim{ \l__suanpan_bid_lower_offset_dim +
+ \l__suanpan_bid_h_dim * (#1 - 1) }
+ }
+
+ % 绘图算珠
+ \draw_scope_begin:
+ \draw_transform_yshift:n { \l_tmpb_dim }
+ \int_case:nnF { #2 }
+ {
+ { 0 } { \draw_coffin_use:Nnn \l__suanpan_outer_bid_coffin { hc } { vc } }
+ { 1 } { \draw_coffin_use:Nnn \l__suanpan_inner_bid_coffin { hc } { vc } }
+ { 2 } { \draw_coffin_use:Nnn \l__suanpan_float_bid_coffin { hc } { vc } }
+ }{ \msg_error:nnn { suanpan } { bid-type-error } {#2} }
+ \draw_scope_end:
+ }
+
+\msg_new:nnn { suanpan } { bid-type-error }
+ { #1~ bid~ type~ is~ unknown. }
+
+% 函数变体
+\cs_generate_variant:Nn \__suanpan_bid_layout:nn {xx}
+
+% 组装一个档位
+% #1: 档位编号(基于1,从左向右计数)
+% #2: 档位数字
+\cs_new:Npn \__suanpan_assemble_rod:nn #1#2
+ {
+ \tl_set:Nn \l_tmpb_tl { #2 }
+ % 绘制
+ \draw_scope_begin:
+ % 水平方向偏移
+ \draw_transform_xshift:n { \l__suanpan_support_d_dim * (#1 - 1) }
+
+ % 档杆
+ \draw_coffin_use:Nnnn \l__suanpan_support_coffin
+ { hc } { vc } { 0pt, -\l__suanpan_support_y_offset_dim }
+
+ % 算珠
+ \int_compare:nNnTF { #2 } = { 0 }
+ {
+ % 判断0值空档算珠是否需要绘制
+ \bool_if:NT \l__suanpan_empty_rod_bool
+ {
+ % 取得档位数字对应算珠位置及内珠/外珠编号
+ \prop_get:NnN \l__suanpan_rods_val_prop { #2 } \l_tmpa_tl
+ \clist_clear:N \l__suanpan_bids_pos_clist
+ \clist_set:NV \l__suanpan_bids_pos_clist \l_tmpa_tl
+
+ \clist_map_inline:Nn \l__suanpan_bids_pos_clist
+ {
+ \clist_set:Nn \l_tmpa_clist { ##1 }
+ \__suanpan_bid_layout:xx { \clist_item:Nn \l_tmpa_clist { 1 } }
+ { \clist_item:Nn \l_tmpa_clist { 2 } }
+ }
+ }
+ }{
+ % 不是0值空档算珠,需要绘制
+ % 取得档位数字对应算珠位置及内珠/外珠编号
+ \prop_get:NnN \l__suanpan_rods_val_prop { #2 } \l_tmpa_tl
+ \clist_clear:N \l__suanpan_bids_pos_clist
+ \clist_set:NV \l__suanpan_bids_pos_clist \l_tmpa_tl
+
+ \clist_map_inline:Nn \l__suanpan_bids_pos_clist
+ {
+ \clist_set:Nn \l_tmpa_clist { ##1 }
+ \__suanpan_bid_layout:xx { \clist_item:Nn \l_tmpa_clist { 1 } }
+ { \clist_item:Nn \l_tmpa_clist { 2 } }
+ }
+ }
+ \draw_scope_end:
+ }
+
+% 指定一个档位上浮珠的颜色
+% #1: 档位编号(从左向右)
+% #2: 算珠位置([1, 11])
+\cs_new:Npn \__suanpan_float_bid:nn #1#2
+ {
+ \draw_scope_begin:
+ % 水平偏移
+ \draw_transform_xshift:n { \l__suanpan_support_d_dim * ( #1 - 1 ) }
+
+ % 覆盖绘制
+ \__suanpan_bid_layout:xx { #2 }{ 2 }
+ \draw_scope_end:
+ }
+
+% 为一个档位添加计数标记
+% #1: 档位编号(基于1,从左向右)
+% #2: 标记内容
+\cs_new:Npn \__suanpan_rod_mark:nn #1#2
+ {
+ \hcoffin_set:Nn \l_tmpa_coffin
+ {
+ \begin{tikzpicture}
+ \node at ( 0, 0 ) [font=\l__suanpan_mark_font_tl] { #2 };
+ \end{tikzpicture}
+ }
+
+ \draw_scope_begin:
+ % 水平偏移
+ \draw_transform_xshift:n { \l__suanpan_support_d_dim * ( #1 - 1 ) }
+ \draw_coffin_use:Nnn \l_tmpa_coffin { hc } { vc }
+ \draw_scope_end:
+ }
+
+% 绘制边框
+% #1 第一档编号(左)
+% #2 最后一档编号(右)
+\cs_new:Npn \__suanpan_frame_layout:nn #1#2
+ {
+ % TikZ绘制样式
+ \tikzset{%
+ hframe/.style = {% 上下梁
+ bottom~color = framecolor!95,
+ top~color = framecolor!95,
+ middle~color = framecolor!15,
+ draw = framecolor,
+ line~width = \l__suanpan_frame_inner_linewidth_dim,
+ },
+ vframe/.style = {% 左右梁
+ left~color = framecolor!95,
+ right~color = framecolor!95,
+ middle~color = framecolor!15,
+ draw = framecolor,
+ line~width = \l__suanpan_frame_inner_linewidth_dim,
+ },
+ mframe/.style = {% 横梁
+ top~color = framecolor!60,
+ bottom~color = framecolor!60,
+ middle~color = framecolor!5,
+ line~width = \l__suanpan_frame_inner_linewidth_dim,
+ },
+ frameline/.style = {% 梁连线
+ draw = framecolor,
+ line~width = \l__suanpan_frame_inner_linewidth_dim,
+ },
+ framefill/.style = {% 外框填充
+ draw = framecolor,
+ fill = framecolor,
+ line~width = \l__suanpan_frame_inner_linewidth_dim,
+ },
+ arcline/.style = {% 转角线
+ draw = framecolor,
+ line~width = \l__suanpan_frame_inner_linewidth_dim,
+ rounded~corners = \l__suanpan_frame_inner_linewidth_dim / 2,
+ },
+ }
+
+ % 总宽度
+ \dim_set:Nn \l_tmpa_dim {
+ \fp_to_dim:n {
+ \fp_eval:n { \l__suanpan_support_d_dim * ( #2 - #1 + 1.0) }
+ }
+ }
+ % 减半档宽度
+ \dim_set:Nn \l_tmpb_dim {
+ \fp_to_dim:n {
+ \fp_eval:n { \l__suanpan_support_d_dim * ( #2 - #1 ) +
+ \l__suanpan_support_d_half_dim}
+ }
+ }
+
+ \group_begin:
+ % 上下边框基础容器(盒子)
+ \hcoffin_set:Nn \l_tmpa_coffin
+ {
+ % 判断是否为草稿模式
+ \bool_if:NTF \l__suanpan_draft_bool
+ {
+ \begin{tikzpicture}
+ \draw[framefill]
+ ( 0pt, 0pt ) --
+ ++( \l_tmpa_dim, 0) --
+ ++( \l__suanpan_frame_b_dim, \l__suanpan_frame_b_dim ) --
+ ++( -\l__suanpan_frame_b_dim, 0 ) --
+ ++( -\l_tmpa_dim, 0 ) --
+ ++( -\l__suanpan_frame_b_dim, 0 ) --
+ cycle;
+ \end{tikzpicture}
+ }{
+ \begin{tikzpicture}
+ \shadedraw[hframe]
+ ( 0pt, 0pt ) --
+ ++( \l_tmpa_dim, 0) --
+ ++( \l__suanpan_frame_b_dim, \l__suanpan_frame_b_dim ) --
+ ++( -\l__suanpan_frame_b_dim, 0 ) --
+ ++( -\l_tmpa_dim, 0 ) --
+ ++( -\l__suanpan_frame_b_dim, 0 ) --
+ cycle;
+ \end{tikzpicture}
+ }
+ }
+
+ % 左右边框基础容器(盒子)
+ \hcoffin_set:Nn \l_tmpb_coffin
+ {
+ % 判断是否为草稿模式
+ \bool_if:NTF \l__suanpan_draft_bool
+ {
+ \begin{tikzpicture}
+ \draw[framefill]
+ ( 0, 0 ) --
+ ++( 0, \l__suanpan_frame_inner_h_dim) --
+ ++( -\l__suanpan_frame_b_dim, \l__suanpan_frame_b_dim ) --
+ ++( 0, -\l__suanpan_frame_outer_h_dim ) --
+ cycle;
+ \draw[arcline]
+ ( 0, 0 )
+ ++( 0, \l__suanpan_frame_inner_h_dim )
+ ++( 0, \l__suanpan_frame_b_dim )
+ ++( 0, \l__suanpan_frame_inner_linewidth_dim * 0.9 )
+ ++( -\l__suanpan_frame_b_half_dim, 0 ) --
+ ++( -\l__suanpan_frame_b_half_dim, 0 ) --
+ ++( -\l__suanpan_frame_inner_linewidth_dim * 0.9, 0 ) --
+ ++( 0, -\l__suanpan_frame_b_half_dim );
+ \draw[arcline]
+ ( 0, 0 )
+ ++( 0, -\l__suanpan_frame_b_dim )
+ ++( 0, -\l__suanpan_frame_inner_linewidth_dim * 0.9 )
+ ++( -\l__suanpan_frame_b_half_dim, 0 ) --
+ ++( -\l__suanpan_frame_b_half_dim, 0 ) --
+ ++( -\l__suanpan_frame_inner_linewidth_dim * 0.9, 0 ) --
+ ++( 0, \l__suanpan_frame_b_half_dim );
+ \end{tikzpicture}
+ }{
+ \begin{tikzpicture}
+ \shadedraw[vframe]
+ ( 0, 0 ) --
+ ++( 0, \l__suanpan_frame_inner_h_dim) --
+ ++( -\l__suanpan_frame_b_dim, \l__suanpan_frame_b_dim ) --
+ ++( 0, -\l__suanpan_frame_outer_h_dim ) --
+ cycle;
+ \draw[arcline]
+ ( 0, 0 )
+ ++( 0, \l__suanpan_frame_inner_h_dim )
+ ++( 0, \l__suanpan_frame_b_dim )
+ ++( 0, \l__suanpan_frame_inner_linewidth_dim * 0.9 )
+ ++( -\l__suanpan_frame_b_half_dim, 0 ) --
+ ++( -\l__suanpan_frame_b_half_dim, 0 ) --
+ ++( -\l__suanpan_frame_inner_linewidth_dim * 0.9, 0 ) --
+ ++( 0, -\l__suanpan_frame_b_half_dim );
+ \draw[arcline]
+ ( 0, 0 )
+ ++( 0, -\l__suanpan_frame_b_dim )
+ ++( 0, -\l__suanpan_frame_inner_linewidth_dim * 0.9 )
+ ++( -\l__suanpan_frame_b_half_dim, 0 ) --
+ ++( -\l__suanpan_frame_b_half_dim, 0 ) --
+ ++( -\l__suanpan_frame_inner_linewidth_dim * 0.9, 0 ) --
+ ++( 0, \l__suanpan_frame_b_half_dim );
+ \end{tikzpicture}
+ }
+ }
+
+ % 横梁接头基础容器(盒子)
+ \hcoffin_set:Nn \l_tmpc_coffin
+ {
+ % 判断是否为草稿模式
+ \bool_if:NTF \l__suanpan_draft_bool
+ {
+ \begin{tikzpicture}
+ \fill[fill=white,
+ line~width=\l__suanpan_frame_inner_linewidth_dim]
+ ( 0pt, 0pt ) --++( 0, \l__suanpan_frame_b_dim) --
+ ++(-\l__suanpan_frame_inner_linewidth_dim, 0) --
+ ++(-\l__suanpan_frame_b_dim / 3, -\l__suanpan_frame_b_dim / 2) --
+ ++( \l__suanpan_frame_b_dim / 3, -\l__suanpan_frame_b_dim / 2) --
+ cycle;
+ \draw[frameline]%
+ ( 0, \l__suanpan_frame_b_dim) --
+ ++(-\l__suanpan_frame_inner_linewidth_dim, 0) --
+ ++(-\l__suanpan_frame_b_dim / 3, -\l__suanpan_frame_b_dim / 2) --
+ ++( \l__suanpan_frame_b_dim / 3, -\l__suanpan_frame_b_dim / 2) --
+ ++( \l__suanpan_frame_inner_linewidth_dim, 0);
+ \end{tikzpicture}
+ }{
+ \begin{tikzpicture}
+ \shade[mframe]
+ ( 0pt, 0pt ) --++( 0, \l__suanpan_frame_b_dim) --
+ ++(-\l__suanpan_frame_inner_linewidth_dim, 0) --
+ ++(-\l__suanpan_frame_b_dim / 3, -\l__suanpan_frame_b_dim / 2) --
+ ++( \l__suanpan_frame_b_dim / 3, -\l__suanpan_frame_b_dim / 2) --
+ cycle;
+ \draw[frameline]%
+ ( 0, \l__suanpan_frame_b_dim) --
+ ++(-\l__suanpan_frame_inner_linewidth_dim, 0) --
+ ++(-\l__suanpan_frame_b_dim / 3, -\l__suanpan_frame_b_dim / 2) --
+ ++( \l__suanpan_frame_b_dim / 3, -\l__suanpan_frame_b_dim / 2) --
+ ++( \l__suanpan_frame_inner_linewidth_dim, 0);
+ \end{tikzpicture}
+ }
+ }
+
+ % 布置上边框
+ \draw_scope_begin:
+ \draw_transform_xshift:n { -\l__suanpan_support_d_half_dim -
+ \l__suanpan_frame_inner_linewidth_dim / 2 }
+ \draw_transform_yshift:n { \l__suanpan_frame_inner_upper_dim -
+ \l__suanpan_frame_inner_linewidth_dim }
+ \draw_coffin_use:Nnnn \l_tmpa_coffin { l } { b }
+ { -\l__suanpan_frame_b_dim, 0pt }
+ \draw_scope_end:
+
+ % 布置下边框
+ \draw_scope_begin:
+ \coffin_rotate:Nn \l_tmpa_coffin { 180 }
+ \draw_transform_xshift:n { \l_tmpa_dim - \l__suanpan_support_d_half_dim +
+ \l__suanpan_frame_inner_linewidth_dim / 2 }
+
+ \draw_transform_yshift:n { \l__suanpan_frame_inner_lower_dim +
+ \l__suanpan_frame_inner_linewidth_dim }
+ \draw_coffin_use:Nnnn \l_tmpa_coffin { l } { b }
+ { \l__suanpan_frame_b_dim, 0pt }
+ \draw_scope_end:
+
+ % 布置左边框
+ \draw_scope_begin:
+ \draw_transform_xshift:n { -\l__suanpan_support_d_half_dim -
+ \l__suanpan_frame_b_dim -
+ \l__suanpan_frame_inner_linewidth_dim * 1.5 }
+ \draw_transform_yshift:n { \l__suanpan_frame_inner_lower_dim -
+ \l__suanpan_frame_inner_linewidth_dim }
+
+ \draw_coffin_use:Nnnn \l_tmpb_coffin { l } { b }
+ { 0pt, -\l__suanpan_frame_b_dim }
+ \draw_scope_end:
+
+ % 布置右边框
+ \draw_scope_begin:
+ \coffin_rotate:Nn \l_tmpb_coffin { 180 }
+ \draw_transform_xshift:n { \l_tmpb_dim +
+ \l__suanpan_frame_b_dim +
+ \l__suanpan_frame_inner_linewidth_dim * 1.5}% -
+ \draw_transform_yshift:n { \l__suanpan_frame_inner_upper_dim +
+ \l__suanpan_frame_inner_linewidth_dim }
+ \draw_coffin_use:Nnnn \l_tmpb_coffin { l } { b }
+ { 0pt, \l__suanpan_frame_b_dim }
+ \draw_scope_end:
+
+ % 布置左横梁接头
+ \draw_scope_begin:
+ \draw_transform_xshift:n { -\l__suanpan_support_d_half_dim -
+ \l__suanpan_frame_b_dim / 3 -
+ \l__suanpan_frame_inner_linewidth_dim / 2 }
+ \draw_transform_yshift:n { -\l__suanpan_frame_b_dim / 2 -
+ \l__suanpan_frame_inner_linewidth_dim / 2 }
+ \draw_coffin_use:Nnnn \l_tmpc_coffin { l } { b } { 0pt, 0pt }
+ \draw_scope_end:
+
+ % 布置右横梁接头
+ \draw_scope_begin:
+ \coffin_rotate:Nn \l_tmpc_coffin { 180 }
+ \draw_transform_xshift:n { \l_tmpb_dim +
+ \l__suanpan_frame_b_dim / 3 +
+ \l__suanpan_frame_inner_linewidth_dim / 2 }
+ \draw_transform_yshift:n { \l__suanpan_frame_b_dim / 2 +
+ \l__suanpan_frame_inner_linewidth_dim / 2 }
+ \draw_coffin_use:Nnnn \l_tmpc_coffin { l } { b } { 0pt, 0pt }
+ \draw_scope_end:
+ \group_end:
+ }
+
+% 算盘排版用户接口
+% 算盘排版环境
+% #1 suanpan环境选项
+% #2 suanpan环境内容(!b参数)
+\NewDocumentEnvironment{ suanpan }{ o !b }
+ {
+ \group_begin:
+ % 设置选项
+ \IfNoValueF{ #1 }
+ {
+ \keys_set:nn { suanpan }{ #1 }
+ }
+
+ % 构造基础容器(盒子)
+ \__suanpan_inner_bid_construct:
+ \__suanpan_outer_bid_construct:
+ \__suanpan_support_construct:
+
+ % 删除#2(!b)参数取得的环境内容中的空白
+ \str_set:Nn \l_tmpa_str { #2 }
+ \str_remove_all:Nn \l_tmpa_str {~}
+ % 将str还原为tl
+ \tl_set_rescan:Nno \l_tmpa_tl {}{ \l_tmpa_str }
+
+ % 在容器(盒子)中用#2(!b)参数取得的按环境内容实现绘制
+ \hcoffin_set:Nn \l_tmpa_coffin
+ {
+ \draw_begin:
+ \l_tmpa_tl
+ \draw_end:
+ }
+
+ \hcoffin_set:Nn \l_tmpb_coffin
+ {
+ % 将原图缩小50%
+ \coffin_scale:Nnn \l_tmpa_coffin { 0.50 } { 0.50 }
+ \coffin_typeset:Nnnnn \l_tmpa_coffin{ l }{ b }{ 0pt }{ 0pt }
+ }
+ }{
+ % 按用户指定比例缩放
+ \coffin_scale:Nnn \l_tmpb_coffin
+ { \l__suanpan_scale_tl } { \l__suanpan_scale_tl }
+
+ % 设置基字符盒子(排版深度)
+ \hbox_set:Nn \l_tmpa_box { x }
+ % 盒子深度
+ \dim_set:Nn \l_tmpa_dim { \box_dp:N \l_tmpa_box}
+
+ % 输出算盘容器(盒子)
+ \coffin_typeset:Nnnnn \l_tmpb_coffin{ l }{ b }{ 0pt }{ -\l_tmpa_dim }
+ \int_zero:N \l__suanpan_rod_max_int
+ \group_end:
+ }
+
+% 排版算盘一个档位,包括档杆和算珠
+% #1 星号命令,绘制计位点(黑色圆点)
+% #2 档位编号(基于1,从左向右计数)
+% #3 本档数字(0-20,10-15需用到顶珠和底珠,16-20需要用到悬珠)
+\NewDocumentCommand{ \rod }{ s m m }
+ {
+ % 记录原状态变量
+ \bool_set_eq:NN \l_tmpa_bool \l__suanpan_support_unit_bool
+ % 星号命令,用于在横梁绘制计位点
+ \IfBooleanTF{#1}
+ {
+ \bool_set_true:N \l__suanpan_support_unit_bool
+ }{
+ \bool_set_false:N \l__suanpan_support_unit_bool
+ }
+
+ % 如状态发生改变,则重新绘制档杆单元
+ \bool_if:NTF \l_tmpa_bool
+ {
+ \bool_if:NF \l__suanpan_support_unit_bool
+ {
+ \__suanpan_support_construct:
+ }
+ }{
+ \bool_if:NT \l__suanpan_support_unit_bool
+ {
+ \__suanpan_support_construct:
+ }
+ }
+
+ % 组装一个档位
+ \__suanpan_assemble_rod:nn { #2 }{ #3 }
+
+ % 统计档位总数
+ \int_set:Nn \l__suanpan_rod_max_int
+ { \int_max:nn { \l__suanpan_rod_max_int }{ #2 } }
+ }
+
+% 排版算盘多个档位,包括档杆和算珠
+% #1 本档数字(0-20,10-15需用到顶珠和底珠,16-20需要用到悬珠)
+% 各数字之间需要用逗号分隔。
+\NewDocumentCommand{ \rods }{ m }
+ {
+ % 构造档位数字列表
+ \clist_set:Nn \l_tmpa_clist { #1 }
+ % 初始化档位计数器
+ \int_set:Nn \l_tmpa_int { 0 }
+
+ \clist_map_inline:Nn \l_tmpa_clist
+ {
+ % 档位计数器自增1
+ \int_incr:N \l_tmpa_int
+
+ % 组装当前档位
+ \__suanpan_assemble_rod:nn {\l_tmpa_int }{ ##1 }
+ }
+
+ % 记录档位总数
+ \int_set:Nn \l__suanpan_rod_max_int
+ { \int_max:nn { \l__suanpan_rod_max_int }{ \l_tmpa_int } }
+ }
+
+% 指定某档上某个算珠的颜色
+% #1 档位(基于1,从左向右计数)
+% #2 算珠位置列表(1--11,11为悬珠位置)
+% #3 算珠填充颜色
+% #4 算珠绘制颜色(默认为内珠绘制颜色)
+\NewDocumentCommand{ \bid }{ m m m O{innerdrawcolor} }
+ {
+ % 构造浮珠
+ \__suanpan_float_bid_construct:nn { #4 }{ #3 }
+
+ % 构造算珠位置列表
+ \clist_set:Nn \l_tmpa_clist { #2 }
+
+ \clist_map_inline:Nn \l_tmpa_clist
+ {
+ % 绘制浮珠
+ \__suanpan_float_bid:nn { #1 }{ ##1 }
+ }
+ }
+
+% 指定某档上所有内珠或外珠的颜色
+% #1 星号命令,选择内珠或外珠
+% #2 档位(基于1,从左向右计数)
+% #3 该档数字
+% #4 算珠填充颜色(绘图颜色采用原内/外珠绘制颜色)
+\NewDocumentCommand{ \bids }{ s m m m }
+ {
+ % 取得档位数字对应算珠位置及内珠/外珠编号
+ \prop_get:NnN \l__suanpan_rods_val_prop { #3 } \l_tmpa_tl
+ \clist_clear:N \l__suanpan_bids_pos_clist
+ \clist_set:NV \l__suanpan_bids_pos_clist \l_tmpa_tl
+
+ % 星号命令,用于选择外珠着色
+ \IfBooleanTF{#1}
+ {
+ % 构造浮珠
+ \__suanpan_float_bid_construct:nn { outerdrawcolor }{ #4 }
+
+ \clist_map_inline:Nn \l__suanpan_bids_pos_clist
+ {
+ \clist_set:Nn \l_tmpa_clist { ##1 }
+ % 选择外珠
+ \int_compare:nNnT { \clist_item:Nn \l_tmpa_clist { 2 } } = { 0 }
+ {
+ \__suanpan_float_bid:nn { #2 }{ \clist_item:Nn \l_tmpa_clist { 1 } }
+ }
+ }
+ }{
+ % 构造浮珠
+ \__suanpan_float_bid_construct:nn { innerdrawcolor }{ #4 }
+
+ \clist_map_inline:Nn \l__suanpan_bids_pos_clist
+ {
+ \clist_set:Nn \l_tmpa_clist { ##1 }
+ % 选择内珠
+ \int_compare:nNnT { \clist_item:Nn \l_tmpa_clist { 2 } } = { 1 }
+ {
+ \__suanpan_float_bid:nn { #2 }{ \clist_item:Nn \l_tmpa_clist { 1 } }
+ }
+ }
+ }
+ }
+
+% 左右边框
+\NewDocumentCommand{ \mkframe }{ }
+ {
+ \__suanpan_frame_layout:nn { 1 }{ \l__suanpan_rod_max_int }
+ }
+
+% 为各档添加计位标记
+% #1 起始档位(基于1,从左向右计数)
+% #2 标记列表
+\NewDocumentCommand{ \rodmark }{ O{1} m }
+ {
+ % 标记列表
+ \clist_set:Nn \l_tmpa_clist { #2 }
+
+ % 计数器
+ \int_set:Nn \l_tmpa_int { #1 }
+
+ % 遍历列表
+ \clist_map_inline:Nn \l_tmpa_clist
+ {
+ % 输出标记
+ \__suanpan_rod_mark:nn { \l_tmpa_int }{ ##1 }
+
+ % 调整计数器
+ \int_incr:N \l_tmpa_int
+
+ % 超出最大档位
+ \int_compare:nNnT { \l_tmpa_int } > { \l__suanpan_rod_max_int }
+ {
+ \clist_map_break:
+ }
+ }
+ }
+
+% 选项设置用户接口
+\NewDocumentCommand{ \suanpanset } { m }
+ {
+ \IfNoValueF { #1}
+ {
+ \keys_set:nn { suanpan } { #1 }
+ }
+ }
+
+\endinput
diff --git a/macros/latex/contrib/suanpan-l3/suanpan-l3.tex b/macros/latex/contrib/suanpan-l3/suanpan-l3.tex
new file mode 100644
index 0000000000..89cb17784d
--- /dev/null
+++ b/macros/latex/contrib/suanpan-l3/suanpan-l3.tex
@@ -0,0 +1,1479 @@
+\documentclass[full]{l3doc}
+\usepackage[scheme=chinese]{ctex}
+\usepackage{geometry}
+\usepackage{fancyvrb-ex}
+\usepackage{ninecolors}
+\usepackage{suanpan-l3}
+
+\IndexPrologue
+ {
+ % \section*{索引}
+ % \markboth{索引}{索引}
+ % \addcontentsline{toc}{section}{索引}
+ % 斜体数字说明了对应索引内容出现的页码,
+ % 带有下划线的数据给出了索引内容的定义,
+ % 其它的数字给出了索引内容引用的位置。
+ \section*{Index}
+ \markboth{Index}{Index}
+ \addcontentsline{toc}{section}{Index}
+ The~italic~numbers~denote~the~pages~where~the~
+ corresponding~entry~is~described,~
+ numbers~underlined~point~to~the~definition,~
+ all~others~indicate~the~places~where~it~is~used.
+ }
+
+\newcommand\tikzmark[1]{\tikz \coordinate[overlay, remember picture] (#1);}
+
+\geometry{
+ left=4.5cm,
+ right=2cm,
+ top=2cm,
+ bottom=2cm,
+}
+\hypersetup {
+ CJKbookmarks,
+ bookmarksopen,
+ bookmarksopenlevel=3,
+ pdfstartview=FitH,
+ pdfinfo = {
+ Title = 中国传统7珠圆珠算盘排版宏包 ,
+ Subject = A LaTeX3 package ,
+ Author = 耿楠
+ }
+}
+
+\DoNotIndex{\begin, \end}
+\setlength{\parskip}{\medskipamount}
+\DeclareDocumentEnvironment { noteen } { +b } {
+ \par\textbf{\textsf{NOTE:~}}#1\par
+} {}
+\DeclareDocumentEnvironment { notezh } { +b } {
+ \par\textbf{\textsf{注意:~}}#1\par
+} {}
+
+\AtEndDocument{
+ \newgeometry{
+ left=2cm,
+ right=2cm,
+ top=2cm,
+ bottom=2cm
+ }
+ \PrintChanges
+ \PrintIndex
+}
+
+\ExplSyntaxOn
+\dim_new:N \l__my_syntax_dim
+\box_new:N \g__my_syntax_box
+\NewDocumentEnvironment { Syntax } { s }
+ {
+ \dim_set:Nn \l__my_syntax_dim
+ { \textwidth }
+ \hbox_gset:Nw \g__my_syntax_box
+ \small \ttfamily
+ \begin{minipage}[t]{\l__my_syntax_dim}
+ \raggedright\obeyspaces\obeylines
+ }
+ {
+ \end{minipage}
+ \hbox_gset_end:
+ \IfValueF { #1 } { \smallskip }
+ \box_use_drop:N \g__my_syntax_box
+ \smallskip
+ }
+
+\DeclareDocumentEnvironment { Description } { o +b } {
+ \hbox_set:Nn \l_tmpa_box { #1 }
+ \dim_set:Nn \l_tmpa_dim { \box_wd:N \l_tmpa_box }
+ \begin{itemize}[labelwidth=\l_tmpa_dim, align=left]
+ #2
+ \end{itemize}
+} { }
+
+\keys_define:nn { suanpan/doc } {
+ opt .tl_set:N = \l_opt_tl,
+ desc .tl_set:N = \l_desc_tl,
+ init .tl_set:N = \l_init_tl,
+ init .initial:n = init-none,
+}
+
+\box_new:N \l__option_box
+\NewDocumentEnvironment { option } { m +b } {
+ \keys_set:nn { suanpan/doc } { #1 }
+ \hbox_set:Nw \l__option_box
+ \small \ttfamily
+ \begin{minipage}[t]{\textwidth}
+ \obeyspaces\obeylines
+ \textcolor{red}{
+ \l_opt_tl
+ \exp_args:Nx\SpecialOptionIndex{\l_opt_tl}
+ }
+ {~}\l_desc_tl
+ \hfill(
+ \tl_if_eq:NnTF \l_init_tl { init-none } { no~value }
+ { init: ~\texttt{\l_init_tl} }
+ )
+ \end{minipage}
+ \hbox_gset_end:
+ \box_use_drop:N \l__option_box
+ #2
+ \medskip
+} { }
+
+\DeclareDocumentCommand \opt { O{} m }
+ { \__codedoc_cmd:no {#1} { #2 } }
+\ExplSyntaxOff
+
+\def\vers{\texttt{v1.2.2} }
+
+\changes{v1.0.0}{2024/08/20}{first version.}
+
+\begin{document}
+\title{
+ \pkg{suanpan-l3}---算盘(Abacus)排版宏包
+ \rlap{\makebox[4cm][r]{
+ \normalsize $\Longrightarrow$ \color{red}
+ \protect\hyperlink{en}{English Version}
+ \protect\hypertarget{zh}{}
+ }}
+}
+\author{\textit{耿楠} \texttt{<nangeng@nwafu.edu.cn>}}
+\date{\the\year 年\the\month 月\the\day 日\qquad \vers
+\thanks{\url{https://gitee.com/nwafu_nan/suan-pan}}
+}
+
+\maketitle
+
+\begin{abstract}
+ \pkg{suanpan-l3}是一个基于\pkg{l3draw}和\pkg{TikZ}绘图宏包,用\pkg{Expl3}%
+ 开发的中国传统7珠圆珠算盘排版宏包,它能够实现使用普通上珠、下珠
+ 和底珠、顶珠及悬珠的算盘排版。该宏包提供了唯一的一个
+ \env{suanpan}算盘排版环境及仅在该环境中使用的 \tn{rod}、
+ \tn{rods}、\tn{bid}、\tn{bids}、\tn{rodmark}和\tn{mkframe}档杆、算珠
+ 着色、横梁标记和边框排版命令。同时,该宏包还提供了\tn{suanpanset}%
+ 命令用于对算盘外观进行设置。
+ \begin{center}
+ \begin{suanpan}[framedraw = brown2, scale = 0.45, bidsep=1.5pt,
+ roddraw = brown3, rodfill = brown4]
+ % 各档位数字列表
+ \rods{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20}
+ % 定位点
+ \rod*{4}{3}
+ \rod*{18}{17}
+ % 使用顶珠
+ \bid{12}{9}{azure5}
+ \bid{13}{9}{azure5}
+ \bid{14}{9}{azure5}
+ \bid{15}{9}{azure5}
+ \bid{16}{9}{azure5}
+ % 使用悬珠
+ \bid{17}{11}{red5}
+ \bid{18}{11}{red5}
+ \bid{19}{11}{red5}
+ \bid{20}{11}{red5}
+ \bid{21}{11}{red5}
+ % 使用底珠
+ \bid{11}{3}{olive5}
+ \bid{16}{3}{olive5}
+ \bid{21}{3}{olive5}
+ \rodmark{21,20,19,{},17,16,15,14,13,12,11,10,9,8,7,6,5,{},3,2,1}
+ \mkframe
+ \end{suanpan}
+ \end{center}
+\end{abstract}
+
+{\small
+\tableofcontents
+}
+\newpage
+
+\begin{documentation}
+
+\section{引言}
+
+\pkg{suanpan-l3}宏包是一个基于\pkg{l3draw}和\pkg{TikZ}绘图宏包,
+用\pkg{Expl3}开发的中国传统7珠圆珠算盘排版宏包,它利用\pkg{l3draw}%
+宏包,通过\env{l3coffin}容器的平移变换,将使用\pkg{TikZ}宏包绘制的
+算珠、档杆、边框等基本图元组装成算盘,从而实现算盘的排版。
+
+由于圆珠是通过圆角矩形实现的,因此当算珠数量较多时,绘制耗时较长,
+其编译速度较慢。
+
+\section{用户接口}
+
+\subsection{\env{suanpan}算盘排版环境}
+
+\begin{function}{suanpan}
+ \begin{syntax}
+ \tn{begin}|{suanpan}|\oarg{外观选项}
+ .....
+ \tn{end}|{suanpan}|
+ \end{syntax}
+\end{function}
+
+ 按可选项设置的\oarg{外观选项}实现算盘排版。
+
+ 在\env{suanpan}环境中,可以通过专用命令\tn{rod}%
+ (排版算盘的一个档位),\tn{rods}(排版一组档位),
+ \tn{bid}(指定算珠颜色),\tn{bids}(指定内/外珠颜色),
+ \tn{rodmark}(为档位添加标记),\tn{mkframe}(排版边框)
+ 按需实现算盘排版。
+
+ 在\oarg{外观选项}中可以通过key-value的方式设置线宽、颜色、
+ 缩放比例等外观属性。
+
+ 通过\oarg{外观选项}设置的外观参数仅对\env{suanpan}环境局部有效。
+
+ \begin{notezh}
+ \env{suanpan}环境中\textsf{不可以出现空行}。
+ \end{notezh}
+
+\begin{SideBySideExample}[frame=single,numbers=left,%
+ xrightmargin=.48\linewidth,gobble=2]
+ \centering
+ % 为便排版,进行缩放
+ \suanpanset{scale = 0.65}
+ \begin{suanpan}
+ \rod{1}{0}
+ \rod{2}{3}
+ \rod{3}{0}
+ \end{suanpan}
+\end{SideBySideExample}
+
+\subsection{\env{suanpan}环境中的专用命令}
+
+\changes{v1.1.3}{2024/09/04}{add highlight to rod(s) and beam}
+\subsubsection{\tn{rod}单一档位排版命令}
+
+\begin{function}{\rod}
+ \begin{syntax}
+ \cs{rod} \marg{档位编号} \marg{档位数字}
+ \end{syntax}
+\end{function}
+
+ 用于排版\marg{档位编号}(基于1,从左向右进行编号)参数指定的算盘
+ 档位,本档的计数值由\marg{档位数字}参数指定。
+
+ \marg{档位数字}支持[0, 20]内的数字,其中[0, 9]内的
+ 数字采用常规4个下珠结合1个上珠的方法进行表示,[10, 15]
+ 内的数字则需要额外使用\enquote{底珠}和\enquote{顶珠}进行表示,
+ [16, 20]内的数字则需要再额外使用\enquote{悬珠}进行表示。
+
+ 宏包还为\tn{rod}命令同时提供了\tn{rod*}星号命令用于排版在
+ 横梁上带有计位点(圆点)的档位。
+
+\begin{SideBySideExample}[frame=single,numbers=left,%
+ xrightmargin=.48\linewidth,gobble=2]
+ \centering
+ \suanpanset{scale = 0.65}
+ \begin{suanpan}
+ \rod{1}{1} % 常规档位
+ \rod{2}{6}
+ \rod*{3}{10} % 计位点,使用底珠
+ \rod{4}{12} % 使用顶珠
+ \rod{5}{18} % 使用悬珠
+ \end{suanpan}
+\end{SideBySideExample}
+
+\subsubsection{\tn{rods}一组档位排版命令}
+
+\begin{function}{\rods}
+ \begin{syntax}
+ \cs{rods} \marg{数字列表}
+ \end{syntax}
+\end{function}
+
+ 用于排版在\marg{数字列表}中用逗号分隔的一组数字指定的档位,
+ 各档位编号基于1,从左向右进行自动编号。
+
+ \marg{数字列表}中的各档位数字支持[0, 20]内的数字,其中[0, 9]内的
+ 数字采用常规4个下珠结合1个上珠的方法进行表示,[10, 15]
+ 内的数字则需要额外使用\enquote{底珠}和\enquote{顶珠}进行表示,
+ [16, 20]内的数字则需要再额外使用\enquote{悬珠}进行表示。
+
+ \begin{notezh}
+ 宏包并没有为\tn{rods}命令提供在横梁排版计位点的档位的
+ 操作。如果需要,则可以使用\tn{rod*}命令对指定档位进行覆盖绘制。
+ \end{notezh}
+
+\begin{SideBySideExample}[frame=single,numbers=left,%
+ xrightmargin=.48\linewidth,gobble=2]
+ \centering
+ \suanpanset{scale = 0.65}
+ \begin{suanpan}
+ \rods{0, 6, 12, 18, 0}
+ \rod*{3}{12}
+ \end{suanpan}
+\end{SideBySideExample}
+
+\changes{v1.0.1}{2024/08/26}{rename \tn{bidclr} to \tn{bid}.}
+\changes{v1.1.3}{2024/09/01}{add draw color option to \tn{bid},
+ change \texttt{pos} to clist and
+ set default bid draw color to \texttt{innerdrawcolor}.}
+\changes{v1.1.3}{2024/09/04}{add highlight to bid(s)}
+
+\subsubsection{\tn{bid}算珠着色命令}
+
+\begin{function}{\bid}
+ \begin{syntax}
+ \cs{bid} \marg{档位编号}\marg{位置列表}\marg{填充颜色}\oarg{绘制颜色}
+ \end{syntax}
+\end{function}
+
+ 用于将\marg{档位编号}指定的档位中,用逗号分隔的\marg{位置列表}中
+ 指定的所有算珠的填充色设置为\marg{填充颜色}指定的颜色,将其绘制
+ 颜色设置为可选项\oarg{绘制颜色}(默认为内珠绘制颜色)。
+
+ 一个档位中的\marg{算珠位置}自下向上,按\enquote{$1, 2, \cdots, 11$}%
+ 的顺序进行编号。其中下珠占\enquote{$1, 2, \cdots, 7$}的位置,上珠占
+ \enquote{$8, 9, 10$}的位置,悬珠占\enquote{$11$}的位置。
+
+\begin{SideBySideExample}[frame=single,numbers=left,%
+ xrightmargin=.48\linewidth,gobble=2]
+ \centering
+ \suanpanset{scale = 0.65}
+ \begin{suanpan}
+ \rods{0, 0, 7, 11, 8, 19}
+ \bid{1}{1}{brown5}
+ \bid{2}{5}{brown5}
+ \bid{3}{6}{red5}
+ \bid{4}{7}{red5}
+ \bid{4}{8}{azure5}
+ \bid{4}{9}{yellow5}
+ \bid{5}{10}{violet5}
+ \bid{6}{4,5,6,11}{teal4}[magenta5]
+ \end{suanpan}
+\end{SideBySideExample}
+
+\changes{v1.1.0}{2024/08/28}{adde \tn{bids} macro.}
+\changes{v1.1.3}{2024/09/01}{change \tn{bids} macro inner bids draw color to
+ \texttt{innerdrawcolor} and outter bids draw
+ color to \texttt{outerdrawcolor}.}
+
+\subsubsection{\tn{bids}内珠或外珠着色命令}
+
+\begin{function}{\bids}
+ \begin{syntax}
+ \cs{bids} \marg{档位编号}\marg{档位数字}\marg{填充颜色}
+ \end{syntax}
+\end{function}
+
+ 用于将\marg{档位编号}指定的档位中,所有\marg{档位数字}的内珠
+ 设置为\marg{填充颜色}指定的颜色。同时,该命令还将
+ 算珠绘制颜色设置内珠绘制颜色(\texttt{innerdrawcolor})。
+
+ 宏包还为\tn{bids}命令同时提供了\tn{bids*}星号命令用于设置该档
+ 所有外珠的颜色。此时,算珠绘制颜色设置外珠绘制颜色
+ (\texttt{outerdrawcolor})。
+
+ \begin{notezh}
+ 该命令只能选择内珠或外珠进行着色,不能同时选择内珠和外珠。
+ \end{notezh}
+
+\begin{SideBySideExample}[frame=single,numbers=left,%
+ xrightmargin=.48\linewidth,gobble=2]
+ \centering
+ \suanpanset{scale = 0.65}
+ \begin{suanpan}
+ \rods{0, 0, 7, 11, 8, 19}
+ \bids{3}{7}{teal4}
+ \bids*{5}{8}{azure5}
+ \end{suanpan}
+\end{SideBySideExample}
+
+\changes{v1.2.0}{2024/09/04}{add \tn{rodmark} macro for marking rod(s) on beams.}
+
+\subsubsection{\tn{rodmark}横梁标记命令}
+
+\begin{function}{\rodmark}
+ \begin{syntax}
+ \cs{rodmark} \oarg{起始档位}\marg{标记列表}
+ \end{syntax}
+\end{function}
+
+ 用于从\oarg{起始档位}可选项指定的档位开始,用\marg{标记列表}%
+ 中逗号分隔的标记在算盘横梁上为各档位添加标记。
+
+ \begin{notezh}
+ 如果\marg{标记列表}中的标记数量超出从\oarg{起始档位}开始的
+ 档位数,多余的标记将被忽略。在\marg{标记列表}中,可以用一
+ 对``\{\}''分组符号表示空白标记。
+ \end{notezh}
+
+\begin{SideBySideExample}[frame=single,numbers=left,%
+ xrightmargin=.48\linewidth,gobble=2]
+ \centering
+ \suanpanset{scale = 0.65}
+ \begin{suanpan}
+ \rods{0, 2, 6, 6, 9, 0}
+ \rodmark{4,{},2,1,0,-1,-2}
+ \end{suanpan}
+\end{SideBySideExample}
+
+\begin{SideBySideExample}[frame=single,numbers=left,%
+ xrightmargin=.48\linewidth,gobble=2]
+ \centering
+ \suanpanset{scale = 0.65}
+ \begin{suanpan}
+ \rods{0, 2, 6, 6, 9, 0}
+ \rodmark[2]{千,百,十,个}
+ \end{suanpan}
+\end{SideBySideExample}
+
+\changes{v1.1.3}{2024/09/04}{highlight all frame and remove arguments of \tn{lrframe},
+ at the same time change \tn{lrframe} to \tn{mkframe}.}
+
+\subsubsection{\tn{mkframe}边框排版命令}
+
+\begin{function}{\mkframe}
+ \begin{syntax}
+ \cs{mkframe}
+ \end{syntax}
+\end{function}
+
+ 用于排版算盘的边框。
+
+\begin{SideBySideExample}[frame=single,numbers=left,%
+ xrightmargin=.48\linewidth,gobble=2]
+ \centering
+ \suanpanset{scale = 0.65}
+ \begin{suanpan}
+ \rods{0, 6, 12, 18, 0}
+ \mkframe
+ \end{suanpan}
+\end{SideBySideExample}
+
+\subsection{\tn{suanpanset}选项设置命令}
+
+\begin{function}{\suanpanset}
+ \begin{syntax}
+ \cs{suanpanset} \marg{外观选项}
+ \end{syntax}
+\end{function}
+
+ 通过\marg{外观选项}的key-value选项设置算盘的算珠、边框等元素的
+ 绘制颜色、填充颜色、线条宽度;各档位之间的间距、算珠之间的间距;
+ 算盘整体的缩放比例等外观属性。
+
+ 通过\cs{suanpan}\marg{外观选项}设置的外观属性对后续所有算盘排版
+ 操作有效。
+
+ % \begin{notezh}
+ % 由于\pkg{suanpan-l3}宏包涉及大量绘图操作,因此建议尽量减少在每个
+ % \env{suanpan}排版环境的可选项中使用\oarg{外观选项}设置,以
+ % 节约编译时间。如需要更改算盘外观,可以在引用宏包时,通过为宏包
+ % 添加选项实现,也可以执行\tn{suanpanset}命令进行必要的
+ % 全局设置或在一定范围内进行统一设置。
+ % \end{notezh}
+
+\section{宏包选项}
+
+在\pkg{suanpan-l3}宏包中,算盘颜色、线条宽度、档位及算珠间距等
+算盘外观属性可以在引入宏包时通过\oarg{宏包选项}进行设置,
+也可以在\env{suanpan}环境的\oarg{外观选项}中进行局部设置,
+还可以通过\cs{suanpanset}命令进行全局或局部设置。
+
+强烈建议在引用宏包时通过\oarg{宏包选项}为一个文档统一全局设置
+算盘外观属性,以节约编译时间。应避免频繁\env{suanpan}环境中使用
+\oarg{宏包选项}或使用\cs{suanpanset}命令设置算盘外观属性。
+
+\pkg{suanpan-l3}宏包选项是一个英文逗号分隔的选项列表,其
+选项是\marg{key}|=|\marg{value}形式。部分选项的\marg{value}可以省略。
+对于同一选项,后续设置会覆盖以前设置。
+
+\pkg{suanpan-l3}宏包采用\LaTeX3风格的键值设置,支持不同类型以及多种层次的
+选项设定。键值列表中,``|=|''左右的空格不影响设置。但需注意,参数列表中%
+\textsf{不可以出现空行}。
+
+布尔型的参数\marg{选项}|=true|中的``|=true|''可以省略。
+
+\changes{v1.2.1}{2024/09/05}{change bid(s) figure to a single
+ round cap line in draft and remove
+ all highlight of bid(s), rod(s) and
+ frame.}
+
+\subsection{草稿模式}
+
+\begin{option}{ opt = draft, desc = {= \meta{草稿模式}}, init=false }
+ 设置草稿模式。
+\end{option}
+
+ \oarg{draft}选项会将算珠用圆角线冒直线实现绘制,取消所有高光效果,
+ 从而加快编译速度。同时,\oarg{draft}选项还会将空档算珠绘制选项\oarg{empty}%
+ 设置为\texttt{false},也就是不绘制空档上的算珠。
+
+ \begin{notezh}
+ 在草稿模式下算盘排版会与期望的排版结果有出入。
+ \end{notezh}
+
+\begin{SideBySideExample}[frame=single,numbers=left,%
+ xrightmargin=.53\linewidth,gobble=2]
+ % \usepackage[draft]{suanpan}
+ \centering
+ \suanpanset{scale = 0.65}
+ \begin{suanpan}[draft]
+ \rods{0, 6, 12, 18, 0}
+ \end{suanpan}
+\end{SideBySideExample}
+
+\changes{v1.1.2}{2024/08/31}{add empty option to remove bids on empty rod.}
+
+\subsection{是否绘制空档算珠}
+
+\begin{option}{ opt = empty, desc = {= \meta{空档}}, init=true }
+ 设置是否绘制空档算珠。
+\end{option}
+
+ \oarg{empty}选项用于选择是否绘制空档上的算珠,如果不绘制,
+ 在一定程度上可以加快编译速度。
+
+ \begin{notezh}
+ 如有需要,可以使用\tn{bid}或\tn{bids*}命令为空档绘制算珠。
+ \end{notezh}
+
+\begin{SideBySideExample}[frame=single,numbers=left,%
+ xrightmargin=.53\linewidth,gobble=2]
+ \centering
+ \suanpanset{scale = 0.65}
+ \begin{suanpan}[empty = false]
+ \rods{0, 6, 12, 18, 0}
+ \bids*{5}{0}{gray6}
+ \end{suanpan}
+\end{SideBySideExample}
+
+\subsection{线宽}
+
+\begin{option}{ opt = linewd, desc = {= \meta{线宽}}, init=2pt }
+ 设置算盘绘制中的线宽。
+\end{option}
+
+ \oarg{linewd}选项用于设置算盘边框内线线宽,同时会将
+ 边框外线设置为linewd的7.00倍,将档杆和算珠线宽
+ 设置为linewd的0.2倍。
+
+\begin{SideBySideExample}[frame=single,numbers=left,%
+ xrightmargin=.40\linewidth,gobble=2]
+ \centering
+ \suanpanset{scale = 0.65, linewd = 3pt}
+ \begin{suanpan}
+ \rods{0, 6, 12, 18, 0}
+ \end{suanpan}
+\end{SideBySideExample}
+
+\changes{v1.2.2}{2024/09/07}{add bidh, bidd, rodd and framew options
+ to set the base size of suanpan.}
+
+\subsection{算珠高度}
+
+\begin{option}{ opt = bidh, desc = {= \meta{算珠高度}}, init=12mm }
+ 设置算珠高度。
+\end{option}
+
+\begin{SideBySideExample}[frame=single,numbers=left,%
+ xrightmargin=.40\linewidth,gobble=2]
+ \centering
+ \suanpanset{scale = 0.65, bidh = 18mm}
+ \begin{suanpan}
+ \rods{0, 6, 0}
+ \end{suanpan}
+\end{SideBySideExample}
+
+\subsection{算珠直径}
+
+\begin{option}{ opt = bidd, desc = {= \meta{算珠直径}}, init=23mm }
+ 设置算珠直径。
+\end{option}
+
+\begin{SideBySideExample}[frame=single,numbers=left,%
+ xrightmargin=.40\linewidth,gobble=2]
+ \centering
+ \suanpanset{scale = 0.65, bidd = 36mm}
+ \begin{suanpan}
+ \rods{0, 6, 0}
+ \end{suanpan}
+\end{SideBySideExample}
+
+\subsection{档杆直径}
+
+\begin{option}{ opt = rodd, desc = {= \meta{档杆直径}}, init=7mm }
+ 设置档杆直径。
+\end{option}
+
+\begin{noteen}
+ 档杆直径rodd应该小于算珠直径bidd。
+\end{noteen}
+
+\begin{SideBySideExample}[frame=single,numbers=left,%
+ xrightmargin=.40\linewidth,gobble=2]
+ \centering
+ \suanpanset{scale = 0.65, rodd = 3mm}
+ \begin{suanpan}
+ \rods{0, 6, 0}
+ \end{suanpan}
+\end{SideBySideExample}
+
+\subsection{边框宽度}
+
+\begin{option}{ opt = framew, desc = {= \meta{边框宽度}}, init=13mm }
+ 设置边框宽度。
+\end{option}
+
+\begin{SideBySideExample}[frame=single,numbers=left,%
+ xrightmargin=.40\linewidth,gobble=2]
+ \centering
+ \suanpanset{scale = 0.65, framew = 7mm}
+ \begin{suanpan}
+ \rods{0, 6, 12, 18, 0}
+ \mkframe
+ \end{suanpan}
+\end{SideBySideExample}
+
+\subsection{档位间距}
+
+\begin{option}{ opt = rodsep, desc = {= \meta{档位间距}}, init=3.0pt }
+ 设置算盘各档间的间距。
+\end{option}
+
+\begin{SideBySideExample}[frame=single,numbers=left,%
+ xrightmargin=.40\linewidth,gobble=2]
+ \centering
+ \suanpanset{scale = 0.65, rodsep = 15pt}
+ \begin{suanpan}
+ \rods{0, 6, 0}
+ \end{suanpan}
+\end{SideBySideExample}
+
+ \begin{notezh}
+ 修改档位间距会改变算盘排版的宽度。
+ \end{notezh}
+
+\subsection{算珠间距}
+
+\begin{option}{ opt = bidsep, desc = {= \meta{算珠间距}}, init=1.8pt }
+ 设置算珠间的间距。
+\end{option}
+
+\begin{SideBySideExample}[frame=single,numbers=left,%
+ xrightmargin=.40\linewidth,gobble=2]
+ \centering
+ \suanpanset{scale = 0.65, bidsep = 4pt}
+ \begin{suanpan}
+ \rods{0, 6, 0}
+ \end{suanpan}
+\end{SideBySideExample}
+
+ \begin{notezh}
+ 修改算珠间距不会改变算盘的尺寸,但算珠高度会发生变化。
+ 另外,过小的算珠高度会造成算珠圆角的畸变。
+ \end{notezh}
+
+\subsection{缩放比例}
+
+\begin{option}{ opt = scale, desc = {= \meta{缩放比例}}, init=1.0 }
+ 设置算盘输出结果的整体缩放比例。
+\end{option}
+
+\begin{SideBySideExample}[frame=single,numbers=left,%
+ xrightmargin=.40\linewidth,gobble=2]
+ \centering
+ \suanpanset{scale = 1.20}
+ \begin{suanpan}
+ \rods{0, 6, 0}
+ \end{suanpan}
+\end{SideBySideExample}
+
+\subsection{边框颜色}
+
+\begin{option}{ opt = framedraw, desc = {= \meta{边框颜色}}, init=black }
+ 设置算盘边框颜色。
+\end{option}
+
+\begin{SideBySideExample}[frame=single,numbers=left,%
+ xrightmargin=.37\linewidth,gobble=2]
+ \centering
+ \suanpanset{scale = 0.65, framedraw = brown3}
+ \begin{suanpan}
+ \rods{0, 6, 0}
+ \end{suanpan}
+\end{SideBySideExample}
+
+ \begin{notezh}
+ 边框颜色包括内外边框和横梁颜色。
+ \end{notezh}
+
+\subsection{档杆绘制颜色}
+
+\begin{option}{ opt = roddraw, desc = {= \meta{档杆绘制颜色}}, init=black }
+ 设置档杆绘制颜色。
+\end{option}
+
+\begin{SideBySideExample}[frame=single,numbers=left,%
+ xrightmargin=.37\linewidth,gobble=2]
+ \centering
+ \suanpanset{scale = 0.65, roddraw = red8}
+ \begin{suanpan}
+ \rods{0, 6, 0}
+ \end{suanpan}
+\end{SideBySideExample}
+
+\subsection{档杆填充颜色}
+
+\begin{option}{ opt = rodfill, desc = {= \meta{档杆填充颜色}}, init=white }
+ 设置档杆填充颜色。
+\end{option}
+
+\begin{SideBySideExample}[frame=single,numbers=left,%
+ xrightmargin=.37\linewidth,gobble=2]
+ \centering
+ \suanpanset{scale = 0.65, rodfill = brown6}
+ \begin{suanpan}
+ \rods{0, 6, 0}
+ \end{suanpan}
+\end{SideBySideExample}
+
+\subsection{外珠绘制颜色}
+
+\begin{option}{ opt = outerdraw, desc = {= \meta{外珠绘制颜色}}, init=black }
+ 设置档杆上外珠\footnote{外珠是指离梁不记数的算珠。}绘制颜色。
+\end{option}
+
+\begin{SideBySideExample}[frame=single,numbers=left,%
+ xrightmargin=.37\linewidth,gobble=2]
+ \centering
+ \suanpanset{scale = 0.65, outerdraw = red8}
+ \begin{suanpan}
+ \rods{0, 6, 0}
+ \end{suanpan}
+\end{SideBySideExample}
+
+\subsection{外珠填充颜色}
+
+\begin{option}{ opt = outerfill, desc = {= \meta{外珠填充颜色}}, init=black!40 }
+ 设置外珠填充颜色。
+\end{option}
+
+\begin{SideBySideExample}[frame=single,numbers=left,%
+ xrightmargin=.37\linewidth,gobble=2]
+ \centering
+ \suanpanset{scale = 0.65, outerfill = yellow6}
+ \begin{suanpan}
+ \rods{0, 6, 0}
+ \end{suanpan}
+\end{SideBySideExample}
+
+\subsection{内珠绘制颜色}
+
+\begin{option}{ opt = innerdraw, desc = {= \meta{内珠绘制颜色}}, init=black }
+ 设置档杆上内珠\footnote{内珠是指靠梁记数的算珠。}绘制颜色。
+\end{option}
+
+\begin{SideBySideExample}[frame=single,numbers=left,%
+ xrightmargin=.37\linewidth,gobble=2]
+ \centering
+ \suanpanset{scale = 0.65, innerdraw = red8}
+ \begin{suanpan}
+ \rods{0, 6, 0}
+ \end{suanpan}
+\end{SideBySideExample}
+
+\subsection{内珠填充颜色}
+
+\begin{option}{ opt = innerfill, desc = {= \meta{内珠填充颜色}}, init=black}
+ 设置内珠填充颜色。
+\end{option}
+
+\begin{SideBySideExample}[frame=single,numbers=left,%
+ xrightmargin=.37\linewidth,gobble=2]
+ \centering
+ \suanpanset{scale = 0.65, innerfill = red5}
+ \begin{suanpan}
+ \rods{0, 6, 0}
+ \end{suanpan}
+\end{SideBySideExample}
+
+\changes{v1.2.2}{2024/09/07}{add font option
+ to set the font of mark.}
+\subsection{标记字体}
+
+\begin{option}{ opt = font, desc = {= \meta{标记字体}}, init=\tn{bfseries}\tn{Large} }
+ 设置标记字体。
+\end{option}
+
+\begin{SideBySideExample}[frame=single,numbers=left,%
+ xrightmargin=.40\linewidth,gobble=2]
+ \centering
+ \suanpanset{scale = 0.65,
+ font=\rmfamily\Huge}
+ \begin{suanpan}
+ \rods{0, 2, 6, 6, 9, 0}
+ \rodmark{4,3,2,1,0,-1}
+ \end{suanpan}
+\end{SideBySideExample}
+
+\bigskip
+
+\changes{v1.1.1}{2024/08/30}{add English documentation.}
+
+\title{
+ \pkg{suanpan-l3} package for traditional Chinese 7-bids suanpan(abacus)
+ \rlap{\makebox[4cm][r]{
+ \normalsize $\Longrightarrow$ \color{red}
+ \protect\hyperlink{zh}{中文版本}
+ \protect\hypertarget{en}{}
+ }}
+}
+\author{Nan Geng \texttt{<nangeng@nwafu.edu.cn>}}
+\date{\today\qquad \vers}
+
+\maketitle
+
+\section{Introduction}
+
+\pkg{suanpan-l3} is a traditional Chinese 7-bids suanpan drawing package
+utilizes \pkg{l3draw} and \pkg{TikZ} and is developed with \pkg{Expl3}.
+It can effectively manage both upper and lower bids, while also considering
+bottom bid, top bid, and hanging bid.
+
+This package offers a unique environment for drawing suanpan,
+denoted as \env{suanpan}. Within this environment, 8 specialized macros
+are available for the creation of suanpan. The \tn{rod} macro is used
+to lay out a single rod, while the \tn{rod*} macro draws a counting point
+on this rod’s beam. The \tn{rods} macro is capable of laying out a set of rods.
+The \tn{bid} macro colors the specified bid. The \tn{bids} macro colors
+all inner bids that are near the beam, while the \tn{bids*} macro colors
+all outer bids that are far from the beam. The \tn{rodmark} macro mark all rods
+on beam. Lastly, the \tn{mkframe} macro
+is used to lay out the left and right frames of an abacus.
+
+At the same time, the package offers customization options for suanpan,
+including line width, draw color, fill color, bid space, rod space, etc.
+These can be configured through package options, \env{suanpan} environment
+options, or the \tn{suanpanset} macro.
+
+\begin{center}
+ \begin{suanpan}[framedraw = brown2, scale = 0.45, bidsep=1.5pt,
+ roddraw = brown3, rodfill = brown4]
+ % rod's val list
+ \rods{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20}
+ % counting point
+ \rod*{4}{3}
+ \rod*{18}{17}
+ % top bid
+ \bid{12}{9}{azure5}
+ \bid{13}{9}{azure5}
+ \bid{14}{9}{azure5}
+ \bid{15}{9}{azure5}
+ \bid{16}{9}{azure5}
+ % hanging bid
+ \bid{17}{11}{red5}
+ \bid{18}{11}{red5}
+ \bid{19}{11}{red5}
+ \bid{20}{11}{red5}
+ \bid{21}{11}{red5}
+ % bottom bid
+ \bid{11}{3}{olive5}
+ \bid{16}{3}{olive5}
+ \bid{21}{3}{olive5}
+ \rodmark{21,20,19,{},17,16,15,14,13,12,11,10,9,8,7,6,5,{},3,2,1}
+ \mkframe
+ \end{suanpan}
+\end{center}
+
+\section{Interface}
+
+\subsection{\env{suanpan} environment}
+
+\begin{function}{suanpan}
+ \begin{syntax}
+ \tn{begin}|{suanpan}|\oarg{options}
+ .....
+ \tn{end}|{suanpan}|
+ \end{syntax}
+\end{function}
+
+ Typesetting 7-bids Chinese suanpan with \oarg{options}.
+
+ Within the \env{suanpan} environment, \tn{rod}, \tn{rod*}, \tn{rods}, \tn{bid},
+ \tn{bids}, \tn{bids*}, \tn{rodmark} and \tn{mkframe} 8 specialized macros
+ are available for the creation of suanpan.
+
+ \oarg{options} is a key-value list for line width, draw color, fill color,
+ bid space, rod space, etc.
+
+ \oarg{options} is environment's local setting.
+
+ \begin{noteen}
+ You should remove all blank line in \env{suanpan} environment.
+ \end{noteen}
+
+\begin{SideBySideExample}[frame=single,numbers=left,%
+ xrightmargin=.48\linewidth,gobble=2]
+ \centering
+ \suanpanset{scale = 0.65}
+ \begin{suanpan}
+ \rod{1}{0}
+ \rod{2}{3}
+ \rod{3}{0}
+ \end{suanpan}
+\end{SideBySideExample}
+
+\subsection{\env{suanpan}'s specialized macros}
+
+\subsubsection{\tn{rod}---single rod}
+
+\begin{function}{\rod}
+ \begin{syntax}
+ \cs{rod} \marg{num} \marg{val}
+ \end{syntax}
+\end{function}
+
+ The \tn{rod} macro is used to lay out a single rod.
+
+ The \marg{num} argument numbers the rods from left to right.
+ The \marg{val} is the number to be represented on the rod from
+ 0 to 20. For number within [0, 9], it is represented using 4 lower deck
+ bids and 1 upper deck bid. Numbers within [10, 15] are represented additionally
+ using bottom bid and top bid. For numbers within [16, 20], hanging bid is also
+ required for representation.
+
+ The starred version \tn{rod*} will draw a counting point on this rod's beam.
+
+\begin{SideBySideExample}[frame=single,numbers=left,%
+ xrightmargin=.48\linewidth,gobble=2]
+ \centering
+ \suanpanset{scale = 0.65}
+ \begin{suanpan}
+ \rod{1}{1} % normal rod
+ \rod{2}{6}
+ \rod*{3}{10} % counting point and
+ % bottom bid
+ \rod{4}{12} % top bid
+ \rod{5}{18} % hanging bid
+ \end{suanpan}
+\end{SideBySideExample}
+
+\subsubsection{\tn{rods}---a set of rods}
+
+\begin{function}{\rods}
+ \begin{syntax}
+ \cs{rods} \marg{val list}
+ \end{syntax}
+\end{function}
+
+ The \tn{rods} macro is used to lay out a set of rods.
+
+ The \marg{val list} is a value list of each rod seperated by commas.
+ Each rod number is automatically numbered from left to right.
+
+ Each value in \marg{val list} is the number to be represented on the rod from
+ 0 to 20. For number within [0, 9], it is represented using 4 lower deck
+ bids and 1 upper deck bid. Numbers within [10, 15] are represented additionally
+ using bottom bid and top bid. For numbers within [16, 20], hanging bid is also
+ required for representation.
+
+ \begin{noteen}
+ The starred version \tn{rods*} for counting point is not provided.
+ Use the \tn{rod*} macro to overlay the specified rod for drawing.
+ \end{noteen}
+
+\begin{SideBySideExample}[frame=single,numbers=left,%
+ xrightmargin=.48\linewidth,gobble=2]
+ \centering
+ \suanpanset{scale = 0.65}
+ \begin{suanpan}
+ \rods{0, 6, 12, 18, 0}
+ \rod*{3}{12}
+ \end{suanpan}
+\end{SideBySideExample}
+
+\subsubsection{\tn{bid}---color bid}
+
+\begin{function}{\bid}
+ \begin{syntax}
+ \cs{bid} \marg{num}\marg{pos list}\marg{fill color}\oarg{draw color}
+ \end{syntax}
+\end{function}
+
+ The \tn{bid} macro fills the specified bid.
+
+ The \marg{num} is the same as for \tn{rod}; the \marg{fill color} argument
+ defines the fill color and the comma-seperated \marg{pos list} argument tells
+ which bid has to be colored in \marg{num} rod. The \oarg{draw color} option
+ gives the draw color(default is inner bid draw color) .
+
+ The \marg{pos} in a rod is numbered from the bottom up in the order
+ $1, 2, \cdots, 11$. The lower deck bids occupies position
+ $1, 2, \cdots, 7$, the upper deck bids occupies position $8, 9, 10$,
+ and the hanging bead occupies position $11$ between $9$ and $10$ .
+
+\begin{SideBySideExample}[frame=single,numbers=left,%
+ xrightmargin=.48\linewidth,gobble=2]
+ \centering
+ \suanpanset{scale = 0.65}
+ \begin{suanpan}
+ \rods{0, 0, 7, 11, 8, 19}
+ \bid{1}{1}{brown5}
+ \bid{2}{5}{brown5}
+ \bid{3}{6}{red5}
+ \bid{4}{7}{red5}
+ \bid{4}{8}{azure5}
+ \bid{4}{9}{yellow5}
+ \bid{5}{10}{violet5}
+ \bid{6}{4,5,6,11}{teal4}[magenta5]
+ \end{suanpan}
+\end{SideBySideExample}
+
+\subsubsection{\tn{bids}---color inner/outer bids}
+
+\begin{function}{\bids}
+ \begin{syntax}
+ \cs{bids} \marg{num}\marg{val}\marg{color}
+ \end{syntax}
+\end{function}
+
+ The \tn{bids} macro fills all inner bids that are near the beam.
+
+ \marg{num} and \marg{color} are the same as for \tn{bid};
+ the \marg{val} argument is the same as for \tn{rod}.
+
+ The \marg{color} is fill color for inner bids. it also set
+ \texttt{innercolor} to be used for inner bids drawing color.
+
+ The starred version \tn{bids*} is used to color outer bids of \marg{num} rod.
+ it also set \texttt{outercolor} to be used for inner bids drawing color.
+
+ \begin{noteen}
+ This macro can only select the inner bids or the outer bids for coloring,
+ you can't select both the inner and outer bids at the same time.
+ \end{noteen}
+
+\begin{SideBySideExample}[frame=single,numbers=left,%
+ xrightmargin=.48\linewidth,gobble=2]
+ \centering
+ \suanpanset{scale = 0.65}
+ \begin{suanpan}
+ \rods{0, 0, 7, 11, 8, 19}
+ \bids{3}{7}{teal4}
+ \bids*{5}{8}{azure5}
+ \end{suanpan}
+\end{SideBySideExample}
+
+\subsubsection{\tn{rodmark} rod(s) marking on beam}
+
+\begin{function}{\rodmark}
+ \begin{syntax}
+ \cs{rodmark} \oarg{st}\marg{maker list}
+ \end{syntax}
+\end{function}
+
+ The \tn{rodmark} macro marks the rod(s) on the beam.
+
+ The \oarg{st} argument is the start rod and \marg{marker list}
+ is the marker list.
+
+ \begin{noteen}
+ If the number of \marg{marker List} exceeds the number of
+ rods from \oarg{st}, the excess markers will be ignored.
+ In the \marg{marker list}, it is possible to use a pair of
+ ``\{\}'' grouping to indicate blank marker.
+ \end{noteen}
+
+\begin{SideBySideExample}[frame=single,numbers=left,%
+ xrightmargin=.48\linewidth,gobble=2]
+ \centering
+ \suanpanset{scale = 0.65}
+ \begin{suanpan}
+ \rods{0, 2, 6, 6, 9, 0}
+ \rodmark{4,{},2,1,0,-1,-2}
+ \end{suanpan}
+\end{SideBySideExample}
+
+\begin{SideBySideExample}[frame=single,numbers=left,%
+ xrightmargin=.48\linewidth,gobble=2]
+ \centering
+ \suanpanset{scale = 0.65}
+ \begin{suanpan}
+ \rods{0, 2, 6, 6, 9, 0}
+ \rodmark[2]{Q,C,X,I}
+ \end{suanpan}
+\end{SideBySideExample}
+
+\subsubsection{\tn{mkframe}---layout frame}
+
+\begin{function}{\mkframe}
+ \begin{syntax}
+ \cs{mkframe}
+ \end{syntax}
+\end{function}
+
+ The \tn{mkframe} macro is used to lay out the frames of
+ a suanpan.
+
+\begin{SideBySideExample}[frame=single,numbers=left,%
+ xrightmargin=.48\linewidth,gobble=2]
+ \centering
+ \suanpanset{scale = 0.65}
+ \begin{suanpan}
+ \rods{0, 6, 12, 18, 0}
+ \mkframe
+ \end{suanpan}
+\end{SideBySideExample}
+
+\subsection{\tn{suanpanset}}
+
+\begin{function}{\suanpanset}
+ \begin{syntax}
+ \cs{suanpanset} \marg{options}
+ \end{syntax}
+\end{function}
+
+ The \tn{suanpanset} macro offers customization options for suanpan,
+ including line width, draw color, fill color, bid space, rod space, etc.
+
+ The \marg{options} is a key-value list.
+
+ The \marg{options} seted by the \cs{suanpanset} are valid for
+ all subsequent \env{suanpan} environments.
+
+\section{options}
+
+The \pkg{suanpan-l3} package offers customization options for abacus,
+including line width, draw color, fill color, bid space, rod space, etc.
+These can be configured through package \oarg{options}, \env{suanpan}
+environment \oarg{options}, or the \tn{suanpanset} macro.
+
+It is strongly recommended that suanpan options be set globally
+for a document uniformly via \oarg{options} of packages to save compilation time.
+Frequent use of \oarg{options} in \env{suanpan} environments or
+use of the \tn{suanpanset} command to set suanpan options should be avoided.
+
+The \oarg{options} is a comma-seperated list of options in the form
+\marg{key}|=|\marg{value}. The \marg{value} can be omitted for some options.
+For the same option, subsequent settings will override the previous one.
+
+The \pkg{suanpan-l3} package uses \LaTeX3 style key settings,
+supporting different types and levels of options. In the key list,
+spaces around ``='' do not affect the settings.
+However, it is important to note that blank lines are not allowed in the list.
+
+The ``|=true|'' in the \marg{option}|=true| for Boolean types can be omitted.
+
+\subsection{draft}
+
+\begin{option}{ opt = draft, desc = {= \meta{draft}}, init=false }
+ Draft mode.
+\end{option}
+
+ The \oarg{draft} option speeds up compilation by drawing
+ bids using round cap line, at same time it will remove all
+ highlight of bid(s), rod(s) and frame.
+
+ At the same time \oarg{draft} option will set the \oarg{empty} option
+ to \texttt{false} to remove all bids on empty rod.
+
+ \begin{noteen}
+ Suanpan layout in draft mode may differ from the desired layout.
+ \end{noteen}
+
+\begin{SideBySideExample}[frame=single,numbers=left,%
+ xrightmargin=.53\linewidth,gobble=2]
+ % \usepackage[draft]{suanpan}
+ \centering
+ \suanpanset{scale = 0.65}
+ \begin{suanpan}[draft]
+ \rods{0, 6, 12, 18, 0}
+ \end{suanpan}
+\end{SideBySideExample}
+
+\subsection{empty}
+
+\begin{option}{ opt = empty, desc = {= \meta{empty}}, init=true }
+ Remove bids on empty rod or not.
+\end{option}
+
+ The \oarg{empty} option will remove all bids on empty rod.
+
+ \begin{noteen}
+ If necessary, you can use the \tn{bid} or \tn{bids*} macro to
+ draw bid(s) for the empty rod.
+ \end{noteen}
+
+\begin{SideBySideExample}[frame=single,numbers=left,%
+ xrightmargin=.53\linewidth,gobble=2]
+ \centering
+ \suanpanset{scale = 0.65}
+ \begin{suanpan}[empty=false]
+ \rods{0, 6, 12, 18, 0}
+ \bids*{5}{0}{gray6}
+ \end{suanpan}
+\end{SideBySideExample}
+
+\subsection{line width}
+
+\begin{option}{ opt = linewd, desc = {= \meta{linewd}}, init=2pt }
+ Drawing line width.
+\end{option}
+
+ The \oarg{linewd} is used to set the line width of the frame inner,
+ and will also set the line width the frame outer to 7.00 times linewd,
+ and the rod and bid line widths to 1.00 times linewd.
+
+\begin{SideBySideExample}[frame=single,numbers=left,%
+ xrightmargin=.40\linewidth,gobble=2]
+ \centering
+ \suanpanset{scale = 0.65, linewd = 3pt}
+ \begin{suanpan}
+ \rods{0, 6, 12, 18, 0}
+ \end{suanpan}
+\end{SideBySideExample}
+
+\subsection{bid height}
+
+\begin{option}{ opt = bidh, desc = {= \meta{bidh}}, init=12mm }
+ The height of bid.
+\end{option}
+
+\begin{SideBySideExample}[frame=single,numbers=left,%
+ xrightmargin=.40\linewidth,gobble=2]
+ \centering
+ \suanpanset{scale = 0.65, bidh = 18mm}
+ \begin{suanpan}
+ \rods{0, 6, 0}
+ \end{suanpan}
+\end{SideBySideExample}
+
+\subsection{bid diameter}
+
+\begin{option}{ opt = bidd, desc = {= \meta{bidd}}, init=23mm }
+ The diameter of bid.
+\end{option}
+
+\begin{SideBySideExample}[frame=single,numbers=left,%
+ xrightmargin=.40\linewidth,gobble=2]
+ \centering
+ \suanpanset{scale = 0.65, bidd = 36mm}
+ \begin{suanpan}
+ \rods{0, 6, 0}
+ \end{suanpan}
+\end{SideBySideExample}
+
+\subsection{rod diameter}
+
+\begin{option}{ opt = rodd, desc = {= \meta{rodd}}, init=7mm }
+ The diameter of rod.
+\end{option}
+
+\begin{noteen}
+ The rodd should be smaller than the bidd.
+\end{noteen}
+
+\begin{SideBySideExample}[frame=single,numbers=left,%
+ xrightmargin=.40\linewidth,gobble=2]
+ \centering
+ \suanpanset{scale = 0.65, rodd = 3mm}
+ \begin{suanpan}
+ \rods{0, 6, 0}
+ \end{suanpan}
+\end{SideBySideExample}
+
+\subsection{frame width}
+
+\begin{option}{ opt = framew, desc = {= \meta{framew}}, init=13mm }
+ The width of frame.
+\end{option}
+
+\begin{SideBySideExample}[frame=single,numbers=left,%
+ xrightmargin=.40\linewidth,gobble=2]
+ \centering
+ \suanpanset{scale = 0.65, framew = 7mm}
+ \begin{suanpan}
+ \rods{0, 6, 12, 18, 0}
+ \mkframe
+ \end{suanpan}
+\end{SideBySideExample}
+
+\subsection{rod spacing}
+
+\begin{option}{ opt = rodsep, desc = {= \meta{rodsep}}, init=3.0pt }
+ The spacing between suanpan rods.
+\end{option}
+
+\begin{SideBySideExample}[frame=single,numbers=left,%
+ xrightmargin=.40\linewidth,gobble=2]
+ \centering
+ \suanpanset{scale = 0.65, rodsep = 15pt}
+ \begin{suanpan}
+ \rods{0, 6, 0}
+ \end{suanpan}
+\end{SideBySideExample}
+
+ \begin{noteen}
+ The \oarg{rodsep} will change the width of the suanpan.
+ \end{noteen}
+
+\subsection{bid spacing}
+
+\begin{option}{ opt = bidsep, desc = {= \meta{bidsep}}, init=1.8pt }
+ The spacing between suanpan bids.
+\end{option}
+
+\begin{SideBySideExample}[frame=single,numbers=left,%
+ xrightmargin=.40\linewidth,gobble=2]
+ \centering
+ \suanpanset{scale = 0.65, bidsep = 4pt}
+ \begin{suanpan}
+ \rods{0, 6, 0}
+ \end{suanpan}
+\end{SideBySideExample}
+
+ \begin{noteen}
+ The \oarg{bidsep} does not change the size of the suanpan.
+ But the height of each bid will be changed.
+ In addition, too small an bid height will cause distortion
+ of the rounded corners of the bid.
+ \end{noteen}
+
+\subsection{scale}
+
+\begin{option}{ opt = scale, desc = {= \meta{scale}}, init=1.0 }
+ Scaling factor of whole suanpan.
+\end{option}
+
+\begin{SideBySideExample}[frame=single,numbers=left,%
+ xrightmargin=.40\linewidth,gobble=2]
+ \centering
+ \suanpanset{scale = 1.20}
+ \begin{suanpan}
+ \rods{0, 6, 0}
+ \end{suanpan}
+\end{SideBySideExample}
+
+\subsection{frame color}
+
+\begin{option}{ opt = framedraw, desc = {= \meta{framedraw}}, init=black }
+ Frame drawing color.
+\end{option}
+
+\begin{SideBySideExample}[frame=single,numbers=left,%
+ xrightmargin=.37\linewidth,gobble=2]
+ \centering
+ \suanpanset{scale = 0.65, framedraw = brown3}
+ \begin{suanpan}
+ \rods{0, 6, 0}
+ \end{suanpan}
+\end{SideBySideExample}
+
+ \begin{noteen}
+ Frame colors include inner and outer of frame and beam colors.
+ \end{noteen}
+
+\subsection{rod drawing color}
+
+\begin{option}{ opt = roddraw, desc = {= \meta{roddraw}}, init=black }
+ Rod drawing color.
+\end{option}
+
+\begin{SideBySideExample}[frame=single,numbers=left,%
+ xrightmargin=.37\linewidth,gobble=2]
+ \centering
+ \suanpanset{scale = 0.65, roddraw = red8}
+ \begin{suanpan}
+ \rods{0, 6, 0}
+ \end{suanpan}
+\end{SideBySideExample}
+
+\subsection{rod filling color}
+
+\begin{option}{ opt = rodfill, desc = {= \meta{rodfill}}, init=white }
+ Rod filling color.
+\end{option}
+
+\begin{SideBySideExample}[frame=single,numbers=left,%
+ xrightmargin=.37\linewidth,gobble=2]
+ \centering
+ \suanpanset{scale = 0.65, rodfill = brown6}
+ \begin{suanpan}
+ \rods{0, 6, 0}
+ \end{suanpan}
+\end{SideBySideExample}
+
+\subsection{outer bids drawing color}
+
+\begin{option}{ opt = outerdraw, desc = {= \meta{outerdraw}}, init=black }
+ The outer bids\footnote{The outer bid is that is not counted away from the beam.}drawing color.
+\end{option}
+
+\begin{SideBySideExample}[frame=single,numbers=left,%
+ xrightmargin=.37\linewidth,gobble=2]
+ \centering
+ \suanpanset{scale = 0.65, outerdraw = red8}
+ \begin{suanpan}
+ \rods{0, 6, 0}
+ \end{suanpan}
+\end{SideBySideExample}
+
+\subsection{outer bids filling color}
+
+\begin{option}{ opt = outerfill, desc = {= \meta{outerfill}}, init=black!40 }
+ The outer bids filling color。
+\end{option}
+
+\begin{SideBySideExample}[frame=single,numbers=left,%
+ xrightmargin=.37\linewidth,gobble=2]
+ \centering
+ \suanpanset{scale = 0.65, outerfill = yellow6}
+ \begin{suanpan}
+ \rods{0, 6, 0}
+ \end{suanpan}
+\end{SideBySideExample}
+
+\subsection{inner bids drawing color}
+
+\begin{option}{ opt = innerdraw, desc = {= \meta{innerdraw}}, init=black }
+ The inner bids\footnote{The inner bid is that is counted near to the beam.}drawing color.
+\end{option}
+
+\begin{SideBySideExample}[frame=single,numbers=left,%
+ xrightmargin=.37\linewidth,gobble=2]
+ \centering
+ \suanpanset{scale = 0.65, innerdraw = red8}
+ \begin{suanpan}
+ \rods{0, 6, 0}
+ \end{suanpan}
+\end{SideBySideExample}
+
+\subsection{inner bids filling color}
+
+\begin{option}{ opt = innerfill, desc = {= \meta{innerfill}}, init=black}
+ The inner bids filling color.
+\end{option}
+
+\begin{SideBySideExample}[frame=single,numbers=left,%
+ xrightmargin=.37\linewidth,gobble=2]
+ \centering
+ \suanpanset{scale = 0.65, innerfill = red5}
+ \begin{suanpan}
+ \rods{0, 6, 0}
+ \end{suanpan}
+\end{SideBySideExample}
+
+\subsection{mark font}
+
+\begin{option}{ opt = font, desc = {= \meta{font}}, init=\tn{bfseries}\tn{Large} }
+ The font of mark(s).
+\end{option}
+
+\begin{SideBySideExample}[frame=single,numbers=left,%
+ xrightmargin=.40\linewidth,gobble=2]
+ \centering
+ \suanpanset{scale = 0.65,
+ font=\rmfamily\Huge}
+ \begin{suanpan}
+ \rods{0, 2, 6, 6, 9, 0}
+ \rodmark{4,3,2,1,0,-1}
+ \end{suanpan}
+\end{SideBySideExample}
+
+\end{documentation}
+
+\end{document}
diff --git a/macros/latex/contrib/tableof/README.md b/macros/latex/contrib/tableof/README.md
index fa5ea8d72b..2f0b93dd0a 100644
--- a/macros/latex/contrib/tableof/README.md
+++ b/macros/latex/contrib/tableof/README.md
@@ -2,9 +2,9 @@ tableof
=======
- Package: tableof (Tables of tagged contents)
-- Version: 1.4c (2021/07/05)
+- Version: 1.4d (2024/09/17)
- License: LPPL 1.3c
-- Copyright (C) 2012, 2013, 2015, 2018, 2021 Jean-Francois Burnol <jfbu at free dot fr>
+- Copyright (C) 2012, 2013, 2015, 2018, 2021, 2024 Jean-Francois Burnol <jfbu at free dot fr>
Provides `\toftagstart{}`, `\toftagstop{}`, `\toftagthis{}`, `\tofuntagthis{}`
to tag chapters, sections or any other sectioning units destined to end up in
@@ -31,6 +31,10 @@ usable only once, contrarily to the `\tableof{}` et al. package macros.
Change History
==============
+* v1.4d (2024/09/17) reestablishes compatibility with `hyperref`,
+ which got broken at the latter `v7.01c` release. The package now
+ requires LaTeX 2020-10-01. Thanks to Ekkart Kleinod for report.
+
* v1.4c (2021/07/05) additional efforts for `biblatex` compatibility.
Allow style file extraction via `etex`, reword the abstract. Use utf8
source encoding.
diff --git a/macros/latex/contrib/tableof/tableof.dtx b/macros/latex/contrib/tableof/tableof.dtx
index bd7a435cef..bd952ec2a3 100644
--- a/macros/latex/contrib/tableof/tableof.dtx
+++ b/macros/latex/contrib/tableof/tableof.dtx
@@ -1,14 +1,14 @@
% -*- coding: utf-8; -*-
%<*none>
-{\def\doctimestamp {Time-stamp: <05-07-2021 14:42:11 CEST>}%
+{\def\doctimestamp {Time-stamp: <17-09-2024 10:15:25 CEST>}%
\def\getdtxtimestamp #1 <#2 #3 #4>{#2 at #3 #4}%
\xdef\tofdtxtimestamp {\expandafter\getdtxtimestamp\doctimestamp }}%
%</none>
%%
%% Package: tableof
-%% Version: 1.4c (2021/07/05)
+%% Version: 1.4d (2024/09/17)
%% License: LPPL 1.3c
-%% Copyright (C) 2012, 2013, 2015, 2018, 2021 Jean-Francois Burnol <jfbu at free dot fr>
+%% Copyright (C) 2012, 2013, 2015, 2018, 2021, 2024 Jean-Francois Burnol <jfbu at free dot fr>
%%
% See README.md for installation instructions
%
@@ -22,8 +22,8 @@
% The Author of this Work is: Jean-Francois Burnol <jfbu at free dot fr>
%<*none>
\def\pkgname {tableof}
-\def\pkgdate {2021/07/05}
-\def\pkgversion {v1.4c}
+\def\pkgdate {2024/09/17}
+\def\pkgversion {v1.4d}
\def\pkgdescription {Tables of tagged contents (JFB)}
\begingroup
\input docstrip.tex
@@ -237,11 +237,85 @@ A,B,C
% \PassOptionsToPackage{dvipdfmx-outline-open}{bookmark}
%
\makeatother
-\documentclass[a4paper,fontsize=11pt,abstract]{scrdoc}
+\documentclass[a4paper,fontsize=11pt,abstract]{scrartcl}
+\makeatletter
+%%% START OF CUSTOM doc.sty LOADING (May 21, 2022 in xint.dtx)
+%%% (August 26, 2022 in etoc.dtx, comments trimmed)
+%%% (September 17, 2024 here, some unneeded stuff removed,
+%%% I do not have time to do the syntax coloring as in etoc.pdf,
+%%% and in particular there is here no reason to use doc=v2)
+
+
+% At 1.4d I wanted to use doc v3, but hypdoc is causing too much trouble.
+% - a warning in the log about hyperref already loaded,
+% - an overwrite of my hidelinks option,
+% - an impact on placement of codeline numbers in implementation part.
+\usepackage{doc}[=v2]
+% As explained above I was formerly using scrdoc hence ltxdoc indirectly.
+% Let's emulate here the little I appear to need from ltxdoc.cls and
+% srcdoc.cls.
+%
+\AtBeginDocument{\MakeShortVerb{\|}}
+\DeclareFontShape{OT1}{cmtt}{bx}{n}{<-> ssub * cmtt/m/n}{}
+\DeclareFontFamily{OMS}{cmtt}{\skewchar\font 48} % '60
+\DeclareFontShape{OMS}{cmtt}{m}{n}{<-> ssub * cmsy/m/n}{}
+\DeclareFontShape{OMS}{cmtt}{bx}{n}{<-> ssub * cmsy/b/n}{}
+\DeclareFontShape{OT1}{cmss}{m}{it}{<->ssub*cmss/m/sl}{}
+\CodelineNumbered
+% \EnableCrossrefs % but this will be hacked
+% \setcounter{StandardModuleDepth}{1} % we don't use this mechanism currently
+\def\cmd#1{\cs{\expandafter\cmd@to@cs\string#1}}
+\def\cmd@to@cs#1#2{\char\number`#2\relax}
+% Here I am loading doc=v2 but formerly I was using ltxdoc via scrdoc
+% which I dropped at release 1.4l (2022-05-29) and without much
+% thinking I had kept this.
+\DeclareRobustCommand\cs[1]{\texttt{\bslash#1}}
+% As I may have the * active, or macro names with _ or ^, I should
+% add \detokenize. But see below for a redefinition anyhow.
+%
+% More urgent is that I am also using hyperref and this definition gives wrong
+% bookmarks if \cs is used in section titles. As I had very very few usags of
+% \cs in the whole of xint.dtx, it took me a while to realize the problem
+% here. Turns out that doc=v3 by default loads hypdoc which includes this
+% configuration for hyperref compatibility:
+\AtBeginDocument{%
+\pdfstringdefDisableCommands{\def\cs#1{\textbackslash\detokenize{#1}}}%
+}%
+% As I have not loaded hyperref yet I must delay it to AtBeginDocument.
+\providecommand\marg[1]{%
+ {\ttfamily\char`\{}\meta{#1}{\ttfamily\char`\}}}
+\providecommand\oarg[1]{%
+ {\ttfamily[}\meta{#1}{\ttfamily]}}
+\providecommand\parg[1]{%
+ {\ttfamily(}\meta{#1}{\ttfamily)}}
+% \@addtoreset{CodelineNo}{part}% No need for this here
+% \def\partname{File}% \partname is "fixed" somewhere further down anyhow
+% No need for this, anyhow I don't build the indices
+% \gdef\codeline@wrindex#1{\if@filesw
+% \begingroup
+% \let\protect\noexpand
+% \immediate\write\@indexfile
+% {\string\indexentry{#1}%
+% {\filesep\number\c@CodelineNo}}%
+% \endgroup\fi}
+% \let\filesep\@empty
+
+% There is very little we seem to need from the scrdoc extras: page geometry
+% is set by geometry package and a4paper option from xint.tex file. So it
+% seems I only need the hologo loading:
+\usepackage{hologo}
+%\DeclareRobustCommand*{\eTeX}{\hologo{eTeX}}%
+%\DeclareRobustCommand*{\LuaTeX}{\hologo{LuaTeX}}%
+%
+\makeatother
+%%% end of ltxdoc+srcdoc emulation from June 2022 xint.dtx,
+%%% copied over almost verbatim to etoc.dtx on 2022/08/26,
+%%% and copied and trimmed for tableof.dtx 2024/09/17.
+
\pagestyle{headings}
\usepackage[T1]{fontenc}
\usepackage[hscale=0.66,vscale=0.76]{geometry}
-
+\usepackage{centeredline}
\usepackage{txfonts}
\DeclareFontFamily{T1}{txtt}{}
\DeclareFontShape{T1}{txtt}{m}{n}{ %medium
@@ -314,6 +388,15 @@ pdfkeywords={LaTeX, table of contents},%
pdfstartview=FitH,%
pdfpagemode=UseOutlines}
+
+% Finally 1.4d uses doc=v2
+% % Attention que hypdoc fait
+% % Package hyperref Info: Option `colorlinks' set `true' on input line 75.
+% % Package hyperref Info: Option `plainpages' set `false' on input line 75.
+% % Package hyperref Info: Option `bookmarksopen' set `true' on input line 75.
+% % Package hyperref Info: Option `bookmarksnumbered' set `true' on input line 75.
+% \AtBeginDocument{\hypersetup{hidelinks}}% fix de l'effet de hypdoc
+
\usepackage{bookmark}
\DeclareRobustCommand\csa[1]{{\ttfamily\char`\\#1}}
@@ -356,7 +439,7 @@ pdfpagemode=UseOutlines}
Package version: \pkgversion\ (\pkgdate)\\
Documentation generated from tableof.dtx
with timestamp \tofdtxtimestamp\\
- \textcopyright 2012, 2013, 2015, 2018, 2021 Jean-François Burnol
+ \textcopyright 2012, 2013, 2015, 2018, 2021, 2024 Jean-François Burnol
<jfbu (at) free (dot) fr>
\end{center}
@@ -554,10 +637,6 @@ Please consider: this command should \emph{not} be used when the
\section{Compatibility with other packages}
-\tableof checks if |hyperref| is loaded as |hyperref| modifies the format of the
-lines in the |.toc| file (and this must be taken into account). This check is
-done at the \csa{begin}|{document}| so the order of loading is not important.
-
\tableof requires the document |.toc| file to use the |\contentsline| macro
(possibly patched by other packages). It is thus incompatible with the
|beamer| class. However, if |beamer| is used in an article mode, i.e., with
@@ -585,6 +664,10 @@ tables of contents, apart from
\hangafter1 }
\makeatother
+|2024/09/17 v1.4d: |reestablish compatibility with |hyperref|,
+which got broken at the latter |v7.01c| release. The package now
+requires \LaTeX{} |2020-10-01|. Thanks to Ekkart Kleinod for report.
+
|2021/07/05 v1.4c: |ensure the added scope-limiting group for |\tableof{}|
and alike macros encompasses all contents of the |.toc| file even in presence
of packages hacking into these contents (in particular |biblatex|).
@@ -696,7 +779,7 @@ document uses standard |\tableofcontents| or like commands.
%</none>
%<*package>
% \begin{macrocode}
-\NeedsTeXFormat{LaTeX2e}
+\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{atveryend}
\DeclareOption*{\PackageWarning{tableof}{Option `\CurrentOption' is unknown.}}
\ProcessOptions\relax
@@ -738,7 +821,8 @@ document uses standard |\tableofcontents| or like commands.
% macro is used to typeset the TOC, it is now the one bearing the
% responsability for creating the scope-limiting group.
% \begin{macrocode}
-\AtBeginDocument{\IfFileExists{\jobname.toc}
+\AtBeginDocument{%
+ \IfFileExists{\jobname.toc}
{{\endlinechar\m@ne
\makeatletter
\newread\tof@tf
@@ -746,7 +830,9 @@ document uses standard |\tableofcontents| or like commands.
\tof@toctoks{\tof@begingroup}%
\tof@readtoc
\global\tof@toctoks=\expandafter{\the\tof@toctoks\tof@endgroup}%
- \closein\tof@tf}}{}}
+ \closein\tof@tf}}
+ {}%
+}
% \end{macrocode}
% The trick is that |\@ifundefined| chooses the undefined branch if the
% meaning is |\relax|. Thus it is possible for \tableof to define and use
@@ -771,26 +857,39 @@ document uses standard |\tableofcontents| or like commands.
% |1.4c| replaces |{}| (last argument of |\@ifundefined|) by |\relax|. No
% strong reason. We and \etoc use |\endlinechar-1| anyhow.
% \begin{macrocode}
-\AtBeginDocument{
+\AtBeginDocument{%
\addtocontents{toc}{\string\@ifundefined{tof@begin}%
{\global\let\string\tof@begin\relax
\global\let\string\tof@finish\string\@empty
\global\let\string\tof@starttags\string\@gobble
\global\let\string\tof@stoptags\string\@gobble
\global\let\string\tof@tagthis\string\@gobble
- \global\let\string\tof@untagthis\string\@gobble}\relax}
- \addtocontents{toc}{\string\tof@begin}
+ \global\let\string\tof@untagthis\string\@gobble}\relax}%
+ \addtocontents{toc}{\string\tof@begin}%
+}
% \end{macrocode}
-% \LaTeX\ of 2020 or 2021 always has |\contentsline| with four arguments.
+% \textbf{Now obsolete hyperref-related remark (see next paragraph)}:
+% {\itshape\LaTeX\ of 2020 or 2021 always has |\contentsline| with four arguments.
% So an update should be done here to always gobble four, else in absence
% of |hyperref| some |{}| are left. Does not seem to matter a lot except
% if all is executed in math mode... thanks to \etoc for example.
-% No urgency here, only mentioning for the record.
+% No urgency here, only mentioning for the record.}
+%
+% |hyperref| stopped defining its |\hyper@last| at its |7.01c| release in fall
+% of 2023, but \tableof tested for it, if |hyperref| was found to be present,
+% in case a document previously not using |hyperref| started using it on
+% second compilation, hence with a wrong |.toc| file format (in earlier
+% years). As \tableof was doing
+% \centeredline{|\ifx\hyper@last\@undefined\tof@toctoks{}\fi|} it now
+% unconditionally emptied |\tof@toctoks| in presence of |hyperref|. This is
+% the same problem which impacted \etoc and got fixed at its |1.2c| release
+% but unfortunately \tableof was not updated then. Belatedly fixed at |1.4d|
+% of |2024/09/17|.
+%
+% Formerly this was a short macro, but it doesn't look like a problem
+% to simply alias it to the long |\@gobblefour|.
% \begin{macrocode}
- \@ifpackageloaded{hyperref}
- {\def\tof@gobblethree@orfour#1#2#3#4{}%
- \ifx\hyper@last\@undefined\tof@toctoks{}\fi}
- {\def\tof@gobblethree@orfour#1#2#3{}}}
+\let\tof@gobblethree@orfour\@gobblefour
% \end{macrocode}
% |1.4b| (belatedly) fixes issue with |\tof@finish| getting lost due
% to a final |\clearpage| before |\end{document}|. Indeed, formerly
@@ -999,24 +1098,6 @@ document uses standard |\tableofcontents| or like commands.
\endinput
% \end{macrocode}
% \MakePercentComment
-\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 \~}
-
-\CheckSum{559}
-
\Finale
%%
%% End of file `tableof.dtx'.
diff --git a/macros/latex/contrib/tableof/tableof.pdf b/macros/latex/contrib/tableof/tableof.pdf
index f04fc964a0..1c2d6ae655 100644
--- a/macros/latex/contrib/tableof/tableof.pdf
+++ b/macros/latex/contrib/tableof/tableof.pdf
Binary files differ
diff --git a/macros/latex/contrib/tagpdf/README.md b/macros/latex/contrib/tagpdf/README.md
index edcdc6b5e6..7ba67de333 100644
--- a/macros/latex/contrib/tagpdf/README.md
+++ b/macros/latex/contrib/tagpdf/README.md
@@ -1,6 +1,6 @@
#tagpdf — A package to create tagged pdf
-Packageversion: 0.99d
-Packagedate: 2024/08/02
+Packageversion: 0.99f
+Packagedate: 2024/09/16
Author: Ulrike Fischer, LaTeX Project Team
## License
diff --git a/macros/latex/contrib/tagpdf/ex-AF-file.pdf b/macros/latex/contrib/tagpdf/ex-AF-file.pdf
index 9ba962e1e3..83a304a201 100644
--- a/macros/latex/contrib/tagpdf/ex-AF-file.pdf
+++ b/macros/latex/contrib/tagpdf/ex-AF-file.pdf
@@ -1,11 +1,11 @@
%PDF-2.0
%
22 0 obj
-<< /Subtype /application#2Fx-tex/Type /EmbeddedFile /Params<</ModDate (D:20240802125547+02'00') /Size 151 /CheckSum (D4716966C44F441B4E4C1D2DD929683B) >> /Length 151 >>
+<< /Subtype /application#2Fx-tex/Type /EmbeddedFile /Params<</ModDate (D:20240916231350+02'00') /Size 151 /CheckSum (F1F871442F296ACB6365DC9AC224F015) >> /Length 151 >>
stream
%% LaTeX2e file `example-input-file.tex'
%% generated by the `filecontents' environment
-%% from source `ex-AF-file' on 2024/08/02.
+%% from source `ex-AF-file' on 2024/09/16.
%%
Additional info!
@@ -15,7 +15,7 @@ endobj
<< /Type /Filespec /AFRelationship /Unspecified /F (example-input-file.tex) /UF <FEFF006500780061006D0070006C0065002D0069006E007000750074002D00660069006C0065002E007400650078> /EF<</F 22 0 R/UF 22 0 R>> >>
endobj
25 0 obj
-<< /Subtype /text#2Fplain/Type /EmbeddedFile /Params<</ModDate (D:20240802) >> /Length 19 >>
+<< /Subtype /text#2Fplain/Type /EmbeddedFile /Params<</ModDate (D:20240916) >> /Length 19 >>
stream
Bär with teh shirt
endstream
@@ -24,7 +24,7 @@ endobj
<< /Type /Filespec /AFRelationship /Supplement /F (tag-AFfile1.txt) /UF <FEFF007400610067002D0041004600660069006C00650031002E007400780074> /EF<</F 25 0 R/UF 25 0 R>> >>
endobj
28 0 obj
-<< /Subtype /text#2Fplain/Type /EmbeddedFile /Params<</ModDate (D:20240802) >> /Length 4 >>
+<< /Subtype /text#2Fplain/Type /EmbeddedFile /Params<</ModDate (D:20240916) >> /Length 4 >>
stream
Duck
endstream
@@ -33,7 +33,7 @@ endobj
<< /Type /Filespec /AFRelationship /Supplement /F (tag-AFfile2.txt) /UF <FEFF007400610067002D0041004600660069006C00650032002E007400780074> /EF<</F 28 0 R/UF 28 0 R>> >>
endobj
31 0 obj
-<< /Type /Metadata /Subtype /XML /Length 11382 >>
+<< /Type /Metadata /Subtype /XML /Length 11713 >>
stream
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
@@ -88,6 +88,12 @@ stream
<pdfaProperty:category>internal</pdfaProperty:category>
<pdfaProperty:description>Year of standard</pdfaProperty:description>
</rdf:li>
+ <rdf:li rdf:parseType="Resource">
+ <pdfaProperty:name>rev</pdfaProperty:name>
+ <pdfaProperty:valueType>Integer</pdfaProperty:valueType>
+ <pdfaProperty:category>internal</pdfaProperty:category>
+ <pdfaProperty:description>Revision year of standard</pdfaProperty:description>
+ </rdf:li>
</rdf:Seq>
</pdfaSchema:property>
</rdf:li>
@@ -242,17 +248,17 @@ stream
</dc:language>
<dc:date>
<rdf:Seq>
- <rdf:li>2024-08-02T12:56:09+02:00</rdf:li>
+ <rdf:li>2024-09-16T23:14:06+02:00</rdf:li>
</rdf:Seq>
</dc:date>
<dc:format>application/pdf</dc:format>
<dc:source>ex-AF-file.tex</dc:source>
<xmp:CreatorTool>LaTeX</xmp:CreatorTool>
- <xmp:CreateDate>2024-08-02T12:56:09+02:00</xmp:CreateDate>
- <xmp:ModifyDate>2024-08-02T12:56:09+02:00</xmp:ModifyDate>
- <xmp:MetadataDate>2024-08-02T12:56:09+02:00</xmp:MetadataDate>
+ <xmp:CreateDate>2024-09-16T23:14:06+02:00</xmp:CreateDate>
+ <xmp:ModifyDate>2024-09-16T23:14:06+02:00</xmp:ModifyDate>
+ <xmp:MetadataDate>2024-09-16T23:14:06+02:00</xmp:MetadataDate>
<xmpMM:DocumentID>uuid:38d5a844-2217-4081-87cc-b2129dc357a6</xmpMM:DocumentID>
- <xmpMM:InstanceID>uuid:3ff2b426-7c06-4861-8f14-4e8e04ac9b4c</xmpMM:InstanceID>
+ <xmpMM:InstanceID>uuid:f3e8d74f-e578-4148-81cf-4735ea173170</xmpMM:InstanceID>
<prism:complianceProfile>three</prism:complianceProfile>
<prism:pageCount>1</prism:pageCount>
</rdf:Description>
@@ -347,7 +353,7 @@ endobj
<< /Type /Namespace /NS (https://www.latex-project.org/ns/book/2022) /RoleMapNS 18 0 R >>
endobj
19 0 obj
-<< /Type /Namespace /NS (data:,BBA64916-90D9-A0B9-F592-8E68FD20F532) >>
+<< /Type /Namespace /NS (data:,4A2CE27A-F4B-3881-D950-B43D7275F9F5) >>
endobj
8 0 obj
[ 9 0 R 11 0 R 13 0 R 15 0 R 17 0 R 19 0 R ]
@@ -449,59 +455,59 @@ endobj
<< /Type /Catalog /Pages 36 0 R /MarkInfo 37 0 R/Lang (de-DE)/Metadata 31 0 R/StructTreeRoot 5 0 R >>
endobj
46 0 obj
-<< /Producer (luahbtex-1.18.0)/Creator (LaTeX)/CreationDate (D:20240802125609+02'00')/ModDate (D:20240802125609+02'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)) >>
+<< /Producer (luahbtex-1.18.0)/Creator (LaTeX)/CreationDate (D:20240916231406+02'00')/ModDate (D:20240916231406+02'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)) >>
endobj
xref
0 47
0000000002 65535 f
-0000013544 00000 n
+0000013875 00000 n
0000000003 00000 f
0000000004 00000 f
0000000010 00000 f
-0000016362 00000 n
-0000013627 00000 n
-0000013838 00000 n
-0000015792 00000 n
-0000014417 00000 n
+0000016692 00000 n
+0000013958 00000 n
+0000014169 00000 n
+0000016122 00000 n
+0000014748 00000 n
0000000012 00000 f
-0000014485 00000 n
+0000014816 00000 n
0000000014 00000 f
-0000014555 00000 n
+0000014886 00000 n
0000000020 00000 f
-0000015318 00000 n
-0000014636 00000 n
-0000015596 00000 n
-0000015425 00000 n
-0000015703 00000 n
+0000015649 00000 n
+0000014967 00000 n
+0000015927 00000 n
+0000015756 00000 n
+0000016034 00000 n
0000000000 00000 f
-0000015853 00000 n
+0000016183 00000 n
0000000020 00000 n
0000000382 00000 n
-0000015966 00000 n
+0000016296 00000 n
0000000603 00000 n
0000000758 00000 n
-0000016098 00000 n
+0000016428 00000 n
0000000943 00000 n
0000001083 00000 n
-0000016230 00000 n
+0000016560 00000 n
0000001268 00000 n
-0000013481 00000 n
-0000013346 00000 n
-0000012740 00000 n
-0000020115 00000 n
-0000020469 00000 n
-0000013591 00000 n
-0000013684 00000 n
-0000013801 00000 n
-0000016482 00000 n
-0000018931 00000 n
-0000016668 00000 n
-0000019152 00000 n
-0000020269 00000 n
-0000020531 00000 n
-0000020649 00000 n
+0000013812 00000 n
+0000013677 00000 n
+0000013071 00000 n
+0000020445 00000 n
+0000020799 00000 n
+0000013922 00000 n
+0000014015 00000 n
+0000014132 00000 n
+0000016812 00000 n
+0000019261 00000 n
+0000016998 00000 n
+0000019482 00000 n
+0000020599 00000 n
+0000020861 00000 n
+0000020979 00000 n
trailer
-<< /Size 47 /Root 45 0 R /Info 46 0 R /ID [ <E2F9D94DBDFC11D2EE5801BA51FD5C99> <E2F9D94DBDFC11D2EE5801BA51FD5C99> ] >>
+<< /Size 47 /Root 45 0 R /Info 46 0 R /ID [ <CAF46A2B1E52D3AE87EB05AABC0D2D7E> <CAF46A2B1E52D3AE87EB05AABC0D2D7E> ] >>
startxref
-20872
+21202
%%EOF
diff --git a/macros/latex/contrib/tagpdf/ex-alt-actualtext.pdf b/macros/latex/contrib/tagpdf/ex-alt-actualtext.pdf
index f64d4e66bf..b98f65296d 100644
--- a/macros/latex/contrib/tagpdf/ex-alt-actualtext.pdf
+++ b/macros/latex/contrib/tagpdf/ex-alt-actualtext.pdf
Binary files differ
diff --git a/macros/latex/contrib/tagpdf/ex-attribute.pdf b/macros/latex/contrib/tagpdf/ex-attribute.pdf
index feda9e252a..3690dceabf 100644
--- a/macros/latex/contrib/tagpdf/ex-attribute.pdf
+++ b/macros/latex/contrib/tagpdf/ex-attribute.pdf
@@ -7,7 +7,7 @@ endobj
<< <</O /Layout /Borderstyle /Dotted >> >>
endobj
21 0 obj
-<< /Type /Metadata /Subtype /XML /Length 11384 >>
+<< /Type /Metadata /Subtype /XML /Length 11715 >>
stream
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
@@ -62,6 +62,12 @@ stream
<pdfaProperty:category>internal</pdfaProperty:category>
<pdfaProperty:description>Year of standard</pdfaProperty:description>
</rdf:li>
+ <rdf:li rdf:parseType="Resource">
+ <pdfaProperty:name>rev</pdfaProperty:name>
+ <pdfaProperty:valueType>Integer</pdfaProperty:valueType>
+ <pdfaProperty:category>internal</pdfaProperty:category>
+ <pdfaProperty:description>Revision year of standard</pdfaProperty:description>
+ </rdf:li>
</rdf:Seq>
</pdfaSchema:property>
</rdf:li>
@@ -216,17 +222,17 @@ stream
</dc:language>
<dc:date>
<rdf:Seq>
- <rdf:li>2024-08-02T12:57:08+02:00</rdf:li>
+ <rdf:li>2024-09-16T23:14:51+02:00</rdf:li>
</rdf:Seq>
</dc:date>
<dc:format>application/pdf</dc:format>
<dc:source>ex-attribute.tex</dc:source>
<xmp:CreatorTool>LaTeX</xmp:CreatorTool>
- <xmp:CreateDate>2024-08-02T12:57:08+02:00</xmp:CreateDate>
- <xmp:ModifyDate>2024-08-02T12:57:08+02:00</xmp:ModifyDate>
- <xmp:MetadataDate>2024-08-02T12:57:08+02:00</xmp:MetadataDate>
+ <xmp:CreateDate>2024-09-16T23:14:51+02:00</xmp:CreateDate>
+ <xmp:ModifyDate>2024-09-16T23:14:51+02:00</xmp:ModifyDate>
+ <xmp:MetadataDate>2024-09-16T23:14:51+02:00</xmp:MetadataDate>
<xmpMM:DocumentID>uuid:7a9cf910-1c19-429a-8f24-339c62d8a57f</xmpMM:DocumentID>
- <xmpMM:InstanceID>uuid:b262e437-7e89-4c42-8e29-bedae4c498b6</xmpMM:InstanceID>
+ <xmpMM:InstanceID>uuid:cc63fc15-f109-4c23-87e0-ae054c5fc24a</xmpMM:InstanceID>
<prism:complianceProfile>three</prism:complianceProfile>
<prism:pageCount>1</prism:pageCount>
</rdf:Description>
@@ -450,51 +456,51 @@ endobj
<< /Type /Catalog /Pages 26 0 R /MarkInfo 27 0 R/Lang (de_DE)/Metadata 21 0 R/StructTreeRoot 5 0 R >>
endobj
38 0 obj
-<< /Producer (luahbtex-1.18.0)/Creator (LaTeX)/Title (Title)/CreationDate (D:20240802125708+02'00')/ModDate (D:20240802125708+02'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)) >>
+<< /Producer (luahbtex-1.18.0)/Creator (LaTeX)/Title (Title)/CreationDate (D:20240916231451+02'00')/ModDate (D:20240916231451+02'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)) >>
endobj
xref
0 39
0000000002 65535 f
-0000012845 00000 n
+0000013176 00000 n
0000000003 00000 f
0000000004 00000 f
0000000008 00000 f
-0000014965 00000 n
-0000012928 00000 n
-0000013247 00000 n
+0000015296 00000 n
+0000013259 00000 n
+0000013578 00000 n
0000000000 00000 f
-0000013953 00000 n
-0000014038 00000 n
-0000014130 00000 n
-0000014214 00000 n
-0000014304 00000 n
+0000014284 00000 n
+0000014369 00000 n
+0000014461 00000 n
+0000014545 00000 n
+0000014635 00000 n
0000000020 00000 n
0000000071 00000 n
-0000014433 00000 n
-0000014573 00000 n
-0000014657 00000 n
-0000014747 00000 n
-0000014856 00000 n
+0000014764 00000 n
+0000014904 00000 n
+0000014988 00000 n
+0000015078 00000 n
+0000015187 00000 n
0000000132 00000 n
-0000012758 00000 n
-0000012616 00000 n
-0000011606 00000 n
-0000017305 00000 n
-0000017659 00000 n
-0000012892 00000 n
-0000012992 00000 n
-0000013210 00000 n
-0000013826 00000 n
-0000015083 00000 n
-0000016261 00000 n
-0000015160 00000 n
-0000015234 00000 n
-0000016497 00000 n
-0000017459 00000 n
-0000017721 00000 n
-0000017839 00000 n
+0000013089 00000 n
+0000012947 00000 n
+0000011937 00000 n
+0000017636 00000 n
+0000017990 00000 n
+0000013223 00000 n
+0000013323 00000 n
+0000013541 00000 n
+0000014157 00000 n
+0000015414 00000 n
+0000016592 00000 n
+0000015491 00000 n
+0000015565 00000 n
+0000016828 00000 n
+0000017790 00000 n
+0000018052 00000 n
+0000018170 00000 n
trailer
-<< /Size 39 /Root 37 0 R /Info 38 0 R /ID [ <2033D8BFB67E1F1EDFB190E1DEC10A2C> <2033D8BFB67E1F1EDFB190E1DEC10A2C> ] >>
+<< /Size 39 /Root 37 0 R /Info 38 0 R /ID [ <D8FFE97D0CAF78CED294D3AF8DA45DD2> <D8FFE97D0CAF78CED294D3AF8DA45DD2> ] >>
startxref
-18076
+18407
%%EOF
diff --git a/macros/latex/contrib/tagpdf/ex-formula-problem.pdf b/macros/latex/contrib/tagpdf/ex-formula-problem.pdf
index 637338d16f..3be4493a87 100644
--- a/macros/latex/contrib/tagpdf/ex-formula-problem.pdf
+++ b/macros/latex/contrib/tagpdf/ex-formula-problem.pdf
@@ -30,7 +30,7 @@ endobj
<< /ExtGState 1 0 R /Font << /F15 15 0 R >> /ProcSet [ /PDF /Text ] >>
endobj
19 0 obj
-<< /Type /Metadata /Subtype /XML /Length 11390 >>
+<< /Type /Metadata /Subtype /XML /Length 11721 >>
stream
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
@@ -85,6 +85,12 @@ stream
<pdfaProperty:category>internal</pdfaProperty:category>
<pdfaProperty:description>Year of standard</pdfaProperty:description>
</rdf:li>
+ <rdf:li rdf:parseType="Resource">
+ <pdfaProperty:name>rev</pdfaProperty:name>
+ <pdfaProperty:valueType>Integer</pdfaProperty:valueType>
+ <pdfaProperty:category>internal</pdfaProperty:category>
+ <pdfaProperty:description>Revision year of standard</pdfaProperty:description>
+ </rdf:li>
</rdf:Seq>
</pdfaSchema:property>
</rdf:li>
@@ -239,17 +245,17 @@ stream
</dc:language>
<dc:date>
<rdf:Seq>
- <rdf:li>2024-08-02T12:57:37+02:00</rdf:li>
+ <rdf:li>2024-09-16T23:15:14+02:00</rdf:li>
</rdf:Seq>
</dc:date>
<dc:format>application/pdf</dc:format>
<dc:source>ex-formula-problem.tex</dc:source>
<xmp:CreatorTool>LaTeX</xmp:CreatorTool>
- <xmp:CreateDate>2024-08-02T12:57:37+02:00</xmp:CreateDate>
- <xmp:ModifyDate>2024-08-02T12:57:37+02:00</xmp:ModifyDate>
- <xmp:MetadataDate>2024-08-02T12:57:37+02:00</xmp:MetadataDate>
+ <xmp:CreateDate>2024-09-16T23:15:14+02:00</xmp:CreateDate>
+ <xmp:ModifyDate>2024-09-16T23:15:14+02:00</xmp:ModifyDate>
+ <xmp:MetadataDate>2024-09-16T23:15:14+02:00</xmp:MetadataDate>
<xmpMM:DocumentID>uuid:8eb2ce1d-b2ec-440a-8bc2-73733eb3eeb0</xmpMM:DocumentID>
- <xmpMM:InstanceID>uuid:8fbc3896-5f57-401a-81d8-1fdb02abac8a</xmpMM:InstanceID>
+ <xmpMM:InstanceID>uuid:07852560-d6c8-4db0-8dcb-56801fad3639</xmpMM:InstanceID>
<prism:complianceProfile>three</prism:complianceProfile>
<prism:pageCount>2</prism:pageCount>
</rdf:Description>
@@ -425,46 +431,46 @@ endobj
<< /Type /Catalog /Pages 16 0 R /MarkInfo 23 0 R/Lang (de-DE)/Metadata 19 0 R/StructTreeRoot 5 0 R >>
endobj
33 0 obj
-<< /Producer (luahbtex-1.18.0)/Creator (LaTeX)/CreationDate (D:20240802125737+02'00')/ModDate (D:20240802125737+02'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)) >>
+<< /Producer (luahbtex-1.18.0)/Creator (LaTeX)/CreationDate (D:20240916231514+02'00')/ModDate (D:20240916231514+02'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)) >>
endobj
xref
0 34
0000000002 65535 f
-0000012816 00000 n
+0000013147 00000 n
0000000003 00000 f
0000000004 00000 f
0000000008 00000 f
-0000014379 00000 n
-0000012899 00000 n
-0000013137 00000 n
+0000014710 00000 n
+0000013230 00000 n
+0000013468 00000 n
0000000000 00000 f
-0000013716 00000 n
-0000013823 00000 n
-0000013929 00000 n
+0000014047 00000 n
+0000014154 00000 n
+0000014260 00000 n
0000000637 00000 n
0000000502 00000 n
0000000020 00000 n
-0000018463 00000 n
-0000018817 00000 n
-0000014041 00000 n
-0000014147 00000 n
+0000018794 00000 n
+0000019148 00000 n
+0000014372 00000 n
+0000014478 00000 n
0000000724 00000 n
-0000012729 00000 n
-0000012594 00000 n
-0000012204 00000 n
-0000012863 00000 n
-0000012969 00000 n
-0000013100 00000 n
-0000014480 00000 n
-0000017236 00000 n
-0000014681 00000 n
-0000014757 00000 n
-0000017472 00000 n
-0000018617 00000 n
-0000018886 00000 n
-0000019004 00000 n
+0000013060 00000 n
+0000012925 00000 n
+0000012535 00000 n
+0000013194 00000 n
+0000013300 00000 n
+0000013431 00000 n
+0000014811 00000 n
+0000017567 00000 n
+0000015012 00000 n
+0000015088 00000 n
+0000017803 00000 n
+0000018948 00000 n
+0000019217 00000 n
+0000019335 00000 n
trailer
-<< /Size 34 /Root 32 0 R /Info 33 0 R /ID [ <84EDE341B761805B059537E407E8C0CD> <84EDE341B761805B059537E407E8C0CD> ] >>
+<< /Size 34 /Root 32 0 R /Info 33 0 R /ID [ <BE560A5AB892B55B8DEB50F7C89AA5EB> <BE560A5AB892B55B8DEB50F7C89AA5EB> ] >>
startxref
-19227
+19558
%%EOF
diff --git a/macros/latex/contrib/tagpdf/ex-list.pdf b/macros/latex/contrib/tagpdf/ex-list.pdf
index 381477d829..bff3e7f266 100644
--- a/macros/latex/contrib/tagpdf/ex-list.pdf
+++ b/macros/latex/contrib/tagpdf/ex-list.pdf
@@ -1,7 +1,7 @@
%PDF-1.7
%
48 0 obj
-<< /Type /Metadata /Subtype /XML /Length 11376 >>
+<< /Type /Metadata /Subtype /XML /Length 11707 >>
stream
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
@@ -56,6 +56,12 @@ stream
<pdfaProperty:category>internal</pdfaProperty:category>
<pdfaProperty:description>Year of standard</pdfaProperty:description>
</rdf:li>
+ <rdf:li rdf:parseType="Resource">
+ <pdfaProperty:name>rev</pdfaProperty:name>
+ <pdfaProperty:valueType>Integer</pdfaProperty:valueType>
+ <pdfaProperty:category>internal</pdfaProperty:category>
+ <pdfaProperty:description>Revision year of standard</pdfaProperty:description>
+ </rdf:li>
</rdf:Seq>
</pdfaSchema:property>
</rdf:li>
@@ -210,17 +216,17 @@ stream
</dc:language>
<dc:date>
<rdf:Seq>
- <rdf:li>2024-08-02T12:58:08+02:00</rdf:li>
+ <rdf:li>2024-09-16T23:15:40+02:00</rdf:li>
</rdf:Seq>
</dc:date>
<dc:format>application/pdf</dc:format>
<dc:source>ex-list.tex</dc:source>
<xmp:CreatorTool>LaTeX</xmp:CreatorTool>
- <xmp:CreateDate>2024-08-02T12:58:08+02:00</xmp:CreateDate>
- <xmp:ModifyDate>2024-08-02T12:58:08+02:00</xmp:ModifyDate>
- <xmp:MetadataDate>2024-08-02T12:58:08+02:00</xmp:MetadataDate>
+ <xmp:CreateDate>2024-09-16T23:15:40+02:00</xmp:CreateDate>
+ <xmp:ModifyDate>2024-09-16T23:15:40+02:00</xmp:ModifyDate>
+ <xmp:MetadataDate>2024-09-16T23:15:40+02:00</xmp:MetadataDate>
<xmpMM:DocumentID>uuid:4c749825-1de7-414c-879f-29e4d0bef66e</xmpMM:DocumentID>
- <xmpMM:InstanceID>uuid:0803684d-fad7-4d08-8dc2-c5108f24d889</xmpMM:InstanceID>
+ <xmpMM:InstanceID>uuid:663679a3-cbaa-41c1-8541-e27efe5bf460</xmpMM:InstanceID>
<prism:complianceProfile>three</prism:complianceProfile>
<prism:pageCount>1</prism:pageCount>
</rdf:Description>
@@ -654,85 +660,85 @@ endobj
<< /Type /Catalog /Pages 54 0 R /MarkInfo 55 0 R/Lang (en)/Metadata 48 0 R/StructTreeRoot 5 0 R >>
endobj
72 0 obj
-<< /Producer (luahbtex-1.18.0)/Creator (LaTeX)/CreationDate (D:20240802125808+02'00')/ModDate (D:20240802125808+02'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)) >>
+<< /Producer (luahbtex-1.18.0)/Creator (LaTeX)/CreationDate (D:20240916231540+02'00')/ModDate (D:20240916231540+02'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)) >>
endobj
xref
0 73
0000000002 65535 f
-0000013509 00000 n
+0000013840 00000 n
0000000003 00000 f
0000000004 00000 f
0000000008 00000 f
-0000019047 00000 n
-0000013592 00000 n
-0000014431 00000 n
+0000019378 00000 n
+0000013923 00000 n
+0000014762 00000 n
0000000000 00000 f
-0000015228 00000 n
-0000015329 00000 n
-0000015405 00000 n
-0000015481 00000 n
-0000015568 00000 n
-0000015675 00000 n
-0000015765 00000 n
-0000015875 00000 n
-0000015959 00000 n
-0000016047 00000 n
-0000016170 00000 n
-0000016260 00000 n
-0000016370 00000 n
-0000016454 00000 n
-0000016542 00000 n
-0000016665 00000 n
-0000016752 00000 n
-0000016863 00000 n
-0000016953 00000 n
-0000017063 00000 n
-0000017147 00000 n
-0000017235 00000 n
-0000017358 00000 n
-0000017448 00000 n
-0000017558 00000 n
-0000017642 00000 n
-0000017730 00000 n
-0000017853 00000 n
-0000017940 00000 n
-0000018055 00000 n
-0000018145 00000 n
-0000018255 00000 n
-0000018339 00000 n
-0000018427 00000 n
-0000018550 00000 n
-0000018640 00000 n
-0000018751 00000 n
-0000018835 00000 n
-0000018923 00000 n
+0000015559 00000 n
+0000015660 00000 n
+0000015736 00000 n
+0000015812 00000 n
+0000015899 00000 n
+0000016006 00000 n
+0000016096 00000 n
+0000016206 00000 n
+0000016290 00000 n
+0000016378 00000 n
+0000016501 00000 n
+0000016591 00000 n
+0000016701 00000 n
+0000016785 00000 n
+0000016873 00000 n
+0000016996 00000 n
+0000017083 00000 n
+0000017194 00000 n
+0000017284 00000 n
+0000017394 00000 n
+0000017478 00000 n
+0000017566 00000 n
+0000017689 00000 n
+0000017779 00000 n
+0000017889 00000 n
+0000017973 00000 n
+0000018061 00000 n
+0000018184 00000 n
+0000018271 00000 n
+0000018386 00000 n
+0000018476 00000 n
+0000018586 00000 n
+0000018670 00000 n
+0000018758 00000 n
+0000018881 00000 n
+0000018971 00000 n
+0000019082 00000 n
+0000019166 00000 n
+0000019254 00000 n
0000000020 00000 n
-0000013410 00000 n
-0000013268 00000 n
-0000011486 00000 n
-0000029174 00000 n
-0000022222 00000 n
-0000029528 00000 n
-0000013556 00000 n
-0000013712 00000 n
-0000014394 00000 n
-0000015023 00000 n
-0000019165 00000 n
-0000021124 00000 n
-0000019297 00000 n
-0000019371 00000 n
-0000021358 00000 n
-0000022373 00000 n
-0000022570 00000 n
-0000027709 00000 n
-0000022906 00000 n
-0000023029 00000 n
-0000027945 00000 n
-0000029328 00000 n
-0000029590 00000 n
-0000029705 00000 n
+0000013741 00000 n
+0000013599 00000 n
+0000011817 00000 n
+0000029505 00000 n
+0000022553 00000 n
+0000029859 00000 n
+0000013887 00000 n
+0000014043 00000 n
+0000014725 00000 n
+0000015354 00000 n
+0000019496 00000 n
+0000021455 00000 n
+0000019628 00000 n
+0000019702 00000 n
+0000021689 00000 n
+0000022704 00000 n
+0000022901 00000 n
+0000028040 00000 n
+0000023237 00000 n
+0000023360 00000 n
+0000028276 00000 n
+0000029659 00000 n
+0000029921 00000 n
+0000030036 00000 n
trailer
-<< /Size 73 /Root 71 0 R /Info 72 0 R /ID [ <0EE2DD31789AD5C7E80F8407D72CF075> <0EE2DD31789AD5C7E80F8407D72CF075> ] >>
+<< /Size 73 /Root 71 0 R /Info 72 0 R /ID [ <47141410601154CA87EA5F9B05C19636> <47141410601154CA87EA5F9B05C19636> ] >>
startxref
-29928
+30259
%%EOF
diff --git a/macros/latex/contrib/tagpdf/ex-mc-manual-para-split-obsolete.pdf b/macros/latex/contrib/tagpdf/ex-mc-manual-para-split-obsolete.pdf
index 6d60e10736..c4deafa33d 100644
--- a/macros/latex/contrib/tagpdf/ex-mc-manual-para-split-obsolete.pdf
+++ b/macros/latex/contrib/tagpdf/ex-mc-manual-para-split-obsolete.pdf
@@ -34,7 +34,7 @@ endobj
<< /ExtGState 1 0 R /Font << /F15 13 0 R >> /ProcSet [ /PDF /Text ] >>
endobj
15 0 obj
-<< /Type /Metadata /Subtype /XML /Length 11401 >>
+<< /Type /Metadata /Subtype /XML /Length 11732 >>
stream
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
@@ -89,6 +89,12 @@ stream
<pdfaProperty:category>internal</pdfaProperty:category>
<pdfaProperty:description>Year of standard</pdfaProperty:description>
</rdf:li>
+ <rdf:li rdf:parseType="Resource">
+ <pdfaProperty:name>rev</pdfaProperty:name>
+ <pdfaProperty:valueType>Integer</pdfaProperty:valueType>
+ <pdfaProperty:category>internal</pdfaProperty:category>
+ <pdfaProperty:description>Revision year of standard</pdfaProperty:description>
+ </rdf:li>
</rdf:Seq>
</pdfaSchema:property>
</rdf:li>
@@ -243,17 +249,17 @@ stream
</dc:language>
<dc:date>
<rdf:Seq>
- <rdf:li>2024-08-02T12:58:35+02:00</rdf:li>
+ <rdf:li>2024-09-16T23:16:06+02:00</rdf:li>
</rdf:Seq>
</dc:date>
<dc:format>application/pdf</dc:format>
<dc:source>ex-mc-manual-para-split-obsolete.tex</dc:source>
<xmp:CreatorTool>LaTeX</xmp:CreatorTool>
- <xmp:CreateDate>2024-08-02T12:58:35+02:00</xmp:CreateDate>
- <xmp:ModifyDate>2024-08-02T12:58:35+02:00</xmp:ModifyDate>
- <xmp:MetadataDate>2024-08-02T12:58:35+02:00</xmp:MetadataDate>
+ <xmp:CreateDate>2024-09-16T23:16:06+02:00</xmp:CreateDate>
+ <xmp:ModifyDate>2024-09-16T23:16:06+02:00</xmp:ModifyDate>
+ <xmp:MetadataDate>2024-09-16T23:16:06+02:00</xmp:MetadataDate>
<xmpMM:DocumentID>uuid:c33d64b4-96ec-4e48-8f27-0b3edc831547</xmpMM:DocumentID>
- <xmpMM:InstanceID>uuid:075c36f4-757d-4e0f-8258-3c0a3e372d69</xmpMM:InstanceID>
+ <xmpMM:InstanceID>uuid:02d42fce-9fea-44e8-84cb-b67592a2a853</xmpMM:InstanceID>
<prism:complianceProfile>three</prism:complianceProfile>
<prism:pageCount>2</prism:pageCount>
</rdf:Description>
@@ -413,12 +419,12 @@ endobj
<< /Type /Catalog /Pages 14 0 R /Lang (de)/Metadata 15 0 R >>
endobj
25 0 obj
-<< /Producer (luahbtex-1.18.0)/Creator (LaTeX)/CreationDate (D:20240802125835+02'00')/ModDate (D:20240802125835+02'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)) >>
+<< /Producer (luahbtex-1.18.0)/Creator (LaTeX)/CreationDate (D:20240916231606+02'00')/ModDate (D:20240916231606+02'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)) >>
endobj
xref
0 26
0000000002 65535 f
-0000016851 00000 n
+0000017182 00000 n
0000000003 00000 f
0000000004 00000 f
0000000005 00000 f
@@ -427,24 +433,24 @@ xref
0000000008 00000 f
0000000000 00000 f
0000002976 00000 n
-0000016645 00000 n
+0000016976 00000 n
0000003094 00000 n
0000000020 00000 n
-0000023472 00000 n
-0000023826 00000 n
+0000023803 00000 n
+0000024157 00000 n
0000003181 00000 n
-0000016764 00000 n
-0000014672 00000 n
-0000016898 00000 n
-0000022021 00000 n
-0000017205 00000 n
-0000017280 00000 n
-0000022257 00000 n
-0000023626 00000 n
-0000023894 00000 n
-0000023972 00000 n
+0000017095 00000 n
+0000015003 00000 n
+0000017229 00000 n
+0000022352 00000 n
+0000017536 00000 n
+0000017611 00000 n
+0000022588 00000 n
+0000023957 00000 n
+0000024225 00000 n
+0000024303 00000 n
trailer
-<< /Size 26 /Root 24 0 R /Info 25 0 R /ID [ <1A7EFBAD198841A82D20467F858B3B6C> <1A7EFBAD198841A82D20467F858B3B6C> ] >>
+<< /Size 26 /Root 24 0 R /Info 25 0 R /ID [ <3C637231FF843589F1694979C9C8F1E9> <3C637231FF843589F1694979C9C8F1E9> ] >>
startxref
-24195
+24526
%%EOF
diff --git a/macros/latex/contrib/tagpdf/ex-softhyphen.pdf b/macros/latex/contrib/tagpdf/ex-softhyphen.pdf
index 09a8d8aca0..5b157abef4 100644
--- a/macros/latex/contrib/tagpdf/ex-softhyphen.pdf
+++ b/macros/latex/contrib/tagpdf/ex-softhyphen.pdf
@@ -1,7 +1,7 @@
%PDF-1.7
%
14 0 obj
-<< /Type /Metadata /Subtype /XML /Length 11382 >>
+<< /Type /Metadata /Subtype /XML /Length 11713 >>
stream
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
@@ -56,6 +56,12 @@ stream
<pdfaProperty:category>internal</pdfaProperty:category>
<pdfaProperty:description>Year of standard</pdfaProperty:description>
</rdf:li>
+ <rdf:li rdf:parseType="Resource">
+ <pdfaProperty:name>rev</pdfaProperty:name>
+ <pdfaProperty:valueType>Integer</pdfaProperty:valueType>
+ <pdfaProperty:category>internal</pdfaProperty:category>
+ <pdfaProperty:description>Revision year of standard</pdfaProperty:description>
+ </rdf:li>
</rdf:Seq>
</pdfaSchema:property>
</rdf:li>
@@ -210,17 +216,17 @@ stream
</dc:language>
<dc:date>
<rdf:Seq>
- <rdf:li>2024-08-02T12:59:01+02:00</rdf:li>
+ <rdf:li>2024-09-16T23:16:29+02:00</rdf:li>
</rdf:Seq>
</dc:date>
<dc:format>application/pdf</dc:format>
<dc:source>ex-softhyphen.tex</dc:source>
<xmp:CreatorTool>LaTeX</xmp:CreatorTool>
- <xmp:CreateDate>2024-08-02T12:59:01+02:00</xmp:CreateDate>
- <xmp:ModifyDate>2024-08-02T12:59:01+02:00</xmp:ModifyDate>
- <xmp:MetadataDate>2024-08-02T12:59:01+02:00</xmp:MetadataDate>
+ <xmp:CreateDate>2024-09-16T23:16:29+02:00</xmp:CreateDate>
+ <xmp:ModifyDate>2024-09-16T23:16:29+02:00</xmp:ModifyDate>
+ <xmp:MetadataDate>2024-09-16T23:16:29+02:00</xmp:MetadataDate>
<xmpMM:DocumentID>uuid:aa82e685-4098-469d-861c-3c45dfc700c7</xmpMM:DocumentID>
- <xmpMM:InstanceID>uuid:994c7ab3-d509-4a5b-88b5-92bca5031c75</xmpMM:InstanceID>
+ <xmpMM:InstanceID>uuid:c1f8ee28-c74d-4fe3-859d-5667f036c14d</xmpMM:InstanceID>
<prism:complianceProfile>three</prism:complianceProfile>
<prism:pageCount>1</prism:pageCount>
</rdf:Description>
@@ -393,43 +399,43 @@ endobj
<< /Type /Catalog /Pages 19 0 R /MarkInfo 20 0 R/Lang (de)/Metadata 14 0 R/StructTreeRoot 5 0 R >>
endobj
30 0 obj
-<< /Producer (luahbtex-1.18.0)/Creator (LaTeX)/CreationDate (D:20240802125901+02'00')/ModDate (D:20240802125901+02'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)) >>
+<< /Producer (luahbtex-1.18.0)/Creator (LaTeX)/CreationDate (D:20240916231629+02'00')/ModDate (D:20240916231629+02'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)) >>
endobj
xref
0 31
0000000002 65535 f
-0000012360 00000 n
+0000012691 00000 n
0000000003 00000 f
0000000004 00000 f
0000000008 00000 f
-0000013738 00000 n
-0000012443 00000 n
-0000012661 00000 n
+0000014069 00000 n
+0000012774 00000 n
+0000012992 00000 n
0000000000 00000 f
-0000013253 00000 n
-0000013346 00000 n
-0000013432 00000 n
-0000013542 00000 n
-0000013628 00000 n
+0000013584 00000 n
+0000013677 00000 n
+0000013763 00000 n
+0000013873 00000 n
+0000013959 00000 n
0000000020 00000 n
-0000012273 00000 n
-0000012138 00000 n
-0000011492 00000 n
-0000017687 00000 n
-0000018051 00000 n
-0000012407 00000 n
-0000012493 00000 n
-0000012624 00000 n
-0000013839 00000 n
-0000016487 00000 n
-0000013993 00000 n
-0000014167 00000 n
-0000016727 00000 n
-0000017846 00000 n
-0000018113 00000 n
-0000018228 00000 n
+0000012604 00000 n
+0000012469 00000 n
+0000011823 00000 n
+0000018018 00000 n
+0000018382 00000 n
+0000012738 00000 n
+0000012824 00000 n
+0000012955 00000 n
+0000014170 00000 n
+0000016818 00000 n
+0000014324 00000 n
+0000014498 00000 n
+0000017058 00000 n
+0000018177 00000 n
+0000018444 00000 n
+0000018559 00000 n
trailer
-<< /Size 31 /Root 29 0 R /Info 30 0 R /ID [ <EECF5F575625EC21F0BEE870E572FEB1> <EECF5F575625EC21F0BEE870E572FEB1> ] >>
+<< /Size 31 /Root 29 0 R /Info 30 0 R /ID [ <DD4C19A30779C7C53A0E2F9F517D5100> <DD4C19A30779C7C53A0E2F9F517D5100> ] >>
startxref
-18451
+18782
%%EOF
diff --git a/macros/latex/contrib/tagpdf/ex-spaceglyph-listings.pdf b/macros/latex/contrib/tagpdf/ex-spaceglyph-listings.pdf
index 35e1d0609a..fa6c7457d8 100644
--- a/macros/latex/contrib/tagpdf/ex-spaceglyph-listings.pdf
+++ b/macros/latex/contrib/tagpdf/ex-spaceglyph-listings.pdf
@@ -1,7 +1,7 @@
%PDF-1.5
%
10 0 obj
-<< /Type /Metadata /Subtype /XML /Length 11391 >>
+<< /Type /Metadata /Subtype /XML /Length 11722 >>
stream
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
@@ -56,6 +56,12 @@ stream
<pdfaProperty:category>internal</pdfaProperty:category>
<pdfaProperty:description>Year of standard</pdfaProperty:description>
</rdf:li>
+ <rdf:li rdf:parseType="Resource">
+ <pdfaProperty:name>rev</pdfaProperty:name>
+ <pdfaProperty:valueType>Integer</pdfaProperty:valueType>
+ <pdfaProperty:category>internal</pdfaProperty:category>
+ <pdfaProperty:description>Revision year of standard</pdfaProperty:description>
+ </rdf:li>
</rdf:Seq>
</pdfaSchema:property>
</rdf:li>
@@ -210,17 +216,17 @@ stream
</dc:language>
<dc:date>
<rdf:Seq>
- <rdf:li>2024-08-02T12:59:25+02:00</rdf:li>
+ <rdf:li>2024-09-16T23:16:50+02:00</rdf:li>
</rdf:Seq>
</dc:date>
<dc:format>application/pdf</dc:format>
<dc:source>ex-spaceglyph-listings.tex</dc:source>
<xmp:CreatorTool>LaTeX</xmp:CreatorTool>
- <xmp:CreateDate>2024-08-02T12:59:25+02:00</xmp:CreateDate>
- <xmp:ModifyDate>2024-08-02T12:59:25+02:00</xmp:ModifyDate>
- <xmp:MetadataDate>2024-08-02T12:59:25+02:00</xmp:MetadataDate>
+ <xmp:CreateDate>2024-09-16T23:16:50+02:00</xmp:CreateDate>
+ <xmp:ModifyDate>2024-09-16T23:16:50+02:00</xmp:ModifyDate>
+ <xmp:MetadataDate>2024-09-16T23:16:50+02:00</xmp:MetadataDate>
<xmpMM:DocumentID>uuid:acdc2435-bf29-4e54-8d09-1c9b6dc32038</xmpMM:DocumentID>
- <xmpMM:InstanceID>uuid:c59181fc-bb69-430b-8f90-90206d3ba579</xmpMM:InstanceID>
+ <xmpMM:InstanceID>uuid:22e6b54d-e349-4a3d-89ca-64190a29b6f8</xmpMM:InstanceID>
<prism:complianceProfile>three</prism:complianceProfile>
<prism:pageCount>1</prism:pageCount>
</rdf:Description>
@@ -354,39 +360,39 @@ endobj
<< /Type /Catalog /Pages 15 0 R /MarkInfo 16 0 R/Lang (de)/Metadata 10 0 R/StructTreeRoot 5 0 R >>
endobj
26 0 obj
-<< /Producer (luahbtex-1.18.0)/Creator (LaTeX)/CreationDate (D:20240802125925+02'00')/ModDate (D:20240802125925+02'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)) >>
+<< /Producer (luahbtex-1.18.0)/Creator (LaTeX)/CreationDate (D:20240916231650+02'00')/ModDate (D:20240916231650+02'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)) >>
endobj
xref
0 27
0000000002 65535 f
-0000012007 00000 n
+0000012338 00000 n
0000000003 00000 f
0000000004 00000 f
0000000008 00000 f
-0000012886 00000 n
-0000012090 00000 n
-0000012233 00000 n
+0000013217 00000 n
+0000012421 00000 n
+0000012564 00000 n
0000000000 00000 f
-0000012812 00000 n
+0000013143 00000 n
0000000020 00000 n
-0000011920 00000 n
-0000011785 00000 n
-0000011501 00000 n
-0000015069 00000 n
-0000015423 00000 n
-0000012054 00000 n
-0000012125 00000 n
-0000012196 00000 n
-0000012987 00000 n
-0000014053 00000 n
-0000013042 00000 n
-0000013117 00000 n
-0000014289 00000 n
-0000015223 00000 n
-0000015485 00000 n
-0000015600 00000 n
+0000012251 00000 n
+0000012116 00000 n
+0000011832 00000 n
+0000015400 00000 n
+0000015754 00000 n
+0000012385 00000 n
+0000012456 00000 n
+0000012527 00000 n
+0000013318 00000 n
+0000014384 00000 n
+0000013373 00000 n
+0000013448 00000 n
+0000014620 00000 n
+0000015554 00000 n
+0000015816 00000 n
+0000015931 00000 n
trailer
-<< /Size 27 /Root 25 0 R /Info 26 0 R /ID [ <EC0A5DEABF5EE1A293FAD60891A0BF63> <EC0A5DEABF5EE1A293FAD60891A0BF63> ] >>
+<< /Size 27 /Root 25 0 R /Info 26 0 R /ID [ <E53E29969037BD3F9F9BB1E9ADABB4FC> <E53E29969037BD3F9F9BB1E9ADABB4FC> ] >>
startxref
-15823
+16154
%%EOF
diff --git a/macros/latex/contrib/tagpdf/ex-structure-obsolete.pdf b/macros/latex/contrib/tagpdf/ex-structure-obsolete.pdf
index 73ce1c0602..70b4e9922a 100644
--- a/macros/latex/contrib/tagpdf/ex-structure-obsolete.pdf
+++ b/macros/latex/contrib/tagpdf/ex-structure-obsolete.pdf
@@ -1,7 +1,7 @@
%PDF-1.7
%
20 0 obj
-<< /Type /Metadata /Subtype /XML /Length 11390 >>
+<< /Type /Metadata /Subtype /XML /Length 11721 >>
stream
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
@@ -56,6 +56,12 @@ stream
<pdfaProperty:category>internal</pdfaProperty:category>
<pdfaProperty:description>Year of standard</pdfaProperty:description>
</rdf:li>
+ <rdf:li rdf:parseType="Resource">
+ <pdfaProperty:name>rev</pdfaProperty:name>
+ <pdfaProperty:valueType>Integer</pdfaProperty:valueType>
+ <pdfaProperty:category>internal</pdfaProperty:category>
+ <pdfaProperty:description>Revision year of standard</pdfaProperty:description>
+ </rdf:li>
</rdf:Seq>
</pdfaSchema:property>
</rdf:li>
@@ -210,17 +216,17 @@ stream
</dc:language>
<dc:date>
<rdf:Seq>
- <rdf:li>2024-08-02T12:59:50+02:00</rdf:li>
+ <rdf:li>2024-09-16T23:17:11+02:00</rdf:li>
</rdf:Seq>
</dc:date>
<dc:format>application/pdf</dc:format>
<dc:source>ex-structure-obsolete.tex</dc:source>
<xmp:CreatorTool>LaTeX</xmp:CreatorTool>
- <xmp:CreateDate>2024-08-02T12:59:50+02:00</xmp:CreateDate>
- <xmp:ModifyDate>2024-08-02T12:59:50+02:00</xmp:ModifyDate>
- <xmp:MetadataDate>2024-08-02T12:59:50+02:00</xmp:MetadataDate>
+ <xmp:CreateDate>2024-09-16T23:17:11+02:00</xmp:CreateDate>
+ <xmp:ModifyDate>2024-09-16T23:17:11+02:00</xmp:ModifyDate>
+ <xmp:MetadataDate>2024-09-16T23:17:11+02:00</xmp:MetadataDate>
<xmpMM:DocumentID>uuid:bf5e4a2b-cfa9-4fc5-878c-8f9d2ee95445</xmpMM:DocumentID>
- <xmpMM:InstanceID>uuid:2ccba557-e5ae-4703-80db-28b73a88c1cd</xmpMM:InstanceID>
+ <xmpMM:InstanceID>uuid:5942b5fc-8732-48de-83f5-988ceab02c03</xmpMM:InstanceID>
<prism:complianceProfile>three</prism:complianceProfile>
<prism:pageCount>1</prism:pageCount>
</rdf:Description>
@@ -526,56 +532,56 @@ endobj
<< /Type /Catalog /Pages 26 0 R /MarkInfo 27 0 R/Lang (de)/Metadata 20 0 R/StructTreeRoot 5 0 R >>
endobj
43 0 obj
-<< /Producer (luahbtex-1.18.0)/Creator (LaTeX)/CreationDate (D:20240802125950+02'00')/ModDate (D:20240802125950+02'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)) >>
+<< /Producer (luahbtex-1.18.0)/Creator (LaTeX)/CreationDate (D:20240916231711+02'00')/ModDate (D:20240916231711+02'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)) >>
endobj
xref
0 44
0000000002 65535 f
-0000012794 00000 n
+0000013125 00000 n
0000000003 00000 f
0000000004 00000 f
0000000008 00000 f
-0000014930 00000 n
-0000012877 00000 n
-0000013226 00000 n
+0000015261 00000 n
+0000013208 00000 n
+0000013557 00000 n
0000000000 00000 f
-0000013818 00000 n
-0000013903 00000 n
-0000014001 00000 n
-0000014109 00000 n
-0000014217 00000 n
-0000014306 00000 n
-0000014396 00000 n
-0000014506 00000 n
-0000014618 00000 n
-0000014708 00000 n
-0000014818 00000 n
+0000014149 00000 n
+0000014234 00000 n
+0000014332 00000 n
+0000014440 00000 n
+0000014548 00000 n
+0000014637 00000 n
+0000014727 00000 n
+0000014837 00000 n
+0000014949 00000 n
+0000015039 00000 n
+0000015149 00000 n
0000000020 00000 n
-0000012695 00000 n
-0000012560 00000 n
-0000011500 00000 n
-0000023013 00000 n
-0000019779 00000 n
-0000023361 00000 n
-0000012841 00000 n
-0000012955 00000 n
-0000013189 00000 n
-0000015031 00000 n
-0000018510 00000 n
-0000015280 00000 n
-0000015355 00000 n
-0000018746 00000 n
-0000019933 00000 n
-0000020133 00000 n
-0000021901 00000 n
-0000020270 00000 n
-0000020346 00000 n
-0000022135 00000 n
-0000023164 00000 n
-0000023423 00000 n
-0000023538 00000 n
+0000013026 00000 n
+0000012891 00000 n
+0000011831 00000 n
+0000023344 00000 n
+0000020110 00000 n
+0000023692 00000 n
+0000013172 00000 n
+0000013286 00000 n
+0000013520 00000 n
+0000015362 00000 n
+0000018841 00000 n
+0000015611 00000 n
+0000015686 00000 n
+0000019077 00000 n
+0000020264 00000 n
+0000020464 00000 n
+0000022232 00000 n
+0000020601 00000 n
+0000020677 00000 n
+0000022466 00000 n
+0000023495 00000 n
+0000023754 00000 n
+0000023869 00000 n
trailer
-<< /Size 44 /Root 42 0 R /Info 43 0 R /ID [ <AE5400E970AB8EBE6C04A229EBA70E89> <AE5400E970AB8EBE6C04A229EBA70E89> ] >>
+<< /Size 44 /Root 42 0 R /Info 43 0 R /ID [ <315E3C9C805F4176C8EEA6E28B15D63A> <315E3C9C805F4176C8EEA6E28B15D63A> ] >>
startxref
-23761
+24092
%%EOF
diff --git a/macros/latex/contrib/tagpdf/ex-tagpdf-template.pdf b/macros/latex/contrib/tagpdf/ex-tagpdf-template.pdf
index 7147cd1e91..dab28eb5be 100644
--- a/macros/latex/contrib/tagpdf/ex-tagpdf-template.pdf
+++ b/macros/latex/contrib/tagpdf/ex-tagpdf-template.pdf
@@ -1,7 +1,7 @@
%PDF-2.0
%
26 0 obj
-<< /Type /Metadata /Subtype /XML /Length 11387 >>
+<< /Type /Metadata /Subtype /XML /Length 11718 >>
stream
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
@@ -56,6 +56,12 @@ stream
<pdfaProperty:category>internal</pdfaProperty:category>
<pdfaProperty:description>Year of standard</pdfaProperty:description>
</rdf:li>
+ <rdf:li rdf:parseType="Resource">
+ <pdfaProperty:name>rev</pdfaProperty:name>
+ <pdfaProperty:valueType>Integer</pdfaProperty:valueType>
+ <pdfaProperty:category>internal</pdfaProperty:category>
+ <pdfaProperty:description>Revision year of standard</pdfaProperty:description>
+ </rdf:li>
</rdf:Seq>
</pdfaSchema:property>
</rdf:li>
@@ -210,17 +216,17 @@ stream
</dc:language>
<dc:date>
<rdf:Seq>
- <rdf:li>2024-08-02T13:00:16+02:00</rdf:li>
+ <rdf:li>2024-09-16T23:17:32+02:00</rdf:li>
</rdf:Seq>
</dc:date>
<dc:format>application/pdf</dc:format>
<dc:source>ex-tagpdf-template.tex</dc:source>
<xmp:CreatorTool>LaTeX</xmp:CreatorTool>
- <xmp:CreateDate>2024-08-02T13:00:16+02:00</xmp:CreateDate>
- <xmp:ModifyDate>2024-08-02T13:00:16+02:00</xmp:ModifyDate>
- <xmp:MetadataDate>2024-08-02T13:00:16+02:00</xmp:MetadataDate>
+ <xmp:CreateDate>2024-09-16T23:17:32+02:00</xmp:CreateDate>
+ <xmp:ModifyDate>2024-09-16T23:17:32+02:00</xmp:ModifyDate>
+ <xmp:MetadataDate>2024-09-16T23:17:32+02:00</xmp:MetadataDate>
<xmpMM:DocumentID>uuid:f320abfc-f6ab-4d12-8719-d176f4d947cf</xmpMM:DocumentID>
- <xmpMM:InstanceID>uuid:3b4409f1-f3e5-4c01-86c4-a0bcea68ea38</xmpMM:InstanceID>
+ <xmpMM:InstanceID>uuid:00659af0-3fb7-47ae-865d-6609c8c59fe3</xmpMM:InstanceID>
<prism:complianceProfile>three</prism:complianceProfile>
<prism:pageCount>1</prism:pageCount>
</rdf:Description>
@@ -307,7 +313,7 @@ endobj
<< /Type /Namespace /NS (https://www.latex-project.org/ns/book/2022) /RoleMapNS 18 0 R >>
endobj
19 0 obj
-<< /Type /Namespace /NS (data:,25352333-84F8-941A-42AB-414B46468294) >>
+<< /Type /Namespace /NS (data:,C5949C29-1579-8EAA-5B48-21F381CD9140) >>
endobj
8 0 obj
[ 9 0 R 11 0 R 13 0 R 15 0 R 17 0 R 19 0 R ]
@@ -399,55 +405,55 @@ endobj
<< /Type /Catalog /Pages 31 0 R /MarkInfo 32 0 R/Lang (en)/Metadata 26 0 R/StructTreeRoot 5 0 R >>
endobj
42 0 obj
-<< /Producer (luahbtex-1.18.0)/Creator (LaTeX)/CreationDate (D:20240802130016+02'00')/ModDate (D:20240802130016+02'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)) >>
+<< /Producer (luahbtex-1.18.0)/Creator (LaTeX)/CreationDate (D:20240916231732+02'00')/ModDate (D:20240916231732+02'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)) >>
endobj
xref
0 43
0000000002 65535 f
-0000011929 00000 n
+0000012260 00000 n
0000000003 00000 f
0000000004 00000 f
0000000010 00000 f
-0000014805 00000 n
-0000012012 00000 n
-0000012222 00000 n
-0000014240 00000 n
-0000012865 00000 n
+0000015136 00000 n
+0000012343 00000 n
+0000012553 00000 n
+0000014571 00000 n
+0000013196 00000 n
0000000012 00000 f
-0000012933 00000 n
+0000013264 00000 n
0000000014 00000 f
-0000013003 00000 n
+0000013334 00000 n
0000000020 00000 f
-0000013766 00000 n
-0000013084 00000 n
-0000014044 00000 n
-0000013873 00000 n
-0000014151 00000 n
+0000014097 00000 n
+0000013415 00000 n
+0000014375 00000 n
+0000014204 00000 n
+0000014482 00000 n
0000000000 00000 f
-0000014301 00000 n
-0000014398 00000 n
-0000014485 00000 n
-0000014572 00000 n
-0000014671 00000 n
+0000014632 00000 n
+0000014729 00000 n
+0000014816 00000 n
+0000014903 00000 n
+0000015002 00000 n
0000000020 00000 n
-0000011866 00000 n
-0000011731 00000 n
-0000011497 00000 n
-0000017426 00000 n
-0000017780 00000 n
-0000011976 00000 n
-0000012053 00000 n
-0000012185 00000 n
-0000012801 00000 n
-0000014942 00000 n
-0000016383 00000 n
-0000015029 00000 n
-0000016604 00000 n
-0000017580 00000 n
-0000017842 00000 n
-0000017957 00000 n
+0000012197 00000 n
+0000012062 00000 n
+0000011828 00000 n
+0000017757 00000 n
+0000018111 00000 n
+0000012307 00000 n
+0000012384 00000 n
+0000012516 00000 n
+0000013132 00000 n
+0000015273 00000 n
+0000016714 00000 n
+0000015360 00000 n
+0000016935 00000 n
+0000017911 00000 n
+0000018173 00000 n
+0000018288 00000 n
trailer
-<< /Size 43 /Root 41 0 R /Info 42 0 R /ID [ <42D962292B4982520E998D32C837DE43> <42D962292B4982520E998D32C837DE43> ] >>
+<< /Size 43 /Root 41 0 R /Info 42 0 R /ID [ <0DBC95E2E8610D105A3F1B62C5D4C9B9> <0DBC95E2E8610D105A3F1B62C5D4C9B9> ] >>
startxref
-18180
+18511
%%EOF
diff --git a/macros/latex/contrib/tagpdf/tagpdf-backend.dtx b/macros/latex/contrib/tagpdf/tagpdf-backend.dtx
index 0ed233e2e0..f21c1804ec 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-backend.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-backend.dtx
@@ -47,13 +47,13 @@
% }^^A
% }
%
-% \date{Version 0.99d, released 2024-08-02}
+% \date{Version 0.99f, released 2024-09-16}
% \maketitle
% \begin{implementation}
% \begin{macrocode}
%<@@=tag>
%<*luatex>
-\ProvidesExplFile {tagpdf-luatex.def} {2024-08-02} {0.99d}
+\ProvidesExplFile {tagpdf-luatex.def} {2024-09-16} {0.99f}
{tagpdf~driver~for~luatex}
% \end{macrocode}
% \section{Loading the lua}
@@ -85,6 +85,7 @@
% \@@_seq_new:N,
% \@@_prop_gput:Nnn,
% \@@_seq_gput_right:Nn,
+% \@@_seq_gput_left:Nn,
% \@@_seq_item:cn,
% \@@_prop_item:cn,
% \@@_seq_show:N,
@@ -114,7 +115,7 @@
\cs_set_protected:Npn \@@_prop_gput:Nnn #1 #2 #3
{
\prop_gput:Nnn #1 { #2 } { #3 }
- \lua_now:e { ltx.@@.tables.\cs_to_str:N#1 ["#2"] = "#3" }
+ \lua_now:e { ltx.@@.tables.\cs_to_str:N#1 ["#2"] = "\lua_escape:n{#3}" }
}
@@ -123,9 +124,18 @@
\seq_gput_right:Nn #1 { #2 }
\lua_now:e { table.insert(ltx.@@.tables.\cs_to_str:N#1, "#2") }
}
-
+% \end{macrocode}
+%
+% this inserts on the right of the lua table, but as the lua table is not used for kids
+% this is ignored for now.
+% \begin{macrocode}
+\cs_set_protected:Npn \@@_seq_gput_left:Nn #1 #2
+ {
+ \seq_gput_left:Nn #1 { #2 }
+ \lua_now:e { table.insert(ltx.@@.tables.\cs_to_str:N#1, "#2") }
+ }
+
%Hm not quite sure about the naming
-
\cs_set:Npn \@@_seq_item:cn #1 #2
{
\lua_now:e { tex.print(ltx.@@.tables.#1[#2]) }
@@ -164,8 +174,8 @@
local ProvidesLuaModule = {
name = "tagpdf",
- version = "0.99d", --TAGVERSION
- date = "2024-08-02", --TAGDATE
+ version = "0.99f", --TAGVERSION
+ date = "2024-09-16", --TAGDATE
description = "tagpdf lua code",
license = "The LATEX Project Public License 1.3c"
}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-checks.dtx b/macros/latex/contrib/tagpdf/tagpdf-checks.dtx
index 3cbe3b141b..5ade1ff427 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-checks.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-checks.dtx
@@ -48,7 +48,7 @@
% }^^A
% }
%
-% \date{Version 0.99d, released 2024-08-02}
+% \date{Version 0.99f, released 2024-09-16}
% \maketitle
% \begin{documentation}
% \section{Commands}
@@ -331,11 +331,12 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-checks-code} {2024-08-02} {0.99d}
+\ProvidesExplPackage {tagpdf-checks-code} {2024-09-16} {0.99f}
{part of tagpdf - code related to checks, conditionals, debugging and messages}
%</header>
% \end{macrocode}
% \section{Messages}
+%
% \subsection{Messages related to mc-chunks}
% \begin{macro}{mc-nested}
% This message is issue is a mc is opened before the previous has been closed.
@@ -454,6 +455,18 @@
{ closing~structure~#1~tagged~\use:e{\prop_item:cn{g_@@_struct_#1_prop}{S}} }
% \end{macrocode}
% \end{macro}
+%
+% \begin{macro}{struct-Ref-unknown}
+% This message is issued at the end, when the Ref keys are updated.
+% TODO: in debug mode it should report more info about the structure.
+% \begin{macrocode}
+\msg_new:nnn { tag } {struct-Ref-unknown}
+ {
+ #1~has~no~related~structure.\\
+ /Ref~not~updated.
+ }
+% \end{macrocode}
+% \end{macro}
% \begin{macro}{tree-struct-still-open}
% Message issued at the end if there are beside Root other
% open structures on the stack.
@@ -752,7 +765,7 @@
\cs_new_protected:Npn \@@_check_struct_used:n #1 %#1 label
{
\prop_get:cnNT
- {g_@@_struct_\@@_property_ref:enn{tagpdfstruct-#1}{tagstruct}{unknown}_prop}
+ {g_@@_struct_\property_ref:enn{tagpdfstruct-#1}{tagstruct}{unknown}_prop}
{P}
\l_@@_tmpa_tl
{
@@ -940,7 +953,7 @@
{
\int_compare:nT
{
- \@@_property_ref:enn
+ \property_ref:enn
{mcid-####1}
{tagabspage}
{-1}
@@ -951,7 +964,7 @@
\seq_gput_right:Ne \l_tmpa_seq
{
Page##1-####1-
- \@@_property_ref:enn
+ \property_ref:enn
{mcid-####1}
{tagmcid}
{-1}
@@ -1124,24 +1137,24 @@
}
}
% \end{macrocode}
-% This tracks tag stop and start.
-% The tag-stop message should go before the int is increased.
-% The tag-start message after the int is decreased.
+% This tracks tag suspend and resume.
+% The tag-suspend message should go before the int is increased.
+% The tag-resume message after the int is decreased.
% \begin{macrocode}
-\msg_new:nnn { tag / debug } {tag-stop}
+\msg_new:nnn { tag / debug } {tag-suspend}
{
\int_if_zero:nTF
{#1}
- {Tagging~stopped}
- {Tagging~(not)~stopped~(already~inactive)}\\
+ {Tagging~suspended}
+ {Tagging~(not)~suspended~(already~inactive)}\\
level:~#1~==>~\int_eval:n{#1+1}\tl_if_empty:nF{#2}{,~label:~#2}~[\msg_line_context:]
}
-\msg_new:nnn { tag / debug } {tag-start}
+\msg_new:nnn { tag / debug } {tag-resume}
{
\int_if_zero:nTF
{#1}
- {Tagging~restarted}
- {Tagging~(not)~restarted}\\
+ {Tagging~resumed}
+ {Tagging~(not)~resumed}\\
level:~\int_eval:n{#1+1}~==>~#1\tl_if_empty:nF{#2}{,~label:~#2}~[\msg_line_context:]
}
% \end{macrocode}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-code.pdf b/macros/latex/contrib/tagpdf/tagpdf-code.pdf
index 76e839d0d5..5a5d60643a 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-code.pdf
+++ b/macros/latex/contrib/tagpdf/tagpdf-code.pdf
Binary files differ
diff --git a/macros/latex/contrib/tagpdf/tagpdf-code.tex b/macros/latex/contrib/tagpdf/tagpdf-code.tex
index b483b96974..df05b99a30 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-code.tex
+++ b/macros/latex/contrib/tagpdf/tagpdf-code.tex
@@ -28,9 +28,18 @@
% The next line is needed so that \GetFileInfo will be able to pick up
% version data.
+\usepackage{iftex}
+%until l3doc is corrected
+\ifluatex
+\usepackage[TU]{fontenc}
+\ttfamily
+ \DeclareFontShape{TU}{lmtt}{m}{it}
+ {<-> \UnicodeFontFile{lmmonoslant10-regular}{}}{}
+\fi
\usepackage{longtable}
\usepackage{tagpdf}
-\makeatletter
+
+\input{tagpdf-docelements}
%\def\@setupverbvisiblespace{}
%\def\verb{\relax\ifmmode\hbox\else\leavevmode\null\fi
% \bgroup
@@ -38,13 +47,12 @@
% \verbatim@font\@noligs
% \language\l@nohyphenation
% \@ifstar\@verb\@verb}
-\makeatother
\begin{document}
\GetFileInfo{tagpdf.sty}
\title{%
- \pkg{tagpdf} -- A package to experiment with pdf tagging%
+ \pkg{tagpdf} -- \LaTeX{} kernel code for PDF tagging%
\thanks{This file describes \fileversion,
last revised \filedate.}%
}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-data.dtx b/macros/latex/contrib/tagpdf/tagpdf-data.dtx
index 6417b44c40..7bff6b5d15 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-data.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-data.dtx
@@ -47,7 +47,7 @@
% }^^A
% }
%
-% \date{Version 0.99d, released 2024-08-02}
+% \date{Version 0.99f, released 2024-09-16}
% \maketitle
% \begin{documentation}
% This files contains a various data files which are read in
@@ -61,7 +61,7 @@
% latex-lab has also a namespace module, which takes precedence!
% \begin{macrocode}
%<*ns-latex>
-%% \ProvidesExplFile {tagpdf-ns-latex.def} {2024-08-02} {0.99d}
+%% \ProvidesExplFile {tagpdf-ns-latex.def} {2024-09-16} {0.99f}
%% {latex} {https://www.latex-project.org/ns/dflt/2022}{}
title, Title, pdf2,
part, Title, pdf2,
@@ -93,7 +93,7 @@ text, P, pdf2,
% It is bound to change
% \begin{macrocode}
%<*ns-latex-book>
-%% \ProvidesExplFile {tagpdf-ns-latex-book.def} {2024-08-02} {0.99d}
+%% \ProvidesExplFile {tagpdf-ns-latex-book.def} {2024-09-16} {0.99f}
%% {latex-book} {https://www.latex-project.org/ns/book/2022}{}
chapter, H1,pdf2,
section, H2,pdf2,
@@ -107,7 +107,7 @@ subparagraph, H6,pdf2,
% \section{The pdf namespace data}
% \begin{macrocode}
%<*ns-pdf>
-%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2024-08-02} {0.99d}
+%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2024-09-16} {0.99f}
%% {pdf} {http://iso.org/pdf/ssn}{}
StructTreeRoot,StructTreeRoot,pdf,D,
Document,Document,pdf,D,
@@ -175,7 +175,7 @@ Strong,Span,pdf,I,
% \section{The pdf 2.0 namespace data}
% \begin{macrocode}
%<*ns-pdf2>
-%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2024-08-02} {0.99d}
+%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2024-09-16} {0.99f}
%% {pdf2} {http://iso.org/pdf2/ssn}{}
StructTreeRoot,StructTreeRoot,pdf2,D,
Document,Document,pdf2,D,
@@ -232,7 +232,7 @@ Strong,Strong,pdf2,I,
% \section{The mathml namespace data}
% \begin{macrocode}
%<*ns-mathml>
-%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2024-08-02} {0.99d}
+%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2024-09-16} {0.99f}
% {mathml}{http://www.w3.org/1998/Math/MathML}{}
abs,abs,mathml,
and,and,mathml,
@@ -467,7 +467,7 @@ xor,xor,mathml,
% This will perhaps change in future.
% \begin{macrocode}
%<*parent-child>
-%% \ProvidesExplFile {tagpdf-parent-child.csv} {2024-08-02} {0.99d}
+%% \ProvidesExplFile {tagpdf-parent-child.csv} {2024-09-16} {0.99f}
,,,StructTreeRoot,Document,Art,Part,Div,Sect,BlockQuote,NonStruct,TOC,TOCI,Index,Private,Quote,Note,Reference,BibEntry,P,Hn,H,Lbl,Code,Span,Link,Annot,Form,Ruby,RB,RT,RP,Warichu,WT,WP,L,LI,LBody,Table,TR,TH,TD,THead,TBody,TFoot,Caption,Figure,Formula,MC
Document,both,document level,1,0..n,∅,‡,‡,∅,0..n,‡,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅
Art,1.7,grouping,∅,0..n,∅,‡,‡,0..n,0..n,‡,∅,∅,∅,0..n,∅,0..n,∅,∅,∅,0..1,0..1,∅,∅,∅,0..n,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,∅,∅
@@ -522,7 +522,7 @@ MC,both,---,∅,∅,∅,∅,∅,∅,0..n,‡,∅,∅,∅,0..n,0..n,0..n,0..n,0..
% This will perhaps change in future.
% \begin{macrocode}
%<*parent-child-2>
-%% \ProvidesExplFile {tagpdf-parent-child-2.csv} {2024-08-02} {0.99d}
+%% \ProvidesExplFile {tagpdf-parent-child-2.csv} {2024-09-16} {0.99f}
,,,StructTreeRoot,Document,DocumentFragment,Art,Part,Div,Sect,Aside,BlockQuote,NonStruct,TOC,TOCI,Index,Private,Title,Sub,Quote,Note,Reference,BibEntry,P,Hn,H,Lbl,Code,Em,Strong,Span,Link,Annot,Form,Ruby,RB,RT,RP,Warichu,WT,WP,FENote,L,LI,LBody,Table,TR,TH,TD,THead,TBody,TFoot,Caption,Figure,Formula,math,mathml,Artifact,MC
Document,both,document level,1,0..n,0..n,∅,‡,‡,∅,0..n,0..n,‡,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅
DocumentFragment,2.0,document level,∅,0..n,0..n,0..n,‡,‡,0..n,0..n,0..n,‡,∅,∅,∅,0..n,∅,∅,∅,∅*,∅,∅,∅,∅,∅,∅,∅*,∅,∅,∅,∅*,∅*,∅,∅,∅,∅,∅,∅,∅,∅,∅*,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅*,∅,∅,∅,∅,0..n,∅
diff --git a/macros/latex/contrib/tagpdf/tagpdf-docelements.tex b/macros/latex/contrib/tagpdf/tagpdf-docelements.tex
new file mode 100644
index 0000000000..c388889aa1
--- /dev/null
+++ b/macros/latex/contrib/tagpdf/tagpdf-docelements.tex
@@ -0,0 +1,2 @@
+\ProvideDocElement[printtype=\textit{struct key},idxtype=key,idxgroup=Structure keys]{Structkeydecl}{structkeydecl}
+\ProvideDocElement[printtype=\textit{setup key},idxtype=key,idxgroup=Setup keys]{Setupkeydecl}{setupkeydecl}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-mc-generic.dtx b/macros/latex/contrib/tagpdf/tagpdf-mc-generic.dtx
index ff036b5523..f10752d296 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-mc-generic.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-mc-generic.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.99d, released 2024-08-02}
+% \date{Version 0.99f, released 2024-09-16}
% \maketitle
% \begin{documentation}
% \end{documentation}
@@ -55,11 +55,11 @@
% \begin{macrocode}
%<@@=tag>
%<*generic>
-\ProvidesExplPackage {tagpdf-mc-code-generic} {2024-08-02} {0.99d}
+\ProvidesExplPackage {tagpdf-mc-code-generic} {2024-09-16} {0.99f}
{part of tagpdf - code related to marking chunks - generic mode}
%</generic>
%<*debug>
-\ProvidesExplPackage {tagpdf-debug-generic} {2024-08-02} {0.99d}
+\ProvidesExplPackage {tagpdf-debug-generic} {2024-09-16} {0.99f}
{part of tagpdf - debugging code related to marking chunks - generic mode}
%</debug>
% \end{macrocode}
@@ -573,14 +573,14 @@
% \end{macrocode}
% revert the attribute:
% \begin{macrocode}
- \@@_property_gset:nnnn {tagmcid } { now }
+ \property_gset:nnnn {tagmcid } { now }
{0} { \int_use:N \g_@@_MCID_tmp_bypage_int }
\cs_new_protected:Npn \@@_mc_bdc_mcid:nn #1 #2
{
\int_gincr:N \c@g_@@_MCID_abs_int
\tl_set:Ne \l_@@_mc_ref_abspage_tl
{
- \@@_property_ref:enn %3 args
+ \property_ref:enn %3 args
{
mcid-\int_use:N \c@g_@@_MCID_abs_int
}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-mc-luacode.dtx b/macros/latex/contrib/tagpdf/tagpdf-mc-luacode.dtx
index 3c2e91605e..5b41c883ed 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-mc-luacode.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-mc-luacode.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.99d, released 2024-08-02}
+% \date{Version 0.99f, released 2024-09-16}
% \maketitle
% \begin{implementation}
% The code is split into three parts: code shared by all engines,
@@ -86,11 +86,11 @@
% \begin{macrocode}
%<@@=tag>
%<*luamode>
-\ProvidesExplPackage {tagpdf-mc-code-lua} {2024-08-02} {0.99d}
+\ProvidesExplPackage {tagpdf-mc-code-lua} {2024-09-16} {0.99f}
{tagpdf - mc code only for the luamode }
%</luamode>
%<*debug>
-\ProvidesExplPackage {tagpdf-debug-lua} {2024-08-02} {0.99d}
+\ProvidesExplPackage {tagpdf-debug-lua} {2024-09-16} {0.99f}
{part of tagpdf - debugging code related to marking chunks - lua mode}
%</debug>
% \end{macrocode}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-mc-shared.dtx b/macros/latex/contrib/tagpdf/tagpdf-mc-shared.dtx
index 5bfe0658d1..c8b7d1a5e8 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-mc-shared.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-mc-shared.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.99d, released 2024-08-02}
+% \date{Version 0.99f, released 2024-09-16}
% \maketitle
% \begin{documentation}
% \section{Public Commands}
@@ -181,7 +181,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-mc-code-shared} {2024-08-02} {0.99d}
+\ProvidesExplPackage {tagpdf-mc-code-shared} {2024-09-16} {0.99f}
{part of tagpdf - code related to marking chunks -
code shared by generic and luamode }
%</header>
@@ -328,7 +328,7 @@
{
\@@_check_if_active_struct:T
{
- \tl_set:Ne \l_@@_tmpa_tl { \@@_property_ref:nnn{tagpdf-#1}{tagmcabs}{} }
+ \tl_set:Ne \l_@@_tmpa_tl { \property_ref:nnn{tagpdf-#1}{tagmcabs}{} }
\tl_if_empty:NTF\l_@@_tmpa_tl
{
\msg_warning:nnn {tag} {mc-label-unknown} {#1}
@@ -365,12 +365,12 @@
\tag_mc_end_push:
\tag_mc_begin:n {artifact=#1}
\group_begin:
- \tag_stop:n{artifact-group}
+ \tag_suspend:n{artifact-group}
}
\cs_set_protected:Npn \tag_mc_artifact_group_end:
{
- \tag_start:n{artifact-group}
+ \tag_resume:n{artifact-group}
\group_end:
\tag_mc_end:
\tag_mc_begin_pop:n{}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-roles.dtx b/macros/latex/contrib/tagpdf/tagpdf-roles.dtx
index fb5f1b77c9..d29c328b2e 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-roles.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-roles.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.99d, released 2024-08-02}
+% \date{Version 0.99f, released 2024-09-16}
% \maketitle
% \begin{documentation}
% \begin{function}
@@ -98,7 +98,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-roles-code} {2024-08-02} {0.99d}
+\ProvidesExplPackage {tagpdf-roles-code} {2024-09-16} {0.99f}
{part of tagpdf - code related to roles and structure names}
%</header>
% \end{macrocode}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-space.dtx b/macros/latex/contrib/tagpdf/tagpdf-space.dtx
index 5c8e007084..e0aa2e09d7 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-space.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-space.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.99d, released 2024-08-02}
+% \date{Version 0.99f, released 2024-09-16}
% \maketitle
% \begin{documentation}
% \begin{function}{activate/space (setup-key),interwordspace (deprecated)}
@@ -66,7 +66,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-space-code} {2024-08-02} {0.99d}
+\ProvidesExplPackage {tagpdf-space-code} {2024-09-16} {0.99f}
{part of tagpdf - code related to real space chars}
%</header>
% \end{macrocode}
@@ -78,6 +78,7 @@
% \begin{macro}{activate/spaces (setup-key),interwordspace (deprecated),show-spaces (deprecated)}
% \begin{macrocode}
%<*package>
+\bool_new:N\l_@@_showspaces_bool
\keys_define:nn { @@ / setup }
{
activate/spaces .choice:,
diff --git a/macros/latex/contrib/tagpdf/tagpdf-struct.dtx b/macros/latex/contrib/tagpdf/tagpdf-struct.dtx
index 6da5e48b18..f656b91686 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-struct.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-struct.dtx
@@ -27,6 +27,7 @@
\usepackage{array,booktabs,caption}
\hypersetup{pdfauthor=Ulrike Fischer,
pdftitle=tagpdf-tree module (tagpdf)}
+\input{tagpdf-docelements}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -46,7 +47,7 @@
% }^^A
% }
%
-% \date{Version 0.99d, released 2024-08-02}
+% \date{Version 0.99f, released 2024-09-16}
% \maketitle
% \begin{documentation}
% \section{Public Commands}
@@ -120,10 +121,22 @@
% the third the value. Currently the only keyword is \texttt{ref} which updates
% the Ref key (an array)
% \end{function}
+%
+% \begin{function}{\tag_struct_gput_ref:nnn}
+% \begin{syntax}
+% \cs{tag_struct_gput_ref:nnn}\Arg{structure number}\Arg{keyword}\Arg{value}
+% \end{syntax}
+% This is an user interface to add a Ref key to an
+% existing structure. The target structure doesn't have to exist yet
+% but can be addressed by label, destname or even num.
+% \meta{keyword} is currently either \texttt{label}, \texttt{dest}
+% or \texttt{num}. The value is then either a label name, the name of a destination
+% or a structure number.
+% \end{function}
%
% \section{Public keys}
% \subsection{Keys for the structure commands}
-% \begin{function}{tag (struct-key)}
+% \begin{structkeydecl}{tag}
% This is required. The value of the key is normally one of the
% standard types listed in the main tagpdf documentation.
% It is possible to setup new tags/types.
@@ -132,15 +145,15 @@
% Currently the names spaces |pdf|, |pdf2|, |mathml| and |user| are defined.
% This allows to use a different name space than
% the one connected by default to the tag. But normally this should not be needed.
-% \end{function}
-% \begin{function}{stash (struct-key)}
+% \end{structkeydecl}
+% \begin{structkeydecl}{stash}
% Normally a new structure inserts itself as a kid
% into the currently active structure. This key prohibits this.
% The structure is nevertheless from now on
% \enquote{the current active structure}
% and parent for following marked content and structures.
-% \end{function}
-% \begin{function}{label (struct-key)}
+% \end{structkeydecl}
+% \begin{structkeydecl}{label}
% This key sets a label by which
% one can refer to the structure. It is e.g.
% used by \cs{tag_struct_use:n} (where a real label is actually not
@@ -149,55 +162,63 @@
% Internally the label name will start with \texttt{tagpdfstruct-} and it stores
% the two attributes |tagstruct| (the structure number) and |tagstructobj| (the
% object reference).
-% \end{function}
-% \begin{function}{parent (struct-key)}
+% \end{structkeydecl}
+% \begin{structkeydecl}{parent}
% By default a structure is added as kid to the currently active structure.
% With the parent key one can choose another parent. The value is a structure number which
% must refer to an already existing, previously created structure. Such a structure
% number can for example be have been stored with \cs{tag_get:n}, but one can also use
% a label on the parent structure and then use
% \cs{property_ref:nn}|{tagpdfstruct-label}{tagstruct}| to retrieve it.
-% \end{function}
-% \begin{function}{title (struct-key),title-o (struct-key)}
+% \end{structkeydecl}
+% \begin{structkeydecl}{firstkey}
+% If this key is used the structure is added at the left of the kids of
+% the parent structure (if the structure is not stashed).
+% This means that it will be the first kid of the structure
+% (unless some later structure uses the key too).
+% \end{structkeydecl}
+% \begin{structkeydecl}{title,title-o}
% This keys allows to set the dictionary entry
% \texttt{/Title} in the structure object.
% The value is handled as verbatim string and hex encoded.
% Commands are not expanded. |title-o| will expand the value once.
-% \end{function}
+% \end{structkeydecl}
%
-% \begin{function}{alt (struct-key)}
+% \begin{structkeydecl}{alt}
% This key inserts an \texttt{/Alt} value in the dictionary of structure object.
% The value is handled as verbatim string and hex encoded.
% The value will be expanded first once. If it is empty, nothing will happen.
-% \end{function}
-% \begin{function}{actualtext (struct-key)}
+% \end{structkeydecl}
+% \begin{structkeydecl}{actualtext}
% This key inserts an \texttt{/ActualText} value in the dictionary of structure object.
% The value is handled as verbatim string and hex encoded.
% The value will be expanded first once. If it is empty, nothing will happen.
-% \end{function}
-% \begin{function}{lang (struct-key)}
+% \end{structkeydecl}
+% \begin{structkeydecl}{lang}
% This key allows to set the language for a structure element. The value should be a bcp-identifier,
% e.g. |de-De|.
-% \end{function}
-% \begin{function}{ref (struct-key)}
+% \end{structkeydecl}
+% \begin{structkeydecl}{ref}
% This key allows to add references to other structure elements,
% it adds the |/Ref| array to the structure.
% The value should be a comma separated list of structure labels
% set with the |label| key. e.g. |ref={label1,label2}|.
-% \end{function}
-% \begin{function}{E (struct-key)}
+% \end{structkeydecl}
+% \begin{structkeydecl}{E}
% This key sets the |/E| key, the expanded form of an
% abbreviation or an acronym
% (I couldn't think of a better name, so I sticked to E).
-% \end{function}
-% \begin{function}{AF (struct-key),AFref (struct-key),
-% AFinline (struct-key),AFinline-o (struct-key),texsource,mathml}
+% \end{structkeydecl}
+% \begin{structkeydecl}{AF,AFref,
+% AFinline,AFinline-o,texsource,mathml}
+% These keys handle associated files in the structure element.
+%
% \begin{syntax}
% AF = \meta{object name}\\
% AFref = \meta{object reference}\\
% AF-inline = \meta{text content}\\
% \end{syntax}
-% These keys allows to reference an associated file in the structure element.
+%
% The value \meta{object name} should be the name of an object pointing
% to the \texttt{/Filespec} dictionary as expected by
% |\pdf_object_ref:n| from a current \texttt{l3kernel}.
@@ -209,15 +230,16 @@
% Future versions will perhaps extend this to more mime types, but it is
% still a research task to find out what is really needed.
%
-% |texsource| is a special variant of |AF-inline-o| which embeds the file
-% as |.tex| source with the |/AFrelationship| key set to |/Source|. It also sets the |/Desc| key
-% to a (currently) fix text.
+% |texsource| is a special variant of |AF-inline-o| which embeds the content
+% as |.tex| source with the |/AFrelationship| key set to |/Source|.
+% It also sets the |/Desc| key to a (currently) fix text.
%
-% |mathml| is a special variant of |AF-inline-o| which embeds the file
+% |mathml| is a special variant of |AF-inline-o| which embeds the content
% as |.xml| file with the |/AFrelationship| key set to |/Supplement|.
% It also sets the |/Desc| key to a (currently) fix text.
%
-% The argument of |AF| is an object name referring an embedded file as declared for example with
+% The argument of |AF| is an object name referring an embedded file as declared
+% for example with
% \cs{pdf_object_new:n} or with the l3pdffile module. |AF| expands its argument
% (this allows e.g. to use some variable for automatic numbering)
% and can be used more than once, to associate more than one file.
@@ -231,9 +253,9 @@
% does not check if the reference is valid!}
%
% The inline keys can be used only once per structure. Additional calls are ignored.
-% \end{function}
+% \end{structkeydecl}
%
-% \begin{function}{attribute (struct-key)}
+% \begin{structkeydecl}{attribute}
% This key takes as argument a comma list of attribute names
% (use braces to protect the commas from the external key-val parser)
% and allows to add one or more attribute dictionary entries in
@@ -243,16 +265,17 @@
% \end{verbatim}
% Attribute names and their content must be declared first in \cs{tagpdfsetup}.
%
-% \end{function}
+% \end{structkeydecl}
%
-% \begin{function}{attribute-class (struct-key)}
+% \begin{structkeydecl}{attribute-class}
% This key takes as argument a comma list of attribute class names
% (use braces to protect the commas from the external key-val parser)
% and allows to add one or more attribute classes to the structure object.
%
% Attribute class names and their content
% must be declared first in \cs{tagpdfsetup}.
-% \end{function}
+% \end{structkeydecl}
+%
% \subsection{Setup keys}
% \begin{function}{role/new-attribute (setup-key), newattribute (deprecated)}
% \begin{syntax}
@@ -272,20 +295,20 @@
% \end{verbatim}
%
% \end{function}
-% \begin{function}{root-AF (setup-key)}
+% \begin{setupkeydecl}{root-AF}
% \begin{syntax}
% root-AF = \meta{object name}
% \end{syntax}
% This key can be used in the setup command \cs{tagpdfsetup} and allows
% to add associated files to the root structure. Like |AF| it can be used more than
% once to add more than one file.
-% \end{function}
+% \end{setupkeydecl}
% \end{documentation}
% \begin{implementation}
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-struct-code} {2024-08-02} {0.99d}
+\ProvidesExplPackage {tagpdf-struct-code} {2024-09-16} {0.99f}
{part of tagpdf - code related to storing structure}
%</header>
% \end{macrocode}
@@ -442,12 +465,16 @@
\tl_new:N \l_@@_struct_roletag_NS_tl
% \end{macrocode}
% \end{variable}
-% \begin{variable}{\l_@@_struct_key_label_tl}
-% This will hold the label value.
+% \begin{variable}{\g_@@_struct_label_num_prop}
+% This will hold for every structure label the associated
+% structure number. The prop will allow to
+% fill the /Ref key directly at the first compilation if the ref
+% key is used.
% \begin{macrocode}
-\tl_new:N \l_@@_struct_key_label_tl
+\prop_new_linked:N \g_@@_struct_label_num_prop
% \end{macrocode}
% \end{variable}
+
% \begin{variable}{\l_@@_struct_elem_stash_bool}
% This will keep track of the stash status
% \begin{macrocode}
@@ -455,6 +482,15 @@
% \end{macrocode}
% \end{variable}
%
+% \begin{variable}{\l_@@_struct_addkid_tl}
+% This decides if a structure kid is added at the left or right of the parent.
+% The default is \texttt{right}.
+% \begin{macrocode}
+\tl_new:N \l_@@_struct_addkid_tl
+\tl_set:Nn \l_@@_struct_addkid_tl {right}
+% \end{macrocode}
+% \end{variable}
+
% \subsection{Variables used by tagging code of basic elements}
%
% \begin{variable}{\g_@@_struct_dest_num_prop}
@@ -696,16 +732,17 @@
/Type \c_space_tl /MCR \c_space_tl
/Pg
\c_space_tl
- \pdf_pageobject_ref:n { \@@_property_ref:enn{mcid-#1}{tagabspage}{1} }
- /MCID \c_space_tl \@@_property_ref:enn{mcid-#1}{tagmcid}{1}
+ \pdf_pageobject_ref:n { \property_ref:enn{mcid-#1}{tagabspage}{1} }
+ /MCID \c_space_tl \property_ref:enn{mcid-#1}{tagmcid}{1}
>>
}
%</package>
% \end{macrocode}
% \begin{macrocode}
%<*package|debug>
-%<package>\cs_new_protected:Npn \@@_struct_kid_mc_gput_right:nn #1 #2 %#1 structure num, #2 MCID absnum%
-%<debug>\cs_set_protected:Npn \@@_struct_kid_mc_gput_right:nn #1 #2 %#1 structure num, #2 MCID absnum%
+%<package>\cs_new_protected:Npn \@@_struct_kid_mc_gput_right:nn #1 #2
+%<debug>\cs_set_protected:Npn \@@_struct_kid_mc_gput_right:nn #1 #2
+%#1 structure num, #2 MCID absnum%
{
\@@_seq_gput_right:ce
{ g_@@_struct_kids_#1_seq }
@@ -733,8 +770,9 @@
% This commands adds a structure as kid. We only need to record the object
% reference in the sequence.
% \begin{macrocode}
-%<package>\cs_new_protected:Npn\@@_struct_kid_struct_gput_right:nn #1 #2 %#1 num of parent struct, #2 kid struct
-%<debug>\cs_set_protected:Npn\@@_struct_kid_struct_gput_right:nn #1 #2 %#1 num of parent struct, #2 kid struct
+%<package>\cs_new_protected:Npn\@@_struct_kid_struct_gput_right:nn #1 #2
+%<debug>\cs_set_protected:Npn\@@_struct_kid_struct_gput_right:nn #1 #2
+%%#1 num of parent struct, #2 kid struct
{
\@@_seq_gput_right:ce
{ g_@@_struct_kids_#1_seq }
@@ -747,10 +785,35 @@
%<debug> Struct~#2
%<debug> }
}
-
%<package>\cs_generate_variant:Nn \@@_struct_kid_struct_gput_right:nn {ee}
% \end{macrocode}
% \end{macro}
+% \begin{macro}
+% {
+% \@@_struct_kid_struct_gput_left:nn,\@@_struct_kid_struct_gput_left:ee
+% }
+% This commands adds a structure as kid one the left, so as first
+% kid. We only need to record the object reference in the sequence.
+% \begin{macrocode}
+%<package>\cs_new_protected:Npn\@@_struct_kid_struct_gput_left:nn #1 #2
+%<debug>\cs_set_protected:Npn\@@_struct_kid_struct_gput_left:nn #1 #2
+%%#1 num of parent struct, #2 kid struct
+ {
+ \@@_seq_gput_left:ce
+ { g_@@_struct_kids_#1_seq }
+ {
+ \pdf_object_ref_indexed:nn { @@/struct }{ #2 }
+ }
+%<debug> \seq_gput_left:cn
+%<debug> { g_@@_struct_debug_kids_#1_seq }
+%<debug> {
+%<debug> Struct~#2
+%<debug> }
+ }
+%<package>\cs_generate_variant:Nn \@@_struct_kid_struct_gput_left:nn {ee}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}
% {\@@_struct_kid_OBJR_gput_right:nnn,\@@_struct_kid_OBJR_gput_right:eee}
% At last the command to add an OBJR object. This has to write an object first.
@@ -759,10 +822,11 @@
% object reference
%
% \begin{macrocode}
-%<package>\cs_new_protected:Npn\@@_struct_kid_OBJR_gput_right:nnn #1 #2 #3 %#1 num of parent struct,
-%<package> %#2 obj reference
-%<package> %#3 page object reference
+%<package>\cs_new_protected:Npn\@@_struct_kid_OBJR_gput_right:nnn #1 #2 #3
+%<package>
+%<package>
%<debug>\cs_set_protected:Npn\@@_struct_kid_OBJR_gput_right:nnn #1 #2 #3
+%%#1 num of parent struct,#2 obj reference,#3 page object reference
{
\pdf_object_unnamed_write:nn
{ dict }
@@ -907,34 +971,47 @@
\tl_clear:N #2
\prop_map_inline:cn { g_@@_struct_#1_prop }
{
- \tl_put_right:Ne #2
- {
% \end{macrocode}
% Some keys needs the option to format the value, e.g. add brackets for an
% array, we also need the option to ignore some entries in the properties.
-% \begin{macrocode}
- \cs_if_exist_use:cTF {@@_struct_format_##1:nn}
- {{##1}{##2}}
- {\c_space_tl/##1~##2}
+% \begin{macrocode}
+ \cs_if_exist_use:cTF {@@_struct_format_##1:nnN}
+ {
+ {##1}{##2}#2
}
- }
+ {
+ \tl_put_right:Ne #2 { \c_space_tl/##1~##2 }
+ }
+ }
}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_struct_format_rolemap:nn,\@@_struct_format_parentrole:nn}
+% \begin{macro}{\@@_struct_format_rolemap:nnN,\@@_struct_format_parentrole:nnN}
% This two entries should not end in the PDF.
% \begin{macrocode}
-\cs_new:Nn\@@_struct_format_rolemap:nn{}
-\cs_new:Nn\@@_struct_format_parentrole:nn{}
+\cs_new:Nn\@@_struct_format_rolemap:nnN{}
+\cs_new:Nn\@@_struct_format_parentrole:nnN{}
% \end{macrocode}
% \end{macro}
-% \begin{macro}{\@@_struct_format_Ref:nn}
-% Ref is an array, we store only the content to be able to extend it
-% so the formatting command adds the brackets:
+% \begin{macro}{\@@_struct_format_Ref:nnN}
+% Ref is an array, we store values as a clist of commands that must
+% be executed here, the formatting has to add also brackets.
+%
% \begin{macrocode}
-\cs_new:Nn\__tag_struct_format_Ref:nn{\c_space_tl/#1~[#2]}
+\cs_new_protected:Nn\@@_struct_format_Ref:nnN
+ {
+ \tl_put_right:Nn #3 { ~/#1~[ } %]
+ \clist_map_inline:nn{ #2 }
+ {
+ ##1 #3
+ }
+ \tl_put_right:Nn #3
+ { %[
+ \c_space_tl]
+ }
+ }
% \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_struct_write_obj:n}
@@ -953,7 +1030,8 @@
% \begin{macrocode}
\prop_get:cnNF { g_@@_struct_#1_prop } {P}\l_@@_tmpb_tl
{
- \prop_gput:cne { g_@@_struct_#1_prop } {P}{\pdf_object_ref_indexed:nn { @@/struct }{1}}
+ \prop_gput:cne { g_@@_struct_#1_prop } {P}
+ {\pdf_object_ref_indexed:nn { @@/struct }{1}}
\prop_gput:cne { g_@@_struct_#1_prop } {S}{/Artifact}
\seq_if_empty:cF {g_@@_struct_kids_#1_seq}
{
@@ -1005,8 +1083,9 @@
% \tag_struct_end:
% \end{verbatim}
% \begin{macrocode}
-\cs_new_protected:Npn \@@_struct_insert_annot:nn #1 #2 %#1 object reference to the annotation/xform
- %#2 structparent number
+\cs_new_protected:Npn \@@_struct_insert_annot:nn #1 #2
+ %#1 object reference to the annotation/xform
+ %#2 structparent number
{
\bool_if:NT \g_@@_active_struct_bool
{
@@ -1028,7 +1107,8 @@
#1 %
}
{
- \pdf_pageobject_ref:n { \@@_property_ref:nnn {@tag@objr@page@#2 }{ tagabspage }{1} }
+ \pdf_pageobject_ref:n
+ { \property_ref:nnn {@tag@objr@page@#2 }{ tagabspage }{1} }
}
% add the parent obj number to the parent tree:
\exp_args:Nne
@@ -1037,7 +1117,8 @@
#2
}
{
- \pdf_object_ref_indexed:nn { @@/struct }{ \l_@@_struct_stack_parent_tmpa_tl }
+ \pdf_object_ref_indexed:nn
+ { @@/struct }{ \l_@@_struct_stack_parent_tmpa_tl }
}
% increase the int:
\int_gincr:N \c@g_@@_parenttree_obj_int
@@ -1112,7 +1193,8 @@
\socket_new:nn { tag/struct/tag }{1}
\socket_new_plug:nnn { tag/struct/tag }{ latex-tags }
{
- \seq_set_split:Nne \l_@@_tmpa_seq { / } {#1/\prop_item:Ne\g__tag_role_tags_NS_prop{#1}}
+ \seq_set_split:Nne \l_@@_tmpa_seq { / }
+ {#1/\prop_item:Ne\g__tag_role_tags_NS_prop{#1}}
\tl_gset:Ne \g_@@_struct_tag_tl { \seq_item:Nn\l_@@_tmpa_seq {1} }
\tl_gset:Ne \g_@@_struct_tag_NS_tl{ \seq_item:Nn\l_@@_tmpa_seq {2} }
\@@_check_structure_tag:N \g_@@_struct_tag_tl
@@ -1120,10 +1202,12 @@
\socket_new_plug:nnn { tag/struct/tag }{ pdf-tags }
{
- \seq_set_split:Nne \l_@@_tmpa_seq { / } {#1/\prop_item:Ne\g_@@_role_tags_NS_prop{#1}}
+ \seq_set_split:Nne \l_@@_tmpa_seq { / }
+ {#1/\prop_item:Ne\g_@@_role_tags_NS_prop{#1}}
\tl_gset:Ne \g_@@_struct_tag_tl { \seq_item:Nn\l_@@_tmpa_seq {1} }
\tl_gset:Ne \g_@@_struct_tag_NS_tl{ \seq_item:Nn\l_@@_tmpa_seq {2} }
- \@@_role_get:VVNN \g_@@_struct_tag_tl\g_@@_struct_tag_NS_tl\l_@@_tmpa_tl\l_@@_tmpb_tl
+ \@@_role_get:VVNN
+ \g_@@_struct_tag_tl \g_@@_struct_tag_NS_tl \l_@@_tmpa_tl \l_@@_tmpb_tl
\tl_gset:Ne \g_@@_struct_tag_tl {\l_@@_tmpa_tl}
\tl_gset:Ne \g_@@_struct_tag_NS_tl{\l_@@_tmpb_tl}
\@@_check_structure_tag:N \g_@@_struct_tag_tl
@@ -1131,24 +1215,32 @@
\socket_assign_plug:nn { tag/struct/tag } {latex-tags}
% \end{macrocode}
-% \begin{macro}
+% \begin{structkeydecl}
% {
-% label (struct-key),
-% stash (struct-key),
-% parent (struct-key),
-% tag (struct-key),
-% title (struct-key),
-% title-o (struct-key),
-% alt (struct-key),
-% actualtext (struct-key),
-% lang (struct-key),
-% ref (struct-key),
-% E (struct-key)
+% label,
+% stash,
+% parent,
+% firstkid,
+% tag,
+% title,
+% title-o,
+% alt,
+% actualtext,
+% lang,
+% ref,
+% E
% }
% \begin{macrocode}
\keys_define:nn { @@ / struct }
{
- label .tl_set:N = \l_@@_struct_key_label_tl,
+ label .code:n =
+ {
+ \prop_gput:Nee\g_@@_struct_label_num_prop
+ {#1}{\int_use:N \c@g_@@_struct_abs_int}
+ \@@_property_record:eV
+ {tagpdfstruct-#1}
+ \c_@@_property_struct_clist
+ },
stash .bool_set:N = \l_@@_struct_elem_stash_bool,
parent .code:n =
{
@@ -1166,7 +1258,8 @@
{ parent~key~ignored }
}
},
- parent .default:n = {-1},
+ parent .default:n = {-1},
+ firstkid .code:n = { \tl_set:Nn \l_@@_struct_addkid_tl {left} },
tag .code:n = % S property
{
\socket_use:nn { tag/struct/tag }{#1}
@@ -1233,19 +1326,77 @@
{ Lang }
{ (#1) }
},
+ }
% \end{macrocode}
-% Ref is an array, the brackets are added through the formatting command.
+% \end{structkeydecl}
+% Ref is rather special as it values are often
+% known only at the end of the document.
+% It therefore stores it values as
+% clist of commands which are executed at the end of the document,
+% when the structure elements are written.
+% \begin{macro}{\@@_struct_Ref_obj:nN,\@@_struct_Ref_label:nN,
+% \@@_struct_Ref_dest:nN,\@@_struct_Ref_num:nN}
+% this commands are helper commands that are stored as clist
+% in the Ref key of a structure. They are executed when the structure
+% elements are written in \cs{@@_struct_write_obj}. They are used
+% in \cs{@@_struct_format_Ref}. They allow to add a Ref by object reference,
+% label, destname and structure number
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_struct_Ref_obj:nN #1 #2 %#1 a object reference
+ {
+ \tl_put_right:Ne#2
+ {
+ \c_space_tl#1
+ }
+ }
+
+\cs_new_protected:Npn \@@_struct_Ref_label:nN #1 #2 %#1 a label
+ {
+ \prop_get:NnNTF \g_@@_struct_label_num_prop {#1} \l_@@_tmpb_tl
+ {
+ \tl_put_right:Ne#2
+ {
+ \c_space_tl\tag_struct_object_ref:e{ \l_@@_tmpb_tl }
+ }
+ }
+ {
+ \msg_warning:nnn {tag}{struct-Ref-unknown}{Label~'#1'}
+ }
+ }
+\cs_new_protected:Npn \@@_struct_Ref_dest:nN #1 #2 %#1 a dest name
+ {
+ \prop_get:NnNTF \g_@@_struct_dest_num_prop {#1} \l_@@_tmpb_tl
+ {
+ \tl_put_right:Ne#2
+ {
+ \c_space_tl\tag_struct_object_ref:e{ \l_@@_tmpb_tl }
+ }
+ }
+ {
+ \msg_warning:nnn {tag}{struct-Ref-unknown}{Destination~'#1'}
+ }
+ }
+\cs_new_protected:Npn \@@_struct_Ref_num:nN #1 #2 %#1 a structure number
+ {
+ \tl_put_right:Ne#2
+ {
+ \c_space_tl\tag_struct_object_ref:e{ #1 }
+ }
+ }
+
+% \end{macrocode}
+% \end{macro}
+% \begin{structkeydecl}{ref,E,}
% \begin{macrocode}
+\keys_define:nn { @@ / struct }
+ {
ref .code:n = % ref property
{
- \tl_clear:N\l_@@_tmpa_tl
\clist_map_inline:on {#1}
{
- \tl_put_right:Ne \l_@@_tmpa_tl
- {~\@@_property_ref:en{tagpdfstruct-##1}{tagstructobj} }
+ \tag_struct_gput:nne
+ {\int_use:N \c@g_@@_struct_abs_int}{ref_label}{ ##1 }
}
- \@@_struct_gput_data_ref:ee
- { \int_use:N \c@g_@@_struct_abs_int } {\l_@@_tmpa_tl}
},
E .code:n = % E property
{
@@ -1261,9 +1412,9 @@
},
}
% \end{macrocode}
-% \end{macro}
-% \begin{macro}{AF (struct-key), AFref (struct-key),
-% AFinline (struct-key),AFinline-o (struct-key)}
+% \end{structkeydecl}
+%
+% \begin{structkeydecl}{AF, AFref,AFinline,AFinline-o,texsource,mathml}
% keys for the AF keys (associated files). They use commands from l3pdffile!
% The stream variants use txt as extension to get the mimetype.
% TODO: check if this should be configurable. For math we will perhaps need another
@@ -1314,7 +1465,8 @@
% \end{macrocode}
%
% \begin{macrocode}
-\cs_new_protected:Npn \@@_struct_add_AF:nn #1 #2 % #1 struct num #2 object reference
+\cs_new_protected:Npn \@@_struct_add_AF:nn #1 #2
+% #1 struct num #2 object reference
{
\tl_if_exist:cTF
{
@@ -1340,7 +1492,8 @@
{
\pdf_object_if_exist:eTF {#1}
{
- \@@_struct_add_AF:ee { \int_use:N \c@g_@@_struct_abs_int }{\pdf_object_ref:e {#1}}
+ \@@_struct_add_AF:ee
+ { \int_use:N \c@g_@@_struct_abs_int }{\pdf_object_ref:e {#1}}
\@@_struct_prop_gput:nne
{ \int_use:N \c@g_@@_struct_abs_int }
{ AF }
@@ -1397,8 +1550,8 @@
}
}
% \end{macrocode}
-% \end{macro}
-% \begin{macro}{root-AF (setup-key)}
+% \end{structkeydecl}
+% \begin{setupkeydecl}{root-AF}
% The root structure can take AF keys too, so we provide a key for it.
% This key is used with |\tagpdfsetup|, not in a structure!
% \begin{macrocode}
@@ -1425,7 +1578,7 @@
},
}
% \end{macrocode}
-% \end{macro}
+% \end{setupkeydecl}
% \section{User commands}
% We allow to set a language by default
% \begin{macro}{\l_@@_struct_lang_tl}
@@ -1481,13 +1634,6 @@
\g_@@_struct_tag_tl
\g_@@_struct_tag_NS_tl
\@@_check_structure_has_tag:n { \int_use:N \c@g_@@_struct_abs_int }
- \tl_if_empty:NF
- \l_@@_struct_key_label_tl
- {
- \@@_property_record:eV
- {tagpdfstruct-\l_@@_struct_key_label_tl}
- \c_@@_property_struct_clist
- }
% \end{macrocode}
% The structure number of the parent is either taken from the stack or
% has been set with the parent key.
@@ -1613,7 +1759,7 @@
%record this structure as kid:
%\tl_show:N \g_@@_struct_stack_current_tl
%\tl_show:N \l_@@_struct_stack_parent_tmpa_tl
- \@@_struct_kid_struct_gput_right:ee
+ \use:c { @@_struct_kid_struct_gput_ \l_@@_struct_addkid_tl :ee }
{ \l_@@_struct_stack_parent_tmpa_tl }
{ \g_@@_struct_stack_current_tl }
%\prop_show:c { g_@@_struct_\g_@@_struct_stack_current_tl _prop }
@@ -1706,16 +1852,16 @@
\@@_check_if_active_struct:T
{
\prop_if_exist:cTF
- { g_@@_struct_\@@_property_ref:enn{tagpdfstruct-#1}{tagstruct}{unknown}_prop } %
+ { g_@@_struct_\property_ref:enn{tagpdfstruct-#1}{tagstruct}{unknown}_prop } %
{
\@@_check_struct_used:n {#1}
%add the label structure as kid to the current structure (can be the root)
\@@_struct_kid_struct_gput_right:ee
{ \g_@@_struct_stack_current_tl }
- { \@@_property_ref:enn{tagpdfstruct-#1}{tagstruct}{1} }
+ { \property_ref:enn{tagpdfstruct-#1}{tagstruct}{1} }
%add the current structure to the labeled one as parents
\@@_prop_gput:cne
- { g_@@_struct_\@@_property_ref:enn{tagpdfstruct-#1}{tagstruct}{1}_prop }
+ { g_@@_struct_\property_ref:enn{tagpdfstruct-#1}{tagstruct}{1}_prop }
{ P }
{
\pdf_object_ref_indexed:nn { @@/struct } { \g_@@_struct_stack_current_tl }
@@ -1724,7 +1870,7 @@
% debug code
% \begin{macrocode}
%<debug> \prop_gput:cne
-%<debug> { g_@@_struct_debug_\@@_property_ref:enn{tagpdfstruct-#1}{tagstruct}{1}_prop }
+%<debug> { g_@@_struct_debug_\property_ref:enn{tagpdfstruct-#1}{tagstruct}{1}_prop }
%<debug> { P }
%<debug> {
%<debug> parent~structure:~\g_@@_struct_stack_current_tl\c_space_tl=~
@@ -1736,7 +1882,7 @@
% the global tl-vars:
% \begin{macrocode}
\@@_struct_get_parentrole:eNN
- {\@@_property_ref:enn{tagpdfstruct-#1}{tagstruct}{1}}
+ {\property_ref:enn{tagpdfstruct-#1}{tagstruct}{1}}
\l_@@_tmpa_tl
\l_@@_tmpb_tl
\@@_check_parent_child:VVVVN
@@ -1853,6 +1999,7 @@
\pdf_object_ref_indexed:nn {@@/struct}{ #1 }
}
\cs_generate_variant:Nn \tag_struct_object_ref:n {e}
+%</package>
% \end{macrocode}
%
% \end{macro}
@@ -1864,10 +2011,18 @@
% adjusted to the key in question.
% The first argument is the number of the structure,
% the second a keyword referring to a function,
-% the third the value. Currently the only keyword is \texttt{ref} which updates
-% the Ref key (an array)
-% \begin{macrocode}
-\cs_new_protected:Npn \tag_struct_gput:nnn #1 #2 #3
+% the third the value. Currently the existing keywords are all related
+% to the \texttt{Ref} key (an array).
+% The keyword \texttt{ref} takes as value an explicit object reference to
+% a structure. The keyword \texttt{ref_label} expects as value a label name (from
+% a label set in a \cs{tagstructbegin} command). The keyword \texttt{ref_dest}
+% expects a destination name set with \cs{MakeLinkTarget}. It then will refer to
+% the structure in which this \cs{MakeLinkTarget} was used. At last
+% the keyword \texttt{ref_num} expects a structure number.
+% \begin{macrocode}
+%<base>\cs_new_protected:Npn \tag_struct_gput:nnn #1 #2 #3{}
+%<*package>
+\cs_set_protected:Npn \tag_struct_gput:nnn #1 #2 #3
{
\cs_if_exist_use:cF {@@_struct_gput_data_#2:nn}
{ %warning??
@@ -1880,22 +2035,47 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_struct_gput_data_ref:nn}
+% \begin{macro}{\@@_struct_gput_data_ref_aux:nnn}
% \begin{macrocode}
%<*package>
-\cs_new_protected:Npn \@@_struct_gput_data_ref:nn #1 #2
- % #1 receiving struct num, #2 list of object ref
+\cs_new_protected:Npn \@@_struct_gput_data_ref_aux:nnn #1 #2 #3
+ % #1 receiving struct num, #2 key word #3 value
{
- \prop_get:cnN
- { g_@@_struct_#1_prop }
- {Ref}
- \l_@@_get_tmpc_tl
- \@@_struct_prop_gput:nne
- { #1 }
- { Ref }
- { \quark_if_no_value:NF\l_@@_get_tmpc_tl { \l_@@_get_tmpc_tl\c_space_tl }#2 }
+ \prop_get:cnNTF
+ { g_@@_struct_#1_prop }
+ {Ref}
+ \l_@@_get_tmpc_tl
+ {
+ \tl_put_right:No \l_@@_get_tmpc_tl
+ {\cs:w @@_struct_Ref_#2:nN \cs_end: {#3},}
+ }
+ {
+ \tl_set:No \l_@@_get_tmpc_tl
+ {\cs:w @@_struct_Ref_#2:nN \cs_end: {#3},}
+ }
+ \@@_struct_prop_gput:nno
+ { #1 }
+ { Ref }
+ { \l_@@_get_tmpc_tl }
}
-\cs_generate_variant:Nn \@@_struct_gput_data_ref:nn {ee}
+\cs_new_protected:Npn \@@_struct_gput_data_ref:nn #1 #2
+ {
+ \@@_struct_gput_data_ref_aux:nnn {#1}{obj}{#2}
+ }
+\cs_new_protected:Npn \@@_struct_gput_data_ref_label:nn #1 #2
+ {
+ \@@_struct_gput_data_ref_aux:nnn {#1}{label}{#2}
+ }
+\cs_new_protected:Npn \@@_struct_gput_data_ref_dest:nn #1 #2
+ {
+ \@@_struct_gput_data_ref_aux:nnn {#1}{dest}{#2}
+ }
+\cs_new_protected:Npn \@@_struct_gput_data_ref_num:nn #1 #2
+ {
+ \@@_struct_gput_data_ref_aux:nnn {#1}{num}{#2}
+ }
+
+\cs_generate_variant:Nn \@@_struct_gput_data_ref:nn {ee,no}
% \end{macrocode}
% \end{macro}
% \begin{macro}
@@ -1937,7 +2117,7 @@
% \section{Attributes and attribute classes}
% \begin{macrocode}
%<*header>
-\ProvidesExplPackage {tagpdf-attr-code} {2024-08-02} {0.99d}
+\ProvidesExplPackage {tagpdf-attr-code} {2024-09-16} {0.99f}
{part of tagpdf - code related to attributes and attribute classes}
%</header>
% \end{macrocode}
@@ -2012,7 +2192,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{attribute-class (struct-key)}
+% \begin{structkeydecl}{attribute-class}
% attribute-class has to store the used attribute names so that
% they can be added to the ClassMap later.
% \begin{macrocode}
@@ -2054,8 +2234,8 @@
}
}
% \end{macrocode}
-% \end{macro}
-% \begin{macro}{attribute (struct-key)}
+% \end{structkeydecl}
+% \begin{structkeydecl}{attribute}
% \begin{macrocode}
\keys_define:nn { @@ / struct }
{
@@ -2112,5 +2292,5 @@
}
%</package>
% \end{macrocode}
-% \end{macro}
+% \end{structkeydecl}
% \end{implementation}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-tree.dtx b/macros/latex/contrib/tagpdf/tagpdf-tree.dtx
index f7ae6de996..879a62c41f 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-tree.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-tree.dtx
@@ -47,13 +47,13 @@
% }^^A
% }
%
-% \date{Version 0.99d, released 2024-08-02}
+% \date{Version 0.99f, released 2024-09-16}
% \maketitle
% \begin{implementation}
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-tree-code} {2024-08-02} {0.99d}
+\ProvidesExplPackage {tagpdf-tree-code} {2024-09-16} {0.99f}
{part of tagpdf - code related to writing trees and dictionaries to the pdf}
%</header>
% \end{macrocode}
@@ -118,7 +118,7 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{macro}{viewer/startpage (setup-key)}
+% \begin{macro}{viewer/startstructure (setup-key)}
% We also need an option to setup the start structure. So we setup a key
% which sets the variable to the current structure. This still requires
% hyperref to do most of the job, this should perhaps be changed.
@@ -367,11 +367,11 @@
{
%mcid####1
\int_compare:nT
- {\@@_property_ref:enn{mcid-####1}{tagabspage}{-1}=##1} %mcid is on current page
+ {\property_ref:enn{mcid-####1}{tagabspage}{-1}=##1} %mcid is on current page
{% yes
\prop_put:Nee
\l_@@_tmpa_prop
- {\@@_property_ref:enn{mcid-####1}{tagmcid}{-1}}
+ {\property_ref:enn{mcid-####1}{tagmcid}{-1}}
{\prop_item:Nn \g_@@_mc_parenttree_prop {####1}}
}
}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-user.dtx b/macros/latex/contrib/tagpdf/tagpdf-user.dtx
index a4014b62e3..8dfa6893c0 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-user.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-user.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.99d, released 2024-08-02}
+% \date{Version 0.99f, released 2024-09-16}
% \maketitle
% \begin{documentation}
% \section{Setup commands}
@@ -309,7 +309,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-user} {2024-08-02} {0.99d}
+\ProvidesExplPackage {tagpdf-user} {2024-09-16} {0.99f}
{tagpdf - user commands}
%</header>
% \end{macrocode}
@@ -866,9 +866,9 @@
{\tagmcbegin{tag=Lbl}}
{#1}
}
- \tag_stop:n{hangfrom}
+ \tag_suspend:n{hangfrom}
\hangindent \wd\@tempboxa\noindent
- \tag_start:n{hangfrom}
+ \tag_resume:n{hangfrom}
\tagmcbegin{}\box\@tempboxa\tagmcend\tagstructend\tagmcbegin{}
}
}
@@ -1166,7 +1166,7 @@
% \tagpdfparaOff
% }
% This two command switch para mode on and off. |\tagpdfsetup| could be used
-% too but is longer. An alternative is |\tag_tool:n{para=false}|
+% too but is longer. An alternative is |\tag_tool:n{para/tagging=false}|
% \begin{macrocode}
%<base>\newcommand\tagpdfparaOn {}
%<base>\newcommand\tagpdfparaOff{}
@@ -1246,11 +1246,11 @@
\bool_gset_false:N \g_@@_in_mc_bool
}
\tag_mc_begin:n {artifact}
- \tag_stop:n{headfoot}
+ \tag_suspend:n{headfoot}
}
\cs_new_protected:Npn \@@_exclude_headfoot_end:
{
- \tag_start:n{headfoot}
+ \tag_resume:n{headfoot}
\tag_mc_end:
\bool_if:NTF \g_@@_mode_lua_bool
{
@@ -1277,12 +1277,12 @@
}
\tag_struct_begin:n{tag=Artifact,attribute-class=@@/attr/#1}
\tag_mc_begin:n {artifact=#1}
- \tag_stop:n{headfoot}
+ \tag_suspend:n{headfoot}
}
\cs_new_protected:Npn \@@_exclude_struct_headfoot_end:
{
- \tag_start:n{headfoot}
+ \tag_resume:n{headfoot}
\tag_mc_end:
\tag_struct_end:
\bool_if:NTF \g_@@_mode_lua_bool
diff --git a/macros/latex/contrib/tagpdf/tagpdf.dtx b/macros/latex/contrib/tagpdf/tagpdf.dtx
index b1d008a6e6..d40c60bc67 100644
--- a/macros/latex/contrib/tagpdf/tagpdf.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf.dtx
@@ -21,68 +21,107 @@
% https://github.com/latex3/tagpdf
%
% for those people who are interested.
-%
+%<*driver>
+\DocumentMetadata{}
+\documentclass{l3doc}
+\usepackage{array,booktabs,caption}
+\hypersetup{pdfauthor=Ulrike Fischer,
+ pdftitle=tagpdf (main module)}
+\input{tagpdf-docelements}
+\begin{document}
+ \DocInput{\jobname.dtx}
+\end{document}
+%</driver>
% \fi
+% \title{^^A
+% The \pkg{tagpdf} main module
+% \\ Part of the tagpdf package
+% }
+%
+% \author{^^A
+% Ulrike Fischer\thanks
+% {^^A
+% E-mail:
+% \href{mailto:fischer@troubleshooting-tex.de}
+% {fischer@troubleshooting-tex.de}^^A
+% }^^A
+% }
+%
+% \date{Version 0.99f, released 2024-09-16}
+% \maketitle%
+%
% \begin{documentation}
-% \begin{function}{
-% \tag_stop:, \tag_start:,
-% \tagstop, \tagstart }
+% \begin{function}{\tag_suspend:n, \tag_resume:n,\tag_stop:n, \tag_start:n }%
+% \begin{syntax}
+% \cs{tag_suspend:n}\Arg{label}\\
+% \cs{tag_resume:n}\Arg{label}\\
+% \cs{tag_stop:n}\Arg{label} (\emph{deprecated})\\
+% \cs{tag_start:n}\Arg{label} (\emph{deprecated})
+% \end{syntax}
% We need commands to stop tagging in some places.
% They switches three local booleans and also stop the counting
-% of paragraphs. If they are nested an inner \cs{tag_start:} will not
-% restart tagging.
+% of paragraphs. If they are nested an inner \cs{tag_resume:n} will not
+% restart tagging.
+% \meta{label} is only used in debugging messages to allow to follow the nesting
+% and to identify which code is disabling the tagging.
+% The label is not expanded so can be a single token, e.g. |\caption|.
+% |\tag_suspend:n| and |\tag_resume:n| are the l3-layer variants of
+% |\SuspendTagging| and |\ResumeTagging| and will be provided by the kernel
+% in the next release.
% \end{function}
-%
-% \begin{function}{\tag_stop:n, \tag_start:n }%
-% \begin{syntax}
-% \cs{tag_stop:n}\Arg{label}
-% \cs{tag_start:n}\Arg{label}\\
-% \end{syntax}
-% The commands with argument allow to give a label. This is only used
-% in debugging messages to allow to follow the nesting.
+%
+% \begin{function}{
+% \tag_stop:, \tag_start:,
+% \tagstop, \tagstart }
+% \emph{deprecated} These are variants of the above commands
+% without the debuging level. They are now deprecated and it
+% is recommended to use the kernel command
+% |\SuspendTagging|, |\ResumeTagging|, |\tag_suspend:n| and |\tag_resume:n|
+% instead.
% \end{function}
%
-% \begin{function}{activate/spaces (setup-key)}
+%
+% \begin{setupkeydecl}{activate/spaces}
% |activate/spaces| activates the additional parsing needed for
% interword spaces. It replaces the deprecated key |interwordspace|.
-% \end{function}
+% \end{setupkeydecl}
%
-% \begin{function}{activate/mc (setup-key),
-% activate/tree (setup-key),
-% activate/struct (setup-key),
-% activate/all (setup-key),
+% \begin{setupkeydecl}{activate/mc,
+% activate/tree,
+% activate/struct,
+% activate/all,
% activate-mc (deprecated),
% activate-tree (deprecated),
% activate-struct (deprecated),
% activate-all (deprecated),
% }
% Keys to activate the various tagging steps.
-% \end{function}
-%\begin{function}{activate/struct-dest (setup-key),no-struct-dest (deprecated)}
+% \end{setupkeydecl}
+%\begin{setupkeydecl}{activate/struct-dest,no-struct-dest (deprecated)}
% The key allows to suppress the creation of structure destinations
-% \end{function}
+% \end{setupkeydecl}
%
-% \begin{function}{debug/log (setup-key)}
+% \begin{setupkeydecl}{debug/log}
% The |debug/log| key takes currently the values |none|, |v|, |vv|, |vvv|, |all|.
% More details are in \texttt{tagpdf-checks}.
-% \end{function}
+% \end{setupkeydecl}
%
-% \begin{function}{activate/tagunmarked (setup-key), tagunmarked (deprecated) }
+% \begin{setupkeydecl}{activate/tagunmarked, tagunmarked (deprecated) }
% This key allows to set if (in luamode) unmarked text should be
% marked up as artifact. The initial value is true.
-% \end{function}
+% \end{setupkeydecl}
%
-% \begin{function}{activate/softhyphen (setup-key)}
+% \begin{setupkeydecl}{activate/softhyphen}
% This key allows to activates automatic handling of hyphens inserted
% by hyphenation. It only is used in luamode and replaces hyphens
% by U+00AD if the font supports this.
-% \end{function}
+% \end{setupkeydecl}
%
-% \begin{function}{page/tabsorder (setup-key), tabsorder (deprecated)}
+% \begin{setupkeydecl}{page/tabsorder, tabsorder (deprecated)}
% This sets the tabsorder on a page. The values are |row|, |column|, |structure| (default)
% or |none|. Currently this is set more or less globally. More finer control can be
% added if needed.
-% \end{function}
+% \end{setupkeydecl}
%
% \begin{function}{tagstruct,tagstructobj,tagabspage,tagmcabs,tagmcid}
% These are attributes used by the label/ref system.
@@ -93,8 +132,8 @@
% \begin{macrocode}
%<@@=tag>
%<*package>
-\ProvidesExplPackage {tagpdf} {2024-08-02} {0.99d}
- { A package to experiment with pdf tagging }
+\ProvidesExplPackage {tagpdf} {2024-09-16} {0.99f}
+ { LaTeX kernel code for PDF tagging }
\bool_if:nF
{
@@ -119,7 +158,7 @@
% \end{macrocode}
%<*debug>
% \begin{macrocode}
-\ProvidesExplPackage {tagpdf-debug} {2024-08-02} {0.99d}
+\ProvidesExplPackage {tagpdf-debug} {2024-09-16} {0.99f}
{ debug code for tagpdf }
\@ifpackageloaded{tagpdf}{}{\PackageWarning{tagpdf-debug}{tagpdf~not~loaded,~quitting}\endinput}
% \end{macrocode}
@@ -142,7 +181,7 @@
% we define a base package with dummy functions
% \begin{macrocode}
%<*base>
-\ProvidesExplPackage {tagpdf-base} {2024-08-02} {0.99d}
+\ProvidesExplPackage {tagpdf-base} {2024-09-16} {0.99f}
{part of tagpdf - provide base, no-op versions of the user commands }
%</base>
% \end{macrocode}
@@ -191,34 +230,31 @@
}
%</base>
% \end{macrocode}
-% \subsection{Indexed objects}
-% 2024-04-11: Temporary code! Can be removed after the next expl3 release!
+% \subsection{Patches related to Ref improvement}
+% 2024-09-09: Temporary code. Can be removed when the latex-lab-footnote
+% and latex-lab-toc code have been adapted to the better Ref handling.
% \begin{macrocode}
-\cs_if_free:NT \pdf_object_new_indexed:nn
- {
- \cs_generate_variant:Nn \pdf_object_new:n {e}
- \cs_generate_variant:Nn \pdf_object_write:nnn {enn}
- \cs_new_protected:Npn \pdf_object_new_indexed:nn #1 #2
- {
- \pdf_object_new:e {#1/\int_eval:n{#2}}
- }
- \cs_new_protected:Npn \pdf_object_write_indexed:nnnn #1 #2 #3 #4
- {
- \pdf_object_write:enn {#1/\int_eval:n{#2}}{#3}{#4}
- }
- \cs_generate_variant:Nn \pdf_object_write_indexed:nnnn {nnne}
- \cs_new:Npn\pdf_object_ref_indexed:nn #1 #2
- {
- \pdf_object_ref:e {#1/\int_eval:n{#2}}
- }
- \cs_new:Npn \__kernel_pdf_object_id_indexed:nn #1 #2
- {
- \int_use:c
- { c__pdf_object_ #1/\int_eval:n{#2} _int }
- }
- }
-
+%<*package>
+\AddToHook{package/latex-lab-testphase-new-or-2/after}
+ {
+ \cs_set_protected:Npn \__fnote_gput_ref:nn #1 #2 %#1 the structure number receiving the ref #2
+ {
+ \tag_struct_gput:nnn {#1}{ref_num}{#2}
+ }
+ }
+\AddToHook{package/latex-lab-testphase-toc/after}
+ {
+ \cs_set_protected:Npn \g_@@_struct_ref_by_dest:
+ {
+ \prop_map_inline:Nn\g_@@_struct_ref_by_dest_prop
+ {
+ \tag_struct_gput:nnn {##1}{ref_dest}{##2}
+ }
+ }
+ }
+%</package>
% \end{macrocode}
+%
% \subsection{a LastPage label}
% See also issue \#2 in Accessible-xref
% \begin{macro}{\@@_lastpagelabel:}
@@ -251,6 +287,7 @@
% {
% \l_@@_tmpa_tl,
% \l_@@_tmpb_tl,
+% \l_@@_Ref_tmpa_tl,
% \l_@@_get_tmpc_tl,
% \l_@@_get_parent_tmpa_tl
% \l_@@_get_parent_tmpb_tl
@@ -267,6 +304,7 @@
% \begin{macrocode}
\tl_new:N \l_@@_tmpa_tl
\tl_new:N \l_@@_tmpb_tl
+\tl_new:N \l_@@_Ref_tmpa_tl
\tl_new:N \l_@@_get_tmpc_tl
\tl_new:N \l_@@_get_parent_tmpa_tl
\tl_new:N \l_@@_get_parent_tmpb_tl
@@ -382,24 +420,10 @@
% \end{macrocode}
%
% \section{Label and Reference commands}
-% To ease transition to properties we setup internal definition. They can be replaced
-% by the property definitions once that is released.
-% %** do it!
-% \begin{macro}{\@@_property_new:nnnn,\@@_property_gset:nnnn,\@@_property_ref:nnn}
-% At first a command to define new properties
-% \begin{macrocode}
- \cs_new_eq:NN \@@_property_new:nnnn \property_new:nnnn
-% \end{macrocode}
-% For the non-shipout code we need also the option to reset property
-% \begin{macrocode}
- \cs_new_eq:NN \@@_property_gset:nnnn \property_gset:nnnn
-% \end{macrocode}
-% The command to reference while giving a local default.
-% \begin{macrocode}
- \cs_new_eq:NN \@@_property_ref:nnn \property_ref:nnn
- \cs_new_eq:NN \@@_property_ref:nn \property_ref:nn
-% \end{macrocode}
-% The command to record
+% The code uses mostly the kernel properties but need a few local variants.
+% \begin{macro}{\@@_property_record:nn}
+% The command to record a property while preserving the spaces similar to the standard
+% \cs{label}.
% \begin{macrocode}
\cs_new_protected:Npn \@@_property_record:nn #1#2
{
@@ -411,8 +435,8 @@
% \end{macrocode}
% And a few variants
% \begin{macrocode}
-\cs_generate_variant:Nn \@@_property_ref:nnn {enn}
-\cs_generate_variant:Nn \@@_property_ref:nn {en}
+\cs_generate_variant:Nn \property_ref:nnn {enn}
+\cs_generate_variant:Nn \property_ref:nn {en}
\cs_generate_variant:Nn \@@_property_record:nn {en,eV}
% \end{macrocode}
% \end{macro}
@@ -423,7 +447,7 @@
% \begin{macrocode}
\cs_new:Npn \@@_property_ref_lastpage:nn #1 #2
{
- \@@_property_ref:nnn {@tag@LastPage}{#1}{#2}
+ \property_ref:nnn {@tag@LastPage}{#1}{#2}
}
% \end{macrocode}
%\end{macro}
@@ -440,21 +464,21 @@
% With mc-chunks we store the absolute page number |tagabspage|,
% the absolute id |tagmcabc|, and the id on the page |tagmcid|.
% \begin{macrocode}
-\@@_property_new:nnnn
+\property_new:nnnn
{ tagstruct } { now }
- {0} { \int_use:N \c@g_@@_struct_abs_int }
-\@@_property_new:nnnn { tagstructobj } { now } {}
+ {1} { \int_use:N \c@g_@@_struct_abs_int }
+\property_new:nnnn { tagstructobj } { now } {}
{
\pdf_object_ref_indexed:nn { @@/struct } { \c@g_@@_struct_abs_int }
}
-\@@_property_new:nnnn
+\property_new:nnnn
{ tagabspage } { shipout }
{0} { \int_use:N \g_shipout_readonly_int }
-\@@_property_new:nnnn { tagmcabs } { now }
+\property_new:nnnn { tagmcabs } { now }
{0} { \int_use:N \c@g_@@_MCID_abs_int }
\flag_new:n { @@/mcid }
-\@@_property_new:nnnn {tagmcid } { shipout }
+\property_new:nnnn {tagmcid } { shipout }
{0} { \flag_height:n { @@/mcid } }
% \end{macrocode}
@@ -482,6 +506,7 @@
\cs_set_eq:NN \@@_seq_new:N \seq_new:N
\cs_set_eq:NN \@@_prop_gput:Nnn \prop_gput:Nnn
\cs_set_eq:NN \@@_seq_gput_right:Nn \seq_gput_right:Nn
+\cs_set_eq:NN \@@_seq_gput_left:Nn \seq_gput_left:Nn
\cs_set_eq:NN \@@_seq_item:cn \seq_item:cn
\cs_set_eq:NN \@@_prop_item:cn \prop_item:cn
\cs_set_eq:NN \@@_seq_show:N \seq_show:N
@@ -489,6 +514,7 @@
% cnx temporary needed for latex-lab-graphic code
\cs_generate_variant:Nn \@@_prop_gput:Nnn { Nen , Nee, Nne , cnn, cen, cne, cno, cnx}
\cs_generate_variant:Nn \@@_seq_gput_right:Nn { Ne , No, cn, ce }
+\cs_generate_variant:Nn \@@_seq_gput_left:Nn { ce }
\cs_generate_variant:Nn \@@_prop_new:N { c }
\cs_generate_variant:Nn \@@_seq_new:N { c }
\cs_generate_variant:Nn \@@_seq_show:N { c }
@@ -500,6 +526,7 @@
% \section{General tagging commands}
%
% \begin{macro}{
+% \tag_suspend:n,\tag_resume:n,
% \tag_stop:,\tag_start:,
% \tag_stop:n,\tag_start:n}
% We need commands to stop tagging in some places.
@@ -508,7 +535,8 @@
% counter. Tagging only is only restarted at the outer level,
% if the current level is 1.
% The commands with argument allow to give a label. This is only used
-% in debugging messages to allow to follow the nesting.
+% in debugging messages to allow to follow the nesting. The label is
+% not expand so can e.g. be a single command token.
%
% \begin{variable}{\l_@@_tag_stop_int}
% When stop/start pairs are nested we do not want the inner
@@ -525,7 +553,7 @@
% \begin{macrocode}
\cs_set_protected:Npn \tag_stop:
{
-%<debug> \msg_note:nne {tag / debug }{tag-stop}{ \int_use:N \l_@@_tag_stop_int }
+%<debug> \msg_note:nne {tag / debug }{tag-suspend}{ \int_use:N \l_@@_tag_stop_int }
\int_incr:N \l_@@_tag_stop_int
\bool_set_false:N \l_@@_active_struct_bool
\bool_set_false:N \l_@@_active_mc_bool
@@ -542,22 +570,24 @@
\bool_set_true:N \l_@@_active_socket_bool
\@@_start_para_ints:
}
-%<debug> \msg_note:nne {tag / debug }{tag-start}{ \int_use:N \l_@@_tag_stop_int }
+%<debug> \msg_note:nne {tag / debug }{tag-resume}{ \int_use:N \l_@@_tag_stop_int }
}
\cs_set_eq:NN\tagstop\tag_stop:
\cs_set_eq:NN\tagstart\tag_start:
% \end{macrocode}
% \begin{macrocode}
-\cs_set_protected:Npn \tag_stop:n #1
+\cs_set_protected:Npn \tag_suspend:n #1
{
-%<debug> \msg_note:nnee {tag / debug }{tag-stop}{ \int_use:N \l_@@_tag_stop_int }{#1}
+%<debug> \msg_note:nnee {tag / debug }{tag-suspend}
+%<debug> { \int_use:N \l_@@_tag_stop_int }{\exp_not:n{#1}}
\int_incr:N \l_@@_tag_stop_int
\bool_set_false:N \l_@@_active_struct_bool
\bool_set_false:N \l_@@_active_mc_bool
\bool_set_false:N \l_@@_active_socket_bool
\@@_stop_para_ints:
}
-\cs_set_protected:Npn \tag_start:n #1
+\cs_set_eq:NN \tag_stop:n \tag_suspend:n
+\cs_set_protected:Npn \tag_resume:n #1
{
\int_if_zero:nF { \l_@@_tag_stop_int } { \int_decr:N \l_@@_tag_stop_int }
\int_if_zero:nT { \l_@@_tag_stop_int }
@@ -566,9 +596,11 @@
\bool_set_true:N \l_@@_active_mc_bool
\bool_set_true:N \l_@@_active_socket_bool
\@@_start_para_ints:
- }
-%<debug> \msg_note:nnee {tag / debug }{tag-start}{ \int_use:N \l_@@_tag_stop_int }{#1}
+ }
+%<debug> \msg_note:nnee {tag / debug }{tag-resume}
+%<debug> { \int_use:N \l_@@_tag_stop_int }{\exp_not:n{#1}}
}
+\cs_set_eq:NN \tag_start:n \tag_resume:n
%</package|debug>
%<*base>
\cs_new_protected:Npn \tag_stop:{}
@@ -577,6 +609,11 @@
\cs_new_protected:Npn \tagstart{}
\cs_new_protected:Npn \tag_stop:n #1 {}
\cs_new_protected:Npn \tag_start:n #1 {}
+% \end{macrocode}
+% Until the commands are provided by the kernel we provide them here too
+% \begin{macrocode}
+\cs_set_eq:NN \tag_suspend:n \tag_stop:n
+\cs_set_eq:NN \tag_resume:n \tag_start:n
%</base>
% \end{macrocode}
% \end{macro}
@@ -586,13 +623,13 @@
%
% TODO: the log-levels must be sorted
%
-% \begin{macro}
+% \begin{setupkeydecl}
% {
-% activate/mc (setup-key),
-% activate/tree (setup-key),
-% activate/struct (setup-key),
-% activate/all (setup-key),
-% activate/struct-dest (setup-key),
+% activate/mc,
+% activate/tree,
+% activate/struct,
+% activate/all,
+% activate/struct-dest,
% }
% Keys to (globally) activate tagging.
% |activate/spaces| activates the additional parsing needed for
@@ -620,14 +657,14 @@
activate-all .default:n = true,
no-struct-dest .bool_gset_inverse:N = \g_@@_active_struct_dest_bool,
% \end{macrocode}
-% \end{macro}
-% \begin{macro}{debug/show (setup-key)}
+% \end{setupkeydecl}
+% \begin{setupkeydecl}{debug/show}
% Subkeys/values are defined in various other places.
% \begin{macrocode}
debug/show .choice:,
% \end{macrocode}
-% \end{macro}
-% \begin{macro}{debug/log (setup-key), debug/uncompress (setup-key), log (deprecated), uncompress (deprecated)}
+% \end{setupkeydecl}
+% \begin{setupkeydecl}{debug/log, debug/uncompress, log (deprecated), uncompress (deprecated)}
% The |log| takes currently the values |none|, |v|, |vv|, |vvv|, |all|.
% The description of the log levels is in tagpdf-checks.
% \begin{macrocode}
@@ -648,8 +685,8 @@
log .meta:n = {debug/log={#1}},
uncompress .code:n = { \pdf_uncompress: },
% \end{macrocode}
-% \end{macro}
-% \begin{macro}{activate/tagunmarked (setup-key),tagunmarked (deprecated)}
+% \end{setupkeydecl}
+% \begin{setupkeydecl}{activate/tagunmarked,tagunmarked (deprecated)}
% This key allows to set if (in luamode) unmarked text should be
% marked up as artifact. The initial value is true.
% \begin{macrocode}
@@ -660,15 +697,15 @@
% \begin{macrocode}
tagunmarked .bool_gset:N = \g_@@_tagunmarked_bool,
% \end{macrocode}
-% \end{macro}
-% \begin{macro}{activate/softhyphen (setup-key)}
+% \end{setupkeydecl}
+% \begin{setupkeydecl}{activate/softhyphen}
% This key activates (in luamode) the handling of soft hyphens.
% \begin{macrocode}
activate/softhyphen .bool_gset:N = \g_@@_softhyphen_bool,
activate/softhyphen .initial:n = true,
% \end{macrocode}
-% \end{macro}
-% \begin{macro}{page/tabsorder (setup-key),tabsorder (deprecated)}
+% \end{setupkeydecl}
+% \begin{setupkeydecl}{page/tabsorder,tabsorder (deprecated)}
% This sets the tabsorder on a page. The values are |row|, |column|, |structure| (default)
% or |none|. Currently this is set more or less globally. More finer control can be
% added if needed.
@@ -689,7 +726,7 @@
tabsorder .meta:n = {page/tabsorder={#1}},
}
% \end{macrocode}
-% \end{macro}
+% \end{setupkeydecl}
% \section{loading of engine/more dependent code}
% \begin{macrocode}
\sys_if_engine_luatex:T
diff --git a/macros/latex/contrib/tagpdf/tagpdf.pdf b/macros/latex/contrib/tagpdf/tagpdf.pdf
index f7c6ea02a3..a6443d59a4 100644
--- a/macros/latex/contrib/tagpdf/tagpdf.pdf
+++ b/macros/latex/contrib/tagpdf/tagpdf.pdf
Binary files differ
diff --git a/macros/latex/contrib/tagpdf/tagpdf.tex b/macros/latex/contrib/tagpdf/tagpdf.tex
index 10d36d09a0..9b0beb8101 100644
--- a/macros/latex/contrib/tagpdf/tagpdf.tex
+++ b/macros/latex/contrib/tagpdf/tagpdf.tex
@@ -16,8 +16,8 @@
}
\DebugBlocksOff
\makeatletter
-\def\UlrikeFischer@package@version{0.99d}
-\def\UlrikeFischer@package@date{2024-08-02}
+\def\UlrikeFischer@package@version{0.99f}
+\def\UlrikeFischer@package@date{2024-09-16}
\makeatother
\documentclass[bibliography=totoc,a4paper]{article}
@@ -99,7 +99,7 @@ in the \pkg{latex-lab} bundle for the Tagged PDF project (i.e., loaded by that c
The package is developed and improved in parallel with the code in the \pkg{latex-lab}
bundle (part of the core \LaTeX{} distribution), the \pkg{pdfmanagement-testphase}
-package (the \LaTeX{} PDF management bundle) and the L3 programming layer (part of of the \LaTeX{} format).
+package (the \LaTeX{} PDF management bundle) and the L3 programming layer (part of the \LaTeX{} format).
That means you must ensure that all these components are up-to-date and in
sync which each other.
@@ -1031,7 +1031,7 @@ The key-val list understands the following keys:
marked but not stored in the kid-key of the current structure.
\item[\PrintKeyName{label}] This key sets a label by which you can call
- the marked content later in another structure (if it has been stashed
+ the marked content \emph{later} in another structure (if it has been stashed
with the previous key). Internally the label name will start with
\texttt{tagpdf-}.
@@ -1175,10 +1175,10 @@ This (expandable) command returns the values of some variables. Currently, the w
\item \verb+struct_counter+: This returns a number and works also if
only \pkg{tagpdf-base} has been loaded. It gives back the state of
- the absolute structure counter and so number of the last structure
+ the absolute structure counter and so the number of the last structure
that has been created. This can be used to detect if in a piece of
code there are structure commands. Be aware that this is a \LaTeX{}
- counter and so reset in some places.
+ counter and so is reset in some places.
\item \verb+mc_counter+: This returns a number and works also if only
\pkg{tagpdf-base} has been loaded. It gives back the state of the
@@ -1699,22 +1699,27 @@ The key-val list understands the following keys:
content and structures.
\item[\PrintKeyName{label}] This key sets a label by which one can
- refer to the structure. It is e.g. used by
- \cs{tag\_struct\_use:n} (where a real label is actually not needed
- as you can only use structures already defined), and by the |ref|
- key (which can refer to future structures). Internally the label
- name will start with \texttt{tagpdfstruct-} and it stores the two
+ refer to the structure. Currently the key writes a property whose
+ name starts with \texttt{tagpdfstruct-} to the aux-file with the two
attributes \texttt{tagstruct} (the structure number) and
- \texttt{tagstructobj} (the object reference).
+ \texttt{tagstructobj} (the object reference) but also stores the
+ name and the structure number into a prop for use in the current compilation.
+ The label is e.g. used by \cs{tag\_struct\_use:n} and by the |ref|
+ key (which can refer to future structures).
\item[\PrintKeyName{parent}] With the parent key one can choose another
parent. The value is a structure number which must refer to an
already existing, previously created structure. Such a structure
number can have been stored previously with \cs{tag\_get:n}, but one
can also use a label on the parent structure and then use
- \cs{ref\_value:nn}\verb+{tagpdfstruct-label}{tagstruct}+ to retrieve
+ \cs{property\_ref:nn}\verb+{tagpdfstruct-label}{tagstruct}+ to retrieve
it.
+ \item[\PrintKeyName{firstkid}] If this key is used the structure is
+ added at the left of the kids of the parent structure (if the structure is not stashed). This means that it will be the first kid of the structure (unless some
+ later structure uses the key too). This can be needed e.g. for a caption as
+ the PDF reference requires it to be the first or last kid of its structure.
+
\item[\PrintKeyName{alt}] This key inserts an \texttt{/Alt} value in the
dictionary of structure object, see section~\ref{sec:alt}. The value
is handled as verbatim string and hex encoded. The value will be
@@ -1852,7 +1857,9 @@ The key-val list understands the following keys:
structure. The value should be a comma separated list of
structure labels set with the |label| key.
e.g. |ref={label1,label2}|. It can be used more than once in the
- key/value argument and combines the references.
+ key/value argument and combines the references. See below
+ in section~\ref{sec:Refkey} for an extended discussion about the |/Ref|
+ array.
\item[\PrintKeyName{E}] This key sets the |/E| key, the expanded
form of an abbreviation or an acronym (I couldn't think of a
@@ -1877,6 +1884,25 @@ These commands insert a structure previously stashed away as kid into the
currently active structure. A structure should be used only once, if the
structure already has a parent you will get a warning.
+\subsubsection{Updating the \texttt{Ref} key in structures}\label{sec:Refkey}
+
+Structures that cross reference other structures, e.g. citation commands, table of
+content entries, footnote require often a \texttt{Ref} key. \texttt{Ref}
+can be added with the |ref| key of \cs{tagstructbegin} described above
+but as it is a task that often has to be done automatically in code
+there exist also a command that allows to extend the \texttt{Ref} key (and perhaps in future also other keys) later.
+This command allows to add the value, the target structure of the \texttt{Ref} key,
+with four methods: directly as object reference, through a label name set with the |label| key, through a destination name if a \cs{MakeLinkTarget} has been used in
+the target structure---this also works if hyperref has not been loaded---and through
+the structure number, which has been stored e.g. in a label.
+
+\begin{docCommands}
+ {
+ {doc name=tag_struct_gput:nnn,doc parameter=\marg{structurenumber}\marg{keyword}\marg{value}},
+ }\end{docCommands}
+
+The allowed \meta{keywords} are \texttt{ref}, \texttt{ref\_label} \texttt{ref\_dest}
+and \texttt{ref\_num}.
\subsubsection{Root structure}
@@ -2038,36 +2064,49 @@ or the output routine is called.
\begin{docCommands}
{
- {doc name=tag_stop:},
- {doc name=tag_start:},
- {doc name=tagstop},
- {doc name=tagstart},
- {doc name=tag_stop:n,doc parameter=\marg{label}},
- {doc name=tag_start:n,doc parameter=\marg{label}}
+ {doc name=tag_suspend:n,doc parameter=\marg{label}},
+ {doc name=tag_resume:n,doc parameter=\marg{label}}
}
\end{docCommands}
-This commands stop and start tagging in the current group by switching
+These commands suspend and resume tagging in the current group by switching
\emph{local} booleans. They also stop the increasing of the counters which
keep track of paragraphs if the correct wrapper commands are used.
Restarting tagging is normally only needed if groups can't be used and then
-must be done with care: |\tagstart| should normally only restart tagging if
+must be done with care: |\tag_resume:n| should normally only restart tagging if
the corresponding stop command actually stopped tagging. This is implement
through a local counter which keeps track of the level.
-The \meta{label} can be used to identify the command in debugging message.
+The \meta{label} can be used to identify the command in debugging message. The label is not expanded and so can for example be a single command token.
+
+The commands are the L3-layer versions of |\SuspendTagging| and |\ResumeTagging|
+and will be available in the kernel with the 2024 november release.
\begin{taglstlisting}
-\tag_stop:n{outer}
+\tag_suspend:n{\outercommand}
...
- \tag_stop:n{inner}
+ \tag_suspend:n{\innercommand}
...
- \tag_start:n{inner}
+ \tag_resume:n{\innercommand}
...
-\tag_start:n{outer}
+\tag_resume:n{\outercommand}
\end{taglstlisting}
+\begin{docCommands}
+ {
+ {doc name=tag_stop:},
+ {doc name=tag_start:},
+ {doc name=tagstop},
+ {doc name=tagstart},
+ {doc name=tag_stop:n,doc parameter=\marg{label}},
+ {doc name=tag_start:n,doc parameter=\marg{label}}
+ }
+\end{docCommands}
+
+These commands are now deprecated in favor or |\tag_suspend:n| and |\tag_resume:n|
+but are still provided for some time.
+
\subsection{Lazy and automatic tagging}\label{sec:lazy}
@@ -3029,7 +3068,11 @@ cases building the structure should now need only two or three
compilations. The new code requires a current pdfmanagement-testphase and
is then used automatically if the new engines are detected.
-\subsection{}
+\subsection{Changes in version 0.99f}
+
+Deprecated |\tag_start:|, |\tag_stop:|, |\tag_stop:n| and
+|\tag_start:n| in favor of |\tag_suspend:n| and |\tag_resume:n|.
+
\printbibliography[heading=bibintoc]
diff --git a/macros/latex/contrib/tagpdf/tagpdfdocu-patches.sty b/macros/latex/contrib/tagpdf/tagpdfdocu-patches.sty
index 6ae5840b11..81ce196e8e 100644
--- a/macros/latex/contrib/tagpdf/tagpdfdocu-patches.sty
+++ b/macros/latex/contrib/tagpdf/tagpdfdocu-patches.sty
@@ -1,5 +1,5 @@
%\RequirePackage[enable-debug]{expl3}[2018/06/14]
-\ProvidesExplPackage {tagpdfdocu-patches} {2024-08-02} {0.99d}
+\ProvidesExplPackage {tagpdfdocu-patches} {2024-09-16} {0.99f}
{patches/commands for the tagpdf documentation}
\RequirePackage{etoolbox,xpatch}
diff --git a/macros/latex/contrib/tcolorbox/CHANGES.md b/macros/latex/contrib/tcolorbox/CHANGES.md
index a0287ad4b2..994c7ac4c1 100644
--- a/macros/latex/contrib/tcolorbox/CHANGES.md
+++ b/macros/latex/contrib/tcolorbox/CHANGES.md
@@ -22,6 +22,25 @@ and this project adheres to
+## [6.4.0] - 2024-09-07
+
+### Added
+- Libary `documentation`:
+ - `\refPkg` for referring packages on CTAN (issue #290)
+
+### Changed
+- Precautions for tikz options with square brackets (issue #284)
+- Usage warnings added for deprecated options `before example`, `after example`, and `graphical environment` (issue #284)
+- Documenation for TikZ Picture Option Keys adapted (issue #285)
+- Label `tcolorbox` added to LaTeX hooks (issue #287)
+- Libary `minted`: Minted option `envname` now supported by package `minted` directly (issue #2)
+
+### Fixed
+- Libary `minted`: `minted Warning: Macro \minted@def@optcl is deprecated with minted v3` (issue #2)
+- `tcolorbox-tutorial-poster.tex`: minted v3 seems to need escaped comma `\,` instead of `,` inside `breakafter`
+
+
+
## [6.3.0] - 2024-07-10
### Added
diff --git a/macros/latex/contrib/tcolorbox/README.md b/macros/latex/contrib/tcolorbox/README.md
index e90e2bec18..261fa152a2 100644
--- a/macros/latex/contrib/tcolorbox/README.md
+++ b/macros/latex/contrib/tcolorbox/README.md
@@ -1,4 +1,4 @@
-# The LaTeX package tcolorbox - version 6.3.0 (2024/07/10)
+# The LaTeX package tcolorbox - version 6.4.0 (2024/09/27)
> Copyright (c) 2006-2024 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 cade134ab2..82cdde4e21 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 6.3.0 (2024/07/10)
+%% The LaTeX package tcolorbox - version 6.4.0 (2024/09/27)
%% tcbbreakable.code.tex: Code for breakable colorboxes
%%
%% -------------------------------------------------------------------------------------------
@@ -17,7 +17,7 @@
%%
%% This work consists of all files listed in README
%%
-\tcb@set@library@version{6.3.0}
+\tcb@set@library@version{6.4.0}
\RequirePackage{pdfcol}
\pdfcolInitStack{tcb@breakable}
diff --git a/macros/latex/contrib/tcolorbox/tcbdocumentation.code.tex b/macros/latex/contrib/tcolorbox/tcbdocumentation.code.tex
index a550de9fff..7de745b500 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 6.3.0 (2024/07/10)
+%% The LaTeX package tcolorbox - version 6.4.0 (2024/09/27)
%% tcbdocumentation.code.tex: Code for LaTeX documentations
%%
%% -------------------------------------------------------------------------------------------
@@ -17,13 +17,13 @@
%%
%% This work consists of all files listed in README
%%
-\tcb@set@library@version{6.3.0}
+\tcb@set@library@version{6.4.0}
\tcbuselibrary{listings,skins,external,raster}
\ifdefined\printindex\else%
\RequirePackage{makeidx}[2000/03/29]%
- \AddToHook{begindocument/before}{%
+ \AddToHook{begindocument/before}[tcolorbox]{%
\@ifpackageloaded{imakeidx}{%
\tcb@warning{`imakeidx' package should be loaded before `documentation' library}%
}{}}%
@@ -66,7 +66,7 @@
\DeclareRobustCommand\cs[1]{\texttt{\char`\\#1}}
\def\meta@font@select{\rmfamily\itshape}
-\AtEndPreamble{%
+\AtEndPreamble[tcolorbox]{%
\@ifpackageloaded{doc}{%
}{% code taken from doc.sty
\ifx\l@nohyphenation\undefined
@@ -228,7 +228,7 @@
value=value,values=Values}},
}
-\AtBeginDocument{%
+\AtBeginDocument[tcolorbox]{%
\csname tcb@doc@index@\idx@format\endcsname%
\hypersetup{
citecolor=\kvtcb@colhyper,
@@ -922,7 +922,16 @@
\def\refKey{\tcb@ref@doc{key}}
\def\refPathOperation{\tcb@ref@doc{path}}
-\AtBeginDocument{%
+\NewDocumentCommand \refPkg { O{#2} m } {%
+ \href{https://ctan.org/pkg/#1}%
+ {%
+ \refAux{#2}%
+ \kvtcb@doc@format@page{{\fontfamily{pzd}\fontencoding{U}\fontseries{m}\fontshape{n}\selectfont\char213}%
+ \,CTAN}%
+ }%
+}
+
+\AtBeginDocument[tcolorbox]{%
\ifHy@colorlinks
\def\refAux#1{\textcolor{\kvtcb@colhyper}{\tcb@scantokens{#1}}}%
\def\refAuxcs#1{\textcolor{\kvtcb@colhyper}{\tcb@cs{#1}}}%
@@ -1065,8 +1074,6 @@
% deprecated
\tcbset{
- before example/.store in=\kvtcb@beforeexample,
- after example/.store in=\kvtcb@afterexample,
- before example=\par\smallskip,
- after example=,
+ before example/.code = {\tcb@warning@deprecatedkey{v3.50 (2015/03/16)}},
+ after example/.code = {\tcb@warning@deprecatedkey{v3.50 (2015/03/16)}},
}
diff --git a/macros/latex/contrib/tcolorbox/tcbexternal.code.tex b/macros/latex/contrib/tcolorbox/tcbexternal.code.tex
index 060f1bb9a0..e9a93db619 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 6.3.0 (2024/07/10)
+%% The LaTeX package tcolorbox - version 6.4.0 (2024/09/27)
%% tcbexternal.code.tex: Code for externalization
%%
%% -------------------------------------------------------------------------------------------
@@ -17,7 +17,7 @@
%%
%% This work consists of all files listed in README
%%
-\tcb@set@library@version{6.3.0}
+\tcb@set@library@version{6.4.0}
\tcbuselibrary{pro@cessing}
diff --git a/macros/latex/contrib/tcolorbox/tcbfitting.code.tex b/macros/latex/contrib/tcolorbox/tcbfitting.code.tex
index e133063705..73d73f5a99 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 6.3.0 (2024/07/10)
+%% The LaTeX package tcolorbox - version 6.4.0 (2024/09/27)
%% 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{6.3.0}
+\tcb@set@library@version{6.4.0}
\newdimen\tcbfitdim
\newdimen\tcb@lowerfitdim
diff --git a/macros/latex/contrib/tcolorbox/tcbhooks.code.tex b/macros/latex/contrib/tcolorbox/tcbhooks.code.tex
index 6a60587177..6d825fc61c 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 6.3.0 (2024/07/10)
+%% The LaTeX package tcolorbox - version 6.4.0 (2024/09/27)
%% 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{6.3.0}
+\tcb@set@library@version{6.4.0}
\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 9a869f870f..09c5723e8d 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 6.3.0 (2024/07/10)
+%% The LaTeX package tcolorbox - version 6.4.0 (2024/09/27)
%% 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{6.3.0}
+\tcb@set@library@version{6.4.0}
\RequirePackage{listings}[2007/02/22]
diff --git a/macros/latex/contrib/tcolorbox/tcblistingscore.code.tex b/macros/latex/contrib/tcolorbox/tcblistingscore.code.tex
index f3ffb31b90..4022b58069 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 6.3.0 (2024/07/10)
+%% The LaTeX package tcolorbox - version 6.4.0 (2024/09/27)
%% 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{6.3.0}
+\tcb@set@library@version{6.4.0}
\tcbuselibrary{pro@cessing}
diff --git a/macros/latex/contrib/tcolorbox/tcblistingsutf8.code.tex b/macros/latex/contrib/tcolorbox/tcblistingsutf8.code.tex
index 0fb3fd8d22..0bdbef4290 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 6.3.0 (2024/07/10)
+%% The LaTeX package tcolorbox - version 6.4.0 (2024/09/27)
%% 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{6.3.0}
+\tcb@set@library@version{6.4.0}
\tcbuselibrary{listings}
diff --git a/macros/latex/contrib/tcolorbox/tcbmagazine.code.tex b/macros/latex/contrib/tcolorbox/tcbmagazine.code.tex
index 49059a0863..0f54466b1e 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 6.3.0 (2024/07/10)
+%% The LaTeX package tcolorbox - version 6.4.0 (2024/09/27)
%% 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{6.3.0}
+\tcb@set@library@version{6.4.0}
\tcbuselibrary{breakable}
diff --git a/macros/latex/contrib/tcolorbox/tcbminted.code.tex b/macros/latex/contrib/tcolorbox/tcbminted.code.tex
index d21bc11036..60de31f6bf 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 6.3.0 (2024/07/10)
+%% The LaTeX package tcolorbox - version 6.4.0 (2024/09/27)
%% tcbminted.code.tex: Code for colorboxes with listings
%%
%% -------------------------------------------------------------------------------------------
@@ -18,12 +18,14 @@
%% This work consists of all files listed in README
%%
%\makeatletter
-\tcb@set@library@version{6.3.0}
+\tcb@set@library@version{6.4.0}
\RequirePackage{minted}[2021/12/24]
% to be removed, if integrated into the minted package (#281)
-\minted@def@optcl{envname}{-P envname}{#1}
+\IfPackageAtLeastTF{minted}{2024/08/25}{}{%
+ \minted@def@optcl{envname}{-P envname}{#1}%
+}
\tcbuselibrary{listings@core}
diff --git a/macros/latex/contrib/tcolorbox/tcbposter.code.tex b/macros/latex/contrib/tcolorbox/tcbposter.code.tex
index 3fcec6b22c..67705b7b57 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 6.3.0 (2024/07/10)
+%% The LaTeX package tcolorbox - version 6.4.0 (2024/09/27)
%% tcbposter.code.tex: Code for posters
%%
%% -------------------------------------------------------------------------------------------
@@ -17,7 +17,7 @@
%%
%% This work consists of all files listed in README
%%
-\tcb@set@library@version{6.3.0}
+\tcb@set@library@version{6.4.0}
\tcbuselibrary{breakable,magazine,skins,fitting}
diff --git a/macros/latex/contrib/tcolorbox/tcbprocessing.code.tex b/macros/latex/contrib/tcolorbox/tcbprocessing.code.tex
index a5bdabc874..086bc37458 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 6.3.0 (2024/07/10)
+%% The LaTeX package tcolorbox - version 6.4.0 (2024/09/27)
%% tcbprocessing.code.tex: Code for conditional processing
%%
%% -------------------------------------------------------------------------------------------
@@ -17,7 +17,7 @@
%%
%% This work consists of all files listed in README
%%
-\tcb@set@library@version{6.3.0}
+\tcb@set@library@version{6.4.0}
\ExplSyntaxOn
diff --git a/macros/latex/contrib/tcolorbox/tcbraster.code.tex b/macros/latex/contrib/tcolorbox/tcbraster.code.tex
index e3645497e9..3aead9fbb8 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 6.3.0 (2024/07/10)
+%% The LaTeX package tcolorbox - version 6.4.0 (2024/09/27)
%% 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{6.3.0}
+\tcb@set@library@version{6.4.0}
\newcounter{tcbrastercolumn}
\newcounter{tcbrasterrow}
diff --git a/macros/latex/contrib/tcolorbox/tcbskins.code.tex b/macros/latex/contrib/tcolorbox/tcbskins.code.tex
index 5e3faed9dd..bd5f3f9fdf 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 6.3.0 (2024/07/10)
+%% The LaTeX package tcolorbox - version 6.4.0 (2024/09/27)
%% 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{6.3.0}
+\tcb@set@library@version{6.4.0}
\RequirePackage{tikzfill.image}
diff --git a/macros/latex/contrib/tcolorbox/tcbskinsjigsaw.code.tex b/macros/latex/contrib/tcolorbox/tcbskinsjigsaw.code.tex
index 6a54fca567..a046fcd34d 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 6.3.0 (2024/07/10)
+%% The LaTeX package tcolorbox - version 6.4.0 (2024/09/27)
%% 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{6.3.0}
+\tcb@set@library@version{6.4.0}
\tcbuselibrary{skins}
diff --git a/macros/latex/contrib/tcolorbox/tcbtheorems.code.tex b/macros/latex/contrib/tcolorbox/tcbtheorems.code.tex
index cfbc1ba796..7a8b2d4261 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 6.3.0 (2024/07/10)
+%% The LaTeX package tcolorbox - version 6.4.0 (2024/09/27)
%% 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{6.3.0}
+\tcb@set@library@version{6.4.0}
\RequirePackage{amsmath}
diff --git a/macros/latex/contrib/tcolorbox/tcbvignette.code.tex b/macros/latex/contrib/tcolorbox/tcbvignette.code.tex
index 51a4c9d6d0..92c23ca3f1 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 6.3.0 (2024/07/10)
+%% The LaTeX package tcolorbox - version 6.4.0 (2024/09/27)
%% tcbvignette.code.tex: Code for ornamental frames
%%
%% -------------------------------------------------------------------------------------------
@@ -17,7 +17,7 @@
%%
%% This work consists of all files listed in README
%%
-\tcb@set@library@version{6.3.0}
+\tcb@set@library@version{6.4.0}
\tcbuselibrary{skins}
diff --git a/macros/latex/contrib/tcolorbox/tcbxparse.code.tex b/macros/latex/contrib/tcolorbox/tcbxparse.code.tex
index 5223be23ea..a4c4438703 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 6.3.0 (2024/07/10)
+%% The LaTeX package tcolorbox - version 6.4.0 (2024/09/27)
%% tcbxparse.code.tex: Code for xparse features
%%
%% -------------------------------------------------------------------------------------------
@@ -18,6 +18,6 @@
%% This work consists of all files listed in README
%%
%\makeatletter
-\tcb@set@library@version{6.3.0}
+\tcb@set@library@version{6.4.0}
\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 1e380d5559..9420a8f153 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 cb8586e6ec..c2cbaa79d9 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 6.3.0 (2024/07/10)
+%% The LaTeX package tcolorbox - version 6.4.0 (2024/09/27)
%% 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 2d332523c2..b78d77393e 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 6f878d2f1d..322c46c38d 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 6.3.0 (2024/07/10)
+%% The LaTeX package tcolorbox - version 6.4.0 (2024/09/27)
%% 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 f81aee0783..e37dceddf9 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 7c6c769d1d..ebc9b4e772 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 6.3.0 (2024/07/10)
+%% The LaTeX package tcolorbox - version 6.4.0 (2024/09/27)
%% tcolorbox-tutorial-poster.tex: a tutorial for poster creation with tcolorbox
%%
%% -------------------------------------------------------------------------------------------
@@ -1373,7 +1373,7 @@ Our poster is finished now. Just go to the next page to see the final result.
\tcbinputlisting{standard jigsaw,size=minimal,toprule=0.5mm,bottomrule=0.5mm,boxsep=2mm,
colback=white,opacityback=0.75,listing only,
enforce breakable,tcb@poster@boxheight,before skip=-\interlineskip,height fixed for=all,
- minted options={tabsize=2,fontsize=\small,breaklines,breakafter={,]-}},
+ minted options={tabsize=2,fontsize=\small,breaklines,breakafter={\,\]-}},
listing file=tcolorbox-example-poster.tex}%
}
\end{tcbposter}
diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.doc.breakable.tex b/macros/latex/contrib/tcolorbox/tcolorbox.doc.breakable.tex
index 00dc2198b2..288354d6b5 100644
--- a/macros/latex/contrib/tcolorbox/tcolorbox.doc.breakable.tex
+++ b/macros/latex/contrib/tcolorbox/tcolorbox.doc.breakable.tex
@@ -7,7 +7,7 @@ The library is loaded by a package option or inside the preamble by:
\begin{dispListing}
\tcbuselibrary{breakable}
\end{dispListing}
-This also loads the package |pdfcol|.
+This also loads the package \refPkg{pdfcol}.
\subsection{Technical Overview}
The library \mylib{breakable} supports the automatic breaking of a |tcolorbox|.
@@ -114,7 +114,7 @@ parameters. The differences are:
color changing commands, your color may not survive the break to the next box.
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
+ The |perpage| option of the \refPkg{footmisc} package is deliberately deactivated
inside a breakable box since all footnotes are placed at the end
of the box (possibly far away from the reference point).
\item\tcbdocmarginnote{\tcbdocnew{2016-02-15}}
@@ -127,7 +127,7 @@ parameters. The differences are:
Lua\TeX\ version 0.95 changes the behavior of the basic |\vsplit| (a bug?!)
resulting in badly broken boxes. Thanks to Jeremy Engel,
the \mylib{breakable} library contains a patch for this which
- also loads the the |ifluatex| package.
+ also loads the the \refPkg{ifluatex} package.
\end{itemize}
@@ -315,7 +315,7 @@ The |break at| option can be used to insert better break points by hand.
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.
+ by \refKey{/tcb/use color stack} with help of the \refPkg{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}
@@ -326,9 +326,9 @@ The |break at| option can be used to insert better break points by hand.
\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.
+ \refPkg{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}|
+ with the \refPkg{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,
@@ -682,7 +682,7 @@ code which \emph{may} have to be adapted.
\begin{tcolorbox}[enhanced jigsaw,size=small,breakable,colback=yellow!10!white,
colframe=red!50!white,break at=3cm,height fixed for=all]
Unbreakable |tcolorbox|es can be used without special care inside a
-|multicols| environment from the |multicol| package \cite{mittelbach:multicol}.
+|multicols| environment from the \refPkg{multicol} package \cite{mittelbach:multicol}.
Since version 3.10, a breakable |tcolorbox| detects, if it is used inside
a |multicols| environment. But choosing break points for a breakable box
diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.doc.coremacros.tex b/macros/latex/contrib/tcolorbox/tcolorbox.doc.coremacros.tex
index c41134a6c8..34d6769fa4 100644
--- a/macros/latex/contrib/tcolorbox/tcolorbox.doc.coremacros.tex
+++ b/macros/latex/contrib/tcolorbox/tcolorbox.doc.coremacros.tex
@@ -465,7 +465,7 @@ done in the same way, e.\,g. \myverb{\textit}, \myverb{\itshape}\\
or \myverb[brown]{\texttt}, \myverb[brown]{\ttfamily}.
\end{dispExample}
-The next example uses |\lstinline| from the |listings| package to
+The next example uses |\lstinline| from the \refPkg{listings} package to
typeset the verbatim content.
\begin{dispExample}
diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.doc.coreoptions.tex b/macros/latex/contrib/tcolorbox/tcolorbox.doc.coreoptions.tex
index 62f3fa3c01..1a9ea46725 100644
--- a/macros/latex/contrib/tcolorbox/tcolorbox.doc.coreoptions.tex
+++ b/macros/latex/contrib/tcolorbox/tcolorbox.doc.coreoptions.tex
@@ -2640,7 +2640,7 @@ Lower part.
\begin{docTcbKey}{varwidth upper}{\colOpt{=\meta{length}}}{style, default \refKey{/tcb/width}}
This style places the upper part content into a |varwidth| environment.
- This style needs the |varwidth| package \cite{arseneau:2011a} to be loaded manually.
+ This style needs the \refPkg{varwidth} package \cite{arseneau:2011a} to be loaded manually.
The resulting box has a maximal width of \meta{length}.
This option is only senseful for a \refCom{tcbox}.
\begin{exdispExample*}{varwidth_upper}{sbs,lefthand ratio=0.6}
@@ -3268,7 +3268,7 @@ text after
\refKey{/tcb/before skip balanced} and \refKey{/tcb/after skip balanced}
(see note on page~\pageref{subsec:surroundings}).\par
Sets the keys |before| and |after| to values which are
- recommended, if the package |parskip| \emph{is} used and there is no better
+ recommended, if the package \refPkg{parskip} \emph{is} used and there is no better
idea for |before| and |after|. This is similar to:
\begin{dispListing}
\tcbset{parskip/.style={before={\par\pagebreak[0]\parindent=0pt},
@@ -3281,7 +3281,7 @@ text after
\refKey{/tcb/before skip balanced} and \refKey{/tcb/after skip balanced}
(see note on page~\pageref{subsec:surroundings}).\par
Sets the keys |before| and |after| to values which are
- recommended, if the package |parskip| is \emph{not} used and there is no better
+ recommended, if the package \refPkg{parskip} is \emph{not} used and there is no better
idea for |before| and |after|. This is similar to:
\begin{dispListing}
\tcbset{noparskip/.style={before={\par\pagebreak[0]\smallskip\parindent=0pt},
@@ -3293,13 +3293,13 @@ text after
This options is considered to be superseded by
\refKey{/tcb/before skip balanced} and \refKey{/tcb/after skip balanced}
(see note on page~\pageref{subsec:surroundings}).\par
- Tries to detect the usage of the package |parskip| and sets
+ Tries to detect the usage of the package \refPkg{parskip} and sets
the keys |before| and |after| accordingly. Actually, the following is done:
\begin{itemize}
\item If the length of |\parskip| is greater than |0pt| at the beginning of the document,
- \refKey{/tcb/parskip} is executed. Here, the usage of package |parskip| is \emph{assumed}.
+ \refKey{/tcb/parskip} is executed. Here, the usage of package \refPkg{parskip} is \emph{assumed}.
\item Otherwise, if the length of |\parskip| is not greater than |0pt| at the beginning of the document,
- \refKey{/tcb/noparskip} is executed. Here, the absence of package |parskip| is \emph{assumed}.
+ \refKey{/tcb/noparskip} is executed. Here, the absence of package \refPkg{parskip} is \emph{assumed}.
\end{itemize}
\end{docTcbKey}
@@ -4315,7 +4315,7 @@ related operations which do not produce visible text.
\item Labels are ensured to reference the correct page number.
\item The \meta{code} is executed only once even during fitting operations for
title and box content.
-\item In combination with the |hyperref| package, the hyper anchor is set
+\item In combination with the \refPkg{hyperref} package, the hyper anchor is set
to the upper left corner of the |tcolorbox|, i.\,e.\ links inside the pdf document
will jump to the box pleasantly.
\item Since the \meta{code} is executed inside a \TeX\ group, only global
@@ -4343,8 +4343,8 @@ Note that this option is not getting reset by \refKey{/tcb/reset}.
\begin{docTcbKey}[][doc new=2023-02-08]{label is zlabel}{}{no value, initially unset}
Sets |\zlabel| as labelling for |tcolorbox| (global or per box).
When \refKey{/tcb/label} and friends are used, the underlying labeling macro is |\zlabel|.
-This needs the |zref| package \cite{oberdiek:zref} or packages building upon |zref| to be loaded.
-References can be made by |\zref|. If the |zref-clever| package \cite{barros:zref-clever} is loaded,
+This needs the \refPkg{zref} package \cite{oberdiek:zref} or packages building upon \refPkg{zref} to be loaded.
+References can be made by |\zref|. If the \refPkg{zref-clever} package \cite{barros:zref-clever} is loaded,
|\zcref|, |\zcpageref|, and similar macros can be applied.
Note that this option is not getting reset by \refKey{/tcb/reset}.
\end{docTcbKey}
@@ -4362,7 +4362,7 @@ from page \pageref{sec:numberedboxes}, e.\,g.\ \refKey{/tcb/new/auto counter}.
\begin{docTcbKey}[][doc new=2014-11-28]{phantomlabel}{=\meta{marker}}{no default, initially unset}
Equivalent to \refKey{/tcb/label} for an \emph{unnumbered} box.
-A |\phantomsection| from the package |hyperref| \cite{rahtz:hyperref} is used to set a correct
+A |\phantomsection| from the package \refPkg{hyperref} \cite{rahtz:hyperref} is used to set a correct
hyperlink target.
This is not needed and should typically not be used for a numbered box.
\end{docTcbKey}
@@ -4389,7 +4389,7 @@ from page \pageref{sec:numberedboxes}.
This option has a different meaning based upon the chosen labeling mechanism.
\begin{itemize}
\item If \refKey{/tcb/label is label} is active:\par
- The option key \refKey{/tcb/label type} can be used only in conjunction with the |cleveref| package
+ The option key \refKey{/tcb/label type} can be used only in conjunction with the \refPkg{cleveref} package
\cite{cubitt:2018a} which has to be loaded separately.
\meta{type} has to be a cross-reference type \emph{known} to |cleveref|
like |theorem|, |algorithm|, |result|, etc. References made with |cleveref|
@@ -4397,7 +4397,7 @@ This option has a different meaning based upon the chosen labeling mechanism.
errors, if |cleveref| is not loaded.
For an example, see \Vref{theo:meanvaluetheorem}.
\item If \refKey{/tcb/label is zlabel} is active:\par
- The option key \refKey{/tcb/label type} can be used only in conjunction with the |zref-clever| package
+ The option key \refKey{/tcb/label type} can be used only in conjunction with the \refPkg{zref-clever} package
\cite{barros:zref-clever}
which has to be loaded separately.
\meta{type} has to be a cross-reference type \emph{known} to |zref-clever|.
@@ -4419,9 +4419,9 @@ Removes a \refKey{/tcb/label type}, if set before.
\clearpage
\begin{docTcbKey}[][doc new and updated={2016-06-22}{2023-02-08}]{nameref}{=\meta{text}}{no default, initially unset}
-If the |nameref| package is loaded, the given \meta{text} is used for
+If the \refPkg{nameref} package is loaded, the given \meta{text} is used for
corresponding |\nameref| macros.
-If the |zref-titleref| package is loaded, the given \meta{text} is used to
+If the \refPkg{zref-titleref} package is loaded, the given \meta{text} is used to
set the reference text for |\ztitleref|.
Typically, the \meta{text} will be chosen
to be identical or nearly identical to the one for \refKey{/tcb/title}.
@@ -4454,7 +4454,7 @@ The most likely use case is to set a \emph{short title} for the
\clearpage
\begin{docTcbKey}[][doc new=2017-02-03]{hypertarget}{=\meta{marker}}{no default, initially unset}
-A |\hypertarget| from the package |hyperref| \cite{rahtz:hyperref} is used to
+A |\hypertarget| from the package \refPkg{hyperref} \cite{rahtz:hyperref} is used to
create an internal link of an anchor \meta{marker}.
This \meta{marker} can be referenced by |\hyperlink| or
\refKey{/tcb/hyperlink}.
@@ -4473,7 +4473,7 @@ Click me to jump to Box B.
\begin{docTcbKey}[][doc new=2017-02-10]{bookmark}{=\meta{text}}{no default, initially unset}
- Sets a PDF bookmark with the given \meta{text}, if the package |bookmark| \cite{oberdiek:bookmark}
+ Sets a PDF bookmark with the given \meta{text}, if the package \refPkg{bookmark} \cite{oberdiek:bookmark}
is loaded. This bookmark is set with an automated destination (the current box)
and is set one level below the current bookmark level.
\begin{dispExample*}{sbs,lefthand ratio=0.7}
@@ -4490,7 +4490,7 @@ to see the bookmark.
\begin{docTcbKey}[][doc new=2017-02-10]{bookmark*}{=\marg{options}\marg{text}}{no default, initially unset}
Identical to \refKey{/tcb/bookmark}, but additional \meta{options}
- from the package |bookmark| \cite{oberdiek:bookmark} can be given.
+ from the package \refPkg{bookmark} \cite{oberdiek:bookmark} can be given.
\begin{dispExample*}{sbs,lefthand ratio=0.7}
% \usepackage{bookmark}%
\begin{tcolorbox}[colback=red!10,colframe=red!50!black,
@@ -4692,7 +4692,7 @@ It is precise only, if \refKey{/tcb/check odd page} was set.
See \Fullref{sec:external} for the \mylib{external} library of |tcolorbox|.
\end{marker}
-If the \emph{externalization} library of the \texttt{tikz} package is used,
+If the \emph{externalization} library of the \refPkg{tikz} package is used,
a |tcolorbox| could trigger the externalization process which will arise
a compilation error.
@@ -4734,7 +4734,7 @@ inside the current \TeX\ group and is not affected by \refKey{/tcb/reset}.
it may be used inside the option list of a |tcolorbox| to set the
externalization \meta{file name} for the first |tikzpicture| which is discovered
\emph{inside} the box content.
- The package |tikz| \cite{tantau:tikz_and_pgf} or the library \mylib{skins} has to be loaded to use this option.
+ The package \refPkg{tikz} \cite{tantau:tikz_and_pgf} or the library \mylib{skins} has to be loaded to use this option.
Additionally, |\usetikzlibrary{external}| has to be used.
\end{docTcbKey}
@@ -4742,7 +4742,7 @@ inside the current \TeX\ group and is not affected by \refKey{/tcb/reset}.
Convenience option which calls |/tikz/external/remake next|. Typically,
it may be used inside the option list of a |tcolorbox| to force the remake
of the first |tikzpicture| which is discovered \emph{inside} the box content.
- The package |tikz| \cite{tantau:tikz_and_pgf} or the library \mylib{skins} has to be loaded to use this option.
+ The package \refPkg{tikz} \cite{tantau:tikz_and_pgf} or the library \mylib{skins} has to be loaded to use this option.
Additionally, |\usetikzlibrary{external}| has to be used.
\end{docTcbKey}
diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.doc.documentation.tex b/macros/latex/contrib/tcolorbox/tcolorbox.doc.documentation.tex
index 45282f3c46..939c5d4dbe 100644
--- a/macros/latex/contrib/tcolorbox/tcolorbox.doc.documentation.tex
+++ b/macros/latex/contrib/tcolorbox/tcolorbox.doc.documentation.tex
@@ -5,9 +5,9 @@
\tcbset{external/prefix=external/documentation_}%
This library has the single purpose to support \LaTeX\ package documentations
like this one. Actually, the visual nature follows the approach from
-Till Tantau's |pgf| \cite{tantau:tikz_and_pgf} documentation.
+Till Tantau's \refPkg{pgf} \cite{tantau:tikz_and_pgf} documentation.
Typically, this library is assumed to be used in conjunction with the
-class |ltxdoc| or alike.
+class \refPkg{ltxdoc} or alike.
Denis Bitouz\'e, Muzimuzhi, and many others provided very valuable input for this library.
The library is loaded by a package option or inside the preamble by:
@@ -19,17 +19,17 @@ the library \mylib{skins}, see \Vref{sec:skins},
the library \mylib{raster}, see \Vref{sec:raster},
the library \mylib{listings}, see \Vref{sec:listings},
and a bunch of packages, namely
-|makeidx|, |marginnote|, |refcount|, and |hyperref|.
-The packages |pifont| and |marvosym| should be installed for some symbols, but
+\refPkg{makeidx}, \refPkg{marginnote}, \refPkg{refcount}, and \refPkg{hyperref}.
+The packages \refPkg{pifont} and \refPkg{marvosym} should be installed for some symbols, but
need not to be loaded.
\begin{marker}
-The package |makeidx| is loaded only, if \docAuxCommand*{printindex} is
-\emph{not} already defined. Therefore, one can include an alternative to |makeidx| like
-|imakeidx| \emph{before} the library |documentation| is used.
+The package \refPkg{makeidx} is loaded only, if \docAuxCommand*{printindex} is
+\emph{not} already defined. Therefore, one can include an alternative to \refPkg{makeidx} like
+\refPkg{imakeidx} \emph{before} the library |documentation| is used.
\end{marker}
\begin{marker}
-The package |marginnote| is loaded only, if \docAuxCommand*{marginnote} is
+The package \refPkg{marginnote} is loaded only, if \docAuxCommand*{marginnote} is
\emph{not} already defined.
\end{marker}
\begin{marker}
@@ -47,7 +47,7 @@ For UTF-8 support load (ignore this when using Xe\LaTeX):
\tcbuselibrary{listingsutf8,documentation}
\end{dispListing}
-For |minted| \cite{poore:minted} support, load:
+For \refPkg{minted} \cite{poore:minted} support, load:
\begin{dispListing}
\tcbuselibrary{documentation,minted}
\tcbset{listing engine=minted}
@@ -704,6 +704,21 @@ Some pages back, one can see \refAuxcs{fooaux} as an example.
\end{docCommand}
+\begin{docCommand}[doc new=2024-09-18]{refPkg}{\oarg{ctanname}\marg{name}}
+ References a package \meta{name} on \href{https://ctan.org}{CTAN} with
+ hyperlink \mbox{|https://ctan.org/pkg/|\meta{name}}.
+ Using the option \meta{ctanname} creates the hyperlink
+ \mbox{|https://ctan.org/pkg/|\meta{ctanname}}.
+\begin{dispExample}
+Hyperlinks are created with help of the \refPkg{hyperref} package.\par
+The package \refPkg[frankenstein]{dialogue} is part of the
+\refPkg{frankenstein} bundle of packages.
+\end{dispExample}
+\end{docCommand}
+
+
+\clearpage
+
\begin{docCommand}{colDef}{\marg{text}}
Sets \meta{text} with the command color, see \refKey{/tcb/color command}.
\begin{dispExample}
@@ -718,8 +733,6 @@ This is my \colOpt{text}.
\end{dispExample}
\end{docCommand}
-\clearpage
-
\begin{docCommand}[doc new=2019-09-18]{colFade}{\marg{text}}
Sets \meta{text} with the fade color, see \refKey{/tcb/color fade}.
\begin{dispExample}
@@ -730,7 +743,7 @@ This is my \colFade{text}.
\begin{docCommand}[doc new=2014-09-19]{tcbdocmarginnote}{\oarg{options}\marg{text}}
Creates a |tcolorbox| note with the given \meta{text} inside the margin using
- the |marginnote| package. The style of the |tcolorbox| is predefined and can be
+ the \refPkg{marginnote} package. The style of the |tcolorbox| is predefined and can be
altered by \refKey{/tcb/doc marginnote} and the given \meta{options}.
\begin{dispExample}
Some text\tcbdocmarginnote{Note A}
@@ -1313,7 +1326,7 @@ keys to insert code before (or after) the description texts.
\end{docTcbKey}
\begin{docTcbKey}{documentation listing options}{=\meta{key list}}{no default,\\\hspace*{\fill} initially |style=tcbdocumentation|}
- Sets the options from the package |listings| \cite{hoffmann:listings}.
+ Sets the options from the package \refPkg{listings} \cite{hoffmann:listings}.
They are used inside \refEnv{dispExample} and \refEnv{dispListing} to typeset
the listings. Note that this is not identical to the key
\refKey{/tcb/listing options} which is used for \enquote{normal} listings.\\
@@ -1323,14 +1336,14 @@ keys to insert code before (or after) the description texts.
\begin{docTcbKey}{documentation listing style}{=\meta{listing style}}{no default, initially |tcbdocumentation|}
Abbreviation for |documentation listing options={style=...}|.
This key sets a \meta{style}
- for the |listings| package, see \cite{hoffmann:listings}.
+ for the \refPkg{listings} package, see \cite{hoffmann:listings}.
Note that this is not identical to the key
\refKey{/tcb/listing style} which is used for \enquote{normal} listings.\\
Used for \refKey{/tcb/listing engine}|=listings| only.
\end{docTcbKey}
\begin{docTcbKey}{documentation minted options}{=\meta{key list}}{no default,\\\hspace*{\fill} initially |tabsize=2,fontsize=\textbackslash small|}
- Sets the options from the package |minted| \cite{poore:minted}
+ Sets the options from the package \refPkg{minted} \cite{poore:minted}
which are used during typesetting of the listing, if used.
Note that this is not identical to the key
\refKey{/tcb/minted options} which is used for \enquote{normal} listings.\\
@@ -1339,7 +1352,7 @@ keys to insert code before (or after) the description texts.
\begin{docTcbKey}{documentation minted style}{=\meta{key list}}{no default, initially unset}
Sets a \meta{style} known to |Pygments| \cite{pygments:web} for
- the package |minted| \cite{poore:minted}, if used.
+ the package \refPkg{minted} \cite{poore:minted}, if used.
Note that this is not identical to the key
\refKey{/tcb/minted style} which is used for \enquote{normal} listings.\\
Used for \refKey{/tcb/listing engine}|=minted| only.
@@ -1347,7 +1360,7 @@ keys to insert code before (or after) the description texts.
\begin{docTcbKey}[][doc new=2017-04-24]{documentation minted language}{=\meta{programming language}}{no default, initially |latex|}
Sets a \meta{programming language} known to |Pygments| \cite{pygments:web}
- for the package |minted| \cite{poore:minted}, if used.
+ for the package \refPkg{minted} \cite{poore:minted}, if used.
Note that this is not identical to the key
\refKey{/tcb/minted language} which is used for \enquote{normal} listings.\\
Used for \refKey{/tcb/listing engine}|=minted| only.
@@ -1383,7 +1396,7 @@ Sets \meta{macro} as formatter for page references like the
reference to \refEnv{tcolorbox}.
The default setting puts the page reference in a |\textsuperscript|.
It may be changed to |\fakesuperscript| to cope with superiors problems
-in combination with the |realscripts| package or just otherwise for user customization.
+in combination with the \refPkg{realscripts} package or just otherwise for user customization.
\end{docTcbKeys}
@@ -1420,11 +1433,11 @@ in combination with the |realscripts| package or just otherwise for user customi
\item\docValue{pgfchapter}: The index is formatted like in the |pgf| documentation (as a chapter).
\item\docValue{pgf}: Alias for |pgfsection|.
\item\docValue{doc}: The index is assumed to be formatted by |doc| or |ltxdoc|. The usage of |makeindex|
- with |-s gind.ist| is assumed. The package |hypdoc| has to be loaded
+ with |-s gind.ist| is assumed. The package \refPkg{hypdoc} has to be loaded
\emph{before} |tcolorbox|. Only a limited set of customizations will
work! This option cannot be unset when used!
\item\docValue{off}: The index is not formatted by |tcolorbox|. Use this, if
- the index is formatted by other package like |imakeidx|.
+ the index is formatted by other package like \refPkg{imakeidx}.
\end{itemize}
\end{docTcbKey}
diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.doc.external.tex b/macros/latex/contrib/tcolorbox/tcolorbox.doc.external.tex
index 62c982c2d3..d60af1c986 100644
--- a/macros/latex/contrib/tcolorbox/tcolorbox.doc.external.tex
+++ b/macros/latex/contrib/tcolorbox/tcolorbox.doc.external.tex
@@ -16,7 +16,7 @@ The whole procedure saves compilation time, if such a snippet is costly to
compile but needs to compile just once or very seldom.
There are very good alternatives to this library. One should consider
-the |standalone| package or the \tikzname\ externalization library instead.
+the \refPkg{standalone} package or the \tikzname\ externalization library instead.
The \mylib{external} library is something in between and can be seen as
poor man variant of the \tikzname\ externalization library.
@@ -619,14 +619,14 @@ or
name points to another subdirectory than |external|, this has to be
adapted.
-\item\textbf{I use the |minted| package and I get a cache directory for
+\item\textbf{I use the \refPkg{minted} package and I get a cache directory for
every externalized snippet.}\\
To avoid this problem, there are several ways.
\begin{itemize}
\item If you do not need |minted| inside the snippet code, you may use
|\usepackage{minted}| \emph{after} \refCom{tcbEXTERNALIZE}
or use \refCom{tcbifexternal} to switch |minted| off for the external code.
- If |minted| is already included by another package, add the following to
+ If \refPkg{minted} is already included by another package, add the following to
your preamble:
\begin{dispListing}
\tcbset{external/PassOptionsToPackage={draft}{minted}}
diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.doc.filling.tex b/macros/latex/contrib/tcolorbox/tcolorbox.doc.filling.tex
index 909f7f4ac0..dfce46b546 100644
--- a/macros/latex/contrib/tcolorbox/tcolorbox.doc.filling.tex
+++ b/macros/latex/contrib/tcolorbox/tcolorbox.doc.filling.tex
@@ -16,7 +16,7 @@ See \Vref{sec:skins} for the documentation of all other options of the \mylib{sk
\begin{marker}
Up to version 5.1.1 (2022/06/24) of |tcolorbox|, \tikzname\ image and picture fill extensions
were documented here. These extensions are now separate \tikzname\ libraries
-and part of the |tikzfill| package where they are documented now.
+and part of the \refPkg{tikzfill} package where they are documented now.
\end{marker}
@@ -107,7 +107,7 @@ The following auxiliary macro is defined by the \mylib{skins} library.
\begin{docCommand}[doc new and updated={2016-02-03}{2023-02-28}]{tcbhypernode}{\marg{macro}\marg{node}}
% Sets the east-to-west dimension of the given \meta{node}
% to the \TeX\ \meta{register}.
- Applies a hyperlink creating \meta{macro} from the package |hyperref| \cite{rahtz:hyperref}
+ Applies a hyperlink creating \meta{macro} from the package \refPkg{hyperref} \cite{rahtz:hyperref}
to an existing |tikz| \meta{node}. \refCom{tcbhypernode} can only
be used inside a |tikzpicture| environment.
The last argument of the \meta{macro} is to be omitted and should stand
diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.doc.graphics.tex b/macros/latex/contrib/tcolorbox/tcolorbox.doc.graphics.tex
index fe441d4821..a85091895e 100644
--- a/macros/latex/contrib/tcolorbox/tcolorbox.doc.graphics.tex
+++ b/macros/latex/contrib/tcolorbox/tcolorbox.doc.graphics.tex
@@ -132,7 +132,7 @@ specify a file system \meta{directory} where the image files are located.
\end{dispListing}
\smallskip
\begin{marker}
-The |\graphicspath| macro from the |graphics| package is superior to this option.
+The |\graphicspath| macro from the \refPkg{graphics} package is superior to this option.
\refKey{/tcb/graphics directory} may be used especially for
\refCom{tcbincludepdf}.
\end{marker}
diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.doc.initoptions.tex b/macros/latex/contrib/tcolorbox/tcolorbox.doc.initoptions.tex
index b068d58eaf..8d0c7459b2 100644
--- a/macros/latex/contrib/tcolorbox/tcolorbox.doc.initoptions.tex
+++ b/macros/latex/contrib/tcolorbox/tcolorbox.doc.initoptions.tex
@@ -173,7 +173,7 @@ need to be set inside the preamble.
\end{marker}
\begin{newTcbKey}[][doc updated=2014-12-01]{crefname}{=\marg{singular}\marg{plural}}{no default, initially unset}
- This option key can be used only in conjunction with the |cleveref| package
+ This option key can be used only in conjunction with the \refPkg{cleveref} package
\cite{cubitt:2018a} which has to be loaded separately.
It creates a cross-reference type for the new |tcolorbox|'es, where the
lowercase \meta{singular} and \meta{plural} forms of the cross-reference are given.
@@ -183,7 +183,7 @@ need to be set inside the preamble.
\begin{newTcbKey}[][doc updated=2014-12-01]{Crefname}{=\marg{singular}\marg{plural}}{no default, initially unset}
- This option key can be used only in conjunction with the |cleveref| package
+ This option key can be used only in conjunction with the \refPkg{cleveref} package
\cite{cubitt:2018a} which has to be loaded separately.
It creates a cross-reference type for the new |tcolorbox|'es, where the
uppercase \meta{singular} and \meta{plural} forms of the cross-reference are given.
@@ -224,7 +224,7 @@ Feasible values for \meta{name} are:
\item\docValue{figures}: blend into the standard |figure| environment.
\item\docValue{tables}: blend into the standard |table| environment.
\item\docValue{listings}: blend into the standard |lstlisting| environment
- of the package |listings| \cite{hoffmann:listings}.
+ of the package \refPkg{listings} \cite{hoffmann:listings}.
\begin{marker}
Note that |blend into=listings| can only be used in the document content
or, preferably, inside a |\AtBeginDocument| clause! Using it without
diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.doc.intro.tex b/macros/latex/contrib/tcolorbox/tcolorbox.doc.intro.tex
index 0d76c0afbb..5f420895f9 100644
--- a/macros/latex/contrib/tcolorbox/tcolorbox.doc.intro.tex
+++ b/macros/latex/contrib/tcolorbox/tcolorbox.doc.intro.tex
@@ -81,7 +81,7 @@ The following keys are used inside |\tcbuselibrary| respectively
|\usepackage| without the key tree path |/tcb/library/|.
\begin{docTcbKey}[library]{skins}{}{\mylib{skins}}
- Loads the package |tikz| \cite{tantau:tikz_and_pgf} and provides additional
+ Loads the package \refPkg{tikz} \cite{tantau:tikz_and_pgf} and provides additional
styles (skins) for the appearance of the colored boxes; see
Section~\ref{sec:skins} from page~\pageref{sec:skins}.
\end{docTcbKey}
@@ -98,13 +98,13 @@ The following keys are used inside |\tcbuselibrary| respectively
\end{docTcbKey}
\begin{docTcbKey}[library]{listings}{}{\mylib{listings}}
- Loads the package |listings| \cite{hoffmann:listings} and provides additional
+ Loads the package \refPkg{listings} \cite{hoffmann:listings} and provides additional
macros for typesetting listings which are described in Section~\ref{sec:listings}
from page~\pageref{sec:listings}.
\end{docTcbKey}
\begin{docTcbKey}[library]{listingsutf8}{}{\mylib{listingsutf8}}
- Loads the packages |listings| \cite{hoffmann:listings} and
+ Loads the packages \refPkg{listings} \cite{hoffmann:listings} and
|listingsutf8| \cite{oberdiek:listingsutf8} for UTF-8 support.
This is a variant of the library \mylib{listings}
and is described in Section \ref{sec:listings}
@@ -112,7 +112,7 @@ The following keys are used inside |\tcbuselibrary| respectively
\end{docTcbKey}
\begin{docTcbKey}[library]{minted}{}{\mylib{minted}}
- Loads the package |minted| \cite{poore:minted} to
+ Loads the package \refPkg{minted} \cite{poore:minted} to
typeset listings with the |Pygments| \cite{pygments:web} tool,
also see \Vref{sec:listings}.
\end{docTcbKey}
@@ -151,7 +151,7 @@ The following keys are used inside |\tcbuselibrary| respectively
\clearpage
\begin{docTcbKey}[library]{xparse}{}{\mylib{xparse}}
- Loads the package |xparse| and is considered a legacy library kept for compatibility;
+ Loads the package \refPkg{xparse} and is considered a legacy library kept for compatibility;
see Section~\ref{sec:xparse} from page~\pageref{sec:xparse}.
\end{docTcbKey}
@@ -178,7 +178,7 @@ The following keys are used inside |\tcbuselibrary| respectively
\begin{docTcbKey}[library]{most}{}{style, no value}
Loads all libraries except \mylib{minted}, \mylib{documentation}, and \mylib{xparse}.
Use this shortcut, if you want to use all features of |tcolorbox|
- with exception of using the |minted| package and using
+ with exception of using the \refPkg{minted} package and using
the specialized \mylib{documentation} library.
\end{docTcbKey}
diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.doc.listings.tex b/macros/latex/contrib/tcolorbox/tcolorbox.doc.listings.tex
index c6e56dcdfa..59fbe4390e 100644
--- a/macros/latex/contrib/tcolorbox/tcolorbox.doc.listings.tex
+++ b/macros/latex/contrib/tcolorbox/tcolorbox.doc.listings.tex
@@ -27,12 +27,12 @@ the settings of a previous loaded library. A library is never loaded twice.
\subsubsection{Loading \mylib{listings}}
-This library uses the package |listings| \cite{hoffmann:listings} to typeset
+This library uses the package \refPkg{listings} \cite{hoffmann:listings} to typeset
listings. It is loaded by a package option or inside the preamble by:
\begin{dispListing}
\tcbuselibrary{listings}
\end{dispListing}
-This also loads the package |listings| \cite{hoffmann:listings}.
+This also loads the package \refPkg{listings} \cite{hoffmann:listings}.
The \refKey{/tcb/listing engine} is set to |listings| by the library.
To reactivate this setting, if overwritten by other libraries, use
@@ -47,15 +47,15 @@ Therefore, loading this library is automatically replaced by loading
\mylib{listings} only, if pdf\LaTeX\ is \emph{not} used.
\end{marker}
To extend |listings| for UTF-8 encoded sources, you can use the support from
-the package |listingsutf8| \cite{oberdiek:listingsutf8} by loading the library
+the package \refPkg{listingsutf8} \cite{oberdiek:listingsutf8} by loading the library
variant \mylib{listingsutf8}.
\begin{dispListing}
\tcbuselibrary{listingsutf8}
\tcbset{listing utf8=latin1}% optional; `latin1' is the default.
\end{dispListing}
This also loads the library \mylib{listings}
-and the packages |listings| \cite{hoffmann:listings}
-and |listingsutf8| \cite{oberdiek:listingsutf8}.
+and the packages \refPkg{listings} \cite{hoffmann:listings}
+and \refPkg{listingsutf8} \cite{oberdiek:listingsutf8}.
The \refKey{/tcb/listing engine} is set to |listings| by the library.
To reactivate this setting, if overwritten by other libraries, use
@@ -66,19 +66,27 @@ To reactivate this setting, if overwritten by other libraries, use
\clearpage
\subsubsection{Loading \mylib{minted}}
-This library uses the package |minted| \cite{poore:minted} to typeset
+This library uses the package \refPkg{minted} \cite{poore:minted} to typeset
listings. It is loaded by a package option or inside the preamble by:
\begin{dispListing}
\tcbuselibrary{minted}
\end{dispListing}
-This also loads the package |minted| \cite{poore:minted}.
+This also loads the package \refPkg{minted} \cite{poore:minted}.
\begin{marker}
-The |minted| package uses the external tool |Pygments| \cite{pygments:web}
+To use the legacy version v2.9 of \refPkg{minted}, write
+\begin{dispListing}
+\usepackage{minted2}
+\end{dispListing}
+\emph{before} loading the library!
+\end{marker}
+
+\begin{marker}
+The \refPkg{minted} package uses the external tool |Pygments| \cite{pygments:web}
to apply syntax highlighting. It has to be installed and set up, before the
library can be used, see \cite{poore:minted} and \cite{pygments:web}.
The \refEnv{tcolorbox} library \mylib{minted} does not work, if the package
-|minted| \cite{poore:minted} does not work.
+\refPkg{minted} \cite{poore:minted} does not work.
\end{marker}
The \refKey{/tcb/listing engine} is set to |minted| by the library.
@@ -340,7 +348,7 @@ This is my
\clearpage
\begin{marker}
-With date of 2018-05-12, the |xparse| \cite{latexproject:xparse} package
+With date of 2018-05-12, the \refPkg{xparse} \cite{latexproject:xparse} package
changed the argument collection process (now part of the \LaTeX\ kernel).
Spaces are ignored which leads to a serious change for listing environments
ending with an optional argument like \verb+O{}+.
@@ -471,7 +479,7 @@ Note that the following code uses \verb+!O{}+ now.
\subsection{Option Keys of the \mylib{listings} Library}\label{sec:speclistingkeys}
\begin{docTcbKey}{listing options}{=\meta{key list}}{no default, initially |style=tcblatex|}
- Sets the options from the package |listings| \cite{hoffmann:listings}
+ Sets the options from the package \refPkg{listings} \cite{hoffmann:listings}
which are used during typesetting of the listing.
For \LaTeX\ listings, there is a predefined |listings| style named |tcblatex|
which can be used.
@@ -487,7 +495,7 @@ and in compiled form. Additionally, we use line numbers here.
\begin{docTcbKey}{no listing options}{}{no value, initially unset}
Abbreviation for |listing options={}|.
- This removes all options for the |listings| package.
+ This removes all options for the \refPkg{listings} package.
This includes the \refEnv{tcblisting} standard style |tcblatex| and the encoding presets.
Use this option, if you want to set the |listings| options outside of \refEnv{tcblisting}, e.\,g.\ globally in
the preamble.
@@ -501,7 +509,7 @@ All \textit{listings} options removed.
\begin{docTcbKey}{listing style}{=\meta{style}}{no default, initially |tcblatex|}
Abbreviation for |listing options={style=...}|. This key sets a \meta{style}
- for the |listings| package, see \cite{hoffmann:listings}.
+ for the \refPkg{listings} package, see \cite{hoffmann:listings}.
For \LaTeX, there is a predefined style named |tcblatex|.
\begin{dispExample}
\begin{tcblisting}{colback=red!5!white,colframe=red!75!black,
@@ -515,14 +523,14 @@ Here, we use the predefined style.
\begin{docTcbKey}{listing inputencoding}{=\meta{encoding}}{no default, initially \texttt{\cs inputencodingname}}
Sets the input encoding value for the predefined listing style |tcblatex|
and |tcbdocumentation| from the library \mylib{documentation}.
- The initial value is derived from the package |inputenc| if used.
+ The initial value is derived from the package \refPkg{inputenc} if used.
\end{docTcbKey}
\begin{docTcbKey}{listing remove caption}{\colOpt{=true\textbar false}}{default |true|, initially |true|}
-If set to |true|, some part of the caption building code of the |listings| package
-is silenced to prevent some unwanted interaction with the |hyperref| package resulting
+If set to |true|, some part of the caption building code of the \refPkg{listings} package
+is silenced to prevent some unwanted interaction with the \refPkg{hyperref} package resulting
in additional vertical space.
-If set to |false|, the |listings| package code is kept unchanged.
+If set to |false|, the \refPkg{listings} package code is kept unchanged.
Note that listings outside \refEnv{tcblisting} and
\refCom{tcbinputlisting} are always processed normally.
Typically, a user is not expected to use this key at all.
@@ -530,7 +538,7 @@ Typically, a user is not expected to use this key at all.
\begin{docTcbKey}{every listing line}{=\meta{text}}{no default, initially unset/empty}
Inserts some \meta{text} to the begin of every line of a listing.
-Note that this a hack of the |listings| package code. This may become unusable
+Note that this a hack of the \refPkg{listings} package code. This may become unusable
or superfluous in the future.
\begin{dispExample}
\newtcblisting{commandshell}{colback=black,colupper=white,colframe=yellow!75!black,
@@ -584,14 +592,14 @@ all options from \Vref{sec:speclistingkeys} are applicable.
\begin{docTcbKey}{listing utf8}{=\meta{one-byte-encoding}}{style, no default, initially |latin1|}
Abbreviation for using \refKey{/tcb/listing inputencoding}
- together with UTF-8 support from the package |listingsutf8| \cite{oberdiek:listingsutf8}.
+ together with UTF-8 support from the package \refPkg{listingsutf8} \cite{oberdiek:listingsutf8}.
This option is available only for the library variant \mylib{listingsutf8}.
The \meta{one-byte-encoding} is one of
the applicable encodings from \cite{oberdiek:listingsutf8}, e.\,g.\ |latin1|
which is the default.\par
Be aware that this means restriction to this specific \meta{one-byte-encoding}:
e.\,g.\ |latin1| comprises umlauts and other accented characters, but not
- the Euro sign. If you want to use the |listings| package \emph{and} \flqq real\frqq\
+ the Euro sign. If you want to use the \refPkg{listings} package \emph{and} \flqq real\frqq\
UTF-8 source code, then do \emph{not} use \mylib{listingsutf8} but \mylib{listings}
with
\refKey{/tcb/listing inputencoding}|=utf8|
@@ -623,7 +631,7 @@ Sets a \meta{programming language} known to |Pygments| \cite{pygments:web}.
\begin{docTcbKey}[][doc updated={2021-12-15}]{minted options}{=\meta{key list}}{no default, initially
\linebreak see \refKey{/tcb/default minted options}}
- Sets the options from the package |minted| \cite{poore:minted}
+ Sets the options from the package \refPkg{minted} \cite{poore:minted}
which are used during typesetting of the listing.
Also see \refKey{/tcb/minted options app} and \refKey{/tcb/minted options pre}.
\begin{dispExample}
@@ -652,7 +660,7 @@ Sets a \meta{programming language} known to |Pygments| \cite{pygments:web}.
\clearpage
\begin{docTcbKey}[][doc new={2021-12-15}]{default minted options}{=\meta{key list}}{no default, initially
|tabsize=2,fontsize=\textbackslash small,|\linebreak|breaklines,autogobble|}
- Sets the options from the package |minted| \cite{poore:minted}
+ Sets the options from the package \refPkg{minted} \cite{poore:minted}
which are used during typesetting of the listing, if
\refKey{/tcb/minted options} are \emph{not} used. The intended use is
inside the preamble to change the default behavior.
diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.doc.poster.tex b/macros/latex/contrib/tcolorbox/tcolorbox.doc.poster.tex
index 085d789a36..be79860d6b 100644
--- a/macros/latex/contrib/tcolorbox/tcolorbox.doc.poster.tex
+++ b/macros/latex/contrib/tcolorbox/tcolorbox.doc.poster.tex
@@ -9,7 +9,7 @@ with |tcolorbox|es.
A \refEnv{tcbposter} is a |tikzpicture| where |tcolorbox|es can be
placed in a column oriented manner using \refCom{posterbox} commands.
-This base concept is more or less copied from the great |baposter| package.
+This base concept is more or less copied from the great \refPkg{baposter} package.
The \mylib{raster} library, see \Fullref{sec:raster}, can produce
similar looking results and may be more appropriate
diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.doc.s_main.sty b/macros/latex/contrib/tcolorbox/tcolorbox.doc.s_main.sty
index 7bc44882c8..df0d900246 100644
--- a/macros/latex/contrib/tcolorbox/tcolorbox.doc.s_main.sty
+++ b/macros/latex/contrib/tcolorbox/tcolorbox.doc.s_main.sty
@@ -36,6 +36,7 @@
\tcbuselibrary{most,documentation}
\tcbifexternal{}{%
+ \IfFileExists{minted2.sty}{\RequirePackage{minted2}}{}% Avoid latexmk problems (endless loop)
\tcbuselibrary{minted}%
\tcbset{listing engine=listings,initialize@reset={listing engine=listings}}%
}
@@ -204,7 +205,7 @@
docCounter,docLength,
meta,marg,
oarg,
- refCom,refEnv,refKey,
+ refCom,refEnv,refKey,refPathOperation,refAux,refAuxcs,refPkg,
sarg,
tcbmakedocSubKey,tcbdocmarginnote,tcbdocnew,tcbdocupdated,
% skins
diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.doc.skins.tex b/macros/latex/contrib/tcolorbox/tcolorbox.doc.skins.tex
index bbf946c9fc..108e0245d7 100644
--- a/macros/latex/contrib/tcolorbox/tcolorbox.doc.skins.tex
+++ b/macros/latex/contrib/tcolorbox/tcolorbox.doc.skins.tex
@@ -7,7 +7,7 @@ The library is loaded by a package option or inside the preamble by:
\begin{dispListing}
\tcbuselibrary{skins}
\end{dispListing}
-This also loads the package |tikzfill.image|.
+This also loads the package \refPkg[tikzfill]{tikzfill.image}.
In the following, general settings and options of the library are
documented.
@@ -1012,7 +1012,7 @@ The text is centered by default
\begin{docTcbKey}{varwidth boxed title}{\colOpt{=\meta{length}}}{initially unset}
The title text content is captured with a |varwidth| environment with a width of \meta{length}.
-This style needs the |varwidth| package \cite{arseneau:2011a} to be loaded manually.
+This style needs the \refPkg{varwidth} package \cite{arseneau:2011a} to be loaded manually.
By default, the resulting boxed title is somewhat smaller than the main box.
\begin{exdispExample*}{varwidth_boxed_title}{sbs,lefthand ratio=0.66}
% \usepackage{varwidth}
@@ -1035,7 +1035,7 @@ By default, the resulting boxed title is somewhat smaller than the main box.
\begin{docTcbKey}{varwidth boxed title*}{\colOpt{=\meta{length}}}{initially unset}
The title text content is captured with a |varwidth| environment with a width of main box width plus \meta{length}.
-This style needs the |varwidth| package \cite{arseneau:2011a} to be loaded manually.
+This style needs the \refPkg{varwidth} package \cite{arseneau:2011a} to be loaded manually.
By default, the resulting boxed title is somewhat smaller than the main box.
\begin{exdispExample*}{varwidth_boxed_title_star}{sbs,lefthand ratio=0.66}
% \usepackage{varwidth}
@@ -2285,9 +2285,6 @@ Such shadows can be added directly to the frame path using \refKey{/tcb/frame st
\clearpage
\subsection{\tikzname\ Picture Option Keys}\label{subsec:tikzpicture}
-The skin \refSkin{standard} does not support these options,
-but most other skins, e.\,g.\ \refSkin{enhanced}.
-
\begin{docTcbKey}{tikz}{=\meta{tikz option list}}{no default, initially empty}
Adds the given \meta{tikz option list} to the main |tikzpicture| environment
@@ -2721,12 +2718,12 @@ Finishes are intended for special effects like highlights or glosses or text ove
\clearpage
\subsection{Hyper Option Keys}\label{subsec:hyper}
-All options of this section need the package |hyperref| \cite{rahtz:hyperref}
+All options of this section need the package \refPkg{hyperref} \cite{rahtz:hyperref}
to be loaded separately. All these options are implemented as
\refKey{/tcb/finish} and can be disabled by \refKey{/tcb/no finish}.
\begin{marker}
-If the package |hyperref| \cite{rahtz:hyperref} is not loaded or if
+If the package \refPkg{hyperref} \cite{rahtz:hyperref} is not loaded or if
the \refSkin{standard} skin is used, all hyper option are silently ignored.
\end{marker}
diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.doc.theorems.tex b/macros/latex/contrib/tcolorbox/tcolorbox.doc.theorems.tex
index f1a7be1ff4..fdb5564454 100644
--- a/macros/latex/contrib/tcolorbox/tcolorbox.doc.theorems.tex
+++ b/macros/latex/contrib/tcolorbox/tcolorbox.doc.theorems.tex
@@ -7,7 +7,7 @@ The library is loaded by a package option or inside the preamble by:
\begin{dispListing}
\tcbuselibrary{theorems}
\end{dispListing}
-This also loads the package |amsmath|.
+This also loads the package \refPkg{amsmath}.
Denis Bitouz\'e, Muzimuzhi, and many others provided very valuable input for this library.
@@ -195,7 +195,7 @@ To switch off the \texttt{nameref} feature permanently, add
\end{dispExample}
\clearpage
-\refCom{tcbhighmath} can be used in symbiosis with the |empheq| package
+\refCom{tcbhighmath} can be used in symbiosis with the \refPkg{empheq} package
which allows to specify own boxing commands to mark multiline formulas.
\begin{dispExample}
@@ -900,8 +900,8 @@ New colored mathematical environments are easily created using
\clearpage
\begin{docTcbKey}{theorem style}{=\meta{name}}{no default, initially |standard|}
Applies a predefined style \meta{name} to the theorem environment. Some of
-the feasible \meta{name} values resemble style names from the packages |theorem|
-and |ntheorem| to give convenient access to known patterns.
+the feasible \meta{name} values resemble style names from the packages \refPkg{theorem}
+and \refPkg{ntheorem} to give convenient access to known patterns.
\begin{marker}
The styles alter \refKey{/tcb/separator sign}, \refKey{/tcb/description delimiters},
\refKey{/tcb/terminator sign}, and more. Therefore, one should apply such
@@ -1018,7 +1018,7 @@ identically colored.
All following environments are numbered with a common counter, but this
can be changed easily. Here, the counter output is supplemented by
the subsection number.
-Further, the |cleveref| package \cite{cubitt:2018a} is used for clever
+Further, the \refPkg{cleveref} package \cite{cubitt:2018a} is used for clever
references.
\inputpreamblelisting{G}
@@ -1208,8 +1208,8 @@ Let's try a more conservative approach:
Instead of creating theorem environments with the methods described before,
environments from other packages can be boxed with a |tcolorbox|.
-Environments may be created e.g. by methods from the |theorem| package or
-the |amsthm| package. \refCom{tcolorboxenvironment} can be used to put a box
+Environments may be created e.g. by methods from the \refPkg{theorem} package or
+the \refPkg{amsthm} package. \refCom{tcolorboxenvironment} can be used to put a box
around these environments.
\inputpreamblelisting{K}
diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.doc.xparse.tex b/macros/latex/contrib/tcolorbox/tcolorbox.doc.xparse.tex
index 280d91bd56..cbe8dbaba6 100644
--- a/macros/latex/contrib/tcolorbox/tcolorbox.doc.xparse.tex
+++ b/macros/latex/contrib/tcolorbox/tcolorbox.doc.xparse.tex
@@ -7,14 +7,14 @@ The library is loaded by a package option or inside the preamble by:
\begin{dispListing}
\tcbuselibrary{xparse}
\end{dispListing}
-This loads the package |xparse| \cite{latexproject:xparse}.
+This loads the package \refPkg{xparse} \cite{latexproject:xparse}.
Note that up to version 5.0.2 this library contained code which
-needed the |xparse| package. Since nowadays this package has become
+needed the \refPkg{xparse} package. Since nowadays this package has become
basically a part of the \LaTeX\ kernel, the code of the library was
migrated to other parts of the |tcolorbox| package. So, the remaining
library is nearly a stub which only loads |xparse|.
Instead of including the |xparse| library, it is recommended to include the
-|xparse| package directly, \textbf{if really needed} (the \LaTeX\ kernel contains
+\refPkg{xparse} package directly, \textbf{if really needed} (the \LaTeX\ kernel contains
essentially everything needed). The library is kept for compatibility.
diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.pdf b/macros/latex/contrib/tcolorbox/tcolorbox.pdf
index 3054aff591..54a761e49b 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 23f0d51569..29c209ece6 100644
--- a/macros/latex/contrib/tcolorbox/tcolorbox.sty
+++ b/macros/latex/contrib/tcolorbox/tcolorbox.sty
@@ -1,4 +1,4 @@
-%% The LaTeX package tcolorbox - version 6.3.0 (2024/07/10)
+%% The LaTeX package tcolorbox - version 6.4.0 (2024/09/27)
%% tcolorbox.sty: Text color boxes
%%
%% -------------------------------------------------------------------------------------------
@@ -18,8 +18,8 @@
%% This work consists of all files listed in README
%%
\NeedsTeXFormat{LaTeX2e}[2023-11-01]
-\ProvidesPackage{tcolorbox}[2024/07/10 version 6.3.0 text color boxes]
-\def\tcb@version{6.3.0}
+\ProvidesPackage{tcolorbox}[2024/09/27 version 6.4.0 text color boxes]
+\def\tcb@version{6.4.0}
%\RequirePackage{pgf}[2008/01/15]
\RequirePackage{tikz}[2023/01/15]
@@ -73,7 +73,9 @@
\def\tcb@info#1{\PackageInfo{tcolorbox}{#1}}
\def\tcb@warning#1{\PackageWarning{tcolorbox}{#1}}
\def\tcb@error#1#2{\PackageError{tcolorbox}{#1}{#2}}
-
+\def\tcb@warning@deprecatedkey#1{%
+ \tcb@warning{`\pgfkeyscurrentkey' key is deprecated hence ignored since #1.}%
+}
% key management
\pgfkeys{/tcb/.is family}
@@ -563,7 +565,6 @@
toggle left and right/evenpage/.code={\let\tcb@lrtoggle=\tcb@lrtoggle@evenpage\tcbset{check odd page}},
toggle left and right/forced/.code={\let\tcb@lrtoggle=\tcb@lrtoggle@forced},
toggle left and right/.default=evenpage,
- graphical environment/.style=,% deprecated
%
frame engine/.is choice,
frame engine/standard/.style={frame code=\tcb@drawframe@standard},
@@ -1103,7 +1104,7 @@
% counter for float
-\AtBeginDocument{%
+\AtBeginDocument[tcolorbox]{%
\@ifundefined{c@float@type}%
{\edef\ftype@tcbfloat{\ifx\c@figure\@undefined 1\else 4\fi}}%
{\edef\ftype@tcbfloat{\the\c@float@type}%
@@ -1594,7 +1595,7 @@
\fi%
}{%
\csxdef{tcb@ehg@current@\tcb@ehgid}{#1}%
- \begingroup\edef\x{\endgroup\noexpand\AtEndDocument{\noexpand\tcb@saveehg{\tcb@ehgid}}}\x%
+ \begingroup\edef\x{\endgroup\noexpand\AtEndDocument[tcolorbox]{\noexpand\tcb@saveehg{\tcb@ehgid}}}\x%
}%
}
@@ -2035,6 +2036,8 @@
\ExplSyntaxOn
+\exp_args_generate:n {nNo}
+
\NewSocket{tagsupport/tcb/drawing/begin}{0}
\NewSocket{tagsupport/tcb/drawing/end}{0}
\NewSocketPlug{tagsupport/tcb/drawing/begin}{suspend}
@@ -2047,7 +2050,7 @@
\NewDocumentEnvironment{ tcb@drawing }{ }
{
\use:c{ tcb@before@\tcb@split@state }
- \exp_last_unbraced:NnNo \begin{tikzpicture}[\tcb@tikz@option@hook]
+ \exp_args:NnNo \begin{tikzpicture}[\tcb@tikz@option@hook]
\UseTaggingSocket{tcb/drawing/begin}
\SuspendTagging{tcb/drawing}
\tcb@tikz@begin@hook
@@ -2557,28 +2560,36 @@
\__tcobox_new_TotalTCBox:w \ProvideDocumentCommand
}
+\NewDocumentCommand \tcolorboxenvironment { m +m }
+ {
+ \hook_gput_code:nnn{ env/#1/before }{ tcolorbox }
+ {
+ \begin{tcolorbox}
+ [{
+ savedelimiter = {#1},
+ #2,
+ wrap@environment,
+ code = \def\tcb@end@tcolorboxenvironment{\end{tcolorbox}}
+ }]
+ }
+ \hook_gput_code:nnn{ env/#1/after }{ tcolorbox }
+ {
+ \tcb@end@tcolorboxenvironment
+ }
+ }
-\ExplSyntaxOff
-
-
-\newcommand{\tcolorboxenvironment}[2]{%
- \AddToHook{env/#1/before}{%
- \begin{tcolorbox}[{savedelimiter={#1},#2,wrap@environment,%
- code={\def\tcb@end@tcolorboxenvironment{\end{tcolorbox}}}}]%
- }%
- \AddToHook{env/#1/after}{%
- \tcb@end@tcolorboxenvironment%
- }%
-}
+\DeclareTotalTCBox{ \tcboxverb }{ O{} v }{ verbatim,#1 }{ #2 }
-\DeclareTotalTCBox{\tcboxverb}{ O{} v }{verbatim,#1}{#2}
+\DeclareTotalTColorBox{ \tcbsidebyside }{ +O{} +m +m }
+ {
+ code = \long\def\tcb@sbs@text@left{#2}\long\def\tcb@sbs@text@right{#3},
+ #1,
+ sidebyside,
+ sidebyside@switch,
+ sidebyside@adapt@process
+ }{ \tcb@sbs@content }
-\DeclareTotalTColorBox{\tcbsidebyside}{ +O{} +m +m }{%
- code={\long\def\tcb@sbs@text@left{#2}\long\def\tcb@sbs@text@right{#3}},%
- #1,%
- sidebyside,%
- sidebyside@switch,sidebyside@adapt@process%
-}{\tcb@sbs@content}
+\ExplSyntaxOff
\def\tcb@addcontentsline#1#2{%
@@ -2919,3 +2930,8 @@
\ProcessOptions*
\begingroup\edef\x{\endgroup\noexpand\tcbuselibrary{\tcb@optionlist}}\x
+
+% deprecated
+\tcbset{
+ graphical environment/.code = {\tcb@warning@deprecatedkey{v6.3.0 (2024/07/10)}},
+}
diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.tex b/macros/latex/contrib/tcolorbox/tcolorbox.tex
index c60eb4acfa..ae5352a384 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 6.3.0 (2024/07/10)
+%% The LaTeX package tcolorbox - version 6.4.0 (2024/09/27)
%% tcolorbox.tex: Manual
%%
%% -------------------------------------------------------------------------------------------
@@ -63,8 +63,8 @@
\setlength{\bibitemsep}{\smallskipamount}
\addbibresource{tcolorbox.doc.bib}
-\def\version{6.3.0}%
-\def\datum{2024/07/10}%
+\def\version{6.4.0}%
+\def\datum{2024/09/27}%
\makeindex
\hypersetup{
@@ -80,7 +80,7 @@
%\geometry{showframe}
%\tcbset{draftmode}
\tcbset{/tcb/external/-}% for final run
-%\includeonly{tcolorbox.doc.coreoptions}
+%\includeonly{tcolorbox.doc.listings}
%\hypersetup{colorlinks=false}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/macros/latex/contrib/tutodoc/code/tutodoc-locale-main-english.cfg.sty b/macros/latex/contrib/tutodoc/code/tutodoc-locale-main-english.cfg.sty
index 339f10240c..e72b66100a 100644
--- a/macros/latex/contrib/tutodoc/code/tutodoc-locale-main-english.cfg.sty
+++ b/macros/latex/contrib/tutodoc/code/tutodoc-locale-main-english.cfg.sty
@@ -4,13 +4,13 @@
\NewDocumentCommand{\tutodoc@trans@latex@show@start}{}{Start ~ of ~ the ~ real ~ output}
\NewDocumentCommand{\tutodoc@trans@latex@show@end}{}{End ~ of ~ the ~ real ~ output}
\NewDocumentCommand{\tutodoc@trans@exa@title}{}{Example}
-\NewDocumentCommand{\tutodoc@trans@rmk@title}{}{Remark}
+\NewDocumentCommand{\tutodoc@trans@rem@title}{}{Remark}
\NewDocumentCommand{\tutodoc@trans@note@title}{}{Note}
\NewDocumentCommand{\tutodoc@trans@tip@title}{}{Tip}
-\NewDocumentCommand{\tutodoc@trans@important@title}{}{Important}
-\NewDocumentCommand{\tutodoc@trans@caution@title}{}{Caution}
+\NewDocumentCommand{\tutodoc@trans@imp@title}{}{Important}
+\NewDocumentCommand{\tutodoc@trans@caut@title}{}{Caution}
\NewDocumentCommand{\tutodoc@trans@warn@title}{}{Warning}
-\NewDocumentCommand{\tutodoc@trans@chges@pb}{}{Problem}
+\NewDocumentCommand{\tutodoc@trans@chges@prob}{}{Problem}
\NewDocumentCommand{\tutodoc@trans@chges@break}{}{Break}
\NewDocumentCommand{\tutodoc@trans@chges@fix}{}{Fix}
\NewDocumentCommand{\tutodoc@trans@chges@new}{}{New}
diff --git a/macros/latex/contrib/tutodoc/code/tutodoc-locale-main-french.cfg.sty b/macros/latex/contrib/tutodoc/code/tutodoc-locale-main-french.cfg.sty
index 5c97cb2f18..49ad24c363 100644
--- a/macros/latex/contrib/tutodoc/code/tutodoc-locale-main-french.cfg.sty
+++ b/macros/latex/contrib/tutodoc/code/tutodoc-locale-main-french.cfg.sty
@@ -4,13 +4,13 @@
\NewDocumentCommand{\tutodoc@trans@latex@show@start}{}{Début ~ du ~ rendu ~ réel}
\NewDocumentCommand{\tutodoc@trans@latex@show@end}{}{Fin ~ du ~ rendu ~ réel}
\NewDocumentCommand{\tutodoc@trans@exa@title}{}{Exemple}
-\NewDocumentCommand{\tutodoc@trans@rmk@title}{}{Remarque}
+\NewDocumentCommand{\tutodoc@trans@rem@title}{}{Remarque}
\NewDocumentCommand{\tutodoc@trans@note@title}{}{Note}
\NewDocumentCommand{\tutodoc@trans@tip@title}{}{Astuce}
-\NewDocumentCommand{\tutodoc@trans@important@title}{}{Important}
-\NewDocumentCommand{\tutodoc@trans@caution@title}{}{Mise ~ en ~ garde}
+\NewDocumentCommand{\tutodoc@trans@imp@title}{}{Important}
+\NewDocumentCommand{\tutodoc@trans@caut@title}{}{Mise ~ en ~ garde}
\NewDocumentCommand{\tutodoc@trans@warn@title}{}{Avertissement}
-\NewDocumentCommand{\tutodoc@trans@chges@pb}{}{Problème}
+\NewDocumentCommand{\tutodoc@trans@chges@prob}{}{Problème}
\NewDocumentCommand{\tutodoc@trans@chges@break}{}{Bifurcation}
\NewDocumentCommand{\tutodoc@trans@chges@fix}{}{Réparation}
\NewDocumentCommand{\tutodoc@trans@chges@new}{}{Nouveau}
diff --git a/macros/latex/contrib/tutodoc/code/tutodoc.sty b/macros/latex/contrib/tutodoc/code/tutodoc.sty
index a1e0acdd13..13040c1ff5 100644
--- a/macros/latex/contrib/tutodoc/code/tutodoc.sty
+++ b/macros/latex/contrib/tutodoc/code/tutodoc.sty
@@ -1,17 +1,22 @@
-% ------------------------------------------------------- %
-% - This is file `tutodoc.sty' generated automatically. - %
-% - - %
-% - Copyright (C) 2023-2024 by Christophe BAL - %
-% - - %
-% - This file may be distributed and/or modified under - %
-% - the conditions of the GNU 3 License. - %
-% ------------------------------------------------------- %
+% ********************************************************* %
+% ** This is file `tutodoc.sty' generated automatically. ** %
+% ** ** %
+% ** Copyright (C) 2023-2024 by Christophe BAL ** %
+% ** ** %
+% ** This file may be distributed and/or modified under ** %
+% ** the conditions of the GNU 3 License. ** %
+% ********************************************************* %
\ProvidesExplPackage
- {tutodoc}
- {2024-08-23} % Creation: 2023-11-29
- {1.2.0-a}
- {This package proposes tools for writing "human friendly" documentations of LaTeX packages.}
+ {tutodoc}
+ {2024-09-28} % Creation: 2023-11-29
+ {1.4.0}
+ {This package proposes tools for writing "human friendly" documentations of LaTeX packages.}
+
+
+% =================== %
+% == PACKAGES USED == %
+% =================== %
\RequirePackage[
top = 2.5cm,
@@ -43,34 +48,68 @@
[2022-09-14]
-\RequirePackage{amsthm}%
- [2017/09]
+\RequirePackage{fontawesome5}%
+ [2022-05-02]
+
+\RequirePackage{keytheorems}%
+ [2024/09/19]
+
+\RequirePackage[svgnames]%
+ {xcolor}%
+ [2023/11/15]
+
+\RequirePackage{tcolorbox}%
+ [2024/07/10]
+
+\tcbuselibrary{breakable,
+ skins}
\RequirePackage{clrstrip}%
[2021-08-28]
-\RequirePackage{tcolorbox}[2023/06/19]
+%\RequirePackage[highlightmode = immediate]% Too slow!
+% {minted}%
+% [2024/09/22]
+
+\RequirePackage{minted2}% Temporary patch.
+
+\RequirePackage{tcolorbox}%
+ [2024/07/10]
+
\tcbuselibrary{minted, breakable, skins}
+\RequirePackage{fontawesome5}%
+ [2022-05-02]
+
\RequirePackage{marginnote}%
[2023-09-07]
+% ======================= %
+% == AVAILABLE OPTIONS == %
+% ======================= %
+
+% ----------------- %
% -- LOCALE LANG -- %
+% ----------------- %
\ExplSyntaxOn
+% ::::::::::::::::::: %
% :: SOME MESSAGES :: %
+% ::::::::::::::::::: %
\msg_set:nnnn { tdoc } { package-option-lang-unknown }
{ Unknown ~ language. }
{ See ~ the ~ documentation ~ for ~ the ~ supported ~ languages. }
+% ::::::::::::::::::::::: %
% :: SETTING SOME KEYS :: %
+% ::::::::::::::::::::::: %
\str_new:N \l_tdoc_opt_lang_str
@@ -97,7 +136,13 @@
\ExplSyntaxOff
+% =============== %
+% == MAIN CODE == %
+% =============== %
+
+% --------------------- %
% -- LOCALE SETTINGS -- %
+% --------------------- %
\NewDocumentCommand{\tutodoc@colon}{}{:}
@@ -115,12 +160,16 @@
\ExplSyntaxOff
+% ---------------------- %
% -- GENERAL SETTINGS -- %
+% ---------------------- %
\setlength{\parindent}{0cm}
+% ----------- %
% -- LINKS -- %
+% ----------- %
\hypersetup{
colorlinks,
@@ -131,7 +180,9 @@
}
+% --------------- %
% -- TOC & Co. -- %
+% --------------- %
\ifcsundef{chapter}%
{}%
@@ -173,7 +224,49 @@
\DeclareTOCStyleEntry[indentfollows = chapter]{tocline}{section}
+% --------------------------- %
+% -- COLOR TRANSFORMATIONS -- %
+% --------------------------- %
+
+%%%
+% prototype::
+% #1 : the amount of color relative to black.
+% #2 : one color following the ''xcolor'' format.
+%
+% :return: a "darker" version of the color ''#1''.
+%%%
+\NewExpandableDocumentCommand{\tdocdarkcolor}{O{50}m}{#2!#1!black}
+
+
+%%%
+% prototype::
+% #1 : the transparency rate.
+% #2 : one color following the ''xcolor'' format.
+%
+% :return: a "transparent" version of the color `#1`.
+%%%
+\NewExpandableDocumentCommand{\tdoclightcolor}{O{5}m}{#2!#1}
+
+
+% ----------- %
+% -- ICONS -- %
+% ----------- %
+
+%%%
+% prototype::
+% #1 : one material that expects to be an icon command from the
+% ''fontawsome5'' \pack.
+%
+% :return: the icon followed by a small insecable space.
+%%%
+\NewDocumentCommand{\tdocicon}{m}{%
+ #1\kern.45em%
+}
+
+
+% ------------- %
% -- QUOTING -- %
+% ------------- %
%%%
% prototype::
@@ -186,7 +279,9 @@
}
+% ------------------------------ %
% -- EXPLAINING ENGLISH NAMES -- %
+% ------------------------------ %
%%%
% prototype::
@@ -215,119 +310,134 @@
}
-% -- FOCUS ON SOME CONTENT -- %
+% ----------------------------------- %
+% -- SOBER HIGHLIGHTING OF CONTENT -- %
+% ----------------------------------- %
-% :: EXAMPLE - HIDDEN VERSIONS :: %
+% :::::::::::::::::::::: %
+% :: EXAMPLE - REMARK :: %
+% :::::::::::::::::::::: %
-%%%
-% See the \doc of the macro ''\newtheorem'' from the package ''amsthm''
-% to have \infos about the environment ''@@tdocexa@nb''.
-%%%
-\newtheorem{@@tdocexa@nb}{\tutodoc@trans@exa@title}%
- [subsubsection]
+\ExplSyntaxOn
%%%
-% We redefine the counter associated to the environment ''@@tdocexa@nb''
-% to obtain only one single arabic number.
+% We use a ''seq'' variable to factorize the code just after.
%%%
-\renewcommand{\the@@tdocexa@nb}{\arabic{@@tdocexa@nb}}
+\seq_new:N \__g_tutodoc_focus_sober_seq
+\seq_set_from_clist:Nn \__g_tutodoc_focus_sober_seq {
+ exa,
+ rem
+}
%%%
-% See the \doc of the macro ''\newtheorem*'' from the package ''amsthm''
-% to have \infos about the environment ''@@tdocexa@no@nb''.
-%%%
-\newtheorem*{@@tdocexa@no@nb}{\tutodoc@trans@exa@title}
-
-
-% :: EXAMPLE - PUBLIC VERSION :: %
-
-\ExplSyntaxOn
-
-\msg_set:nnnn { tdoc } { env-tdocexa-unknown-option }
- { Unknown ~ rafters ~ option. }
- { See ~ the ~ documentation ~ for ~ the ~ supported ~ options. }
-
-\NewDocumentEnvironment{tdocexa}{D<>{nb} O{}}{
- \str_case:nnF { #1 } {
- { nb } {
- \begin{@@tdocexa@nb}[#2]
- }
- { nonb } {
- \begin{@@tdocexa@no@nb}[#2]
- }
- }{
- \msg_error:nn { tdoc } { env-tdocexa-unknown-option }
+% prototype::
+% :action: looping over ''\__g_tutodoc_focus_sober_seq'' to build new
+% numbered theorems sharing the same section level counter.
+% To achieve that, we use the ''\newkeytheorem'' macro from
+% the ''keytheorems'' \pack.
+%%%
+\seq_map_inline:Nn \__g_tutodoc_focus_sober_seq {
+ \str_if_eq:nnTF { #1 } { exa } {
+ \newkeytheorem{tdoc#1}[
+ name = \use:c { tutodoc@trans@#1@title },
+ within = section,
+ ]
+ } {
+ \newkeytheorem{tdoc#1}[
+ name = \use:c { tutodoc@trans@#1@title },
+ numberlike = tdocexa,
+ ]
}
-}{
- \str_case:nnF { #1 } {
- { nb } {
- \end{@@tdocexa@nb}
- }
- { nonb } {
- \end{@@tdocexa@no@nb}
- }
- }{}
+
+ \cs_set:cpn { the tdoc #1 } { \thesection\arabic{tdoc#1} }
}
\ExplSyntaxOff
-% :: REMARK :: %
+% -------------------------------------- %
+% -- COLORFUL HIGHLIGHTING OF CONTENT -- %
+% -------------------------------------- %
-%%%
-% See the \doc of the macro ''\newtheorem*'' from the package ''amsthm''
-% to have \infos about the environment ''tdocrem''.
-%%%
-\newtheorem*{tdocrem}{\tutodoc@trans@rmk@title}
-
-
-% :: IMPORTANT :: %
+% ::::::::::::::::: %
+% :: ABSTRACTION :: %
+% ::::::::::::::::: %
%%%
-% See the \doc of the macro ''\newtheorem*'' from the package ''amsthm''
-% to have \infos about the environment ''tdocimportant''.
+% note::
+% The settings used come from the following sources.
+% * https://tex.stackexchange.com/a/727022/6880
+% * https://tex.stackexchange.com/a/682332/6880
%%%
-\newtheorem*{tdocimportant}{\tutodoc@trans@important@title}
+\tcbset{
+ tutodoc-focus-color-style/.style = {
+ breakable,
+ enhanced,
+ left = 3pt,
+ right = 3pt,
+ fontupper = \color{\tdocdarkcolor{#1}},
+ colback = \tdoclightcolor{#1},
+ colframe = #1!75!black!45,
+ shadow = {.75mm}{-.75mm}{0mm}{black!30},
+% We want to use the same color for the footnotes in the frame.
+ before upper = {\let\default@color\current@color},
+ }
+}
-% :: NOTE :: %
+% ::::::::::::::::::::::::::::::::::::: %
+% :: LET'S GO BACK TO THE REAL WORLD :: %
+% ::::::::::::::::::::::::::::::::::::: %
-%%%
-% See the \doc of the macro ''\newtheorem*'' from the package ''amsthm''
-% to have \infos about the environment ''tdocnote''.
-%%%
-\newtheorem*{tdocnote}{\tutodoc@trans@note@title}
-
-
-% :: TIP :: %
+\ExplSyntaxOn
%%%
-% See the \doc of the macro ''\newtheorem*'' from the package ''amsthm''
-% to have \infos about the environment ''tdoctip''.
+% We use two ''prop'' variables to factorize the code just after.
%%%
-\newtheorem*{tdoctip}{\tutodoc@trans@tip@title}
+\prop_set_from_keyval:Nn \__g_tutodoc_focus_color_prop {
+ note = cyan,
+ tip = ForestGreen,
+ imp = orange,
+ caut = violet,
+ warn = red,
+}
+\prop_set_from_keyval:Nn \__g_tutodoc_focus_icon_prop {
+ note = \faInfoCircle,
+ tip = \faLightbulb,
+ imp = \faHighlighter,
+ caut = \faBiohazard,
+ warn = \faSkullCrossbones,
+}
-% :: CUATION :: %
%%%
-% See the \doc of the macro ''\newtheorem*'' from the package ''amsthm''
-% to have \infos about the environment ''tdoccaution''.
-%%%
-\newtheorem*{tdoccaution}{\tutodoc@trans@caution@title}
-
-
-% :: WARNING :: %
+% prototype::
+% :action: ''key/value'' iteration over ''\__g_tutodoc_focus_color_prop''
+% to build new colorful unumbered theorems. To achieve that,
+% we use a ''tcolorbox'' style givent to the ''\newkeytheorem''
+% macro from the ''keytheorems'' \pack, and icons from the
+% ''fontawesome5'' \pack.
+%%%
+\prop_map_inline:Nn \__g_tutodoc_focus_color_prop {
+ \newkeytheorem{tdoc#1}[
+ numbered = false,
+% tcolorbox-no-titlebar can be used.
+ tcolorbox = {tutodoc-focus-color-style=#2},
+ name = {
+ \tdocicon{ \prop_item:Nn \__g_tutodoc_focus_icon_prop { #1 } }
+ \use:c { tutodoc@trans@#1@title }
+ },
+ ]
+}
-%%%
-% See the \doc of the macro ''\newtheorem*'' from the package ''amsthm''
-% to have \infos about the environment ''tdocwarn''.
-%%%
-\newtheorem*{tdocwarn}{\tutodoc@trans@warn@title}
+\ExplSyntaxOff
+% ---------------------------------------------- %
% -- NAMES OF PACKAGES, MACROS & ENVIRONMENTS -- %
+% ---------------------------------------------- %
%%%
% prototype::
@@ -367,31 +477,53 @@
% #1 : hard typed options with the good delimiters
% #2 : the name of an environment
%
-% :action: ''\tdocenv{myenv}'' prints verb::''\begin{myenv} ... \end{myenv}''
-% or something like verb::''\begin{myenv}<opt1> ... \end{myenv}'',
-% the spaces being secable.
+% :extra: this macro has a star version.
+%
+% Here are the four kind of outputs.
+%
+% 1) ''\tdocenv{myenv}'' prints
+% verb::''\begin{myenv} ... \end{myenv}''.
+%
+% 2) ''\tdocenv[{<opt1>[mando2]}]{myenv}'' prints
+% verb::''\begin{myenv}<opt1>[mando2] ... \end{myenv}''.
+%
+% 3) ''\tdocenv*{myenv}'' prints
+% verb::''myenv''.
+%
+% 4) ''\tdocenv*[{<opt1>[mando2]}]{myenv}'' prints
+% verb::''myenv''.
%%%
%
% Cleaner code from https://tex.stackexchange.com/a/703379/6880 .
-\NewDocumentCommand{\tdocenv}{O{}m}{%
- \texttt{\string\begin\string{#2\string}#1 %
- \!\!...\@\!\!\! %
- \string\end\string{#2\string}}%
+\NewDocumentCommand{\tdocenv}{s O{} m}{%
+ \IfBooleanTF{#1}{%
+ \texttt{#3}%
+ }{%
+ \texttt{\string\begin\string{#3\string}#2 %
+ \!\!...\@\!\!\! %
+ \string\end\string{#3\string}}%
+ }%
}
+% ------------------------- %
% -- EXPLAINING PREFIXES -- %
+% ------------------------- %
\ExplSyntaxOn
+% :::::::::::::: %
% :: MESSAGES :: %
+% :::::::::::::: %
\msg_set:nnnn { bdoc } { prefixwhy-bad-format }
{ Bad ~ format, ~ something ~ like ~ ''pre.fix'' ~ expected. }
{ You ~ must ~ use ~ one ~ single ~ point. }
+% :::::::::::::::::::: %
% :: PREFIX FROM... :: %
+% :::::::::::::::::::: %
%%%
% prototype::
@@ -421,7 +553,9 @@
\ExplSyntaxOff
+% ::::::::::::::::::::: %
% :: JUST ONE PREFIX :: %
+% ::::::::::::::::::::: %
%%%
% prototype::
@@ -438,9 +572,13 @@
}
+% ------------------------ %
% -- GENERAL FORMATTING -- %
+% ------------------------ %
+% :::::::::::::::::::::::: %
% :: TEXT INSIDE A RULE :: %
+% :::::::::::::::::::::::: %
\ExplSyntaxOn
@@ -483,31 +621,9 @@
\ExplSyntaxOff
-% :: COLOR TRANSFORMATIONS :: %
-
-%%%
-% prototype::
-% #1 : one color following the ''xcolor'' format.
-%
-% :return: a "darker" version of the color ''#1''.
-%%%
-\NewExpandableDocumentCommand{\tdocdarkcolor}{m}{%
- #1!50!black%
-}
-
-
-%%%
-% prototype::
-% #1 : one color following the ''xcolor'' format.
-%
-% :return: a "transparent" version of the color `#1`.
-%%%
-\NewExpandableDocumentCommand{\tdoclightcolor}{m}{%
- #1!5%
-}
-
-
+% ::::::::::::::::::::::::::: %
% :: INTERNAL ENVIRONMENTS :: %
+% ::::::::::::::::::::::::::: %
%%%
% prototype::
@@ -556,7 +672,9 @@
\ExplSyntaxOn
+% ::::::::::::::::::::::: %
% :: SETTING SOME KEYS :: %
+% ::::::::::::::::::::::: %
\tl_new:N \l_tdoc_showcase_before_tl
\tl_new:N \l_tdoc_showcase_after_tl
@@ -585,7 +703,9 @@
}
+% :::::::::::::::::::::::::::::: %
% :: SHOWCASE FROM TYPED CODE :: %
+% :::::::::::::::::::::::::::::: %
% prototype::
% #1 : the key-value options.
@@ -625,7 +745,9 @@
}
+% :::::::::::::::::::::::: %
% :: SHOWCASE FROM FILE :: %
+% :::::::::::::::::::::::: %
%%%
% prototype::
@@ -647,9 +769,13 @@
\ExplSyntaxOff
+% -------------------- %
% -- LATEX EXAMPLES -- %
+% -------------------- %
+% ::::::::::::::::::::::::::::: %
% :: INLINE SHORT LATEX CODE :: %
+% ::::::::::::::::::::::::::::: %
%%%
% See the \doc of the macro ''\newmintinline'' from the package ''minted''
@@ -658,11 +784,18 @@
\newmintinline[tdocinlatex]{latex}{bgcolor = yellow!4}
+% ::::::::::::::::::::::::::::::::::::::::::::::: %
% :: SHORTCUTS FOR TCOLORBOX LISTING FORMATING :: %
+% ::::::::::::::::::::::::::::::::::::::::::::::: %
\ExplSyntaxOn
%%%
+% prototype::
+% #1 : a style of formatting for a \latex listing and its output.
+%
+% :see: macro.tdoclatex , macro.tdoclatexinput
+%
% In the following easy-to-understand macro, we use one fictive ''tcolorbox''
% style such as to indicate an unknown ''tdoc'' style to the user.
% For example, this can give one message similar to the following one.
@@ -684,7 +817,9 @@
\ExplSyntaxOff
+% ::::::::::::::::::::::::::::::::: %
% :: THE TCOLORBOX LISTING STYLE :: %
+% ::::::::::::::::::::::::::::::::: %
%%%
% note::
@@ -696,6 +831,7 @@
tdoclatex_tcbstyle/.style = {
minted language = latex,
breakable,
+ enhanced,
% Code and output
colback = yellow!5,
% Frame
@@ -707,7 +843,6 @@
% We can use ''sharp corners'' to obtain an "old school" style.
%
% Separating line
- enhanced,
segmentation style = {
gray,
dash pattern = {on 5pt off 2.5pt},
@@ -718,7 +853,9 @@
}
+% ::::::::::::::::::::::::::::::::::: %
% :: TCOLORBOX LISTING ENVIRONMENT :: %
+% ::::::::::::::::::::::::::::::::::: %
%%%
% prototype::
@@ -736,11 +873,13 @@
}
+% :::::::::::::::::::::::::::::::::::::: %
% :: TCOLORBOX IMPORTED LISTING MACRO :: %
+% :::::::::::::::::::::::::::::::::::::: %
%%%
% prototype::
-% #1 : :see: \newtcblisting{tdoclatex}.
+% #1 : :see: ''\newtcblisting{tdoclatex}'' just before.
% #2 : the path of the file to input and format.
%
% note::
@@ -753,11 +892,15 @@
}
+% -------------------------- %
% -- LATEX REAL USE CASES -- %
+% -------------------------- %
\ExplSyntaxOn
+% ::::::::::::::::::::::: %
% :: SETTING SOME KEYS :: %
+% ::::::::::::::::::::::: %
\tl_new:N \l_tdoc_listing_explain_tl
@@ -773,7 +916,9 @@
}
+% ::::::::::::::::::::: %
% :: LATEXSHOW MACRO :: %
+% ::::::::::::::::::::: %
%%%
% prototype::
@@ -805,14 +950,18 @@
\ExplSyntaxOn
+% :::::::::::::: %
% :: MESSAGES :: %
+% :::::::::::::: %
\msg_set:nnnn { tdoc } { date-bad-format }
{ Bad ~ format ~ for ~ a ~ date. }
{ Use ~ YYYY-MM-DD. }
+% ::::::::::::::::: %
% :: MARGIN NOTE :: %
+% ::::::::::::::::: %
\reversemarginpar{}
@@ -840,7 +989,7 @@
\IfBlankTF{#2}{}{
\par
- #2
+ #2\vphantom{Mp}
\par
}
@@ -850,7 +999,7 @@
}
\par
- \__tdoc_translate_date:n { #3 }
+ \__tdoc_translate_date:n { #3 }\vphantom{Mp}
\par
}
@@ -890,8 +1039,12 @@
{#3}
}
+\ExplSyntaxOff
+
+% :::::::::::::::::::::: %
% :: VERSION AND DATE :: %
+% :::::::::::::::::::::: %
%%%
% prototype::
@@ -916,7 +1069,9 @@
}
+% :::::::::: %
% :: DATE :: %
+% :::::::::: %
%%%
% prototype::
@@ -928,36 +1083,46 @@
%%%
\NewDocumentCommand{\tdocdate}{O{blue} m}{
\tutodoc@new@change@margin{#1} % Color
- {#2} % Date
- {} % Version
- {-5.35pt} % Last negative spacing
+ {#2} % Date
+ {} % Version
+ {-5.35pt} % Last negative spacing
}
+% --------------------- %
% -- CHANGES - WHAT? -- %
+% --------------------- %
+
+\ExplSyntaxOn
+% :::::::::::::: %
% :: MESSAGES :: %
+% :::::::::::::: %
\msg_set:nnnn { tdoc } { changes-topic-missing-title }
{ Missing ~ title. }
{ One ~ single ~ title ~ must ~ be ~ indicated. }
+% ::::::::::::::::::::: %
% :: CHANGES - TOPIC :: %
+% ::::::::::::::::::::: %
%%%
% prototype::
% #1 : a title that will be followed by a colon.
+% #2 : one material that expects to be an icon command from the
+% ''fontawsome5'' \pack.
%
% :action: this environment prints some ¨infos about specific changes
% achieved in a new version (no special formatting is applied).
%%%
-\NewDocumentEnvironment{tdoctopic}{ m }{
+\NewDocumentEnvironment{tdoctopic}{ m O{} }{
\IfBlankT{#1}{
\msg_fatal:nn { tdoc } { changes-topic-missing-title }
- }
-
- \textbf{
+ }%
+ \textbf{%
+ \IfBlankF{#2}{\tdocicon{#2}}%
\textsc{#1.}
}
@@ -967,89 +1132,56 @@
}
+% :::::::::::::::::::::::::: %
% :: CHANGES - NEW THINGS :: %
+% :::::::::::::::::::::::::: %
%%%
-% prototype::
-% :see: env.tdoctopic
-%
-% :action: similar to the \env ''tdoctopic'' with the title "New"
-% translated into the good language.
-%%%
-\NewDocumentEnvironment{tdocnew}{}{
- \begin{tdoctopic}{\tutodoc@trans@chges@new}
-}{
- \end{tdoctopic}
-}
-
-
-% :: CHANGES - UPDATE :: %
-
-%%%
-% prototype::
-% :see: env.tdoctopic
-%
-% :action: similar to the \env ''tdoctopic'' with the title "Update"
-% translated into the good language.
+% We use a ''prop'' variable to factorize the code just after.
%%%
-\NewDocumentEnvironment{tdocupdate}{}{
- \begin{tdoctopic}{\tutodoc@trans@chges@update}
-}{
- \end{tdoctopic}
+\prop_new:N \__g_tutodoc_topic_change_prop
+\prop_set_from_keyval:Nn \__g_tutodoc_topic_change_prop {
+ break = \faCodeBranch,
+ fix = \faWrench,
+ new = \faGem,
+ prob = \faFire*,
+ update = \faMagic,
}
-% :: CHANGES - BREAK :: %
-
%%%
% prototype::
% :see: env.tdoctopic
%
-% :action: similar to the \env ''tdoctopic'' with the title "Break"
-% translated into the good language.
+% :action: ''key/value'' iteration over ''\__g_tutodoc_topic_change_prop''
+% to build topic-like \envs using the \env ''tdoctopic''
+% (the title used is translated into the good language).
%%%
-\NewDocumentEnvironment{tdocbreak}{}{
- \begin{tdoctopic}{\tutodoc@trans@chges@break}
-}{
- \end{tdoctopic}
-}
-
-
-% :: CHANGES - PROBLEM :: %
-
-%%%
-% prototype::
-% :see: env.tdoctopic
-%
-% :action: similar to the \env ''tdoctopic'' with the title "Problem"
-% translated into the good language.
-%%%
-\NewDocumentEnvironment{tdocprob}{}{
- \begin{tdoctopic}{\tutodoc@trans@chges@pb}
-}{
- \end{tdoctopic}
+\prop_map_inline:Nn \__g_tutodoc_topic_change_prop {
+ \NewDocumentEnvironment{ tdoc#1 } {} {
+ \begin{tdoctopic}{ \use:c { tutodoc@trans@chges@#1 } } [ #2 ]
+ }{
+ \end{tdoctopic}
+ }
}
-% :: CHANGES - FIX :: %
-
%%%
% prototype::
-% :see: env.tdoctopic
+% #1 : a short text expected t indicate the very first version of a project.
%
-% :action: similar to the \env ''tdoctopic'' with the title "Fix"
-% translated into the good language.
+% :action: the short text printed will be preceded by a pretty anchor icon.
%%%
-\NewDocumentEnvironment{tdocfix}{}{
- \begin{tdoctopic}{\tutodoc@trans@chges@fix}
-}{
- \end{tdoctopic}
+\NewDocumentCommand{ \tdocstartproj }{ m } {
+ \tdocicon{\faAnchor}#1
}
\ExplSyntaxOff
+% ----------------- %
% -- DECORATIONS -- %
+% ----------------- %
% Source for \addvspace{\medskipamount} instead of \medskip.
% * https://tex.stackexchange.com/a/705938/6880
@@ -1067,12 +1199,3 @@
\medskip
\smallskip
}
-
-
-%%%
-% prototype::
-% :action: this macro adds a tiny vertical spacing.
-%%%
-\NewDocumentCommand{\tdocxspace}{}{
- \vspace{0.25em}
-}
diff --git a/macros/latex/contrib/tutodoc/doc/tutodoc-en.pdf b/macros/latex/contrib/tutodoc/doc/tutodoc-en.pdf
index 506a75b5d2..2e6df04d3c 100644
--- a/macros/latex/contrib/tutodoc/doc/tutodoc-en.pdf
+++ b/macros/latex/contrib/tutodoc/doc/tutodoc-en.pdf
Binary files differ
diff --git a/macros/latex/contrib/tutodoc/doc/tutodoc-en.tex b/macros/latex/contrib/tutodoc/doc/tutodoc-en.tex
index a66ebc0ea8..5a588de369 100644
--- a/macros/latex/contrib/tutodoc/doc/tutodoc-en.tex
+++ b/macros/latex/contrib/tutodoc/doc/tutodoc-en.tex
@@ -1,34 +1,110 @@
+% ==================== %
+% == RESOURCES USED == %
+% ==================== %
-% -------------------- %
-% -- RESOURCES USED -- %
-% -------------------- %
+\begin{filecontents*}[overwrite]{examples-version-n-change-dating.tex}
+Bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla...
-\begin{filecontents*}[overwrite]{examples-focus-exa.tex}
-Bla, bla, bla...
+\medskip % CAUTION! This prevents overlapping.
-\begin{tdocexa}
- Ble, ble, ble...
-\end{tdocexa}
+\tdocdate{2023-09-24}
-\begin{tdocexa}[Wonderful]
- Bli, bli, bli...
-\end{tdocexa}
+Ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble...
-\begin{tdocexa}<nonb>
- Blo, blo, blo...
-\end{tdocexa}
+\medskip % CAUTION! This prevents overlapping.
-\begin{tdocexa}<nonb>[Superb]
- Blu, blu, blu...
-\end{tdocexa}
+\tdocdate[gray]{2020-05-08}
+
+Bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli...
+
+Blo, blo, blo, blo, blo, blo, blo, blo, blo, blo, blo, blo, blo...
+
+Blu, blu, blu, blu, blu, blu, blu, blu, blu, blu, blu, blu, blu...
+\end{filecontents*}
+
+
+\begin{filecontents*}[overwrite]{examples-version-n-change-user-choice-icon.tex}
+\begin{tdoctopic}{Don't look}[\faEyeSlash]
+% An icon from fontawesome5.
+ \item Info 1...
+ \item Info 2...
+\end{tdoctopic}
+\end{filecontents*}
+
+
+\begin{filecontents*}[overwrite]{examples-version-n-change-user-choice.tex}
+\begin{tdoctopic}{End of icons}
+ \item Info 1...
+ \item Info 2...
+\end{tdoctopic}
+\end{filecontents*}
+
+
+\begin{filecontents*}[overwrite]{examples-version-n-change-update.tex}
+\begin{tdocupdate}
+ \item Info 1...
+ \item Info 2...
+\end{tdocupdate}
+\end{filecontents*}
+
+
+\begin{filecontents*}[overwrite]{examples-version-n-change-versioning.tex}
+\tdocversion[red]{10.2.0-beta}[2023-12-01]
+
+Bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla...
+
+\bigskip % CAUTION! This prevents overlapping.
+
+\tdocversion{10.2.0-alpha}
+
+Ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble,
+ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble,
+ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble,
+ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble...
+\end{filecontents*}
+
+
+\begin{filecontents*}[overwrite]{examples-version-n-change-first.tex}
+\tdocstartproj{1st version of the project.}
+\end{filecontents*}
+
+
+\begin{filecontents*}[overwrite]{examples-version-n-change-break.tex}
+\begin{tdocbreak}
+ \item Info 1...
+ \item Info 2...
+\end{tdocbreak}
+\end{filecontents*}
+
+
+\begin{filecontents*}[overwrite]{examples-version-n-change-pb.tex}
+\begin{tdocprob}
+ \item Info 1...
+ \item Info 2...
+\end{tdocprob}
+\end{filecontents*}
+
+
+\begin{filecontents*}[overwrite]{examples-version-n-change-new.tex}
+\begin{tdocnew}
+ \item Info 1...
+ \item Info 2...
+\end{tdocnew}
+\end{filecontents*}
+
+
+\begin{filecontents*}[overwrite]{examples-version-n-change-fix.tex}
+\begin{tdocfix}
+ \item Info 1...
+ \item Info 2...
+\end{tdocfix}
\end{filecontents*}
\begin{filecontents*}[overwrite]{examples-focus-exa-leavevmode.tex}
\begin{tdocexa}
\leavevmode
-
\begin{enumerate}
\item Point 1.
@@ -38,25 +114,14 @@ Bla, bla, bla...
\end{filecontents*}
-\begin{filecontents*}[overwrite]{examples-focus-rmk.tex}
-\begin{tdocrem}
- Just one remark...
-\end{tdocrem}
-
-\begin{tdocrem}[Mini title]
- Useful?
-\end{tdocrem}
-\end{filecontents*}
-
-
-\begin{filecontents*}[overwrite]{examples-focus-tip.tex}
-\begin{tdoctip}
- A tip.
-\end{tdoctip}
+\begin{filecontents*}[overwrite]{examples-focus-important.tex}
+\begin{tdocimp}
+ Important and harmless.
+\end{tdocimp}
-\begin{tdoctip}[Mini title]
+\begin{tdocimp}[Mini title]
Useful?
-\end{tdoctip}
+\end{tdocimp}
\end{filecontents*}
@@ -71,25 +136,25 @@ Bla, bla, bla...
\end{filecontents*}
-\begin{filecontents*}[overwrite]{examples-focus-important.tex}
-\begin{tdocimportant}
- Important and harmless.
-\end{tdocimportant}
+\begin{filecontents*}[overwrite]{examples-focus-caution.tex}
+\begin{tdoccaut}
+ Caution, caution...
+\end{tdoccaut}
-\begin{tdocimportant}[Mini title]
+\begin{tdoccaut}[Mini title]
Useful?
-\end{tdocimportant}
+\end{tdoccaut}
\end{filecontents*}
-\begin{filecontents*}[overwrite]{examples-focus-caution.tex}
-\begin{tdoccaution}
- Caution, caution...
-\end{tdoccaution}
+\begin{filecontents*}[overwrite]{examples-focus-tip.tex}
+\begin{tdoctip}
+ A tip.
+\end{tdoctip}
-\begin{tdoccaution}[Mini title]
+\begin{tdoctip}[Mini title]
Useful?
-\end{tdoccaution}
+\end{tdoctip}
\end{filecontents*}
@@ -104,52 +169,38 @@ Bla, bla, bla...
\end{filecontents*}
-\begin{filecontents*}[overwrite]{examples-showcase-default.tex}
-\begin{tdocshowcase}
- \bfseries A bit of code \LaTeX.
-
- \bigskip
-
- \emph{\large End of the awful demo.}
-\end{tdocshowcase}
-\end{filecontents*}
-
-
-\begin{filecontents*}[overwrite]{examples-showcase-customized.tex}
-\begin{tdocshowcase}[before = My beginning,
- after = My end,
- color = red]
- Bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla...
-\end{tdocshowcase}
-\end{filecontents*}
-
+\begin{filecontents*}[overwrite]{examples-focus-exa.tex}
+\begin{tdocexa}
+ An example...
+\end{tdocexa}
-\begin{filecontents*}[overwrite]{examples-showcase-hook.tex}
-\begin{tdocshowcase}
- \string[This works...]
-\end{tdocshowcase}
+\begin{tdocexa}[Mini title]
+ Useful?
+\end{tdocexa}
\end{filecontents*}
-\begin{filecontents*}[overwrite]{examples-showcase-no-clrstrip.tex}
-\begin{tdocshowcase}[nostripe]
- Bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla...
-\end{tdocshowcase}
-\end{filecontents*}
+\begin{filecontents*}[overwrite]{examples-focus-rmk.tex}
+\begin{tdocrem}
+ Just one remark...
+\end{tdocrem}
+\begin{tdocrem}
+ Another?
+\end{tdocrem}
-\begin{filecontents*}[overwrite]{examples-showcase-no-clrstrip-customized.tex}
-\begin{tdocshowcase}[nostripe,
- before = My beginning,
- after = My end,
- color = green]
- Bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla...
-\end{tdocshowcase}
+\begin{tdocrem}[Mini title]
+ Useful?
+\end{tdocrem}
\end{filecontents*}
-\begin{filecontents*}[overwrite]{examples-showcase-external.tex}
-Blablobli, blablobli, blablobli, blablobli, blablobli, blablobli...
+\begin{filecontents*}[overwrite]{examples-listing-latexshow-options.tex}
+\tdoclatexshow[explain = What comes next is colourful...,
+ before = Rendering below.,
+ after = Finished rendering.,
+ color = orange]
+ {examples-listing-xyz.tex}
\end{filecontents*}
@@ -160,6 +211,12 @@ Blablobli, blablobli, blablobli, blablobli, blablobli, blablobli...
\end{filecontents*}
+\begin{filecontents*}[overwrite]{examples-listing-xyz.tex}
+% Just one demo.
+$x y z = 1$
+\end{filecontents*}
+
+
\begin{filecontents*}[overwrite]{examples-listing-strange.tex}
\begin{tdoclatex}[std]
[Strange... Or not!]
@@ -174,129 +231,101 @@ Blablobli, blablobli, blablobli, blablobli, blablobli, blablobli...
\end{filecontents*}
-\begin{filecontents*}[overwrite]{examples-listing-xyz.tex}
-% Just one demo.
-$x y z = 1$
+\begin{filecontents*}[overwrite]{examples-showcase-customized.tex}
+\begin{tdocshowcase}[before = My beginning,
+ after = My end,
+ color = red]
+ Bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla...
+\end{tdocshowcase}
\end{filecontents*}
-\begin{filecontents*}[overwrite]{examples-listing-latexshow-options.tex}
-\tdoclatexshow[explain = What comes next is colourful...,
- before = Rendering below.,
- after = Finished rendering.,
- color = orange]
- {examples-listing-xyz.tex}
+\begin{filecontents*}[overwrite]{examples-showcase-hook.tex}
+\begin{tdocshowcase}
+ \string[This works...]
+\end{tdocshowcase}
\end{filecontents*}
-\begin{filecontents*}[overwrite]{examples-version-n-change-dating.tex}
-Bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla...
-
-\medskip % CAUTION! This prevents overlapping.
-
-\tdocdate{2023-09-24}
-
-Ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble...
-
-\medskip % CAUTION! This prevents overlapping.
-
-\tdocdate[gray]{2020-05-08}
-
-Bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli...
-
-Blo, blo, blo, blo, blo, blo, blo, blo, blo, blo, blo, blo, blo...
-
-Blu, blu, blu, blu, blu, blu, blu, blu, blu, blu, blu, blu, blu...
+\begin{filecontents*}[overwrite]{examples-showcase-no-clrstrip-customized.tex}
+\begin{tdocshowcase}[nostripe,
+ before = My beginning,
+ after = My end,
+ color = green]
+ Bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla...
+\end{tdocshowcase}
\end{filecontents*}
-\begin{filecontents*}[overwrite]{examples-version-n-change-versioning.tex}
-\tdocversion[red]{10.2.0-beta}[2023-12-01]
-
-Bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla...
-
-\bigskip % CAUTION! This prevents overlapping.
-
-\tdocversion{10.2.0-alpha}
-
-Ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble,
-ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble,
-ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble,
-ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble...
+\begin{filecontents*}[overwrite]{examples-showcase-external.tex}
+Blablobli, blablobli, blablobli, blablobli, blablobli, blablobli...
\end{filecontents*}
-\begin{filecontents*}[overwrite]{examples-version-n-change-new.tex}
-\begin{tdocnew}
- \item Info 1...
- \item Info 2...
-\end{tdocnew}
-\end{filecontents*}
+\begin{filecontents*}[overwrite]{examples-showcase-default.tex}
+\begin{tdocshowcase}
+ \bfseries A bit of code \LaTeX.
+ \bigskip
-\begin{filecontents*}[overwrite]{examples-version-n-change-update.tex}
-\begin{tdocupdate}
- \item Info 1...
- \item Info 2...
-\end{tdocupdate}
+ \emph{\large End of the awful demo.}
+\end{tdocshowcase}
\end{filecontents*}
-\begin{filecontents*}[overwrite]{examples-version-n-change-break.tex}
-\begin{tdocbreak}
- \item Info 1...
- \item Info 2...
-\end{tdocbreak}
+\begin{filecontents*}[overwrite]{examples-showcase-no-clrstrip.tex}
+\begin{tdocshowcase}[nostripe]
+ Bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla...
+\end{tdocshowcase}
\end{filecontents*}
-\begin{filecontents*}[overwrite]{examples-version-n-change-pb.tex}
-\begin{tdocprob}
- \item Info 1...
- \item Info 2...
-\end{tdocprob}
-\end{filecontents*}
-
+% ======================== %
+% == SOURCE FOR THE DOC == %
+% ======================== %
-\begin{filecontents*}[overwrite]{examples-version-n-change-fix.tex}
-\begin{tdocfix}
- \item Info 1...
- \item Info 2...
-\end{tdocfix}
-\end{filecontents*}
+\documentclass[10pt, a4paper]{article}
+\usepackage[utf8]{inputenc}
+\usepackage[T1]{fontenc}
-\begin{filecontents*}[overwrite]{examples-version-n-change-user-choice.tex}
-\begin{tdoctopic}{It's my choice}
-% This is where the point needs to be put.
- \item Info 1...
- \item Info 2...
-\end{tdoctopic}
-\end{filecontents*}
+\usepackage[english]{babel, varioref}
-% ------------------------ %
-% -- SOURCE FOR THE DOC -- %
-% ------------------------ %
-\documentclass[10pt, a4paper]{article}
-\usepackage[utf8]{inputenc}
-\usepackage[T1]{fontenc}
-\usepackage[english]{babel, varioref}
\usepackage{enumitem}
-
-\usepackage{tabularray}
\usepackage{fmtcount}
+\usepackage{multicol}
\setlength{\parindent}{0em}
+\newcommand\thispack{\tdocpack{tutodoc}}
+
% Package documented.
\usepackage[lang = english]{tutodoc}
+% --------------- %
+% -- IMPORTANT -- %
+% --------------- %
+%
+% See the French version of this file for the text to be used
+% for languages other than English.
+
+
+% --------------- %
+% -- IMPORTANT -- %
+% --------------- %
+%
+% See the French version of this file for the text to be used
+% for languages other than English.
+
+
+% == FORDOC == %
+
% Source.
% * https://tex.stackexchange.com/a/604698/6880
@@ -311,6 +340,8 @@ ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble...
}
+% == FORDOC == %
+
% Source.
% * https://tex.stackexchange.com/a/604698/6880
@@ -340,36 +371,42 @@ ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble...
}
-
\begin{document}
-\title{The \texttt{tutodoc} package - Tutorial-type documentation}
+
+\title{The \texttt{tutodoc} package - Tutorial-style documentation}
\author{Christophe BAL}
-\date{23 Aug. 2024 - Version 1.2.0-a}
+\date{Sep 28, 2024 - Version 1.4.0}
\maketitle
\begin{abstract}
-The \tdocpack{tutodoc} package
-\footnote{
- The name comes from \tdocquote{\tdocprewhy{tuto.rial-type} \tdocprewhy{doc.umentation}}.
-}
-is used by its author to semantically produce documentation of \LaTeX\ packages and classes in a tutorial style
-\footnote{
- The idea is to produce an efficient \texttt{PDF} file that can be browsed for one-off needs. This is generally what is expected of coding documentation.
-},
-and with a sober rendering for reading on screen.
+ The \thispack{} package\,%
+ \footnote{
+ The name comes from \tdocquote{\tdocprewhy{tuto.rial-type} \tdocprewhy{doc.umentation}}.
+ }
+ is used by its author to semantically produce documentation of \LaTeX\ packages and classes in a tutorial style,%
+ \footnote{
+ The idea is to produce an efficient \texttt{PDF} file that can be browsed for one-off needs. This is generally what is expected of coding documentation.
+ }
+ and with a sober rendering for reading on screen.
+ \medskip
-\begin{tdocnote}
- This package imposes a formatting style. In the not-too-distant future, \tdocpack{tutodoc} will probably be split into a class and a package.
-\end{tdocnote}
+ Two important points to note.
+ \begin{itemize}
+ \item This package imposes a formatting style. In the not-too-distant future, \thispack{} will probably be split into a class and a package.
+
+ \item This documentation is also available in French.
+ \end{itemize}
\end{abstract}
\newpage
\tableofcontents
\newpage
+
+
\section{General formatting imposed}
\subsection{Page geometry}
@@ -458,7 +495,7 @@ The \tdocpack{hyperref} package is imported behind the scenes with the settings
\section{Select language when loading package}
-By default, \tdocpack{tutodoc} is set for English, but it is possible to change the language: for example, a French documentation will use \tdocinlatex|\usepackage[lang = french]{tutodoc}| .
+By default, \thispack{} is set for English, but it is possible to change the language: for example, a French documentation will use \tdocinlatex|\usepackage[lang = french]{tutodoc}| .
For the moment, we only have the following two choices.
\begin{enumerate}
@@ -487,7 +524,7 @@ The macro \tdocmacro{tdocinEN} and its starred version are based on \tdocmacro{t
\begin{tdocnote}
- As the text \tdocquote{in English} is translated into the language indicated when \tdocpack{tutodoc} is imported, the macro \tdocmacro{tdocinEN} and its starred version become useful for non-English speakers.
+ As the text \tdocquote{in English} is translated into the language indicated when \thispack{} is imported, the macro \tdocmacro{tdocinEN} and its starred version become useful for non-English speakers.
\end{tdocnote}
@@ -496,133 +533,165 @@ The macro \tdocmacro{tdocinEN} and its starred version are based on \tdocmacro{t
\begin{tdocnote}
The environments presented in this section
\footnote{
- The formatting comes from the \tdocpack{amsthm} package.
+ The formatting comes from the \tdocpack{keytheorems} package.
}
add a short title indicating the type of information provided.
- This short text will always be translated into the language indicated when the \tdocpack{tutodoc} package is loaded.
+ This short text will always be translated into the language indicated when the \thispack{} package is loaded.
\end{tdocnote}
+\subsection{Content in the reading flow}
+
+
% ------------------ %
-\subsection{Examples}
+\begin{tdocimp}
+ All the environments presented in this section share the same counter.
+\end{tdocimp}
-Numbered or unnumbered examples can be indicated using the \tdocenv{tdocexa} environment, which offers two optional arguments.
-\begin{enumerate}
- \item The \ordinalnum{1} argument between brackets \tdocinlatex#<...># can take the values \tdocinlatex#nb# to number, which is the default setting, and \tdocinlatex#nonb# to not number.
+% ------------------ %
- \item The \ordinalnum{2} argument in square brackets \tdocinlatex#[...]# is used to add a mini-title..
-\end{enumerate}
+\subsubsection{Examples}
-Here are some possible uses.
+Numbered examples, if required, are indicated via \tdocenv{tdocexa}, which offers an optional argument for adding a mini-title.
+Here are two possible uses.
\tdoclatexinput[sbs]{examples-focus-exa.tex}
+
% ------------------ %
-\begin{tdocimportant}
- The numbering of the examples is reset to zero as soon as a section with a level at least equal to a \tdocinlatex|\subsubsection| is opened.
-\end{tdocimportant}
+\begin{tdocimp}
+ The numbering of the examples is reset to zero as soon as a section with a level at least equal to a \tdocinlatex|\section| is opened.
+\end{tdocimp}
% ------------------ %
\begin{tdoctip}
- It can sometimes be useful to return to the line at the start of the content. Here's how to do it (this trick remains valid for the environments presented in the following sub-sections). Note in passing that the numbering follows that of the previous example as desired.
-
- \tdoclatexinput[sbs]{examples-focus-exa-leavevmode.tex}
+ It can sometimes be useful to return to the line at the start of the content. The code below shows how to proceed (this trick also applies to the \verb#tdocrem# environment presented next). Note in passing that the numbering follows that of the previous example as desired.
\end{tdoctip}
+\tdoclatexinput[sbs]{examples-focus-exa-leavevmode.tex}
+
+
-\subsection{Some remarks}
+% \subsection{Content in the reading flow}
-Everything happens via the \tdocenv{tdocrem} environment, as in the following example.
+\subsubsection{Some remarks}
+
+Everything happens via \tdocenv{tdocrem}, which works identically to the \tdocenv*{tdocexa} environment, as shown in the following example.
\tdoclatexinput[sbs]{examples-focus-rmk.tex}
-\subsection{A tip}
-The \tdocenv{tdoctip} environment is used to give tips. Here's how to use it.
+\subsection{Flashy content} \label{tdoc-colorful-focus}
+
+\begin{tdocnote}
+ Icons are obtained via the \tdocpack{fontawesome5} package, and text spacing is managed by the \tdocmacro{tdocicon} macro.
+ \footnote{
+ For example,
+ \tdocinlatex|\tdocicon{\faBed}{Tired}|
+ produces\,
+ \tdocicon{\faBed}{Tired}.
+ }
+\end{tdocnote}
+
+
+\subsubsection{A tip}
+
+The \tdocenv*{tdoctip} environment is used to give tips. Here's how to use it.
\tdoclatexinput[sbs]{examples-focus-tip.tex}
-\subsection{Informative note}
-The \tdocenv{tdocnote} environment is used to highlight useful information. Here's how to use it.
+\smallskip
+
+\begin{tdocnote}
+ Colors are obtained via the expandable macros \tdocmacro{tdocbackcolor} and \tdocmacro{tdocdarkcolor}.
+ For further information, please refer to the end of the section \ref{tdoc-color-macros} page \pageref{tdoc-color-macros}.
+\end{tdocnote}
+
+
+%\subsection{Flashy content}
+
+\subsubsection{Informative note}
+
+The \tdocenv*{tdocnote} environment is used to highlight useful information. Here's how to use it.
\tdoclatexinput[sbs]{examples-focus-note.tex}
-\subsection{Something important}
-The \tdocenv{tdocimportant} environment is used to indicate something important but harmless.
+%\subsection{Flashy content}
+
+\subsubsection{Something important}
+
+The \tdocenv*{tdocimp} environment is used to indicate something important but harmless.
\tdoclatexinput[sbs]{examples-focus-important.tex}
-\subsection{Caution about a delicate point}
-The \tdocenv{tdoccaution} environment is used to indicate a delicate point to the user. Here's how to use it.
+%\subsection{Flashy content}
-\tdoclatexinput[sbs]{examples-focus-caution.tex}
+\subsubsection{Caution about a delicate point}
+The \tdocenv*{tdoccaut} environment is used to indicate a delicate point to the user. Here's how to use it.
-\subsection{Warning of danger}
+\tdoclatexinput[sbs]{examples-focus-caution.tex}
-The \tdocenv{tdocwarn} environment is used to warn the user of a trap to avoid. Here's how to use it.
-\tdoclatexinput[sbs]{examples-focus-warn.tex}
+%\subsection{Flashy content}
-\section{Specify packages, classes, macros or environments}
+\subsubsection{Warning of danger}
-Here's what you can type semantically.
+The \tdocenv*{tdocwarn} environment is used to warn the user of a trap to avoid. Here's how to use it.
+\tdoclatexinput[sbs]{examples-focus-warn.tex}
-\begin{tdoclatex}[sbs]
-\tdoccls{myclass} is for...
-\tdocpack{mypackage} is for...
-\tdocmacro{onemacro} is for...
+\section{Specify packages, classes, macros or environments}
-\tdocenv{env} produces...
+Here's what you can type semantically.
-We also have :
-\tdocenv[{[opt1]<opt2>}]{env}
+\begin{tdoclatex}[sbs]
+\tdoccls{myclass} is for... \\
+\tdocpack{mypackage} is for... \\
+\tdocmacro{onemacro} is for... \\
+\tdocenv{env} produces... \\
+\tdocenv[{[opt1]<opt2>}]{env} \\
+Just \tdocenv*{env}... \\
+Finally \tdocenv*[{[opt1]<opt2>}]{env}...
\end{tdoclatex}
\begin{tdocrem}
- The advantage of the previous macros over the use of \tdocmacro{tdocinlatex}, see the section \ref{tdoc-listing-inline} page \pageref{tdoc-listing-inline}, is the absence of colouring.
- Furthermore, the \tdocmacro{tdocenv} macro simply asks you to type the name of the environment
- \footnote{
- In addition, \tdocinlatex{\tdocenv{monenv}} produces \tdocenv{monenv} with spaces to allow line breaks if necessary.
- }
- with any options by typing the correct delimiters
- \footnote{
- Remember that almost anything is possible from now on.
- }
- by hand.
+ Unlike \tdocmacro{tdocinlatex}, \tdocmacro{tdocenv} and \tdocmacro{tdocenv*} macros don't color the text they produce.
+ In addition, \tdocinlatex{\tdocenv{monenv}} produces \tdocenv{monenv} with spaces to allow line breaks if required.
\end{tdocrem}
\begin{tdocwarn}
- The optional argument to the \tdocmacro{tdocenv} macro is copied and pasted during rendering. This can sometimes require the use of protective braces, as in the previous example.
+ The optional argument of the \tdocmacro{tdocenv} macro is copied and pasted
+ \footnote{
+ Remember that almost anything is possible from now on.
+ }
+ when rendering. This may sometimes require the use of protective braces, as in the example above.
\end{tdocwarn}
-% -------------------- %
-
\section{Origin of a prefix or suffix}
@@ -630,10 +699,8 @@ To explain the names chosen, there is nothing like indicating and explaining the
\begin{tdoclatex}[sbs]
-\tdocpre{sup} relates to...
-
-\tdocprewhy{sup.erbe} means...
-
+\tdocpre{sup} relates to... \\
+\tdocprewhy{sup.erbe} means... \\
\emph{\tdocprewhy{sup.er} for...}
\end{tdoclatex}
@@ -648,30 +715,30 @@ To explain the names chosen, there is nothing like indicating and explaining the
It is sometimes useful to render code directly in the documentation. This type of rendering must be dissociable from the explanatory text.
-% ------------------ %
-
-\subsection{With a coloured stripe}
+\subsection{With a coloured stripe} \label{tdoc-color-macros}
\begin{tdocexa} [With default text]
- It can be useful to show a real rendering directly in a document
+ It can be useful to show a real rendering directly in a document.
\footnote{
Typically when making a demo.
- }.
+ }
This is done via \tdocenv{tdocshowcase} as follows.
\tdoclatexinput[code]{examples-showcase-default.tex}
- The result is the following rendering
+
+ The result is the following rendering.
\footnote{
Behind the scenes, the strip is created effortlessly using the \tdocpack{clrstrip} package.
- }.
+ }
+\end{tdocexa}
+
+\input{examples-showcase-default.tex}
- \medskip
- \input{examples-showcase-default.tex}
-\end{tdocexa}
+\smallskip
\begin{tdocrem}
See the section \ref{tdoc-latexshow} on page \pageref{tdoc-latexshow} to easily obtain code followed by its actual rendering as in the previous example.
@@ -679,7 +746,7 @@ It is sometimes useful to render code directly in the documentation. This type o
\begin{tdocnote}
- The explanatory texts adapt to the language chosen when \tdocpack{tutodoc} is loaded.
+ The explanatory texts adapt to the language chosen when \thispack{} is loaded.
\end{tdocnote}
@@ -691,21 +758,43 @@ It is sometimes useful to render code directly in the documentation. This type o
\tdoclatexinput[code]{examples-showcase-customized.tex}
+
This will produce the following.
\medskip
\input{examples-showcase-customized.tex}
+
\end{tdocexa}
\begin{tdocnote}
- You will have noticed that we don't obtain a pure red: behind the scenes, the expandable macros \tdocmacro{tdocbackcolor} and \tdocmacro{tdocdarkcolor} are used to create the background and title colours respectively from the ones proposed in \tdocenv{tdocshowcase}.
- These macros have a single argument, the chosen colour, and accept the following codes.
+ You've probably noticed that red is used as a base to obtain the colors used.
+
+ \begin{itemize}
+ \item The background color is provided by \tdocmacro{tdocbackcolor}.
+
+ \item The color of titles and lines is provided by \tdocmacro{tdocdarkcolor}.
+ \end{itemize}
+
+ These expandable macros accept the following codes.
\begin{tdoclatex}[code]
-\NewExpandableDocumentCommand{\tdocbackcolor}{m}{#1!5}
-\NewExpandableDocumentCommand{\tdocdarkcolor}{m}{#1!50!black}
+% Argument 1 : optionally, the amount of color relative to black can be specified.
+% In general, there's no need to change this setting!
+% Argument 2 : a color in xcolor format.
+\NewExpandableDocumentCommand{\tdocdarkcolor}{O{50}m}{#2!#1!black}
+
+% Argument 1 : optionally, the transparency rate can be specified.
+% In general, there's no need to change this setting!
+% Argument 2 : a color in xcolor format.
+\NewExpandableDocumentCommand{\tdoclightcolor}{O{5}m}{#2!#1}
+ \end{tdoclatex}
+
+ You also have to know that behind the scene, the \tdocmacro{tdocruler} macro is used.
+
+ \begin{tdoclatex}[std]
+ \tdocruler{A decorated pseudo-title}{red}
\end{tdoclatex}
\end{tdocnote}
@@ -718,21 +807,13 @@ It is sometimes useful to render code directly in the documentation. This type o
\tdoclatexinput[code]{examples-showcase-hook.tex}
- This will produce the following.
-
- \medskip
- \input{examples-showcase-hook.tex}
+ This will produce the following.
\end{tdocwarn}
-\begin{tdocnote}
- Behind the scenes, the \tdocmacro{tdocruler} macro is used.
+\input{examples-showcase-hook.tex}
- \begin{tdoclatex}[std]
- \tdocruler{Un pseudo-titre décoré}{red}
- \end{tdoclatex}
-\end{tdocnote}
\subsection{Without a colour strip}
@@ -747,11 +828,13 @@ It is possible not to use a coloured strip, as we will see straight away.
\tdoclatexinput[code]{examples-showcase-no-clrstrip.tex}
+
This will produce the following.
\medskip
\input{examples-showcase-no-clrstrip.tex}
+
\end{tdocexa}
@@ -763,11 +846,13 @@ It is possible not to use a coloured strip, as we will see straight away.
\tdoclatexinput[code]{examples-showcase-no-clrstrip-customized.tex}
+
This will produce the following.
\medskip
\input{examples-showcase-no-clrstrip-customized.tex}
+
\end{tdocexa}
@@ -776,13 +861,14 @@ It is possible not to use a coloured strip, as we will see straight away.
To obtain renderings by importing the code from an external file, instead of typing it, simply use the \tdocmacro{tdocshowcaseinput} macro whose option uses the syntax of that of \tdocenv{tdocshowcase} and the mandatory argument corresponds to the path of the file.
-\begin{tdocexa}<nonb>
+\begin{tdocexa}
The following was obtained via \tdocinlatex+\tdocshowcaseinput{external.tex}+.
\medskip
\tdocshowcaseinput{examples-showcase-external.tex}
+
\medskip
As for \tdocinlatex+\tdocshowcaseinput[color = orange]{external.tex}+\,, this will produce the colour change shown below.
@@ -790,15 +876,22 @@ To obtain renderings by importing the code from an external file, instead of typ
\medskip
\tdocshowcaseinput[color = orange]{examples-showcase-external.tex}
+
\end{tdocexa}
\section{Use cases in \LaTeX}
-Documenting a package or a class is done efficiently using use cases showing both the code and the corresponding result.
+Documenting a package or class is best done through use cases showing both the code and the corresponding result.
+\footnote{
+ Code is formatted using the \tdocpack{minted} package.
+}
-% ------------------ %
+\begin{tdoccaut}
+ Version 3 of \tdocpack{minted} cannot be used at the moment, as it contains bugs: see \url{https://github.com/gpoore/minted/issues/401}. We therefore force the use of version 2 of minted.
+
+\end{tdoccaut}
\subsection{\tdocquote{Inline} codes} \label{tdoc-listing-inline}
@@ -822,7 +915,7 @@ Here are some examples.
The \tdocmacro{tdocinlatex} macro can be used in a footnote: see below.
\footnote{
\tdocinlatex+$minted = TOP$+ has been typed \tdocinlatex|\tdocinlatex+$minted = TOP$+| in this footnote...
- }.
+ }
In addition, a background color is deliberately used to subtly highlight the codes \tdocinlatex#\LaTeX#\,.
\end{tdocnote}
@@ -835,6 +928,7 @@ Here are some examples.
\begin{tdocexa}[Side by side]
Using \tdocenv[{[sbs]}]{tdoclatex}, we can display a code and its rendering side by side.
\tdocdocbasicinput{examples-listing-ABC.tex}
+
\end{tdocexa}
@@ -842,10 +936,10 @@ Here are some examples.
\begin{tdocexa}[Following]
- \tdocenv{tdoclatex} produces the following result, which corresponds to the default option \tdocinlatex#std#
+ \tdocenv{tdoclatex} produces the following result, which corresponds to the default option \tdocinlatex#std#\,.
\footnote{
\tdocinlatex{std} refers to the \tdocquote{standard} behaviour of \tdocpack{tcolorbox} in relation to the \tdocpack{minted} library.
- }.
+ }
\begin{tdoclatex}
$A = B + C$
@@ -872,10 +966,12 @@ Here are some examples.
With default formatting, if the code begins with an opening bracket, the default option must be explicitly indicated.
\tdocdocbasicinput{examples-listing-strange.tex}
+
\smallskip
Another method is to use the \tdocmacro{string} primitive.
\tdocdocbasicinput{examples-listing-strange-bis.tex}
+
\end{tdocwarn}
@@ -885,9 +981,10 @@ For the following codes, consider a file with the relative path \verb+examples-l
\tdoclatexinput[code]{examples-listing-xyz.tex}
+
\medskip
-The \tdocmacro{tdoclatexinput} macro, shown below, expects the path of a file and offers the same options as the \tdocenv{tdoclatex} environment.
+The \tdocmacro{tdoclatexinput} macro, shown below, expects the path of a file and offers the same options as the \tdocenv*{tdoclatex} environment.
% ------------------ %
@@ -898,11 +995,13 @@ The \tdocmacro{tdoclatexinput} macro, shown below, expects the path of a file an
\begin{tdoclatex}[code]
\tdoclatexinput[sbs]{examples-listing-xyz.tex}
+
\end{tdoclatex}
This produces the following layout.
\tdoclatexinput[sbs]{examples-listing-xyz.tex}
+
\end{tdocexa}
@@ -914,11 +1013,13 @@ The \tdocmacro{tdoclatexinput} macro, shown below, expects the path of a file an
\begin{tdoclatex}[code]
\tdoclatexinput{examples-listing-xyz.tex}
+
\end{tdoclatex}
This produces the following formatting where the default option is \tdocinlatex#std#.
\tdoclatexinput{examples-listing-xyz.tex}
+
\end{tdocexa}
@@ -930,11 +1031,13 @@ The \tdocmacro{tdoclatexinput} macro, shown below, expects the path of a file an
\begin{tdoclatex}[code]
\tdoclatexinput[code]{examples-listing-xyz.tex}
+
\end{tdoclatex}
This produces the following layout.
\tdoclatexinput[code]{examples-listing-xyz.tex}
+
\end{tdocexa}
@@ -950,12 +1053,13 @@ The \tdocmacro{tdoclatexinput} macro, shown below, expects the path of a file an
\begin{tdoc-doc-showcase}
\tdoclatexshow{examples-listing-xyz.tex}
+
\end{tdoc-doc-showcase}
\end{tdocexa}
\begin{tdocnote}
- The default texts take into account the language chosen when loading the package \tdocpack{tutodoc}.
+ The default texts take into account the language chosen when loading the package \thispack{}.
\end{tdocnote}
@@ -969,6 +1073,7 @@ The \tdocmacro{tdoclatexinput} macro, shown below, expects the path of a file an
\begin{tdoc-doc-showcase}
\tdoclatexshow[explain = Here is the actual rendering.]{examples-listing-xyz.tex}
+
\end{tdoc-doc-showcase}
\end{tdocexa}
@@ -977,13 +1082,14 @@ The \tdocmacro{tdoclatexinput} macro, shown below, expects the path of a file an
\begin{tdocexa}[The options available]
- In addition to the explanatory text, it is also possible to use all the options of \tdocenv{tdocshowcase}, see \ref{tdoc-showcase} page \pageref{tdoc-showcase}.
+ In addition to the explanatory text, it is also possible to use all the options of \tdocenv*{tdocshowcase} environment, see \ref{tdoc-showcase} page \pageref{tdoc-showcase}.
Here is an example to illustrate this.
\medskip
\tdoclatexinput[code]{examples-listing-latexshow-options.tex}
+
\medskip
This will produce the following.
@@ -992,6 +1098,7 @@ The \tdocmacro{tdoclatexinput} macro, shown below, expects the path of a file an
\begin{tdoc-doc-showcase}
\input{examples-listing-latexshow-options.tex}
+
\end{tdoc-doc-showcase}
\end{tdocexa}
@@ -1001,8 +1108,6 @@ The \tdocmacro{tdoclatexinput} macro, shown below, expects the path of a file an
To make it easier to monitor a package, it is essential to provide a history indicating the changes made when a new version is published.
-% ------------------ %
-
\subsection{When?}
@@ -1016,6 +1121,7 @@ You can either date something, or version it, in which case the version number c
The \tdocmacro{tdocdate} macro is used to indicate a date in the margin, as in the following example.
\tdoclatexshow{examples-version-n-change-dating.tex}
+
\end{tdocexa}
@@ -1026,18 +1132,17 @@ You can either date something, or version it, in which case the version number c
Associating a version number with a new feature is done using the \tdocmacro{tdocversion} macro, with the colour and date being optional arguments.
\tdoclatexshow{examples-version-n-change-versioning.tex}
-\end{tdocexa}
+\end{tdocexa}
-\begin{tdocimportant}
- \leavevmode
+\begin{tdocimp}
\begin{enumerate}
\item The \tdocmacro{tdocdate} and \tdocmacro{tdocversion} macros require two compilations.
- \item The final rendering of the dates takes into account the language specified when loading the package \tdocpack{tutodoc}: for example, if French is selected, the dates will be displayed in the format \texttt{DD/MM/YYYY}.
+ \item The final rendering of the dates takes into account the language specified when loading the package \thispack{}: for example, if French is selected, the dates will be displayed in the format \texttt{DD/MM/YYYY}.
\end{enumerate}
-\end{tdocimportant}
+\end{tdocimp}
\begin{tdocwarn}
@@ -1051,17 +1156,36 @@ You can either date something, or version it, in which case the version number c
\subsection{What's new?}
-\tdocpack{tutodoc} offers different environments to indicate quickly and clearly what has been done
+\thispack{} offers the macro \tdocmacro{tdocstartproj} and different environments to indicate quickly and clearly what has been done during the latest changes.%
\footnote{
The user doesn't need all the technical details.
}
-during the latest changes.
+
+
+\begin{tdocnote}
+ For icons, see the note at the beginning of the section \ref{tdoc-colorful-focus} page \pageref{tdoc-colorful-focus}.
+\end{tdocnote}
+
+
+% ------------------ %
+
+
+\begin{tdocexa}[Just for the very first version]
+ \leavevmode
+
+ \tdoclatexinput[sbs]{examples-version-n-change-first.tex}
+
+\end{tdocexa}
+
+
+% ------------------ %
\begin{tdocexa}[For new features]
\leavevmode
\tdoclatexinput[sbs]{examples-version-n-change-new.tex}
+
\end{tdocexa}
@@ -1072,6 +1196,7 @@ during the latest changes.
\leavevmode
\tdoclatexinput[sbs]{examples-version-n-change-update.tex}
+
\end{tdocexa}
@@ -1082,6 +1207,7 @@ during the latest changes.
\leavevmode
\tdoclatexinput[sbs]{examples-version-n-change-break.tex}
+
\end{tdocexa}
@@ -1092,6 +1218,7 @@ during the latest changes.
\leavevmode
\tdoclatexinput[sbs]{examples-version-n-change-pb.tex}
+
\end{tdocexa}
@@ -1102,22 +1229,35 @@ during the latest changes.
\leavevmode
\tdoclatexinput[sbs]{examples-version-n-change-fix.tex}
+
+\end{tdocexa}
+
+
+% ------------------ %
+
+
+\begin{tdocexa}[Selectable themes with an icon]
+ \leavevmode
+
+ \tdoclatexinput[sbs]{examples-version-n-change-user-choice-icon.tex}
+
\end{tdocexa}
% ------------------ %
-\begin{tdocexa}[Chosen topics]
+\begin{tdocexa}[Selectable themes without icons]
\leavevmode
\tdoclatexinput[sbs]{examples-version-n-change-user-choice.tex}
+
\end{tdocexa}
\section{Ornaments}
-Let's finish this documentation with a few small formatting tools that can be very useful.
+Let's finish this documentation with a small formatting tool that is very useful.
\begin{tdoclatex}[sbs]
@@ -1129,72 +1269,161 @@ This works with enumerations.
\begin{itemize}
\item Underline.
-
- \item Something else useful.
\end{itemize}
\tdocsep % Uniform behaviour.
Ble, ble, ble...
+\end{tdoclatex}
-Bli, bli, bli...
-\tdocxspace % Subtle space
- % but useful.
+\section{History}
-Blo, blo, blo...
+\small
-Blu, blu, blu...
+\tdocversion{1.4.0}[2024-09-28]
+
+\begin{tdocbreak}
+ \item The \tdocenv*{tdoccaution} environment has been renamed \tdocenv*{tdoccaut} for simplified input.
+
+ \item Content highlighting: examples and remarks, indicated via the \tdocenv*{tdocexa} and \tdocenv*{tdocrem} environments, are always numbered, and share the same counter.
+
+ \item The unused macro \tdocmacro{tdocxspace} has been deleted.
+\end{tdocbreak}
+
+
+\begin{tdocnew}
+ \item Change log: the \tdocmacro{tdocstartproj} macro is used to manage the case of the first public version.
+
+ \item Code factorization: the \tdocmacro{tdocicon} macro is responsible for adding icons in front of text.
+\end{tdocnew}
+
+
+\begin{tdocupdate}
+ \item Colors: the \tdocmacro{tdocdarkcolor} and \tdocmacro{tdoclightcolor} macros offer an optional argument.
+ \begin{enumerate}
+ \item \tdocmacro{tdocdarkcolor} : the amount of color in relation to black can be optionally defined.
+
+ \item \tdocmacro{tdoclightcolor} : the transparency rate can be optionally defined.
+ \end{enumerate}
+
+ \item Content highlighting: reduced space around content in colored frames.
+
+ \item Versioning: better vertical spacing thanks to \tdocmacro{vphantom}.
+\end{tdocupdate}
+
+\tdocsep
+
+
+% ------------------ %
+
+
+\tdocversion{1.3.1}[2024-09-26]
+
+\begin{tdocnew}
+ \item Star version of \tdocmacro{tdocenv} to display only the environment name.
+\end{tdocnew}
+
+\tdocsep
+
+
+% ------------------ %
+
+
+\tdocversion{1.3.0}[2024-09-25]
+
+\begin{tdocprob}
+ \item Version 3 of \tdocpack{minted} cannot be used for the moment as it contains bugs: see \url{https://github.com/gpoore/minted/issues/401}. We therefore force the use of version 2 of \tdocpack{minted}.
+\end{tdocprob}
+
+
+\begin{tdocbreak}
+ \item The \tdocenv*{tdocimportant} environment has been renamed \tdocenv*{tdocimp} for simplified input.
+\end{tdocbreak}
+
+
+\begin{tdocnew}
+ \item Change log: proposed environments use icons.
+
+
+ \item Content highlighting: colored frames with icons are proposed for the following environments.
+ \bgroup
+ \setlength\multicolsep{5pt}
+ \begin{multicols}{3}
+ \begin{enumerate}[topsep=0pt]
+ \item \tdocenv*{tdoccaution}
+ \item \tdocenv*{tdocimp}
+ \item \tdocenv*{tdocnote}
+ \item \tdocenv*{tdoctip}
+ \item \tdocenv*{tdocwarn}
+ \end{enumerate}
+ \end{multicols}
+ \egroup
+\end{tdocnew}
+
+\tdocsep
+
+
+% ------------------ %
-\end{tdoclatex}
-\section{History}
\tdocversion{1.2.0-a}[2024-08-23]
\begin{tdocupdate}
- \item \tdocmacro{tdocversion}
+ \item \tdocmacro{tdocversion}
\begin{enumerate}
- \item The version number is above the date.
+ \item The version number is above the date.
- \item The spacing is better managed when the date is absent.
+ \item The spacing is better managed when the date is absent.
\end{enumerate}
\end{tdocupdate}
\begin{tdocfix}
- \item Content highlighting: the French translations of \tdocinEN*{caution} and \tdocinEN*{danger} were incorrect.
+ \item Content highlighting: the French translations of \tdocinEN*{caution} and \tdocinEN*{danger} were incorrect.
\end{tdocfix}
\tdocsep
+
+% ------------------ %
+
+
\tdocversion{1.1.0}[2024-01-06]
\begin{tdocnew}
- \item Change log : two new environments.
+ \item Change log : two new environments.
\begin{enumerate}
\item \tdocenv{tdocbreak} for breaking changes which are not backward compatible.
\item \tdocenv{tdocprob} for identified problems.
\end{enumerate}
- \item \tdocmacro{tdocinlatex}: a light yellow is used as the background color.
+ \item \tdocmacro{tdocinlatex}: a light yellow is used as the background color.
\end{tdocnew}
\tdocsep
+
+% ------------------ %
+
+
\tdocversion{1.0.1}[2023-12-08]
\begin{tdocfix}
- \item \tdocmacro{tdocenv}: spacing is now correct, even if the \tdocpack{babel} package is not loaded with the French language.
+ \item \tdocmacro{tdocenv}: spacing is now correct, even if the \tdocpack{babel} package is not loaded with the French language.
- \item \tdocenv[{[nostripe]}]{tdocshowcase}: page breaks around \tdocquote{framing} lines should be rare from now on.
+ \item \tdocenv[{[nostripe]}]{tdocshowcase}: page breaks around \tdocquote{framing} lines should be rare from now on.
\end{tdocfix}
\tdocsep
-\tdocversion{1.0.0}[2023-11-29]
-First public version of the project.
+% ------------------ %
+
+
+\tdocversion{1.0.0}[2023-11-29]
+\tdocstartproj{First public version of the project.}
\end{document}
diff --git a/macros/latex/contrib/tutodoc/doc/tutodoc-fr.pdf b/macros/latex/contrib/tutodoc/doc/tutodoc-fr.pdf
index 070a6b3f5a..1ef6d23a79 100644
--- a/macros/latex/contrib/tutodoc/doc/tutodoc-fr.pdf
+++ b/macros/latex/contrib/tutodoc/doc/tutodoc-fr.pdf
Binary files differ
diff --git a/macros/latex/contrib/tutodoc/doc/tutodoc-fr.tex b/macros/latex/contrib/tutodoc/doc/tutodoc-fr.tex
index 011e390f25..a51fa2df4b 100644
--- a/macros/latex/contrib/tutodoc/doc/tutodoc-fr.tex
+++ b/macros/latex/contrib/tutodoc/doc/tutodoc-fr.tex
@@ -1,34 +1,110 @@
+% ==================== %
+% == RESOURCES USED == %
+% ==================== %
-% -------------------- %
-% -- RESOURCES USED -- %
-% -------------------- %
+\begin{filecontents*}[overwrite]{examples-version-n-change-dating.tex}
+Bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla...
-\begin{filecontents*}[overwrite]{examples-focus-exa.tex}
-Bla, bla, bla...
+\medskip % ATTENTION ! Ceci évite le chevauchement.
-\begin{tdocexa}
- Ble, ble, ble...
-\end{tdocexa}
+\tdocdate{2023-09-24}
-\begin{tdocexa}[Magnifique]
- Bli, bli, bli...
-\end{tdocexa}
+Ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble...
-\begin{tdocexa}<nonb>
- Blo, blo, blo...
-\end{tdocexa}
+\medskip % ATTENTION ! Ceci évite le chevauchement.
-\begin{tdocexa}<nonb>[Superbe]
- Blu, blu, blu...
-\end{tdocexa}
+\tdocdate[gray]{2020-05-08}
+
+Bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli...
+
+Blo, blo, blo, blo, blo, blo, blo, blo, blo, blo, blo, blo, blo...
+
+Blu, blu, blu, blu, blu, blu, blu, blu, blu, blu, blu, blu, blu...
+\end{filecontents*}
+
+
+\begin{filecontents*}[overwrite]{examples-version-n-change-user-choice-icon.tex}
+\begin{tdoctopic}{Ne pas regarder}[\faEyeSlash]
+% Une icône venant de fontawesome5.
+ \item Info 1...
+ \item Info 2...
+\end{tdoctopic}
+\end{filecontents*}
+
+
+\begin{filecontents*}[overwrite]{examples-version-n-change-user-choice.tex}
+\begin{tdoctopic}{La fin des icônes}
+ \item Info 1...
+ \item Info 2...
+\end{tdoctopic}
+\end{filecontents*}
+
+
+\begin{filecontents*}[overwrite]{examples-version-n-change-update.tex}
+\begin{tdocupdate}
+ \item Info 1...
+ \item Info 2...
+\end{tdocupdate}
+\end{filecontents*}
+
+
+\begin{filecontents*}[overwrite]{examples-version-n-change-versioning.tex}
+\tdocversion[red]{10.2.0-beta}[2023-12-01]
+
+Bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla...
+
+\bigskip % ATTENTION ! Ceci évite le chevauchement.
+
+\tdocversion{10.2.0-alpha}
+
+Ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble,
+ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble,
+ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble,
+ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble...
+\end{filecontents*}
+
+
+\begin{filecontents*}[overwrite]{examples-version-n-change-first.tex}
+\tdocstartproj{Première version du projet.}
+\end{filecontents*}
+
+
+\begin{filecontents*}[overwrite]{examples-version-n-change-break.tex}
+\begin{tdocbreak}
+ \item Info 1...
+ \item Info 2...
+\end{tdocbreak}
+\end{filecontents*}
+
+
+\begin{filecontents*}[overwrite]{examples-version-n-change-pb.tex}
+\begin{tdocprob}
+ \item Info 1...
+ \item Info 2...
+\end{tdocprob}
+\end{filecontents*}
+
+
+\begin{filecontents*}[overwrite]{examples-version-n-change-new.tex}
+\begin{tdocnew}
+ \item Info 1...
+ \item Info 2...
+\end{tdocnew}
+\end{filecontents*}
+
+
+\begin{filecontents*}[overwrite]{examples-version-n-change-fix.tex}
+\begin{tdocfix}
+ \item Info 1...
+ \item Info 2...
+\end{tdocfix}
\end{filecontents*}
\begin{filecontents*}[overwrite]{examples-focus-exa-leavevmode.tex}
\begin{tdocexa}
\leavevmode
-
\begin{enumerate}
\item Point 1.
@@ -38,25 +114,14 @@ Bla, bla, bla...
\end{filecontents*}
-\begin{filecontents*}[overwrite]{examples-focus-rmk.tex}
-\begin{tdocrem}
- Juste une remarque...
-\end{tdocrem}
-
-\begin{tdocrem}[Mini titre]
- Utile ?
-\end{tdocrem}
-\end{filecontents*}
-
-
-\begin{filecontents*}[overwrite]{examples-focus-tip.tex}
-\begin{tdoctip}
- Une astuce.
-\end{tdoctip}
+\begin{filecontents*}[overwrite]{examples-focus-important.tex}
+\begin{tdocimp}
+ Un truc important sans danger.
+\end{tdocimp}
-\begin{tdoctip}[Mini titre]
+\begin{tdocimp}[Mini titre]
Utile ?
-\end{tdoctip}
+\end{tdocimp}
\end{filecontents*}
@@ -71,25 +136,25 @@ Bla, bla, bla...
\end{filecontents*}
-\begin{filecontents*}[overwrite]{examples-focus-important.tex}
-\begin{tdocimportant}
- Un truc important sans danger.
-\end{tdocimportant}
+\begin{filecontents*}[overwrite]{examples-focus-caution.tex}
+\begin{tdoccaut}
+ Prudence, prudence...
+\end{tdoccaut}
-\begin{tdocimportant}[Mini titre]
+\begin{tdoccaut}[Mini titre]
Utile ?
-\end{tdocimportant}
+\end{tdoccaut}
\end{filecontents*}
-\begin{filecontents*}[overwrite]{examples-focus-caution.tex}
-\begin{tdoccaution}
- Prudence, prudence...
-\end{tdoccaution}
+\begin{filecontents*}[overwrite]{examples-focus-tip.tex}
+\begin{tdoctip}
+ Une astuce.
+\end{tdoctip}
-\begin{tdoccaution}[Mini titre]
+\begin{tdoctip}[Mini titre]
Utile ?
-\end{tdoccaution}
+\end{tdoctip}
\end{filecontents*}
@@ -104,52 +169,34 @@ Bla, bla, bla...
\end{filecontents*}
-\begin{filecontents*}[overwrite]{examples-showcase-default.tex}
-\begin{tdocshowcase}
- \bfseries Un peu de code \LaTeX.
-
- \bigskip
-
- \emph{\large Fin de l'affreuse démo.}
-\end{tdocshowcase}
-\end{filecontents*}
-
-
-\begin{filecontents*}[overwrite]{examples-showcase-customized.tex}
-\begin{tdocshowcase}[before = Mon début,
- after = Ma fin à moi,
- color = red]
- Bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla...
-\end{tdocshowcase}
-\end{filecontents*}
-
+\begin{filecontents*}[overwrite]{examples-focus-exa.tex}
+\begin{tdocexa}
+ Un exemple...
+\end{tdocexa}
-\begin{filecontents*}[overwrite]{examples-showcase-hook.tex}
-\begin{tdocshowcase}
- \string[Cela fonctionne...]
-\end{tdocshowcase}
+\begin{tdocexa}[Mini titre]
+ Utile ?
+\end{tdocexa}
\end{filecontents*}
-\begin{filecontents*}[overwrite]{examples-showcase-no-clrstrip.tex}
-\begin{tdocshowcase}[nostripe]
- Bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla...
-\end{tdocshowcase}
-\end{filecontents*}
-
+\begin{filecontents*}[overwrite]{examples-focus-rmk.tex}
+\begin{tdocrem}
+ Juste une remarque...
+\end{tdocrem}
-\begin{filecontents*}[overwrite]{examples-showcase-no-clrstrip-customized.tex}
-\begin{tdocshowcase}[nostripe,
- before = Mon début,
- after = Ma fin à moi,
- color = green]
- Bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla...
-\end{tdocshowcase}
+\begin{tdocrem}[Mini titre]
+ Utile ?
+\end{tdocrem}
\end{filecontents*}
-\begin{filecontents*}[overwrite]{examples-showcase-external.tex}
-Blablobli, blablobli, blablobli, blablobli, blablobli, blablobli...
+\begin{filecontents*}[overwrite]{examples-listing-latexshow-options.tex}
+\tdoclatexshow[explain = Ce qui vient est coloré...,
+ before = Rendu ci-après.,
+ after = Rendu fini.,
+ color = orange]
+ {examples-listing-xyz.tex}
\end{filecontents*}
@@ -160,6 +207,12 @@ Blablobli, blablobli, blablobli, blablobli, blablobli, blablobli...
\end{filecontents*}
+\begin{filecontents*}[overwrite]{examples-listing-xyz.tex}
+% Juste une démo.
+$x y z = 1$
+\end{filecontents*}
+
+
\begin{filecontents*}[overwrite]{examples-listing-strange.tex}
\begin{tdoclatex}[std]
[Étrange... Ou pas !]
@@ -174,110 +227,58 @@ Blablobli, blablobli, blablobli, blablobli, blablobli, blablobli...
\end{filecontents*}
-\begin{filecontents*}[overwrite]{examples-listing-xyz.tex}
-% Juste une démo.
-$x y z = 1$
-\end{filecontents*}
-
-
-\begin{filecontents*}[overwrite]{examples-listing-latexshow-options.tex}
-\tdoclatexshow[explain = Ce qui vient est coloré...,
- before = Rendu ci-après.,
- after = Rendu fini.,
- color = orange]
- {examples-listing-xyz.tex}
-\end{filecontents*}
-
-
-\begin{filecontents*}[overwrite]{examples-version-n-change-dating.tex}
-Bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla...
-
-\medskip % ATTENTION ! Ceci évite le chevauchement.
-
-\tdocdate{2023-09-24}
-
-Ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble...
-
-\medskip % ATTENTION ! Ceci évite le chevauchement.
-
-\tdocdate[gray]{2020-05-08}
-
-Bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli...
-
-Blo, blo, blo, blo, blo, blo, blo, blo, blo, blo, blo, blo, blo...
-
-Blu, blu, blu, blu, blu, blu, blu, blu, blu, blu, blu, blu, blu...
-\end{filecontents*}
-
-
-\begin{filecontents*}[overwrite]{examples-version-n-change-versioning.tex}
-\tdocversion[red]{10.2.0-beta}[2023-12-01]
-
-Bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla...
-
-\bigskip % ATTENTION ! Ceci évite le chevauchement.
-
-\tdocversion{10.2.0-alpha}
-
-Ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble,
-ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble,
-ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble,
-ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble...
+\begin{filecontents*}[overwrite]{examples-showcase-customized.tex}
+\begin{tdocshowcase}[before = Mon début,
+ after = Ma fin à moi,
+ color = red]
+ Bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla...
+\end{tdocshowcase}
\end{filecontents*}
-\begin{filecontents*}[overwrite]{examples-version-n-change-new.tex}
-\begin{tdocnew}
- \item Info 1...
- \item Info 2...
-\end{tdocnew}
+\begin{filecontents*}[overwrite]{examples-showcase-hook.tex}
+\begin{tdocshowcase}
+ \string[Cela fonctionne...]
+\end{tdocshowcase}
\end{filecontents*}
-\begin{filecontents*}[overwrite]{examples-version-n-change-update.tex}
-\begin{tdocupdate}
- \item Info 1...
- \item Info 2...
-\end{tdocupdate}
+\begin{filecontents*}[overwrite]{examples-showcase-no-clrstrip-customized.tex}
+\begin{tdocshowcase}[nostripe,
+ before = Mon début,
+ after = Ma fin à moi,
+ color = green]
+ Bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla...
+\end{tdocshowcase}
\end{filecontents*}
-\begin{filecontents*}[overwrite]{examples-version-n-change-break.tex}
-\begin{tdocbreak}
- \item Info 1...
- \item Info 2...
-\end{tdocbreak}
+\begin{filecontents*}[overwrite]{examples-showcase-external.tex}
+Blablobli, blablobli, blablobli, blablobli, blablobli, blablobli...
\end{filecontents*}
-\begin{filecontents*}[overwrite]{examples-version-n-change-pb.tex}
-\begin{tdocprob}
- \item Info 1...
- \item Info 2...
-\end{tdocprob}
-\end{filecontents*}
+\begin{filecontents*}[overwrite]{examples-showcase-default.tex}
+\begin{tdocshowcase}
+ \bfseries Un peu de code \LaTeX.
+ \bigskip
-\begin{filecontents*}[overwrite]{examples-version-n-change-fix.tex}
-\begin{tdocfix}
- \item Info 1...
- \item Info 2...
-\end{tdocfix}
+ \emph{\large Fin de l'affreuse démo.}
+\end{tdocshowcase}
\end{filecontents*}
-\begin{filecontents*}[overwrite]{examples-version-n-change-user-choice.tex}
-\begin{tdoctopic}{C'est mon choix}
-% Ici le point s'impose.
- \item Info 1...
- \item Info 2...
-\end{tdoctopic}
+\begin{filecontents*}[overwrite]{examples-showcase-no-clrstrip.tex}
+\begin{tdocshowcase}[nostripe]
+ Bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla...
+\end{tdocshowcase}
\end{filecontents*}
-% ------------------------ %
-% -- SOURCE FOR THE DOC -- %
-% ------------------------ %
+% ======================== %
+% == SOURCE FOR THE DOC == %
+% ======================== %
\documentclass[10pt, a4paper]{article}
@@ -289,6 +290,10 @@ ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble...
\usepackage{enumitem}
\frenchsetup{StandardItemLabels=true}
+\usepackage{multicol}
+
+\newcommand\thispack{\tdocpack{tutodoc}}
+
% Package documented.
\usepackage[lang = french]{tutodoc}
@@ -336,57 +341,71 @@ ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble...
}
-
\begin{document}
+
\title{Le package \texttt{tutodoc} - Documentation de type tutoriel}
\author{Christophe BAL}
-\date{23 Août 2024 - Version 1.2.0-a}
+\date{28 sept. 2024 - Version 1.4.0}
\maketitle
\begin{abstract}
-Le package \tdocpack{tutodoc}
-\footnote{
- Le nom vient de \tdocquote{\tdocprewhy{tuto.rial-type} \tdocprewhy{doc.umentation}} se traduit en \tdocquote{documentation de type tutoriel}.
-}
-est utilisé par son auteur pour produire de façon sémantique des documentations de packages et de classes \LaTeX\ dans un style de type tutoriel
-\footnote{
- L'idée est de produire un fichier \texttt{PDF} efficace à parcourir pour des besoins ponctuels. C'est généralement ce que l'on attend d'une documentation liée au codage.
-},
-et avec un rendu sobre pour une lecture sur écran.
-
-
-\begin{tdocnote}
- Ce package impose un style de mise en forme.
- Dans un avenir plus ou moins proche, \tdocpack{tutodoc} sera sûrement éclaté en une classe et un package.
-\end{tdocnote}
-
-\tdocsep
-
-{\small\itshape
-\textbf{Abstract.}
-The \tdocpack{tutodoc} package
-\footnote{
- The name comes from \tdocquote{\tdocprewhy{tuto.rial-type} \tdocprewhy{doc.umentation}}.
-}
-is used by its author to semantically produce documentation of \LaTeX\ packages and classes in a tutorial style
-\footnote{
- The idea is to produce an efficient \texttt{PDF} file that can be browsed for one-off needs. This is generally what is expected of coding documentation.
-},
-and with a sober rendering for reading on screen.
+ Le package \thispack{}\,%
+ \footnote{
+ Le nom vient de \tdocquote{\tdocprewhy{tuto.rial-type} \tdocprewhy{doc.umentation}} qui se traduit en \tdocquote{documentation de type tutoriel}.
+ }
+ est utilisé par son auteur pour produire de façon sémantique des documentations de packages et de classes \LaTeX\ dans un style de type tutoriel,%
+ \footnote{
+ L'idée est de produire un fichier \texttt{PDF} efficace à parcourir pour des besoins ponctuels. C'est généralement ce que l'on attend d'une documentation liée au codage.
+ }
+ et avec un rendu sobre pour une lecture sur écran.
+ \medskip
-\begin{tdocnote}
- This package imposes a formatting style. In the not-too-distant future, \tdocpack{tutodoc} will probably be split into a class and a package.
-\end{tdocnote}
-}
+ \noindent
+ Deux points importants à noter.
+ \begin{itemize}
+ \item Ce package impose un style de mise en forme. Dans un avenir plus ou moins proche, \thispack{} sera sûrement éclaté en une classe et un package.
+
+ \item Cette documentation est aussi disponible en anglais.
+ \end{itemize}
+
+ \tdocsep
+
+ {\small\itshape
+ \vspace{-5pt}
+ \begin{center}
+ \textbf{Abstract.}
+ \end{center}
+
+ The \thispack{} package\,%
+ \footnote{
+ The name comes from \tdocquote{\tdocprewhy{tuto.rial-type} \tdocprewhy{doc.umentation}}.
+ }
+ is used by its author to semantically produce documentation of \LaTeX\ packages and classes in a tutorial style,%
+ \footnote{
+ The idea is to produce an efficient \texttt{PDF} file that can be browsed for one-off needs. This is generally what is expected of coding documentation.
+ }
+ and with a sober rendering for reading on screen.
+
+ \medskip
+
+ Two important points to note.
+ \begin{itemize}
+ \item This package imposes a formatting style. In the not-too-distant future, \thispack{} will probably be split into a class and a package.
+
+ \item This documentation is also available in French.
+ \end{itemize}
+ }
\end{abstract}
\newpage
\tableofcontents
\newpage
+
+
\section{Mises en forme générales imposées}
\subsection{Géométrie de la page}
@@ -504,7 +523,7 @@ La macro \tdocmacro{tdocinEN} et sa version étoilée s'appuient sur \tdocmacro{
\begin{tdocnote}
- Le texte \tdocquote{en anglais} est traduit dans la langue indiquée lors de l'importation de \tdocpack{tutodoc}.
+ Le texte \tdocquote{en anglais} est traduit dans la langue indiquée lors de l'importation de \thispack{}.
\end{tdocnote}
@@ -513,133 +532,166 @@ La macro \tdocmacro{tdocinEN} et sa version étoilée s'appuient sur \tdocmacro{
\begin{tdocnote}
Les environnements présentés dans cette section
\footnote{
- La mise en forme provient du package \tdocpack{amsthm}.
+ La mise en forme provient du package \tdocpack{keytheorems}.
}
ajoutent un court titre indiquant le type d'informations fournies.
- Ce court texte sera toujours traduit dans la langue indiquée lors du chargement du package \tdocpack{tutodoc}.
+ Ce court texte sera toujours traduit dans la langue indiquée lors du chargement du package \thispack{}.
\end{tdocnote}
+
+\subsection{Du contenu dans le flot de la lecture}
+
+
% ------------------ %
-\subsection{Des exemples}
+\begin{tdocimp}
+ Tous les environnements présentés dans cette section partagent le même compteur.
+\end{tdocimp}
-Des exemples numérotés, ou non, s'indiquent via l'environnement \tdocenv{tdocexa} qui propose deux arguments optionnels.
-\begin{enumerate}
- \item Le 1\ier{} argument entre chevrons \tdocinlatex#<...># peut prendre au choix les valeurs \tdocinlatex#nb# pour numéroter, réglage par défaut, et \tdocinlatex#nonb# pour ne pas numéroter.
+% ------------------ %
- \item Le 2\ieme{} argument entre crochets \tdocinlatex#[...]# sert à ajouter un mini-titre.
-\end{enumerate}
+\subsubsection{Des exemples}
-Voici différents emplois possibles.
+Des exemples numérotés, si besoin, s'indiquent via \tdocenv{tdocexa} qui propose un argument optionnel pour ajouter un mini-titre.
+Voici deux usages possibles.
\tdoclatexinput[sbs]{examples-focus-exa.tex}
+
% ------------------ %
-\begin{tdocimportant}
- La numérotation des exemples est remise à zéro dès qu'une section de niveau au moins égale à une \tdocinlatex|\subsubsection| est ouverte.
-\end{tdocimportant}
+\begin{tdocimp}
+ La numérotation des exemples est remise à zéro dès qu'une section de niveau au moins égale à une \tdocinlatex|\section| est ouverte.
+\end{tdocimp}
% ------------------ %
\begin{tdoctip}
- Il peut parfois être utile de revenir à la ligne dès le début du contenu. Voici comment faire (ce tour de passe-passe reste valable pour les environnements présentés dans les sous-sections suivantes). Noter au passage que la numérotation suit celle de l'exemple précédent comme souhaité.
-
- \tdoclatexinput[sbs]{examples-focus-exa-leavevmode.tex}
+ Il peut parfois être utile de revenir à la ligne dès le début du contenu. Le code suivant montre comment faire (ce tour de passe-passe reste valable pour l'environnement \verb#tdocrem# présenté juste après). Noter au passage que la numérotation suit celle de l'exemple précédent comme souhaité.
\end{tdoctip}
+\tdoclatexinput[sbs]{examples-focus-exa-leavevmode.tex}
+
+
-\subsection{Des remarques}
+%\subsection{Du contenu dans le flot de la lecture}
-Tout se passe via l'environnement \tdocenv{tdocrem} comme dans l'exemple suivant.
+\subsubsection{Des remarques}
+
+Tout se passe via \tdocenv{tdocrem} avec un fonctionnement identique à l'environnement \tdocenv*{tdocexa} comme le montre l'exemple suivant.
\tdoclatexinput[sbs]{examples-focus-rmk.tex}
-\subsection{Une astuce}
-L'environnement \tdocenv{tdoctip} sert à donner des astuces. Voici comment l'employer.
+\subsection{Du contenu tape-à-l'oeil} \label{tdoc-colorful-focus}
+
+\begin{tdocnote}
+ Les icônes sont obtenues via le package \tdocpack{fontawesome5}, et la gestion de l'espacement avec le texte est faite par la macro \tdocmacro{tdocicon}.
+ \footnote{
+ Par exemple,
+ \tdocinlatex|\tdocicon{\faBed}{Fatigué}|
+ produit\,
+ \tdocicon{\faBed}{Fatigué}.
+ }
+\end{tdocnote}
+
+
+\subsubsection{Une astuce}
+
+L'environnement \tdocenv*{tdoctip} sert à donner des astuces. Voici comment l'employer.
\tdoclatexinput[sbs]{examples-focus-tip.tex}
-\subsection{Note informative}
-L'environnement \tdocenv{tdocnote} sert à mettre en avant des informations utiles. Voici comment l'utiliser.
+\smallskip
+
+\begin{tdocnote}
+ Les couleurs sont obtenues via les macros développables \tdocmacro{tdocbackcolor} et \tdocmacro{tdocdarkcolor}.
+ Pour des informations complémentaires à ce sujet, se reporter à la fin de la section \ref{tdoc-color-macros} page \pageref{tdoc-color-macros}.
+\end{tdocnote}
+
+
+%\subsection{Du contenu tape-à-l'oeil}
+
+\subsubsection{Note informative}
+
+L'environnement \tdocenv*{tdocnote} sert à mettre en avant des informations utiles. Voici comment l'utiliser.
\tdoclatexinput[sbs]{examples-focus-note.tex}
-\subsection{Un truc important}
-L'environnement \tdocenv{tdocimportant} permet d'indiquer quelque chose d'important mais sans danger.
+%\subsection{Du contenu tape-à-l'oeil}
+
+\subsubsection{Un truc important}
+
+L'environnement \tdocenv*{tdocimp} permet d'indiquer quelque chose d'important mais sans danger.
\tdoclatexinput[sbs]{examples-focus-important.tex}
-\subsection{Avertir d'un point très délicat}
-L'environnement \tdocenv{tdoccaution} sert à indiquer un point délicat à l'utilisateur. Voici comment l'employer.
+%\subsection{Du contenu tape-à-l'oeil}
-\tdoclatexinput[sbs]{examples-focus-caution.tex}
+\subsubsection{Avertir d'un point très délicat}
+L'environnement \tdocenv*{tdoccaut} sert à indiquer un point délicat à l'utilisateur. Voici comment l'employer.
-\subsection{Avertir d'un danger}
+\tdoclatexinput[sbs]{examples-focus-caution.tex}
-L'environnement \tdocenv{tdocwarn} sert à avertir l'utilisateur d'un piège à éviter. Voici comment l'employer.
-\tdoclatexinput[sbs]{examples-focus-warn.tex}
+%\subsection{Du contenu tape-à-l'oeil}
-\section{Indiquer des packages, des classes, des macros ou des environnements}
+\subsubsection{Avertir d'un danger}
-Voici ce qu'il est possible de taper de façon sémantique.
+L'environnement \tdocenv*{tdocwarn} sert à avertir l'utilisateur d'un piège à éviter. Voici comment l'employer.
+\tdoclatexinput[sbs]{examples-focus-warn.tex}
-\begin{tdoclatex}[sbs]
-\tdoccls{maclasse} sert à...
-\tdocpack{monpackage} est pour...
-\tdocmacro{unemacro} permet de...
+\section{Indiquer des packages, des classes, des macros ou des environnements}
-\tdocenv{env} produit...
+Voici ce qu'il est possible de taper de façon sémantique.
-On a aussi :
-\tdocenv[{[opt1]<opt2>}]{env}
+\begin{tdoclatex}[sbs]
+\tdoccls{maclasse} sert à... \\
+\tdocpack{monpackage} est pour... \\
+\tdocmacro{unemacro} permet de... \\
+\tdocenv{env} produit... \\
+\tdocenv[{[opt1]<opt2>}]{env} \\
+Juste \tdocenv*{env}... \\
+Enfin \tdocenv*[{[opt1]<opt2>}]{env}...
\end{tdoclatex}
\begin{tdocrem}
- L'intérêt des macros précédentes vis à vis de l'usage de \tdocmacro{tdocinlatex}, voir la section \ref{tdoc-listing-inline} page \pageref{tdoc-listing-inline}, est l'absence de coloration.
- De plus, la macro \tdocmacro{tdocenv} demande juste de taper le nom de l'environnement
- \footnote{
- De plus, \tdocinlatex{\tdocenv{monenv}} produit \tdocenv{monenv} avec des espaces afin d'autoriser des retours à la ligne si besoin.
- }
- avec des éventuelles options en tapant les bons délimiteurs
- \footnote{
- Se souvenir que tout est possible ou presque dorénavant.
- }
- à la main.
+ Contrairement à \tdocmacro{tdocinlatex}, les macros \tdocmacro{tdocenv} et \tdocmacro{tdocenv*} ne colorent pas le texte produit.
+ De plus, \tdocinlatex{\tdocenv{monenv}} produit \tdocenv{monenv} avec des espaces afin d'autoriser des retours à la ligne si besoin.
\end{tdocrem}
\begin{tdocwarn}
- L'argument optionnel de la macro \tdocmacro{tdocenv} est copié-collé lors du rendu. Ceci peut donc parfois nécessiter d'utiliser des accolades protectrices comme dans l'exemple précédent.
+ L'argument optionnel de la macro \tdocmacro{tdocenv} est copié-collé
+ \footnote{
+ Se souvenir que tout est possible ou presque dorénavant.
+ }
+ lors du rendu. Ceci peut donc parfois nécessiter d'utiliser des accolades protectrices comme dans l'exemple ci-dessus.
\end{tdocwarn}
-% -------------------- %
-
\section{Origine d'un préfixe ou d'un suffixe}
@@ -647,10 +699,8 @@ Pour expliquer les noms retenus, rien de tel que d'indiquer et expliciter les co
\begin{tdoclatex}[sbs]
-\tdocpre{sup} est relatif à...
-
-\tdocprewhy{sup.erbe} signifie...
-
+\tdocpre{sup} est relatif à... \\
+\tdocprewhy{sup.erbe} signifie... \\
\emph{\tdocprewhy{sup.er} pour...}
\end{tdoclatex}
@@ -665,10 +715,8 @@ Pour expliquer les noms retenus, rien de tel que d'indiquer et expliciter les co
Il est parfois utile d'obtenir directement le rendu d'un code dans la documentation. Ceci nécessite que ce type de rendu soit dissociable du texte donnant des explications.
-% ------------------ %
-
-\subsection{Avec une bande colorée}
+\subsection{Avec une bande colorée} \label{tdoc-color-macros}
\begin{tdocexa}[Avec les textes par défaut]
Il peut être utile de montrer un rendu réel directement dans un document.
@@ -679,6 +727,7 @@ Il est parfois utile d'obtenir directement le rendu d'un code dans la documentat
\tdoclatexinput[code]{examples-showcase-default.tex}
+
On obtient alors le rendu suivant.
\footnote{
En coulisse, la bande est créée sans effort grâce au package \tdocpack{clrstrip}.
@@ -687,6 +736,7 @@ Il est parfois utile d'obtenir directement le rendu d'un code dans la documentat
\medskip
\input{examples-showcase-default.tex}
+
\end{tdocexa}
@@ -696,7 +746,7 @@ Il est parfois utile d'obtenir directement le rendu d'un code dans la documentat
\begin{tdocnote}
- Les textes explicatifs s'adaptent à la langue choisie lors du chargement de \tdocpack{tutodoc}.
+ Les textes explicatifs s'adaptent à la langue choisie lors du chargement de \thispack{}.
\end{tdocnote}
@@ -708,21 +758,44 @@ Il est parfois utile d'obtenir directement le rendu d'un code dans la documentat
\tdoclatexinput[code]{examples-showcase-customized.tex}
+
Ceci produira ce qui suit.
\medskip
\input{examples-showcase-customized.tex}
+
\end{tdocexa}
\begin{tdocnote}
- Vous avez sûrement noté que l'on n'obtient pas un rouge pur : en coulisse les macros développables \tdocmacro{tdocbackcolor} et \tdocmacro{tdocdarkcolor} sont utilisées pour créer celles du fond et des titres respectivement à partir de la couleur proposée à \tdocenv{tdocshowcase}.
- Ces macros à un seul argument, la couleur choisie, admettent les codes suivants.
+ Vous avez sûrement remarqué que le rouge sert de base pour obtenir les couleurs utilisées.
+
+ \begin{itemize}
+ \item La couleur de fond est fournie par \tdocmacro{tdocbackcolor}.
+
+ \item La couleur des titres et des lignes est fournie par \tdocmacro{tdocdarkcolor}.
+ \end{itemize}
+
+ Ces macros développables admettent les codes suivants.
\begin{tdoclatex}[code]
-\NewExpandableDocumentCommand{\tdocbackcolor}{m}{#1!5}
-\NewExpandableDocumentCommand{\tdocdarkcolor}{m}{#1!50!black}
+% Argument 1 : de façon optionnelle, on peut indiquer la quantité de couleur
+% relativement au noir.
+% Il est en général inutile de modifier ce paramètre !
+% Argument 2 : une couleur au format xcolor.
+\NewExpandableDocumentCommand{\tdocdarkcolor}{O{50}m}{#2!#1!black}
+
+% Argument 1 : de façon optionnelle, on peut indiquer le taux de transparence.
+% Il est en général inutile de modifier ce paramètre !
+% Argument 2 : une couleur au format xcolor.
+\NewExpandableDocumentCommand{\tdoclightcolor}{O{5}m}{#2!#1}
+ \end{tdoclatex}
+
+ Il faut également savoir qu'en coulisse, la macro \tdocmacro{tdocruler} est utilisée.
+
+ \begin{tdoclatex}[std]
+ \tdocruler{Un pseudo-titre décoré}{red}
\end{tdoclatex}
\end{tdocnote}
@@ -735,21 +808,12 @@ Il est parfois utile d'obtenir directement le rendu d'un code dans la documentat
\tdoclatexinput[code]{examples-showcase-hook.tex}
- Ceci produira ce qui suit.
-
- \medskip
- \input{examples-showcase-hook.tex}
+ Ceci produira ce qui suit.
\end{tdocwarn}
+\input{examples-showcase-hook.tex}
-\begin{tdocnote}
- Il faut savoir qu'en coulisse la macro \tdocmacro{tdocruler} est utilisée.
-
- \begin{tdoclatex}[std]
- \tdocruler{Un pseudo-titre décoré}{red}
- \end{tdoclatex}
-\end{tdocnote}
\subsection{Sans bande colorée}
@@ -764,11 +828,13 @@ Il est possible de ne pas utiliser une bande colorée comme nous allons le voir
\tdoclatexinput[code]{examples-showcase-no-clrstrip.tex}
+
Ceci produira ce qui suit.
\medskip
\input{examples-showcase-no-clrstrip.tex}
+
\end{tdocexa}
@@ -780,11 +846,13 @@ Il est possible de ne pas utiliser une bande colorée comme nous allons le voir
\tdoclatexinput[code]{examples-showcase-no-clrstrip-customized.tex}
+
Ceci produira ce qui suit.
\medskip
\input{examples-showcase-no-clrstrip-customized.tex}
+
\end{tdocexa}
@@ -793,13 +861,14 @@ Il est possible de ne pas utiliser une bande colorée comme nous allons le voir
Pour obtenir des rendus en important le code depuis un fichier externe, au lieu de le taper, il suffit d'employer la macro \tdocmacro{tdocshowcaseinput} dont l'option reprend la syntaxe de celle de \tdocenv{tdocshowcase} et l'argument obligatoire correspond au chemin du fichier.
-\begin{tdocexa}<nonb>
+\begin{tdocexa}
Ce qui suit a été obtenu via \tdocinlatex+\tdocshowcaseinput{external.tex}+.
\medskip
\tdocshowcaseinput{examples-showcase-external.tex}
+
\medskip
Quant à \tdocinlatex+\tdocshowcaseinput[color = orange]{external.tex}+\,, ceci produira le changement de couleur observable ci-après.
@@ -807,15 +876,21 @@ Pour obtenir des rendus en important le code depuis un fichier externe, au lieu
\medskip
\tdocshowcaseinput[color = orange]{examples-showcase-external.tex}
+
\end{tdocexa}
\section{Cas d'utilisation en \LaTeX}
-Documenter un package ou une classe se fait efficacement via des cas d'utilisation montrant à la fois du code et le résultat correspondant.
+Documenter un package ou une classe se fait efficacement via des cas d'utilisation montrant à la fois du code et le résultat correspondant.%
+\footnote{
+ La mise en forme des codes se fait via le package \tdocpack{minted}.
+}
-% ------------------ %
+\begin{tdoccaut}
+ La version 3 de \tdocpack{minted} ne peut pas être prise en compte pour le moment car elle comporte des bugs : voir \url{https://github.com/gpoore/minted/issues/401}. On force donc l'usage de la version 2 de \tdocpack{minted}.
+\end{tdoccaut}
\subsection{Codes \tdocquote{en ligne}} \label{tdoc-listing-inline}
@@ -836,16 +911,14 @@ Voici des exemples d'utilisation.
\begin{tdocnote}
- La macro \tdocmacro{tdocinlatex} est utilisable dans une note de pied de page : voir plus bas
+ La macro \tdocmacro{tdocinlatex} est utilisable dans une note de pied de page : voir ci-dessous.
\footnote{
\tdocinlatex+$minted = TOP$+ a été tapé \tdocinlatex|\tdocinlatex+$minted = TOP$+| dans cette note de bas de page..
- }.
+ }
De plus, une couleur de fond est volontairement utilisée pour subtilement faire ressortir les codes \tdocinlatex#\LaTeX#\,.
\end{tdocnote}
-% ------------------ %
-
\subsection{Codes tapés directement}
@@ -853,6 +926,7 @@ Voici des exemples d'utilisation.
Via \tdocenv[{[sbs]}]{tdoclatex}, on affichera un code et son rendu côte à côte.
Indiquons que \tdocinlatex#sbs# est pour \tdocquote{\tdocprewhy{s.ide} \tdocprewhy{b.y} \tdocprewhy{s.ide}} soit \tdocinEN{côte à côte}.
\tdocdocbasicinput{examples-listing-ABC.tex}
+
\end{tdocexa}
@@ -860,10 +934,10 @@ Voici des exemples d'utilisation.
\begin{tdocexa}[À la suite]
- \tdocenv{tdoclatex} produit le résultat suivant qui correspond à l'option par défaut \tdocinlatex#std#
+ \tdocenv{tdoclatex} produit le résultat suivant qui correspond à l'option par défaut \tdocinlatex#std#\,.
\footnote{
\tdocinlatex{std} fait référence au comportement \tdocquote{standard} de \tdocpack{tcolorbox} vis à vis de la librairie \tdocpack{minted}.
- }.
+ }
\begin{tdoclatex}
$A = B + C$
@@ -890,10 +964,12 @@ Voici des exemples d'utilisation.
Avec la mise en forme par défaut, si le code commence par un crochet ouvrant, il faudra indiquer explicitement l'option par défaut.
\tdocdocbasicinput{examples-listing-strange.tex}
+
\smallskip
Une autre méthode consiste à utiliser la primitive \tdocmacro{string}.
\tdocdocbasicinput{examples-listing-strange-bis.tex}
+
\end{tdocwarn}
@@ -903,9 +979,10 @@ Pour les codes suivants, on considère un fichier de chemin relatif \verb+exampl
\tdoclatexinput[code]{examples-listing-xyz.tex}
+
\medskip
-La macro \tdocmacro{tdoclatexinput}, présentée ci-dessous, attend le chemin d'un fichier et propose les mêmes options que l'environnement \tdocenv{tdoclatex}.
+La macro \tdocmacro{tdoclatexinput}, présentée ci-dessous, attend le chemin d'un fichier et propose les mêmes options que l'environnement \tdocenv*{tdoclatex}.
% ------------------ %
@@ -916,11 +993,13 @@ La macro \tdocmacro{tdoclatexinput}, présentée ci-dessous, attend le chemin d'
\begin{tdoclatex}[code]
\tdoclatexinput[sbs]{examples-listing-xyz.tex}
+
\end{tdoclatex}
Ceci produit la mise en forme suivante.
\tdoclatexinput[sbs]{examples-listing-xyz.tex}
+
\end{tdocexa}
@@ -932,11 +1011,13 @@ La macro \tdocmacro{tdoclatexinput}, présentée ci-dessous, attend le chemin d'
\begin{tdoclatex}[code]
\tdoclatexinput{examples-listing-xyz.tex}
+
\end{tdoclatex}
Ceci produit la mise en forme suivante où l'option employée par défaut est \tdocinlatex#std#.
\tdoclatexinput{examples-listing-xyz.tex}
+
\end{tdocexa}
@@ -948,32 +1029,33 @@ La macro \tdocmacro{tdoclatexinput}, présentée ci-dessous, attend le chemin d'
\begin{tdoclatex}[code]
\tdoclatexinput[code]{examples-listing-xyz.tex}
+
\end{tdoclatex}
Ceci produit la mise en forme suivante.
\tdoclatexinput[code]{examples-listing-xyz.tex}
-\end{tdocexa}
+\end{tdocexa}
-% ------------------ %
\subsection{Codes importés et mis en situation} \label{tdoc-latexshow}
-\begin{tdocexa}[Showcase]
+\begin{tdocexa}[Mise en situation]
Ce qui suit s'obtient via \tdocinlatex+\tdoclatexshow{examples-listing-xyz.tex}+.
\medskip
\begin{tdoc-doc-showcase}
\tdoclatexshow{examples-listing-xyz.tex}
+
\end{tdoc-doc-showcase}
\end{tdocexa}
\begin{tdocnote}
- Les textes par défaut tiennent compte de la langue choisie lors du chargement du package \tdocpack{tutodoc}.
+ Les textes par défaut tiennent compte de la langue choisie lors du chargement du package \thispack{}.
\end{tdocnote}
@@ -987,6 +1069,7 @@ La macro \tdocmacro{tdoclatexinput}, présentée ci-dessous, attend le chemin d'
\begin{tdoc-doc-showcase}
\tdoclatexshow[explain = Voici le rendu réel.]{examples-listing-xyz.tex}
+
\end{tdoc-doc-showcase}
\end{tdocexa}
@@ -995,13 +1078,14 @@ La macro \tdocmacro{tdoclatexinput}, présentée ci-dessous, attend le chemin d'
\begin{tdocexa}[Les options disponibles]
- En plus du texte explicatif, il est aussi possible d'utiliser toutes les options de \tdocenv{tdocshowcase}, voir \ref{tdoc-showcase} page \pageref{tdoc-showcase}.
+ En plus du texte explicatif, il est aussi possible d'utiliser toutes les options de l'environnement \tdocenv*{tdocshowcase}, voir \ref{tdoc-showcase} page \pageref{tdoc-showcase}.
Voici un exemple illustrant ceci.
\medskip
\tdoclatexinput[code]{examples-listing-latexshow-options.tex}
+
\medskip
Ceci va produire ce qui suit.
@@ -1010,6 +1094,7 @@ La macro \tdocmacro{tdoclatexinput}, présentée ci-dessous, attend le chemin d'
\begin{tdoc-doc-showcase}
\input{examples-listing-latexshow-options.tex}
+
\end{tdoc-doc-showcase}
\end{tdocexa}
@@ -1019,8 +1104,6 @@ La macro \tdocmacro{tdoclatexinput}, présentée ci-dessous, attend le chemin d'
Afin de faciliter le suivi d'un package, il est indispensable de fournir un historique indiquant les changements effectués lors de la publication d'une nouvelle version.
-% ------------------ %
-
\subsection{À quel moment ?}
@@ -1034,6 +1117,7 @@ On peut au choix dater quelque chose, ou bien le versionner, dans ce second cas
La macro \tdocmacro{tdocdate} permet d'indiquer une date dans la marge comme dans l'exemple suivant.
\tdoclatexshow{examples-version-n-change-dating.tex}
+
\end{tdocexa}
@@ -1044,18 +1128,17 @@ On peut au choix dater quelque chose, ou bien le versionner, dans ce second cas
Associer un numéro de version à une nouveauté se fait via la macro \tdocmacro{tdocversion}, la couleur et la date étant des arguments optionnels.
\tdoclatexshow{examples-version-n-change-versioning.tex}
-\end{tdocexa}
+\end{tdocexa}
-\begin{tdocimportant}
- \leavevmode
+\begin{tdocimp}
\begin{enumerate}
\item Les macros \tdocmacro{tdocdate} et \tdocmacro{tdocversion} nécessitent deux compilations.
\item Comme la langue indiquée pour cette documentation est le français, la date dans le rendu final est au format \texttt{JJ/MM/AAAA} alors que dans le code celle-ci devra toujours être saisie au format anglais \texttt{AAAA-MM-JJ}.
\end{enumerate}
-\end{tdocimportant}
+\end{tdocimp}
\begin{tdocwarn}
@@ -1065,24 +1148,43 @@ On peut au choix dater quelque chose, ou bien le versionner, dans ce second cas
}
et ceci est un choix ! Pourquoi cela ? Tout simplement car dater et versionner des explications devrait se faire de façon semi-automatisée afin d'éviter tout bug humain.
% \footnote{
-% L'auteur de \tdocpack{tutodoc} est entrain de mettre en place un ensemble d'outils permettant une telle semi-automatisation.
+% L'auteur de \thispack{} est entrain de mettre en place un ensemble d'outils permettant une telle semi-automatisation.
% }.
\end{tdocwarn}
\subsection{Quoi de neuf ?}
-\tdocpack{tutodoc} propose différents environnements pour indiquer rapidement et clairement ce qui a été fait
+\thispack{} propose la macro \tdocmacro{tdocstartproj} et différents environnements pour indiquer rapidement et clairement ce qui a été fait lors des derniers changements.%
\footnote{
L'utilisateur n'a pas besoin de tous les détails techniques.
}
-lors des derniers changements.
+
+
+\begin{tdocnote}
+ Concernant les icônes, voir la note au début de la section \ref{tdoc-colorful-focus} page \pageref{tdoc-colorful-focus}.
+\end{tdocnote}
+
+
+% ------------------ %
+
+
+\begin{tdocexa}[Juste pour la toute première version]
+ \leavevmode
+
+ \tdoclatexinput[sbs]{examples-version-n-change-first.tex}
+
+\end{tdocexa}
+
+
+% ------------------ %
\begin{tdocexa}[Pour les nouveautés]
\leavevmode
\tdoclatexinput[sbs]{examples-version-n-change-new.tex}
+
\end{tdocexa}
@@ -1093,6 +1195,7 @@ lors des derniers changements.
\leavevmode
\tdoclatexinput[sbs]{examples-version-n-change-update.tex}
+
\end{tdocexa}
@@ -1103,6 +1206,7 @@ lors des derniers changements.
\leavevmode
\tdoclatexinput[sbs]{examples-version-n-change-break.tex}
+
\end{tdocexa}
@@ -1113,6 +1217,7 @@ lors des derniers changements.
\leavevmode
\tdoclatexinput[sbs]{examples-version-n-change-pb.tex}
+
\end{tdocexa}
@@ -1123,22 +1228,35 @@ lors des derniers changements.
\leavevmode
\tdoclatexinput[sbs]{examples-version-n-change-fix.tex}
+
+\end{tdocexa}
+
+
+% ------------------ %
+
+
+\begin{tdocexa}[Thématiques aux choix avec une icône]
+ \leavevmode
+
+ \tdoclatexinput[sbs]{examples-version-n-change-user-choice-icon.tex}
+
\end{tdocexa}
% ------------------ %
-\begin{tdocexa}[Thématiques aux choix]
+\begin{tdocexa}[Thématiques aux choix sans icône]
\leavevmode
\tdoclatexinput[sbs]{examples-version-n-change-user-choice.tex}
+
\end{tdocexa}
\section{Décorations}
-Finissons cette documentation avec de petites outils de mise en forme pouvant rendre de grands services.
+Finissons cette documentation avec un petit outil de mise en forme qui rend de grands services.
\begin{tdoclatex}[sbs]
@@ -1150,72 +1268,161 @@ Ceci fonctionne avec des énumérations.
\begin{itemize}
\item Point souligné.
-
- \item Autre chose utile.
\end{itemize}
\tdocsep % Un comportement uniforme.
Ble, ble, ble...
+\end{tdoclatex}
-Bli, bli, bli...
-\tdocxspace % Espace subtile
- % mais utile.
+\section{Historique}
-Blo, blo, blo...
+\small
-Blu, blu, blu...
+\tdocversion{1.4.0}[2024-09-28]
+
+\begin{tdocbreak}
+ \item L'environnement \tdocenv*{tdoccaution} a été renommé \tdocenv*{tdoccaut} pour une saisie simplifiée.
+
+ \item Mise en avant de contenus : les exemples et remarques, indiqués via les environnements \tdocenv*{tdocexa} et \tdocenv*{tdocrem}, sont toujours numérotés, et ils partagent le même compteur.
+
+ \item La macro inutilisée \tdocmacro{tdocxspace} a été supprimée.
+\end{tdocbreak}
+
+
+\begin{tdocnew}
+ \item Journal des changements : la macro \tdocmacro{tdocstartproj} permet de gérer le cas de la première version publique.
+
+ \item Factorisation du code : la macro \tdocmacro{tdocicon} est en charge de l'ajout d'icônes devant du texte.
+\end{tdocnew}
+
+
+\begin{tdocupdate}
+ \item Couleurs : les macros \tdocmacro{tdocdarkcolor} et \tdocmacro{tdoclightcolor} proposent un argument facultatif.
+ \begin{enumerate}
+ \item \tdocmacro{tdocdarkcolor} : la quantité de couleur par rapport au noir peut être définie de manière facultative.
+
+ \item \tdocmacro{tdoclightcolor} : le taux de transparence peut être défini de manière facultative.
+ \end{enumerate}
+
+ \item Mise en avant de contenus : réduction de l'espace autour du contenu dans les cadres colorés.
+
+ \item Gestion des versions: un meilleur espacement verticalement via \tdocmacro{vphantom}.
+\end{tdocupdate}
+
+\tdocsep
+
+
+% ------------------ %
+
+
+\tdocversion{1.3.1}[2024-09-26]
+
+\begin{tdocnew}
+ \item Version étoilée de \tdocmacro{tdocenv} pour n'avoir que le nom de l'environnement.
+\end{tdocnew}
+
+\tdocsep
+
+
+% ------------------ %
+
+
+\tdocversion{1.3.0}[2024-09-25]
+
+\begin{tdocprob}
+ \item La version 3 de \tdocpack{minted} ne peut pas être prise en compte pour le moment car elle comporte des bugs : voir \url{https://github.com/gpoore/minted/issues/401}. On force donc l'usage de la version 2 de \tdocpack{minted}.
+\end{tdocprob}
+
+
+\begin{tdocbreak}
+ \item L'environnement \tdocenv*{tdocimportant} a été renommé \tdocenv*{tdocimp} pour une saisie simplifiée.
+\end{tdocbreak}
+
+
+\begin{tdocnew}
+ \item Journal des changements : les environnements proposés utilisent des icônes.
+
+
+ \item Mise en avant de contenus : des cadres colorés avec des icônes sont proposés pour les environnements suivants.
+ \bgroup
+ \setlength\multicolsep{5pt}
+ \begin{multicols}{3}
+ \begin{enumerate}
+ \item \tdocenv*{tdoccaution}
+ \item \tdocenv*{tdocimp}
+ \item \tdocenv*{tdocnote}
+ \item \tdocenv*{tdoctip}
+ \item \tdocenv*{tdocwarn}
+ \end{enumerate}
+ \end{multicols}
+ \egroup
+\end{tdocnew}
+
+\tdocsep
+
+
+% ------------------ %
-\end{tdoclatex}
-\section{Historique}
\tdocversion{1.2.0-a}[2024-08-23]
\begin{tdocupdate}
- \item \tdocmacro{tdocversion}
+ \item \tdocmacro{tdocversion}
\begin{enumerate}
- \item Le numéro de version est au-dessus de la date.
+ \item Le numéro de version est au-dessus de la date.
- \item L'espacement est mieux géré lorsque la date est absente.
+ \item L'espacement est mieux géré lorsque la date est absente.
\end{enumerate}
\end{tdocupdate}
\begin{tdocfix}
- \item Mise en avant de contenus : les traductions françaises de \tdocinEN*{caution} et \tdocinEN*{danger} étaient erronées.
+ \item Mise en avant de contenus : les traductions françaises de \tdocinEN*{caution} et \tdocinEN*{danger} étaient erronées.
\end{tdocfix}
\tdocsep
+
+% ------------------ %
+
+
\tdocversion{1.1.0}[2024-01-06]
\begin{tdocnew}
- \item Journal des changements : deux nouveaux environnements.
+ \item Journal des changements : deux nouveaux environnements.
\begin{enumerate}
\item \tdocenv{tdocbreak} pour les \tdocquote{bifurcations}\,, soit les modifications non rétrocompatibles.
\item \tdocenv{tdocprob} pour les problèmes repérés.
\end{enumerate}
- \item \tdocmacro{tdocinlatex}: un jaune léger est utilisé comme couleur de fond.
+ \item \tdocmacro{tdocinlatex}: un jaune léger est utilisé comme couleur de fond.
\end{tdocnew}
\tdocsep
+
+% ------------------ %
+
+
\tdocversion{1.0.1}[2023-12-08]
\begin{tdocfix}
- \item \tdocmacro{tdocenv}: l'espacement est maintenant correct, même si le paquet \tdocpack{babel} n'est pas chargé avec la langue française.
+ \item \tdocmacro{tdocenv}: l'espacement est maintenant correct, même si le paquet \tdocpack{babel} n'est pas chargé avec la langue française.
- \item \tdocenv[{[nostripe]}]{tdocshowcase}: les sauts de page autour des lignes \tdocquote{cadrantes} devraient être rares dorénavant.
+ \item \tdocenv[{[nostripe]}]{tdocshowcase}: les sauts de page autour des lignes \tdocquote{cadrantes} devraient être rares dorénavant.
\end{tdocfix}
\tdocsep
-\tdocversion{1.0.0}[2023-11-29]
-Première version publique du projet.
+% ------------------ %
+
+
+\tdocversion{1.0.0}[2023-11-29]
+\tdocstartproj{Première version publique du projet.}
\end{document}
diff --git a/macros/latex/contrib/uantwerpendocs/beamerthemeuantwerpenuserguide.pdf b/macros/latex/contrib/uantwerpendocs/beamerthemeuantwerpenuserguide.pdf
index 16e6629f51..e837b22226 100644
--- a/macros/latex/contrib/uantwerpendocs/beamerthemeuantwerpenuserguide.pdf
+++ b/macros/latex/contrib/uantwerpendocs/beamerthemeuantwerpenuserguide.pdf
Binary files differ
diff --git a/macros/latex/contrib/uantwerpendocs/uantwerpenbamathesis-example.pdf b/macros/latex/contrib/uantwerpendocs/uantwerpenbamathesis-example.pdf
index 12a454ac52..02683a2be0 100644
--- a/macros/latex/contrib/uantwerpendocs/uantwerpenbamathesis-example.pdf
+++ b/macros/latex/contrib/uantwerpendocs/uantwerpenbamathesis-example.pdf
Binary files differ
diff --git a/macros/latex/contrib/uantwerpendocs/uantwerpencoursetext-example.pdf b/macros/latex/contrib/uantwerpendocs/uantwerpencoursetext-example.pdf
index 9f65c9a371..289fe585c8 100644
--- a/macros/latex/contrib/uantwerpendocs/uantwerpencoursetext-example.pdf
+++ b/macros/latex/contrib/uantwerpendocs/uantwerpencoursetext-example.pdf
Binary files differ
diff --git a/macros/latex/contrib/uantwerpendocs/uantwerpendocs.dtx b/macros/latex/contrib/uantwerpendocs/uantwerpendocs.dtx
index acddbf252f..6ba894ce8f 100644
--- a/macros/latex/contrib/uantwerpendocs/uantwerpendocs.dtx
+++ b/macros/latex/contrib/uantwerpendocs/uantwerpendocs.dtx
@@ -35,11 +35,11 @@
%<le>\ProvidesClass{uantwerpenletter}
%<ex>\ProvidesClass{uantwerpenexam}
%<bmr>\ProvidesPackage{beamerthemeuantwerpen}
-%<cls|ct|bmt|pt|rp|le|ex|bmr> [2024/06/04 v4.7 .dtx skeleton file]
+%<cls|ct|bmt|pt|rp|le|ex|bmr> [2024/08/27 v4.8 .dtx skeleton file]
%<*driver>
\documentclass[a4paper]{ltxdoc}
-\def\fileversion{4.7}
-\def\filedate{2024/06/24}%
+\def\fileversion{4.8}
+\def\filedate{2024/08/27}%
\usepackage{makeidx}
\usepackage{alltt}
\usepackage{longtable}
@@ -127,7 +127,8 @@
% multiple degree programs for exams and course texts, corrected
% disclaimers, replaced 'basic usage' in documentation by heavily
% commented examples}
-% \changes{v4.7}{2024/06/13}{\@ Minor bugfixes}
+% \changes{v4.7}{2024/06/13}{\@ Minor bugfixes on the request of the library}
+% \changes{v4.8}{2024/08/27}{\@ Minor bugfixes on the request of the Antwerp Doctoral School}
%
% \DoNotIndex{\newcommand,\newenvironment,\begin,\bfseries,\draw,\clip,\else,\fi,\if,\fill,\filldraw,\ifthenelse,\ifx,\textwidth,\node,\\,\@empty,\@tempdima,\@tempdimb,\@tempswatrue,\{,\},\ ,\bf,\BODY,\break,\Alph,\and,\define@key,\color,\dx,\dy,\g,\gdef,\hbox,\tiny,\scriptsize,\footnotesize,\small,\normalsize,\large,\Large,\LARGE,\huge,\Huge,\l,\LaTeX,\let,\p@,\relax,\renewcommand,\Requirepackage,\textbf,\textsf,\texttt,\textbackslash,\vspace,\hspace,\hfill,\hskip,\vskip,\hline,\vrule,\typeout,\usebox,\end,\paperheight,\paperwidth,\par,\NewDocumentCommand,\seq}
% \setlength{\parindent}{0em}
@@ -1210,7 +1211,7 @@
\jurymember{prof. dr. M. Byr}{IMEC, Nederland}
%% specify your degree (manually) and where and when you obtain your degree
-\degree{doctor in de toegepaste ingenieurswetenschappen}
+\degree{doctor in de Toegepaste Ingenieurswetenschappen}
\defenselocation{Antwerpen}
\defensedate{2024}
@@ -1364,8 +1365,8 @@
\jurymember{prof. dr. M. Byr}{IMEC, The Netherlands}
%% specify your degree (manually) and where and when you obtain your degree
-\degree{doctor in applied engineering}
-\defenselocation{Antwerpen}
+\degree{doctor in Applied Engineering}
+\defenselocation{Antwerp}
\defensedate{2024}
%% specify a fancy photo for your titlepage (if you don't want a dull one)
@@ -2808,8 +2809,8 @@ juryname = Jury
jurymembersname = Members
jurychairname = Chair
bmthesisname = Thesis to obtain the degree of
-pthesisnamei = Thesis submitted in fulfilment of the requirements for the degree of
-pthesisnameii = at the University of Antwerp
+pthesisnamei = Thesis submitted for the degree of
+pthesisnameii = at the University of Antwerp to be defended by
weightname = Weight
%</endata>
% \end{macrocode}
diff --git a/macros/latex/contrib/uantwerpendocs/uantwerpendocs.pdf b/macros/latex/contrib/uantwerpendocs/uantwerpendocs.pdf
index be9b782f96..f5982a2a2c 100644
--- a/macros/latex/contrib/uantwerpendocs/uantwerpendocs.pdf
+++ b/macros/latex/contrib/uantwerpendocs/uantwerpendocs.pdf
Binary files differ
diff --git a/macros/latex/contrib/uantwerpendocs/uantwerpenexam-example1.pdf b/macros/latex/contrib/uantwerpendocs/uantwerpenexam-example1.pdf
index 23e7289e70..a6593228c5 100644
--- a/macros/latex/contrib/uantwerpendocs/uantwerpenexam-example1.pdf
+++ b/macros/latex/contrib/uantwerpendocs/uantwerpenexam-example1.pdf
Binary files differ
diff --git a/macros/latex/contrib/uantwerpendocs/uantwerpenexam-example2.pdf b/macros/latex/contrib/uantwerpendocs/uantwerpenexam-example2.pdf
index 3227bee08f..3de882ad2f 100644
--- a/macros/latex/contrib/uantwerpendocs/uantwerpenexam-example2.pdf
+++ b/macros/latex/contrib/uantwerpendocs/uantwerpenexam-example2.pdf
Binary files differ
diff --git a/macros/latex/contrib/uantwerpendocs/uantwerpenletter-example.pdf b/macros/latex/contrib/uantwerpendocs/uantwerpenletter-example.pdf
index d29ccbeab3..014dce28cb 100644
--- a/macros/latex/contrib/uantwerpendocs/uantwerpenletter-example.pdf
+++ b/macros/latex/contrib/uantwerpendocs/uantwerpenletter-example.pdf
Binary files differ
diff --git a/macros/latex/contrib/uantwerpendocs/uantwerpenphdthesis-example1.pdf b/macros/latex/contrib/uantwerpendocs/uantwerpenphdthesis-example1.pdf
index 99668c6958..b44e6b8707 100644
--- a/macros/latex/contrib/uantwerpendocs/uantwerpenphdthesis-example1.pdf
+++ b/macros/latex/contrib/uantwerpendocs/uantwerpenphdthesis-example1.pdf
Binary files differ
diff --git a/macros/latex/contrib/uantwerpendocs/uantwerpenphdthesis-example2.pdf b/macros/latex/contrib/uantwerpendocs/uantwerpenphdthesis-example2.pdf
index 9645cf2ee1..543028638d 100644
--- a/macros/latex/contrib/uantwerpendocs/uantwerpenphdthesis-example2.pdf
+++ b/macros/latex/contrib/uantwerpendocs/uantwerpenphdthesis-example2.pdf
Binary files differ
diff --git a/macros/latex/contrib/uantwerpendocs/uantwerpenreport-example.pdf b/macros/latex/contrib/uantwerpendocs/uantwerpenreport-example.pdf
index c3610d3734..a10239ae2c 100644
--- a/macros/latex/contrib/uantwerpendocs/uantwerpenreport-example.pdf
+++ b/macros/latex/contrib/uantwerpendocs/uantwerpenreport-example.pdf
Binary files differ
diff --git a/macros/latex/contrib/ucph-revy/README.md b/macros/latex/contrib/ucph-revy/README.md
index 3b0e47a0a4..d2b6baed04 100644
--- a/macros/latex/contrib/ucph-revy/README.md
+++ b/macros/latex/contrib/ucph-revy/README.md
@@ -1,6 +1,6 @@
Package ucph-revy
=================
-v1.0.1
+v1.0.2
A class for typesetting scripts, containing both lyrics and prose, in
the style used by the student revues (revy) at the Faculties of
diff --git a/macros/latex/contrib/ucph-revy/ucph-revy-da-doc.pdf b/macros/latex/contrib/ucph-revy/ucph-revy-da-doc.pdf
index 5b9426a4f3..1080060964 100644
--- a/macros/latex/contrib/ucph-revy/ucph-revy-da-doc.pdf
+++ b/macros/latex/contrib/ucph-revy/ucph-revy-da-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/ucph-revy/ucph-revy-da-man.pdf b/macros/latex/contrib/ucph-revy/ucph-revy-da-man.pdf
index 8f252d20ff..d040dacefe 100644
--- a/macros/latex/contrib/ucph-revy/ucph-revy-da-man.pdf
+++ b/macros/latex/contrib/ucph-revy/ucph-revy-da-man.pdf
Binary files differ
diff --git a/macros/latex/contrib/ucph-revy/ucph-revy-en-doc.pdf b/macros/latex/contrib/ucph-revy/ucph-revy-en-doc.pdf
index 3d09e9a2be..784e1235ca 100644
--- a/macros/latex/contrib/ucph-revy/ucph-revy-en-doc.pdf
+++ b/macros/latex/contrib/ucph-revy/ucph-revy-en-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/ucph-revy/ucph-revy-en-man.pdf b/macros/latex/contrib/ucph-revy/ucph-revy-en-man.pdf
index 68c51ca12d..d2baff1111 100644
--- a/macros/latex/contrib/ucph-revy/ucph-revy-en-man.pdf
+++ b/macros/latex/contrib/ucph-revy/ucph-revy-en-man.pdf
Binary files differ
diff --git a/macros/latex/contrib/ucph-revy/ucph-revy.dtx b/macros/latex/contrib/ucph-revy/ucph-revy.dtx
index 79a9a1aa0b..9fdb39549e 100644
--- a/macros/latex/contrib/ucph-revy/ucph-revy.dtx
+++ b/macros/latex/contrib/ucph-revy/ucph-revy.dtx
@@ -20,7 +20,7 @@
%<class>\NeedsTeXFormat{LaTeX2e}[2005/12/01]
%<class>\ProvidesClass{ucph-revy}
%<*class>
- [2024/02/07 v1.0.1 Fix occational divide by 0]
+ [2024/09/24 v1.0.2 A class for making musical manuscripts]
%</class>
%<*driver>
\documentclass[a4paper]{ltxdoc}
@@ -372,7 +372,7 @@
% betyder bliver gennemgået i sektion \ref{thumbindex}.
% \end{danish}
% \begin{english}
-% \cn\ inherits from the \texttt{article}\DescribeMacro{article}
+% \cn\ inherits from the \texttt{article}\DescribeMacro{article}\
% class, and accepts all its options. It sets \texttt{a4paper} and
% \texttt{11pt} by default, if not given any contrary options.
%
@@ -470,13 +470,14 @@
% \end{implementation}
%
% \begin{danish}
+% \changes{v1.0.2}{2024/09/24}{Skift fontenc til OT1}
% I eksemplet inkluderer vi fire pakker. De er ikke strengt
% nødvendige for at få \cn\ til at fungere, men de kommer næsten med
% sikkerhed til at gøre dit liv lettere.
%
% \medskip\noindent\begin{tabulary}{\textwidth}{lL}
% \verb|\usepackage[utf8]{inputenc}| & \\
-% \verb|\usepackage[T1]{fontenc}| &
+% \verb|\usepackage[OT1]{fontenc}| &
% Gør \LaTeX's håndtering af danske bogstaver mere moderne. \\
% \verb|\usepackage[danish]{babel}| &
% Fortæller \LaTeX\ en masse ting om dansk, bl.a. hvordan
@@ -490,13 +491,14 @@
% \end{tabulary}
% \end{danish}
% \begin{english}
+% \changes{v1.0.2}{2024/09/24}{Change fontenc to OT1}
% In the example, we've included three packages that aren't strictly
% necessary for \cn\ to function, but will probably make your life
% easier.
%
% \medskip\noindent\begin{tabulary}{\textwidth}{lL}
% \verb|\usepackage[utf8]{inputenc}| & \\
-% \verb|\usepackage[T1]{fontenc}| &
+% \verb|\usepackage[OT1]{fontenc}| &
% Modernize \LaTeX's handling of (particularly special)
% characters.\\
% \verb|\usepackage{hyperref}| &
@@ -700,23 +702,24 @@
% \begin{danish}
% For at sammenligningen kan fungere, er vi afhængige af, at
% tekstrepræsentationen ikke skifter undervejs. Det kan ske, hvis
-% \verb|.tex|--filen kalder \textsf{fontenc}, og titlerne
-% indeholder specialtegn. Den simple og effektive\footnote{Læs:
-% det er et hack, som ikke har givet mig problemer \emph{endnu}.}
-% løsning er bare at kalde \textsf{fontenc} selv, så der ikke er
-% plads til misforståelser.
+% \verb|.tex|--filen kalder
+% \DescribeMacro{fontenc}\textsf{fontenc}, og titlerne indeholder
+% specialtegn. Den simple og effektive\footnote{Læs: det er et
+% hack, som ikke har givet mig problemer \emph{endnu}.} løsning
+% er bare at kalde \textsf{fontenc} selv, så der ikke er plads til
+% misforståelser.
% \end{danish}
% \begin{english}
% For this comparing of titles to work, we depend of the text
% representation not changing between the \verb|\title|
% declaration and the time when the thumb index routine runs. It
-% might, though, if \textsf{fontenc} is called. To quickly knock
-% that problem on the head,\footnote{In a way that hasn't come
-% back to bite \emph{me} yet.} we'll just call \textsf{fontenc}
-% ourselves.
+% might, though, if \DescribeMacro{fontenc}\textsf{fontenc} is
+% called. To quickly knock that problem on the head,\footnote{In a
+% way that hasn't come back to bite \emph{me} yet.} we'll just
+% call \textsf{fontenc} ourselves.
% \end{english}
% \begin{macrocode}
- \RequirePackage[T1]{fontenc}
+ \RequirePackage[OT1]{fontenc}
% \end{macrocode}
%
% \begin{danish}
@@ -2927,22 +2930,51 @@
}{}
% \end{macrocode}
% \end{implementation}
+%
+% \begin{danish}
+% \subsection{Assorterede emner}
+% \subsubsection{\SaTyR}
+% \end{danish}
+% \begin{english}
+% \subsection{Miscellenia}
+% \subsubsection{\SaTyR}
+% \end{english}
+% \begin{macro}{\SaTyR}
+% \begin{danish}
+% \changes{v1.0.2}{2024/09/24}{SaTyR-makro}
+% Man skriver \SaTyR{}Revy ved at elske alle dyr, og derefter
+% skrive
+% \end{danish}
+% \begin{english}
+% \changes{v1.0.2}{2024/09/24}{SaTyR-macro}
+% \SaTyR{}Revy, which is produced by the students at the Faculty
+% of Science at the University of Copenhagen, is properly written
+% by saying
+% \end{english}
+% \begin{verbatim}
+%\SaTyR{}Revy
+% \end{verbatim}
+% \begin{implementation}
+% \begin{macrocode}
+\newcommand{\SaTyR}{S\hspace*{-.2ex}\raisebox{-.15em}{A}\hspace*{-.5ex}TyR}
+% \end{macrocode}
+% \end{implementation}
+% \end{macro}
% \iffalse
%<*driver>
\jump
%</driver>
% \fi
-%
% \begin{implementation}
-% \begin{danish}
-% \subsection{\texttt{.aux}--filen}
+% \begin{danish}
+% \subsubsection{\texttt{.aux}--filen}
% Til fremtidigt brug sørger vi for, at vores metadata også bliver
% skrevet ud til \texttt{.aux}--filen, når dokumentet er færdigt.
%
% Det er også her, vi sætter en \texttt{label} på den sidste side.
% \end{danish}
% \begin{english}
-% \subsection{The \texttt{.aux} file}
+% \subsubsection{The \texttt{.aux} file}
% For futue use, we will also ensure that our metadata is written
% to the \texttt{.aux} file at the end of the document.
%
@@ -2986,11 +3018,13 @@
% \end{implementation}
% \begin{danish}
% \section{Komplet eksempel}
+% \changes{v1.0.2}{2024/09/24}{Tilpasninger i eksempelfil}
% \label{fullex}
% \VerbatimInput{Eksempel.tex}
% \end{danish}
% \begin{english}
% \section{Complete example}
+% \changes{v1.0.2}{2024/09/24}{Minor adjustments in example file}
% \label{fullex}
% \VerbatimInput{Example.tex}
% \end{english}
@@ -3001,7 +3035,7 @@
\documentclass{ucph-revy}
\usepackage[utf8]{inputenc}
-\usepackage[T1]{fontenc}
+\usepackage[OT1]{fontenc}
\usepackage[danish]{babel}
\usepackage{hyperref}
%<*driver>
@@ -3011,6 +3045,7 @@
\urlstyle{sf}
\version{1.0}
+%% følgende definitioner kan godt fjernes, hvis der ikke er brug for dem:
\revyname{FysikRevy\texttrademark}
\revyyear{2019}
\status{eksempel}
@@ -3033,6 +3068,7 @@
\role{I} Vred instruktør
\role{A9}[A--ni] Anine
\end{roles}
+%% props-miljøet kan fjernes, hvis der ikke er brug for det
\begin{props}
\prop{Hedegaard--hår}[Person, der skaffer]
\prop{Didgeridoo}[Anine]
@@ -3139,7 +3175,7 @@
\documentclass{ucph-revy}
\usepackage[utf8]{inputenc}
-\usepackage[T1]{fontenc}
+\usepackage[OT1]{fontenc}
\usepackage{hyperref}
%<*driver>
\land
@@ -3148,6 +3184,7 @@
\urlstyle{sf}
\version{1.0}
+%% The settings below may be omitted if their inclusion is undesired
\revyname{The Meaning of Liff}
\revyyear{3001}
\title{Example}
@@ -3185,6 +3222,7 @@
\role{CC}[Eric] Crucified Criminal
\role{B}[Graham] Brian
\end{roles}
+%% The props environment may be omitted if found to be superfluous
\propname{Props:}
\begin{props}
\prop{Large sign}
diff --git a/macros/latex/contrib/univie-ling/README b/macros/latex/contrib/univie-ling/README
index c73460f0b4..ff3aa6b5a9 100644
--- a/macros/latex/contrib/univie-ling/README
+++ b/macros/latex/contrib/univie-ling/README
@@ -97,14 +97,41 @@ also have a look at the example files.
== CHANGES ==
+V. 2.9 (2024-09-28):
+ - univie-ling-wlg:
+ * Fix pagination with \frontmatter articles.
+ * Improve parts in TOC.
+ * Clear double page before parts.
+ - univie-ling.bbx:
+ * Add option "annotations" which, if true, will print out
+ the annotation field (useful for annotated bibliographies).
+ * Add manual.
+
+V. 2.8 (2024-09-20):
+ - univie-ling-thesis:
+ * Add class option titlepage.
+ * Adapt title page to recent design. This entails a change
+ of sans serif font from Arial to Source Sans Pro.
+ * Use TeX Gyre Pagella rather than Palatino with fonts=otf.
+ - univie-ling-wlg:
+ * Fix pagination issue with titlepage=specialprint.
+ * part pages are now empty (no pagination and heading).
+ - univie-ling-handout:
+ - univie-ling-expose:
+ - univie-ling-paper:
+ - univie-ling-poster:
+ - univie-ling-thesis:
+ - univie-ling-wlg:
+ * Add basic support for thebibliography environment.
+ * Update documentation on bibliography beyond biblatex.
+
V. 2.7 (2024-07-23):
- univie-ling-wlg: Use proper spacing with covington's
reflist environment.
- - univie-ling-poster: add smallmargins option.
- - univie-ling-thesis: fix running headers in twoside mode.
- univie-ling-handout:
- univie-ling-expose:
- univie-ling-paper:
+ - univie-ling-poster:
- univie-ling-thesis:
- univie-ling-wlg:
* Fix empty argument check in \weblink.
diff --git a/macros/latex/contrib/univie-ling/biblatex-univie-ling/univie-ling.bbx b/macros/latex/contrib/univie-ling/biblatex-univie-ling/univie-ling.bbx
index 985dc19f98..78f5ac4645 100644
--- a/macros/latex/contrib/univie-ling/biblatex-univie-ling/univie-ling.bbx
+++ b/macros/latex/contrib/univie-ling/biblatex-univie-ling/univie-ling.bbx
@@ -38,7 +38,7 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesFile{univie-ling.bbx}[2024/07/23 v.2.7 biblatex bibliography style]
+\ProvidesFile{univie-ling.bbx}[2024/09/28 v.2.9 biblatex bibliography style]
% Load base style (authoryear-comp)
\RequireBibliographyStyle{authoryear-comp}
@@ -75,9 +75,14 @@
% Option "issueeditor": Output journal issue editor (false by default)
\newtoggle{issueeditor}
-\DeclareBibliographyOption{issueeditor}[false]{%
+\DeclareBibliographyOption{issueeditor}[true]{%
\settoggle{issueeditor}{#1}}
+% Option "annotations": Output annotations (false by default)
+\newtoggle{annotations}
+\DeclareBibliographyOption{annotations}[true]{%
+ \settoggle{annotations}{#1}}
+
%
% NAME formatting (general)
%
@@ -518,6 +523,23 @@
\usebibmacro{date}%
\newunit}
+% Vertical separation for annotations
+\newlength\annotsep
+\setlength\annotsep{3pt}
+\newcommand*{\annotationdelim}{\adddot\par\setunit{}\nobreak}
+\AtEndOfPackage{%
+ \iftoggle{annotations}
+ {\setlength\bibparsep{\annotsep}}
+ {}%
+}
+
+\renewbibmacro*{annotation}{%
+ \iffieldundef{annotation}
+ {\printfile[annotation]{
+ \bibannotationprefix\thefield{entrykey}.tex}}%
+ {\printfield{annotation}}%
+}
+
\renewbibmacro*{labeltitle}{%
\iffieldundef{label}
{\iffieldundef{shorttitle}
@@ -620,6 +642,9 @@
% no pp. prefix
\DeclareFieldFormat{pages}{#1}
+% Add delimiter
+\DeclareFieldFormat{annotation}{\annotationdelim #1}
+
\DeclareFieldFormat{doi}{%
\ifhyperref
{\href{https://doi.org/#1}{\nolinkurl{https://doi.org/#1}}}
@@ -664,6 +689,9 @@
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
+ \iftoggle{annotations}
+ {\usebibmacro{annotation}}
+ {}%
\usebibmacro{finentry}}
\DeclareBibliographyDriver{book}{%
@@ -714,6 +742,9 @@
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
+ \iftoggle{annotations}
+ {\usebibmacro{annotation}}
+ {}%
\usebibmacro{finentry}}
\DeclareBibliographyAlias{collection}{book}
@@ -771,6 +802,9 @@
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
+ \iftoggle{annotations}
+ {\usebibmacro{annotation}}
+ {}%
\usebibmacro{finentry}}
\DeclareBibliographyDriver{inbook}{%
@@ -829,6 +863,9 @@
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
+ \iftoggle{annotations}
+ {\usebibmacro{annotation}}
+ {}%
\usebibmacro{finentry}}
\DeclareBibliographyDriver{thesis}{%
@@ -864,6 +901,9 @@
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
+ \iftoggle{annotations}
+ {\usebibmacro{annotation}}
+ {}%
\usebibmacro{finentry}}
\DeclareBibliographyDriver{unpublished}{%
@@ -895,6 +935,9 @@
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
+ \iftoggle{annotations}
+ {\usebibmacro{annotation}}
+ {}%
\usebibmacro{finentry}}
\DeclareBibliographyDriver{periodical}{%
@@ -924,6 +967,9 @@
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
+ \iftoggle{annotations}
+ {\usebibmacro{annotation}}
+ {}%
\usebibmacro{finentry}}
\endinput
diff --git a/macros/latex/contrib/univie-ling/biblatex-univie-ling/univie-ling.cbx b/macros/latex/contrib/univie-ling/biblatex-univie-ling/univie-ling.cbx
index 7600056940..9cf6707ff6 100644
--- a/macros/latex/contrib/univie-ling/biblatex-univie-ling/univie-ling.cbx
+++ b/macros/latex/contrib/univie-ling/biblatex-univie-ling/univie-ling.cbx
@@ -36,7 +36,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesFile{univie-ling.cbx}[2024/07/23 v.2.7 biblatex citation style]
+\ProvidesFile{univie-ling.cbx}[2024/09/28 v.2.9 biblatex citation style]
\RequireCitationStyle{authoryear-comp}
diff --git a/macros/latex/contrib/univie-ling/doc/templates/template-expose-deutsch.pdf b/macros/latex/contrib/univie-ling/doc/templates/template-expose-deutsch.pdf
index 8652b32a5b..3c59d7fd22 100644
--- a/macros/latex/contrib/univie-ling/doc/templates/template-expose-deutsch.pdf
+++ b/macros/latex/contrib/univie-ling/doc/templates/template-expose-deutsch.pdf
Binary files differ
diff --git a/macros/latex/contrib/univie-ling/doc/templates/template-expose-english.pdf b/macros/latex/contrib/univie-ling/doc/templates/template-expose-english.pdf
index a8ac59e821..509f36d7bb 100644
--- a/macros/latex/contrib/univie-ling/doc/templates/template-expose-english.pdf
+++ b/macros/latex/contrib/univie-ling/doc/templates/template-expose-english.pdf
Binary files differ
diff --git a/macros/latex/contrib/univie-ling/doc/templates/template-handout-deutsch.pdf b/macros/latex/contrib/univie-ling/doc/templates/template-handout-deutsch.pdf
index 48b41cac87..cdfb07eedf 100644
--- a/macros/latex/contrib/univie-ling/doc/templates/template-handout-deutsch.pdf
+++ b/macros/latex/contrib/univie-ling/doc/templates/template-handout-deutsch.pdf
Binary files differ
diff --git a/macros/latex/contrib/univie-ling/doc/templates/template-handout-english.pdf b/macros/latex/contrib/univie-ling/doc/templates/template-handout-english.pdf
index 608e203154..bf1c1f9880 100644
--- a/macros/latex/contrib/univie-ling/doc/templates/template-handout-english.pdf
+++ b/macros/latex/contrib/univie-ling/doc/templates/template-handout-english.pdf
Binary files differ
diff --git a/macros/latex/contrib/univie-ling/doc/templates/template-paper-deutsch.pdf b/macros/latex/contrib/univie-ling/doc/templates/template-paper-deutsch.pdf
index 5ac9aba1d1..4f94bbe283 100644
--- a/macros/latex/contrib/univie-ling/doc/templates/template-paper-deutsch.pdf
+++ b/macros/latex/contrib/univie-ling/doc/templates/template-paper-deutsch.pdf
Binary files differ
diff --git a/macros/latex/contrib/univie-ling/doc/templates/template-paper-english.pdf b/macros/latex/contrib/univie-ling/doc/templates/template-paper-english.pdf
index 49efca45fa..c31d116e01 100644
--- a/macros/latex/contrib/univie-ling/doc/templates/template-paper-english.pdf
+++ b/macros/latex/contrib/univie-ling/doc/templates/template-paper-english.pdf
Binary files differ
diff --git a/macros/latex/contrib/univie-ling/doc/templates/template-poster-deutsch.pdf b/macros/latex/contrib/univie-ling/doc/templates/template-poster-deutsch.pdf
index f2260ffeb4..f360e7c012 100644
--- a/macros/latex/contrib/univie-ling/doc/templates/template-poster-deutsch.pdf
+++ b/macros/latex/contrib/univie-ling/doc/templates/template-poster-deutsch.pdf
Binary files differ
diff --git a/macros/latex/contrib/univie-ling/doc/templates/template-poster-english.pdf b/macros/latex/contrib/univie-ling/doc/templates/template-poster-english.pdf
index b16ccfe334..5bf3cd252d 100644
--- a/macros/latex/contrib/univie-ling/doc/templates/template-poster-english.pdf
+++ b/macros/latex/contrib/univie-ling/doc/templates/template-poster-english.pdf
Binary files differ
diff --git a/macros/latex/contrib/univie-ling/doc/templates/template-thesis-deutsch.pdf b/macros/latex/contrib/univie-ling/doc/templates/template-thesis-deutsch.pdf
index 9673abfdb0..359b3b6f72 100644
--- a/macros/latex/contrib/univie-ling/doc/templates/template-thesis-deutsch.pdf
+++ b/macros/latex/contrib/univie-ling/doc/templates/template-thesis-deutsch.pdf
Binary files differ
diff --git a/macros/latex/contrib/univie-ling/doc/templates/template-thesis-english.pdf b/macros/latex/contrib/univie-ling/doc/templates/template-thesis-english.pdf
index 0d550fa286..1ce56a0d18 100644
--- a/macros/latex/contrib/univie-ling/doc/templates/template-thesis-english.pdf
+++ b/macros/latex/contrib/univie-ling/doc/templates/template-thesis-english.pdf
Binary files differ
diff --git a/macros/latex/contrib/univie-ling/doc/templates/template-wlg-article.pdf b/macros/latex/contrib/univie-ling/doc/templates/template-wlg-article.pdf
index 8a1d9155c6..b1e35c6bf2 100644
--- a/macros/latex/contrib/univie-ling/doc/templates/template-wlg-article.pdf
+++ b/macros/latex/contrib/univie-ling/doc/templates/template-wlg-article.pdf
Binary files differ
diff --git a/macros/latex/contrib/univie-ling/doc/templates/template-wlg-review.pdf b/macros/latex/contrib/univie-ling/doc/templates/template-wlg-review.pdf
index f811c049e4..182538d779 100644
--- a/macros/latex/contrib/univie-ling/doc/templates/template-wlg-review.pdf
+++ b/macros/latex/contrib/univie-ling/doc/templates/template-wlg-review.pdf
Binary files differ
diff --git a/macros/latex/contrib/univie-ling/doc/univie-ling-bbx.pdf b/macros/latex/contrib/univie-ling/doc/univie-ling-bbx.pdf
new file mode 100644
index 0000000000..e5dabdf587
--- /dev/null
+++ b/macros/latex/contrib/univie-ling/doc/univie-ling-bbx.pdf
Binary files differ
diff --git a/macros/latex/contrib/univie-ling/doc/univie-ling-bbx.tex b/macros/latex/contrib/univie-ling/doc/univie-ling-bbx.tex
new file mode 100644
index 0000000000..42e2311377
--- /dev/null
+++ b/macros/latex/contrib/univie-ling/doc/univie-ling-bbx.tex
@@ -0,0 +1,238 @@
+% !TeX spellcheck = en_US
+\documentclass[english]{article}
+
+\usepackage[osf]{libertine}
+\usepackage[scaled=0.7]{beramono}
+\usepackage[T1]{fontenc}
+\usepackage[latin9]{inputenc}
+\usepackage[hyphens]{url}
+\usepackage{csquotes}
+\usepackage[pdfusetitle,
+ bookmarks=true,bookmarksnumbered=false,bookmarksopen=false,
+ breaklinks=false,pdfborder={0 0 0},backref=false,colorlinks=false]
+ {hyperref}
+
+% Tweak the TOC (make it more compact)
+\usepackage{tocloft}
+\setlength{\cftaftertoctitleskip}{6pt}
+\setlength{\cftbeforesecskip}{0pt}
+\setlength{\cftbeforesubsecskip}{0pt}
+\renewcommand{\cfttoctitlefont}{\normalsize\bfseries}
+\renewcommand{\cftsecfont}{\small\bfseries}
+\renewcommand{\cftsecpagefont}{\small\bfseries}
+\renewcommand{\cftsubsecfont}{\small}
+\renewcommand{\cftsubsecpagefont}{\small}
+
+% markup
+\newcommand*\jmacro[1]{\textbf{\texttt{#1}}}
+\newcommand*\jcsmacro[1]{\jmacro{\textbackslash{#1}}}
+\newcommand*\joption[1]{\textbf{\texttt{#1}}}
+\newcommand*\jfmacro[1]{\texttt{#1}}
+\newcommand*\jfcsmacro[1]{\jfmacro{\textbackslash{#1}}}
+
+% macros
+\newcommand*\uvlt{\textsf{univie-ling biblatex}}
+\providecommand{\LyX}{\texorpdfstring{L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\@}{LyX}}
+
+% improve layout
+\tolerance 1414
+\hbadness 1414
+\emergencystretch 1.5em
+\hfuzz 0.3pt
+\widowpenalty = 10000
+\vfuzz \hfuzz
+\raggedbottom
+
+% Conditional pagebreak
+\def\condbreak#1{%
+ \vskip 0pt plus #1\pagebreak[3]\vskip 0pt plus -#1\relax}
+
+\usepackage{microtype}
+
+\usepackage{babel}
+
+\usepackage{listings}
+\lstset{language={[LaTeX]TeX},
+ basicstyle={\small\ttfamily},
+ frame=single}
+
+\setcounter{tocdepth}{2}
+
+\begin{document}
+
+\title{The \uvlt\ styles}
+
+\author{\texorpdfstring{Jrgen Spitzmller%
+\thanks{Please report issues via \protect\url{https://github.com/jspitz/univie-ling}.}}{Jrgen Spitzmller}}
+
+\date{Version 2.9, 2024/09/28}
+
+\maketitle
+
+\begin{abstract}
+\noindent The \uvlt\ styles provide citation and bibliography styles that conform to the style guide of the Linguistic Department
+of Vienna University which itself follows the \emph{Unified Style Sheet for Linguistic Papers}.
+This manual documents the style.
+\end{abstract}
+
+\tableofcontents
+
+\section{Aims and scope}
+
+The \uvlt\ styles include a \textsf{biblatex} bibliography style (\texttt{univie-ling.bbx}) and a citation style
+(\texttt{univie-ling.cbx}) that implement the citation conventions common in Viennese (Applied) Linguistics.
+The styles draw on the \emph{Unified Style Sheet for Linguistic Papers}.%
+\footnote{See \url{https://www.linguisticsociety.org/sites/default/files/style-sheet_0.pdf}.}
+
+\section{Requirements of \uvlt}\label{sec:req-jslp}
+
+The following class and packages are required and loaded by \uvlt:
+\begin{itemize}
+ \setlength\itemsep{0pt}
+ \item \textsf{biblatex}: Contemporary bibliography support.
+ \item \textsf{biber}: Bibliography processor for biblatex.
+\end{itemize}
+
+\section{Use}\label{use}
+
+There is not much to say here. The styles are used as any other \textsf{biblatex} styles: You load them via the
+\joption{style} option of biblatex (\joption{style=univie-ling} in this case), pass additional options here as well
+and use the citation and bibliography commands documented in the \textsf{biblatex} manual \cite{bibltx}.
+
+\section{Style-specific Options}\label{options}
+
+On top of the options provided by the \textsf{biblatex} package itself (see \cite{bibltx}), the \uvlt\ styles provide
+a couple of specific options:
+\begin{description}
+ \setlength\itemsep{0pt}
+ \item{\joption{annotations=true|false}}: if \joption{true}, the contents of the \texttt{annotation} or \texttt{annot} field
+ of your Bib\TeX\ entry are output (in a separate indented paragraph that follows the entry). Use this to generate annotated
+ bibliographies. The options is \joption{false} by default.
+
+ Annotations might also be stored in separate files as documented in \cite[sec.~3.14.8]{bibltx}.
+ \item{\joption{issueeditor=true|false}}: if \joption{true}, editors of journal special issues are output.
+ The options is \joption{false} by default.
+\end{description}
+
+\section{Release History}
+
+\begin{description}
+ \item 2024/09/28 (v.\,2.9)
+ \begin{itemize}
+ \item Add option \joption{annotations} which, if \joption{true},
+ will print out the \texttt{annotation} field
+ (useful for annotated bibliographies).
+ \item Add this manual.
+ \end{itemize}
+ \item 2024/09/20 (v.\,2.8)
+ \item 2024/07/23 (v.\,2.7)
+ \item 2024/06/27 (v.\,2.6)
+ \item 2024/05/09 (v.\,2.5)
+ \item 2023/03/31 (v.\,2.4)
+ \item 2023/01/26 (v.\,2.3)
+ \item 2022/12/06 (v.\,2.2)
+ \item 2022/10/21 (v.\,2.1)
+ \item 2022/10/02 (v.\,2.0)
+ \item 2022/09/08 (v.\,1.20)
+ \begin{itemize}
+ \item No change to these styles.
+ \end{itemize}
+ \item 2022/06/18 (v.\,1.19)
+ \begin{itemize}
+ \item properly re-define a macro in the citations style.
+ \end{itemize}
+ \item 2022/05/11 (v.\,1.18)
+ \begin{itemize}
+ \item No change to these styles.
+ \end{itemize}
+ \item 2022/02/05 (v.\,1.17)
+ \begin{itemize}
+ \item Draw on authoryear-comp rather than uncompressed
+ version (in line with major journal's interpretation
+ of the unified style sheet)
+ \end{itemize}
+ \item 2021/11/03 (v.\,1.16)
+ \begin{itemize}
+ \item No change to these styles.
+ \end{itemize}
+ \item 2021/10/19 (v.\,1.15)
+ \begin{itemize}
+ \item Output url date only if url is given (not with DOI).
+ \item Fix emphasizing of journal title.
+ \end{itemize}
+ \item 2021/09/01 (v.\,1.14)
+ \begin{itemize}
+ \item Sentence-case journal issue title and online title.
+ \item Emphasize journal subtitle.
+ \end{itemize}
+ \item 2020/11/11 (v.\,1.13)
+ \begin{itemize}
+ \item Fix whitespace issue in thematic issue string.
+ \end{itemize}
+ \item 2020/06/25 (v.\,1.12)
+ \begin{itemize}
+ \item only output origyear if it differs from year.
+ \end{itemize}
+ \item 2020/05/05 (v.\,1.11)
+ \begin{itemize}
+ \item No change to these styles.
+ \end{itemize}
+ \item 2019/05/01 (v.\,1.10)
+ \begin{itemize}
+ \item only print origyear (not full origdate) in label.
+ \item fix title capitalization in inbook, mvbook and mvcollection types.
+ \end{itemize}
+ \item 2019/01/21 (v.\,1.9)
+ \begin{itemize}
+ \item correct fix of duplicate editorstrg parentheses.
+ \end{itemize}
+ \item 2019/01/15 (v.\,1.8)
+ \begin{itemize}
+ \item fix another whitespace issue.
+ \item fix duplicate editorstrg parentheses.
+ \end{itemize}
+ \item 2018/11/07 (v.\,1.7)
+ \begin{itemize}
+ \item fix some whitespace issues.
+ \end{itemize}
+ \item 2018/11/04 (v.\,1.6)
+ \begin{itemize}
+ \item univie-ling.bbx: fix bookauthor with inbook type.
+ \end{itemize}
+ \item 2018/09/03 (v.\,1.5)
+ \begin{itemize}
+ \item No change to these styles.
+ \end{itemize}
+ \item 2018/03/02 (v.\,1.4)
+ \begin{itemize}
+ \item Fix journal dates (if month and day is given).
+ \end{itemize}
+ \item 2018/03/02 (v.\,1.3)
+ \begin{itemize}
+ \item Fix whitespace issue in \texttt{@inproceedings} entry.
+ \item Specify date output details (era, uncertain etc.).
+ \end{itemize}
+ \item 2018/02/13 (v.\,1.2)
+ \begin{itemize}
+ \item No change to these styles.
+ \end{itemize}
+ \item 2018/02/11 (v.\,1.1)
+ \begin{itemize}
+ \item Fixed location list output wrt the Unfied Style Sheet.
+ \item Link DOIs to preferred resolver (thanks, Katrin Leinweber!)
+ \end{itemize}
+ \item 2018/02/08 (v.\,1.0)
+ \begin{itemize}
+ \item Initial release on CTAN.
+ \end{itemize}
+\end{description}
+
+\begin{thebibliography}{1}
+
+\bibitem{bibltx} Lehman, Philipp (with Audrey Boruvka, Philip Kime and Joseph Wright):
+\emph{The biblatex Package. Programmable Bibliographies and Citations}. March 3, 2016.
+\url{http://www.ctan.org/pkg/biblatex}.
+
+\end{thebibliography}
+
+\end{document}
diff --git a/macros/latex/contrib/univie-ling/doc/univie-ling-expose.pdf b/macros/latex/contrib/univie-ling/doc/univie-ling-expose.pdf
index 7efd2c2f36..2ab3d7bf0d 100644
--- a/macros/latex/contrib/univie-ling/doc/univie-ling-expose.pdf
+++ b/macros/latex/contrib/univie-ling/doc/univie-ling-expose.pdf
Binary files differ
diff --git a/macros/latex/contrib/univie-ling/doc/univie-ling-expose.tex b/macros/latex/contrib/univie-ling/doc/univie-ling-expose.tex
index c3d1c66805..0322456eae 100644
--- a/macros/latex/contrib/univie-ling/doc/univie-ling-expose.tex
+++ b/macros/latex/contrib/univie-ling/doc/univie-ling-expose.tex
@@ -63,7 +63,7 @@
\author{\texorpdfstring{Jrgen Spitzmller%
\thanks{Please report issues via \protect\url{https://github.com/jspitz/univie-ling}.}}{Jrgen Spitzmller}}
-\date{Version 2.7, 2024/07/23}
+\date{Version 2.9, 2024/09/28}
\maketitle
@@ -336,13 +336,31 @@ If you want to use APA/DGPs style, consider the following caveats.
for details.
\end{itemize}
-\subsection{Using a different style}\label{sec:bib-different}
+\subsection{Using a different style or not using biblatex}\label{sec:bib-different}
If you do not want or are not supposed to use neither the default Unified nor the APA/DGPs style, you can disable automatic \textsf{biblatex} loading via the class option \joption{biblatex=false} (see sec.~\ref{packageloading}). In this case, you will need to load
your own style manually, by entering the respective \textsf{biblatex} or Bib\TeX\ commands.
One case where you need to do that is if you prefer classic Bib\TeX\ over \textsf{biblatex}.
-If you want to follow the Applied Linguistics conventions, but prefer classic Bib\TeX\ over \textsf{biblatex}, a Bib\TeX\ style file \textsf{unified.bst} that implements the \emph{Unified Style Sheet for Linguistics} is available on the Internet.\footnote{\url{http://celxj.org/downloads/unified.bst}} Note, though, that this package does not have specific support for German, so it is only really suitable if you write in English. Thus, if you want to follow the Applied Linguistics conventions, it is strongly recommended that you use \textsf{biblatex} with the preloaded \textsf{univie-ling} style.
+If you want to follow the Applied Linguistics conventions, but prefer classic Bib\TeX\ over \textsf{biblatex}, a (seemingly unmaintained) Bib\TeX\ style file \textsf{unified.bst} that implements the \emph{Unified Style Sheet for Linguistics} is available on the Internet.\footnote{A copy is at \url{https://raw.githubusercontent.com/jspitz/univie-ling/master/3rdparty/unified.bst}.} This style produces English output, a localized version for German,
+\textsf{unified-de.bst}, is available as well.\footnote{See \url{https://raw.githubusercontent.com/jspitz/univie-ling/master/3rdparty/unified-de.bst}.}
+Both styles require the \textsf{natbib} package to be loaded.
+Note, though, that both styles provide only very rudimentary support for the Unified Style Sheet. Thus, if you want to follow the Applied Linguistics conventions
+really strictly, it is strongly recommended that you use \textsf{biblatex} with the preloaded \textsf{univie-ling} style.
+
+It is also possible (though not recommended) to use the \texttt{thebibliography} environment if,
+for some reason, you do not want to use \textsf{biblatex} nor Bib\TeX. Of course, in this case you are all responsible for the
+proper formatting of the entries. If you decide for this, you must load the \textsf{natbib} package and use the
+syntax documented in the natbib manual (\cite[sec.~1]{natbib}) for the proper setup of bibitems, e.\,g.,\footnote{%
+ Note the missing space before and after the parentheses that mark the year!}
+
+\begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single,morekeywords={bibitem}]
+\bibitem[Jones et al.(1990)Jones, Baker, & Williams]{jon90}
+ Jones, Baker, & Williams. 1990. ...
+\end{lstlisting}
+%
+(Only) if \textsf{natbib} is loaded, \uvlt\ will take care that the spacing with the \texttt{thebibliography} environment
+is correct.
\section{Further instructions}
@@ -370,6 +388,15 @@ Templates are provided as well:
\section{Release History}
\begin{itemize}
+ \item 2024/09/28 (v.\,2.9)
+ \begin{itemize}
+ \item No change to this class.
+ \end{itemize}
+ \item 2024/09/20 (v.\,2.8)
+ \begin{itemize}
+ \item Add basic support for \texttt{thebibliography} environment.
+ \item Update documentation on bibliography beyond \textsf{biblatex}.
+ \end{itemize}
\item 2024/07/23 (v.\,2.7)
\begin{itemize}
\item Fix spacing after \jfcsmacro{weblink}.
@@ -474,6 +501,10 @@ Templates are provided as well:
\emph{The covington Package. Macros for Linguistics}. September 7, 2018.
\url{http://www.ctan.org/pkg/covington}.
+\bibitem{natbib} Daly, Patrick W.:
+\emph{Natural Sciences Citations and References}. September 13, 2010.
+\url{http://www.ctan.org/pkg/natbib}.
+
\bibitem{apabibltx} Kime, Philip:
\emph{APA Bib\LaTeX\ style. Citation and References macros for Bib\LaTeX}. March 3, 2016.
\url{http://www.ctan.org/pkg/biblatex-apa}.
diff --git a/macros/latex/contrib/univie-ling/doc/univie-ling-handout.pdf b/macros/latex/contrib/univie-ling/doc/univie-ling-handout.pdf
index a253d4003e..dfce2b438a 100644
--- a/macros/latex/contrib/univie-ling/doc/univie-ling-handout.pdf
+++ b/macros/latex/contrib/univie-ling/doc/univie-ling-handout.pdf
Binary files differ
diff --git a/macros/latex/contrib/univie-ling/doc/univie-ling-handout.tex b/macros/latex/contrib/univie-ling/doc/univie-ling-handout.tex
index bdd72da44e..52bca62e0f 100644
--- a/macros/latex/contrib/univie-ling/doc/univie-ling-handout.tex
+++ b/macros/latex/contrib/univie-ling/doc/univie-ling-handout.tex
@@ -63,7 +63,7 @@
\author{\texorpdfstring{Jrgen Spitzmller%
\thanks{Please report issues via \protect\url{https://github.com/jspitz/univie-ling}.}}{Jrgen Spitzmller}}
-\date{Version 2.7, 2024/07/23}
+\date{Version 2.9, 2024/09/28}
\maketitle
@@ -373,13 +373,31 @@ If you want to use APA/DGPs style, consider the following caveats.
for details.
\end{itemize}
-\subsection{Using a different style}\label{sec:bib-different}
+\subsection{Using a different style or not using biblatex}\label{sec:bib-different}
If you do not want or are not supposed to use neither the default Unified nor the APA/DGPs style, you can disable automatic \textsf{biblatex} loading via the class option \joption{biblatex=false} (see sec.~\ref{packageloading}). In this case, you will need to load
your own style manually, by entering the respective \textsf{biblatex} or Bib\TeX\ commands.
One case where you need to do that is if you prefer classic Bib\TeX\ over \textsf{biblatex}.
-If you want to follow the Applied Linguistics conventions, but prefer classic Bib\TeX\ over \textsf{biblatex}, a Bib\TeX\ style file \textsf{unified.bst} that implements the \emph{Unified Style Sheet for Linguistics} is available on the Internet.\footnote{\url{http://celxj.org/downloads/unified.bst}} Note, though, that this package does not have specific support for German, so it is only really suitable if you write in English. Thus, if you want to follow the Applied Linguistics conventions, it is strongly recommended that you use \textsf{biblatex} with the preloaded \textsf{univie-ling} style.
+If you want to follow the Applied Linguistics conventions, but prefer classic Bib\TeX\ over \textsf{biblatex}, a (seemingly unmaintained) Bib\TeX\ style file \textsf{unified.bst} that implements the \emph{Unified Style Sheet for Linguistics} is available on the Internet.\footnote{A copy is at \url{https://raw.githubusercontent.com/jspitz/univie-ling/master/3rdparty/unified.bst}.} This style produces English output, a localized version for German,
+\textsf{unified-de.bst}, is available as well.\footnote{See \url{https://raw.githubusercontent.com/jspitz/univie-ling/master/3rdparty/unified-de.bst}.}
+Both styles require the \textsf{natbib} package to be loaded.
+Note, though, that both styles provide only very rudimentary support for the Unified Style Sheet. Thus, if you want to follow the Applied Linguistics conventions
+really strictly, it is strongly recommended that you use \textsf{biblatex} with the preloaded \textsf{univie-ling} style.
+
+It is also possible (though not recommended) to use the \texttt{thebibliography} environment if,
+for some reason, you do not want to use \textsf{biblatex} nor Bib\TeX. Of course, in this case you are all responsible for the
+proper formatting of the entries. If you decide for this, you must load the \textsf{natbib} package and use the
+syntax documented in the natbib manual (\cite[sec.~1]{natbib}) for the proper setup of bibitems, e.\,g.,\footnote{%
+ Note the missing space before and after the parentheses that mark the year!}
+
+\begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single,morekeywords={bibitem}]
+\bibitem[Jones et al.(1990)Jones, Baker, & Williams]{jon90}
+ Jones, Baker, & Williams. 1990. ...
+\end{lstlisting}
+%
+(Only) if \textsf{natbib} is loaded, \uvlt\ will take care that the spacing with the \texttt{thebibliography} environment
+is correct.
\subsection{Heading}
@@ -415,6 +433,11 @@ Templates are provided as well:
\section{Release History}
\begin{description}
+ \item 2024/09/20 (v.\,2.8)
+ \begin{itemize}
+ \item Add basic support for \texttt{thebibliography} environment.
+ \item Update documentation on bibliography beyond \textsf{biblatex}.
+ \end{itemize}
\item 2024/07/23 (v.\,2.7)
\begin{itemize}
\item Fix spacing after \jfcsmacro{weblink}.
@@ -467,6 +490,10 @@ Templates are provided as well:
\emph{The covington Package. Macros for Linguistics}. September 7, 2018.
\url{http://www.ctan.org/pkg/covington}.
+\bibitem{natbib} Daly, Patrick W.:
+\emph{Natural Sciences Citations and References}. September 13, 2010.
+\url{http://www.ctan.org/pkg/natbib}.
+
\bibitem{apabibltx} Kime, Philip:
\emph{APA Bib\LaTeX\ style. Citation and References macros for Bib\LaTeX}. March 3, 2016.
\url{http://www.ctan.org/pkg/biblatex-apa}.
diff --git a/macros/latex/contrib/univie-ling/doc/univie-ling-paper.pdf b/macros/latex/contrib/univie-ling/doc/univie-ling-paper.pdf
index e04efcd52f..c3db12b025 100644
--- a/macros/latex/contrib/univie-ling/doc/univie-ling-paper.pdf
+++ b/macros/latex/contrib/univie-ling/doc/univie-ling-paper.pdf
Binary files differ
diff --git a/macros/latex/contrib/univie-ling/doc/univie-ling-paper.tex b/macros/latex/contrib/univie-ling/doc/univie-ling-paper.tex
index d6f5293a89..1bb8ca3cb5 100644
--- a/macros/latex/contrib/univie-ling/doc/univie-ling-paper.tex
+++ b/macros/latex/contrib/univie-ling/doc/univie-ling-paper.tex
@@ -63,7 +63,7 @@
\author{\texorpdfstring{Jrgen Spitzmller%
\thanks{Please report issues via \protect\url{https://github.com/jspitz/univie-ling}.}}{Jrgen Spitzmller}}
-\date{Version 2.7, 2024/07/23}
+\date{Version 2.9, 2024/09/28}
\maketitle
@@ -376,13 +376,31 @@ If you want to use APA/DGPs style, consider the following caveats.
for details.
\end{itemize}
-\subsection{Using a different style}\label{sec:bib-different}
+\subsection{Using a different style or not using biblatex}\label{sec:bib-different}
If you do not want or are not supposed to use neither the default Unified nor the APA/DGPs style, you can disable automatic \textsf{biblatex} loading via the class option \joption{biblatex=false} (see sec.~\ref{packageloading}). In this case, you will need to load
your own style manually, by entering the respective \textsf{biblatex} or Bib\TeX\ commands.
One case where you need to do that is if you prefer classic Bib\TeX\ over \textsf{biblatex}.
-If you want to follow the Applied Linguistics conventions, but prefer classic Bib\TeX\ over \textsf{biblatex}, a Bib\TeX\ style file \textsf{unified.bst} that implements the \emph{Unified Style Sheet for Linguistics} is available on the Internet.\footnote{\url{http://celxj.org/downloads/unified.bst}} Note, though, that this package does not have specific support for German, so it is only really suitable if you write in English. Thus, if you want to follow the Applied Linguistics conventions, it is strongly recommended that you use \textsf{biblatex} with the preloaded \textsf{univie-ling} style.
+If you want to follow the Applied Linguistics conventions, but prefer classic Bib\TeX\ over \textsf{biblatex}, a (seemingly unmaintained) Bib\TeX\ style file \textsf{unified.bst} that implements the \emph{Unified Style Sheet for Linguistics} is available on the Internet.\footnote{A copy is at \url{https://raw.githubusercontent.com/jspitz/univie-ling/master/3rdparty/unified.bst}.} This style produces English output, a localized version for German,
+\textsf{unified-de.bst}, is available as well.\footnote{See \url{https://raw.githubusercontent.com/jspitz/univie-ling/master/3rdparty/unified-de.bst}.}
+Both styles require the \textsf{natbib} package to be loaded.
+Note, though, that both styles provide only very rudimentary support for the Unified Style Sheet. Thus, if you want to follow the Applied Linguistics conventions
+really strictly, it is strongly recommended that you use \textsf{biblatex} with the preloaded \textsf{univie-ling} style.
+
+It is also possible (though not recommended) to use the \texttt{thebibliography} environment if,
+for some reason, you do not want to use \textsf{biblatex} nor Bib\TeX. Of course, in this case you are all responsible for the
+proper formatting of the entries. If you decide for this, you must load the \textsf{natbib} package and use the
+syntax documented in the natbib manual (\cite[sec.~1]{natbib}) for the proper setup of bibitems, e.\,g.,\footnote{%
+ Note the missing space before and after the parentheses that mark the year!}
+
+\begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single,morekeywords={bibitem}]
+\bibitem[Jones et al.(1990)Jones, Baker, & Williams]{jon90}
+ Jones, Baker, & Williams. 1990. ...
+\end{lstlisting}
+%
+(Only) if \textsf{natbib} is loaded, \uvlt\ will take care that the spacing with the \texttt{thebibliography} environment
+is correct.
\section{Further instructions}
@@ -411,6 +429,15 @@ Templates are provided as well:
\section{Release History}
\begin{itemize}
+ \item 2024/09/28 (v.\,2.9)
+ \begin{itemize}
+ \item No change to this class.
+ \end{itemize}
+ \item 2024/09/20 (v.\,2.8)
+ \begin{itemize}
+ \item Add basic support for \texttt{thebibliography} environment.
+ \item Update documentation on bibliography beyond \textsf{biblatex}.
+ \end{itemize}
\item 2024/07/23 (v.\,2.7)
\begin{itemize}
\item Fix spacing after \jfcsmacro{weblink}.
@@ -520,6 +547,10 @@ Templates are provided as well:
\emph{The covington Package. Macros for Linguistics}. September 7, 2018.
\url{http://www.ctan.org/pkg/covington}.
+\bibitem{natbib} Daly, Patrick W.:
+\emph{Natural Sciences Citations and References}. September 13, 2010.
+\url{http://www.ctan.org/pkg/natbib}.
+
\bibitem{apabibltx} Kime, Philip:
\emph{APA Bib\LaTeX\ style. Citation and References macros for Bib\LaTeX}. March 3, 2016.
\url{http://www.ctan.org/pkg/biblatex-apa}.
diff --git a/macros/latex/contrib/univie-ling/doc/univie-ling-poster.pdf b/macros/latex/contrib/univie-ling/doc/univie-ling-poster.pdf
index 06d64c7638..a5648d9518 100644
--- a/macros/latex/contrib/univie-ling/doc/univie-ling-poster.pdf
+++ b/macros/latex/contrib/univie-ling/doc/univie-ling-poster.pdf
Binary files differ
diff --git a/macros/latex/contrib/univie-ling/doc/univie-ling-poster.tex b/macros/latex/contrib/univie-ling/doc/univie-ling-poster.tex
index 1985658b78..f95f7a3e8a 100644
--- a/macros/latex/contrib/univie-ling/doc/univie-ling-poster.tex
+++ b/macros/latex/contrib/univie-ling/doc/univie-ling-poster.tex
@@ -65,7 +65,7 @@
\author{\texorpdfstring{Jrgen Spitzmller%
\thanks{Please report issues via \protect\url{https://github.com/jspitz/univie-ling}.}}{Jrgen Spitzmller}}
-\date{Version 2.7, 2024/07/23}
+\date{Version 2.9, 2024/09/28}
\maketitle
diff --git a/macros/latex/contrib/univie-ling/doc/univie-ling-thesis.pdf b/macros/latex/contrib/univie-ling/doc/univie-ling-thesis.pdf
index b77ad97265..e5c13243f9 100644
--- a/macros/latex/contrib/univie-ling/doc/univie-ling-thesis.pdf
+++ b/macros/latex/contrib/univie-ling/doc/univie-ling-thesis.pdf
Binary files differ
diff --git a/macros/latex/contrib/univie-ling/doc/univie-ling-thesis.tex b/macros/latex/contrib/univie-ling/doc/univie-ling-thesis.tex
index 2feb157bce..ea85ab9bca 100644
--- a/macros/latex/contrib/univie-ling/doc/univie-ling-thesis.tex
+++ b/macros/latex/contrib/univie-ling/doc/univie-ling-thesis.tex
@@ -59,7 +59,7 @@
\author{\texorpdfstring{Jrgen Spitzmller%
\thanks{Please report issues via \protect\url{https://github.com/jspitz/univie-ling}.}}{Jrgen Spitzmller}}
-\date{Version 2.7, 2024/07/23}
+\date{Version 2.9, 2024/09/28}
\maketitle
@@ -107,7 +107,7 @@ The following packages are required for specific features and loaded by default.
\begin{itemize}
\setlength\itemsep{0pt}
\item \textsf{mathptmx}: Default serif font (\emph{Palatino}).
- \item \textsf{urw-arial} or \textsf{helvet}: Default sans serif font (\emph{Arial} or \emph{Helvetica}).
+ \item \textsf{sourcesanspro}: Default sans serif font (\emph{Source Sans Pro}).
\item \textsf{sourcecodepro}: Default monospaced font (\emph{Source Code Pro}).
\item \textsf{biblatex}: Contemporary bibliography support.
\item \textsf{caption}: Caption layout adjustments.
@@ -129,24 +129,18 @@ The following packages are required for optional features (not used by default):
\section{Fonts}\label{fonts}
-The class uses, by default, PostScript (a.\,k.\,a. Type\,1) fonts and thus requires classic (PDF)LaTeX. Optionally, however, you can also use OpenType fonts via the \textsf{fontspec}
-package and the XeTeX or LuaTeX engine instead. In order to do this, use the class option \joption{fonts=otf} (see sec.~\ref{coptions} for details).
+The class uses, by default, PostScript (a.\,k.\,a. Type\,1) fonts and thus requires classic (PDF)LaTeX. Optionally, however, you can also use OpenType fonts via the \textsf{fontspec} package and the XeTeX or LuaTeX engine instead. In order to do this, use the class option \joption{fonts=otf} (see sec.~\ref{coptions} for details).
-In both cases, the class uses by default \emph{Palatino} as a serif font, \emph{Arial} (or, alternatively, \emph{Helvetica}) as a sans serif font, and \emph{Source Code Pro}
-as a monospaced (typewriter) font. Note that \emph{Arial} (PostScript) font support is not
-included in most \LaTeX\ distributions by default, due to license reasons. You can install it easily via the \textsf{getnonfreefonts} script.\footnote{\url{https://www.tug.org/fonts/getnonfreefonts}
-<25.\,01.\,2017>.}
-If \emph{Arial} is not installed, however, \emph{Helvetica} (which is part of the \LaTeX\ core packages) is used as a fallback. This is usually a suitable alternative, since \emph{Arial} and
-\emph{Helvetica} only differ in subtle details. If you use \joption{fonts=otf}, you just have to make sure that you have the fonts \emph{Arial}, \emph{Palatino}
-and \emph{Source Code Pro} installed on your operating system (with exactly these names, i.\,e., fonts named \emph{Arial Unicode MS} or \emph{Linotype Palatino} will not be recognized!).
+In both cases, the class uses by default \emph{Palatino} as a serif font (or the clone \emph{TeX Gyre Pagella} with OpenType, for that matter),
+\emph{Source Sans Pro} as a sans serif font, and \emph{Source Code Pro} as a monospaced (typewriter) font.
-As to font selection: \emph{Arial} is used in the official title page template\footnote{See \url{https://ssc-philkultur.univie.ac.at/en/degree-programmes/doctoral-programme/doctoral-thesis/}.}, so I used that (with the mentioned fallback, \emph{Helvetica}).
+As to font selection: \emph{Source Sans Pro} is used in the official title page template which is nowadays auto-generated by the theses server,
+so I used that.
A serif font recommendation is not given. The corporate design manual of the university suggests \emph{Source Serif Pro}, but this font is
-too heavy for a thesis (and we cannot use the suggested sans, \emph{Source Sans Pro}, anyway). A somewhat standard for academic papers
-and theses is \emph{Times New Roman}, but I think this runs too small for the text block size we have (as the name suggests, this font
-has been developed for the small columns of newspapers), and it is also pretty overused. The selected font, \emph{Palatino}, in contrast,
-suits well to wider text lines, it is well supported in \LaTeX, and it fits with \emph{Helvetica}. The monospaced font, \emph{Source Code Pro},
-is a good companion to this pair.
+too heavy for a thesis. A somewhat standard for academic papers and theses is \emph{Times New Roman}, but I think this runs too small for
+the text block size we have (as the name suggests, this font has been developed for the small columns of newspapers), and it is also pretty overused.
+The selected font, \emph{Palatino}, in contrast, suits well to wider text lines, it is well supported in \LaTeX, and it fits with \emph{Source Sans Pro}.
+The monospaced font, \emph{Source Code Pro}, is a good companion to this pair.
If you (or your instructor) prefer(s) \emph{Times New Roman} over \emph{Palatino} nonetheless, write to your preamble
\begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single]
@@ -190,7 +184,8 @@ The class provides the following option to set the font handling:
\setlength\itemsep{0pt}
\item{\joption{fonts=ps|otf|none}}: if \joption{ps} is selected, PostScript fonts are used (this is the default and
the correct choice if you use LaTeX or PDFLaTeX); if \joption{otf} is selected, OpenType fonts are used, the class
- loads the \textsf{fontspec} package, sets \emph{Palatino} as main font and \emph{Arial} as sans serif font (this is
+ loads the \textsf{fontspec} package, sets \emph{Palatino} as main font, \emph{Source Sans Pro} as sans serif font,
+ and \emph{Source Code Pro} as monospaced font (this is
the correct choice if you use XeTeX or LuaTeX; make sure you have the respective fonts installed on your system);
if \joption{none} is selected, finally, the class will not load any font package at all, and neither
\textsf{fontenc} (this choice is useful if you want to control the font handling completely yourself).
@@ -239,6 +234,14 @@ option (e.\,g., \joption{all=false,microtype=true} will switch off all packages
The option \joption{draftmark=true|false|firstpage} allows you to mark your document as a draft, which is indicated by a watermark (including the current date). This might be useful when sharing preliminary versions with your supervisor.
With \joption{draftmark=true}, this mark is printed on top of each page. With \joption{draftmark=firstpage}, the draft mark appears on the title page only.
+
+\subsection{Title page}\label{titlepage}
+
+As of 2024, MA and PhD theses must be submitted to the \textsf{u:space} platform without a title page (the title page will then be generated by the platform from the data
+you fill in there).
+
+Use the option \joption{titlepage=false} to suppress the title page for this purpose. The pagination will remain the same as with titlepage (i.\,e., the document starts at page 2).
+
\subsection{Further options}
\begin{description}
@@ -378,13 +381,31 @@ If you want to use APA/DGPs style, consider the following caveats.
for details.
\end{itemize}
-\subsection{Using a different style}\label{sec:bib-different}
+\subsection{Using a different style or not using \textsf{biblatex}}\label{sec:bib-different}
If you do not want or are not supposed to use neither the default Unified nor the APA/DGPs style, you can disable automatic \textsf{biblatex} loading via the class option \joption{biblatex=false} (see sec.~\ref{packageloading}). In this case, you will need to load
your own style manually, by entering the respective \textsf{biblatex} or Bib\TeX\ commands.
One case where you need to do that is if you prefer classic Bib\TeX\ over \textsf{biblatex}.
-If you want to follow the Applied Linguistics conventions, but prefer classic Bib\TeX\ over \textsf{biblatex}, a Bib\TeX\ style file \textsf{unified.bst} that implements the \emph{Unified Style Sheet for Linguistics} is available on the Internet.\footnote{\url{http://celxj.org/downloads/unified.bst}} Note, though, that this package does not have specific support for German, so it is only really suitable if you write in English. Thus, if you want to follow the Applied Linguistics conventions, it is strongly recommended that you use \textsf{biblatex} with the preloaded \textsf{univie-ling} style.
+If you want to follow the Applied Linguistics conventions, but prefer classic Bib\TeX\ over \textsf{biblatex}, a (seemingly unmaintained) Bib\TeX\ style file \textsf{unified.bst} that implements the \emph{Unified Style Sheet for Linguistics} is available on the Internet.\footnote{A copy is at \url{https://raw.githubusercontent.com/jspitz/univie-ling/master/3rdparty/unified.bst}.} This style produces English output, a localized version for German,
+\textsf{unified-de.bst}, is available as well.\footnote{See \url{https://raw.githubusercontent.com/jspitz/univie-ling/master/3rdparty/unified-de.bst}.}
+Both styles require the \textsf{natbib} package to be loaded.
+Note, though, that both styles provide only very rudimentary support for the Unified Style Sheet. Thus, if you want to follow the Applied Linguistics conventions
+really strictly, it is strongly recommended that you use \textsf{biblatex} with the preloaded \textsf{univie-ling} style.
+
+It is also possible (though not recommended) to use the \texttt{thebibliography} environment if,
+for some reason, you do not want to use \textsf{biblatex} nor Bib\TeX. Of course, in this case you are all responsible for the
+proper formatting of the entries. If you decide for this, you must load the \textsf{natbib} package and use the
+syntax documented in the natbib manual (\cite[sec.~1]{natbib}) for the proper setup of bibitems, e.\,g.,\footnote{%
+ Note the missing space before and after the parentheses that mark the year!}
+
+\begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single,morekeywords={bibitem}]
+\bibitem[Jones et al.(1990)Jones, Baker, & Williams]{jon90}
+ Jones, Baker, & Williams. 1990. ...
+\end{lstlisting}
+%
+(Only) if \textsf{natbib} is loaded, \uvlt\ will take care that the spacing with the \texttt{thebibliography} environment
+is correct.
\section{Further instructions}
@@ -433,6 +454,19 @@ Templates are provided as well:
\section{Release History}
\begin{itemize}
+ \item 2024/09/28 (v.\,2.9)
+ \begin{itemize}
+ \item No change to this class.
+ \end{itemize}
+ \item 2024/09/20 (v.\,2.8)
+ \begin{itemize}
+ \item Add class option \joption{titlepage=true|false} (see sec.~\ref{titlepage}).
+ \item Adapt title page to recent design. This entails a change of sans serif font
+ from Arial to Source Sans Pro.
+ \item Use \emph{TeX Gyre Pagella} rather than \emph{Palatino} with \joption{fonts=otf}.
+ \item Add basic support for \texttt{thebibliography} environment.
+ \item Update documentation on bibliography beyond \textsf{biblatex}.
+ \end{itemize}
\item 2024/07/23 (v.\,2.7)
\begin{itemize}
\item Fix spacing after \jfcsmacro{weblink}.
@@ -555,6 +589,10 @@ Templates are provided as well:
\emph{The covington Package. Macros for Linguistics}. September 7, 2018.
\url{http://www.ctan.org/pkg/covington}.
+\bibitem{natbib} Daly, Patrick W.:
+\emph{Natural Sciences Citations and References}. September 13, 2010.
+\url{http://www.ctan.org/pkg/natbib}.
+
\bibitem{apabibltx} Kime, Philip:
\emph{APA Bib\LaTeX\ style. Citation and References macros for Bib\LaTeX}. March 3, 2016.
\url{http://www.ctan.org/pkg/biblatex-apa}.
diff --git a/macros/latex/contrib/univie-ling/doc/univie-ling-wlg.pdf b/macros/latex/contrib/univie-ling/doc/univie-ling-wlg.pdf
index f2a5a48dc2..794ff256b0 100644
--- a/macros/latex/contrib/univie-ling/doc/univie-ling-wlg.pdf
+++ b/macros/latex/contrib/univie-ling/doc/univie-ling-wlg.pdf
Binary files differ
diff --git a/macros/latex/contrib/univie-ling/doc/univie-ling-wlg.tex b/macros/latex/contrib/univie-ling/doc/univie-ling-wlg.tex
index 6ca75cc0ed..379ff0485d 100644
--- a/macros/latex/contrib/univie-ling/doc/univie-ling-wlg.tex
+++ b/macros/latex/contrib/univie-ling/doc/univie-ling-wlg.tex
@@ -59,7 +59,7 @@
\author{\texorpdfstring{Jrgen Spitzmller%
\thanks{Please report issues via \protect\url{https://github.com/jspitz/univie-ling}.}}{Jrgen Spitzmller}}
-\date{Version 2.7, 2024/07/23}
+\date{Version 2.9, 2024/09/28}
\maketitle
@@ -259,13 +259,33 @@ Please refer to the \textsf{covington} manual \cite{covington} for details.
\section{Bibliography}\label{bibliography}
-If the class option \joption{biblatex=true} is set, the \uvlt\ class loads a bibliography style which matches journal style sheet. These conventions draw on the
-\emph{Unified Style Sheet for Linguistics} of the LSA (\emph{Linguistic Society of America}).
-In order to conform to this style, the \uvlt\ class uses the \textsf{biblatex} package with the \textsf{univie-ling} style that is included in the \textsf{univie-ling} bundle.
+If the class option \joption{biblatex=true} is set, the \uvlt\ class loads a bibliography style which matches journal style sheet.
+These conventions draw on the \emph{Unified Style Sheet for Linguistics} of the LSA (\emph{Linguistic Society of America}).
+In order to conform to this style, the \uvlt\ class uses the \textsf{biblatex} package with the \textsf{univie-ling}
+style that is included in the \textsf{univie-ling} bundle.
-If, for some reason, you do not want to use \textsf{biblatex} and prefer to have a manually constituted bibliography\footnote{A reason might be that you transform
-a paper submitted in a an office file format to \LaTeX.}, use the \texttt{reflist} environment
-and separate each entry by a blank line. Since this environment is provided by \textsf{covington}, the \joption{covington} options must not be \joption{false}.
+Since there is no Bib\TeX\ style file available that completely matches the journal's style guide, you cannot use
+classic Bib\TeX\ for a paper in the WLG.
+
+It is also possible, however, (though not recommended) to use the \texttt{thebibliography} environment if,
+for some reason, you do not want to use \textsf{biblatex}. Of course, in this case you are all responsible for the
+proper formatting of the entries. If you decide for this, you must load the \textsf{natbib} package and use the
+syntax documented in the natbib manual (\cite[sec.~1]{natbib}) for the proper setup of bibitems, e.\,g.,\footnote{%
+ Note the missing space before and after the parentheses that mark the year!}
+
+\begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single,morekeywords={bibitem}]
+\bibitem[Jones et al.(1990)Jones, Baker, & Williams]{jon90}
+ Jones, Baker, & Williams. 1990. ...
+\end{lstlisting}
+%
+(Only) if \textsf{natbib} is loaded, \uvlt\ will take care that the spacing with the \texttt{thebibliography} environment
+is correct.
+
+Finally, if you prefer to have a completely manually constituted bibliography with manually inserted citations%
+\footnote{A reason might be that you transform a paper submitted in a an office file format to \LaTeX. In this case,
+\texttt{reflist} is often more convenient than \texttt{bibliography}.},
+use the \texttt{reflist} environment and separate each entry by a blank line (see \cite[sec.~9]{covington}).
+Since this environment is provided by \textsf{covington}, the \joption{covington} options must not be \joption{false}.
\section{\LyX\ layouts and templates}
@@ -278,6 +298,19 @@ A template is provided as well: \url{https://github.com/jspitz/univie-ling/raw/m
\raggedright
\begin{itemize}
+ \item 2024/09/28 (v.\,2.9)
+ \begin{itemize}
+ \item Fix pagination with \jfcsmacro{frontmatter} articles.
+ \item Improve parts in TOC.
+ \item Clear double page before parts.
+ \end{itemize}
+ \item 2024/09/20 (v.\,2.8)
+ \begin{itemize}
+ \item Add basic support for \texttt{thebibliography} environment.
+ \item Update documentation on bibliography beyond \textsf{biblatex}.
+ \item Fix pagination issue with \joption{titlepage=specialprint}.
+ \item Part pages are now empty (no pagination and heading).
+ \end{itemize}
\item 2024/07/23 (v.\,2.7)
\begin{itemize}
\item Use proper spacing with \textsf{covington}'s \texttt{reflist} environment.
@@ -354,9 +387,12 @@ A template is provided as well: \url{https://github.com/jspitz/univie-ling/raw/m
\begin{thebibliography}{1}
- \bibitem{covington} Covington, Michael A. and Spitzmller, Jrgen:
+\bibitem{covington} Covington, Michael A. and Spitzmller, Jrgen:
\emph{The covington Package. Macros for Linguistics}. September 7, 2018.
\url{http://www.ctan.org/pkg/covington}.
+\bibitem{natbib} Daly, Patrick W.:
+ \emph{Natural Sciences Citations and References}. September 13, 2010.
+ \url{http://www.ctan.org/pkg/natbib}.
\end{thebibliography}
diff --git a/macros/latex/contrib/univie-ling/doc/univie-ling.pdf b/macros/latex/contrib/univie-ling/doc/univie-ling.pdf
index 394cddb692..e9e852d10a 100644
--- a/macros/latex/contrib/univie-ling/doc/univie-ling.pdf
+++ b/macros/latex/contrib/univie-ling/doc/univie-ling.pdf
Binary files differ
diff --git a/macros/latex/contrib/univie-ling/doc/univie-ling.tex b/macros/latex/contrib/univie-ling/doc/univie-ling.tex
index f88f1fcea4..2ba95602f5 100644
--- a/macros/latex/contrib/univie-ling/doc/univie-ling.tex
+++ b/macros/latex/contrib/univie-ling/doc/univie-ling.tex
@@ -42,7 +42,7 @@
\author{\texorpdfstring{Jrgen Spitzmller%
\thanks{Please report issues via \protect\url{https://github.com/jspitz/univie-ling}.}}{Jrgen Spitzmller}}
-\date{Version 2.7, 2024/07/23}
+\date{Version 2.9, 2024/09/28}
\maketitle
@@ -100,7 +100,7 @@ The bundle also includes a \textsf{biblatex} bibliography style (\texttt{univie-
(\texttt{univie-ling.cbx}) that implement the citation conventions common in Viennese (Applied) Linguistics.
The style draws on the \emph{Unified Style Sheet for Linguistic Papers}.%
\footnote{See \url{https://www.linguisticsociety.org/sites/default/files/style-sheet_0.pdf}.}
-Documentation is included in the documentation of the classes above.
+\mlink{univie-ling-bbx.pdf}
\section{Release History}
diff --git a/macros/latex/contrib/univie-ling/tex/univie-ling-expose.cls b/macros/latex/contrib/univie-ling/tex/univie-ling-expose.cls
index f7ff0916f4..495172ee0d 100644
--- a/macros/latex/contrib/univie-ling/tex/univie-ling-expose.cls
+++ b/macros/latex/contrib/univie-ling/tex/univie-ling-expose.cls
@@ -33,7 +33,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}[2022/06/01]
-\ProvidesPackage{univie-ling-expose}[2024/07/23 v.2.7 Univie Linguistic Exposes (JSp)]
+\ProvidesPackage{univie-ling-expose}[2024/09/28 v.2.9 Univie Linguistic Exposes (JSp)]
%% ============================================================
@@ -687,7 +687,22 @@
% End of @uve@apa condition
\fi
-% End of @uve@biblatex condition
+\else% @uvt@biblatex condition FALSE
+
+% Some support for legacy bibtex
+\AtBeginDocument{%
+ \@ifundefined{bibhang}{}{%
+ \setlength{\bibhang}{\parindent}%
+ }%
+ \@ifundefined{bibfont}{}{%
+ \renewcommand{\bibfont}{\small}%
+ }%
+ \@ifundefined{bibsep}{}{%
+ \setlength\bibsep{0pt}%
+ }%
+}
+
+% End of @uvt@biblatex condition
\fi
%% =============================================================
diff --git a/macros/latex/contrib/univie-ling/tex/univie-ling-handout.cls b/macros/latex/contrib/univie-ling/tex/univie-ling-handout.cls
index 73c5a325da..d81cd6a27a 100644
--- a/macros/latex/contrib/univie-ling/tex/univie-ling-handout.cls
+++ b/macros/latex/contrib/univie-ling/tex/univie-ling-handout.cls
@@ -35,7 +35,7 @@
\NeedsTeXFormat{LaTeX2e}[2022/06/01]
-\ProvidesClass{univie-ling-handout}[2024/07/23 v.2.7 Univie Ling handout class (JSp)]
+\ProvidesClass{univie-ling-handout}[2024/09/28 v.2.9 Univie Ling handout class (JSp)]
%% ============================================================
%% CLASS OPTIONS
@@ -867,7 +867,22 @@
\DeclarePrintbibliographyDefaults{title=\uvh@bibheading}
-% End of @uvh@biblatex condition
+\else% @uvt@biblatex condition FALSE
+
+% Some support for legacy bibtex
+\AtBeginDocument{%
+ \@ifundefined{bibhang}{}{%
+ \setlength{\bibhang}{\parindent}%
+ }%
+ \@ifundefined{bibfont}{}{%
+ \renewcommand{\bibfont}{\small}%
+ }%
+ \@ifundefined{bibsep}{}{%
+ \setlength\bibsep{0pt}%
+ }%
+}
+
+% End of @uvt@biblatex condition
\fi
% Smaller
diff --git a/macros/latex/contrib/univie-ling/tex/univie-ling-paper.cls b/macros/latex/contrib/univie-ling/tex/univie-ling-paper.cls
index eda1430345..5169001198 100644
--- a/macros/latex/contrib/univie-ling/tex/univie-ling-paper.cls
+++ b/macros/latex/contrib/univie-ling/tex/univie-ling-paper.cls
@@ -32,7 +32,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}[2022/06/01]
-\ProvidesPackage{univie-ling-paper}[2024/07/23 v.2.7 Univie Linguistic Papers (JSp)]
+\ProvidesPackage{univie-ling-paper}[2024/09/28 v.2.9 Univie Linguistic Papers (JSp)]
%% ============================================================
@@ -845,7 +845,22 @@ This includes all drawings, sketches, graphics and internet sources.}
% End of @uvp@apa condition
\fi
-% End of @uvp@biblatex condition
+\else% @uvt@biblatex condition FALSE
+
+% Some support for legacy bibtex
+\AtBeginDocument{%
+ \@ifundefined{bibhang}{}{%
+ \setlength{\bibhang}{\parindent}%
+ }%
+ \@ifundefined{bibfont}{}{%
+ \renewcommand{\bibfont}{\small}%
+ }%
+ \@ifundefined{bibsep}{}{%
+ \setlength\bibsep{0pt}%
+ }%
+}
+
+% End of @uvt@biblatex condition
\fi
%% =============================================================
diff --git a/macros/latex/contrib/univie-ling/tex/univie-ling-poster.cls b/macros/latex/contrib/univie-ling/tex/univie-ling-poster.cls
index 87f5092d4c..780e98bc83 100644
--- a/macros/latex/contrib/univie-ling/tex/univie-ling-poster.cls
+++ b/macros/latex/contrib/univie-ling/tex/univie-ling-poster.cls
@@ -34,7 +34,7 @@
\NeedsTeXFormat{LaTeX2e}[2022/06/01]
-\ProvidesClass{univie-ling-poster}[2024/07/23 v.2.7 Univie Ling poster class (JSp)]
+\ProvidesClass{univie-ling-poster}[2024/09/28 v.2.9 Univie Ling poster class (JSp)]
%% ============================================================
%% CLASS OPTIONS
diff --git a/macros/latex/contrib/univie-ling/tex/univie-ling-thesis.cls b/macros/latex/contrib/univie-ling/tex/univie-ling-thesis.cls
index 91d34276a0..82dae78b03 100644
--- a/macros/latex/contrib/univie-ling/tex/univie-ling-thesis.cls
+++ b/macros/latex/contrib/univie-ling/tex/univie-ling-thesis.cls
@@ -33,7 +33,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}[2022/06/01]
-\ProvidesPackage{univie-ling-thesis}[2024/07/23 v.2.7 Univie Linguistic Theses (JSp)]
+\ProvidesPackage{univie-ling-thesis}[2024/09/28 v.2.9 Univie Linguistic Theses (JSp)]
%% ============================================================
@@ -55,6 +55,7 @@
\newif\if@uvt@psfonts\@uvt@psfontstrue
\newif\if@uvt@refsp\@uvt@refsptrue
\newif\if@uvt@usefontenc\@uvt@usefontenctrue
+\newif\if@uvt@titlepage\@uvt@titlepagetrue
\def\uvt@fontenc{T1}
% Define keys and values
@@ -155,6 +156,10 @@
{ \@uvt@draftmarktrue
\@uvt@draftmarkfptrue
},
+ % titlepage=<true|false>
+ % Output titlepage
+ titlepage.legacy_if_set:n = @uvt@titlepage,
+ titlepage.usage:n = preamble,
% no val equals to true
draftmark .default:n = {true},
% fonts=<ps|otf|none>
@@ -241,33 +246,36 @@ This includes all drawings, sketches, graphics and internet sources.}
%% FONTS AND EMPHASIZING:
%% ============================================================
+\def\uvt@titlesans{\sffamily}
+
\if@uvt@psfonts
\RequirePackage[T1]{fontenc}
\if@uvt@usefontenc
\RequirePackage[\uvt@fontenc]{fontenc}
\fi
-
- % Palatino
+ % Serif: Palatino
\RequirePackage[osf]{mathpazo}
-
- % Arial or Helvetica
- \IfFileExists{uarial.sty}{%
- \RequirePackage{uarial}
- }{%
- \RequirePackage{helvet}
- }
-
- % Source Code Pro (Courier)
+ % Sans: Source Sans Pro Light
+ \RequirePackage[semibold]{sourcesanspro}
+ % Mono: Source Code Pro
\RequirePackage[scale=.93]{sourcecodepro}
+ % Lighter Sans for title page
+ \def\uvt@titlesans{\def\mdseries@sf{l}\sffamily}
\fi
\if@uvt@otffonts
\RequirePackage{fontspec}
- \setmainfont{Palatino}
- \setsansfont{Arial}
- \setmonofont{SourceCodePro}
+ \setmainfont{TeX Gyre Pagella}
+ % Sans: Source Sans Pro Light
+ \RequirePackage[semibold]{sourcesanspro}
+ % Mono: Source Code Pro
+ \RequirePackage[scale=.93]{sourcecodepro}
+ % Lighter Sans for title page
+ \def\uvt@titlesans{\sourcesansprolight}
\fi
+
+
% Hyperlinks
\RequirePackage{url}
\newcommand{\urlprefix}{}
@@ -299,14 +307,14 @@ This includes all drawings, sketches, graphics and internet sources.}
\def\slash{/\penalty\exhyphenpenalty\hskip\z@skip}
% Font settings
-\newkomafont{thesistype}{\fontsize{24}{26pt}\bfseries\sffamily}
-\setkomafont{title}{\fontsize{18}{20pt}\sffamily}
-\setkomafont{author}{\fontsize{18}{20pt}\large\sffamily}
-\setkomafont{date}{\normalfont\fontsize{11}{13pt}\mdseries\sffamily}
-\newkomafont{degree}{\fontsize{12}{14pt}\sffamily}
-\newkomafont{baende}{\normalfont\fontsize{12}{14pt}\mdseries\sffamily}
-\newkomafont{tpcaption}{\fontsize{11}{13pt}\sffamily}
-\newkomafont{codes}{\fontsize{10}{12pt}\sffamily}
+\newkomafont{thesistype}{\fontsize{24}{26pt}\bfseries\uvt@titlesans}
+\setkomafont{title}{\fontsize{18}{20pt}\uvt@titlesans}
+\setkomafont{author}{\fontsize{18}{20pt}\large\uvt@titlesans}
+\setkomafont{date}{\normalfont\fontsize{11}{13pt}\mdseries\uvt@titlesans}
+\newkomafont{degree}{\fontsize{12}{14pt}\uvt@titlesans}
+\newkomafont{baende}{\normalfont\fontsize{12}{14pt}\mdseries\uvt@titlesans}
+\newkomafont{tpcaption}{\fontsize{11}{13pt}\uvt@titlesans}
+\newkomafont{codes}{\fontsize{10}{12pt}\uvt@titlesans}
%% ============================================================
@@ -384,35 +392,35 @@ This includes all drawings, sketches, graphics and internet sources.}
\def\thesistype@bachelor{Bachelorarbeit}
\def\thesistype@bachelor@en{Bachelor's Thesis}
\def\dirtype@bachelor{Studienrichtung}
-\def\dirtype@bachelor@en{degree programme}
+\def\dirtype@bachelor@en{Degree programme}
\def\degree@bachelor{Bachelor of Arts (BA)}
\def\degree@bachelor@f{\degree@bachelor}
% master
\def\thesistype@master{Masterarbeit}
\def\thesistype@master@en{Master's Thesis}
\def\dirtype@master{Studienrichtung}
-\def\dirtype@master@en{degree programme}
+\def\dirtype@master@en{Degree programme}
\def\degree@master{Master of Arts (MA)}
\def\degree@master@f{\degree@master}
% magister
\def\thesistype@magister{Magisterarbeit}
\def\thesistype@magister@en{Magister Thesis}
\def\dirtype@magister{Studienrichtung}
-\def\dirtype@magister@en{degree programme}
+\def\dirtype@magister@en{Degree programme}
\def\degree@magister{Magister der Philosophie (Mag.\,Phil.)}
\def\degree@magister@f{Magistra der Philosophie (Mag.\,Phil.)}
% diplom
\def\thesistype@diplom{Diplomarbeit}
\def\thesistype@diplom@en{Diploma Thesis}
\def\dirtype@diplom{Studienrichtung}
-\def\dirtype@diplom@en{degree programme}
+\def\dirtype@diplom@en{Degree programme}
\def\degree@diplom{Magister der Philosophie (Mag.\,Phil.)}
\def\degree@diplom@f{Magistra der Philosophie (Mag.\,Phil.)}
% diss
\def\thesistype@diss{Dissertation}
\def\thesistype@diss@en{Doctoral Thesis}
\def\dirtype@diss{Dissertationsgebiet}
-\def\dirtype@diss@en{field of study}
+\def\dirtype@diss@en{Field of study}
\def\degree@diss{Doktor der Philosophie (Dr.\,phil.)}
\def\degree@diss@f{Doktorin der Philosophie (Dr.\,phil.)}
@@ -474,7 +482,10 @@ This includes all drawings, sketches, graphics and internet sources.}
% We need graphicx for the logo
\RequirePackage{graphicx}
+\def\uvt@titlesep{\,|\,}
+
\renewcommand*\maketitle[1][1]{%
+ \if@uvt@titlepage
\newgeometry{top=2cm,bottom=2.5cm,left=2.5cm,right=2cm}
\expandafter\ifnum \csname scr@v@3.12\endcsname>\scr@compatibility\relax
\else
@@ -527,27 +538,27 @@ This includes all drawings, sketches, graphics and internet sources.}
\renewcommand*{\@makefnmark}{\rlap\@oldmakefnmark}%
\setparsizes{\z@}{\z@}{\z@\@plus 1fil}\par@updaterelative
\begin{flushright}
- \includegraphics[width=6cm]{univielogo-sw}
+ \includegraphics[width=6cm]{univielogo}
\end{flushright}
\vspace{2\baselineskip}
\begin{center}
- {\usekomafont{thesistype}\MakeUppercase{\@thesistype\,/\,\hskip\z@skip\mbox{\@thesistype@en}}\par}
+ {\usekomafont{thesistype}\MakeUppercase{\@thesistype\uvt@titlesep\hskip\z@skip\mbox{\@thesistype@en}}\par}
\end{center}
\vspace{2\baselineskip}
\begin{center}
- {\usekomafont{tpcaption}Titel der \@thesistype\,/\,Title of the \@thesistype@en\par}
+ {\usekomafont{tpcaption}Titel\uvt@titlesep Title\par}
{\ifx\@title\@empty\else
- \usekomafont{title}{\enquote{\@title%
- \ifx\@subtitle\@empty\else\linebreak\@subtitle\fi}\par}%
+ \usekomafont{title}{\@title%
+ \ifx\@subtitle\@empty\else\linebreak\@subtitle\fi\par}%
\fi
}%
{\ifx\@volume\@empty\else%
- \vskip 1em\usekomafont{baende}{Band \@volume\ von \@volumes\ B\"anden\,/\,volume \@volume\ of \@volumes\ volumes}%
+ \vskip 1em\usekomafont{baende}{Band \@volume\ von \@volumes\ B\"anden\uvt@titlesep volume \@volume\ of \@volumes\ volumes}%
\fi%
}%
\vskip 2em
{%
- {\usekomafont{tpcaption}verfasst von\,/\,submitted by\par}
+ {\usekomafont{tpcaption}verfasst von\,\uvt@titlesep\uvt@titlesep submitted by\par}
\usekomafont{author}{%
\lineskip 0.75em%
\begin{tabular}[t]{c}
@@ -556,21 +567,21 @@ This includes all drawings, sketches, graphics and internet sources.}
}%
}%
\vskip 2em
- {\usekomafont{tpcaption}angestrebter akademischer Grad\,/\,in partial fulfilment of the requirements for the degree of\par}
+ {\usekomafont{tpcaption}angestrebter akademischer Grad\uvt@titlesep in partial fulfilment of the requirements for the degree of\par}
\usekomafont{degree}{\@degree}
\end{center}\par
\vfill
- {\usekomafont{date}{Wien, \the\year\,/\,Vienna, \the\year\par}}%
+ {\usekomafont{date}{Wien, \the\year\uvt@titlesep Vienna, \the\year\par}}%
\vskip 2em
\usekomafont{codes}{%
\begin{tabular}[t]{@{}>{\raggedright}p{0.4\columnwidth}>{\raggedright}p{0.1\columnwidth}>{\raggedright}p{0.4\columnwidth}}
- Studienkennzahl lt. Studienblatt/\newline degree programme code as it appears on the student record sheet: & & \@studienkennzahl\tabularnewline
+ Studienkennzahl lt. Studienblatt\uvt@titlesep Degree programme code as it appears on the student record sheet: & & \@studienkennzahl\tabularnewline
\noalign{\vskip6pt}
- \@dirtype\ lt. Studienblatt\slash\newline \@dirtype@en\ as it appears on the student record sheet: & & \@studienrichtung\tabularnewline
+ \@dirtype\ lt. Studienblatt\uvt@titlesep\@dirtype@en\ as it appears on the student record sheet: & & \@studienrichtung\tabularnewline
\noalign{\vskip6pt}
- Betreut von\,/\,Supervisor: & & \@supervisor\tabularnewline%
+ Betreut von\uvt@titlesep Supervisor: & & \@supervisor\tabularnewline%
\noalign{\vskip6pt}
- \ifx\@cosupervisor\@empty\else Mitbetreut von\,/\,Co-Supervisor: & & \@cosupervisor\fi
+ \ifx\@cosupervisor\@empty\else Mitbetreut von\uvt@titlesep Co-Supervisor: & & \@cosupervisor\fi
\end{tabular}\par
}
\par
@@ -591,7 +602,10 @@ This includes all drawings, sketches, graphics and internet sources.}
\cleardoubleemptypage
\fi
\ifx\titlepage@restore\relax\else\clearpage\titlepage@restore\fi
- \end{titlepage}
+ \end{titlepage}
+ \else% \if@uvt@titlepage
+ \setcounter{page}{2}%
+ \fi
\setcounter{footnote}{0}%
\expandafter\ifnum \csname scr@v@3.12\endcsname>\scr@compatibility\relax
\let\thanks\relax
@@ -822,6 +836,21 @@ This includes all drawings, sketches, graphics and internet sources.}
% End of @uvt@apa condition
\fi
+\else% @uvt@biblatex condition FALSE
+
+% Some support for legacy bibtex
+\AtBeginDocument{%
+ \@ifundefined{bibhang}{}{%
+ \setlength{\bibhang}{\parindent}%
+ }%
+ \@ifundefined{bibfont}{}{%
+ \renewcommand{\bibfont}{\small}%
+ }%
+ \@ifundefined{bibsep}{}{%
+ \setlength\bibsep{0pt}%
+ }%
+}
+
% End of @uvt@biblatex condition
\fi
diff --git a/macros/latex/contrib/univie-ling/tex/univie-ling-wlg.cls b/macros/latex/contrib/univie-ling/tex/univie-ling-wlg.cls
index 00deb089cc..7c32f39b47 100644
--- a/macros/latex/contrib/univie-ling/tex/univie-ling-wlg.cls
+++ b/macros/latex/contrib/univie-ling/tex/univie-ling-wlg.cls
@@ -34,7 +34,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}[2022/06/01]
-\ProvidesPackage{univie-ling-wlg}[2024/07/23 v.2.7 Univie WLG journal layout (JSp)]
+\ProvidesPackage{univie-ling-wlg}[2024/09/28 v.2.9 Univie WLG journal layout (JSp)]
%% ============================================================
@@ -431,10 +431,15 @@
\if@wlg@specialprint\else
\RequirePackage{etoc}
\etocstandardlines
+ \etocsetstyle{part}
+ {}
+ {\vspace{12pt}\normalsize\bfseries\rmfamily}
+ {\etocnumber. \etocname{}\par\vspace{10pt}}
+ {}
\etocsetstyle{chapter}
{}
{\normalsize\mdseries\rmfamily}
- {\etocname{}\dotfill\etocpage\par\vspace{12pt}}
+ {\etocname{}\dotfill\etocpage\par\vspace{10pt}}
{}
\setcounter{tocdepth}{0}
\fi
@@ -461,8 +466,7 @@
\newcommand*\frontmatter{%
\if@twoside\cleardoubleoddpage\else\clearpage\fi
\@wlg@mainmatterfalse\@wlg@frontmattertrue\pagenumbering{roman}%
- \edef\computelastpage{%
- \romannumeral\numexpr\getpagerefnumber{LastFrontPage}-1\relax}%
+ \def\computelastpage{\pageref{TotPages}}%
\edef\startpageref{%
\romannumeral\thestartpage\relax}%
}
@@ -595,6 +599,9 @@
\fi
\if@wlg@titlepage
\@maketitlepage[#1]%
+ \if@wlg@mainmatter
+ \pagenumbering{arabic}
+ \fi
\fi
\if@wlg@startpageset\else
\setcounter{page}{\thestartpage}
@@ -633,6 +640,7 @@
\thispagestyle{\titlepagestyle}\@thanks
\endgroup
\setcounter{footnote}{0}%
+ \setcounter{page}{\thestartpage}%
\global\let\@cauthor\@empty
\global\let\@thanks\@empty
\gdef\@ccauthor{\translate{corrauthor}}
@@ -672,7 +680,7 @@
\newcommand{\@maketitlepage}[1][1]{%
\if@wlg@titlepageneeded
\begin{titlepage}
- \pagenumbering{alph}
+ \pagenumbering{roman}
\thispagestyle{empty}%
\setcounter{page}{%
#1%
@@ -876,7 +884,9 @@
\end{flushright}%
\par
\vskip 2em
- \pagenumbering{arabic}
+ \if@wlg@mainmatter
+ \pagenumbering{arabic}
+ \fi
}%
% Rewrite \include for local LastPage counter
@@ -986,6 +996,9 @@
% (serifs)
\setkomafont{sectioning}{\normalfont\normalcolor\bfseries}
+% empty part pages
+\AddToHook{cmd/scr@startpart/before}{\cleardoublepage\thispagestyle{empty}}
+
% Abstract
\renewenvironment{abstract}{%
\addsec*{\hspace*{2.4em}Abstract}
@@ -1085,8 +1098,13 @@
\AtBeginDocument{%
\@ifundefined{bibhang}{}{%
\setlength{\bibhang}{\parindent}%
+ }%
+ \@ifundefined{bibfont}{}{%
\renewcommand{\bibfont}{\small}%
}%
+ \@ifundefined{bibsep}{}{%
+ \setlength\bibsep{0pt}%
+ }%
}
%% =============================================================
diff --git a/macros/latex/contrib/verifycommand/README.txt b/macros/latex/contrib/verifycommand/README.txt
index 4ee9666691..bd4b792268 100644
--- a/macros/latex/contrib/verifycommand/README.txt
+++ b/macros/latex/contrib/verifycommand/README.txt
@@ -1,5 +1,5 @@
-LaTeX verifycommand package v1.00 README.txt
+LaTeX verifycommand package v1.10 README.txt
Files included are:
diff --git a/macros/latex/contrib/verifycommand/verifycommand.dtx b/macros/latex/contrib/verifycommand/verifycommand.dtx
index 4e1a1ae6d6..eb01d05e33 100644
--- a/macros/latex/contrib/verifycommand/verifycommand.dtx
+++ b/macros/latex/contrib/verifycommand/verifycommand.dtx
@@ -17,7 +17,7 @@
% \iffalse
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{verifycommand}
-%<package> [2024/01/11 v1.00 Verify definitions have not changed.]
+%<package> [2024/09/03 v1.10 Verify definitions have not changed.]
%
%<*driver>
\documentclass{ltxdoc}
@@ -77,7 +77,7 @@
\usepackage{microtype}
-
+\usepackage{nowidow}
\usepackage[svgnames]{xcolor}
@@ -233,6 +233,7 @@
\usepackage{\mypackagename}
+%\usepackage[disable]{\mypackagename}
@@ -301,6 +302,7 @@ pageanchor=true,
%
% \changes{v1.00}{2024/01/11}{\ 2024/01/11 Initial version.}
+% \changes{v1.10}{2024/09/03}{\ 2024/09/03}
% \GetFileInfo{\mypackagename.sty}
@@ -353,11 +355,17 @@ pageanchor=true,
%
% To improve reliability,
% the \pkg{verifycommand} package provides a way to verify that
-% macros or environments have not changed.
-% This allows a package author to check before patching a definition.
+% macros or environments have not changed since the patches were
+% last designed.
+% This may be checked before applying the patch.
% If a definition is not as expected, a warning is issued.
% At the end of the compile, a list of all changed definitions is displayed.
%
+% Conditionals are provided, allowing multiple versions of a definition
+% to be tested and patched, warning if no known version is found.
+% Conditionals also allow the package to verify that several macros
+% are unchanged before taking a single common action.
+%
% \vfill
%
% \footnotesize
@@ -448,12 +456,51 @@ pageanchor=true,
% expected values.
%
%
-% \clearpage
+% \section{Warnings}
+%
+% \changes{v1.10}{2024/09/03}{Docs: Added Warnings section.}
+%
+% The document \textit{\LaTeX\ for authors} (\cmds{texdoc usrguide}
+% recommends the use of \LaTeX\ hooks where possible (\cmds{texdoc lthooks}).
+%
+% Commands created with \cs{NewDocumentCommand} and related may
+% \watchout[kernel changes]
+% change their definitions when the inner workings of
+% \cs{NewDocumentCommand} are optimized.
+% When this occurs, any checksums for these commands will
+% change, even though the associated patches probably will continue to work.
+% If you use \pkg{verifycommand} for these commands, expect the
+% checksums to need updates at some point in the future.
+%
+% Use \cs{NewCommandCopy} and \cs{NewEnvironmentCopy} to copy commands
+% for reuse. These work with all kinds of commmand definitions.
+% See \cmds{texdoc usrguide} for details.
+%
+% Use \cs{ShowCommand} or \cs{ShowEnvironment} to see an existing definition,
+% which again works with all forms of commands.
+%
%
% \section{How to use \pkg{verifycommand}}
%
+%
% \subsection{The user interface}
%
+% \changes{v1.10}{2024/06/25}{Docs: Added conditional tests.}
+%
+% In the following, \oarg{yourpackagename} is the package doing the
+% testing and patching,
+% and \oarg{theirpackagename} is the package which defines
+% the original macro.
+% Using these optional package names make it easier to find where
+% to make changes if needed.
+%
+% If there is only one optional argument,
+% \watchout[optional arguments]
+% it is used as \oarg{yourpackagename},
+% to identify where to find the \cs{VerifyCommand} checksum entry.
+% The second optional argument identifies what is being patched,
+% in case it has been changed.
+%
% \needspace{2\baselineskip}
% \DescribeMacro{\VerifyCommand} \oarg{yourpackagename} \oarg{theirpackagename}
% \marg{\cs{macroname}} \marg{\MDfive\ checksum}
@@ -464,13 +511,54 @@ pageanchor=true,
% \fqquad \marg{begin \MDfive\ checksum} \marg{end \MDfive\ checksum}
%
% Use one of these macros just before patching a macro or environment,
-% as seen below.
+% as seen below. A test is performed to see if the definition
+% is as expected before applying a patch.
%
% Note that there is one checksum for \cs{VerifyCommand}, but there
-% are two checksums for \cs{VerifyEnvironment}: once for the begin section
+% are two checksums for an environment: once for the begin section
% and one for the end section.
%
-% If there is only one optional argument, it is used as your package name.
+% It may be necessary to test for each of several possible versions of
+% a definition, then patch accordingly. The following test and apply a
+% true or false clause, without issuing a warning.
+%
+% \needspace{2\baselineskip}
+% \DescribeMacro{\IfVerifyCommand} \oarg{yourpackagename} \oarg{theirpackagename}
+% \marg{\cs{macroname}} \\
+% \fqquad \marg{\MDfive\ checksum} \\
+% \fqquad \marg{true} \marg{false}
+%
+% \needspace{3\baselineskip}
+% \DescribeMacro{\IfVerifyEnvironmentBegin} \oarg{yourpackagename} \oarg{theirpackagename}
+% \marg{\env{envname}} \\
+% \fqquad \marg{begin \MDfive\ checksum} \\
+% \fqquad \marg{true} \marg{false}
+%
+% \needspace{3\baselineskip}
+% \DescribeMacro{\IfVerifyEnvironmentEnd} \oarg{yourpackagename} \oarg{theirpackagename}
+% \marg{\env{envname}} \\
+% \fqquad \marg{end \MDfive\ checksum} \\
+% \fqquad \marg{true} \marg{false}
+%
+% Tests may be done as a group, either to try several versions of the same
+% definition, or to verify several definitions and act if any of them fail:
+%
+% \DescribeMacro{\TestVerifyCommands} Starts a group of tests.
+%
+% \DescribeMacro{\IfVerifyCommandPassed} \marg{true} \marg{false}
+% \quad Act if any of a group passed.
+% May be used to try to patch multiple versions of a command.
+%
+% \DescribeMacro{\IfVerifyCommandFailed} \marg{true} \marg{false}
+% \quad Act if any of a group failed.
+% May be used to verify several definitions are unchanged.
+%
+% A warning may be also issued:
+%
+% \DescribeMacro{\VERCMDWarning} \marg{yourpackage} \marg{theirpackage} \marg{defn name}
+% \quad Used to issue a warning that the macro has changed.
+%
+% See \cref{sec:conditionals} for examples of conditional tests.
%
%
% \subsection{Placing the macros}
@@ -483,70 +571,86 @@ pageanchor=true,
%
% \begin{sourceverb}
% \VerifyCommand{\LaTeX}{}
-% <patch \LaTeX here>
+% (patch \LaTeX here)
%
% \VerifyCommand[mypackage]{\textcolor}{}
-% <patch \textcolor here>
+% (patch \textcolor here)
%
% \VerifyCommand[mypackage][graphics]{\rotatebox}{}
-% <patch \rotatebox here>
+% (patch \rotatebox here)
%
% \VerifyEnvironment{tabbing}{}{}
-% <patch tabbing here>
+% (patch tabbing here)
% \end{sourceverb}
%
%
% \subsection{Finding the checksums of the current definitions}
+% \changes{v1.10}{2024/06/25}{Docs: ``Finding checksums'' reorganized.}
%
-% In the above examples, testing \cs{LaTeX} would print a warning showing
-% the correct \MDfive\ checksum.
-% Testing \cs{textcolor} would do the same, but as a \cs{PackageWarning} from \pkg{mypackage}.
-% Testing \cs{rotatebox} would also mention the package being tested, \pkg{graphics}.
-% Testing \env{tabbing} issues a separate warning for the begin and end sections.
-%
-%
+% The warnings are issued and the correct checksums are given.
+% The type of warning depends on the usage:
+% \begin{itemize}
+% \item Verifying \cs{LaTeX} would print a warning showing
+% the correct \MDfive\ checksum.
% \begin{sourceverb}
-% Warning: Something may fail. A definition has changed:
+% Warning: A definition has changed:
% \LaTeX
-% FAAAC6146C9A80F46A1F029B67923851
+% (FAAAC6146C9A80F46A1F029B67923851)
% on input line 464.
-
-% Package mypackage Warning: Something may fail. A definition has changed:
+% \end{sourceverb}
+% \item Verifying \cs{textcolor} would do the same,
+% but as a \cs{PackageWarning} from \pkg{mypackage},
+% which is the package doing the testing.
+% \begin{sourceverb}
+% Package mypackage Warning: A definition has changed:
% (mypackage) \textcolor
-% (mypackage) E1E2B5A908AA1BCDDF6BEA038596A381
+% (mypackage) (E1E2B5A908AA1BCDDF6BEA038596A381)
% (mypackage) on input line 465.
-
-% Package mypackage Warning: Something may fail. A definition has changed:
+% \end{sourceverb}
+% \item Verifying \cs{rotatebox} would also issue a warning from \pkg{mypackage},
+% but also mention the package being tested, \pkg{graphics}.
+% \begin{sourceverb}
+% Package mypackage Warning: A definition has changed:
% (mypackage) graphics: \rotatebox
-% (mypackage) 2472999B02C97AC847128AF24C55D150
+% (mypackage) (2472999B02C97AC847128AF24C55D150)
% (mypackage) on input line 466.
-%
-% Warning: Something may fail. A definition has changed:
+% \end{sourceverb}
+% \item Verifying \env{tabbing} issues a separate warning
+% for the begin and end sections.
+% \begin{sourceverb}
+% Warning: A definition has changed:
% tabbing
-% 1AD73B4527AD30969CF3219F2FB1306B
+% (1AD73B4527AD30969CF3219F2FB1306B)
% on input line 518.
%
-% Warning: Something may fail. A definition has changed:
+% Warning: A definition has changed:
% (end)tabbing
-% E8326AC43EE0A6E922A20F2A798BD177
+% (E8326AC43EE0A6E922A20F2A798BD177)
% on input line 518.
% \end{sourceverb}
+% \end{itemize}
+%
%
-% And at the end of the compile, a summary is given:
+% At the end of the compile, a summary is given:
%
% \begin{sourceverb}
% --------------------------------
-% WARNING: Something may fail.
-% Definition changed: \LaTeX
-% Definition changed: FAAAC6146C9A80F46A1F029B67923851
-% Definition changed: \textcolor
-% Definition changed: E1E2B5A908AA1BCDDF6BEA038596A381
-% Definition changed: graphics: \rotatebox
-% Definition changed: 2472999B02C97AC847128AF24C55D150
-% Definition changed: tabbing
-% Definition changed: 1AD73B4527AD30969CF3219F2FB1306B
-% Definition changed: (end)tabbing
-% Definition changed: E8326AC43EE0A6E922A20F2A798BD177
+% Package verifycommand Warning: Definitions have changed.
+% Patches for the following macros may need to be updated.
+% See the previous warnings for line numbers.
+%
+% Syntax: Patching pkg -> Defining pkg: Macro (checksum)
+% -----
+% (verifycommand) \LaTeX
+% (FAAAC6146C9A80F46A1F029B67923851)
+% (verifycommand) mypackage -> \textcolor
+% (E1E2B5A908AA1BCDDF6BEA038596A381)
+% (verifycommand) mypackage -> graphics: \rotatebox
+% (2472999B02C97AC847128AF24C55D150)
+% (verifycommand) tabbing
+% (1AD73B4527AD30969CF3219F2FB1306B)
+% (verifycommand) (end)tabbing
+% (E8326AC43EE0A6E922A20F2A798BD177)
% --------------------------------
% \end{sourceverb}
%
@@ -558,24 +662,24 @@ pageanchor=true,
%
% \begin{sourceverb}
% \VerifyCommand{\LaTeX}{FAAAC6146C9A80F46A1F029B67923851}
-% <patch \LaTeX here>
+% (patch \LaTeX here)
%
% \VerifyCommand[mypackage]{\textcolor}
% {E1E2B5A908AA1BCDDF6BEA038596A381}
-% <patch \textcolor here>
+% (patch \textcolor here)
%
% \VerifyCommand[mypackage][graphics]{\rotatebox}
% {2472999B02C97AC847128AF24C55D150}
-% <patch \rotatebox here>
+% (patch \rotatebox here)
%
% \VerifyEnvironment{tabbing}
% {1AD73B4527AD30969CF3219F2FB1306B}% beginning code
% {E8326AC43EE0A6E922A20F2A798BD177}% endind code
-% <patch tabbing here>
+% (patch tabbing here)
% \end{sourceverb}
%
%
-% \subsection{When a definition is changed}
+% \subsection{When a definition has changed}
%
% When something being verified changes at a later time, the resulting
% warning will let the user know that the patches may not work
@@ -584,14 +688,97 @@ pageanchor=true,
% this warning will be issued before the patch is even attempted.
%
% When testing many packages in bulk, a utility such as \cmds{grep}
-% can report the changed definitions.
-% Search the log file for ``Definition changed:''.
+% can report which macros have changed.
+% Search the log file for ``\texttt{(verifycommand)}''.
+%
+%
+% \subsection{Testing for changed macros}
+% \label{sec:conditionals}
+%
+% \changes{v1.10}{2024/06/25}{Docs: Added conditional tests.}
+%
+% To test to see if a macro or environment has changed, use
+% \cs{IfVerifyCommand}, \cs{IfVerifyEnvironmentBegin},
+% or \cs{IfVerifyEnvironmentEnd}.
+%
+% Example:
+% \begin{sourceverb}
+% \IfVerifyCommand[mypackage][LaTeX kernel]{\LaTeX}{123}{True}{False}
+% \end{sourceverb}
+% Result: \IfVerifyCommand[mypackage][LaTeX kernel]{\LaTeX}{}{True}{False}
+%
+% Example:
+% \begin{sourceverb}
+% \IfVerifyCommand[mypackage][LaTeX kernel]{\LaTeX}
+% {FAAAC6146C9A80F46A1F029B67923851}
+% {True}{False}
+% \end{sourceverb}
+% Result:
+% \IfVerifyCommand[mypackage][LaTeX kernel]{\LaTeX}
+% {FAAAC6146C9A80F46A1F029B67923851}
+% {True}{False}
+% (Assuming \cs{LaTeX} has not actually changed since
+% this manual was generated.)
+%
+% Example:
+% \begin{sourceverb}
+% \IfVerifyEnvironmentEnd[mypackage][LaTeX kernel]{tabbing}
+% {E8326AC43EE0A6E922A20F2A798BD177}
+% {True}{False}
+% \end{sourceverb}
+% Result:
+% \IfVerifyEnvironmentEnd[mypackage][LaTeX kernel]{tabbing}
+% {E8326AC43EE0A6E922A20F2A798BD177}
+% {True}{False}
+%
+% If the \pkg{verifycommand} package is disabled, these tests
+% will always return true.
+%
+% These tests do not issue warnings if the test fails, so they may
+% be used to test against several possible definitions, chosing the
+% appropriate patch depending on which match is found.
+%
+% To try to patch multiple versions of the same command,
+% and issue a warning if no match is found:
+%
+% \begin{sourceverb}
+% \TestVerifyCommands
+%
+% \IfVerifyCommand[mypackage][theirpackage]{\theirmacro}
+% {12312312312312312321312312312312}
+% {(Patch an older version of the macro.)}
+%
+% \IfVerifyCommand[mypackage][theirpackage]{\theirmacro}
+% {45645645645645645645645645645645}
+% {(Patch a newer version of the macro.)}
+%
+% \IfVerifyCommandPassed
+% {}% One of the patches worked.
+% {\VERCMDWarning{mypackage}{theirpackage}{\theirmacro}}
+% \end{sourceverb}
+%
+% To verify several commands have not changed:
+%
+% \begin{sourceverb}
+% \TestVerifyCommands
+%
+% \VerifyCommand[mypackage][theirpackage]{\firstmacro}
+% {78978978978978978978978978978978}
+% \VerifyCommand[mypackage][theirpackage]{\secondmacro}
+% {27272727272727272727277272727272}
+% \VerifyCommand[mypackage][theirpackage]{\thirdmacro}
+% {84838483848384838483848384838483}
+%
+% \IfVerifyCommandFailed
+% {Something is not correct. (Warnings have been issued above.)}
+% {}% All are fine.
+% \end{sourceverb}
%
%
% \subsection{Disabling the package}
%
% \pkg{verifycommand} relies on knowing the internal structure of
-% various kinds of definitions. It is possible that these may change some day,
+% various kinds of definitions. It is possible that these may change,
% causing endless warnings for that kind of definition.
% Should that happen, it will be necessary to disable the \pkg{verifycommand}
% package until it can be updated.
@@ -601,15 +788,22 @@ pageanchor=true,
% \usepackage[disable]{verifycommand}
% \end{sourceverb}
%
+% Package warnings will stop,
+% and the conditional tests will always return true.
+%
+% If the package is disabled, the boolean \bool{VERCMDenable}
+% will be |false|. This may be used to help decide which patches
+% to apply as a default.
%
%
% ^^A To trigger the checksums to be copied into the exmaples:
+% \typeout{(verifycommand): The following warnings that definitions have changed}
+% \typeout{are expected, and are for demonstration purposes:}
% \VerifyCommand{\LaTeX}{}
% \VerifyCommand[mypackage]{\textcolor}{}
% \VerifyCommand[mypackage][graphics]{\rotatebox}{}
% \VerifyEnvironment{tabbing}{}{}
%
-%
% \clearpage
%
% ^^A \StopEventually{\PrintChanges\PrintIndex}
@@ -638,7 +832,7 @@ pageanchor=true,
% \PrintChanges
% \phantomsection
% \label{sec:changesend}
-%
+% \clearpage
%
% ^^A The instructions for the Index of Objects:
% \IndexPrologue{
@@ -719,7 +913,7 @@ pageanchor=true,
%
% \typeout{--------------------------------}
% \typeout{The following warning that}
-% \typeout{something may fail is an}
+% \typeout{definitions have changed is an}
% \typeout{example of the output of this}
% \typeout{package, and is not evidence of}
% \typeout{a problem with the verifycommand}
@@ -747,16 +941,16 @@ pageanchor=true,
%
% Package option to disable all functions.
%
-% \DescribeBoolean{VERCMD@enable} Is the package enabled?
+% \DescribeBoolean{VERCMDenable} Is the package enabled?
% \begin{macrocode}
-\newbool{VERCMD@enable}
-\booltrue{VERCMD@enable}
+\newbool{VERCMDenable}
+\booltrue{VERCMDenable}
% \end{macrocode}
%
% \DescribeOption{disable} Turn off all functions.
% \begin{macrocode}
\DeclareOption{disable}{%
- \boolfalse{VERCMD@enable}%
+ \boolfalse{VERCMDenable}%
\typeout{----}%
\typeout{Package verifycommand: Turned off by option 'disable'.}%
\typeout{----}%
@@ -788,6 +982,8 @@ pageanchor=true,
%
% The \MDfive\ hash is used for \env{lateximage} filenames for \SVG\ math.
%
+% The default definition if no MD5 function is found.
+% This will be changed below if an MD5 function is available.
% \begin{macrocode}
\newcommand{\VERCMD@mdfivesum}[1]{%
\PackageError{verifycommand}
@@ -855,27 +1051,78 @@ pageanchor=true,
% \end{macrocode}
% \end{macro}
+% \DescribeBoolean{VERCMD@this@ltxcmd} True if this command is
+% defined by \cs{NewDocumentCommand} or related.
+% \begin{macrocode}
+\newbool{VERCMD@this@ltxcmd}
+\boolfalse{VERCMD@this@ltxcmd}
+% \end{macrocode}
+
+% \DescribeBoolean{VERCMD@failed@ltxcmd} True if any command that failed
+% was defined by \cs{NewDocumentCommand} or related.
+% \begin{macrocode}
+\newbool{VERCMD@failed@ltxcmd}
+\boolfalse{VERCMD@failed@ltxcmd}
+% \end{macrocode}
+
% \begin{macro}{\VERCMD@addchanged} \marg{\MDfive sum} \marg{text} \qquad Add to the list of changed definitions.
+% \changes{v1.10}{2024/08/25}{Revised summary message.}
+% \changes{v1.10}{2024/08/28}{Added `\texttt{*}' if \cs{NewDocumentCommand} or related is used.}
% \begin{macrocode}
\newcommand*{\VERCMD@addchanged}[2]{%
+% \end{macrocode}
+% Newline control for pretty print.
+% \begin{macrocode}
\ifdefempty{\VERCMD@whatchanged}%
{}%
{\apptocmd{\VERCMD@whatchanged}{^^J}{}{}}%
- \apptocmd{\VERCMD@whatchanged}{Definition changed: #2^^J}{}{}%
- \apptocmd{\VERCMD@whatchanged}{Definition changed: \space\space\space#1}{}{}%
+% \end{macrocode}
+% ID the message as from \pkg{verifycommand}, add the text,
+% add the checksum.
+% \begin{macrocode}
+ \apptocmd{\VERCMD@whatchanged}{%
+ (verifycommand)\space\space#2^^J%
+ \space\space\space\space\space\space\space\space\space\space%
+ \space\space\space\space\space\space\space\space\space(#1)%
+ }{}{}%
+% \end{macrocode}
+% Optionally add a |*| after the checksum if the command was
+% defined with \cs{NewCommand} or related.
+% \begin{macrocode}
+ \ifbool{VERCMD@this@ltxcmd}{%
+ \apptocmd{\VERCMD@whatchanged}{ *}{}{}%
+ \booltrue{VERCMD@failed@ltxcmd}%
+ }{}%
+ \boolfalse{VERCMD@this@ltxcmd}%
}
% \end{macrocode}
% \end{macro}
% When the compile is finished, print the accumulated list of changed definitions.
+% \changes{v1.10}{2024/08/25}{Revised summary message.}
+% ^^A *date
% \begin{macrocode}
-\AfterEndDocument{
+\AtEndDocument{
\ifdefempty{\VERCMD@whatchanged}{}{%
\typeout{--------------------------------}%
- \typeout{WARNING: Something may fail.}%
- \typeout{\VERCMD@whatchanged}%
- \typeout{--------------------------------}%
+ \typeout{Package verifycommand Warning: Definitions have changed.}%
+ \typeout{Patches for the following macros may need to be updated.}%
+ \typeout{See the previous warnings for line numbers.}%
+ \typeout{}%
+ \typeout{Syntax:\space\space Patching pkg -> Defining pkg: Macro (checksum)}%
+ \typeout{-----}%
+ \typeout{\VERCMD@whatchanged}
+ \typeout{-----}%
+ \typeout{Look for updates to these packages.}
+%
+ \ifbool{VERCMD@failed@ltxcmd}{
+ \typeout{Any of the above marked with a * may be due to changes in LaTeX internals,}
+ \typeout{the most recently known of which was 2023/12/01.}
+ \typeout{If so, look for updates for the LaTeX sytem as well.}
+ }{}
+%
+ \typeout{--------------------------------}
}
}
% \end{macrocode}
@@ -895,29 +1142,33 @@ pageanchor=true,
% \end{macro}
-% \begin{macro}{\VERCMD@Warning} \marg{yourpackage} \marg{theirpackage} \marg{defn name}
+% \begin{macro}{\VERCMDWarning} \marg{yourpackage} \marg{theirpackage} \marg{defn name}
%
% If no package names, print a general warning.
% If package names are given, print a \cs{PackageWarning}.
+% Either way, also add to the summary report.
+% \changes{v1.10}{2024/08/25}{Revised warning message.}
% \begin{macrocode}
-\newcommand*{\VERCMD@Warning}[3]{%
+\newcommand*{\VERCMDWarning}[3]{%
\ifblank{#1}%
{%
\VERCMD@ProgWarning{%
- Something may fail. A definition has changed:\MessageBreak
+ A definition has changed:\MessageBreak
\ifblank{#2}{}{#2: }\string#3\MessageBreak
- \VERCMD@temp\MessageBreak
- }
- \expandafter\VERCMD@addchanged\expandafter{\VERCMD@temp}{\string#3}%
+ (\VERCMD@temp)\MessageBreak
+ }%
+ \expandafter\VERCMD@addchanged%
+ \expandafter{\VERCMD@temp}{\string#3}%
}%
{%
\PackageWarning{#1}{%
- Something may fail. A definition has changed:\MessageBreak%
+ A definition has changed:\MessageBreak%
\ifblank{#2}{}{#2: }%
\string#3\MessageBreak%
- \VERCMD@temp\MessageBreak%
+ (\VERCMD@temp)\MessageBreak%
}%
- \expandafter\VERCMD@addchanged\expandafter{\VERCMD@temp}{\ifblank{#2}{}{#2: }\string#3}%
+ \expandafter\VERCMD@addchanged%
+ \expandafter{\VERCMD@temp}{#1 -> \ifblank{#2}{}{#2: }\string#3}%
}%
}
% \end{macrocode}
@@ -929,19 +1180,78 @@ pageanchor=true,
% \end{macrocode}
%
%
+%
% \subsection{User interface}
%
-% \begin{macro}{\VerifyCommand} \oarg{yourpackage} \oarg{theirpackage}
+%
+% \DescribeBoolean{VERCMD@passed} True if any test passed.
+% \changes{v1.10}{2024/08/28}{Added test groups.}
+% \begin{macrocode}
+\newbool{VERCMD@passed}
+% \end{macrocode}
+%
+% \DescribeBoolean{VERCMD@failed} True if any test failed.
+% \changes{v1.10}{2024/08/28}{Added test groups.}
+% \begin{macrocode}
+\newbool{VERCMD@failed}
+% \end{macrocode}
+%
+% \begin{macro}{\TestVerifyCommands}
+% Starts a new set of \cs{VerifyCommand} tests,
+% after which the booleans will tell if any passed and if any failed.
+% \changes{v1.10}{2024/08/28}{Added test groups.}
+% \begin{macrocode}
+\newcommand*{\TestVerifyCommands}
+{
+ \boolfalse{VERCMD@passed}
+ \boolfalse{VERCMD@failed}
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\IfVerifyCommandPassed} \marg{true} \marg{false}
+% If any of the \cs{VerifyCommand} tests passed, do the |true| clause.
+% If none of them passed, do the |false| clause.
+% \changes{v1.10}{2024/08/28}{Added test groups.}
+% \begin{macrocode}
+\newcommand*{\IfVerifyCommandPassed}
+ {%
+ \ifbool{VERCMD@passed}%
+ {\let\VERCMD@tempa\@firstoftwo}%
+ {\let\VERCMD@tempa\@secondoftwo}%
+ \VERCMD@tempa%
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\IfVerifyCommandFailed} \marg{true} \marg{false}
+% If any of the \cs{VerifyCommand} tests failed, do the |true| clause.
+% If none of them failed, do the |false| clause.
+% \changes{v1.10}{2024/08/28}{Added test groups.}
+% \begin{macrocode}
+\newcommand*{\IfVerifyCommandFailed}
+ {%
+ \ifbool{VERCMD@failed}%
+ {\let\VERCMD@tempa\@firstoftwo}%
+ {\let\VERCMD@tempa\@secondoftwo}%
+ \VERCMD@tempa%
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\IfVerifyCommand} \oarg{yourpackage} \oarg{theirpackage}
% \marg{\cs{commandname}} \marg{\MDfive\ checksum}
+% \marg{true} \marg{false}
+% \changes{v1.10}{2024/06/25}{Added conditional tests.}
%
% Test for various kinds of definitions, and convert them to \MDfive\ checksums.
% \begin{macrocode}
-\NewDocumentCommand{\VerifyCommand}{O{} O{} m m}{%
+\NewDocumentCommand{\IfVerifyCommand}{O{} O{} m m}{%
% \end{macrocode}
%
% Only if the package is enabled:
% \begin{macrocode}
- \ifbool{VERCMD@enable}{%
+ \ifbool{VERCMDenable}{%
% \end{macrocode}
%
% Default to an un-detected definition type:
@@ -949,11 +1259,18 @@ pageanchor=true,
\edef\VERCMD@temp{Unknown~definition}%
% \end{macrocode}
%
-% For \cs{NewDocumentCommand}, the macro name is ``|\name code|'' with a space in the middle.
+% Will become true if found \cs{NewDocumentCommand} or related.
+% \begin{macrocode}
+ \boolfalse{VERCMD@this@ltxcmd}
+% \end{macrocode}
+%
+% For \cs{NewDocumentCommand}, the macro name is ``|\name code|''
+% with a space in the middle.
% \begin{macrocode}
% % NewDocumentCommand:
\ifcsdef{\cs_to_str:N #3~code}%
{%
+ \booltrue{VERCMD@this@ltxcmd}%
\expandafter\VERCMD@mdfive%
\csname \cs_to_str:N #3~code\endcsname%
}%
@@ -972,7 +1289,8 @@ pageanchor=true,
{%
% \end{macrocode}
%
-% For \cs{DeclareRobustCommand}, the macro name is ``|\name |'' with a trailing space.
+% For \cs{DeclareRobustCommand}, the macro name is ``|\name |''
+% with a trailing space.
% \begin{macrocode}
% % DeclareRobustCommand:
\ifcsdef{\cs_to_str:N #3~}%
@@ -983,19 +1301,24 @@ pageanchor=true,
{%
% \end{macrocode}
%
-% For \cs{newcommand} with an option, the macro name is ``|\\name|'', with two backslashes.
+% For \cs{newcommand} with an option, the macro name is ``|\\name|'',
+% with two backslashes.
% \begin{macrocode}
% % newcommand w/ option:
\ifcsdef{\VERCMD@backslash\cs_to_str:N #3}%
{%
\expandafter\VERCMD@mdfive%
- \csname \VERCMD@backslash\cs_to_str:N #3\endcsname%
+ \csname %
+ \VERCMD@backslash%
+ \cs_to_str:N #3%
+ \endcsname%
}%
% \end{macrocode}
%
% For \cs{newcommand}, the macro name is ``|\name|''.
%
-% If none match, the default unknown definition warning is show in place of the checksum.
+% If none match, the default unknown definition warning is shown
+% in place of the checksum.
% \begin{macrocode}
{%
% % newcommand:
@@ -1008,33 +1331,65 @@ pageanchor=true,
}%
% \end{macrocode}
%
-% If the checksum does not match the expected value, issue a warning.
+% If the checksum matches the expected value, do the following
+% |true| clause, else do the following |false| clause.
+% Also track the true and false tests for \cs{IfVerifyCommandPassed}
+% and \cs{IfVerifyCommandFailed}.
+% \changes{v1.10}{2024/08/28}{Added test groups.}
% \begin{macrocode}
\ifdefstring{\VERCMD@temp}{#4}%
- {}%
{%
- \VERCMD@Warning{#1}{#2}{#3}%
+ \booltrue{VERCMD@passed}%
+ \let\VERCMD@tempa\@firstoftwo%
+ }%
+ {%
+ \booltrue{VERCMD@failed}%
+ \let\VERCMD@tempa\@secondoftwo%
}%
}% if package enabled
- {}% if package not enabled
+ {\let\VERCMD@tempa\@firstoftwo}% if package not enabled
+ \VERCMD@tempa%
}
% \end{macrocode}
% \end{macro}
%
%
-% \begin{macro}{\VerifyEnvironment} \oarg{yourpackage} \oarg{theirpackage}
-% \marg{\cs{commandname}}
-% \marg{begin \MDfive\ checksum}
-% \marg{end \MDfive\ checksum}
+% \begin{macro}{\VerifyCommand} \oarg{yourpackage} \oarg{theirpackage}
+% \marg{\cs{commandname}} \marg{\MDfive\ checksum}
%
-% Test both the begin and end section of the environment.
+% Test for various kinds of definitions, and convert them to \MDfive\ checksums.
% \begin{macrocode}
-\NewDocumentCommand{\VerifyEnvironment}{O{} O{} m m m}{%
+\NewDocumentCommand{\VerifyCommand}{O{} O{} m m}{%
+ \ifblank{#1}{% #1 blank
+ \IfVerifyCommand{#3}{#4}{}{\VERCMDWarning{}{}{#3}}%
+ }% #1 blank
+ {% #1 given
+ \ifblank{#2}{% #2 blank
+ \IfVerifyCommand[#1]{#3}{#4}{}{\VERCMDWarning{#1}{}{#3}}%
+ }% #2 blank
+ {% #2 given
+ \IfVerifyCommand[#1][#2]{#3}{#4}{}{\VERCMDWarning{#1}{#2}{#3}}%
+ }% #2 given
+ }% #1 given
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\IfVerifyEnvironmentBegin}
+% \oarg{yourpackage} \oarg{theirpackage}
+% \marg{\cs{commandname}}
+% \marg{begin \MDfive\ checksum}
+% \changes{v1.10}{2024/06/25}{Added conditional tests.}
+%
+% Test the begin section of the environment.
+% \begin{macrocode}
+\NewDocumentCommand{\IfVerifyEnvironmentBegin}{O{} O{} m m}{%
% \end{macrocode}
%
% Only if the package is enabled:
% \begin{macrocode}
- \ifbool{VERCMD@enable}{%
+ \ifbool{VERCMDenable}{%
% \end{macrocode}
%
% Default to an un-detected definition type:
@@ -1042,11 +1397,17 @@ pageanchor=true,
\edef\VERCMD@temp{Unknown~definition}%
% \end{macrocode}
%
+% Will become true if found \cs{NewDocumentCommand} or related.
+% \begin{macrocode}
+ \boolfalse{VERCMD@this@ltxcmd}
+% \end{macrocode}
+%
% For \cs{NewDocumentEnvironment}, the macro name is ``|\environment name code|'' with internal spaces.
% \begin{macrocode}
% % NewDocumentEnvironment:
\ifcsdef{environment~#3~code}%
{%
+ \booltrue{VERCMD@this@ltxcmd}%
\expandafter\VERCMD@mdfive%
\csname environment~#3~code\endcsname%
}%
@@ -1075,26 +1436,62 @@ pageanchor=true,
}%
% \end{macrocode}
%
-% If the checksum does not match the expected value, issue a warning.
+% Do the first or second next argument depending on a match:
+% \changes{v1.10}{2024/08/28}{Added test groups.}
% \begin{macrocode}
\ifdefstring{\VERCMD@temp}{#4}%
- {}%
{%
- \VERCMD@Warning{#1}{#2}{#3}%
+ \booltrue{VERCMD@passed}%
+ \let\VERCMD@tempa\@firstoftwo%
+ }%
+ {%
+ \booltrue{VERCMD@failed}%
+ \let\VERCMD@tempa\@secondoftwo%
}%
% \end{macrocode}
%
-% Reset the default to an un-detected definition type:
+% \begin{macrocode}
+ }% if package enabled
+ {\let\VERCMD@tempa\@firstoftwo}% if package not enabled
+ \VERCMD@tempa%
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\IfVerifyEnvironmentEnd}
+% \oarg{yourpackage} \oarg{theirpackage}
+% \marg{\cs{commandname}}
+% \marg{end \MDfive\ checksum}
+% \changes{v1.10}{2024/06/25}{Added conditional tests.}
+%
+% Test the end section of the environment.
+% \begin{macrocode}
+\NewDocumentCommand{\IfVerifyEnvironmentEnd}{O{} O{} m m}{%
+% \end{macrocode}
+%
+% Only if the package is enabled:
+% \begin{macrocode}
+ \ifbool{VERCMDenable}{%
+% \end{macrocode}
+%
+% Default to an un-detected definition type:
% \begin{macrocode}
\edef\VERCMD@temp{Unknown~definition}%
% \end{macrocode}
%
+% Will become true if found \cs{NewDocumentCommand} or related.
+% \begin{macrocode}
+ \boolfalse{VERCMD@this@ltxcmd}
+% \end{macrocode}
+%
% For \cs{NewDocumentEnvironment}, the ending macro name
% is ``|\environment name end aux |'', with spaces and a trailing space.
% \begin{macrocode}
% % end DocumentEnvironment:
\ifcsdef{environment~#3~end~aux~}%
{%
+ \booltrue{VERCMD@this@ltxcmd}%
\expandafter\VERCMD@mdfive
\csname environment~#3~end~aux~\endcsname%
}%
@@ -1113,24 +1510,134 @@ pageanchor=true,
}%
% \end{macrocode}
%
-% If the checksum does not match the expected value, issue a warning.
+% Do the first or second next argument depending on a match:
+% \changes{v1.10}{2024/08/28}{Added test groups.}
% \begin{macrocode}
- \ifdefstring{\VERCMD@temp}{#5}%
- {}%
+ \ifdefstring{\VERCMD@temp}{#4}%
+ {%
+ \booltrue{VERCMD@passed}%
+ \let\VERCMD@tempa\@firstoftwo%
+ }%
{%
- \VERCMD@Warning{#1}{#2}{(end)#3}%
+ \booltrue{VERCMD@failed}%
+ \let\VERCMD@tempa\@secondoftwo%
}%
}% if package enabled
- {}% if package not enabled
+ {\let\VERCMD@tempa\@firstoftwo}% if package not enabled
+ \VERCMD@tempa%
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\VerifyEnvironment} \oarg{yourpackage} \oarg{theirpackage}
+% \marg{\cs{commandname}}
+% \marg{begin \MDfive\ checksum}
+% \marg{end \MDfive\ checksum}
+%
+% Test both the begin and end section of the environment.
+% \begin{macrocode}
+\NewDocumentCommand{\VerifyEnvironment}{O{} O{} m m m}{%
+% begin:
+ \ifblank{#1}{% #1 blank
+ \IfVerifyEnvironmentBegin{#3}{#4}%
+ {}%
+ {\VERCMDWarning{}{}{#3}}%
+ }% #1 blank
+ {% #1 given
+ \ifblank{#2}{% #2 blank
+ \IfVerifyEnvironmentBegin[#1]{#3}{#4}%
+ {}%
+ {\VERCMDWarning{#1}{}{#3}}%
+ }% #2 blank
+ {% #2 given
+ \IfVerifyEnvironmentBegin[#1][#2]{#3}{#4}%
+ {}%
+ {\VERCMDWarning{#1}{#2}{#3}}%
+ }% #2 given
+ }% #1 given
+% end:
+ \ifblank{#1}{% #1 blank
+ \IfVerifyEnvironmentEnd{#3}{#5}%
+ {}%
+ {\VERCMDWarning{}{}{(end)#3}}%
+ }% #1 blank
+ {% #1 given
+ \ifblank{#2}{% #2 blank
+ \IfVerifyEnvironmentEnd[#1]{#3}{#5}%
+ {}%
+ {\VERCMDWarning{#1}{}{(end)#3}}%
+ }% #2 blank
+ {% #2 given
+ \IfVerifyEnvironmentEnd[#1][#2]{#3}{#5}%
+ {}%
+ {\VERCMDWarning{#1}{#2}{(end)#3}}%
+ }% #2 given
+ }% #1 given
}
% \end{macrocode}
% \end{macro}
%
+%
% \begin{macrocode}
\ExplSyntaxOff
% \end{macrocode}
%
%
+% \subsection{Verify infrastructure}
+%
+% \changes{v1.10}{2024/08/28}{Tests low-level \cs{NewDocumentCommand} code.}
+%
+% The low-level infrastructure for \cs{NewDocumentCommand} and related
+% may change on occasion, causing a change in the resulting code and
+% a verification error for such code.
+% The following is done while generating the documentation
+% for the \pkg{verifycommand} package,
+% and verifies the definitions of the underlying
+% infrastructure and issues a warning if any has changed.
+%
+% In the source for the following, \filenm{ltxcmd.dtx} uses |@@| which is
+% replaced by |__cmd|.
+%
+% (Testing silently occurs here, without adding text to the documentation.)
+%
+% \ExplSyntaxOn
+%
+% \TestVerifyCommands
+%
+% ^^A *checksums
+% \VerifyCommand[verifycommand][LaTeX kernel]{\__cmd_declare_cmd_code:Nnn}
+% {0911983C176452DDE1F471783F875529}
+%
+% \VerifyCommand[verifycommand][LaTeX kernel]{\__cmd_declare_cmd_optimized:Nnn}
+% {CC1FE1C2D4782317D9E9EB391AD7FFE4}
+%
+% \VerifyCommand[verifycommand][LaTeX kernel]{\__cmd_declare_cmd_code_aux:Nnn}
+% {6675F7AC09F310F6AB963DAA0860BD37}
+%
+% \VerifyCommand[verifycommand][LaTeX kernel]{\__cmd_declare_cmd_code_expandable:Nnn}
+% {8EDCF2A369B6F9CE43280D9118F01383}
+
+% \VerifyCommand[verifycommand][LaTeX kernel]{\__cmd_declare_env_internal:nnnn}
+% {7F026120EACC68911B492D09A4B0F537}
+%
+% \ExplSyntaxOff
+%
+% \IfVerifyCommandFailed
+% {
+% \AfterEndDocument{
+% \PackageWarningNoLine{verifycommand}{%
+% The internals for LaTeX \string\NewCommand\MessageBreak%
+% and related have changed.\MessageBreak%
+% Update the checksums in verifycommand.dtx\MessageBreak
+% at `*checksums', and research when the\MessageBreak
+% internals changed and update the date\MessageBreak
+% in verifycommand.dtx at `*date'%
+% }%
+% }
+% }
+% {}
+%
%
% \clearpage
%
diff --git a/macros/latex/contrib/verifycommand/verifycommand.pdf b/macros/latex/contrib/verifycommand/verifycommand.pdf
index b58e11c6c2..19accc8682 100644
--- a/macros/latex/contrib/verifycommand/verifycommand.pdf
+++ b/macros/latex/contrib/verifycommand/verifycommand.pdf
Binary files differ
diff --git a/macros/latex/contrib/writeongrid/doc/WriteOnGrid-5x5-A4.pdf b/macros/latex/contrib/writeongrid/doc/WriteOnGrid-5x5-A4.pdf
new file mode 100644
index 0000000000..0d8a71a39a
--- /dev/null
+++ b/macros/latex/contrib/writeongrid/doc/WriteOnGrid-5x5-A4.pdf
Binary files differ
diff --git a/macros/latex/contrib/writeongrid/doc/WriteOnGrid-5x5-A4.tex b/macros/latex/contrib/writeongrid/doc/WriteOnGrid-5x5-A4.tex
new file mode 100644
index 0000000000..acb246e07c
--- /dev/null
+++ b/macros/latex/contrib/writeongrid/doc/WriteOnGrid-5x5-A4.tex
@@ -0,0 +1,26 @@
+% !TeX TXS-program:compile = txs:///arara
+% arara: pdflatex: {shell: no, synctex: no, interaction: batchmode}
+
+\documentclass[a4paper,11pt]{article}
+\usepackage{WriteOnGrid}
+\usepackage{lipsum}
+\usepackage{frcursive}
+
+\begin{document}
+
+\thispagestyle{empty}
+
+\begin{PleinePageCinqCinq}[FormatPapier=A4,NumLignes,MargeG=0.7,MargeH=2.3]
+%entête
+\LignePapierCinqCinq[Echelle=1.25,Ligne=1]{C. PIERQUET \hfill \LaTeX}
+%titre
+\LignePapierCinqCinq[Echelle=1.25,Ligne=2,Couleur=red]<center>{\underline{\cursive\bfseries Devoir 1}}
+%cadre de notes
+\CadreNoteCinqCinq{3}
+%ligne pour un petit titre
+\LignePapierCinqCinq[Echelle=1.25,Ligne=8,Couleur=green!50!black]{\sffamily\underline{Exercice 1 :}}
+%%paragraphe lipsum avec une échelle de 1.15 := calcul de l'interligne
+\ParagraphePapierCinqCinq[Ligne=10,Echelle=1.15,Espacement=\fpeval{10/1.15}]{\cursive\lipsum[1][1-7]}
+\end{PleinePageCinqCinq}
+
+\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/writeongrid/doc/WriteOnGrid-doc-en.pdf b/macros/latex/contrib/writeongrid/doc/WriteOnGrid-doc-en.pdf
index 7bcc35aa1b..7a2a6c5b98 100644
--- a/macros/latex/contrib/writeongrid/doc/WriteOnGrid-doc-en.pdf
+++ b/macros/latex/contrib/writeongrid/doc/WriteOnGrid-doc-en.pdf
Binary files differ
diff --git a/macros/latex/contrib/writeongrid/doc/WriteOnGrid-doc-en.tex b/macros/latex/contrib/writeongrid/doc/WriteOnGrid-doc-en.tex
index 070c88b7cd..3608df559c 100644
--- a/macros/latex/contrib/writeongrid/doc/WriteOnGrid-doc-en.tex
+++ b/macros/latex/contrib/writeongrid/doc/WriteOnGrid-doc-en.tex
@@ -45,8 +45,8 @@
\setlength{\parindent}{0pt}
\definecolor{LightGray}{gray}{0.9}
-\def\TPversion{0.1.6}
-\def\TPdate{12/04/2024}
+\def\TPversion{0.1.7}
+\def\TPdate{01/09/2024}
\usepackage[most]{tcolorbox}
\tcbuselibrary{minted}
@@ -525,6 +525,8 @@ To sum up, they create full paper grid (by preference for \texttt{\textbf{a4pape
\part*{History}
+\verb|v0.1.7|~:~~~~New feature for french paper \textsf{PleinePageCinqCinq}
+
\verb|v0.1.6|~:~~~~Possibility to automatically determine L\&C based on the remaining space.
\verb|v0.1.4|~:~~~~New \texttt{[keys]} + enhancements for paragraphs, for french version (for the moment\dots)
diff --git a/macros/latex/contrib/writeongrid/doc/WriteOnGrid-doc-fr.pdf b/macros/latex/contrib/writeongrid/doc/WriteOnGrid-doc-fr.pdf
index 517ce5911d..76850d725d 100644
--- a/macros/latex/contrib/writeongrid/doc/WriteOnGrid-doc-fr.pdf
+++ b/macros/latex/contrib/writeongrid/doc/WriteOnGrid-doc-fr.pdf
Binary files differ
diff --git a/macros/latex/contrib/writeongrid/doc/WriteOnGrid-doc-fr.tex b/macros/latex/contrib/writeongrid/doc/WriteOnGrid-doc-fr.tex
index 1da2b2b0bc..fb63ea4422 100644
--- a/macros/latex/contrib/writeongrid/doc/WriteOnGrid-doc-fr.tex
+++ b/macros/latex/contrib/writeongrid/doc/WriteOnGrid-doc-fr.tex
@@ -48,8 +48,8 @@
\setlength{\parindent}{0pt}
\definecolor{LightGray}{gray}{0.9}
-\def\TPversion{0.1.6}
-\def\TPdate{12 avril 2024}
+\def\TPversion{0.1.7}
+\def\TPdate{01 septembre 2024}
\usepackage[most]{tcolorbox}
\tcbuselibrary{minted}
@@ -763,6 +763,13 @@ Les commandes et environnements sont suffixées différemment, mais le reste est
\end{PleinePageSeyes}
\end{PresentationCode}
+{\small\faBomb} Pour les pages complètes 5x5, il est possible d'utiliser les clés \Cle{MargeG} et \Cle{MargeH} qui valent \Cle{auto} par défaut (adaptées au format du papier), mais elles peuvent être définies manuellement, avec les \textbf{contraintes} suivantes (pour un affichage correct sur les lignes, pour le moment\ldots) :
+
+\begin{itemize}
+ \item \Cle{MargeG} doit valoir $0.2$ ou $0.7$ ou $1.2$ ou $1.7$ etc
+ \item \Cle{MargeH} doit valoir $0.3$ ou $0.8$ ou $1.3$ ou $1.8$ etc
+\end{itemize}
+
\subsection{Exemples}
Les exemples des pages suivantes ont été obtenus de la même manière que celui de la pleine page Seyes, il \textit{suffit} d'adapter les commandes et environnements avec le bon suffixe.
@@ -770,7 +777,7 @@ Les exemples des pages suivantes ont été obtenus de la même manière que celu
\begin{PresentationCode}{listing only}
\pagestyle{empty}
-\begin{PleinePageCinqCinq}[NumLignes]
+\begin{PleinePageCinqCinq}[NumLignes,MargeG=2.7,MargeH=2.3]
\LignePapierCinqCinq[Echelle=1.25,Ligne=1]{C. PIERQUET \hfill LaTeX}
\LignePapierCinqCinq[Echelle=1.25,Ligne=3,Couleur=red]<center>{\underline{\cursive\bfseries Devoir 2}}
\CadreNoteCinqCinq{4}
@@ -807,7 +814,11 @@ Les exemples des pages suivantes ont été obtenus de la même manière que celu
\pagestyle{empty}
-\begin{PleinePageCinqCinq}[NumLignes]
+\begin{PleinePageCinqCinq}[NumLignes,MargeG=2.7,MargeH=2.3]
+ %marges pour illustrer
+ \draw[thick,teal,<->,>=latex] ([shift={(-2.7,1.5)}]CinqCinqOrigine) --++ (2.7,0) node[midway,below,font=\small\ttfamily] {MargeG} ;
+ \draw[thick,orange,<->,>=latex] ([shift={(-0.5,0)}]CinqCinqOrigine) --++ (0,2.3) node[midway,right,font=\small\ttfamily] {MargeH} ;
+ %back to normal
\LignePapierCinqCinq[Echelle=1.25,Ligne=1]{C. PIERQUET \hfill LaTeX}
\LignePapierCinqCinq[Echelle=1.25,Ligne=3,Couleur=red]<center>{\underline{\cursive\bfseries Devoir 2}}
\CadreNoteCinqCinq{4}
@@ -842,6 +853,8 @@ Les exemples des pages suivantes ont été obtenus de la même manière que celu
\section{Historique}
+\verb|v0.1.7|~:~~~~Option pour régler la marge pour les \textsf{PleinePageCinqCinq}
+
\verb|v0.1.6|~:~~~~Possibilité de déterminer automatiquement L\&C en fonction de la place restante.
\verb|v0.1.5|~:~~~~Possibilité de spécifier la réglure pour les quadrillages de type \textsf{Seyes} + meilleure gestion des paragraphes.
diff --git a/macros/latex/contrib/writeongrid/tex/WriteOnGrid.sty b/macros/latex/contrib/writeongrid/tex/WriteOnGrid.sty
index e2673d3c58..3d462b8a33 100644
--- a/macros/latex/contrib/writeongrid/tex/WriteOnGrid.sty
+++ b/macros/latex/contrib/writeongrid/tex/WriteOnGrid.sty
@@ -2,7 +2,8 @@
% licence : Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txtf
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{WriteOnGrid}[2024/04/12 v0.1.6 package to write on grid lines]
+\ProvidesPackage{WriteOnGrid}[2024/09/01 v0.1.7 package to write on grid lines]
+% 0.1.7 Option pour régler la marge pour les PleinePageCinqCinq
% 0.1.6 Commande pour calculer le nombre de lignes à insérer en fin de page / options Auto
% 0.1.5 Choix de la réglure pour le seyes (en pretest) + amélioration de la gestion des paragraphes
% 0.1.4 Suppression des options de xcolor (définition manuelle des couleurs)
@@ -564,16 +565,21 @@
}
%------page entière 5x5
+%les marges doivent valoir MargeH=0.2+k*0.5 et MargeV=0.3+k'*0.5
\defKV[CxCFull]{%
Couleur=\xdef\CCFullCoul{#1},%
CouleurMarge=\xdef\CCFullCoulM{#1},%
- FormatPapier=\xdef\CCFullFormatPap{#1}
+ FormatPapier=\xdef\CCFullFormatPap{#1},%
+ MargeG=\xdef\CCFullMargeG{#1},%
+ MargeH=\xdef\CCFullMargeH{#1}
}
\setKVdefault[CxCFull]{%
Couleur=lightgray!50,%
CouleurMarge=gray,%
NumLignes=false,%
- FormatPapier=A4
+ FormatPapier=A4,%
+ MargeG=auto,%
+ MargeH=auto
}
\NewDocumentEnvironment{PleinePageCinqCinq}{ O{} }%semble OK ^^
@@ -581,13 +587,49 @@
\useKVdefault[CxCFull]%
\setKV[CxCFull]{#1}%
\IfEq{\CCFullFormatPap}{A4}%
- {\xdef\CCFullHautPap{29.7}\xdef\CCFullLargPap{21}\xdef\CCFullMargeG{1.7}\xdef\CCFullMargeH{1.3}}%
+ {%
+ \xdef\CCFullHautPap{29.7}\xdef\CCFullLargPap{21}%
+ \IfEq{\CCFullMargeG}{auto}%
+ {%
+ \xdef\CCFullMargeG{1.7}%
+ }%
+ {}%
+ \IfEq{\CCFullMargeH}{auto}%
+ {%
+ \xdef\CCFullMargeH{1.3}%
+ }%
+ {}%
+ }%
{}%
\IfEq{\CCFullFormatPap}{A5}%
- {\xdef\CCFullHautPap{21}\xdef\CCFullLargPap{14.8}\xdef\CCFullMargeG{1.2}\xdef\CCFullMargeH{0.8}}%
+ {%
+ \xdef\CCFullHautPap{21}\xdef\CCFullLargPap{14.8}%
+ \IfEq{\CCFullMargeG}{auto}%
+ {%
+ \xdef\CCFullMargeG{1.2}%
+ }%
+ {}%
+ \IfEq{\CCFullMargeH}{auto}%
+ {%
+ \xdef\CCFullMargeH{0.8}%
+ }%
+ {}%
+ }%
{}%
\IfSubStr{\CCFullFormatPap}{x}%
- {\StrCut{\CCFullFormatPap}{x}{\CCFullLargPap}{\CCFullHautPap}\xdef\CCFullMargeG{1.7}\xdef\CCFullMargeH{1.3}}%
+ {%
+ \StrCut{\CCFullFormatPap}{x}{\CCFullLargPap}{\CCFullHautPap}%
+ \IfEq{\CCFullMargeG}{auto}%
+ {%
+ \xdef\CCFullMargeG{1.7}%
+ }%
+ {}%
+ \IfEq{\CCFullMargeH}{auto}%
+ {%
+ \xdef\CCFullMargeH{1.3}%
+ }%
+ {}%
+ }%
{}%
%calcul du nombre de lignes /colonnes ?
\xdef\CCFullNbLign{\fpeval{round(\CCFullHautPap/(0.5),0)}}%
diff --git a/macros/latex/contrib/xcolor/ChangeLog b/macros/latex/contrib/xcolor/ChangeLog
index a85977fdd0..b366cd0e4b 100644
--- a/macros/latex/contrib/xcolor/ChangeLog
+++ b/macros/latex/contrib/xcolor/ChangeLog
@@ -3,6 +3,15 @@ https://github.com/latex3/xcolor/issues
History
=======
+2024/09/29 v3.02
+* remove definitions of color groups as they are already in the kernel.
+
+2024/09/17
+* unknown model error handled (issue #1)
+
+2024/03/13
+* Add \relax after \ProcessKeyOptions to improve error context lines
+
2023/11/15 v3.01
* only warn and not error if obsolete option usenames is used, issue #31
diff --git a/macros/latex/contrib/xcolor/README.md b/macros/latex/contrib/xcolor/README.md
index 2e89dafed9..66f53b32c7 100644
--- a/macros/latex/contrib/xcolor/README.md
+++ b/macros/latex/contrib/xcolor/README.md
@@ -1,6 +1,6 @@
## Package `xcolor` by Dr. Uwe Kern
-Version 2023-11-15 v3.01
+Version 2024-09-29 v3.02
Maintained by the LaTeX Project https://github.com/latex3/xcolor/issues
@@ -14,7 +14,7 @@ separation, and color wheel calculations.
## Copyright (C)
- 2003-2021 Dr. Uwe Kern
-- 2021-2023 The LaTeX Project
+- 2021-2024 The LaTeX Project
## License
LaTeX Project Public License, version 1.3c or later.
diff --git a/macros/latex/contrib/xcolor/xcolor.dtx b/macros/latex/contrib/xcolor/xcolor.dtx
index 5af5459682..5a8dd1ee08 100644
--- a/macros/latex/contrib/xcolor/xcolor.dtx
+++ b/macros/latex/contrib/xcolor/xcolor.dtx
@@ -2,7 +2,7 @@
%%
%% ----------------------------------------------------------------
%% Copyright (C) 2003-2021 by Dr. Uwe Kern <xcolor at ukern dot de>
-%% 2021-2023 LaTeX Project https://github.com/latex3/xcolor/issues
+%% 2021-2024 LaTeX Project https://github.com/latex3/xcolor/issues
%% ----------------------------------------------------------------
%%
%<*package>
@@ -18,8 +18,8 @@
%%
%</package>
%<*extract|driver|test1|test2|test3|test4>
-\def\XCfileversion{v3.01}%
-\def\XCfiledate{2023/11/15}%
+\def\XCfileversion{v3.02}%
+\def\XCfiledate{2024/09/29}%
%</extract|driver|test1|test2|test3|test4>
%
% This file may be distributed and/or modified under the
@@ -320,7 +320,7 @@
% There are proprietary models (like \Index{Pantone} or \Index{HKS}) that provide finite sets of colors (often called \emph{\Index{spot color}s}), where the user has to choose from without caring about parametrisations; on the other hand, there are parameter-driven models like \Model{gray}, \Model{rgb}, and \Model{cmyk}, that aim to represent large finite or even (theoretically) infinite sets of colors, built on very small subsets of base colors and rules, how to construct other colors from these base colors.
% For example, a large range of colors can be constructed by linear combinations of the base colors \Color{red}, \Color{green}, and \Color{blue}.
% On the other hand, usually \Index{spot color}s can only be \emph{approximated} by parameter values in models like \Model{cmyk} or \Model{rgb}; the original colors are being physically mixed even dependent on the targeted kind of paper.
-% Finally, there are certain colors like \Color{gold} and \Color{silver} that are hardly reproducable by any parameter-driven color model on standard ink or laser printers.
+% Finally, there are certain colors like \Color{gold} and \Color{silver} that are hardly reproducible by any parameter-driven color model on standard ink or laser printers.
%
%
%
@@ -501,7 +501,7 @@
%
% Example: assuming that |a.tex| is a complete \LaTeX{} document, a command like
% `|latex \def\xcolorcmd{\colorlet{black}{red}}\input{a}|'
-% at the console generates a file |a.dvi| with all occurences of \Color{black} being replaced by \Color{red}, without the necessity to change the source file itself.
+% at the console generates a file |a.dvi| with all occurrences of \Color{black} being replaced by \Color{red}, without the necessity to change the source file itself.
% (The exact spelling of the console command might vary across operating systems and \TeX{} distributions.)
%
%
@@ -2486,7 +2486,7 @@
% \subsection{Color conversion and complements}\label{sec.cnv}
%
% We collect here the specific conversion formulas between the supported color models.
-% Table \vref{tab.cnv} gives an overwiew of how each conversion pair is handled.
+% Table \vref{tab.cnv} gives an overview of how each conversion pair is handled.
% In general, \Index{PostScript} (as described in \cite{plrm}) is used as a basis for most of the calculations, since it supports the color models \Model{rgb}, \Model{cmyk}, \Model{hsb}, and \Model{gray} natively.
% Furthermore, \People{Alvy Ray}{Smith}'s paper \cite{smith} is cited in \cite{plrm} as reference for \Model{hsb}-related formulas.
%
@@ -4119,7 +4119,7 @@
{
,usenames .code =
{\PackageWarning{xcolor}{Package option `usenames' is obsolete and ignored}}
- ,usename .usage = preamble
+ ,usenames .usage = preamble
,hyperref .code =
{\PackageWarning{xcolor}{Package option `hyperref' is obsolete and ignored}}
,hyperref .usage = preamble
@@ -4153,9 +4153,14 @@
% \end{macrocode}
%
% After the options are processed, load the appropriate driver file.
-% If a site wants a default driver (e.g., \Option{dvips}) it just needs to put |\ExecuteOptions{dvips}| in a \File{color.cfg} file.
+% If a site wants a default driver (e.g., \Option{dvips}) it just needs
+% to put |\ExecuteOptions{dvips}| in a \File{color.cfg} file.
+%
+% Note |\relax| added here to ensure that |\ProcessKeyOptions| not the following
+% |\edef| shows in error context lines for unknown options.
+% \changes{3.02}{2024-03-13}{Added \cs{relax}}
% \begin{macrocode}
-\ProcessKeyOptions
+\ProcessKeyOptions\relax
% \end{macrocode}
%
% \begin{macro}{\XC@@drv}
@@ -4269,7 +4274,7 @@
%
% \begin{macro}{\xglobal}
% \begin{macro}{\xglobal@test}
-% If |\foo| occurs in the token list |\xglobal@@|, then the command |\xglobal\foo| will set the switch |\xglobal@true| which can be used inside |\foo| to determine whether certain definitions are to be made explicitely global.
+% If |\foo| occurs in the token list |\xglobal@@|, then the command |\xglobal\foo| will set the switch |\xglobal@true| which can be used inside |\foo| to determine whether certain definitions are to be made explicitly global.
% |\foo| is responsible for resetting |\xglobal@false| in order to avoid side effects.
% To include |\foo| in the magic list, simply say |\XC@append\xglobal@list{\foo}|.
% If |\foo| is not in the list, |\xglobal\foo| will behave like |\global\foo|, thus |\xglobal\let| will be like |\global\let| etc.
@@ -4356,7 +4361,7 @@
%
% \begin{macro}{\XC@replace}
% \marg{cmd}\marg{search}\marg{replace}\\
-% Replace all occurences of \meta{search} within the first-level expansion of \meta{cmd} by \meta{replace} and save the result in \meta{cmd}.
+% Replace all occurrences of \meta{search} within the first-level expansion of \meta{cmd} by \meta{replace} and save the result in \meta{cmd}.
% The replacement is recursive, so don't put the search pattern into the replacement text!
% Note that this macro is incapable of seeing `into' braces.
% The code and its explanation is taken from \People{Donald}{Arseneau}'s \Package{url} package \cite{url}, with only minor changes and renamings applied.
@@ -4976,9 +4981,10 @@
% Retrieve model position |\XC@@pos|, model |\@@mod|, and target model |\@@Mod| from multiple definitions (up to~8), separated by `|/|'.
% \begin{macrocode}
\def\XC@getmod#1/#2/#3/#4/#5/#6/#7/#8/#9\XC@@
- {\XC@g@tm@d0#1::\XC@@ \XC@getm@d1{#2}\XC@getm@d2{#3}%
+ {\def\XC@dflt@@mod{#1}%
+ \XC@g@tm@d0#1::\XC@@ \XC@getm@d1{#2}\XC@getm@d2{#3}%
\XC@getm@d3{#4}\XC@getm@d4{#5}\XC@getm@d5{#6}\XC@getm@d6{#7}%
- \XC@getm@d7{#8}\def\XC@@pos{0}\def\@@mod{#1}\@gobble\@nnil}%
+ \XC@getm@d7{#8}\def\XC@@pos{0}\let\@@mod\XC@dflt@@mod\@gobble\@nnil}%
% \end{macrocode}
%
% \begin{macrocode}
@@ -4990,7 +4996,10 @@
% \begin{macrocode}
\def\XC@g@tm@d#1#2:#3:#4\XC@@
{\@ifxempty{#3}{\let\@@Mod\XC@mod@ignore\XC@getm@d0{#2}}%
- {\def\@@Mod{#2}\XC@getm@d0{#3}}}%
+ {\def\@@Mod{#2}%
+ \def\XC@tgt@mod##1{#2}%
+ \def\XC@dflt@@mod{#3}%
+ \XC@getm@d0{#3}}}%
% \end{macrocode}
% \end{macro}
%
@@ -6182,11 +6191,13 @@
%
%
% \subsubsection{Extra groups}
-% Turning on extra groups in the standard \LaTeX\ commands, so that color commands are scoped corectly.
%
-% Like |\normalcolor|, the following five commands are defined in the kernel, with empty definitions (|\relax|).
+% Like |\normalcolor|, the following five commands are defined in the kernel.
% This means that they can be used to make macros in packages `color safe'.
-% The commands will not have any effect unless a user also uses a color package, when the `active definitions' here will take effect and keep color commands correctly scoped.
+% The extra groups have been made permanent in the \LaTeX{} kernel 2021 so
+% they are no longer redefined here.
+% The |\color@setgroup| will not have any effect unless a user also uses
+% a color package, when the `active definition' here will take effect.
%
% \begin{macro}{\color@setgroup}
% This is to be used in contexts (e.g., `lrbox') where text is to be saved and used after some other, unknown, text that may contain color commands.
@@ -6200,38 +6211,23 @@
% This is to be used at the start of contexts that may contain color commands, but where it is not necessary to save the current color.
% Examples of this are in the box commands of \File{ltboxes.dtx} where user-supplied text is saved internally in a box between |\color@begingroup|, |\color@endgroup|, but the box is used before any other color commands could intervene.
% A matching |\color@endgroup| should be used at the end of the text.
-% \begin{macrocode}
-\let\color@begingroup\begingroup
-% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\color@endgroup}
% To be used to close the `group' started by one of the above two commands.
% The |\endgraf| in its definition is required in the case of groups of text in vertical `par' mode, but doesn't do any harm in horizontal `LR' contexts.
-% \begin{macrocode}
-\def\color@endgroup{\endgraf\endgroup}
-% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\color@hbox}
% To be used to open a `colored hbox'
-% \begin{macrocode}
-\def\color@hbox{\hbox\bgroup\color@begingroup}
-% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\color@vbox}
% To be used to open a `colored hbox'
-% \begin{macrocode}
-\def\color@vbox{\vbox\bgroup\color@begingroup}
-% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\color@endbox}
% To be used to close a `colored (h/v)box'
-% \begin{macrocode}
-\def\color@endbox{\color@endgroup\egroup}
-% \end{macrocode}
% \end{macro}
%
%
@@ -6458,7 +6454,7 @@
%
% \begin{macro}{\XC@cnv@gray}
% \Meta{gray}|,|
-% \changes{3.0}{2022-08-10}{moved the patch from hycolor to correct Gray model, issue \#23}
+% \changes{3.0}{2022-08-10}{moved the patch from hycolor to correct Gray model, issue \#23}w
% \begin{macrocode}
\def\XC@cnv@gray#1,%
{\XC@ifxcase\tm
diff --git a/macros/latex/contrib/xcolor/xcolor.pdf b/macros/latex/contrib/xcolor/xcolor.pdf
index c9ab96b507..1988dfce2e 100644
--- a/macros/latex/contrib/xcolor/xcolor.pdf
+++ b/macros/latex/contrib/xcolor/xcolor.pdf
Binary files differ
diff --git a/macros/latex/contrib/xcolor/xcolor2.pdf b/macros/latex/contrib/xcolor/xcolor2.pdf
index 07d228343c..ae9d34157a 100644
--- a/macros/latex/contrib/xcolor/xcolor2.pdf
+++ b/macros/latex/contrib/xcolor/xcolor2.pdf
Binary files differ
diff --git a/macros/latex/contrib/xreview/README b/macros/latex/contrib/xreview/README
new file mode 100644
index 0000000000..a8ead075a5
--- /dev/null
+++ b/macros/latex/contrib/xreview/README
@@ -0,0 +1,54 @@
++-----------------------------------------------------------------------+
+| |
+| _______ _______ _________ _______ |
+| |\ /|( ____ )( ____ \|\ /|\__ __/( ____ \|\ /| |
+| ( \ / )| ( )|| ( \/| ) ( | ) ( | ( \/| ) ( | |
+| \ (_) / | (____)|| (__ | | | | | | | (__ | | _ | | |
+| ) _ ( | __)| __) ( ( ) ) | | | __) | |( )| | |
+| / ( ) \ | (\ ( | ( \ \_/ / | | | ( | || || | |
+| ( / \ )| ) \ \__| (____/\ \ / ___) (___| (____/\| () () | |
+| |/ \||/ \__/(_______/ \_/ \_______/(_______/(_______) |
+| |
+| |
+| Reviewing LaTeX document made easy |
+| |
+| by Lorenzo Peri - lp586@cam.ac.uk |
+| |
++-----------------------------------------------------------------------+
+
+DESCRIPTION
+===========
+
+This package provides a simple way to review LaTeX documents. It allows to higlight and/or hide changes to a document, and to add comments to the text. This will help you to keep track of the changes you make to a document, and to easily spot the changes made by others, while always having the option of toggling a clean version of the document.
+
+This package also offers a way to include comments in the text, which can be toggled on and off. This is useful for adding notes to the text, or for leaving comments to other authors.
+
+AUTHOR
+======
+
+The package is maintained by Lorenzo Peri (https://github.com/LorenzoPeri17). The repository is available at https://github.com/LorenzoPeri17/xreview-latex.
+
+LICENSE
+=======
+
+MIT License
+
+Copyright (c) 2024 Lorenzo Peri
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/macros/latex/contrib/xreview/xreview.pdf b/macros/latex/contrib/xreview/xreview.pdf
new file mode 100644
index 0000000000..27374c984d
--- /dev/null
+++ b/macros/latex/contrib/xreview/xreview.pdf
Binary files differ
diff --git a/macros/latex/contrib/xreview/xreview.sty b/macros/latex/contrib/xreview/xreview.sty
new file mode 100644
index 0000000000..a6d2501eed
--- /dev/null
+++ b/macros/latex/contrib/xreview/xreview.sty
@@ -0,0 +1,135 @@
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{xreview}[2024/08/29 Reviewing LaTeX documents made easy]
+
+\RequirePackage{xcolor}
+\RequirePackage[normalem]{ulem}
+\RequirePackage{etoolbox}
+\RequirePackage{environ}
+\RequirePackage{letltxmacro}
+\RequirePackage{todonotes}
+\RequirePackage{soul}
+\RequirePackage{pifont}
+\RequirePackage{xparse}
+\RequirePackage{amsmath}
+
+%%%% Equation numbering
+\newcounter{removedeqcounter}
+\setcounter{removedeqcounter}{0}
+
+%%%% Comment numbering
+\newcounter{commentcounter}
+\setcounter{commentcounter}{0}
+
+%%%% Define colours and prefixes
+\newcommand{\addedcolor}{blue}
+\newcommand{\removedcolor}{red}
+\newcommand{\removedeqprefix}{R}
+\newcommand{\commentcolor}{yellow}
+\newcommand{\resolvedcommentcolor}{green}
+\newcommand{\commentprefix}{C}
+
+%%%% Necessary for comments to work in twocolumn-type documents
+\setlength{\marginparwidth}{2cm}
+
+%%%% Reviewing commands
+\newtoggle{annotated}
+\toggletrue{annotated} % Show changes by default
+
+\newcommand{\showchanges}{\toggletrue{annotated}}
+\newcommand{\showclean}{\togglefalse{annotated}}
+
+\newtoggle{commented}
+\toggletrue{commented} % Show comments by default
+
+\newcommand{\showcomments}{\toggletrue{commented}}
+\newcommand{\hidecomments}{\togglefalse{commented}}
+
+%%%% Text coloring and hiding
+\newcommand{\colortext}[2]{{\leavevmode\color{#1}{#2}}}
+\newcommand{\safesout}[1]{\ifmmode\text{\sout{\ensuremath{#1}}}\else\sout{#1}\fi}
+\newcommand{\hidefromclean}[1]{\iftoggle{annotated}{#1}{}}
+
+\newcommand{\added}[1]{\iftoggle{annotated}{\colortext{\addedcolor}{#1}}{{#1}}}
+
+\newcommand{\removed}[1]{\hidefromclean{%
+\begingroup%
+\let\oldcite\cite%
+\renewcommand{\cite}[1]{\mbox{\oldcite{##1}}}%
+\colortext{\removedcolor}{\safesout{#1}}%
+\endgroup}}
+
+\newcommand{\changed}[2]{\removed{#1}\iftoggle{annotated}{ }{}\added{#2}}
+
+%%%% Equation coloring and hiding
+\NewEnviron{remequation}{\hidefromclean{%
+\addtocounter{equation}{-1}%
+\refstepcounter{removedeqcounter}%
+\renewcommand{\theequation}{\textcolor{\removedcolor}{\removedeqprefix\arabic{removedeqcounter}}}%
+\let\oldnonumber\nonumber%
+\renewcommand{\nonumber}{\addtocounter{equation}{1}\addtocounter{removedeqcounter}{-1}\oldnonumber}%
+\renewcommand{\notag}{\nonumber}%
+\begin{equation}%
+\color{\removedcolor}%
+\safesout{\BODY}%
+\end{equation}}}
+
+\NewEnviron{remequation*}{\hidefromclean{%
+\begin{equation*}%
+\color{\removedcolor}%
+\safesout{\BODY}%
+\end{equation*}}}
+
+\NewEnviron{addequation}{%
+\begin{equation}%
+\added{\BODY}%
+\end{equation}}
+
+\NewEnviron{addequation*}{%
+\begin{equation*}%
+\added{\BODY}%
+\end{equation*}}
+
+\newcommand{\removedeqline}[1]{\hidefromclean{%
+\let\oldnonumber\nonumber%
+\renewcommand{\nonumber}{\global\tag@false\addtocounter{removedeqcounter}{-1}}%
+\renewcommand{\notag}{\nonumber}%
+\makeatletter%
+\newcommand{\remlabel}{%
+\refstepcounter{removedeqcounter}%
+\global\tag@true%
+\oldnonumber%
+\gdef\df@tag{\maketag@@@{\textcolor{\removedcolor}{(\removedeqprefix\arabic{removedeqcounter})}}\def\@currentlabel{\textcolor{\removedcolor}{\removedeqprefix\arabic{removedeqcounter}}}}}
+\makeatother
+\remlabel%
+\color{\removedcolor}%
+\makeatletter\let\default@color\current@color\makeatother%
+\safesout{#1}%
+}}
+
+\newcommand{\addedeqline}[1]{%
+\iftoggle{annotated}{\color{\addedcolor}{#1}}%
+{{#1}}%
+}
+
+\newcommand{\remaligntab}{\hidefromclean{&}}
+\newcommand{\remnewline}{\hidefromclean{\\}}
+
+%%%% Commenting
+\DeclareRobustCommand{\resolvedhl}[1]{{\sethlcolor{green}\hl{#1}}}
+
+\newcommand{\comment}[3][]{%
+\stepcounter{commentcounter}%
+\ifboolexpr{togl{annotated} and togl{commented}}{%
+\hl{#2}\todo[prepend, color=\commentcolor ,caption=\textbf{\commentprefix\arabic{commentcounter}}, linecolor=black, #1]{#3}}%
+{#2}}
+
+\newcommand{\resolvedcomment}[3][]{%
+\stepcounter{commentcounter}%
+\ifboolexpr{togl{annotated} and togl{commented}}{%
+\resolvedhl{#2}\todo[prepend, color=\resolvedcommentcolor ,caption=\textbf{\ding{52} \commentprefix\arabic{commentcounter}}, linecolor=black, #1]{#3}}%
+{#2}}
+
+\NewDocumentCommand{\authoredcomments}{O{} O{} m}{%
+ \expandafter\newcommand\csname #3comment\endcsname{\comment[author=#3, #1]}%
+ \expandafter\newcommand\csname resolved#3comment\endcsname{\resolvedcomment[author=#3, #2]}%
+} \ No newline at end of file
diff --git a/macros/latex/contrib/xreview/xreview.tex b/macros/latex/contrib/xreview/xreview.tex
new file mode 100644
index 0000000000..31664b2869
--- /dev/null
+++ b/macros/latex/contrib/xreview/xreview.tex
@@ -0,0 +1,591 @@
+\documentclass[a4paper]{ltxdoc}
+\usepackage{amsmath}
+\usepackage{hyperref}
+\usepackage{parskip}
+\usepackage{bold-extra}
+\usepackage{cite}
+\usepackage{filecontents}
+
+
+\usepackage{xreview}
+
+\newcommand{\writecommand}[1]{\texttt{\textbf{{\textbackslash#1}}}}
+\newcommand{\writeenv}[1]{\texttt{\textbf{{#1}}}}
+\newcommand{\writearg}[1]{\{#1\}}
+
+\begin{filecontents}{bibliography.bib}
+ @book{texbook,
+ author = {Donald E. Knuth},
+ year = {1986},
+ title = {The {\TeX} Book},
+ publisher = {Addison-Wesley Professional}
+}
+@book{latex2e,
+ author = {Leslie Lamport},
+ year = {1994},
+ title = {{\LaTeX}: a Document Preparation System},
+ publisher = {Addison Wesley},
+ address = {Massachusetts},
+ edition = {2}
+}
+\end{filecontents}
+
+\title{\textbf{xreview}: \\ \Large{Reviewing
+\LaTeX~documents made easy}}
+
+\author{Lorenzo Peri\\\textcolor{blue}{\href{mailto:lp586@cam.ac.uk}{lp586@cam.ac.uk}}}
+\date{\today, v-1.0}
+
+\hypersetup{
+ pdftitle={xreview},
+ pdfauthor={Lorenzo Peri},
+ urlcolor=cyan,
+}
+
+\changes{v1.0}{2024/08/27}{First version}
+
+\showchanges
+
+\begin{document}
+
+\maketitle
+
+\begin{abstract}
+ \textit{xreview} is an attempt to make the painful process of reviewing a \LaTeX~document easy, or, at least, \textit{a little} less painful.
+\end{abstract}
+
+\tableofcontents
+
+\section{Getting Started}
+
+Have you ever had to make modifications to a manuscript while needing to keep track of the changes? Have you ever been asked by a journal to provide a revised version highlighting the changes \textit{and} a clean version? Is your brain utterly incapable of reasoning about a sentence while it's wrapped in dashes and distracting colors?
+Now you can \texttt{\textbf{{$\backslash$usepackage}}\{xreview\}} to make your life \textit{a little} less miserable.
+
+\subsection{The basics}
+
+\textit{xreview} allows you to quickly show and hide changes to a document.
+This is achieved providing two commands:
+\begin{itemize}
+ \item \writecommand{showchanges} to annotate the changes;
+ \item \writecommand{showclean} to compile a clean document.
+\end{itemize}
+
+Changes can be annotated mostly using the commands:
+\begin{itemize}
+ \item \writecommand{removed} for \removed{removed sections}
+ \item \writecommand{added} for \added{added sections}
+ \item \writecommand{changed} for sections that have been \changed{changed}{modified}
+\end{itemize}
+
+Sounds great, right? Here is a simple example of the package in use!
+
+\begin{center}
+\begin{minipage}[t]{0.3\linewidth}
+\textbf{\LaTeX Code}
+
+\writecommand{textit} \writearg{xreview} is a \writecommand{removed} \writearg{fantastic} package to help \writecommand{added} \writearg{\writecommand{LaTex}} authors review their manuscripts to respond to the \writecommand{changed}\writearg{annoying} \writearg{valuable} modifications suggested by referees.
+
+\end{minipage}
+\hfill
+\begin{minipage}[t]{0.3\linewidth}
+\writecommand{showchanges}
+\showchanges
+
+\textit{xreview} is a \removed{fantastic} package to help \added{\LaTeX} authors review their manuscripts to respond to the \changed{annoying}{valuable} modifications suggested by referees.
+
+\end{minipage}
+\hfill
+\begin{minipage}[t]{0.3\linewidth}
+\writecommand{showclean}
+\showclean
+
+\textit{xreview} is a \removed{fantastic} package to help \added{\LaTeX} authors review their manuscripts to respond to the \changed{annoying}{valuable} modifications suggested by referees.
+\end{minipage}
+\end{center}
+\showchanges
+
+If you look at the source code of this document, you will see that you can toggle \writecommand{showchanges} and \writecommand{showclean} to only show/hide changes in a certain section!
+
+\subsection{Dealing with equations}
+
+The author of this package is a \changed{nerd}{physicist}, so they know full well the pain of needing to review mathematical papers with equations.
+Therefore, \textit{xcite} has first class support for math mode and the more common math environments.
+
+\subsubsection{Inline math}
+
+Inline math (defined within \$ symbols) can be safely used within \writecommand{removed}, \writecommand{added}, and \writecommand{changed}. For example \removed{$\tau$ is superior to $\pi$} is a statement that \textit{should} be \writecommand{removed}.
+
+\subsubsection{\writeenv{remequation} and \writeenv{remequation*} environments}
+
+Dealing with annotating equations is weird and generally quite annoying.
+\textit{xcite} attempts to smooth the process as much as possible by providing the \writeenv{remequation} and \writeenv{remequation*} environments.
+Those markup an equation as if it was \writecommand{removed} while also dealing with numbering correctly, so that \textbf{equation numbering will not change between the annotated and clean versions}.
+
+To simply mark an equation that must be removed, \writeenv{remequation*} can be used as such.
+
+\begin{center}
+ \begin{minipage}[t]{0.3\linewidth}
+ \textbf{\LaTeX Code}
+
+ This equation is kept \newline
+ \writecommand{begin}\writearg{equation}
+
+ ~\quad a+b = c\newline
+ \writecommand{end}\writearg{equation}\newline
+ while this is removed.\newline
+ \writecommand{begin}\writearg{remequation*}
+
+ ~\quad a+b = d\newline
+ \writecommand{end}\writearg{remequation*}\newline
+ See?
+
+ \end{minipage}
+ \hfill
+ \begin{minipage}[t]{0.3\linewidth}
+ \writecommand{showchanges}
+ \showchanges
+
+ This equation is kept
+ \begin{equation}
+ a+b = c
+ \end{equation}\addtocounter{equation}{-1}
+ while this is removed.
+ \begin{remequation*}
+ a+b = d
+ \end{remequation*}
+ See?
+
+ \end{minipage}
+ \hfill
+ \begin{minipage}[t]{0.3\linewidth}
+ \writecommand{showclean}
+ \showclean
+
+ This equation is kept
+ \begin{equation}
+ a+b = c
+ \end{equation}\addtocounter{equation}{-1}
+ while this is removed.
+ \begin{remequation*}
+ a+b = d
+ \end{remequation*}
+ See?
+
+\end{minipage}
+\end{center}
+\showchanges
+
+Sometimes, however, it is useful to be able to reference an equation that is marked to be removed. This may happen because either some text referenced it, or to carry out a discussion around it (i.e. why it was removed).
+To facilitate this, \textit{xreview} provides the \writeenv{remequation} environment, which \textbf{introduces a separate numbering scheme for removed equations}.
+The prefix for this separate numbering is normally a capital `R'. However, this can be customized to one's preference (see Section~\ref{sec:custom}).
+Here's an example
+
+\begin{center}
+ \begin{minipage}[t]{0.3\linewidth}
+ \textbf{\LaTeX Code}
+
+ This equation is kept \newline
+ \writecommand{begin}\writearg{equation}
+
+ ~\quad a+b = c\newline
+ \writecommand{end}\writearg{equation}\newline
+ while this is removed and labelled\newline
+ \writecommand{begin}\writearg{remequation}
+
+ ~\quad a+b = d\newline
+ \writecommand{end}\writearg{remequation}\newline
+ without altering the normal equation numbering.\newline
+ \writecommand{begin}\writearg{equation}
+
+ ~\quad b+c = d\newline
+ \writecommand{end}\writearg{equation}\newline
+
+ \end{minipage}
+ \hfill
+ \begin{minipage}[t]{0.3\linewidth}
+ \writecommand{showchanges}
+ \showchanges
+
+ This equation is kept
+ \begin{equation}
+ a+b = c
+ \end{equation}
+ while this is removed and labelled
+ \begin{remequation}
+ a+b = d
+ \label{eq:remeq_example}
+ \end{remequation}\addtocounter{removedeqcounter}{-1}
+ without altering the normal equation numbering.
+ \begin{equation}
+ b+c = d
+ \end{equation}\addtocounter{equation}{-2}
+
+ \end{minipage}
+ \hfill
+ \begin{minipage}[t]{0.3\linewidth}
+ \writecommand{showclean}
+ \showclean
+
+ This equation is kept
+ \begin{equation}
+ a+b = c
+ \end{equation}
+ while this is removed and labelled
+ \begin{remequation}
+ a+b = d
+ \end{remequation}
+ without altering the normal equation numbering.
+ \begin{equation}
+ b+c = d
+ \end{equation}\addtocounter{equation}{-2}
+
+\end{minipage}
+\end{center}
+\showchanges
+
+The \writeenv{remequation} environment is compatible with the standard \writecommand{ref} or \writecommand{eqref} commands. For example, I can now reference equation \ref{eq:remeq_example} from the example.
+
+Similarly, \textit{xreview} provides \writeenv{addequation} and \writeenv{addequation*} to mark an equation as added. \textbf{Added equations follow the same numbering as regular equations, and they are indistinguishable in the clean version}. Here is an example:
+
+\begin{center}
+ \begin{minipage}[t]{0.3\linewidth}
+ \textbf{\LaTeX Code}
+
+ This equation is kept \newline
+ \writecommand{begin}\writearg{equation}
+
+ ~\quad a+b = c\newline
+ \writecommand{end}\writearg{equation}\newline
+ and this is colored.\newline
+ \writecommand{begin}\writearg{addequation}
+
+ ~\quad a+b = d\newline
+ \writecommand{end}\writearg{addequation}\newline
+
+ \end{minipage}
+ \hfill
+ \begin{minipage}[t]{0.3\linewidth}
+ \writecommand{showchanges}
+ \showchanges
+
+ This equation is kept
+ \begin{equation}
+ a+b = c
+ \end{equation}
+ and this is colored.
+ \begin{addequation}
+ a+b = d
+ \end{addequation}\addtocounter{equation}{-2}
+
+ \end{minipage}
+ \hfill
+ \begin{minipage}[t]{0.3\linewidth}
+ \writecommand{showclean}
+ \showclean
+
+ This equation is kept
+ \begin{equation}
+ a+b = c
+ \end{equation}
+ while this is colored.
+ \begin{addequation}
+ a+b = d
+ \end{addequation}\addtocounter{equation}{-2}
+
+\end{minipage}
+\end{center}
+\showchanges
+
+Should one wish to, \writeenv{remequation*} may be replicated with \writeenv{remequation} by using the \writecommand{nonumber} or \writecommand{notag} commands hiding the tag and not incrementing the removed equation counter. The same goes for \writeenv{addequation}.
+
+\subsubsection{\writecommand{removedeqline} and \texttt{align}-like environments}
+
+Sometimes, some \textit{tragical} times, one must edit one equation defined within a series of equations (i.e. in an \texttt{align} environment).
+While \writecommand{removed}, \writecommand{added}, and \writecommand{changed} work just fine to modify the text, the equation ordering may be compromised.
+
+Even within \textit{xreview} this is \textit{slightly} awkward and generally not recommended. However, we do provide functionality to do so in the most ergonomic way possible. This is achieved by providing the commands:
+\begin{itemize}
+ \item \writecommand{removedeqline} that turns an \writeenv{equation} line into a \writeenv{remequation};
+ \item \writecommand{addedeqline} that typesets the line as if it was \writecommand{added};
+ \item \writecommand{remaligntab} and \writecommand{remnewline} to help with alignment and typesetting of the clean version.
+\end{itemize}
+
+The simplest example reads:
+
+\begin{center}
+ \begin{minipage}[t]{0.34\linewidth}
+ \textbf{\LaTeX Code}
+
+
+ \writecommand{begin}\writearg{align}
+
+ \& a+b = c \textbackslash\textbackslash
+
+ \writecommand{remaligntab} \writecommand{removedeqline}\writearg{a+b=d} \writecommand{remnewline}
+
+ \& \writecommand{addedeqline}\writearg{b+c=d}\newline
+ \writecommand{end}\writearg{align}\newline
+
+ \end{minipage}
+ \hfill
+ \begin{minipage}[t]{0.3\linewidth}
+ \writecommand{showchanges}
+ \showchanges
+
+ \begin{align}
+ a+b =c \\
+ \removedeqline{a+c=d} \remnewline
+ \addedeqline{b+c = d}
+ \end{align}\addtocounter{equation}{-2}\addtocounter{removedeqcounter}{-1}
+
+ \end{minipage}
+ \hfill
+ \begin{minipage}[t]{0.3\linewidth}
+ \writecommand{showclean}
+ \showclean
+
+ \begin{align}
+ a+b =c \\
+ \removedeqline{a+c=d} \remnewline
+ \addedeqline{b+c = d}
+ \end{align}\addtocounter{equation}{-2}
+
+\end{minipage}
+\end{center}
+\showchanges
+
+The only caveat is that \textbf{\& be replaced with \writecommand{remaligntab} and \textbackslash\textbackslash be replaced with \writecommand{remnewline} on \writecommand{removedeqline} lines}.
+However, problems arise if the alignment tab \& is desired \textit{inside} \writecommand{removedeqline} or \writecommand{addedeqline}. In this case, we run into trouble because commands cannot easily cross an alignment point. Thus, we must write \textbf{two} commands:
+\begin{itemize}
+ \item \writecommand{remnewline}\writearg{\textit{before tab}} \writecommand{remaligntab} \writecommand{removed}\writearg{\textit{after tab}};
+ \item \writecommand{addedeqline}\writearg{\textit{before tab}} \& \writecommand{added}\writearg{\textit{after tab}}
+\end{itemize}
+
+
+\begin{center}
+ \begin{minipage}[t]{0.34\linewidth}
+ \textbf{\LaTeX Code}
+
+ This equation is kept \newline
+ \writecommand{begin}\writearg{align}
+
+ a+b \&= c \textbackslash\textbackslash
+
+ \writecommand{removedeqline}\writearg{a+b} \writecommand{remaligntab} \writecommand{removed}\writearg{=d} \writecommand{remnewline}
+
+ \writecommand{addedeqline}\writearg{a+b} \& \writecommand{added}\writearg{=2d}\newline
+ \writecommand{end}\writearg{align}\newline
+
+ \end{minipage}
+ \hfill
+ \begin{minipage}[t]{0.3\linewidth}
+ \writecommand{showchanges}
+ \showchanges
+
+ \begin{align}
+ a+b &=c \\
+ \removedeqline{c} \remaligntab \removed{=d} \remnewline
+ \addedeqline{c} & \added{= 2d}
+ \end{align}\addtocounter{equation}{-2}\addtocounter{removedeqcounter}{-1}
+
+ \end{minipage}
+ \hfill
+ \begin{minipage}[t]{0.3\linewidth}
+ \writecommand{showclean}
+ \showclean
+
+ \begin{align}
+ a+b &=c \\
+ \removedeqline{c} \remaligntab \removed{=d} \remnewline
+ \addedeqline{c} & \added{= 2d}
+ \end{align}\addtocounter{equation}{-2}
+
+\end{minipage}
+\end{center}
+\showchanges
+
+If it is desired to hide the \writecommand{removedeqline} tag, the commands \writecommand{nonumber} or \writecommand{notag} can be used \textbf{inside the \writecommand{removedeqline} command}.
+
+\subsection{Comments}
+
+Comments are a great way to communicate with various authors, to carry out a discussion directly on a shared document or to share ideas and questions together with the compiled manuscript.
+
+\textit{xreview} allows for the possibility to insert comments that out of the box work in one- or two-column documents.
+
+\subsubsection{The \writecommand{comment} command}
+
+Simple comments can be attached to a snippet of text and \textbf{are hidden on the clean version}.
+
+\textbf{\LaTeX Code}
+
+\begin{quote}
+\writecommand{textit}\writearg{xreview} is \writecommand{comment}\writearg{the greatest \writecommand{TeX} package ever written!}\writearg{Have you heard of \writecommand{textit}\writearg{amsmath}?}
+\end{quote}
+
+\writecommand{showchanges}
+\showchanges
+
+\begin{quote}
+\textit{xreview} is \comment{the greatest \TeX~package ever written!}{Have you heard of \textit{amsmath}?}
+\end{quote}
+
+\writecommand{showclean}
+\showclean
+
+\begin{quote}
+\textit{xreview} is \comment{the greatest \TeX~package ever written!}{Have you heard of \textit{amsmath}?}
+\end{quote} \addtocounter{commentcounter}{-1}
+
+\showchanges
+
+\textbf{Every comment is numbered} for ease of reference, with a customizable prefix (a capital `C' by default, see Section~\ref{sec:custom}).
+
+Sometimes, it is desirable to share only the changes and hide the comments. For this scenario, \textit{xreview} provides a separate toggle:
+\begin{itemize}
+ \item \writecommand{showcomments} to show comments on the annotated document;
+ \item \writecommand{hidecomments} to hide comments \textbf{even if \writecommand{showchanges} is set}.
+\end{itemize}
+
+\writecommand{comment} takes as optional argument everything accepted by \writecommand{todo} in the \href{https://ctan.org/pkg/todonotes?lang=en}{todonotes package}. This can be used, for example, to override the default color.
+
+\textbf{\LaTeX Code}
+
+\begin{quote}
+ This is a \writecommand{comment}[backgroundcolor=red]\writearg{red comment!}\writearg{It looks angry.}
+\end{quote}
+
+\writecommand{showchanges}
+\showchanges
+
+\begin{quote}
+This is a \comment[backgroundcolor=red]{red comment!}{It looks angry.}
+\end{quote}
+
+
+\subsubsection{\writecommand{resolvedcomment}: a useful pattern}
+
+Sometimes comments tend to stick around for \textit{a while}. However, this has the downside of hiding which have been resolved and which are still outstanding.
+To avoid this anti-pattern, \textit{xreview} offers the command \writecommand{resolvedcomment} to mark a comment as resolved!
+Changing \writecommand{comment} to \writecommand{resolvedcomment} will make outstanding matters stand out atop a sea of calming satisfying green.
+
+\textbf{\LaTeX Code}
+
+\begin{quote}
+ This is \writecommand{resolvedcomment}\writearg{easy}\writearg{Understood!} while this is \writecommand{comment}\writearg{hard}\writearg{Still unclear...}.
+\end{quote}
+
+\writecommand{showchanges}
+\showchanges
+
+\begin{quote}
+This is \resolvedcomment{easy}{Understood!} while this is \comment{hard}{Still unclear...}.
+\end{quote}
+
+\subsubsection{\writecommand{authoredcomments}: another useful pattern}
+
+It is most times helpful to know who wrote a comment. This is made easy by the \writecommand{authoredcomments} command. This is used as such
+
+\begin{quote}
+ \writecommand{authoredcomments}[Optional: mods to \writecommand{comment}][Optional: mods to \writecommand{resolvedcomment}]{Authorname}
+\end{quote}
+\noindent
+and creates two commands \writecommand{Authornamecomment} and \writecommand{resolvedAuthornamecomment} which will mark the author and can easily be distinguished.
+Here is an example:
+
+\textbf{\LaTeX Code}
+
+\begin{quote}
+ \writecommand{authoredcomments}[color=cyan]\writearg{Lorenzo}\newline
+ \writecommand{authoredcomments}[color=orange]\writearg{Alice}\newline
+
+ This is \writecommand{Alicecomment}\writearg{great}\writearg{Written by Alice.} while this \writecommand{Lorenzocomment}\writearg{less so}\writearg{Written by Lorenzo}.
+
+ This is an \writecommand{resolvedLorenzocomment}\writearg{old modification}\writearg{Found appropriate citation.} we discussed.
+\end{quote}
+
+\writecommand{showchanges}
+\showchanges
+
+\begin{quote}
+ \authoredcomments[color=cyan]{Lorenzo}
+ \authoredcomments[color=orange]{Alice}
+This is \Alicecomment{great}{Written by Alice.} while this \Lorenzocomment{less so}{Written by Lorenzo}.
+
+This is an \resolvedLorenzocomment{old modification}{Found appropriate citation.} we discussed.
+\end{quote}
+
+\section{Caveats, tips, and tricks}
+
+\textit{xreview} tries to smooth away all the rough edges of trying to dynamically(-ish) change \LaTeX. However, here are some common pitfalls and caveats that are worth pointing out.
+
+\subsection{Dealing with \writecommand{sout}}
+
+Certain commands in \LaTeX are more feisty than others. Among those, \writecommand{sout} must take the crown for the most useful command that does not like to cooperate with others. In particular, it does not like commands like \writecommand{cite}.
+\textit{xreview} tries to deal with this for you, so we can simply write \changed{\LaTeX \cite{latex2e} replaces \TeX \cite{texbook}}{\LaTeX \cite{latex2e} is a set of macros built atop \TeX \cite{texbook}}.
+
+However, if you recently added a \writecommand{removed} or \writecommand{changed} section and all of a sudden the document does not compile, try wrapping any \textit{suspicious} command in an \writecommand{mbox} (i.e. \writecommand{command}\writearg{\dots} $\rightarrow$ \writecommand{mbox}\{\writecommand{command}\writearg{\dots}\}) and see if this fixes it!
+
+\subsection{Being aware of whitespace}
+
+\textit{xreview} tries its best to ensure both the annotated and clean documents look fantastic. However, is is easy to introduce too much (or too little) whitespace to make either one look sloppy. The biggest culprit is usually having wrapped whitespace at either end of \writecommand{removed} (i.e. \writecommand{removed}\writearg{ \textit{words} }) or having whitespace at the end of \writecommand{removed} or a line.
+
+\textbf{\LaTeX Code}
+
+\begin{quote}
+ This will merge\writecommand{removed}\writearg{ separate }words.
+ \writecommand{removed} \writearg{This is removed.}\textvisiblespace This sentence is far from the previous.
+\end{quote}
+
+\writecommand{showchanges}
+\showchanges
+
+\begin{quote}
+ This will merge\removed{ separate }words.
+ \removed{This is removed.} This sentence is far from the previous.
+\end{quote}
+
+\writecommand{showclean}
+\showclean
+
+\begin{quote}
+ This will merge\removed{ separate }words.
+ \removed{This is removed.} This sentence is far from the previous.
+\end{quote}
+
+\showchanges
+
+This problem is exacerbated when dealing with equations or when a paragraph break is desired in one version but not the other. In that case the command \writecommand{hidefromclean} may be of great help.
+
+\subsection{Comments are not wide enough}
+
+Comment width is optimized to look nice in two-colum documents. If you are writing a single-column manuscript (or would just prefer them to go a little closer to the page margin), you can use
+\begin{quote}
+ \writecommand{setlength}\writearg{\writecommand{marginparwidth}}\writearg{\textit{desired width}}
+\end{quote}
+in the preamble \underline{\textbf{after}} \writecommand{usepackage}\writearg{xcite}.
+
+The default with is \texttt{2 cm}.
+
+\section{Customization}
+\label{sec:custom}
+
+Most aesthetical aspects of \textit{xreview} are customizable. To do so, simply insert this line in the document preamble
+\begin{quote}
+ \writecommand{renewcommand}\{\writecommand{thecommand}\}\writearg{new options}
+\end{quote}
+
+The commands available to be redefined are:
+\begin{itemize}
+ \item \writecommand{addedcolor} [default: \textcolor{blue}{blue}]: the color of \writecommand{added} sections;
+ \item \writecommand{removedcolor} [default: \textcolor{red}{red}]: the color of \writecommand{removed} sections;
+ \item \writecommand{commentcolor} [default: \textcolor{yellow}{yellow}]: the background color of \writecommand{comment};
+ \item \writecommand{resolvedcommentcolor} [default: \textcolor{green}{green}]: the background color of \writecommand{resolvedcomment};
+ \item \writecommand{removedeqprefix} [default: R]: the prefix for the tag of removed equations;
+ \item \writecommand{commentprefix} [default: C]: the prefix comment captions.
+\end{itemize}
+
+
+\bibliographystyle{unsrt}
+\bibliography{bibliography.bib}
+
+\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/zref-clever/CHANGELOG.md b/macros/latex/contrib/zref-clever/CHANGELOG.md
index 80b15591be..9b2d8e2c2c 100644
--- a/macros/latex/contrib/zref-clever/CHANGELOG.md
+++ b/macros/latex/contrib/zref-clever/CHANGELOG.md
@@ -1,6 +1,11 @@
# Changelog
-## [Unreleased](https://github.com/gusbrs/zref-clever/compare/v0.4.6...HEAD)
+## [Unreleased](https://github.com/gusbrs/zref-clever/compare/v0.4.7...HEAD)
+
+## [v0.4.7](https://github.com/gusbrs/zref-clever/compare/v0.4.6...v0.4.7) (2024-09-30)
+
+### Changed
+- Inhibit missing name warning if `noname` option is in use.
## [v0.4.6](https://github.com/gusbrs/zref-clever/compare/v0.4.5...v0.4.6) (2024-08-23)
diff --git a/macros/latex/contrib/zref-clever/zref-clever-code.pdf b/macros/latex/contrib/zref-clever/zref-clever-code.pdf
index 4dc41ff5a8..a3885ad3d6 100644
--- a/macros/latex/contrib/zref-clever/zref-clever-code.pdf
+++ b/macros/latex/contrib/zref-clever/zref-clever-code.pdf
Binary files differ
diff --git a/macros/latex/contrib/zref-clever/zref-clever-doc.pdf b/macros/latex/contrib/zref-clever/zref-clever-doc.pdf
index e6c24bc473..78cc9f7d60 100644
--- a/macros/latex/contrib/zref-clever/zref-clever-doc.pdf
+++ b/macros/latex/contrib/zref-clever/zref-clever-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/zref-clever/zref-clever-doc.tex b/macros/latex/contrib/zref-clever/zref-clever-doc.tex
index 7b8e27a15b..b91cceb551 100644
--- a/macros/latex/contrib/zref-clever/zref-clever-doc.tex
+++ b/macros/latex/contrib/zref-clever/zref-clever-doc.tex
@@ -2332,6 +2332,13 @@ handling. These are just the ones for which some special treatment was
required. Of course, this effort is bound to be incomplete (see
\zcref{sec:limitations}).
+Note that settings performed by the compatibility modules require special care
+if they are to be changed by users. Since the modules depend on what has been
+loaded or not in the document, the settings are done at
+\texttt{begindocument}. Hence, to override a setting performed by a
+compatibility module, the user must ensure their change comes after that,
+e.g.\ by adding their setting to the \texttt{begindocument} hook.
+
The purpose of outlining to some extend what the compatibility modules do is
twofold. First, some of them require usage adjustments for label setting,
which must be somehow conveyed in this documentation. Second, the kind and
diff --git a/macros/latex/contrib/zref-clever/zref-clever.dtx b/macros/latex/contrib/zref-clever/zref-clever.dtx
index 155d7141ee..2a35b27d48 100644
--- a/macros/latex/contrib/zref-clever/zref-clever.dtx
+++ b/macros/latex/contrib/zref-clever/zref-clever.dtx
@@ -171,7 +171,7 @@
%
% Identify the package.
% \begin{macrocode}
-\ProvidesExplPackage {zref-clever} {2024-08-23} {0.4.6}
+\ProvidesExplPackage {zref-clever} {2024-09-30} {0.4.7}
{Clever LaTeX cross-references based on zref}
% \end{macrocode}
%
@@ -7253,251 +7253,269 @@
%
% \begin{macro}{\@@_type_name_setup:}
% Auxiliary function to \cs{@@_typeset_refs_last_of_type:}. It is
-% responsible for setting the type name variable \cs{l_@@_type_name_tl} and
-% \cs{l_@@_name_in_link_bool}. If a type name can't be found,
-% \cs{l_@@_type_name_tl} is cleared. The function takes no arguments, but
-% is expected to be called in \cs{@@_typeset_refs_last_of_type:} right
-% before \cs{@@_get_ref_first:}, which is the main consumer of the variables
-% it sets, though not the only one (and hence this cannot be moved into
-% \cs{@@_get_ref_first:} itself). It also expects a number of relevant
-% variables to have been appropriately set, and which it uses, prominently
-% \cs{l_@@_type_first_label_type_tl}, but also the queue itself in
-% \cs{l_@@_typeset_queue_curr_tl}, which should be ``ready except for the
-% first label'', and the type counter \cs{l_@@_type_count_int}.
+% responsible for setting the type name variable \cs{l_@@_type_name_tl},
+% \cs{l_@@_name_in_link_bool}, and \cs{l_@@_type_name_missing_bool}. If a
+% type name can't be found, \cs{l_@@_type_name_tl} is cleared. The function
+% takes no arguments, but is expected to be called in
+% \cs{@@_typeset_refs_last_of_type:} right before \cs{@@_get_ref_first:},
+% which is the main consumer of the variables it sets, though not the only
+% one (and hence this cannot be moved into \cs{@@_get_ref_first:} itself).
+% It also expects a number of relevant variables to have been appropriately
+% set, and which it uses, prominently \cs{l_@@_type_first_label_type_tl},
+% but also the queue itself in \cs{l_@@_typeset_queue_curr_tl}, which should
+% be ``ready except for the first label'', and the type counter
+% \cs{l_@@_type_count_int}.
% \begin{macrocode}
\cs_new_protected:Npn \@@_type_name_setup:
{
- \zref@ifrefundefined { \l_@@_type_first_label_tl }
+ \bool_if:nTF
+ { \l_@@_typeset_ref_bool && ! \l_@@_typeset_name_bool }
{
+ % `typeset=ref' / `noname' option
+ % Probably redundant, since in this case the type name is not being
+ % typeset. But, for completeness sake:
\tl_clear:N \l_@@_type_name_tl
+ \bool_set_false:N \l_@@_name_in_link_bool
\bool_set_true:N \l_@@_type_name_missing_bool
}
{
- \tl_if_eq:NnTF
- \l_@@_type_first_label_type_tl { zc@missingtype }
+ \zref@ifrefundefined { \l_@@_type_first_label_tl }
{
\tl_clear:N \l_@@_type_name_tl
\bool_set_true:N \l_@@_type_name_missing_bool
}
{
- % Determine whether we should use capitalization, abbreviation,
- % and plural.
- \bool_lazy_or:nnTF
- { \l_@@_cap_bool }
- {
- \l_@@_capfirst_bool &&
- \int_compare_p:nNn { \l_@@_type_count_int } = { 0 }
- }
- { \tl_set:Nn \l_@@_name_format_tl {Name} }
- { \tl_set:Nn \l_@@_name_format_tl {name} }
- % If the queue is empty, we have a singular, otherwise, plural.
- \tl_if_empty:NTF \l_@@_typeset_queue_curr_tl
- { \tl_put_right:Nn \l_@@_name_format_tl { -sg } }
- { \tl_put_right:Nn \l_@@_name_format_tl { -pl } }
- \bool_lazy_and:nnTF
- { \l_@@_abbrev_bool }
+ \tl_if_eq:NnTF
+ \l_@@_type_first_label_type_tl { zc@missingtype }
{
- ! \int_compare_p:nNn
- { \l_@@_type_count_int } = { 0 } ||
- ! \l_@@_noabbrev_first_bool
+ \tl_clear:N \l_@@_type_name_tl
+ \bool_set_true:N \l_@@_type_name_missing_bool
}
{
- \tl_set:NV \l_@@_name_format_fallback_tl
- \l_@@_name_format_tl
- \tl_put_right:Nn \l_@@_name_format_tl { -ab }
- }
- { \tl_clear:N \l_@@_name_format_fallback_tl }
-
- % Handle number and gender nudges.
- \bool_if:NT \l_@@_nudge_enabled_bool
- {
- \bool_if:NTF \l_@@_nudge_singular_bool
+ % Determine whether we should use capitalization,
+ % abbreviation, and plural.
+ \bool_lazy_or:nnTF
+ { \l_@@_cap_bool }
{
- \tl_if_empty:NF \l_@@_typeset_queue_curr_tl
- {
- \msg_warning:nne { zref-clever }
- { nudge-plural-when-sg }
- { \l_@@_type_first_label_type_tl }
- }
+ \l_@@_capfirst_bool &&
+ \int_compare_p:nNn { \l_@@_type_count_int } = { 0 }
}
+ { \tl_set:Nn \l_@@_name_format_tl {Name} }
+ { \tl_set:Nn \l_@@_name_format_tl {name} }
+ % If the queue is empty, we have a singular, otherwise,
+ % plural.
+ \tl_if_empty:NTF \l_@@_typeset_queue_curr_tl
+ { \tl_put_right:Nn \l_@@_name_format_tl { -sg } }
+ { \tl_put_right:Nn \l_@@_name_format_tl { -pl } }
+ \bool_lazy_and:nnTF
+ { \l_@@_abbrev_bool }
{
- \bool_lazy_all:nT
- {
- { \l_@@_nudge_comptosing_bool }
- { \tl_if_empty_p:N \l_@@_typeset_queue_curr_tl }
- {
- \int_compare_p:nNn
- { \l_@@_label_count_int } > { 0 }
- }
- }
- {
- \msg_warning:nne { zref-clever }
- { nudge-comptosing }
- { \l_@@_type_first_label_type_tl }
- }
+ ! \int_compare_p:nNn
+ { \l_@@_type_count_int } = { 0 } ||
+ ! \l_@@_noabbrev_first_bool
}
- \bool_lazy_and:nnT
- { \l_@@_nudge_gender_bool }
- { ! \tl_if_empty_p:N \l_@@_ref_gender_tl }
{
- \@@_get_rf_opt_seq:neeN { gender }
- { \l_@@_type_first_label_type_tl }
- { \l_@@_ref_language_tl }
- \l_@@_type_name_gender_seq
- \seq_if_in:NVF
- \l_@@_type_name_gender_seq
- \l_@@_ref_gender_tl
+ \tl_set:NV \l_@@_name_format_fallback_tl
+ \l_@@_name_format_tl
+ \tl_put_right:Nn \l_@@_name_format_tl { -ab }
+ }
+ { \tl_clear:N \l_@@_name_format_fallback_tl }
+
+ % Handle number and gender nudges.
+ % Note that these nudges get disabled for `typeset=ref' /
+ % `noname' option, but in this case they are not really
+ % meaningful anyway.
+ \bool_if:NT \l_@@_nudge_enabled_bool
+ {
+ \bool_if:NTF \l_@@_nudge_singular_bool
{
- \seq_if_empty:NTF \l_@@_type_name_gender_seq
+ \tl_if_empty:NF \l_@@_typeset_queue_curr_tl
{
- \msg_warning:nneee { zref-clever }
- { nudge-gender-not-declared-for-type }
- { \l_@@_ref_gender_tl }
+ \msg_warning:nne { zref-clever }
+ { nudge-plural-when-sg }
{ \l_@@_type_first_label_type_tl }
- { \l_@@_ref_language_tl }
}
+ }
+ {
+ \bool_lazy_all:nT
{
- \msg_warning:nneeee { zref-clever }
- { nudge-gender-mismatch }
+ { \l_@@_nudge_comptosing_bool }
+ { \tl_if_empty_p:N \l_@@_typeset_queue_curr_tl }
+ {
+ \int_compare_p:nNn
+ { \l_@@_label_count_int } > { 0 }
+ }
+ }
+ {
+ \msg_warning:nne { zref-clever }
+ { nudge-comptosing }
{ \l_@@_type_first_label_type_tl }
- { \l_@@_ref_gender_tl }
+ }
+ }
+ \bool_lazy_and:nnT
+ { \l_@@_nudge_gender_bool }
+ { ! \tl_if_empty_p:N \l_@@_ref_gender_tl }
+ {
+ \@@_get_rf_opt_seq:neeN { gender }
+ { \l_@@_type_first_label_type_tl }
+ { \l_@@_ref_language_tl }
+ \l_@@_type_name_gender_seq
+ \seq_if_in:NVF
+ \l_@@_type_name_gender_seq
+ \l_@@_ref_gender_tl
+ {
+ \seq_if_empty:NTF \l_@@_type_name_gender_seq
{
- \seq_use:Nn
- \l_@@_type_name_gender_seq { ,~ }
+ \msg_warning:nneee { zref-clever }
+ { nudge-gender-not-declared-for-type }
+ { \l_@@_ref_gender_tl }
+ { \l_@@_type_first_label_type_tl }
+ { \l_@@_ref_language_tl }
+ }
+ {
+ \msg_warning:nneeee { zref-clever }
+ { nudge-gender-mismatch }
+ { \l_@@_type_first_label_type_tl }
+ { \l_@@_ref_gender_tl }
+ {
+ \seq_use:Nn
+ \l_@@_type_name_gender_seq { ,~ }
+ }
+ { \l_@@_ref_language_tl }
}
- { \l_@@_ref_language_tl }
}
}
}
- }
- \tl_if_empty:NTF \l_@@_name_format_fallback_tl
- {
- \@@_opt_tl_get:cNF
+ \tl_if_empty:NTF \l_@@_name_format_fallback_tl
{
- \@@_opt_varname_type:een
- { \l_@@_type_first_label_type_tl }
- { \l_@@_name_format_tl }
- { tl }
- }
- \l_@@_type_name_tl
- {
- \tl_if_empty:NF \l_@@_ref_decl_case_tl
- {
- \tl_put_left:Nn \l_@@_name_format_tl { - }
- \tl_put_left:NV \l_@@_name_format_tl
- \l_@@_ref_decl_case_tl
- }
\@@_opt_tl_get:cNF
{
- \@@_opt_varname_lang_type:eeen
- { \l_@@_ref_language_tl }
+ \@@_opt_varname_type:een
{ \l_@@_type_first_label_type_tl }
{ \l_@@_name_format_tl }
{ tl }
}
\l_@@_type_name_tl
{
- \tl_clear:N \l_@@_type_name_tl
- \bool_set_true:N \l_@@_type_name_missing_bool
- \msg_warning:nnee { zref-clever } { missing-name }
- { \l_@@_name_format_tl }
- { \l_@@_type_first_label_type_tl }
+ \tl_if_empty:NF \l_@@_ref_decl_case_tl
+ {
+ \tl_put_left:Nn \l_@@_name_format_tl { - }
+ \tl_put_left:NV \l_@@_name_format_tl
+ \l_@@_ref_decl_case_tl
+ }
+ \@@_opt_tl_get:cNF
+ {
+ \@@_opt_varname_lang_type:eeen
+ { \l_@@_ref_language_tl }
+ { \l_@@_type_first_label_type_tl }
+ { \l_@@_name_format_tl }
+ { tl }
+ }
+ \l_@@_type_name_tl
+ {
+ \tl_clear:N \l_@@_type_name_tl
+ \bool_set_true:N \l_@@_type_name_missing_bool
+ \msg_warning:nnee { zref-clever } { missing-name }
+ { \l_@@_name_format_tl }
+ { \l_@@_type_first_label_type_tl }
+ }
}
}
- }
- {
- \@@_opt_tl_get:cNF
- {
- \@@_opt_varname_type:een
- { \l_@@_type_first_label_type_tl }
- { \l_@@_name_format_tl }
- { tl }
- }
- \l_@@_type_name_tl
{
\@@_opt_tl_get:cNF
{
\@@_opt_varname_type:een
{ \l_@@_type_first_label_type_tl }
- { \l_@@_name_format_fallback_tl }
+ { \l_@@_name_format_tl }
{ tl }
}
\l_@@_type_name_tl
{
- \tl_if_empty:NF \l_@@_ref_decl_case_tl
- {
- \tl_put_left:Nn
- \l_@@_name_format_tl { - }
- \tl_put_left:NV \l_@@_name_format_tl
- \l_@@_ref_decl_case_tl
- \tl_put_left:Nn
- \l_@@_name_format_fallback_tl { - }
- \tl_put_left:NV
- \l_@@_name_format_fallback_tl
- \l_@@_ref_decl_case_tl
- }
\@@_opt_tl_get:cNF
{
- \@@_opt_varname_lang_type:eeen
- { \l_@@_ref_language_tl }
+ \@@_opt_varname_type:een
{ \l_@@_type_first_label_type_tl }
- { \l_@@_name_format_tl }
+ { \l_@@_name_format_fallback_tl }
{ tl }
}
\l_@@_type_name_tl
{
+ \tl_if_empty:NF \l_@@_ref_decl_case_tl
+ {
+ \tl_put_left:Nn
+ \l_@@_name_format_tl { - }
+ \tl_put_left:NV \l_@@_name_format_tl
+ \l_@@_ref_decl_case_tl
+ \tl_put_left:Nn
+ \l_@@_name_format_fallback_tl { - }
+ \tl_put_left:NV
+ \l_@@_name_format_fallback_tl
+ \l_@@_ref_decl_case_tl
+ }
\@@_opt_tl_get:cNF
{
\@@_opt_varname_lang_type:eeen
{ \l_@@_ref_language_tl }
{ \l_@@_type_first_label_type_tl }
- { \l_@@_name_format_fallback_tl }
+ { \l_@@_name_format_tl }
{ tl }
}
\l_@@_type_name_tl
{
- \tl_clear:N \l_@@_type_name_tl
- \bool_set_true:N
- \l_@@_type_name_missing_bool
- \msg_warning:nnee { zref-clever }
- { missing-name }
- { \l_@@_name_format_tl }
- { \l_@@_type_first_label_type_tl }
+ \@@_opt_tl_get:cNF
+ {
+ \@@_opt_varname_lang_type:eeen
+ { \l_@@_ref_language_tl }
+ { \l_@@_type_first_label_type_tl }
+ { \l_@@_name_format_fallback_tl }
+ { tl }
+ }
+ \l_@@_type_name_tl
+ {
+ \tl_clear:N \l_@@_type_name_tl
+ \bool_set_true:N
+ \l_@@_type_name_missing_bool
+ \msg_warning:nnee { zref-clever }
+ { missing-name }
+ { \l_@@_name_format_tl }
+ { \l_@@_type_first_label_type_tl }
+ }
}
}
}
}
}
}
- }
- % Signal whether the type name is to be included in the hyperlink or not.
- \bool_lazy_any:nTF
- {
- { ! \l_@@_hyperlink_bool }
- { \l_@@_link_star_bool }
- { \tl_if_empty_p:N \l_@@_type_name_tl }
- { \str_if_eq_p:Vn \l_@@_nameinlink_str { false } }
- }
- { \bool_set_false:N \l_@@_name_in_link_bool }
- {
+ % Signal whether the type name is to be included in the hyperlink or
+ % not.
\bool_lazy_any:nTF
{
- { \str_if_eq_p:Vn \l_@@_nameinlink_str { true } }
- {
- \str_if_eq_p:Vn \l_@@_nameinlink_str { tsingle } &&
- \tl_if_empty_p:N \l_@@_typeset_queue_curr_tl
- }
- {
- \str_if_eq_p:Vn \l_@@_nameinlink_str { single } &&
- \tl_if_empty_p:N \l_@@_typeset_queue_curr_tl &&
- \l_@@_typeset_last_bool &&
- \int_compare_p:nNn { \l_@@_type_count_int } = { 0 }
- }
+ { ! \l_@@_hyperlink_bool }
+ { \l_@@_link_star_bool }
+ { \tl_if_empty_p:N \l_@@_type_name_tl }
+ { \str_if_eq_p:Vn \l_@@_nameinlink_str { false } }
}
- { \bool_set_true:N \l_@@_name_in_link_bool }
{ \bool_set_false:N \l_@@_name_in_link_bool }
+ {
+ \bool_lazy_any:nTF
+ {
+ { \str_if_eq_p:Vn \l_@@_nameinlink_str { true } }
+ {
+ \str_if_eq_p:Vn \l_@@_nameinlink_str { tsingle } &&
+ \tl_if_empty_p:N \l_@@_typeset_queue_curr_tl
+ }
+ {
+ \str_if_eq_p:Vn \l_@@_nameinlink_str { single } &&
+ \tl_if_empty_p:N \l_@@_typeset_queue_curr_tl &&
+ \l_@@_typeset_last_bool &&
+ \int_compare_p:nNn { \l_@@_type_count_int } = { 0 }
+ }
+ }
+ { \bool_set_true:N \l_@@_name_in_link_bool }
+ { \bool_set_false:N \l_@@_name_in_link_bool }
+ }
}
}
% \end{macrocode}
diff --git a/macros/latex/contrib/zugferd/DEMO-rechnung-zugferd.tex b/macros/latex/contrib/zugferd/DEMO-rechnung-zugferd.tex
new file mode 100644
index 0000000000..1d38dcafb5
--- /dev/null
+++ b/macros/latex/contrib/zugferd/DEMO-rechnung-zugferd.tex
@@ -0,0 +1,95 @@
+% !TeX Program=lualatex
+%
+% Demo file for the LaTeX-ZUGFeRD project
+% This file corresponds to version 0.8 (2024-09-11)
+%
+% Copyright (C) 2024 Marei Peischl <marei@peitex.de>
+% ---------------------------------------------------------
+%
+% This file may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% 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.3c or later is part of all distributions of LaTeX
+% version 2008-05-04 or later.
+%
+\DocumentMetadata{
+ pdfstandard=a-3b,
+ lang=de,
+}
+\documentclass[parskip=half-,german]{scrartcl}
+
+\usepackage[
+ format=xrechnung3.0% 3.0 is the default anyway, but you can select the format to avoid automatic changes.
+]{zugferd-invoice}
+
+\setkomavar{invoice}{2024:1337}
+\setkomavar{date}{2024-01-04}
+\setkomavar{title}{Rechnung}
+
+\newkomafont{invoicetotal}{\bfseries}
+
+\SetZUGFeRDData{
+% document-type = commercial-invoice, % commented as this setting matches the initial value
+ id=komavar,
+% date=auto, % commented as this setting matches the initial value
+% delivery-date = auto, % commented as this setting matches the initial value
+ subject=komavar,
+ fromaddress=komavar,
+% tax/category=S,
+% tax/rate=19,
+ unit=hour,
+ seller/name = {peiTeX (Marei Peischl)},
+ seller/postcode = {20253},
+ seller/city ={Hamburg},
+ seller/country = DE,
+ seller/address = {Address 1},
+ seller/vatid = {DE123456789},
+ seller/contact= {Marei\\+4900000000\\marei@peitex.de},
+ seller/email = {kontakt@peitex.de},
+ buyer/reference = {buyer-reference}, %oder Leitweg-ID
+ buyer/name = {Käufer Name},
+ buyer/postcode = {20253},
+ buyer/city ={Hamburg},
+ buyer/country = DE,
+ buyer/address = {Address 1\\Address 2},
+ buyer/vatid = {DE123456789},
+ buyer/email = {invoice@example.org},
+ currency=€,
+ payment-terms={Zahlbar innerhalb von 14 Tagen},% entweder das oder das Datum (Zeile drunter) ist notwendig
+ due-date={20240118},
+ payment-means / type = 58, % SEPA Übereisung,
+ payment-means / iban = DE68430609671013251700,
+ payment-means / account-holder = Marei Peischl,
+ payment-means / bic =GENODEM1GLS
+}
+
+
+
+\begin{document}
+
+
+\begin{letter}{Firma\\Vorname Nachname\\Rechnungsadresse\\PLZ Ort}
+
+\opening{Guten Tag,}
+
+hiermit stelle ich Ihnen meine Arbeit im Rahmen des Projektes XX in Rechnung. Die Leistung wurde im Januar 2024 erbracht.
+
+\AddInvoiceItem{3}{Weiterentwicklung/funktionale Erweiterung}{90}
+\AddInvoiceItem[7]{3}{Support}{90}
+\AddInvoiceItem{2}{Support an Feiertagen/Wochenende}{180}
+
+\PrintInvoiceTabular
+
+Ich bitte Sie oben genannte Betrag binnen 30 Tagen auf unten genanntes Konto zu überweisen.
+
+%Falls gewünscht
+\closing{Happy \TeX{}ing}
+
+
+\end{letter}
+
+\end{document}
diff --git a/macros/latex/contrib/zugferd/DEPENDS.txt b/macros/latex/contrib/zugferd/DEPENDS.txt
new file mode 100644
index 0000000000..9156e86f4c
--- /dev/null
+++ b/macros/latex/contrib/zugferd/DEPENDS.txt
@@ -0,0 +1,7 @@
+# Proudly generated by the Island of TeX's DEPendency Printer https://gitlab.com/islandoftex/texmf/depp
+soft babel# only zugferd-invoice.sty
+soft booktabs# only zugferd-invoice.sty
+soft koma-script# only zugferd-invoice.sty
+soft ragged2e# only zugferd-invoice.sty
+siunitx
+soft xltabular# only zugferd-invoice.sty
diff --git a/macros/latex/contrib/zugferd/README.md b/macros/latex/contrib/zugferd/README.md
new file mode 100644
index 0000000000..e6d85f137c
--- /dev/null
+++ b/macros/latex/contrib/zugferd/README.md
@@ -0,0 +1,27 @@
+# ZUGFeRD - Create ZUGFeRD and other kinds of E-invoices using LaTeX
+
+Copyright (C) 2023–2024 by Marei Peischl (peiTeX) <marei@peitex.de>
+
+zugferd version 0.8 (2024-09-11)
+
+***************************************************************************
+
+ This material is subject to the LaTeX Project Public License version 1.3c
+ or later. See http://www.latex-project.org/lppl.txt for details.
+
+***************************************************************************
+
+## Abstract
+
+This package provides an interface to make your LaTeX-based invoicing compatible to e-invoicing standards, such as they exist in the EU.
+
+The package includes a demo implementation, which can be used by template developers to create their own company specific variant. The included example file shows how to use it. This package is built so it also creates the XML file which will be directly attached to the PDF.
+
+There also exist interfaces to attach an XML file generated differently. Please have a look at the documentation.
+
+This package does not provide. Please be aware of you have to use valid input data for a valid ZUGFeRD output. The documentation suggests some options.
+
+
+# Version History
+
+ * 0.8 (2024-09-11) First version on CTAN
diff --git a/macros/latex/contrib/zugferd/zugferd-invoice.sty b/macros/latex/contrib/zugferd/zugferd-invoice.sty
new file mode 100644
index 0000000000..e86dbdee1b
--- /dev/null
+++ b/macros/latex/contrib/zugferd/zugferd-invoice.sty
@@ -0,0 +1,193 @@
+%
+% Copyright (C) 2024 Marei Peischl <marei@peitex.de>
+% ---------------------------------------------------------
+%
+% This file may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% 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.3c or later is part of all distributions of LaTeX
+% version 2008-05-04 or later.
+%
+\ProvidesExplPackage{zugferd-invoice}{2024-09-11}{0.8}{Invoice wrapper example package for the factur-x to create ZUGFerD invoices}
+
+\keys_define:nn {zugferd/invoice}{
+ default-vat .tl_set:N = \defaultVAT,
+ default-vat .initial:n = 19,
+ format .code:n = \PassOptionsToPackage{format=#1}{zugferd},
+ format .initial:n = xrechnung3.0,
+}
+
+\ProcessKeyOptions[zugferd/invoice]
+
+\msg_new:nnnn {ptxcd/zugferd} {not-for-production} {
+ This~package~is~intented~to~be~an~example~for~a~possible~implementation~to~use~the~zugferd~package~for~invoicing.\\
+ As~this~integrates~a~lot~with~the~visual~structure~of~your~invoice~this~should~not~be~used~directly~but~may~be~an~example~for~your~own~package.
+}{See~zugferd~documentation~for~instructions~concerning~the~interfaces~used~in~this~file.}
+\msg_warning:nn {ptxcd/zugferd} {not-for-production}
+
+\RequirePackage{scrletter}
+\RequirePackage{ragged2e}
+\RequirePackage{zugferd}
+\RequirePackage{babel}
+
+% e.g. use comma as output decimal marker if german
+\addto\extrasgerman{\sisetup{locale=DE}}
+\addto\extrasngerman{\sisetup{locale=DE}}% for backwards compatibility
+
+\RequirePackage{xltabular}
+\RequirePackage{booktabs}
+
+\newcounter{invoiceitem}
+\seq_new:N \g__ptxcd_VAT_rates_seq
+
+\NewDocumentCommand{\InitVAT}{omO{S}}{
+ \seq_gput_right:Nn \g__ptxcd_VAT_rates_seq {#2}
+ \fp_new:c {g__ptxcd_invoice_sum_vat#2_fp}
+ \fp_new:c {g__ptxcd_invoice_base_vat#2_fp}
+ \cs_new:cn {__ptxcd_invoice_type_code#2:} {#3}
+}
+
+%%initialisierung auf 5,7,16 oder 19 % Mwst
+\InitVAT{16}
+\InitVAT{19}
+\InitVAT{5}
+\InitVAT{7}
+
+\newcommand*{\SetDefaultVAT}[1]{\def\defaultVAT{#1}}
+
+
+\seq_new:N \l__ptxcd_invoice_items_seq
+
+%\newcommand*{\AddInvoiceItem}[4][\defaultVAT]{%
+\NewDocumentCommand{\AddInvoiceItem}{D<>{}O{\defaultVAT}mmm}{
+ \seq_put_right:Nn \l__ptxcd_invoice_items_seq {
+ {#2}{#3}{#4}{#5}{#1}
+ }
+}
+
+\newcolumntype{P}{r<{\PrintTableCurrency}}
+
+\fp_new:N \g__ptxcd_invoice_sum_fp
+\fp_new:N \g__ptxcd_invoice_total_fp
+\fp_new:N \g__ptxcd_tax_total_fp
+\fp_new:N \g__ptxcd_invoice_item_fp
+\fp_new:N \g__ptxcd_invoice_item_vat_fp
+\fp_new:N \g__ptxcd_invoice_sum_vat_fp
+
+\newcommand*{\PrintInvoiceTabular}{
+\bool_gset_true:N \g_ptxcd_first_run_bool
+ \begin{ZUGFeRD}
+ \sisetup{round-precision=2,round-mode=places,round-pad=false,table-number-alignment=right,minimum-decimal-digits=2,mode=text}
+ \begin{xltabular}{\linewidth}{@{}rS[round-precision=1,table-format=2.1]>{\RaggedRight}XPP@{}}
+ \toprule[\lightrulewidth]
+ \noalign{\global\let\PrintTableCurrency\relax}%
+ \small\emph{Pos.}&\small\emph{Std.}&\small\emph{Beschreibung}&\small\emph{Einzelpreis}&\small\emph{Gesamtpreis}\\\midrule[\heavyrulewidth]
+ \noalign{\global\let\PrintTableCurrency\TableCurrency}%
+ \endhead
+ \bottomrule[\lightrulewidth]\multicolumn{5}{@{}p{\textwidth}@{}}{\strut\hspace*{\fill}\footnotesize Fortsetzung auf der nächsten Seite}\endfoot
+ \bottomrule\endlastfoot
+% Only write xml for the first run of the tabular.
+ \fp_compare:nNnF {\g__ptxcd_invoice_sum_fp} = {\c_zero_dim} {
+ \fp_gzero:N \g__ptxcd_invoice_sum_fp
+ \zugferd_disable_XML_interfaces:
+ }
+ \seq_map_inline:Nn \g__ptxcd_VAT_rates_seq {
+ \fp_gzero:c {g__ptxcd_invoice_sum_vat##1_fp}
+ \fp_gzero:c {g__ptxcd_invoice_base_vat##1_fp}
+ }
+ \fp_gzero:N \g__ptxcd_invoice_sum_fp
+ \seq_map_inline:Nn \l__ptxcd_invoice_items_seq {
+ \PrintInvoiceItem##1
+ }
+ \tabularnewline
+ \noalign{\skip_vertical:n {-\ht\strutbox-\dp\strutbox}}%offset for extra empty row of mapping
+ \midrule[\heavyrulewidth]
+ \PrintInvoiceTotal
+ \end{xltabular}
+ \end{ZUGFeRD}
+}
+
+\newcommand*{\PrintInvoiceTotal}{
+ \zugferd_startInvoiceSums:
+ \fp_gset:Nn \g__ptxcd_invoice_total_fp { \g__ptxcd_invoice_sum_fp}
+ \fp_gzero:N \g__ptxcd_tax_total_fp
+ \PrintInvoiceSum{netto}{\fp_use:N \g__ptxcd_invoice_sum_fp}
+ \seq_map_inline:Nn \g__ptxcd_VAT_rates_seq {
+ \fp_compare:nNnF {\fp_use:c {g__ptxcd_invoice_sum_vat##1_fp}} = {0} {
+ \zugferd_write_TaxEntry:nnnn {\use:c {__ptxcd_invoice_type_code##1:}} {##1} {\fp_use:c {g__ptxcd_invoice_base_vat##1_fp}} {\fp_use:c {g__ptxcd_invoice_sum_vat##1_fp}}
+ \fp_gadd:Nn \g__ptxcd_tax_total_fp {\fp_use:c {g__ptxcd_invoice_sum_vat##1_fp}}
+ \PrintVatSum[{\fp_use:c {g__ptxcd_invoice_base_vat##1_fp}}]{##1 }{\fp_use:c {g__ptxcd_invoice_sum_vat##1_fp}}
+ }
+ }
+ \PrintInvoiceSum{brutto}{\fp_eval:n {\g__ptxcd_tax_total_fp + \g__ptxcd_invoice_total_fp }}
+ % TODO add support for allowance, chargeTotal, and prepaid
+ \zugferd_write_Summation:nnnnnnnn
+ {\fp_use:N \g__ptxcd_invoice_sum_fp}% LineTotalAmount
+ {0} %ChargeTotalAmount
+ {0} %AllowanceTotalAmount
+ {\fp_use:N \g__ptxcd_invoice_sum_fp} %TaxBasisTotalAmount
+ {\fp_use:N \g__ptxcd_tax_total_fp} %TaxTotalAmount
+ {\fp_eval:n {\g__ptxcd_tax_total_fp + \g__ptxcd_invoice_total_fp }} %GrandTotalAmount
+ {0} % TotalPrepaidAmount
+ {\fp_eval:n {\g__ptxcd_tax_total_fp + \g__ptxcd_invoice_total_fp }} %DuePayableAmount = GrandTotalAmount - TotalPrepaidAmount
+ \zugferd_stopInvoiceSums:
+}
+
+%Ausgabe der einzelnen Rechnungspositionen
+\newcommand*{\PrintInvoiceItem}[5]{%
+ \stepcounter{invoiceitem}%
+ \theinvoiceitem%Positionsnummer
+ \fp_gset:Nn \g__ptxcd_invoice_item_vat_fp {#2 * (#1/100) * #4}
+ \fp_gset:Nn \g__ptxcd_invoice_item_fp {#2 * #4}
+% \fp_gadd:Nn \g__ptxcd_invoice_sum_vat_fp
+ \fp_gadd:cn {g__ptxcd_invoice_base_vat#1_fp} {\g__ptxcd_invoice_item_fp}
+ \fp_gadd:cn {g__ptxcd_invoice_sum_vat#1_fp} {\g__ptxcd_invoice_item_vat_fp}
+ \fp_gadd:Nn \g__ptxcd_invoice_sum_fp {\g__ptxcd_invoice_item_fp}
+
+ % position nummer name einzel-preis anzahl gesamtpreis
+ \keys_set:ne {zugferd}{tax/rate=#1, tax/category=\use:c {__ptxcd_invoice_type_code#1:},#5}
+ \zugferd_write_Item:nnnnnn {\theinvoiceitem} {} {#3} {#4} {#2} {\fp_use:N \g__ptxcd_invoice_item_fp}
+
+ &#2% Anzahl
+ &#3\space(\printVAT{#1}~MwSt.)% Beschreibung mit Angabe der MwSt, in Klammern
+ &\num{#4}%\num[round-mode=places,output-decimal-marker={,},round-pad = false]{#4}\tl_show:n {#4}%Einzelpreis
+ &\exp_args:Nx \num{\fp_use:N \g__ptxcd_invoice_item_fp}
+ \tabularnewline
+}
+
+
+
+\newcommand*{\PrintInvoiceSum}[2]{
+ \PrintSum{\csname invoicesum#1name\endcsname}{#2}
+}
+
+\newcommand*{\PrintVatSum}[3][]{
+ \PrintSum{\invoicesumvatname[#1]{#2}}{#3}
+}
+
+\newcommand*{\invoicesumvatname}[2][]{MwSt.~\printVAT{#2}\tl_if_empty:nF {#1} {\space(\num[round-precision=2]{#1}\TableCurrency)}}
+\renewcommand*{\theinvoiceitem}{\int_compare:nNnT {\value{invoiceitem}}<{10}{0}\arabic{invoiceitem}}
+
+\newcommand*{\PrintSum}[2]{
+ &&\multicolumn{1}{r}{#1\invoicesumseparator}&\multicolumn{1}{l}{}&\exp_args:Nx \num {#2}\tabularnewline
+}
+
+\ExplSyntaxOff
+
+\newcommand*{\invoicesumnettoname}{Summe (Netto)}
+\newcommand*{\invoicesumbruttoname}{Summe (Brutto)}
+\newcommand*{\invoicesumseparator}{:\space}
+
+\newcommand*{\TableCurrency}{\,€}
+\newcommand*{\printVAT}[1]{\num[round-mode=none]{#1}\,\%}
+
+\newcommand*{\PrintPositionenVAT}[5]{%
+ \stepcounter{invoiceitem}%
+ \theinvoiceitem&#1&#2\space(\printVAT{#3})&#4&#5\tabularnewline
+}
+
+\endinput
diff --git a/macros/latex/contrib/zugferd/zugferd.dtx b/macros/latex/contrib/zugferd/zugferd.dtx
new file mode 100644
index 0000000000..1bfdb78ac6
--- /dev/null
+++ b/macros/latex/contrib/zugferd/zugferd.dtx
@@ -0,0 +1,2285 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2021–2024 Marei Peischl <marei@peitex.de>
+% ---------------------------------------------------------
+%
+% This file may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% 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.3c or later is part of all distributions of LaTeX
+% version 2008-05-04 or later.
+%
+% \fi
+% \iffalse
+%<*driver>
+\ProvidesFile{zugferd.dtx}[2024-09-11 v0.8 ZUGFerd Invoice and Faktur-X]
+%</driver>
+%<package>\NeedsTeXFormat{LaTeX2e}[2023-11-01]
+%<package>\ProvidesExplPackage{zugferd}{2024-09-11}{0.8}{Create ZUGFerd invoices using LaTeX}
+%<*driver>
+\DocumentMetadata{pdfstandard=a-3b,lang=en}
+\documentclass[lm-default=false,cs-break-nohyphen]{l3doc}
+\usepackage{zugferd}[2024-09-11]
+\EnableCrossrefs
+%\CodelineIndex
+\RecordChanges
+\usepackage{biblatex}
+
+\usepackage{shellesc}
+\ifnum\ShellEscapeStatus=1\relax\else
+ \PassOptionsToPackage{draft}{minted}
+\fi
+\usepackage{minted}
+\newcounter{codelist}
+\newenvironment{examplecode}{%
+ \VerbatimEnvironment%
+ \fvset{gobble=0}%
+ \begin{VerbatimOut}[tabsize=3,gobble=1]{minted.doc.out}%
+}{%
+ \end{VerbatimOut}%
+ \inputminted[autogobble, escapeinside=||]{latex}{minted.doc.out}%
+}
+\usepackage{accsupp}
+\setminted{breaksymbol={\BeginAccSupp{method=escape,ActualText={}}\tiny\ensuremath{\hookrightarrow}\EndAccSupp{}},breaklines}
+
+\ExplSyntaxOn
+\makeatletter
+\tl_new:N \l__ptxtools_doc_values_tl
+\newcommand*{\codefamily}{\MacroFont}
+\DeclareTextFontCommand{\codefont}{\codefamily}
+\providecommand{\option}[1]{\codefont{#1}}
+
+\cs_new:Npn \__ptxctools_parse_key_option:w #1 #2 #3 #4 = #5 \q_stop {
+ \begingroup
+ \let\PrintDescribeOption\PrintDescribeKeyOption
+ \tl_set:Nn \l__ptxtools_doc_values_tl {\small\IfBooleanTF{#3}{\textsf{#5}}{\textsf{(\codefont{#5})}}}
+ \noindent\DescribeOption{#4}\hfill
+ \small
+ \tl_if_blank:nTF {#2} {\meta{\textrm{initially~unset}}} {
+ \IfBooleanTF{#1}
+ {#2}
+ {(default:~\codefont{#2})}
+ }\strut\par
+ \endgroup
+}
+
+\newcommand*{\PrintDescribeKeyOption}[1]{
+ {\MacroFont #1=}\rlap{\hskip\marginparsep\l__ptxtools_doc_values_tl}
+}
+
+\bool_new:N \l_ptxtools_last_was_describe_bool
+
+\NewDocumentCommand{\DescribeKeyOption}{smms}{
+ \bool_if:NTF \l_ptxtools_last_was_describe_bool {
+ \vskip -\lastskip
+ }{
+ \par
+ \dim_compare:nNnF {\parskip} > {\c_zero_dim} {\medskip}
+ }
+ \__ptxctools_parse_key_option:w #1 {#3} #4 #2 \q_stop
+
+ \bool_set_true:N \l_ptxtools_last_was_describe_bool
+ \AddToHookNext{para/begin}{
+ \bool_set_false:N \l_ptxtools_last_was_describe_bool
+ \OmitIndent
+ }
+ \smallskip
+}
+
+\newenvironment{valuelist}{
+ \list{}{
+ \labelwidth0pt
+ \itemindent0pt
+ \leftmargin0pt
+ \let\makelabel\valuelistlabel
+ }
+}{
+ \endlist
+}
+\newcommand*\valuelistlabel[1]{
+ \llap{
+ \normalfont\codefamily\color_select:n {black!60}
+ \begin{tabular}[t]{@{}r@{}}
+ \clist_use:nn {#1} {\\}
+ \end{tabular}
+ }
+}
+
+\newcommand*{\accessTaxExemptionReason}[1]{
+ \keys_set:nn {zugferd / tax } {category=#1}
+ Exemption~reason:~\tl_if_empty:NTF \l__zugferd_tax_exemption_reason_tl {\meta{empty}} {\l__zugferd_tax_exemption_reason_tl};~
+ Exemption~reason~code:~\tl_if_empty:NTF \l__zugferd_tax_exemption_code_tl {\meta{empty}} {\l__zugferd_tax_exemption_code_tl}
+}
+% to support small layout adjustments for the texdoc version
+\newcommand*{\IfOnlyDocumentation}[1]{
+ \bool_if_exist:NT \g__codedoc_typeset_implementation_bool {
+ \bool_if:NF \g__codedoc_typeset_implementation_bool {#1}
+ }
+}
+%add a subtitle
+\def\@maketitle{%
+ \newpage
+ \null
+ \vskip 2em%
+ \begin{center}%
+ \let \footnote \thanks
+ {\LARGE \@title \par}%
+ \vskip 1.5em%
+ {\large \@subtitle \par}%
+ \vskip 1em%
+ {\large
+ \lineskip .5em%
+ \begin{tabular}[t]{c}%
+ \@author
+ \end{tabular}\par}%
+ \vskip 1em%
+ {\large \@date}%
+ \end{center}%
+ \par
+ \vskip 1.5em}
+\newcommand{\subtitle}[1]{\def\@subtitle{#1}}
+\subtitle{}
+\makeatother
+\ExplSyntaxOff
+
+\usepackage{underscore-ltx}
+
+\begin{filecontents}{zugferd.bib}
+@online{x-rechnung,
+ url={https://xeinkauf.de/dokumente/},
+ urldate={2024-08-20}
+}
+@online{spec-xrechnung,
+ url={https://xeinkauf.de/app/uploads/2024/07/302-XRechnung-2024-06-20.pdf},
+ author={{Koodinierungsstelle für IT-Standards}},
+ title={Spezifikation Standard XRechnung},
+ subtitle={CIUS und Extension},
+ edition={Version XRechnung 3.0.2},
+ date={2024-06-20},
+ urldate={2024-08-20},
+ langid={german}
+}
+@online{mustang-project,
+ title={Mustangproject},
+ url={https://github.com/ZUGFeRD/mustangproject},
+ urldate={2024-08-20}
+}
+@online{country-codes,
+ title={ECE/TRADE/201},
+ subtitle={ISO COUNTRY CODE for Representation of Names of Countries},
+ url={https://unece.org/trade/documents/iso-country-code-representation-names-countries},
+ urldate={2024-08-20},
+}
+@online{unit-codes,
+ title={Rec 20 – Codes for Units of Measure Used in International Trade},
+ url={https://unece.org/sites/default/files/2023-10/rec20_Rev17e-2021.xlsx},
+ urldate={2024-08-20},
+ note={Link directly to xlsx. \cite[see][for all revisions]{cl-recommendations}.}
+}
+@online{cl-recommendations,
+ author={United Nations Economic Commission for Europe (UNECE)},
+ title={Code List Recommendations},
+ url={https://unece.org/trade/uncefact/cl-recommendations},
+ urldate={2024-08-20}
+}
+@online{VAT-exemption-codes,
+ title={VAT exemption reason code list},
+ url={https://www.xrepository.de/details/urn:xoev-de:kosit:codeliste:vatex_1},
+ urldate={2024-08-20}
+}
+@online{zugferd-download,
+ title={ZUGFeRD 2.2},
+ subtitle={Download page},
+ url={https://ferd-net.de/standards/zugferd-2.2/zugferd-2.2.html},
+ urldate={2024-09-02},
+}
+@manual{scrletter,
+ title = {The scrletter package},
+ subtitle = {Letter extension to KOMA-Script classes},
+ author = {Kohm, Markus},
+ url = {https://komascript.de/},
+ urldate = {2024-09-03},
+ documentation = {ctan://macros/latex/contrib/koma-script/doc/scrguide-en.pdf},
+ date = {2023-07-07},
+ version = {3.41},
+}
+@online{leitweg-id,
+ title={Xeinkauf FAQ},
+ subtitle={Leitweg ID},
+ author={{Koordinierungsstelle für IT Standards (KoSIT)}},
+ url={https://xeinkauf.de/faq/xrechnung#leitweg-id},
+ urldate={2024-09-04}
+}
+\end{filecontents}
+\addbibresource{zugferd.bib}
+\nocite{cl-recommendations}
+
+\usepackage{xspace}
+\newcommand*{\XML}{XML\xspace}
+\newcommand*{\XMLfile}{\XML file}
+
+\begin{document}
+\EnableDocumentation\DisableImplementation
+\DocInput{zugferd.dtx}
+%\DisableDocumentation\EnableImplementation
+%\DocInputAgain
+\PrintChanges
+\printbibliography
+\PrintIndex
+\end{document}
+%</driver>
+% \fi
+%
+% \changes{v0.8}{2024-09-11}{First CTAN version}
+%
+% \GetFileInfo{zugferd.dtx}
+%
+% \DoNotIndex{\newcommand,\newenvironment}
+% \begin{documentation}
+% \title{The \textsf{zugferd} package\thanks{This document
+% corresponds to \textsf{zugferd}~\fileversion, dated \filedate.}}
+% \subtitle{Creating electronic and hybrid invoices using \LaTeX}
+% \author{Marei Peischl \\ \texttt{marei@peitex.de}}
+%
+% \maketitle
+%
+% \begin{abstract}
+% Invoicing is getting more and more automated.
+% Starting with public sector, within Germany there already is a requirement to stick to the Faktur-X Standard.
+% First Invoices based on this implementation here have been created back in 2021.
+% And this is now the trial to create a more universal and public package to support the current Version of ZUGFeRD and therefore also X-Rechung and Faktur-X.
+%
+% \indent The fundamental idea of this package was to use the calculation within \LaTeX{} as well. So it also creates the \XMLfile for the attachment on the fly.
+% To match typical setups there is a wrapper package which usually would also hold the personal Invoicing layout configuration.
+% \end{abstract}
+%
+% \IfOnlyDocumentation{\vfill}
+% \section*{Sponsors \& Supporters}
+% Most of this package has been created within my free time and for my personal use. At start, it was not a paid project at all.
+% Since it is addressing business users it would be great if we could keep this actively maintained.
+% If you are able to support this either financially for the maintenance effort, a custom extension, I'd love to hear from you.
+%
+% Tthis project was financially supported by:
+% \begin{itemize}
+% \item Pengutronix e.K., \url{https://pengutronix.de}\newline
+% Special thanks to them, as they also sponsored the minimal portable \TeX{} Live setup.
+% \end{itemize}
+%
+% \IfOnlyDocumentation{\clearpage}
+%
+% \tableofcontents
+%
+% \IfOnlyDocumentation{\clearpage}
+%
+% \section{Quick start}
+% This package is still in development and does not provide any validation.
+% To ensure your invoice is created correctly you should also validate the output files.
+% There are tools like the \citeauthor{mustang-project} \cite{mustang-project} providing an easy-to-use interface for the validation.
+% In the appendix I will add some notes on my setup and how I use it within pipelines.
+%
+% The Bundle provides an example file called \file{DEMO-rechnung-zugferd.tex}.
+% This includes a basic setup for a valid X-Rechnung currently matching Version 3.0.1 of the standard.
+% Details on the requirements can be found in the documentation at \cite{x-rechnung}.
+%
+% \subsection{Disclaimer concerning the \pkg{zugferd-invoice} Package}
+% The included package \pkg{zugferd-invoice} is an example project which might match your own invoicing structure.
+% It holds all the layout information which is static across all the invoices.
+% This package is an example implementation and should not be used in production.
+% It is published as a part of the documentation.
+%
+% The idea is to create your own version of this package to use your own layout and internally load the \pkg {zugferd} package that way.
+% Of course, it's possible to use a copy of this package within your personal setup.
+% But the syntax used in the DEMO file may change, so you have to ensure yourself to be compatible with updates.
+%
+% The interfaces for \pkg{zugferd} will hopefully stay the same.
+% At least changes will be announced and build compatible during a deprecation period.
+%
+% \end{documentation}
+% \iffalse
+% \begin{macrocode}
+%<*package>
+%<@@=zugferd>
+% \end{macrocode}
+% Workaround to replace module name without having a visible <@@=zugferd> in the documentation
+% \fi
+%</package>
+% \ExplSyntaxOn
+% \tl_gset:Nn \g__codedoc_module_name_tl {zugferd}
+% \ExplSyntaxOff
+% \iffalse
+%<*!package>
+% \fi
+% \begin{documentation}
+\ExplSyntaxOn
+\tl_gset:Nn \g__codedoc_module_name_tl {zugferd}
+\ExplSyntaxOff
+% \end{documentation}
+% \iffalse
+%</!package>
+%<*package>
+% \fi
+% \begin{implementation}
+% \section{Implementation}
+% \begin{variable}{\l_@@_tmp_tl,\g_@@_format_str,\g_@@_businessProcessId_str,\g_@@_writeTradeContact_bool,\g_@@_writePaymentMeans_bool,\g_@@_conformance_level_str}
+% \begin{macrocode}
+\tl_new:N \l_@@_tmp_tl
+\str_new:N \g_@@_format_str
+\str_new:N \g_@@_businessProcessId_str
+\bool_new:N \g_@@_writeTradeContact_bool
+\bool_new:N \g_@@_writePaymentMeans_bool
+\str_new:N \g_@@_conformance_level_str
+% \end{macrocode}
+% \end{variable}
+% \end{implementation}
+% \begin{documentation}
+% \section{Package Options}\label{sec:package-options}
+% The package supports a few fundamental settings.
+% These have to be set when the package is loaded as they are used internally to setup the scheme or activate the \XML mechanism.
+%
+% \DescribeKeyOption{format=xrechnung/xrechnung3.0/xrechnung2.3/basic}{xrechunng}
+% \option{format} selects the scheme to be used for the zugferd invoice.
+% Currently xrechnung3.0, xrechnung2.3 and the basic scheme are supported.
+%
+% The value \option{xrechnung} is set as an alias to |xrechnung3.0| and will always use the latest version supported by \pkg{zugferd}.
+%
+% \DescribeKeyOption{zugferd=\meta{boolean}}{true}*
+% This option can be used to deactivate the \XML embedding.
+% It would also disable the the \option{write-xml} option.
+% This can be used to create a package which can use the same structure to also create invoices without \XML attachment.
+% It can also be used with older \LaTeX{} releases than this package requires.
+% There will be a warning, but the visible part should be okay.
+%
+% \DescribeKeyOption{write-xml=\meta{boolean}}{true}*
+% Disable the \XML output.
+% This can be used if you want to create the \XML attachment with different software than this package.
+%
+% In that case you can either rename your file to \meta{\cs[no-index]{jobname}\_zugferd.xml} or also adjust the \option{xml-file} option.
+%
+% \DescribeKeyOption{xml-file=\meta{filename}}{\cs[no-index]{jobname}_zugferd.xml}*
+% Adjust the file name of the created or loaded \XMLfile.
+%
+% The option \option{xrechnung} is only used internally to set the global parameters for all |xrechnung| variants.
+%
+% \DescribeKeyOption{auto-exemption=\meta{boolean}}{true}
+% \pkg{zugferd} tries to automatically add an exemption-reason for the most common VAT categories.
+% In case a more specific reason is required this setting can be disabled and everything should be configured manually.
+% See \autoref{sec:tax-category} for more explanation of this feature and the categories this applies to.
+%
+% \end{documentation}
+% \begin{implementation}
+% \begin{optionenv}{format,xrechnung,write-xml,zugferd,xml-file,auto-exemption}
+% \changes{v0.7}{2024-09-10}{Added auto-exemption option}
+% \begin{macrocode}
+\char_set_catcode_other:N \#%
+\keys_define:nn {zugferd} {
+ xrechnung .code:n = {
+ \bool_gset_true:N \g_@@_writeTradeContact_bool
+ \bool_gset_true:N \g_@@_writePaymentMeans_bool
+ \str_gset:Nn \g_@@_conformance_level_str {XRECHNUNG}
+ },
+ format .choice:,
+ format / xrechnung3.0 .code:n = {
+ \str_gset:Nx \g_@@_format_str {
+ urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0
+ }
+ \str_gset:Nx \g_@@_businessProcessId_str {
+ urn:fdc:peppol.eu:2017:poacc:billing:01:1.0
+ }
+ \keys_set:nn {zugferd}{xrechnung}
+ },
+ format / xrechnung2.3 .code:n = {
+ \str_gset:Nx \g_@@_format_str {
+ urn:cen.eu:en16931:2017#compliant#urn:xoev-de:kosit:standard:xrechnung_2.3
+ }
+ \keys_set:nn {zugferd}{xrechnung}
+ },
+ format / basic .code:n = {
+ \str_gset:Nx \g_@@_format_str {
+ urn:cen.eu:en16931:2017#compliant#urn:factur-x.eu:1p0:basic
+ }
+ \bool_gset_false:N \g_@@_writeTradeContact_bool
+ \bool_gset_false:N \g_@@_writePaymentMeans_bool
+ \str_gset:Nn \g_@@_conformance_level_str {BASIC}
+ },
+ format / xrechnung .meta:n = { format = xrechnung3.0 },
+ format .initial:n = xrechnung,
+ format .usage:n = load,
+ write-xml .bool_gset:N = \g_@@_write_xml_bool,
+ write-xml .initial:n = true,
+ write-xml .usage:n = load,
+ zugferd .bool_gset:N = \g_@@_active_bool,
+ zugferd .initial:n = true,
+ zugferd .default:n = true,
+ zugferd .usage:n = load,
+ ZUGFerD .meta:n = {zugferd = #1},
+ xml-file .tl_gset:N = \g_@@_xml_file_tl,
+ xml-file .initial:n = \jobname _zugferd.xml,
+ xml-file .usage:n = load,
+ auto-exemption .bool_gset:N = \g_@@_auto_exemption_bool,
+ auto-exemption .initial:n = true,
+ auto-exemption .default:n = true,
+ auto-exemption .usage:n =load,
+}
+\char_set_catcode_parameter:N \#%
+
+\ProcessKeyOptions[zugferd]
+% \end{macrocode}
+% \end{optionenv}
+% \subsection{Preparation to write the \file{.xml} file}
+% \begin{variable}{\_@@_xml_writer_iow}
+% \begin{macrocode}
+\iow_new:N \_@@_xml_writer_iow
+% \end{macrocode}
+% \end{variable}
+% To adjust the metadata it is necessary to use the \pkg{pdfmanagement-testphase} by \citeauthor{pdfmanagement-testphase}.
+% She had prepared some experiment files for the PDF attachment in the experiments of the repository.
+% We use these to embed the \XML file.
+%
+% This part prepares the XMP metadata according to the required scheme.
+% \begin{macrocode}
+\bool_if:NT \g_@@_active_bool {
+ \cs_if_exist:NF \pdfmeta_xmp_xmlns_new:nn {
+ \msg_new:nnnn {zugferd} {PDFmanagement-not-active} {
+ The~\LaTeX~PDF~management~is~not~active.\\
+ Activate~it~using~\string\DocumentMetadata.
+ } {
+ See~ZUGFeRD~or~PDFmanagement~documentation~for~more~information.
+ }
+ \msg_error:nn{zugferd} {PDFmanagement-not-active}
+ }
+ %% based on experiments for l3pdfmeta by Ulrike Fischer
+ \pdfmeta_xmp_xmlns_new:nn {fx}{
+ urn:factur-x:pdfa:CrossIndustryDocument:invoice:1p0\c_hash_str
+ }
+
+ \cs_generate_variant:Nn \__pdfmeta_xmp_schema_new:nnn {nne}
+
+ \__pdfmeta_xmp_schema_new:nne
+ {Factur-X~PDFA~Extension~Schema}
+ {fx}
+ {urn:factur-x:pdfa:CrossIndustryDocument:invoice:1p0\c_hash_str}
+
+ \__pdfmeta_xmp_property_new:nnnnn
+ {fx}
+ {DocumentFileName}
+ {Text}
+ {external}
+ {name~of~the~embedded~XML~invoice~file}
+
+ \__pdfmeta_xmp_property_new:nnnnn
+ {fx}
+ {DocumentType}
+ {Text}
+ {external}
+ {INVOICE}
+
+ \__pdfmeta_xmp_property_new:nnnnn
+ {fx}
+ {Version}
+ {Text}
+ {external}
+ {The~actual~version~of~the~factur-x~schema}
+
+ \__pdfmeta_xmp_property_new:nnnnn
+ {fx}
+ {ConformanceLevel}
+ {Text}
+ {external}
+ {The~conformance~level~of~the~factur-x~data}
+
+ \exp_args:Ne \pdfmeta_xmp_add:n {
+ % fix INVOICE
+ <fx:DocumentType>INVOICE</fx:DocumentType>\iow_newline:
+ % fix factur-x.xml
+ <fx:DocumentFileName>factur-x.xml</fx:DocumentFileName>\iow_newline:
+ % fix schema version
+ <fx:Version>1.0</fx:Version>\iow_newline:
+ % zulässige Werte MINIMUM, BASIC WL, BASIC, EN 16931, EXTENDED, XRECHNUNG
+ <fx:ConformanceLevel>\g_@@_conformance_level_str</fx:ConformanceLevel>%
+ \iow_newline:
+ %
+ }
+}
+% \end{macrocode}
+% \end{implementation}
+% \begin{documentation}
+% \section{User Commands}
+% The end user is only asked to set or access the data to be used by \pkg{zugferd}.
+%
+% \begin{syntax}
+% \cs[no-index]{SetZUGFeRDData}*\marg{key value list}
+% \end{syntax}
+% \DescribeMacro{\SetZUGFeRDData}
+% \DescribeMacro[noindex]{\SetZugferdData}
+% The two modes of \cs[no-index]{SetZUGFeRDData} control if the argument is expanded before the fields are set.
+% Depending on the source of the data this might be necessary.
+% Fields which are involved in the calculation will be expanded anyway, but the text fields will not, to support special characters.
+%
+% \end{documentation}
+% \begin{implementation}
+% \begin{function}{\SetZUGFeRDData}
+% \begin{macrocode}
+\NewDocumentCommand{\SetZUGFeRDData}{sm}{
+ \IfBooleanTF{#1}
+ {\keys_set:ne}
+ {\keys_set:nn}
+ {zugferd} {#2}
+}
+\let\SetZugferdData\SetZUGFeRDData
+% \end{macrocode}
+% \end{function}
+% \end{implementation}
+% \begin{documentation}
+%
+% \DescribeMacro{\InsertZUGFeRDData}
+% \DescribeMacro[noindex]{\InsertZugferdData}
+% \begin{syntax}
+% \cs[no-index]{InsertZugferdData}\oarg{special mode option}\marg{data-selection}
+% \end{syntax}
+% ZUGFerd uses the same data as the \XMLfile inside the PDF.
+% To simplify the reuse of data this command is designed to simplify the access to data fields, for example:
+%
+% \begin{examplecode}
+% \InsertZUGFeRDData{id}
+% {\InsertZUGFeRDData[set-today]{date}\today}
+% \InsertZUGFeRDData[AddressData]{seller}
+% \end{examplecode}
+% As special modes the command currently supports the following:
+%
+% By default \pkg{zugferd} tries to find the variable holding the data itself.
+% First a token list is tried, afterwards a string.
+% Global variables are prefered over local ones.
+%
+% As the variable names may container underscores and the option usually prefers dashes, dashes are converted to underscores for the detection.
+%
+% \DescribeOption{AddressData} Allows |seller| or |buyer| for the data selection.
+% Will print the address, to be used in letters.
+%
+% \DescribeOption{set-today}
+% For dates there also exists the variant which will not print the variable but parse the variable to be used as \cs{today}.
+% Using this the date format can be controlled easier using the language setting of the document.
+% Here you should take care to use it within a group to restore the real value of \cs[no-index]{today} afterwards.
+%
+% \end{documentation}
+% \begin{implementation}
+% \begin{function}{\InsertZUGFeRDData,\InsertZugferdData}
+% To simplify the usage in letters we also add fields to be able to use the zugferd data within \LaTeX{} output.
+% Country is still missing.
+% \begin{macrocode}
+\NewDocumentCommand{\InsertZUGFeRDData}{om}{
+ \str_case:nnF {#1} {
+% \end{macrocode}
+% \begin{macrocode}
+ {AddressData} {
+ \clist_map_inline:nn {name, lineone, linetwo} {
+ \prop_if_in:cnT {g_@@_#2_AddressData_prop } {##1} {
+ \prop_item:cn {g_@@_#2_AddressData_prop } {##1}\\
+ }
+ }
+ \prop_item:cn {g_@@_#2_AddressData_prop } {postcode}
+ \space
+ \prop_item:cn {g_@@_#2_AddressData_prop } {city}
+ }
+% \end{macrocode}
+% \begin{macrocode}
+ {set-today} {
+ \_@@_set_today:v {g_@@_#2_tl}
+ }
+ } {
+% \end{macrocode}
+% Try to find the variable automatially.
+% \begin{itemize}
+% \item replace dashes by underscores
+% \item try if a tokenlist or a string
+% \item prefer global over local
+% \item take the first existing variable and break the loop
+% \end{itemize}
+% \begin{macrocode}
+ \str_set:Ne \l_tmpa_str {#2}
+ \str_replace_all:Nnn \l_tmpa_str {-} {_}
+ \str_replace_all:Nnn \l_tmpa_str {/} {_}
+ \bool_set_true:N \g_tmpa_bool
+ \clist_map_inline:nn {tl, str} {
+ \clist_map_inline:nn {g, l} {
+ \use:c {##1 _if_exist:cT} {####1_@@_ \l_tmpa_str _##1}
+ {
+ \use:c {####1_@@_ \l_tmpa_str _##1}
+ \bool_gset_false:N \g_tmpa_bool
+ }
+ \bool_if:NF \g_tmpa_bool {\clist_map_break:}
+ }
+ \bool_if:NF \g_tmpa_bool {\clist_map_break:}
+ }
+ }
+}
+\providecommand{\InsertZugferdData}{\InsertZUGFeRDData}
+\providecommand{\insertZugferdData}{\InsertZUGFeRDData}
+% \end{macrocode}
+% \end{function}
+% \begin{function}{\_@@_set_today:c}
+% Auxiliary function to use a date variable within the current group to be used as \cs[no-index]{today}.
+% \begin{macrocode}
+\cs_new:Nn \_@@_set_today:n {
+ \_@@_set_today_aux:w #1 \q_stop
+}
+\cs_generate_variant:Nn \_@@_set_today:n {v}
+\cs_new:Npn \_@@_set_today_aux:w #1 #2 #3 #4 #5 #6 #7 #8 \q_stop{
+ \int_set:Nn \year {#1#2#3#4}
+ \int_set:Nn \month {#5#6}
+ \int_set:Nn \day {#7#8}
+}
+% \end{macrocode}
+% \end{function}
+% \end{implementation}
+% \begin{documentation}
+% \section{Commands for template authors}
+%
+% \DescribeEnv{ZUGFeRD}
+% To simplify the structure of the wrapper package, \pkg{zugferd} provides an environment for the \XML mechanism and does the attachment to the PDF file (of course only, if enabled, see \autoref{sec:package-options}).
+% This provides the public interface bundling some steps together to reduce maintenance effort for any template maintainer using this package.
+% It also avoids the use of internal commands.
+%
+% This environment opens the \XML file using \cs{startWritingZUGFeRDxml} and afterwards writes the \XML header including the File and Scheme information, the |ExchangedDocumentContext| and information of the |ExchangedDocument|.
+% Notes will also be written within this step.
+% Afterwards the environment should include all the mechanisms to write the invoice positions as well as summation.
+%
+% At the end of the environment the footer is inserted, before the output stream is closed using \cs{stopWritingZUGFeRDxml}. Which also attaches the \XMLfile to the PDF.
+%
+%
+% \end{documentation}
+% \begin{implementation}
+% \begin{macrocode}
+\NewDocumentEnvironment{ZUGFeRD}{o}{
+ \IfNoValueF{#1}{
+ \SetZUGFeRDData{#1}
+ }
+ \zugferd_enable_XML_interfaces:
+ \startWritingZUGFeRDxml
+ \zugferd_write_Header:
+ \ignorespaces
+}{
+ \zugferd_enable_XML_interfaces:
+ \zugferd_write_Footer:
+ \stopWritingZUGFeRDxml
+ \zugferd_disable_XML_interfaces:
+}
+% \end{macrocode}
+% \end{implementation}
+% \begin{documentation}
+% \DescribeMacro{\startWritingZUGFeRDxml}
+% \cs[no-index]{startWritingZUGFeRDxml} is opening the output stream for the \XMLfile.
+% It also adjusts the indentation.
+% If \option{write-xml} is false, this option only opens a group to achieve the same structure in both modes.
+%
+% \DescribeMacro{\stopWritingZUGFeRDxml}
+% Here the output stream is closed and the \XMLfile is attached.
+% In case \option{write-xml} is not active, the attachment will be made if that's not deactivated separately using \option{zugferd}.
+% It also ends the group started by \cs[no-index]{startWritingZUGFeRDxml}.
+% \end{documentation}
+% \begin{implementation}
+% \begin{macrocode}
+\newcommand*{\startWritingZUGFeRDxml}{
+ \begingroup
+ \bool_if:NTF \g_@@_write_xml_bool {
+ \char_set_active_eq:nN {13} \_@@_xml_newline_indent:
+ \iow_open:Nn \_@@_xml_writer_iow {\g_@@_xml_file_tl}
+ }{
+ \msg_info:nn {zugferd} {no-xml-write}
+ }
+}
+\msg_new:nnn {zugferd} {no-xml-write} {
+ The~option~write-xml=false~was~set.\\
+ Writing~of~XML~file~is~deactivated.
+}
+% \end{macrocode}
+% The PDF attachment is done after the writing stream is closed.
+% \begin{macrocode}
+%% The metadata elements are taken by Ulrike Fischer's faktur-x experiments
+%% https://github.com/latex3/pdfresources/tree/main/experiments/factur-x-bills
+\newcommand*{\stopWritingZUGFeRDxml}{%
+ \bool_if:NT \g_@@_write_xml_bool
+ {\iow_close:N \_@@_xml_writer_iow}%
+ \endgroup
+ \bool_if:NT \g_@@_active_bool {
+ \group_begin:
+ \pdfdict_put:nnn {l_pdffile/Filespec} {AFRelationship}{/Alternative}
+ %or /Source in some cases
+ \pdfdict_put:nnn {l_pdffile/Filespec} {Desc}{(Factur-X/ZUGFeRD-Rechnung)}
+ \pdffile_embed_file:nnn {\g_@@_xml_file_tl}{factur-x.xml}
+ {zugferd/rechnung}
+ \group_end:
+ \pdfmanagement_add:nnx
+ {Catalog/Names}
+ {EmbeddedFiles}
+ {\pdf_object_ref:n{zugferd/rechnung}}
+ % steht in der docu ist aber pdf 2.0 ....
+ \pdfmanagement_add:nnx{Catalog}{AF}{\pdf_object_ref:n{zugferd/rechnung}}
+ }
+}
+% \end{macrocode}
+% \end{implementation}
+% \begin{documentation}
+% \subsection{Interfaces to write the \XML contents}
+% \changes{v0.6}{2024-09-05}{Provide public interfaces and first version of the documentation.}
+% \label{sec:xml-interfaces}
+% In case you are using |write-xml=true| (which is the default) You need to ensure to call the \XML writing functions in the correct order.
+% For example after setting the global invoice data, like it's done in the example file.
+% The minimal example below would create a valid XML.
+% The interface commands are described afterwards.
+%
+% \begin{examplecode}
+% \begin{ZUGFeRD}
+% \zugferd_write_Item:nnnnnn {1} {} {Plushie \TeX{} lion} {31.98} {2} {63.78}
+% \zugferd_startInvoiceSums:
+% \zugferd_write_TaxEntry:nnnn {S} {19} {63.78} {12.12}
+% \zugferd_write_Summation:nnnnnnnn {63.78} {0} {0} {63.78} {12.12} {75.90} {0} {75.90}
+% \zugferd_stopInvoiceSums:
+% \end{ZUGFeRD}
+% \end{examplecode}
+%
+% \DescribeMacro{\zugferd_write_Item:nnnnnn}
+% This command is the interface to write invoice items to the \XMLfile.
+% If the \XML interface is enabled this is a reference to the internal command \cs{_@@_insert_TradeLineItem:nnnnnn}.
+% \begin{syntax}
+% \cs[no-index]{zugferd_write_Item:nnnnn}
+% \marg{LineID}\marg{optional: item id (\enquote{SellerAssignedID})}\marg{item name}
+% \marg{NetPriceProductTradePrice}
+% \marg{BilledQuantity}
+% \marg{LineTotalAmount}
+% \end{syntax}
+% Within the product name macros are disabled using \cs[no-index]{zugferd_disable_macros:}, see \autoref{sec:disable_macros}.
+%
+% This command is using the local values of tax information as well as the unit code.
+% If you want to overwrite them, adjust them locally using the corresponding options, e.g.:
+% \begin{examplecode}
+% \begingroup
+% \keys_set:nn {zugferd}{tax/rate=19, tax/category=S}
+% \zugferd_write_Item:nnnnnn {1} {} {Plushie \TeX{} lion} {31.98} {2} {63.78}
+% % Code using the data for visible representation
+% \endgroup
+% \end{examplecode}
+% This will set the tax rate to 19\,\% unregarding the global setting.
+%
+% \DescribeMacro{\zugferd_startInvoiceSums:}
+% \DescribeMacro{\zugferd_stopInvoiceSums:}
+% There is some global data which is placed in the \XMLfile after the invoice items have been placed.
+% Typically, in \LaTeX{} this block is started after the items have been printed and will enclose the summation block.
+%
+% The starting includes the so called \enquote{ApplicableHeaderTradeAgreement} which contains the address data of both trade parties, see \autoref{sec:TradeParties}
+% And this will also print the \enquote{SpecifiedTradeSettlementPaymentMeans}, see \autoref{sec:PaymentMeans}.
+%
+% \DescribeMacro{\zugferd_write_TaxEntry:nnnn}
+% This command is writing the sum over a tax rate. This command has to be used once per rate applied to the items.
+% \begin{syntax}
+% \cs[no-index]{zugferd_write_TaxEntry:nnnn} \marg{tax category code} \marg{tax rate in \%} \marg{basis amount the tax applies to} \marg{tax amount}
+% \end{syntax}
+% The tax amount could of course be calculated internally.
+% In the example package this is done automatically, but the interface needs to support manual input as a lot of use cases for \LaTeX{} invoicing use it only to create the output file.
+%
+% \DescribeMacro{\zugferd_write_Summation:nnnnnnnn}\par
+% \noindent The total values are all collected with a single macro.
+% \begin{syntax}
+% \cs[no-index]{zugferd_write_Summation:nnnnnnnn}
+% \marg{LineTotalAmount}\marg{ChargeTotalAmount}\marg{AllowanceTotalAmount}
+% \marg{TaxBasisTotalAmount}\marg{TaxTotalAmount}
+% \marg{GrandTotalAmount}\marg{TotalPrepaidAmount}\marg{DuePayableAmount}
+% \end{syntax}
+% This commnd is also writing the payment terms to the \XMLfile.
+% Please be aware that it's in general not possible to calculate the tax values in here, as there might be multiple tax rates applied.
+% This is only taking the sums over all tax entries.
+%
+% In case you are using some specials like category \enquote{E} the exemption reason will also be written at that point.
+% For that it is referencing the current value of the setting.
+%
+% \subsection{Commands to temporary disable/re-enable the \XML writing interfaces}
+% \DescribeMacro{\zugferd_enable_XML_interfaces:}
+% \DescribeMacro{\zugferd_disable_XML_interfaces:}
+% \par\bigskip
+% As there are a lot of usecases where code is processed multiple times, it's necessary to provide an interface to temporary disable the \XML writing mechanism.
+% A lot of these situations appear within table structures whereas a local adjustment would not be helpful.
+% Therefore these adjustments have to be done globally.
+%
+% The example package \pkg{zugferd-invoice} provides an example for this to ensure the \XML data is not written multiple times.
+% The \env{ZUGFeRD} environment has been constructed that way, that it would automatically enable the interface when it begins and also when it ends, to write the data. So you should ensure this environment is only processed once or use the lower level interfaces directly.
+% \end{documentation}
+% \begin{implementation}
+% Provide public interfaces and the ZUGFeRD environment.
+% \begin{function}{\zugferd_enable_XML_interfaces:,\zugferd_disable_XML_interfaces:}
+% \begin{macrocode}
+\cs_new:Nn \zugferd_enable_XML_interfaces: {
+ \bool_if:NT \g_@@_write_xml_bool {
+ \cs_gset:Nn \zugferd_write_Header: {
+ \_@@_insert_Header:
+ \_@@_insert_FrontMatter:
+ }
+ \cs_gset:Nn \zugferd_write_Footer: {
+ \_@@_insert_Footer:
+ }
+ \cs_gset_eq:NN \zugferd_write_Item:nnnnnn
+ \_@@_insert_TradeLineItem:nnnnnn
+ \cs_gset:Nn \zugferd_startInvoiceSums: {
+ \_@@_ApplicableHeaderTradeAgreement:
+ \_@@_ApplicableHeaderTradeSettlement_start:
+ \_@@_SpecifiedTradeSettlementPaymentMeans:
+ }
+ \cs_gset:Nn \zugferd_stopInvoiceSums: {
+ \_@@_ApplicableHeaderTradeSettlement_stop:
+ }
+ \cs_gset_eq:NN \zugferd_write_TaxEntry:nnnn \_@@_ApplicableTradeTax:nnnn
+ \cs_gset:Nn \zugferd_write_Summation:nnnnnnnn {
+ \_@@_SpecifiedTradePaymentTerms:
+ \_@@_SpecifiedTradeSettlementHeaderMonetarySummation:nnnnnnnn
+ {##1} {##2} {##3} {##4} {##5} {##6} {##7} {##8}
+ }
+ }
+}
+\cs_new:Nn \zugferd_disable_XML_interfaces: {
+ \cs_gset_eq:NN \zugferd_write_Header: \prg_do_nothing:
+ \cs_gset_eq:NN \zugferd_write_Footer: \prg_do_nothing:
+ \cs_gset_eq:NN \zugferd_write_Item:nnnnnn \use_none:nnnnnn
+ \cs_gset_eq:NN \zugferd_startInvoiceSums: \prg_do_nothing:
+ \cs_gset_eq:NN \zugferd_stopInvoiceSums: \prg_do_nothing:
+ \cs_gset_eq:NN \zugferd_write_TaxEntry:nnnn \use_none:nnnn
+ \cs_gset_eq:NN \zugferd_write_Summation:nnnnnnnn \use_none:nnnnnnnn
+}
+\bool_if:NTF \g_@@_write_xml_bool {
+ \zugferd_enable_XML_interfaces:
+}{
+ \zugferd_disable_XML_interfaces:
+}
+% \end{macrocode}
+% \end{function}
+% \begin{function}{\_@@_write_xml:n,\_@@_define_xml_writer:Nn,\_@@_define_xml_content:Nn}
+% These commands are used to toggle the writing of the \XMLfile. This corresponds to the option \option{write-xml}.
+% \begin{macrocode}
+\bool_if:NTF \g_@@_write_xml_bool {
+ \cs_new:Nn \_@@_write_xml:n {
+ \iow_now:Ne \_@@_xml_writer_iow {\_@@_xml_auto_indent: #1}
+ }
+ \cs_new_eq:NN \_@@_define_xml_writer:Nn \cs_new:Nn
+ \cs_new_eq:NN \_@@_define_xml_content:Nn \cs_new:Nn
+} {
+ \cs_set_eq:NN \_@@_write_xml:n \use_none:n
+ \cs_set:Nn \_@@_define_xml_writer:Nn {\cs_new:Nn #1 {}}
+ \cs_set:Nn \_@@_define_xml_content:Nn {\cs_new:Nn #1 {}}
+}
+
+\cs_generate_variant:Nn \_@@_write_xml:n {e}
+% \end{macrocode}
+% \end{function}
+% \subsection{Number rounding}
+% As \pkg{siunitx} is implementing this, we use it instead of building our own mechanism.
+% \begin{macrocode}
+\RequirePackage{siunitx}
+% \end{macrocode}
+% \begin{function}{\_@@_number_format:nNn,\_@@_number_format:nNe}
+% \begin{macrocode}
+\cs_new:Nn \_@@_number_format:nNn {
+ \sisetup{
+ parse-numbers=true,
+ round-mode=places,
+ round-precision=#1,
+ round-pad = false,
+ group-digits=false,
+ minimum-decimal-digits=#1,
+ output-decimal-marker=.
+ }
+ \siunitx_number_format:nN {#3} #2
+}
+\cs_generate_variant:Nn \_@@_number_format:nNn {nNe}
+% \end{macrocode}
+% \end{function}
+% \begin{function}{\_@@_write_rounded:nnnn,\_@@_write_rounded:nnn}
+% \begin{macrocode}
+\cs_new:Nn \_@@_write_rounded:nnnn {
+ \_@@_number_format:nNe {#1} \l_@@_tmp_tl {#4}
+ \_@@_write_xml:e {<ram:#2#3>\l_@@_tmp_tl</ram:#2>}
+}
+\cs_new:Nn \_@@_write_rounded:nnn {
+ \_@@_write_rounded:nnnn {#1} {#2} {} {#3}
+}
+% \end{macrocode}
+% \end{function}
+% \subsection{XML indentation}
+% The indentation of the \XML does not really matter.
+% For debugging, it's a lot simpler to have it included and this also helped to maintain the structure of the code during development, so I decided to keep it.
+% The indentation is created using s bunch of auxiliary commands and variables which are defined here.
+% \begin{variable}{\g_@@_indent_int}
+% \begin{macrocode}
+\int_new:N \g_@@_indent_int
+% \end{macrocode}
+% \end{variable}
+% \begin{function}{\_@@_indent:,\_@@_xml_auto_indent:,\_@@_xml_newline_indent: }
+% \begin{macrocode}
+\cs_new:Nn \_@@_indent: {
+ \space\space
+}
+\cs_new:Nn \_@@_indent:n {
+ \prg_replicate:nn {#1} {\_@@_indent:}
+}
+\cs_new:Nn \_@@_xml_auto_indent: {
+ \_@@_indent:n {\g_@@_indent_int}
+}
+% \end{macrocode}
+% \end{function}
+% The idea was to redefine the \cs[no-index]{newlinechar} to automatically indent the following line.
+% \begin{macrocode}
+\cs_new:Nn \_@@_xml_newline_indent: {
+ \iow_newline: \_@@_xml_auto_indent:
+}
+% \end{macrocode}
+% \end{implementation}
+% Setting up the catcodes to simplify the \XML indentation.
+% \iffalse
+% \begin{macrocode}
+\cctab_new:N \g_@@_xml_cctab
+\begingroup%
+\endlinechar=13%
+\char_set_catcode:nn {13}{13}%
+\cctab_gsave_current:N \g_@@_xml_cctab%
+\endgroup
+% \end{macrocode}
+% \fi
+% \begin{documentation}
+% \subsection{Escaping macros inside \XML data}
+% \label{sec:disable_macros}
+% \DescribeMacro{\zugferd_disable_macros:}
+% Since we allow the use of \LaTeX{} code in some fields there has to be a mechanism to disable macros inside the \XML output.
+% The mechanism is created similar to the one by \pkg{hyperref}, and we also use some definitions from there to use those as a starting point.
+% To have a detailed list of the redefinition, please have a look at the implementation of this command.
+%
+% There exists a hook to extend or overwrite these definitions |zugferd/disable-macros|.
+% You can add own redefinitions using this. For example if you want to overwrite the setting mapping a \cs[no-index]{newline} to a new line char instead of space, you could add the following to your setup:
+% \begin{examplecode}
+% \hook_gput_code:nnn {zugferd/disable-macros}
+% {newline-to-LF}
+% {\def\newline{\iow_newline:}}
+% \end{examplecode}
+% \end{documentation}
+% \begin{implementation}
+% \begin{function}{\zugferd_disable_macros:}
+% The definition was mostly taken from \pkg{hyperref} \cite{hyperref}.
+% Most likely not all of these are required, but it's probably easier to take this as a reasonable choice instead of creating an own collection.
+% \iffalse
+% \begin{macrocode}
+%% modified list taken from hyperref.sty v7.01i
+%% Copyright
+%% 1995-2001 Sebastian Rahtz, with portions written by David Carlisle and Heiko Oberdiek
+%% 2001-2015 Heiko Oberdiek
+%% 2016-2019 Oberdiek Package Support Group
+%% 2019-2024 LaTeX Project
+%% modifications have been made to support the mechanism if hyperref is not loaded
+% \end{macrocode}
+% \fi
+% \begin{macrocode}
+\cs_new:Nn \zugferd_disable_macros: {
+ \let\{\textbraceleft
+ \let\}\textbraceright
+ \let\\\textbackslash
+ \let\#\textnumbersign
+ \let\$\textdollar
+% \end{macrocode}
+% This only is a part of the list.
+% There is no real use of printing the whole list, it's inside \file{zugferd.sty} anyway.
+% \comment
+% \begin{macrocode}
+ \let\%\textpercent
+ \let\&\textampersand
+ \let\_\textunderscore
+ \let\P\textparagraph
+ \let\ldots\textellipsis
+ \let\dots\textellipsis
+ \def\\{\space}%
+ \def\newline{\space}%
+ \def\TeX{TeX}%
+ \def\LaTeX{La\TeX}%
+ \def\LaTeXe{\LaTeX2e}%
+ \def\eTeX{e-\TeX}%
+ \def\SliTeX{Sli\TeX}%
+ \def\MF{Metafont}%
+ \def\MP{Metapost}%
+ \let\fontencoding\@gobble
+ \let\fontfamily\@gobble
+ \let\fontseries\@gobble
+ \let\fontshape\@gobble
+ \let\fontsize\@gobbletwo
+ \let\selectfont\@empty
+ \let\usefont\@gobblefour
+ \let\emph\@firstofone
+ \let\textnormal\@firstofone
+ \let\textrm\@firstofone
+ \let\textsf\@firstofone
+ \let\texttt\@firstofone
+ \let\textbf\@firstofone
+ \let\textmd\@firstofone
+ \let\textit\@firstofone
+ \let\textsc\@firstofone
+ \let\textsl\@firstofone
+ \let\textup\@firstofone
+ \let\normalfont\@empty
+ \let\rmfamily\@empty
+ \let\sffamily\@empty
+ \let\ttfamily\@empty
+ \let\bfseries\@empty
+ \let\mdseries\@empty
+ \let\itshape\@empty
+ \let\scshape\@empty
+ \let\slshape\@empty
+ \let\upshape\@empty
+ \let\em\@empty
+ \let\rm\@empty
+ \let\Huge\@empty
+ \let\LARGE\@empty
+ \let\Large\@empty
+ \let\footnotesize\@empty
+ \let\huge\@empty
+ \let\large\@empty
+ \let\normalsize\@empty
+ \let\scriptsize\@empty
+ \let\small\@empty
+ \let\tiny\@empty
+ \let\mathversion\@gobble
+ \let\phantom\@gobble
+ \let\vphantom\@gobble
+ \let\hphantom\@gobble
+ \let\ding\HyPsd@ding
+ \let\Cube\HyPsd@DieFace
+ \def\begin##1{\csname##1\endcsname}%
+ \def\end##1{\csname end##1\endcsname}%
+ \def\textcolor##1##{\@secondoftwo}%
+ \def\TextOrMath{\ifmmode\expandafter\@secondoftwo\else\expandafter\@firstoftwo\fi}%
+ \let\foreignlanguage\@secondoftwo
+ \let\textlatin\@firstofone
+ \let\cyr\relax
+ \let\glqq\textglqq
+ \let\grqq\textgrqq
+ \let\glq\textglq
+ \let\grq\textgrq
+ \let\flqq\textflqq
+ \let\frqq\textfrqq
+ \let\flq\textflq
+ \let\frq\textfrq
+ \let\if@mid@expandable\@firstoftwo
+ \let\hspace\@gobble
+ \let\label\@gobble
+ \let\index\@gobble
+ \let\glossary\@gobble
+ \let\@mkboth\@gobbletwo
+ \let\leavevmode\@empty
+ \let\mbox\@empty
+ \def\halign{\@gobble}%
+ \let\Hy@SectionAnchorHref\@gobble
+ \let\ref\@gobble
+ \let\href\@gobble
+ \let\pageref\@gobble
+ \let\nameref\@gobble
+ \let\autoref\@gobble
+ \let\ignorespaces\relax
+ \let\ensuremath\@firstofone
+ \hook_use:n {zugferd/disable-macros}
+% \end{macrocode}
+% \endcomment
+% \begin{macrocode}
+}
+% \end{macrocode}
+% To provide a possibility to extend or overwrite the macro list a hook is added.
+% \begin{macrocode}
+\hook_new:n {zugferd/disable-macros}
+% \end{macrocode}
+% \end{function}
+% \end{implementation}
+% \begin{documentation}
+% \section{Adding data to the XML}
+% All data which does not directly depend on amounts or specific items is provided using a key-value interface.
+% For some fields there is the option to define a global preset but locally overwrite it for a specific item.
+% This only applies to data fields used by the writing interfaces described in \autoref{sec:xml-interfaces}.
+%
+% This package is using the UN/CEFACT Cross Industry Invoice Syntax for the data.
+% Currently it is not planned to implement the UBL syntax as well, but generally this would be possible.
+%
+% In most cases this functionality will be used to change the tax setting or unit for a single item.
+% \autoref{sec:xml-interfaces} also provided an example for this.
+%
+% This section will now take all data which can be set using \cs{SetZUGFeRDData}.
+%
+% \end{documentation}
+% \begin{implementation}
+% \begin{variable}{\g_@@_notes_seq,\g_@@_id_tl,\g_@@_date_tl,\g_@@_subject_tl,\g_@@_fromaddress_tl,\g_@@_DocumentTypeCode_tl}
+% \begin{macrocode}
+\seq_new:N \g_@@_notes_seq
+\tl_new:N \g_@@_id_tl
+\tl_new:N \g_@@_date_tl
+\tl_new:N \g_@@_delivery_date_tl
+\tl_new:N \g_@@_subject_tl
+\tl_new:N \g_@@_fromaddress_tl
+\tl_new:N \g_@@_DocumentTypeCode_tl
+\tl_new:N \l_@@_currency_tl
+% \end{macrocode}
+% \end{variable}
+% \end{implementation}
+% \begin{documentation}
+% \subsection{General Invoicing Data}
+% Some of the general data currently supports only one value, which is alreay selected by default.
+% The interface already exists and may be extended later.
+%
+% \end{documentation}
+% \begin{implementation}
+% \begin{macrocode}
+\keys_define:nn { zugferd } {
+%TODO define others
+% \end{macrocode}
+% \end{implementation}
+% \begin{documentation}
+% \DescribeKeyOption{document-type=commercial-invoice}{commercial-invoice}
+% Select the document type. The only supported value currently is |commercial-invoice|. This will select the corresponding type code, which is 380.
+% \end{documentation}
+% \begin{implementation}
+% \begin{optionenv}{id, document-type}
+% \begin{macrocode}
+ document-type .choice:,
+ document-type / commercial-invoice .code:n =
+ \tl_gset:Nn \g_@@_DocumentTypeCode_tl {380},
+ document-type .initial:n = commercial-invoice,
+% \end{macrocode}
+% \end{optionenv}
+% \end{implementation}
+% \begin{documentation}
+% \subsubsection{Invoice number/document ID}
+% \DescribeKeyOption*{id=komavar/\meta{document ID/invoice number}}{}
+% This has to be set. Leaving it empty will lead to an invalid \XMLfile.
+%
+% The value |komavar| would reference the data provided the KOMA-Script letter variabe |invoice|. In case you don't use \pkg{scrletter} you should not use this setting.
+% More information can be found in the documentation \cite{scrletter}.
+% \end{documentation}
+% \begin{implementation}
+% \begin{macrocode}
+ id .choice:,
+ id / komavar .code:n = \tl_gset:Nf \g_@@_id_tl {\scr@invoice@var},
+ id / unknown .code:n = \tl_gset:Nn \g_@@_id_tl {#1},
+% \end{macrocode}
+% \end{implementation}
+% \begin{documentation}
+% \subsubsection{Currency}
+% \DescribeKeyOption{currency=EUR/USD/CHF/€}{EUR}
+% Currently \pkg{zugferd} only supports one currency for an invoice. This might be extended later.
+% The currency is pre-configured to use Euro.
+% \end{documentation}
+% \begin{implementation}
+% \begin{macrocode}
+ currency .choices:nn = {EUR, USD, CHF} {
+ \tl_set_eq:NN \l_@@_currency_tl \l_keys_choice_tl
+ },
+ currency / € .meta:n = {currency = EUR},
+ currency / unknown .code:n = {
+ \exp_args:Nnnx \keys_if_choice_exist:nnnTF {zugferd} {unit} {
+ \str_uppercase:f {#1}
+ }
+ {\keys_set:nx { zugferd } {unit= {\str_uppercase:f {#1}}}}
+ {
+ \msg_warning:nnn { zugferd } {unknown-value} {currency} {#1}
+ \tl_set:Ne \l_@@_currency_tl {\str_uppercase:f {#1}}
+ }
+ },
+ currency .initial:n = EUR,
+% \end{macrocode}
+% \end{implementation}
+% \begin{documentation}
+% \subsubsection{Dates}
+% \DescribeKeyOption{date=auto/\meta{date formatted as YYYYMMDD}}{auto}
+% \DescribeKeyOption{delivery-date=auto/\meta{date formatted as YYYYMMDD}}{auto}
+% \DescribeKeyOption*{due-date=\meta{date formatted as YYYYMMDD}}{}*
+% Currently there are three kinds of dates implemented.
+% The XML-Standard requires them to use the structure \meta{YYYYMMDD}.
+% For the day this document was compiled this would be: \enquote{\InsertZUGFeRDData{date}} (\today).
+%
+% Instead of providing a date value directly it's also possible to use \cs[no-index]{today}.
+% This is done using the \value{auto} which is the default setting for \option{date} and \option{delivery-date}.
+% Please be aware, that this would change if you rebuild the document later. So you might want to use an actual value here.
+% \end{documentation}
+%
+% \begin{implementation}
+% \begin{optionenv}{date,delivery-date}
+% \begin{macrocode}
+ date .choice:,
+ date / auto .code:n = \tl_gset:Ne \g_@@_date_tl {
+ \the\year
+ \int_compare:nNnT {\month} < {10} {0} \the\month
+ \int_compare:nNnT {\day} < {10} {0}\the\day
+ },
+ date / unknown .code:n = \tl_gset:Nn \g_@@_date_tl {#1},
+ date .initial:n = auto,
+ delivery-date .choice:,
+ delivery-date / auto .code:n = \tl_gset:Ne \g_@@_delivery_date_tl {
+ \the\year
+ \int_compare:nNnT {\month} < {10} {0} \the\month
+ \int_compare:nNnT {\day} < {10} {0}\the\day
+ },
+ delivery-date / unknown .code:n = {
+ \tl_gset:Nn \g_@@_delivery_date_tl {#1}
+ },
+ delivery-date .initial:n = auto,
+ due-date .tl_gset:N = \_@@_due_date_tl,
+ due-date .initial:n =,
+% \end{macrocode}
+% \end{optionenv}
+% \end{implementation}
+% \begin{documentation}
+% \subsubsection{Payment terms}
+% \DescribeKeyOption{payment-terms=\meta{string}}{}
+% One option to set payment terms is the \option{due-date} mentioned before.
+% If this is not set or the setting is more complex one can use \option{payment-terms} to add more information.
+%
+% This setting is a string. In case there is expansion required this has to be done before.
+% \end{documentation}
+% \begin{implementation}
+% \begin{optionenv}{payment-terms}
+% \begin{macrocode}
+ payment-terms .str_gset:N = \_@@_payment_terms_str,
+ payment-terms .initial:n =,
+% \end{macrocode}
+% \end{optionenv}
+% \end{implementation}
+% \begin{documentation}
+% \subsubsection{Notes: Adding additional information}
+% \DescribeKeyOption{subject=komavar/\meta{Tokenlist}}{}
+% \DescribeKeyOption{fromaddress=komavar/\meta{Tokenlist}}{}
+% \DescribeKeyOption{add-note=\meta{Tokenlist}}{}*
+% The ZUGFeRD example files\cite{zugferd-download} use all visible data to add them to the \XML as a note.
+% \option{subject} and \option{fromaddress} are used to support this.
+% The data should not be too relevant but \pkg{zugferd} want's to support adding additional data to the \XML using the note element.
+% So these fields can be left out but in case they are not empty, they will also be written to the \XML.
+%
+% The \value{komavar} corresponds to the mechanism provided by \pkg{scrletter}.
+% It accesses the variable expands it to be used directly.
+% If you don't use this package, you can ignore this setting or add content manually.
+% \end{documentation}
+% \begin{implementation}
+% \begin{optionenv}{subject,fromaddress,add-note}
+% \begin{macrocode}
+ subject .choice:,
+ subject / komavar .code:n = {
+ \tl_gset:Nf \g_@@_subject_tl {\scr@subject@var}
+ },
+ subject / unknown .code:n = \tl_gset:Nn \g_@@_subject_tl {#1},
+ fromaddress .choice:,
+ fromaddress / komavar .code:n = \tl_gset:Nf \g_@@_fromaddress_tl
+ {\scr@fromaddress@var},
+ fromaddress / unknown .code:n = \tl_gset:Nn \g_@@_fromaddress_tl {#1},
+ add-note .code:n = \seq_gput_right:Nn \g_@@_notes_seq {#1},
+}
+\msg_new:nnnn {zugferd} {unknown-value} {
+ You~selected~a~#1~which~was~not~predefined.\\
+ I~will~directly~use~your~selection~'#1=#2'.
+ Please~ensure~the~selection~is~valid!
+} {
+ For~more~information~see~the~zugferd~documentation.
+}
+% \end{macrocode}
+% \end{optionenv}
+% Macro to write notes
+% \begin{macrocode}
+\cs_new:Nn \_@@_note_if_not_empty:N {%
+ \tl_if_empty:NF #1 {%
+ \_@@_write_note:n {#1}%
+ }%
+}%
+% \end{macrocode}
+% \end{implementation}
+% \begin{documentation}
+% \subsection{Trade parties}
+% \label{sec:TradeParties}
+% The \XML scheme knows 6 different Trade Parties:
+% \begin{itemize}
+% \item Seller
+% \item Buyer
+% \item Payee
+% \item ShipTo
+% \item SellerTaxRepresentative
+% \end{itemize}
+%
+% \noindent Currently \pkg{zugferd} supports only Buyer, Seller and ShipTo, but can be easily extended to support the others as well.
+% The data for each party follows the same structure, except the \enquote{BuyerReference} which is described later in this section.
+%
+% Some of the data is optional for specific parties.
+% As this also depends on the selected scheme and version we will not list the details.
+% All fields for a trade party can be set using the \enquote{group} named by the party.
+% For example setting all the seller data is done in the following listing:
+% \begin{examplecode}
+% \SetZUGFeRDData{
+% seller/name = {peiTeX (Marei Peischl)},
+% seller/email = {invoicing@peitex.de},
+% seller/vatid = {DE123456789},
+% seller/contact= {Marei\\+4900000000\\marei@peitex.de},
+% seller/address = {Address Line 1\\Address Line 2},
+% seller/postcode = {20253},
+% seller/city ={Hamburg},
+% seller/country = {DE},
+% }
+% \end{examplecode}
+% \noindent All this data is saved within a property list, which is internally called \cs[no-index]{g_@@_\meta{seller/buyer/shipto}_prop}.
+% By default this property list is empty.
+% The users themselves have to ensure to add the required data.
+%
+% The outer braces are not required, if the data does not container an equal sign or a comma.
+% In case the final data is unknown, it's recommended to use them anyway.
+%
+% \DescribeKeyOption*{\meta{party}/name=\meta{name}}{}*
+% \DescribeKeyOption*{\meta{party}/email=\meta{email address}}{}*
+% \DescribeKeyOption*{\meta{party}/vatid=\meta{VAT ID}}{}*
+%
+% \DescribeKeyOption*{\meta{party}/address=\meta{address}}{}*
+% As shown in the example \option{address} can use two lines separted by |\\|.
+% It's possble to set all fields for all trade contacts, but e.\,g. for the |shipto|-party email and vatid will not be used in the \XML.
+%
+% Alternatively it's also possible to use \option{\meta{party}/lineone} and \option{\meta{party/linetwo}} separately.
+% This may be helpful if you use a custom input format. In any way you should ensure that all macros used within the data either are expandable or disabled using \cs[no-index]{zugferd_disable_macros:}.
+%
+% \DescribeKeyOption*{\meta{party}/postcode=\meta{postal code}}{}*
+% \DescribeKeyOption*{\meta{party}/city=\meta{city}}{}*
+% \DescribeKeyOption*{\meta{party}/country=\meta{country code}}{}*
+% The two letter country codes allowed here can be found in \cite{country-codes}.
+%
+% % \DescribeKeyOption*{\meta{party}/contact=\meta{Combined contact data}}{}*
+% The contact person can either be set using the combined structure similar to \option{\meta{party}/address}.
+% It either consists of 3 or 4 entries, depending on if a department should be used or not.
+%
+% \begin{examplecode}
+% \SetZUGFeRDData{
+% seller/contact = {
+% |\meta{contact-name}|\\
+% |\meta{contact-phone}|\\
+% |\meta{contact-email}|
+% },
+% seller/contact = {
+% |\meta{contact-name}|\\
+% |\meta{contact-department}|\\
+% |\meta{contact-phone}|\\
+% |\meta{contact-email}|
+% }
+% }
+% \end{examplecode}
+% \noindent As for \option{seller/address} it's also possible to set the keys directly:
+% \begin{examplecode}
+% \SetZUGFeRDData{
+% seller/contact-name= {|\meta{contact-name}|},
+% seller/contact-department = {|\meta{contact-department}|},
+% seller/cotact-phone ={|\meta{contact-phone}|},
+% seller/contact-email= {|\meta{contact-email}|}
+% }
+% \end{examplecode}
+% \end{documentation}
+% \begin{implementation}
+% ApplicableHeaderTradeAgreement
+%
+% Contains information on seller and buyer trade party:
+% \begin{itemize}
+% \item BuyerReference
+% \item SellerTradeParty
+% \item BuyerTradeParty
+% \end{itemize}
+%
+% \begin{optionenv}{\meta{party}/address}
+% \begin{variable}{\g_@@_seller_AddressData_prop,\g_@@_buyer_AddressData_prop,\g_@@_shipto_AddressData_prop}
+% Seller and Buyer are specified the same way.
+% \begin{macrocode}
+\clist_map_inline:nn {seller,buyer,shipto} {
+ \prop_new:c {g_@@_#1_AddressData_prop}
+ \keys_define:nn {zugferd / #1} {
+ address .code:n = {
+ \seq_set_split:Nnn \l_tmpa_seq {\\} {##1}
+ %TODO error if more than 2 lines or only 1
+ \keys_set:nx {zugferd / #1} {
+ lineone=\seq_item:Nn \l_tmpa_seq {1},
+ linetwo=\seq_item:Nn \l_tmpa_seq {2}
+ }
+ },
+ contact .code:n = {
+ \seq_set_split:Nnn \l_tmpa_seq {\\} {##1}
+ \int_compare:nNnTF {\seq_count:N \l_tmpa_seq} > {3} {
+ \keys_set:ne {zugferd/#1} {
+ contact-name = \seq_item:Nn \l_tmpa_seq {1},
+ contact-department = \seq_item:Nn \l_tmpa_seq {2},
+ contact-phone = \seq_item:Nn \l_tmpa_seq {3},
+ contact-email= \seq_item:Nn \l_tmpa_seq {4}
+ }
+ }{
+ \keys_set:ne {zugferd/#1} {
+ contact-name = \seq_item:Nn \l_tmpa_seq {1},
+ contact-phone = \seq_item:Nn \l_tmpa_seq {2},
+ contact-email= \seq_item:Nn \l_tmpa_seq {3}
+ }
+ }
+ },
+ unknown .code:n = \tl_if_blank:nF {##1} {
+ \prop_gput:cVe {g_@@_#1_AddressData_prop}
+ \l_keys_key_tl {\tl_trim_spaces:n {##1}}
+ }
+ }
+}
+% \end{macrocode}
+% \end{variable}
+% \end{optionenv}
+% \begin{function}{\_@@_PostalTradeAddress:N,\_@@_DefinedTradeContact:N}
+% Wrappers to map the property list items to the writing macro.
+% \begin{macrocode}
+\cs_new:Nn \_@@_PostalTradeAddress_short:N {
+ \exp_args:Ne \tl_if_blank:nF {\prop_item:Nn #1 {name}}
+ {<ram:Name>\prop_item:Nn #1 {name}</ram:Name>\iow_newline:\_@@_xml_auto_indent:}
+ \_@@_PostalTradeAddress:eeeee
+ {\prop_item:Nn #1 {postcode}}
+ {\prop_item:Nn #1 {lineone}}
+ {\prop_item:Nn #1 {linetwo}}
+ {\prop_item:Nn #1 {city}}
+ {\prop_item:Nn #1 {country}}
+}
+\cs_new:Nn \_@@_PostalTradeAddress:N {%
+ \_@@_PostalTradeAddress:eeeeeee
+ {\prop_item:Nn #1 {postcode}}
+ {\prop_item:Nn #1 {lineone}}
+ {\prop_item:Nn #1 {linetwo}}
+ {\prop_item:Nn #1 {city}}
+ {\prop_item:Nn #1 {country}}
+ {\prop_item:Nn #1 {email}}
+ {\prop_item:Nn #1 {vatid}}
+}%
+\cs_new:Nn \_@@_DefinedTradeContact:N {%
+ \_@@_DefinedTradeContact:eeee
+ {\prop_item:Nn #1 {contact-name}}
+ {\prop_item:Nn #1 {contact-department}}
+ {\prop_item:Nn #1 {contact-phone}}
+ {\prop_item:Nn #1 {contact-email}}
+}%
+% \end{macrocode}
+% \end{function}
+% \begin{macrocode}
+\cctab_begin:N \g_@@_xml_cctab%
+% \end{macrocode}
+% \iffalse
+% \_@@_PostalTradeAddress:nnnnnnn Name/Firma PLZ Zeile1 Zeile2 Ort Ländercode Email UID
+% \fi
+% \begin{macrocode}
+\_@@_define_xml_content:Nn \_@@_PostalTradeAddress:nnnnn {%
+ <ram:PostalTradeAddress>
+ \_@@_indent: <ram:PostcodeCode>#1</ram:PostcodeCode>
+ \tl_if_blank:nF {#2} {%
+ \_@@_indent: <ram:LineOne>#2</ram:LineOne>
+ }%
+ \tl_if_blank:nF {#3} {%
+ \_@@_indent: <ram:LineTwo>#3</ram:LineTwo>
+ }%
+ \_@@_indent: <ram:CityName>#4</ram:CityName>
+ \_@@_indent: <ram:CountryID>#5</ram:CountryID>
+ </ram:PostalTradeAddress>%
+}
+\_@@_define_xml_content:Nn \_@@_PostalTradeAddress:nnnnnnn {%
+ \_@@_PostalTradeAddress:nnnnn {#1} {#2} {#3} {#4} {#5}
+ \tl_if_empty:nF {#6} {%
+ <ram:URIUniversalCommunication>
+ \_@@_indent: <ram:URIID~schemeID="EM">#6</ram:URIID>
+ </ram:URIUniversalCommunication>%
+ }%
+ % TODO add support local tax id: schemaID="FC"
+ \tl_if_empty:nF {#7} {
+ <ram:SpecifiedTaxRegistration>
+ \_@@_indent: <ram:ID~schemeID="VA">#7</ram:ID>
+ </ram:SpecifiedTaxRegistration>%
+ }%
+}%
+%
+% Contact data phone/email to a specific contact person
+\_@@_define_xml_content:Nn \_@@_DefinedTradeContact:nnnn {%
+ % Do not print if name is empty
+ \tl_if_blank:nT {#1} {\use_none:nnn} %
+ \bool_if:NT \g_@@_writeTradeContact_bool {%
+ <ram:DefinedTradeContact>
+ \_@@_indent: <ram:PersonName>#1</ram:PersonName>
+ \tl_if_blank:nF {#2} {%
+ \_@@_indent: <ram:DepartmentName>#2</ram:DepartmentName>
+ }%
+ \tl_if_blank:nF {#3} {%
+ \_@@_indent: <ram:TelephoneUniversalCommunication>
+ \_@@_indent:n {2} <ram:CompleteNumber>#3</ram:CompleteNumber>
+ \_@@_indent: </ram:TelephoneUniversalCommunication>
+ }%
+ \tl_if_blank:nF {#4} {%
+ \_@@_indent: <ram:EmailURIUniversalCommunication>
+ \_@@_indent:n {2} <ram:URIID>#4</ram:URIID>
+ \_@@_indent: </ram:EmailURIUniversalCommunication>
+ }%
+ </ram:DefinedTradeContact>%
+ }%
+}%
+%
+\_@@_define_xml_writer:Nn \_@@_ApplicableHeaderTradeAgreement: {%
+ \_@@_write_xml:n {<ram:ApplicableHeaderTradeAgreement>}%
+ \int_gincr:N \g_@@_indent_int%
+ \_@@_write_xml:e {%
+ <ram:BuyerReference>\g_@@_buyer_reference_tl</ram:BuyerReference>
+ <ram:SellerTradeParty>%
+ }%
+ \int_gincr:N \g_@@_indent_int%
+ \_@@_write_xml:e {%
+ <ram:Name>\prop_item:Nn \g_@@_seller_AddressData_prop {name}</ram:Name>
+ \_@@_DefinedTradeContact:N \g_@@_seller_AddressData_prop%
+ \_@@_PostalTradeAddress:N \g_@@_seller_AddressData_prop%
+ }%
+ \int_gdecr:N \g_@@_indent_int%
+ \_@@_write_xml:e {%
+ </ram:SellerTradeParty>
+ <ram:BuyerTradeParty>%
+ }%
+ \int_gincr:N \g_@@_indent_int%
+ \_@@_write_xml:e {%
+ <ram:Name>\prop_item:Nn \g_@@_buyer_AddressData_prop {name}</ram:Name>
+ \_@@_DefinedTradeContact:N \g_@@_buyer_AddressData_prop%
+ \_@@_PostalTradeAddress:N \g_@@_buyer_AddressData_prop%
+ }%
+ \int_gdecr:N \g_@@_indent_int%
+ \_@@_write_xml:n {</ram:BuyerTradeParty>}%
+ \int_gdecr:N \g_@@_indent_int%
+ \_@@_write_xml:n {</ram:ApplicableHeaderTradeAgreement>}
+ \_@@_ApplicableHeaderTradeDelivery:V \g_@@_delivery_date_tl%
+}%
+%
+%
+% delivery date
+\_@@_define_xml_content:Nn \_@@_ApplicableHeaderTradeDelivery:n {%
+ \bool_lazy_and:nnF {\prop_if_empty_p:N \g_@@_shipto_AddressData_prop}%
+ {\tl_if_blank_p:n {#1}}%
+ {%
+ \_@@_write_xml:n {<ram:ApplicableHeaderTradeDelivery>}%
+ \prop_if_empty:NF \g_@@_shipto_AddressData_prop {%
+ \int_gincr:N \g_@@_indent_int%
+ \_@@_write_xml:n {<ram:ShipToTradeParty>}%
+ \int_gincr:N \g_@@_indent_int%
+ \_@@_write_xml:e {%
+ \_@@_PostalTradeAddress_short:N \g_@@_shipto_AddressData_prop%
+ }%
+ \int_gdecr:N \g_@@_indent_int%
+ \_@@_write_xml:n {</ram:ShipToTradeParty>}%
+ \int_gdecr:N \g_@@_indent_int%
+ }%
+ \tl_if_blank:nF {#1} {%
+ \_@@_write_xml:n {%
+ \_@@_indent: <ram:ActualDeliverySupplyChainEvent>
+ \_@@_indent:n {2} <ram:OccurrenceDateTime>
+ \_@@_indent:n {3}<udt:DateTimeString~format="102">#1</udt:DateTimeString>
+ \_@@_indent:n {2} </ram:OccurrenceDateTime>
+ \_@@_indent: </ram:ActualDeliverySupplyChainEvent>%
+ }%
+ }%
+ \_@@_write_xml:n {</ram:ApplicableHeaderTradeDelivery>}%
+ }%
+}%
+%
+\cctab_end:
+\cs_generate_variant:Nn \_@@_DefinedTradeContact:nnnn {eeee}
+\cs_generate_variant:Nn \_@@_PostalTradeAddress:nnnnn {eeeee}%
+\cs_generate_variant:Nn \_@@_PostalTradeAddress:nnnnnnn {eeeeeee}
+\cs_generate_variant:Nn \_@@_ApplicableHeaderTradeDelivery:n {V}
+% \end{macrocode}
+% \end{implementation}
+% \begin{documentation}
+% \subsubsection{Buyer Reference}
+% \DescribeKeyOption*{buyer/reference=komavar/\meta{Reference}}{}
+% The reference field only exists for the |buyer| trade party.
+% Depending on the process it's required to use some unique identifier referring to the |buyer|.
+% Within Germany these numbers are called \enquote{Leitweg-ID}\cite{leitweg-id}.
+%
+% In any way the |buyer| may choose what is used here. Also may be some PO number or similar reference.
+%
+% As defined for other variables the \option{reference} can also use the \value{komavar} value to refer to the value of komavar |yourref|\cite{scrletter}.
+% \end{documentation}
+% \begin{implementation}
+% \begin{optionenv}{buyer/reference}
+% \begin{macrocode}
+\tl_new:N \g_@@_buyer_reference_tl
+\keys_define:nn {zugferd/buyer} {
+ reference .choice:,
+ reference / komavar .code:n = {
+ \tl_gset:Nf \g_@@_buyer_reference_tl {\scr@yourref@var}
+ },
+ reference / unknown .code:n = {
+ \tl_gset:Nn \g_@@_buyer_reference_tl {#1}
+ }
+}
+% \end{macrocode}
+% \end{optionenv}
+% \end{implementation}
+% \begin{documentation}
+% \subsubsection{Payment Means}
+% \label{sec:PaymentMeans}
+% The payment means are selected by numeric codes.
+% Currently we support:
+% \begin{itemize}
+% \UseName{exp_args:Nnnc} \UseName{exp_args:co} {clist_map_inline:nn} {zugferd@paymentMeans@english} {\item #1}
+% \end{itemize}
+% Others may be added in the future but it's not planned to include a full list.
+%
+% The codes will automatically add the corresponding string inside the \enquote{Information} field.
+% The initial version only included German strings, but currently they are also included in English.
+% It's possible to overwrite them using the same structure:
+%
+% \begin{examplecode}
+% \setupZUGFeRDStrings{payment-means}{
+% 10 = Bargeld,
+% 58 = Zahlung per SEPA Überweisung.,
+% }
+% \end{examplecode}
+% The language selection is done using at hook executed at |\begin{document}| and will try to use the document's language.
+% If this is not defined English will be used.
+%
+% Internally the commands are predefined as a key-value list like the argument in the example above.
+% They macros are called \cs[no-index]{zugferd@paymentMeans@\meta{languagename}}.
+% Currently \pkg{zugferd} defines these for |english| and |german| (also |ngerman| as an compatibility alias).
+% \end{documentation}
+% \begin{implementation}
+% \begin{optionenv}{payment-means}
+% \begin{macrocode}
+\ExplSyntaxOff
+\providecommand*{\zugferd@paymentMeans@german}{
+ 1 = Keine Zahlungsart definiert,
+ 10 = Bargeld,
+ 30 = Überweisung,
+ 42 = Zahlung an Bankkonto,
+ 48 = Kartenzahlung,
+ 49 = Lastschriftverfahren,
+ 57 = Dauerauftrag,
+ 58 = Zahlung per SEPA Überweisung.,
+ 59 = SEPA Lastschrift,
+ 97 = Ausgleich zwischen Partnern
+}
+\def\zugferd@paymentMeans@ngerman{\zugferd@paymentMeans@german}
+\providecommand*{\zugferd@paymentMeans@english}{
+ 1 = Instrument not defined,
+ 10 = In cash,
+ 30 = Credit Transfer,
+ 31 = Debit Transfer,
+ 42 = Payment to bank account,
+ 48 = Bank card,
+ 49 = Direct Debit,
+ 57 = Standing agreement,
+ 58 = SEPA credit transfer,
+ 59 = SEPA direct debit,
+ 97 = Clearing between partners
+}
+\ExplSyntaxOn
+\tl_new:N \g_@@_payment_means_tl
+\keys_define:nn {zugferd} {
+ payment-means / type .choices:nn = {1,10,30,42,48,49,57,58,59,97} {
+ \tl_gset_eq:NN \g_@@_payment_means_tl \l_keys_choice_tl
+ },
+ payment-means / unknown .code:n = {
+ \msg_warning:nnn { zugferd } {unknown-value} {payment-means} {#1}
+ \tl_gset:Nn \g_@@_payment_means_tl {\int_eval:n {#1}}
+ }
+}
+
+\clist_map_inline:nn {iban,account-holder,bic} {
+ \keys_define:nn {zugferd/payment-means} {
+ #1 .tl_gset:c = {g_@@_payment_#1_tl}
+ }
+}
+
+\prop_new:c {g_@@_payment-means_names_prop}
+\newcommand*{\setupZUGFeRDStrings}[2]{
+ \prop_gset_from_keyval:cn {g_@@_#1_names_prop} {
+ #2
+ }
+}
+
+\hook_gput_code:nnn {begindocument/end}{zugferd/payment-means}{
+ \prop_if_empty:cT {g_@@_payment-means_names_prop} {
+ \exp_args:Nne \setupZUGFeRDStrings{payment-means}{
+ \use:c {zugferd@paymentMeans@
+ \cs_if_exist:cTF {zugferd@paymentMeans@\languagename} {\languagename} {english}
+ }
+ }
+ }
+}
+% \end{macrocode}
+% \end{optionenv}
+% \end{implementation}
+% \begin{documentation}
+% \subsection{Variables which may be changed per invoice item}
+% Some settings may have the same value for all invoice items.
+% These are defined to take some preset but are set locally.
+% So it's possible to adjust them for a single invoice item if necessary.
+% An example is shown in \autoref{sec:xml-interfaces}.
+% \subsubsection{Units}
+% \DescribeKeyOption*{unit=hour/day/one/piece/\meta{unit code}}{}
+% The Faktur-X standard requires the unit to be selected.
+% These are called \enquote{/UN/CEFACT Common Codes} and can be found withtin \cite{unit-codes}.
+%
+% Currently \pkg{zugferd} supports |hour| (|HUR|), |day| (|DAY|), |one| (C62) and |piece| (H87).
+% For these the corresponding codes have been implemented within the package.
+% Other units can be selected using the codes listed in \cite{unit-codes}.
+%
+% This option is not case sensitive
+% The value is automatically converted to uppercase.
+% If the selected option is different from the predefined ones, there will be a warning, as \pkg{zugferd} does not know if the selection is valid or not.
+% \begin{NOTE}
+% additional source: http://www.unece.org/fileadmin/DAM/cefact/recommendations/rec20/rec20_Rev9e_2014.xls
+% \end{NOTE}
+% \end{documentation}
+% \begin{implementation}
+% \begin{optionenv}{unit}
+% \begin{macrocode}
+\keys_define:nn { zugferd } {
+ unit .choices:nn = {HUR,DAY,C62,H87} {
+ \tl_set_eq:NN \l_@@_unit_code_tl \l_keys_choice_tl
+ },
+ unit / hour .meta:n = {unit=HUR},
+ unit / day .meta:n = {unit=DAY},
+ unit / one .meta:n= {unit= C62},
+ unit / piece .meta:n = {unit=H87},
+% \end{macrocode}
+% If unknown, the value is converted to uppercase and we use the selection directly.
+% There is a warning in that case
+% \begin{macrocode}
+ unit / unknown .code:n = {
+ \tl_set:Nx \l_tmpa_tl {\str_uppercase:f {#1}}
+ \exp_args:NnnV \keys_if_choice_exist:nnnTF {zugferd} {unit}
+ \l_tmpa_tl
+ {
+ \keys_set:ne { zugferd } {unit= {\l_tmpa_tl}}
+ } {
+ \msg_warning:nnn { zugferd } {unknown-unit} {#1}
+ \tl_set_eq:NN \l_@@_unit_code_tl \l_tmpa_tl
+ }
+ },
+ unit .usage:n = general,
+}
+
+\msg_new:nnnn {zugferd} {unknown-unit} {
+ You~selected~a~unit~which~was~not~predefined.\\
+ I~~will~directly~use~your~selection~'unit=#1'~as~Common~Code.
+ Please~ensure~the~selection~is~valid!
+} {
+ For~more~information~see~the~zugferd~documentation\\
+ and~the~/UN/CEFACT~Common~Code~list.
+}
+% \end{macrocode}
+% \end{optionenv}
+% \end{implementation}
+% \begin{documentation}
+% \subsubsection{Tax category and rate}
+% \label{sec:tax-category}
+% \DescribeKeyOption{tax/category=\meta{category code/alias}}{standard}*
+% The Tax data requires a category code. For details have a look at the Specification \cite[e.\,g. at][]{spec-xrechnung}.
+% \pkg{zugferd} implements all of those, but the user has to take care to select the correct one for each invoice item.
+% The example file includes 2 different VAT values using the same category.
+%
+% The labels have been chosen to simplify the usage. It's also possible to enter the codes directly.
+% This option is not case sensitive.
+% \begin{valuelist}
+% \item[standard] Standard rate and reduced rate item, |category=S|
+% \item[zero] Zero rated sale, |category=Z|
+% \item[exempt] Exempted from VAT. This requires a reason via \option{exemption-reason},|category=E|
+% \item[reverse-charge] Reverse Charge, |category=AE|
+% \item[intra-community\\\textnormal{or} EEA] Intra-Community Supply, |category=K|
+% \item[export] Free export item, tax not charged, |category=G|
+% \item[O] Services outside scope of tax
+% \item[canary-islands] Canary Islands general indirect tax, |category=L|
+% \item[ceuta\\\textnormal{or} melilla] Ceuta and Melilla, |category=M|
+% \end{valuelist}
+%
+% \end{documentation}
+% \begin{implementation}
+% \optionenv{category, exemption-reason,rate}
+% \begin{macrocode}
+\msg_new:nnnn {zugferd} {unknown-tax-category} {
+ You~selected~an~unknown~tax~category.\\
+ I~~will~directly~use~your~selection~'category=#1'~as~Code.\\
+ Please~ensure~the~selection~is~valid!
+} {
+ For~more~information~see~the~zugferd~documentation\\
+ and~the~corresponding~code~list.
+}
+\msg_new:nnnn {zugferd} {no-auto-exemption} {
+ You~selected~tax/category=#1~together~with~the~auto-exemption~option.\\
+ I~don't~have~any~pre-configured~exemption~setting~for~category=#1.\\
+ Please~make~sure~you~add~a~valid~setting~yourself.
+} {
+ For~more~information~see~the~zugferd~documentation.
+}
+\keys_define:nn { zugferd / tax } {
+ category .choices:nn = {S,Z,E,AE,K,G,O,L,M} {
+ \tl_set_eq:NN \l_@@_tax_category_code_tl \l_keys_choice_tl
+ \bool_if:NT \g_@@_auto_exemption_bool {
+ \keys_if_choice_exist:nnnTF {zugferd/tax} {exemption-reason-auto} {#1} {
+ \keys_set:nn {zugferd/tax} {exemption-reason-auto=#1}
+ } {
+ \msg_warning:nnn { zugferd } {no-auto-exemption} {#1}
+ }
+ }
+ },
+% \end{macrocode}
+% \end{implementation}
+% \begin{documentation}
+% \DescribeKeyOption*{tax/exemption-reason=\meta{Text}}{}*
+% \DescribeKeyOption*{tax/exemption-reason-code=\meta{exemption reason code}}{}*
+% Add Reasons for a tax exempt, as required by |category=E,K,AE,G,O|.
+% This can either be added using a text (|exemption-reason|) or a predefined code (|exemption-reason-code|).
+% The codes are listed at \cite{VAT-exemption-codes}.
+%
+% In most common cases \pkg{zugferd} tries to automatically match them if the package option \option{auto-exemption} is enabled, which is the default.
+% In that case the following settings would apply:
+%
+% \begin{valuelist}
+% \item[S] \accessTaxExemptionReason{S}
+% \item[Z] Not configured.
+% \item[E] Not configured, as there are too many options.
+% \item[AE] \accessTaxExemptionReason{AE}
+% \item[K] \accessTaxExemptionReason{K}
+% \item[G] \accessTaxExemptionReason{G}
+% \item[O] \accessTaxExemptionReason{O}
+% \end{valuelist}
+%
+% In case there is no pre-configured selection \pkg{zugferd} will create a warning to remind the user to add a selection themselves.
+%
+% \end{documentation}
+% \begin{implementation}
+% \begin{macrocode}
+ exemption-reason .tl_set:N = \l_@@_tax_exemption_reason_tl,
+ exemption-reason .initial:V = \c_empty_tl,
+ exemption-reason .usage:n = general,
+ exemption-reason-code .tl_set:N = \l_@@_tax_exemption_code_tl,
+ exemption-reason-code .initial:V = \c_empty_tl,
+ exemption-reason .usage:n = general,
+% \end{macrocode}
+% \changes{v0.7}{2024-09-10}{Added exemption-reason-auto key for pre-configured exemption-reasons.}
+% \begin{macrocode}
+ exemption-reason-auto .choice:,
+ exemption-reason-auto / S .code:n = {
+ \keys_set:nn {zugferd/tax} {exemption-reason=,exemption-reason-code=}
+ },
+ exemption-reason-auto / K .code:n = {
+ \keys_set:nn {zugferd/tax} {
+ exemption-reason= Intra-Community~Supply,
+ exemption-reason-code={vatex-eu-ic}
+ }
+ },
+ exemption-reason-auto / AE .code:n = {
+ \keys_set:nn {zugferd/tax}{
+ exemption-reason=Reverse~Charge,
+ exemption-reason-code={vatex-eu-ae}
+ }
+ },
+ exemption-reason-auto / G .code:n = {
+ \keys_set:nn {zugferd/tax}{
+ exemption-reason=Export~outside~the~EU,
+ exemption-reason-code={vatex-eu-g}
+ }
+ },
+ exemption-reason-auto / O .code:n = {
+ \keys_set:nn {zugferd/tax}{
+ exemption-reason=No~subject~to~VAT,
+ exemption-reason-code={vatex-eu-o}
+ }
+ },
+ standard .meta:n = {category=S},
+ zero .meta:n = {category=Z},
+ exempt .meta:n = {category=E},
+ reverse-charge .meta:n = {category=AE},
+ intra-community .meta:n = {category=K},
+ EEA .meta:n = {category=K},
+ export .meta:n = {category=G},
+ canary-islands .meta:n = {category=L},
+ ceuta .meta:n = {category=M},
+ melilla .meta:n = {category=M},
+ category / unknown .code:n = {
+ \exp_args:Nnnx \keys_if_choice_exist:nnnTF {zugferd} {category}
+ {\str_uppercase:f {#1}}
+ {
+ \keys_set:nx { zugferd } {category= {\str_uppercase:f {#1}}}
+ } {
+ \msg_warning:nnn { zugferd } {unknown-tax-category} {#1}
+ }
+ },
+ category .initial:n = S,
+ category .usage:n = general,
+% \end{macrocode}
+% \end{implementation}
+% \begin{documentation}
+% \DescribeKeyOption{tax/rate=\meta{floating point}}{19}*
+% The value given will be used for tax calculation.
+% By default it's configured to |19| to match the German standard VAT rate.
+%
+% \end{documentation}
+% \begin{implementation}
+% \begin{macrocode}
+ rate .fp_set:N = \l_@@_tax_rate_fp,
+ rate .initial:n = 19,
+ rate .usage:n = general,
+}
+% \end{macrocode}
+% \endoptionenv
+% \begin{macrocode}
+\_@@_define_xml_writer:Nn \_@@_write_inline:nn {
+ \tl_if_blank:nF {#2} {
+ <#1>#2</#1>
+ }
+}
+\cs_generate_variant:Nn \_@@_write_inline:nn {ne}
+\_@@_define_xml_writer:Nn \_@@_write_inline_i:nn {
+ \_@@_indent: \_@@_write_inline:nn {#1} {#2}
+}
+\cctab_begin:N \g_@@_xml_cctab%
+%
+\_@@_define_xml_writer:Nn \_@@_write_note:n {%
+ \begingroup%
+ \let\\\iow_newline:%
+ \_@@_write_xml:e {%
+ <ram:IncludedNote>
+ \_@@_indent: <ram:Content>
+ #1
+ \_@@_indent: </ram:Content>
+ </ram:IncludedNote>%
+ }%
+ \endgroup%
+}%
+%
+%
+\begingroup%
+\char_set_catcode_other:N \#%
+\char_set_catcode:nn {32}{10}%
+\_@@_define_xml_writer:Nn \_@@_insert_Header: {%
+ \_@@_write_xml:e {%
+ <?xml version='1.0' encoding='UTF-8' ?>
+ <rsm:CrossIndustryInvoice %
+ xmlns:rsm="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100" %
+ xmlns:qdt="urn:un:unece:uncefact:data:standard:QualifiedDataType:100" %
+ xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100" %
+ xmlns:xs="http://www.w3.org/2001/XMLSchema" %
+ xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100">%
+ }%
+ \int_gincr:N \g_@@_indent_int%
+ \_@@_write_xml:n {<rsm:ExchangedDocumentContext>}%
+ \int_gincr:N \g_@@_indent_int%
+ \_@@_write_xml:e {%
+ \str_if_empty:NF \g_@@_businessProcessId_str {%
+ <ram:BusinessProcessSpecifiedDocumentContextParameter>
+ \_@@_indent: <ram:ID>\g_@@_businessProcessId_str</ram:ID>
+ </ram:BusinessProcessSpecifiedDocumentContextParameter>
+ }%
+ <ram:GuidelineSpecifiedDocumentContextParameter>
+ \_@@_indent: <ram:ID>\g_@@_format_str</ram:ID>
+ </ram:GuidelineSpecifiedDocumentContextParameter>%
+ }%
+ \int_gdecr:N \g_@@_indent_int%
+ \_@@_write_xml:n {</rsm:ExchangedDocumentContext>}%
+}%
+\endgroup%
+\_@@_define_xml_writer:Nn \_@@_insert_FrontMatter: {%
+ \_@@_write_xml:n {<rsm:ExchangedDocument>}%
+ \int_gincr:N \g_@@_indent_int%
+ \_@@_write_xml:e {%
+ <ram:ID>\g_@@_id_tl</ram:ID>
+ <ram:TypeCode>\g_@@_DocumentTypeCode_tl</ram:TypeCode>
+ <ram:IssueDateTime>
+ % space required!
+ \_@@_indent:<udt:DateTimeString~format="102">\g_@@_date_tl</udt:DateTimeString>
+ </ram:IssueDateTime>%
+ }%
+ \_@@_note_if_not_empty:N \g_@@_subject_tl%
+ \_@@_note_if_not_empty:N \g_@@_fromaddress_tl%
+ \seq_map_inline:Nn \g_@@_notes_seq {%
+ \_@@_write_note:n {##1}%
+ }%
+ \int_gdecr:N \g_@@_indent_int%
+ \_@@_write_xml:e {%
+ </rsm:ExchangedDocument>
+ <rsm:SupplyChainTradeTransaction>%
+ }%
+ \int_gincr:N \g_@@_indent_int%
+}%
+%
+% footer
+\_@@_define_xml_writer:Nn \_@@_insert_Footer: {%
+ \int_gdecr:N \g_@@_indent_int%
+ \_@@_write_xml:n {</rsm:SupplyChainTradeTransaction>}%
+ \int_gdecr:N \g_@@_indent_int%
+ \_@@_write_xml:n {</rsm:CrossIndustryInvoice>}%
+}%
+\cctab_end:
+% \end{macrocode}
+%
+% \subsection{Invoice Items}
+% Each item consists of 5 parts:
+% \begin{itemize}
+% \item AssociatedDocumentLineDocument
+% \item SpecifiedTradeProduct
+% \item SpecifiedLineTradeAgreement
+% \item SpecifiedLineTradeDelivery
+% \item SpecifiedLineTradeSettlement
+% \end{itemize}
+% These are implemented as separate commands to be more flexible.
+% The wrapper command is called \cs[no-index]{@@_insert_TradeLineItem:nnnnnn} and is created to be used in your own invoicing package-
+% \begin{macrocode}
+\cctab_begin:N \g_@@_xml_cctab%
+% \end{macrocode}
+% \begin{function}{\_@@_AssociatedDocumentLineDocument:n}
+% \begin{macrocode}
+\_@@_define_xml_writer:Nn \_@@_AssociatedDocumentLineDocument:n {%
+ <ram:AssociatedDocumentLineDocument>
+ \_@@_indent: <ram:LineID>#1</ram:LineID>
+ </ram:AssociatedDocumentLineDocument>%
+}%
+% \end{macrocode}
+% \end{function}
+% \begin{function}{\_@@_SpecifiedTradeProduct:nn}
+% \begin{macrocode}
+\_@@_define_xml_writer:Nn \_@@_SpecifiedTradeProduct:nn {%
+ <ram:SpecifiedTradeProduct>
+ \tl_if_empty:nF {#1} {%
+ \_@@_indent: <ram:SellerAssignedID>#1</ram:SellerAssignedID>
+ }%
+ \_@@_indent: <ram:Name>#2</ram:Name>
+ </ram:SpecifiedTradeProduct>%
+}%
+% \end{macrocode}
+% \end{function}
+% \begin{function}{\_@@_ProductTradePrice:nn}
+% \begin{macrocode}
+\_@@_define_xml_writer:Nn \_@@_ProductTradePrice:nn {%
+ <ram:\str_uppercase:n #1PriceProductTradePrice>
+ \_@@_indent: <ram:ChargeAmount>#2</ram:ChargeAmount>
+ </ram:\str_uppercase:n #1PriceProductTradePrice>%
+}%
+% \end{macrocode}
+% \end{function}
+% \begin{function}{\_@@_SpecifiedLineTradeAgreement:nn}
+% \begin{macrocode}
+\_@@_define_xml_writer:Nn \_@@_SpecifiedLineTradeAgreement:nn {%
+ <ram:SpecifiedLineTradeAgreement>
+ \_@@_indent:<ram:GrossPriceProductTradePrice>
+ \_@@_indent:n {2} <ram:ChargeAmount>#1</ram:ChargeAmount>
+ \_@@_indent:</ram:GrossPriceProductTradePrice>
+ \_@@_indent:<ram:NetPriceProductTradePrice>
+ \_@@_indent:n {2} <ram:ChargeAmount>#2</ram:ChargeAmount>
+ \_@@_indent:</ram:NetPriceProductTradePrice>
+ </ram:SpecifiedLineTradeAgreement>
+}%
+% \end{macrocode}
+% \end{function}
+%%%\subsubsection{SpecifiedLineTradeDelivery}%:nn <unit code > <number>
+% \begin{function}{\_@@_SpecifiedLineTradeDelivery:nn}
+% \begin{macrocode}
+\_@@_define_xml_writer:Nn \_@@_SpecifiedLineTradeDelivery:nn {%
+ <ram:SpecifiedLineTradeDelivery>
+ % SPACE!
+ \_@@_indent: <ram:BilledQuantity~unitCode="#1">#2</ram:BilledQuantity>
+ </ram:SpecifiedLineTradeDelivery>
+}%
+% \end{macrocode}
+% \end{function}
+% \begin{function}{\_@@_SpecifiedLineTradeSettlement:nnn,\_@@_SpecifiedLineTradeSettlement:Vnn}
+% \begin{macrocode}
+\_@@_define_xml_content:Nn \_@@_SpecifiedLineTradeSettlement:nnn {%
+ <ram:SpecifiedLineTradeSettlement>
+ \_@@_indent: <ram:ApplicableTradeTax>
+ %BT-151
+ \_@@_indent:n {2} <ram:TypeCode>VAT</ram:TypeCode>
+ %BT-151
+ \_@@_indent:n {2} <ram:CategoryCode>#1</ram:CategoryCode>
+ %BT-152
+ \_@@_indent:n {2} <ram:RateApplicablePercent>#2</ram:RateApplicablePercent>
+ \_@@_indent: </ram:ApplicableTradeTax>
+ \_@@_indent: <ram:SpecifiedTradeSettlementLineMonetarySummation>
+ % BT-131
+ \_@@_indent:n {2} <ram:LineTotalAmount>#3</ram:LineTotalAmount>
+ \_@@_indent: </ram:SpecifiedTradeSettlementLineMonetarySummation>
+ </ram:SpecifiedLineTradeSettlement>%
+}%
+% \end{macrocode}
+% \begin{macrocode}
+\cctab_end:
+\cs_generate_variant:Nn \_@@_SpecifiedLineTradeSettlement:nnn {Vnn}
+% \end{macrocode}
+% \end{function}
+% The exemption reason was placed wrong with the pre-CTAN release.
+% This was fixed in August 2024.
+% The old macro will be kept for a bit longer but will be removed soon.
+% Please update your own implementations accordingly.
+% \changes{v0.4}{2024-08-22}{Deprecate old syntax and add public interfaces.}
+% \begin{macrocode}
+\cs_new:Nn \_@@_SpecifiedLineTradeSettlement:nnnn {
+ \msg_warning:nnnn {zugferd} {macro-deprecated}
+ { \_@@_SpecifiedLineTradeSettlement:nnnn }
+ { \_@@_SpecifiedLineTradeSettlement:nnn }
+ \_@@_SpecifiedLineTradeSettlement:nnn {#2} {#3} {#4}
+}
+\cs_generate_variant:Nn \_@@_SpecifiedLineTradeSettlement:nnnn {VVnn}
+% \end{macrocode}
+% \end{implementation}
+% \begin{implementation}
+% \begin{function}{ \_@@_insert_TradeLineItem:nnnnnn,\@@_write_TradeLineItem:nnnnnn}
+% Writing an invoice item using the helper commands defined before, to the \XMLfile.
+% \begin{macrocode}
+\_@@_define_xml_writer:Nn \_@@_insert_TradeLineItem:nnnnnn {
+ \_@@_write_xml:n {<ram:IncludedSupplyChainTradeLineItem>}
+ \int_gincr:N \g_@@_indent_int
+ \_@@_write_xml:e {\_@@_AssociatedDocumentLineDocument:n {#1}}%
+
+ \begingroup
+ \zugferd_disable_macros:
+ \_@@_write_xml:e {\_@@_SpecifiedTradeProduct:nn {#2} {#3}}
+ \endgroup
+
+ \_@@_write_xml:n {<ram:SpecifiedLineTradeAgreement>}
+ \int_gincr:N \g_@@_indent_int%
+ \_@@_write_xml:e {\_@@_ProductTradePrice:nn {net} {#4}}
+ \int_gdecr:N \g_@@_indent_int%
+ \_@@_write_xml:n {</ram:SpecifiedLineTradeAgreement>}
+ \_@@_write_xml:e {%
+ \_@@_SpecifiedLineTradeDelivery:nn { \l_@@_unit_code_tl } {#5}
+ \_@@_SpecifiedLineTradeSettlement:Vnn \l_@@_tax_category_code_tl %
+ { \fp_use:N \l_@@_tax_rate_fp} {#6}
+ }%
+ \int_gdecr:N \g_@@_indent_int
+ \_@@_write_xml:n {</ram:IncludedSupplyChainTradeLineItem>}
+}
+% \end{macrocode}
+% \end{function}
+% \end{implementation}
+% \begin{implementation}
+% ApplicableHeaderTradeSettlement
+% \begin{macrocode}
+\_@@_define_xml_writer:Nn \_@@_SpecifiedTradeSettlementHeaderMonetarySummation:nnnnnnnn {%
+ \_@@_write_xml:n {<ram:SpecifiedTradeSettlementHeaderMonetarySummation>}%
+ \int_gincr:N \g_@@_indent_int%
+ \_@@_write_rounded:nnn {2} {LineTotalAmount} {#1}
+ \_@@_write_rounded:nnn {2} {ChargeTotalAmount} {#2}
+ \_@@_write_rounded:nnn {2} {AllowanceTotalAmount} {#3}
+ \_@@_write_rounded:nnn {2} {TaxBasisTotalAmount} {#4}
+ \_@@_write_rounded:nnnn {2} {TaxTotalAmount} {~currencyID="\l_@@_currency_tl "} {#5}
+ \_@@_write_rounded:nnn {2} {GrandTotalAmount} {#6}
+ \_@@_write_rounded:nnn {2} {TotalPrepaidAmount} {#7}
+ \_@@_write_rounded:nnn {2} {DuePayableAmount} {#8}
+ \int_gdecr:N \g_@@_indent_int%
+ \_@@_write_xml:n {</ram:SpecifiedTradeSettlementHeaderMonetarySummation>}%
+}%
+% ApplicableTradeTax CategoryCode Rate BaseAmount Result
+\_@@_define_xml_writer:Nn \_@@_ApplicableTradeTax:nnnn {%
+ \_@@_write_xml:n {<ram:ApplicableTradeTax>}
+ \int_gincr:N \g_@@_indent_int%
+ \_@@_write_rounded:nnn {2} {CalculatedAmount} {#4}%BT117
+ \_@@_write_xml:n {<ram:TypeCode>VAT</ram:TypeCode>}%BT118
+ \tl_if_blank:VF \l_@@_tax_exemption_reason_tl {%BT-120
+ \_@@_write_xml:e {<ram:ExemptionReason>
+ \l_@@_tax_exemption_reason_tl
+ </ram:ExemptionReason>}
+ }
+ {{\_@@_write_rounded:nnn {2} {BasisAmount} {#3}}}%BT-116
+ \_@@_write_xml:e {<ram:CategoryCode>#1</ram:CategoryCode>}%BT-118
+ \tl_if_blank:VF \l_@@_tax_exemption_code_tl {%BT121
+ \_@@_write_xml:e {<ram:ExemptionReasonCode>
+ \l_@@_tax_exemption_code_tl
+ </ram:ExemptionReasonCode>}
+ }
+ \_@@_write_xml:n {<ram:RateApplicablePercent>#2</ram:RateApplicablePercent>}%BT-119
+ \int_gdecr:N \g_@@_indent_int%
+ \_@@_write_xml:n {</ram:ApplicableTradeTax>}
+}%
+%
+\cctab_begin:N \g_@@_xml_cctab%
+% ApplicableHeaderTradeSettlement
+\_@@_define_xml_writer:Nn \_@@_ApplicableHeaderTradeSettlement:nnnnnnnn {%
+
+}%
+% \end{macrocode}
+% ApplicableHeaderTradeSettlement needs to be splitted to be used in separate parts of the tabular.
+% \begin{macrocode}
+\_@@_define_xml_writer:Nn \_@@_ApplicableHeaderTradeSettlement_start: {%
+ \_@@_write_xml:n {<ram:ApplicableHeaderTradeSettlement>}%
+ \int_gincr:N \g_@@_indent_int%
+ \_@@_write_xml:e {<ram:InvoiceCurrencyCode>\l_@@_currency_tl</ram:InvoiceCurrencyCode>}%
+}%
+\_@@_define_xml_writer:Nn \_@@_ApplicableHeaderTradeSettlement_stop: {%
+ \int_gdecr:N \g_@@_indent_int%
+ \_@@_write_xml:n {</ram:ApplicableHeaderTradeSettlement>}%
+}%
+% \end{macrocode}
+% SpecifiedTradePaymentTerms
+% \begin{macrocode}
+\_@@_define_xml_writer:Nn \_@@_SpecifiedTradePaymentTerms:nn {%
+ \_@@_write_xml:n {<ram:SpecifiedTradePaymentTerms>}%
+ \int_gincr:N \g_@@_indent_int%
+ \_@@_write_xml:e {%
+ \tl_if_blank:nF {#1} {%
+ <ram:Description>#1</ram:Description>%
+ }%
+ \tl_if_blank:nF {#2} {%
+ <ram:DueDateDateTime>
+ \_@@_indent: <udt:DateTimeString~format="102">#2</udt:DateTimeString>
+ </ram:DueDateDateTime>%
+ }%
+ }%
+ \int_gdecr:N \g_@@_indent_int%
+ \_@@_write_xml:n {</ram:SpecifiedTradePaymentTerms>}%
+}%
+%
+%
+% sums
+\_@@_define_xml_writer:Nn \_@@_SpecifiedTradeSettlementPaymentMeans:nnn {%
+ \bool_if:NT \g_@@_writePaymentMeans_bool {%
+ \_@@_write_xml:n {<ram:SpecifiedTradeSettlementPaymentMeans>}%
+ \int_gincr:N \g_@@_indent_int%
+ \_@@_write_xml:e {%
+ <ram:TypeCode>\g_@@_payment_means_tl</ram:TypeCode>
+ \_@@_write_inline:ne {ram:Information} {\prop_item:cV {g_@@_payment-means_names_prop} \g_@@_payment_means_tl}%
+ \tl_if_blank:nF {#1#2} {%
+ <ram:PayeePartyCreditorFinancialAccount>
+ \_@@_write_inline_i:nn {ram:IBANID} {#2}
+ \_@@_write_inline_i:nn {ram:AccountName} {#1}
+ </ram:PayeePartyCreditorFinancialAccount>
+ }%
+ \tl_if_blank:nF {#3} {%
+ <ram:PayeeSpecifiedCreditorFinancialInstitution>
+ \_@@_write_inline_i:nn {ram:BICID} {#3}
+ </ram:PayeeSpecifiedCreditorFinancialInstitution>%
+ }%
+ }%
+ \int_gdecr:N \g_@@_indent_int%
+ \_@@_write_xml:n {</ram:SpecifiedTradeSettlementPaymentMeans>}%
+ }%
+}%
+\cctab_end:
+\cs_generate_variant:Nn \_@@_SpecifiedTradePaymentTerms:nn {VV}
+\_@@_define_xml_writer:Nn \_@@_SpecifiedTradePaymentTerms: {
+ \_@@_SpecifiedTradePaymentTerms:VV \_@@_payment_terms_str \_@@_due_date_tl
+}
+% \end{macrocode}
+% \begin{function}{\_@@_SpecifiedTradeSettlementPaymentMeans:}
+% \begin{macrocode}
+\cs_generate_variant:Nn \_@@_SpecifiedTradeSettlementPaymentMeans:nnn {vvv}
+\_@@_define_xml_writer:Nn \_@@_SpecifiedTradeSettlementPaymentMeans: {
+ \tl_if_blank:VF \g_@@_payment_means_tl {
+ \_@@_SpecifiedTradeSettlementPaymentMeans:vvv
+ {g_@@_payment_account-holder_tl} {g_@@_payment_iban_tl} {g_@@_payment_bic_tl}
+ }
+}
+% \end{macrocode}
+% \end{function}
+% \end{implementation}
+% \begin{implementation}
+% \begin{macrocode}
+\msg_new:nnn {zugferd} {macro-deprecated} {
+ The~function~#1~is~deprecated.\\
+ It~was~replaced~by~#2.\\
+ Please~adjust~your~mechanism~to~use~the~new~version.
+}
+% \end{macrocode}
+% \end{implementation}
+% \iffalse
+% \begin{macrocode}
+%</package>
+% \end{macrocode}
+% \fi
+% \Finale
+\endinput
diff --git a/macros/latex/contrib/zugferd/zugferd.ins b/macros/latex/contrib/zugferd/zugferd.ins
new file mode 100644
index 0000000000..207227702a
--- /dev/null
+++ b/macros/latex/contrib/zugferd/zugferd.ins
@@ -0,0 +1,19 @@
+\input docstrip
+
+\preamble
+
+Copyright (C) 2023--2024 by Marei Peischl (peiTeX) <marei@peitex.de>
+
+\endpreamble
+
+\askforoverwritefalse
+
+\usedir{tex/latex/zugferd}
+
+\generate{
+ \file{zugferd.sty}{
+ \from{zugferd.dtx}{package}
+ }
+}
+
+\endbatchfile
diff --git a/macros/latex/contrib/zugferd/zugferd.pdf b/macros/latex/contrib/zugferd/zugferd.pdf
new file mode 100644
index 0000000000..3d3801ab7b
--- /dev/null
+++ b/macros/latex/contrib/zugferd/zugferd.pdf
Binary files differ